ALIYUN::PVTZ::ZoneRecord is used to add a Domain Name Service (DNS) record to a private zone.

Syntax

{
  "Type": "ALIYUN::PVTZ::ZoneRecord",
  "Properties": {
    "Status": String,
    "Rr": String,
    "Value": String,
    "ZoneId": String,
    "Priority": Integer,
    "Ttl": Integer,
    "Type": String
  }
}

Properties

Property Type Required Editable Description Constraint
Status String Yes Yes The status of DNS resolution. Valid values:
  • ENABLE: DNS resolution is enabled.
  • DISABLE: DNS resolution is disabled.
Rr String Yes Yes The host record. For example, to resolve @.example.com, you must set Rr to an at sign (@) instead of leaving it blank.
Value String Yes Yes The record value. None
ZoneId String Yes No The ID of the private zone. None
Priority Integer No Yes The priority of the MX-type DNS record. Valid values: 1 to 99.

Default value: 10.

Ttl Integer No Yes The time-to-live (TTL) of the record. Default value: 60.
Type String Yes Yes The type of the DNS record. Valid values:
  • A
  • CNAME
  • TXT
  • MX
  • PTR

Response parameters

Fn::GetAtt

  • RecordId: the ID of the DNS record.
  • Record: the content of the DNS record.
  • ZoneId: the ID of the private zone.

Examples

  • YAMLformat

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ZoneId:
        Type: String
        AssociationProperty: ALIYUN::ECS::ZoneId
      Value:
        Type: String
        Description: Record value
    Resources:
      ZoneRecord:
        Type: ALIYUN::PVTZ::ZoneRecord
        Properties:
          Status: ENABLE
          Rr: '@'
          Value:
            Ref: Value
          ZoneId:
            Ref: ZoneId
          Priority: 1
          Type: A
    Outputs: {}
  • JSONformat

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ZoneId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::ZoneId"
        },
        "Value": {
          "Type": "String",
          "Description": "Record value"
        }
      },
      "Resources": {
        "ZoneRecord": {
          "Type": "ALIYUN::PVTZ::ZoneRecord",
          "Properties": {
            "Status": "ENABLE",
            "Rr": "@",
            "Value": {
              "Ref": "Value"
            },
            "ZoneId": {
              "Ref": "ZoneId"
            },
            "Priority": 1,
            "Type": "A"
          }
        }
      },
      "Outputs": {
      }
    }

For more examples, see PVTZ.json and PVTZ.yml. In the examples, the ALIYUN::PVTZ::Zone, ALIYUN::PVTZ::ZoneRecord, and ALIYUN::PVTZ::ZoneVpcBinder resource types are involved.