Todos los productos
Search
Centro de documentos

Resource Orchestration Service:ALIYUN::CDN::Domain

Última actualización: Sep 04, 2026

ALIYUN::CDN::Domain sirve para agregar un nombre de dominio acelerado.

Nota
  • Antes de agregar un nombre de dominio acelerado, active Alibaba Cloud CDN (CDN). Para obtener más información, consulte Activate Alibaba Cloud CDN.

  • El nombre de dominio debe contar con registro ICP.

  • Solo puede agregar un nombre de dominio a CDN por cada llamada. Con una cuenta de Alibaba Cloud, puede agregar hasta 50 nombres de dominio.

  • Si el contenido del servidor de origen no está alojado en Alibaba Cloud, debe someterse a revisión. La revisión finalizará al cierre del siguiente día hábil posterior al envío de la solicitud.

  • Cada usuario puede invocar esta operación un máximo de 30 veces por segundo.

Sintaxis

{
  "Type": "ALIYUN::CDN::Domain",
  "Properties": {
    "CdnType": String,
    "Sources": String,
    "CheckUrl": String,
    "DomainName": String,
    "ResourceGroupId": String,
    "Scope": String,
    "TopLevelDomain": String,
    "Tags": List,
    "OriginServers": List
  }
}

Propiedades

Propiedad

Tipo

Obligatorio

Editable

Descripción

Restricción

CdnType

String

Sí

No

Tipo de carga de trabajo del nombre de dominio acelerado.

Valores válidos:

  • web: imágenes y archivos pequeños

  • download: descargas de archivos grandes

  • video: streaming de video y audio bajo demanda

DomainName

String

Sí

No

Nombre de dominio acelerado que desea agregar a CDN.

Se admiten nombres de dominio con comodines. El nombre de dominio debe comenzar con un punto (.).

Por ejemplo: .example.com.

CheckUrl

String

No

No

URL que se usa para las comprobaciones de estado.

Por ejemplo: example.com/test.html.

OriginServers

List

No

No

Configuraciones de las direcciones de los servidores de origen.

La propiedad OriginServers tiene el mismo efecto que la propiedad Sources; sin embargo, OriginServers tiene prioridad sobre Sources. Puede especificar hasta 20 conjuntos de configuraciones. Para obtener más información, consulte OriginServers properties.

ResourceGroupId

String

No

Sí

ID del resource group.

Ninguna.

Scope

String

No

No

Región de aceleración.

Valores válidos:

  • domestic (predeterminado): China continental

  • overseas: global (excluida China continental)

  • global: global

Sources

String

No

Sí

Configuraciones de las direcciones de los servidores de origen.

Por ejemplo: [{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80,"weight":"15"}].

Tags

List

No

Sí

Etiquetas.

Puede agregar hasta 20 etiquetas.

Para obtener más información, consulte Tags properties.

TopLevelDomain

String

No

Sí

Nombre de dominio raíz.

Por ejemplo: www.yourTopLevelDomain.

Sintaxis de Tags

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Propiedades de Tags

Propiedad

Tipo

Obligatorio

Editable

Descripción

Restricción

Key

String

Sí

No

Clave de la etiqueta.

La clave de la etiqueta debe tener entre 1 y 128 caracteres de longitud, y no puede contener http:// ni https://. Tampoco puede comenzar con aliyun o acs:.

Value

String

No

No

Valor de la etiqueta.

El valor de la etiqueta puede tener hasta 128 caracteres de longitud, y no puede contener http:// ni https://. Tampoco puede comenzar con aliyun o acs:.

Sintaxis de OriginServers

"OriginServers": [
  {
    "Port": Integer,
    "Weight": String,
    "Priority": String,
    "Content": String,
    "Type": String
  }
]  

Propiedades de OriginServers

Propiedad

Tipo

Obligatorio

Editable

Descripción

Restricción

Content

String

Sí

No

Dirección del servidor de origen.

Puede especificar una dirección IP o un nombre de dominio.

Type

String

Sí

No

Tipo de servidor de origen.

Valores válidos:

  • ipaddr: el servidor de origen usa una dirección IP.

  • domain: el servidor de origen usa un nombre de dominio.

  • oss: el servidor de origen usa un bucket de Object Storage Service (OSS).

  • fc_domain: el servidor de origen usa un nombre de dominio de Function Compute.

Port

Integer

No

No

Puerto.

Puede especificar el puerto 443, el puerto 80 o un puerto personalizado. Valor predeterminado: 80. Si especifica el puerto 443, CDN se comunica con el servidor de origen mediante HTTPS.

Priority

String

No

No

Prioridad del servidor de origen.

Valores válidos: 20 y 30. Valor predeterminado: 20. Un valor de 20 indica que el servidor de origen es primario. Un valor de 30 indica que el servidor de origen es secundario.

Weight

String

No

No

Peso del servidor de origen.

Valores válidos: un valor numérico menor que 100. Valor predeterminado: 10.

Valores de retorno

