HttpsApplicationConfigurationArgs

data class HttpsApplicationConfigurationArgs(val altSvc: Output<String>? = null, val altSvcClear: Output<String>? = null, val altSvcMa: Output<String>? = null, val altSvcPersist: Output<String>? = null, val hsts: Output<String>? = null, val hstsIncludeSubdomains: Output<String>? = null, val hstsMaxAge: Output<String>? = null, val hstsPreload: Output<String>? = null, val httpsForce: Output<String>? = null, val httpsForceCode: Output<String>? = null, val rule: Output<String>? = null, val ruleEnable: Output<String>? = null, val ruleName: Output<String>? = null, val siteId: Output<Int>? = null, val siteVersion: Output<Int>? = null) : ConvertibleToJava<HttpsApplicationConfigurationArgs>

Provides a ESA Https Application Configuration resource. For information about ESA Https Application Configuration and how to use it, see What is Https Application Configuration.

NOTE: Available since v1.244.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.esa.getSites({
planSubscribeType: "enterpriseplan",
});
const defaultSite = new alicloud.esa.Site("default", {
siteName: "httpsapplicationconfiguration.example.com",
instanceId: _default.then(_default => _default.sites?.[0]?.instanceId),
coverage: "domestic",
accessType: "NS",
});
const defaultHttpsApplicationConfiguration = new alicloud.esa.HttpsApplicationConfiguration("default", {
hstsMaxAge: "31536000",
altSvcClear: "off",
rule: "http.host eq \"video.example.com\"",
httpsForce: "off",
altSvcMa: "86400",
hsts: "off",
ruleName: "rule_example",
ruleEnable: "off",
siteId: defaultSite.id,
altSvcPersist: "off",
hstsPreload: "off",
hstsIncludeSubdomains: "off",
altSvc: "off",
httpsForceCode: "301",
siteVersion: 0,
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.esa.get_sites(plan_subscribe_type="enterpriseplan")
default_site = alicloud.esa.Site("default",
site_name="httpsapplicationconfiguration.example.com",
instance_id=default.sites[0].instance_id,
coverage="domestic",
access_type="NS")
default_https_application_configuration = alicloud.esa.HttpsApplicationConfiguration("default",
hsts_max_age="31536000",
alt_svc_clear="off",
rule="http.host eq \"video.example.com\"",
https_force="off",
alt_svc_ma="86400",
hsts="off",
rule_name="rule_example",
rule_enable="off",
site_id=default_site.id,
alt_svc_persist="off",
hsts_preload="off",
hsts_include_subdomains="off",
alt_svc="off",
https_force_code="301",
site_version=0)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Esa.GetSites.Invoke(new()
{
PlanSubscribeType = "enterpriseplan",
});
var defaultSite = new AliCloud.Esa.Site("default", new()
{
SiteName = "httpsapplicationconfiguration.example.com",
InstanceId = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.InstanceId)),
Coverage = "domestic",
AccessType = "NS",
});
var defaultHttpsApplicationConfiguration = new AliCloud.Esa.HttpsApplicationConfiguration("default", new()
{
HstsMaxAge = "31536000",
AltSvcClear = "off",
Rule = "http.host eq \"video.example.com\"",
HttpsForce = "off",
AltSvcMa = "86400",
Hsts = "off",
RuleName = "rule_example",
RuleEnable = "off",
SiteId = defaultSite.Id,
AltSvcPersist = "off",
HstsPreload = "off",
HstsIncludeSubdomains = "off",
AltSvc = "off",
HttpsForceCode = "301",
SiteVersion = 0,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := esa.GetSites(ctx, &esa.GetSitesArgs{
PlanSubscribeType: pulumi.StringRef("enterpriseplan"),
}, nil)
if err != nil {
return err
}
defaultSite, err := esa.NewSite(ctx, "default", &esa.SiteArgs{
SiteName: pulumi.String("httpsapplicationconfiguration.example.com"),
InstanceId: pulumi.String(_default.Sites[0].InstanceId),
Coverage: pulumi.String("domestic"),
AccessType: pulumi.String("NS"),
})
if err != nil {
return err
}
_, err = esa.NewHttpsApplicationConfiguration(ctx, "default", &esa.HttpsApplicationConfigurationArgs{
HstsMaxAge: pulumi.String("31536000"),
AltSvcClear: pulumi.String("off"),
Rule: pulumi.String("http.host eq \"video.example.com\""),
HttpsForce: pulumi.String("off"),
AltSvcMa: pulumi.String("86400"),
Hsts: pulumi.String("off"),
RuleName: pulumi.String("rule_example"),
RuleEnable: pulumi.String("off"),
SiteId: defaultSite.ID(),
AltSvcPersist: pulumi.String("off"),
HstsPreload: pulumi.String("off"),
HstsIncludeSubdomains: pulumi.String("off"),
AltSvc: pulumi.String("off"),
HttpsForceCode: pulumi.String("301"),
SiteVersion: pulumi.Int(0),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.EsaFunctions;
import com.pulumi.alicloud.esa.inputs.GetSitesArgs;
import com.pulumi.alicloud.esa.Site;
import com.pulumi.alicloud.esa.SiteArgs;
import com.pulumi.alicloud.esa.HttpsApplicationConfiguration;
import com.pulumi.alicloud.esa.HttpsApplicationConfigurationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var default = EsaFunctions.getSites(GetSitesArgs.builder()
.planSubscribeType("enterpriseplan")
.build());
var defaultSite = new Site("defaultSite", SiteArgs.builder()
.siteName("httpsapplicationconfiguration.example.com")
.instanceId(default_.sites()[0].instanceId())
.coverage("domestic")
.accessType("NS")
.build());
var defaultHttpsApplicationConfiguration = new HttpsApplicationConfiguration("defaultHttpsApplicationConfiguration", HttpsApplicationConfigurationArgs.builder()
.hstsMaxAge("31536000")
.altSvcClear("off")
.rule("http.host eq \"video.example.com\"")
.httpsForce("off")
.altSvcMa("86400")
.hsts("off")
.ruleName("rule_example")
.ruleEnable("off")
.siteId(defaultSite.id())
.altSvcPersist("off")
.hstsPreload("off")
.hstsIncludeSubdomains("off")
.altSvc("off")
.httpsForceCode("301")
.siteVersion("0")
.build());
}
}
resources:
defaultSite:
type: alicloud:esa:Site
name: default
properties:
siteName: httpsapplicationconfiguration.example.com
instanceId: ${default.sites[0].instanceId}
coverage: domestic
accessType: NS
defaultHttpsApplicationConfiguration:
type: alicloud:esa:HttpsApplicationConfiguration
name: default
properties:
hstsMaxAge: '31536000'
altSvcClear: off
rule: http.host eq "video.example.com"
httpsForce: off
altSvcMa: '86400'
hsts: off
ruleName: rule_example
ruleEnable: off
siteId: ${defaultSite.id}
altSvcPersist: off
hstsPreload: off
hstsIncludeSubdomains: off
altSvc: off
httpsForceCode: '301'
siteVersion: '0'
variables:
default:
fn::invoke:
function: alicloud:esa:getSites
arguments:
planSubscribeType: enterpriseplan

Import

ESA Https Application Configuration can be imported using the id, e.g.

$ pulumi import alicloud:esa/httpsApplicationConfiguration:HttpsApplicationConfiguration example <site_id>:<config_id>

Constructors

Link copied to clipboard
constructor(altSvc: Output<String>? = null, altSvcClear: Output<String>? = null, altSvcMa: Output<String>? = null, altSvcPersist: Output<String>? = null, hsts: Output<String>? = null, hstsIncludeSubdomains: Output<String>? = null, hstsMaxAge: Output<String>? = null, hstsPreload: Output<String>? = null, httpsForce: Output<String>? = null, httpsForceCode: Output<String>? = null, rule: Output<String>? = null, ruleEnable: Output<String>? = null, ruleName: Output<String>? = null, siteId: Output<Int>? = null, siteVersion: Output<Int>? = null)

Properties

Link copied to clipboard
val altSvc: Output<String>? = null

Function switch, default off. Value range:

Link copied to clipboard
val altSvcClear: Output<String>? = null

Alt-Svc whether The header contains the clear parameter. This parameter is disabled by default. Value range:

Link copied to clipboard
val altSvcMa: Output<String>? = null

The effective time of the Alt-Svc, in seconds. The default value is 86400 seconds.

Link copied to clipboard
val altSvcPersist: Output<String>? = null

Alt-Svc whether The header contains the persist parameter. This parameter is disabled by default. Value range:

Link copied to clipboard
val hsts: Output<String>? = null

Whether to enable HSTS. It is disabled by default. Value range:

Link copied to clipboard
val hstsIncludeSubdomains: Output<String>? = null

Whether to include subdomains in HSTS is disabled by default. Value range:

Link copied to clipboard
val hstsMaxAge: Output<String>? = null

The expiration time of HSTS, in seconds.

Link copied to clipboard
val hstsPreload: Output<String>? = null

Whether to enable HSTS preloading. It is disabled by default. Value range:

Link copied to clipboard
val httpsForce: Output<String>? = null

Whether to enable forced HTTPS. It is disabled by default. Value range:

Link copied to clipboard
val httpsForceCode: Output<String>? = null

Forced HTTPS jump status code, value range:

Link copied to clipboard
val rule: Output<String>? = null

Rule content, using conditional expressions to match user requests. When adding global configuration, this parameter does not need to be set. There are two usage scenarios:

Link copied to clipboard
val ruleEnable: Output<String>? = null

Rule switch. When adding global configuration, this parameter does not need to be set. Value range:

Link copied to clipboard
val ruleName: Output<String>? = null

Rule name. When adding global configuration, this parameter does not need to be set.

Link copied to clipboard
val siteId: Output<Int>? = null

The site ID, which can be obtained by calling the ListSites API.

Link copied to clipboard
val siteVersion: Output<Int>? = null

The version number of the site configuration. For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.

Functions

Link copied to clipboard
open override fun toJava(): HttpsApplicationConfigurationArgs