All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::PVTZ::ZoneRecord

Last Updated:Oct 13, 2023

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 state.

Valid values:

  • ENABLE: enables DNS resolution.

  • DISABLE: disables DNS resolution.

Rr

String

Yes

Yes

The record.

If you want to resolve @.example.com, you must specify an at sign (@) for this parameter instead of leaving this parameter empty.

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 mail exchanger (MX) record.

Valid values: 1 to 99.

Default value: 10.

Ttl

Integer

No

Yes

The time-to-live (TTL) of the DNS record.

Default value: 60.

Type

String

Yes

Yes

The type of the DNS record.

Valid values:

  • A

  • AAA

  • CNAME

  • TXT

  • MX

  • PTR

  • SRV

Return values

Fn::GetAtt

  • RecordId: the ID of the DNS record.

  • Record: the content of the DNS record.

  • ZoneId: the ID of the private zone.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ZoneId:
        Type: String
        Description: PVTZ 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: {}
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ZoneId": {
          "Type": "String",
          "Description": "PVTZ 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 information, see PVTZ.json and PVTZ.yml. In the examples, the following resource types are used: ALIYUN::PVTZ::Zone, ALIYUN::PVTZ::ZoneRecord, and ALIYUN::PVTZ::ZoneVpcBinder.