釋放 AI 的強大力量

100 萬免費代幣

88% 價格優惠

立即啟用
本文由簡體中文內容自動轉碼而成。阿里雲不保證此自動轉碼的準確性、完整性及時效性。本文内容請以簡體中文版本為準。

ALIYUN::DNS::DomainRecord

更新時間:2025-03-12 20:21

ALIYUN::DNS::DomainRecord類型用於添加解析記錄。

文法

{
  "Type": "ALIYUN::DNS::DomainRecord",
  "Properties": {
    "RR": String,
    "DomainName": String,
    "Value": String,
    "Priority": Integer,
    "TTL": Integer,
    "Line": String,
    "Type": String
  }
} 

屬性

屬性名稱

類型

必須

允許更新

描述

約束

屬性名稱

類型

必須

允許更新

描述

約束

RR

String

主機記錄。

如果要解析@.example.com,主機記錄要填寫@,而不是空。

DomainName

String

網域名稱名稱。

Value

String

記錄值。

Priority

Integer

MX記錄的優先順序。

TTL

Integer

解析生效時間。

預設值:600秒(10分鐘)。

更多資訊,請參見TTL定義

Line

String

解析線路。

預設值:default。

Type

String

解析記錄類型。

關於取值的更多資訊,請參見解析記錄類型格式

傳回值

Fn::GetAtt

RecordId:解析記錄的ID。

樣本

YAML
JSON
ROSTemplateFormatVersion: '2015-09-01'
Resources:
  DomainRecord:
    Type: ALIYUN::DNS::DomainRecord
    Properties:
      RR: '@'
      Type: A
      DomainName:
        Ref: DnsDomainName
      Value:
        Fn::Select:
          - '0'
          - Fn::GetAtt:
              - Server
              - PublicIps
      TTL: 600
Outputs:
  RecordId:
    Description: Parse the ID of the record
    Value:
      Fn::GetAtt:
        - DomainRecord
        - RecordId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "DomainRecord": {
      "Type": "ALIYUN::DNS::DomainRecord",
      "Properties": {
        "RR": "@",
        "Type": "A",
        "DomainName": {
          "Ref": "DnsDomainName"
        },
        "Value": {
          "Fn::Select": [
            "0",
            {
              "Fn::GetAtt": [
                "Server",
                "PublicIps"
              ]
            }
          ]
        },
        "TTL": 600
      }
    }
  },
  "Outputs": {
    "RecordId": {
      "Description": "Parse the ID of the record",
      "Value": {
        "Fn::GetAtt": [
          "DomainRecord",
          "RecordId"
        ]
      }
    }
  }
}
  • 本頁導讀 (1, M)
  • 文法
  • 屬性
  • 傳回值
  • 樣本
文檔反饋
phone 聯絡我們

立即和Alibaba Cloud在線服務人員進行交談,獲取您想了解的產品信息以及最新折扣。

alicare alicarealicarealicare