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
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
GroupId | String | No | Yes | The ID of the domain name group. | None. |
DomainName | String | Yes | No | The domain name. | None. |
ResourceGroupId | String | No | Yes | The ID of the resource group to which the domain name belongs. | None. |
Tags | List | No | Yes | The tags. | You can add up to 20 tags.
For more information, see Tags properties. |
Tags syntax
"Tags": [
{
"Key": String,
"Value": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Key | String | Yes | No | The 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: .
|
Value | String | No | No | The 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
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DomainName": {
"Type": "String",
"Description": "Domain name"
},
"Tags": {
"Type": "Json",
"Description": "Tags to attach to instance. Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.",
"MaxLength": 20
},
"GroupId": {
"Type": "String",
"Description": "Domain name grouping, the default is the \"default grouping\" GroupId"
}
},
"Resources": {
"Domain": {
"Type": "ALIYUN::DNS::Domain",
"Properties": {
"DomainName": {
"Ref": "DomainName"
},
"Tags": {
"Ref": "Tags"
},
"GroupId": {
"Ref": "GroupId"
}
}
}
},
"Outputs": {
"GroupName": {
"Description": "The name of the domain name group",
"Value": {
"Fn::GetAtt": [
"Domain",
"GroupName"
]
}
},
"DomainId": {
"Description": "Domain ID",
"Value": {
"Fn::GetAtt": [
"Domain",
"DomainId"
]
}
},
"DomainName": {
"Description": "Domain name",
"Value": {
"Fn::GetAtt": [
"Domain",
"DomainName"
]
}
},
"PunyCode": {
"Description": "punycode returned only for a Chinese domain name",
"Value": {
"Fn::GetAtt": [
"Domain",
"PunyCode"
]
}
},
"DnsServers": {
"Description": "The DNS list for the domain name under resolution",
"Value": {
"Fn::GetAtt": [
"Domain",
"DnsServers"
]
}
},
"GroupId": {
"Description": "Domain name group ID",
"Value": {
"Fn::GetAtt": [
"Domain",
"GroupId"
]
}
}
}
}
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DomainName:
Description: Domain name
Type: String
GroupId:
Description: Domain name grouping, the default is the "default grouping" GroupId
Type: String
Tags:
Description: Tags to attach to instance. Max support 20 tags to add during create
instance. Each tag with two properties Key and Value, and Key is required.
MaxLength: 20
Type: Json
Resources:
Domain:
Properties:
DomainName:
Ref: DomainName
GroupId:
Ref: GroupId
Tags:
Ref: Tags
Type: ALIYUN::DNS::Domain
Outputs:
DnsServers:
Description: The DNS list for the domain name under resolution
Value:
Fn::GetAtt:
- Domain
- DnsServers
DomainId:
Description: Domain ID
Value:
Fn::GetAtt:
- Domain
- DomainId
DomainName:
Description: Domain name
Value:
Fn::GetAtt:
- Domain
- DomainName
GroupId:
Description: Domain name group ID
Value:
Fn::GetAtt:
- Domain
- GroupId
GroupName:
Description: The name of the domain name group
Value:
Fn::GetAtt:
- Domain
- GroupName
PunyCode:
Description: punycode returned only for a Chinese domain name
Value:
Fn::GetAtt:
- Domain
- PunyCode
For more examples, visit Domain.json and Domain.yml. In the examples, the ALIYUN::DNS::Domain and ALIYUN::DNS::DomainGroup resource types are used.