Adiciona uma configuração de aplicação HTTPS a um site.
Sintaxe
{
"Type": "ALIYUN::ESA::HttpsApplicationConfiguration",
"Properties": {
"SiteId": Integer,
"AltSvcMa": String,
"AltSvc": String,
"AltSvcPersist": String,
"AltSvcClear": String,
"HstsIncludeSubdomains": String,
"HttpsForceCode": String,
"HttpsNoSniDeny": String,
"Hsts": String,
"HstsPreload": String,
"HstsMaxAge": String,
"HttpsSniWhitelist": String,
"HttpsSniVerify": String,
"HttpsForce": String,
"PaymentType": String,
"RuleEnable": String,
"Rule": String,
"RuleName": String,
"Sequence": Integer,
"SiteVersion": Integer
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Atualização permitida |
Descrição |
Restrições |
|
SiteId |
Integer |
Sim |
Não |
ID do site. |
Nenhuma |
|
AltSvcMa |
String |
Não |
Sim |
Período de validade do Alt-Svc. |
Unidade: segundos. Valor padrão: 86400. |
|
AltSvc |
String |
Não |
Sim |
Indica se o recurso Alt-Svc está ativado. |
Valores válidos:
|
|
AltSvcPersist |
String |
Não |
Sim |
Indica se o cabeçalho Alt-Svc inclui o parâmetro persist. |
Valores válidos:
|
|
AltSvcClear |
String |
Não |
Sim |
Indica se o cabeçalho Alt-Svc inclui o parâmetro clear. |
Valores válidos:
|
|
HstsIncludeSubdomains |
String |
Não |
Sim |
Indica se os subdomínios estão incluídos no HTTP Strict Transport Security (HSTS). |
Valores válidos:
|
|
HttpsForceCode |
String |
Não |
Sim |
Código de status do redirecionamento forçado para HTTPS. |
Valores válidos:
|
|
HttpsNoSniDeny |
String |
Não |
Sim |
Indica se as solicitações de handshake TLS sem Server Name Indication (SNI) são negadas. |
Valores válidos:
|
|
Hsts |
String |
Não |
Sim |
Indica se o HSTS está ativado. |
Valores válidos:
|
|
HstsPreload |
String |
Não |
Sim |
Indica se o preload do HSTS está ativado. |
Valores válidos:
|
|
HstsMaxAge |
String |
Não |
Sim |
Tempo de expiração do HSTS. |
Unidade: segundos. |
|
HttpsSniWhitelist |
String |
Não |
Sim |
Lista de permissões de SNI. |
Separe vários valores com espaços. |
|
HttpsSniVerify |
String |
Não |
Sim |
Indica se a verificação de SNI está ativada. |
Valores válidos:
|
|
HttpsForce |
String |
Não |
Sim |
Indica se o HTTPS é forçado. |
Valores válidos:
|
|
PaymentType |
String |
Não |
Não |
Tipo de pagamento. |
Nenhuma |
|
RuleEnable |
String |
Não |
Sim |
Indica se a regra está ativada. |
Parâmetro opcional para configurações globais. Valores válidos:
|
|
Rule |
String |
Não |
Sim |
Conteúdo da regra. |
Use uma expressão condicional para corresponder às solicitações do usuário. Parâmetro opcional para configurações globais. Cenários:
|
|
RuleName |
String |
Não |
Sim |
Nome da regra. |
Parâmetro opcional para configurações globais. |
|
Sequence |
Integer |
Não |
Sim |
Prioridade de execução da regra. |
Quanto menor o valor, maior a prioridade. |
|
SiteVersion |
Integer |
Não |
Não |
Número da versão da configuração do site. |
Em sites com gerenciamento de versão de configuração ativado, use este parâmetro para especificar a versão do site na configuração. Valor padrão: 0. |
Valores de retorno
Fn::GetAtt
HstsIncludeSubdomains: indica se os subdomínios estão incluídos no HSTS.
AltSvcMa: período de validade do Alt-Svc.
RuleEnable: indica se a regra está ativada.
HttpsForceCode: código de status do redirecionamento forçado para HTTPS.
AltSvc: indica se o recurso Alt-Svc está ativado.
HttpsNoSniDeny: indica se as solicitações de handshake TLS sem SNI são negadas.
Hsts: indica se o HSTS está ativado.
HstsPreload: indica se o preload do HSTS está ativado.
HstsMaxAge: tempo de expiração do HSTS.
Sequence: prioridade de execução da regra.
HttpsSniWhitelist: lista de permissões de SNI.
AltSvcPersist: indica se o cabeçalho Alt-Svc contém o parâmetro persist.
HttpsSniVerify: indica se a verificação de SNI está ativada.
AltSvcClear: indica se o cabeçalho Alt-Svc contém o parâmetro clear.
HttpsForce: indica se o HTTPS é forçado.
Rule: conteúdo da regra.
ConfigId: ID da configuração.
SiteVersion: número da versão da configuração do site.
ConfigType: tipo da configuração.
RuleName: nome da regra.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
SiteId:
Type: Number
Description:
en: The ID of the site. You can obtain the ID by calling the ListSites API.
Required: true
RuleEnable:
Type: String
Description:
en: |-
Specifies whether to enable the rule. This parameter is not required for global configurations. Valid values:
on: Enables the rule.
off: Disables the rule.
AllowedValues:
- 'on'
- 'off'
Required: false
Rule:
Type: String
Description:
en: |-
The content of the rule, which uses a conditional expression to match user requests. This parameter is not required for global configurations.
Examples:
To match all incoming requests, set the value to true.
To match a specific request, set the value to a custom expression, such as (http.host eq "video.example.com").
Required: false
RuleName:
Type: String
Description:
en: The name of the rule. This parameter is not required for global configurations.
Required: false
Resources:
ExtensionResource:
Type: ALIYUN::ESA::HttpsApplicationConfiguration
Properties:
SiteId:
Ref: SiteId
RuleEnable:
Ref: RuleEnable
Rule:
Ref: Rule
RuleName:
Ref: RuleName
Outputs:
HstsIncludeSubdomains:
Description: Indicates whether subdomains are included in HSTS.
Value:
Fn::GetAtt:
- ExtensionResource
- HstsIncludeSubdomains
AltSvcMa:
Description: The validity period of Alt-Svc, in seconds.
Value:
Fn::GetAtt:
- ExtensionResource
- AltSvcMa
RuleEnable:
Description: Indicates whether the rule is enabled.
Value:
Fn::GetAtt:
- ExtensionResource
- RuleEnable
HttpsForceCode:
Description: The status code for the forced redirect to HTTPS.
Value:
Fn::GetAtt:
- ExtensionResource
- HttpsForceCode
AltSvc:
Description: Indicates whether the Alt-Svc feature is enabled.
Value:
Fn::GetAtt:
- ExtensionResource
- AltSvc
HttpsNoSniDeny:
Description: Indicates whether to deny TLS handshake requests that do not have an SNI.
Value:
Fn::GetAtt:
- ExtensionResource
- HttpsNoSniDeny
Hsts:
Description: Indicates whether HSTS is enabled.
Value:
Fn::GetAtt:
- ExtensionResource
- Hsts
HstsPreload:
Description: Indicates whether HSTS preload is enabled.
Value:
Fn::GetAtt:
- ExtensionResource
- HstsPreload
HstsMaxAge:
Description: The expiration time of HSTS, in seconds.
Value:
Fn::GetAtt:
- ExtensionResource
- HstsMaxAge
Sequence:
Description: The execution priority of the rule. A smaller value indicates a higher priority.
Value:
Fn::GetAtt:
- ExtensionResource
- Sequence
HttpsSniWhitelist:
Description: The SNI whitelist. Multiple values are separated by spaces.
Value:
Fn::GetAtt:
- ExtensionResource
- HttpsSniWhitelist
AltSvcPersist:
Description: Indicates whether the Alt-Svc header contains the persist parameter.
Value:
Fn::GetAtt:
- ExtensionResource
- AltSvcPersist
HttpsSniVerify:
Description: Indicates whether SNI verification is enabled.
Value:
Fn::GetAtt:
- ExtensionResource
- HttpsSniVerify
AltSvcClear:
Description: Indicates whether the Alt-Svc header contains the clear parameter.
Value:
Fn::GetAtt:
- ExtensionResource
- AltSvcClear
HttpsForce:
Description: Indicates whether HTTPS is forced.
Value:
Fn::GetAtt:
- ExtensionResource
- HttpsForce
Rule:
Description: The content of the rule.
Value:
Fn::GetAtt:
- ExtensionResource
- Rule
ConfigId:
Description: The configuration ID.
Value:
Fn::GetAtt:
- ExtensionResource
- ConfigId
SiteVersion:
Description: The version number of the site configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- SiteVersion
ConfigType:
Description: The type of the configuration.
Value:
Fn::GetAtt:
- ExtensionResource
- ConfigType
RuleName:
Description: The name of the rule.
Value:
Fn::GetAtt:
- ExtensionResource
- RuleName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"SiteId": {
"Type": "Number",
"Description": {
"en": "The ID of the site. You can obtain the ID by calling the ListSites API."
},
"Required": true
},
"RuleEnable": {
"Type": "String",
"Description": {
"en": "Specifies whether to enable the rule. This parameter is not required for global configurations. Valid values:\non: Enables the rule.\noff: Disables the rule."
},
"AllowedValues": [
"on",
"off"
],
"Required": false
},
"Rule": {
"Type": "String",
"Description": {
"en": "The content of the rule, which uses a conditional expression to match user requests. This parameter is not required for global configurations.\nExamples:\nTo match all incoming requests, set the value to true.\nTo match a specific request, set the value to a custom expression, such as (http.host eq \\\"video.example.com\\\")."
},
"Required": false
},
"RuleName": {
"Type": "String",
"Description": {
"en": "The name of the rule. This parameter is not required for global configurations."
},
"Required": false
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ESA::HttpsApplicationConfiguration",
"Properties": {
"SiteId": {
"Ref": "SiteId"
},
"RuleEnable": {
"Ref": "RuleEnable"
},
"Rule": {
"Ref": "Rule"
},
"RuleName": {
"Ref": "RuleName"
}
}
}
},
"Outputs": {
"HstsIncludeSubdomains": {
"Description": "Indicates whether subdomains are included in HSTS.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"HstsIncludeSubdomains"
]
}
},
"AltSvcMa": {
"Description": "The validity period of Alt-Svc, in seconds.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AltSvcMa"
]
}
},
"RuleEnable": {
"Description": "Indicates whether the rule is enabled.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RuleEnable"
]
}
},
"HttpsForceCode": {
"Description": "The status code for the forced redirect to HTTPS.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"HttpsForceCode"
]
}
},
"AltSvc": {
"Description": "Indicates whether the Alt-Svc feature is enabled.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AltSvc"
]
}
},
"HttpsNoSniDeny": {
"Description": "Indicates whether to deny TLS handshake requests that do not have an SNI.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"HttpsNoSniDeny"
]
}
},
"Hsts": {
"Description": "Indicates whether HSTS is enabled.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Hsts"
]
}
},
"HstsPreload": {
"Description": "Indicates whether HSTS preload is enabled.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"HstsPreload"
]
}
},
"HstsMaxAge": {
"Description": "The expiration time of HSTS, in seconds.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"HstsMaxAge"
]
}
},
"Sequence": {
"Description": "The execution priority of the rule. A smaller value indicates a higher priority.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Sequence"
]
}
},
"HttpsSniWhitelist": {
"Description": "The SNI whitelist. Multiple values are separated by spaces.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"HttpsSniWhitelist"
]
}
},
"AltSvcPersist": {
"Description": "Indicates whether the Alt-Svc header contains the persist parameter.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AltSvcPersist"
]
}
},
"HttpsSniVerify": {
"Description": "Indicates whether SNI verification is enabled.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"HttpsSniVerify"
]
}
},
"AltSvcClear": {
"Description": "Indicates whether the Alt-Svc header contains the clear parameter.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AltSvcClear"
]
}
},
"HttpsForce": {
"Description": "Indicates whether HTTPS is forced.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"HttpsForce"
]
}
},
"Rule": {
"Description": "The content of the rule.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Rule"
]
}
},
"ConfigId": {
"Description": "The configuration ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ConfigId"
]
}
},
"SiteVersion": {
"Description": "The version number of the site configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SiteVersion"
]
}
},
"ConfigType": {
"Description": "The type of the configuration.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ConfigType"
]
}
},
"RuleName": {
"Description": "The name of the rule.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"RuleName"
]
}
}
}
}