ALIYUN::APIG::Domain

ALIYUN::APIG::Domain类型用于创建域名。

语法

{
  "Type": "ALIYUN::APIG::Domain",
  "Properties": {
    "DomainName": String,
    "Protocol": String,
    "TlsMax": String,
    "CertIdentifier": String,
    "ResourceGroupId": String,
    "TlsCipherSuitesConfig": Map,
    "ForceHttps": Boolean,
    "TlsMin": String,
    "Http2Option": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DomainName

String

域名。

无。

Protocol

String

域名支持的协议类型。

取值:

  • HTTP:仅支持 HTTP 协议。

  • HTTPS:仅支持 HTTPS 协议。

TlsMax

String

TLS 协议最大版本。

最大支持 TLS 1.3。

CertIdentifier

String

证书标识。

ResourceGroupId

String

资源组 ID。

TlsCipherSuitesConfig

Map

加密套件配置。

更多信息,请参考TlsCipherSuitesConfig属性。

ForceHttps

Boolean

设置 HTTPS 协议类型。

是否开启强制 HTTPS 跳转。

TlsMin

String

TLS 协议最小版本。

最小支持 TLS 1.0

Http2Option

String

http2 设置。

取值:

  • GlobalConfig:GlobalConfig。

  • Close:Close。

  • Open:Open。

TlsCipherSuitesConfig语法

"TlsCipherSuitesConfig": {
  "ConfigType": String,
  "TlsCipherSuite": List
}

TlsCipherSuitesConfig属性

属性名称

类型

必须

允许更新

描述

约束

ConfigType

String

配置类型。

TlsCipherSuite

List

加密套件配置。

更多信息,请参考TlsCipherSuite属性。

TlsCipherSuite语法

"TlsCipherSuite": [{
  "Name": String
}]

TlsCipherSuite属性

属性名称

类型

必须

允许更新

描述

约束

Name

String

加密套件名称。

返回值

Fn::GetAtt

  • DomainId:域名 id。

  • DomainName:域名。

  • Protocol:域名支持的协议类型。

  • CertIdentifier:证书标识。

  • Http2Option:http2 设置。

  • TlsMax:TLS 协议最大版本。

  • TlsMin:TLS 协议最小版本。

  • TlsCipherSuitesConfig:加密套件配置。

  • ResourceGroupId:资源组 ID。

  • ForceHttps:是否开启强制 HTTPS 跳转。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DomainName:
    Description:
      en: The name of the Domain.
    MaxLength: 128
    MinLength: 1
    Required: true
    Type: String
  Protocol:
    AllowedValues:
      - HTTP
      - HTTPS
    Description:
      en: 'The types of protocols supported by the domain are as follows:

        * HTTP: Supports only the HTTP protocol.

        * HTTPS: Supports only the HTTPS protocol.'
    Required: true
    Type: String
Resources:
  ExtensionResource:
    Properties:
      DomainName:
        Ref: DomainName
      Protocol:
        Ref: Protocol
    Type: ALIYUN::APIG::Domain
Outputs:
  DomainId:
    Description: The ID of the Domain.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DomainId
  DomainName:
    Description: The name of the Domain.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DomainName
  Protocol:
    Description: The types of protocols.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Protocol
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DomainName": {
      "Type": "String",
      "Description": {
        "en": "The name of the Domain."
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 128
    },
    "Protocol": {
      "Type": "String",
      "Description": {
        "en": "The types of protocols supported by the domain are as follows:\n* HTTP: Supports only the HTTP protocol.\n* HTTPS: Supports only the HTTPS protocol."
      },
      "AllowedValues": [
        "HTTP",
        "HTTPS"
      ],
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::APIG::Domain",
      "Properties": {
        "DomainName": {
          "Ref": "DomainName"
        },
        "Protocol": {
          "Ref": "Protocol"
        }
      }
    }
  },
  "Outputs": {
    "DomainId": {
      "Description": "The ID of the Domain.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DomainId"
        ]
      }
    },
    "DomainName": {
      "Description": "The name of the Domain.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DomainName"
        ]
      }
    },
    "Protocol": {
      "Description": "The types of protocols.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Protocol"
        ]
      }
    }
  }
}