Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::DNS::CacheDomain

Última atualização: Jun 27, 2026

Use ALIYUN::DNS::CacheDomain para criar um domínio de cache DNS.

Sintaxe

{
  "Type": "ALIYUN::DNS::CacheDomain",
  "Properties": {
    "CacheTtlMin": Integer,
    "CacheTtlMax": Integer,
    "DomainName": String,
    "InstanceId": String,
    "SourceEdns": String,
    "SourceProtocol": String,
    "SourceDnsServer": List,
    "Remark": String
  }
}

Propriedades

Parâmetro

Tipo

Obrigatório

Atualização permitida

Descrição

Restrições

CacheTtlMax

Integer

Sim

Sim

Valor máximo de TTL do registro em cache.

Intervalo válido: 30 a 86400.

CacheTtlMin

Integer

Sim

Sim

Valor mínimo de TTL do registro em cache.

Intervalo válido: 30 a 86400.

DomainName

String

Sim

Não

Nome do domínio de cache DNS.

Nenhuma

InstanceId

String

Sim

Sim

ID da instância associada ao domínio de cache DNS.

Nenhuma

SourceDnsServer

List

Sim

Sim

Lista de servidores DNS de origem.

Máximo de 100 itens. Para mais informações, consulte Propriedades de SourceDnsServer.

SourceEdns

String

Sim

Sim

Define se o EDNS está ativado no servidor DNS de origem.

Valores permitidos:

  • NOT_SUPPORT: EDNS não suportado.

  • SUPPORT: EDNS suportado.

SourceProtocol

String

Sim

Sim

Protocolo do servidor DNS de origem.

Valores permitidos:

  • TCP

  • UDP (padrão)

Remark

String

Não

Sim

Observação do domínio de cache DNS.

Nenhuma

Sintaxe de SourceDnsServer

"SourceDnsServer": [
  {
    "Port": String,
    "Host": String
  }
]

Propriedades de SourceDnsServer

Parâmetro

Tipo

Obrigatório

Atualização permitida

Descrição

Restrições

Host

String

Sim

Não

Host do servidor DNS de origem.

Nenhuma

Port

String

Sim

Não

Porta do servidor DNS de origem.

Nenhuma

Valores de retorno

Fn::GetAtt

DomainName: Nome do domínio de cache DNS.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SourceEdns:
    Type: String
    Description:
      en: Whether to enable EDNS for the source DNS server.
      zh: 是否为源DNS服务器启用EDNS。
    AllowedValues:
      - NOT_SUPPORT
      - SUPPORT
    Required: true
  DomainName:
    Type: String
    Description:
      en: The domain name of the DNS cache domain.
      zh: DNS缓存域的域名。
    Required: true
  InstanceId:
    Type: String
    Description:
      en: The instance ID associated with the DNS cache domain.
      zh: 与DNS缓存域关联的实例ID。
    Required: true
  SourceProtocol:
    Type: String
    Description:
      en: The protocol used by the source DNS server.
      zh: 源DNS服务器使用的协议。
    AllowedValues:
      - UDP
      - TCP
    Required: true
  SourceDnsServer:
    AssociationPropertyMetadata:
      Parameters:
        Port:
          Type: String
          Description:
            en: The port of the source DNS server.
            zh: 源DNS服务器的端口。
          Required: true
        Host:
          Type: String
          Description:
            en: The host of the source DNS server.
            zh: 源DNS服务器的主机。
          Required: true
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: A list of source DNS servers.
      zh: 源DNS服务器列表。
    Required: true
    MaxLength: 100
  CacheTtlMin:
    Type: Number
    Description:
      en: The minimum TTL value of a cached record.
      zh: 缓存记录的最小TTL值。
    Required: true
    MinValue: 30
    MaxValue: 86400
  CacheTtlMax:
    Type: Number
    Description:
      en: The maximum TTL value of a cached record.
      zh: 缓存记录的最大TTL值。
    Required: true
    MinValue: 30
    MaxValue: 86400
Resources:
  CacheDomain:
    Type: ALIYUN::DNS::CacheDomain
    Properties:
      SourceEdns:
        Ref: SourceEdns
      DomainName:
        Ref: DomainName
      InstanceId:
        Ref: InstanceId
      SourceProtocol:
        Ref: SourceProtocol
      SourceDnsServer:
        Ref: SourceDnsServer
      CacheTtlMin:
        Ref: CacheTtlMin
      CacheTtlMax:
        Ref: CacheTtlMax
Outputs:
  DomainName:
    Description:
      en: The domain name of the DNS cache domain.
      zh: DNS缓存的域名。
    Value:
      Fn::GetAtt:
        - CacheDomain
        - DomainName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SourceEdns": {
      "Type": "String",
      "Description": {
        "en": "Whether to enable EDNS for the source DNS server.",
        "zh": "是否为源DNS服务器启用EDNS。"
      },
      "AllowedValues": [
        "NOT_SUPPORT",
        "SUPPORT"
      ],
      "Required": true
    },
    "DomainName": {
      "Type": "String",
      "Description": {
        "en": "The domain name of the DNS cache domain.",
        "zh": "DNS缓存域的域名。"
      },
      "Required": true
    },
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The instance ID associated with the DNS cache domain.",
        "zh": "与DNS缓存域关联的实例ID。"
      },
      "Required": true
    },
    "SourceProtocol": {
      "Type": "String",
      "Description": {
        "en": "The protocol used by the source DNS server.",
        "zh": "源DNS服务器使用的协议。"
      },
      "AllowedValues": [
        "UDP",
        "TCP"
      ],
      "Required": true
    },
    "SourceDnsServer": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Port": {
            "Type": "String",
            "Description": {
              "en": "The port of the source DNS server.",
              "zh": "源DNS服务器的端口。"
            },
            "Required": true
          },
          "Host": {
            "Type": "String",
            "Description": {
              "en": "The host of the source DNS server.",
              "zh": "源DNS服务器的主机。"
            },
            "Required": true
          }
        }
      },
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "A list of source DNS servers.",
        "zh": "源DNS服务器列表。"
      },
      "Required": true,
      "MaxLength": 100
    },
    "CacheTtlMin": {
      "Type": "Number",
      "Description": {
        "en": "The minimum TTL value of a cached record.",
        "zh": "缓存记录的最小TTL值。"
      },
      "Required": true,
      "MinValue": 30,
      "MaxValue": 86400
    },
    "CacheTtlMax": {
      "Type": "Number",
      "Description": {
        "en": "The maximum TTL value of a cached record.",
        "zh": "缓存记录的最大TTL值。"
      },
      "Required": true,
      "MinValue": 30,
      "MaxValue": 86400
    }
  },
  "Resources": {
    "CacheDomain": {
      "Type": "ALIYUN::DNS::CacheDomain",
      "Properties": {
        "SourceEdns": {
          "Ref": "SourceEdns"
        },
        "DomainName": {
          "Ref": "DomainName"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "SourceProtocol": {
          "Ref": "SourceProtocol"
        },
        "SourceDnsServer": {
          "Ref": "SourceDnsServer"
        },
        "CacheTtlMin": {
          "Ref": "CacheTtlMin"
        },
        "CacheTtlMax": {
          "Ref": "CacheTtlMax"
        }
      }
    }
  },
  "Outputs": {
    "DomainName": {
      "Description": {
        "en": "The domain name of the DNS cache domain.",
        "zh": "DNS缓存的域名。"
      },
      "Value": {
        "Fn::GetAtt": [
          "CacheDomain",
          "DomainName"
        ]
      }
    }
  }
}