All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::APIG::Domain

更新时间:Apr 01, 2025

ALIYUN::APIG::Domain is used to create a domain name.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

DomainName

String

Yes

No

The domain name.

None.

Protocol

String

Yes

Yes

The protocol type that is supported by the domain name.

Valid values:

  • HTTP: The domain name supports only HTTP.

  • HTTPS: The domain name supports only HTTPS.

TlsMax

String

No

Yes

The highest Transport Layer Security (TLS) version.

The version cannot be higher than TLS 1.3.

CertIdentifier

String

No

Yes

The ID of the certificate.

None.

ResourceGroupId

String

No

Yes

The ID of the resource group.

None.

TlsCipherSuitesConfig

Map

No

Yes

The cipher suite configurations.

For more information, see the "TlsCipherSuitesConfig properties" section of this topic.

ForceHttps

Boolean

No

Yes

Specifies whether to forcefully enable HTTPS redirection when HTTPS is used as the protocol.

None.

TlsMin

String

No

Yes

The lowest TLS version.

The version cannot be lower than TLS 1.0.

Http2Option

String

No

Yes

The HTTP/2 configuration.

Valid values:

  • GlobalConfig

  • Close

  • Open

TlsCipherSuitesConfig syntax

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

TlsCipherSuitesConfig properties

Property

Type

Required

Editable

Description

Constraint

ConfigType

String

No

Yes

The configuration type.

None.

TlsCipherSuite

List

No

Yes

The cipher suite configuration.

For more information, see the "TlsCipherSuite property" section of this topic.

TlsCipherSuite syntax

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

TlsCipherSuite property

Property

Type

Required

Editable

Description

Constraint

Name

String

No

Yes

The name of the cipher suite.

None.

Return values

Fn::GetAtt

  • DomainId: the ID of the domain name.

  • DomainName: the domain name.

  • Protocol: the protocol type that is supported by the domain name.

  • CertIdentifier: the ID of the certificate.

  • Http2Option: the HTTP/2 configuration.

  • TlsMax: the highest TLS version.

  • TlsMin: the lowest TLS version.

  • TlsCipherSuitesConfig: the cipher suite configurations.

  • ResourceGroupId: the ID of the resource group.

  • ForceHttps: indicates whether HTTPS redirection is enabled when HTTPS is used as the protocol.

Examples

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"
        ]
      }
    }
  }
}