ALIYUN::DNS::Domain is used to add a domain name.

Syntax

{
  "Type": "ALIYUN::DNS::Domain",
  "Properties": {
    "GroupId": String,
    "DomainName": String,
    "Tags": List,
    "ResourceGroupId": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
GroupIdStringNoYesThe ID of the domain name group. None.
DomainNameStringYesNoThe domain name. None.
ResourceGroupIdStringNoYesThe ID of the resource group to which the domain name belongs. None.
TagsListNoYesThe tags. You can add up to 20 tags.

For more information, see Tags properties.

Tags syntax

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags properties

PropertyTypeRequiredEditableDescriptionConstraint
KeyStringYesNoThe key of the tag. The tag key must be 1 to 128 characters in length, and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.
ValueStringNoNoThe value of the tag. The tag value can be up to 128 characters in length, and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • DomainId: the ID of the domain name.
  • DomainName: the domain name.
  • GroupId: the ID of the domain name group.
  • GroupName: the name of the domain name group.
  • PunyCode: the Punycode that is returned only for a Chinese domain name.
  • DnsServers: the Domain Name System (DNS) servers that are used to resolve the domain name.

Examples

  • YAMLformat

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      GroupId:
        Type: String
        Description: Domain name grouping, the default is the "default grouping" GroupId
    Resources:
      Domain:
        Type: ALIYUN::DNS::Domain
        Properties:
          GroupId:
            Ref: GroupId
          DomainName: DemoDomain
    Outputs: {}
  • JSONformat

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "GroupId": {
          "Type": "String",
          "Description": "Domain name grouping, the default is the \"default grouping\" GroupId"
        }
      },
      "Resources": {
        "Domain": {
          "Type": "ALIYUN::DNS::Domain",
          "Properties": {
            "GroupId": {
              "Ref": "GroupId"
            },
            "DomainName": "DemoDomain"
          }
        }
      },
      "Outputs": {
      }
    }

For more examples, visit Domain.json and Domain.yml. In the examples, the ALIYUN::DNS::Domain and ALIYUN::DNS::DomainGroup resource types are used.