Fn::GetAtt

  • DomainName: nombre de dominio acelerado agregado a CDN.

  • Cname: alias del nombre de dominio acelerado. Se proporciona un nombre canónico (CNAME) al Domain Name System (DNS) para asignar el nombre de dominio acelerado al CNAME.

  • Arn: Alibaba Cloud Resource Name (ARN).

Ejemplos

Formato YAML

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
 CdnType:
  AllowedValues:
  - video
  - download
  - web
  - liveStream
  Description: 'The business type. Valid values: web, download, video, livestream,
   and httpsdelivery. web: acceleration of images and small files download. download:
   acceleration of large file downloads. video: live streaming acceleration. httpsdelivery:
   SSL acceleration for HTTPS.'
  Type: String
 CheckUrl:
  Description: The validation of the origin.
  Type: String
 DomainName:
  Description: The CDN domain name. Wildcard domain names that start with periods
   (.) are supported. For example, .example.com.
  Type: String
 ResourceGroupId:
  Description: The ID of the resource group. If this is left blank, the system automatically
   fills in the ID of the default resource group.
  Type: String
 Scope:
  Description: 'Valid values: domestic, overseas, and global. Default value: domestic.
   The setting is supported for users outside mainland China, users in mainland
   China of level 3 or above.'
  Type: String
 Sources:
  Description: The list of origin URLs.
  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
 TopLevelDomain:
  Description: The top-level domain, which can only be configured by users on the
   whitelist.
  Type: String
Resources:
 Domain:
  Properties:
   CdnType:
    Ref: CdnType
   CheckUrl:
    Ref: CheckUrl
   DomainName:
    Ref: DomainName
   ResourceGroupId:
    Ref: ResourceGroupId
   Scope:
    Ref: Scope
   Sources:
    Ref: Sources
   Tags:
    Ref: Tags
   TopLevelDomain:
    Ref: TopLevelDomain
  Type: ALIYUN::CDN::Domain
Outputs:
 Cname:
  Description: The CNAME generated for the CDN domain.You must add a CNAME record
   with your DNS provider to map the CDN domain name to the CNAME.
  Value:
   Fn::GetAtt:
   - Domain
   - Cname
 DomainName:
  Description: The CDN domain name. Wildcard domain names that start with periods
   (.) are supported. For example, .example.com.
  Value:
   Fn::GetAtt:
   - Domain
   - DomainName

Formato JSON

{
 "ROSTemplateFormatVersion": "2015-09-01",
 "Parameters": {
  "CheckUrl": {
   "Type": "String",
   "Description": "The validation of the origin."
  },
  "ResourceGroupId": {
   "Type": "String",
   "Description": "The ID of the resource group. If this is left blank, the system automatically fills in the ID of the default resource group."
  },
  "Scope": {
   "Type": "String",
   "Description": "Valid values: domestic, overseas, and global. Default value: domestic. The setting is supported for users outside mainland China, users in mainland China of level 3 or above."
  },
  "DomainName": {
   "Type": "String",
   "Description": "The CDN domain name. Wildcard domain names that start with periods (.) are supported. For example, .example.com."
  },
  "CdnType": {
   "Type": "String",
   "Description": "The business type. Valid values: web, download, video, livestream, and httpsdelivery. web: acceleration of images and small files download. download: acceleration of large file downloads. video: live streaming acceleration. httpsdelivery: SSL acceleration for HTTPS.",
   "AllowedValues": [
    "video",
    "download",
    "web",
    "liveStream"
   ]
  },
  "TopLevelDomain": {
   "Type": "String",
   "Description": "The top-level domain, which can only be configured by users on the whitelist."
  },
  "Sources": {
   "Type": "String",
   "Description": "The list of origin URLs."
  },
  "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
  }
 },
 "Resources": {
  "Domain": {
   "Type": "ALIYUN::CDN::Domain",
   "Properties": {
    "CheckUrl": {
     "Ref": "CheckUrl"
    },
    "ResourceGroupId": {
     "Ref": "ResourceGroupId"
    },
    "Scope": {
     "Ref": "Scope"
    },
    "DomainName": {
     "Ref": "DomainName"
    },
    "CdnType": {
     "Ref": "CdnType"
    },
    "TopLevelDomain": {
     "Ref": "TopLevelDomain"
    },
    "Sources": {
     "Ref": "Sources"
    },
    "Tags": {
     "Ref": "Tags"
    }
   }
  }
 },
 "Outputs": {
  "DomainName": {
   "Description": "The CDN domain name. Wildcard domain names that start with periods (.) are supported. For example, .example.com.",
   "Value": {
    "Fn::GetAtt": [
     "Domain",
     "DomainName"
    ]
   }
  },
  "Cname": {
   "Description": "The CNAME generated for the CDN domain.You must add a CNAME record with your DNS provider to map the CDN domain name to the CNAME.",
   "Value": {
    "Fn::GetAtt": [
     "Domain",
     "Cname"
    ]
   }
  }
 }
}