Todos os produtos
Search
Central de documentação

Edge Security Acceleration:AddDcdnDomain

Última atualização: Jun 28, 2026

Para adicionar um domínio, chame a operação AddDcdnDomain.

Descrição da operação

  • Você deve ativar o serviço DCDN antes de adicionar um domínio. Para obter mais informações, consulte OpenDcdnService.

  • Se a região de aceleração estiver definida como apenas China continental ou Global, o domínio acelerado deve ter um registro ICP.

  • Na primeira vez que você adicionar um domínio ao Alibaba Cloud DCDN, será necessário concluir a verificação de propriedade do domínio. Para obter mais informações, consulte VerifyDcdnDomainOwner.

  • Você pode adicionar apenas um domínio acelerado por vez. Por padrão, cada usuário pode adicionar até 50 domínios. Para adicionar mais, solicite um aumento de cota no Quota Center.

  • Esta operação é limitada a 100 chamadas por usuário por hora.

Experimente agora

Experimente esta API no OpenAPI Explorer, sem necessidade de assinatura manual. Chamadas bem-sucedidas geram automaticamente código SDK correspondente aos seus parâmetros. Faça o download com segurança de credenciais integrada para uso local.

Testar

Autorização RAM

A tabela abaixo descreve a autorização necessária para chamar esta API. Você pode defini-la em uma política do Resource Access Management (RAM). As colunas da tabela estão detalhadas abaixo:

  • Ação: As ações que podem ser usadas no elemento Action das instruções de política de permissão do RAM para conceder permissões para executar a operação.

  • API: A API que você pode chamar para executar a ação.

  • Nível de acesso: O nível de acesso predefinido concedido para cada API. Valores válidos: create, list, get, update e delete.

  • Tipo de recurso: O tipo de recurso que suporta autorização para executar a ação. Indica se a ação suporta permissão em nível de recurso. O recurso especificado deve ser compatível com a ação. Caso contrário, a política será ineficaz.

    • Para APIs com permissões em nível de recurso, os tipos de recursos obrigatórios são marcados com um asterisco (*). Especifique o Nome de Recurso Alibaba Cloud (ARN) correspondente no elemento Resource da política.

    • Para APIs sem permissões em nível de recurso, é exibido como Todos os Recursos. Use um asterisco (*) no elemento Resource da política.

  • Chave de condição: As chaves de condição definidas pelo serviço. A chave permite controle granular, aplicando-se somente a ações ou a ações associadas a recursos específicos. Além das chaves de condição específicas do serviço, o Alibaba Cloud fornece um conjunto de chaves de condição comuns aplicáveis a todos os serviços compatíveis com RAM.

  • Ação dependente: As ações dependentes necessárias para executar a ação. Para concluir a ação, o usuário RAM ou a função RAM deve ter permissões para executar todas as ações dependentes.

Ação

Nível de acesso

Tipo de recurso

Chave de condição

Ação dependente

dcdn:AddDcdnDomain

create

*Domain

acs:dcdn:*:{#accountId}:domain/{#DomainName}

Nenhuma Nenhuma

Parâmetros da solicitação

Parâmetro

Tipo

Obrigatório

Descrição

Exemplo

DomainName

string

Sim

O domínio a ser acelerado. Você pode adicionar apenas um domínio por solicitação.

Domínios curinga são suportados. Um domínio curinga deve começar com um ponto (.), por exemplo, .example.com.

example.com

ResourceGroupId

string

Não

O ID do grupo de recursos. Se você omitir este parâmetro, o sistema usará o ID do grupo de recursos padrão.

rg-acfmyuji4b6r4**

Sources

string

Não

A lista de origens.

[{"content":"10.10.10.10","type":"ipaddr","priority":"20","port":80}]

CheckUrl

string

Não

A URL de verificação de integridade.

www.example.com/test.html

Scope

string

Não

O escopo do serviço. Valores válidos:

  • domestic: China continental.

  • overseas: Regiões fora da China continental.

  • global: Global.

Valor padrão: domestic.

domestic

TopLevelDomain

string

Não

O domínio de nível superior.

yourTopLevelDomain

Tag

array<object>

Não

As tags a serem adicionadas ao domínio. Você pode adicionar até 20 tags.

object

Não

Key

string

Não

A chave da tag.

env

Value

string

Não

O valor da tag.

value

FunctionType

string

Não

O tipo de serviço de computação. Valores válidos:

  • routine: Rotina.

  • image: Imagem.

  • cloudFunction: Função de nuvem.

routine

A tabela a seguir descreve os campos em Sources.

ParâmetroTipoObrigatórioDescrição
typeStringSimO tipo de origem. Valores válidos: ipaddr (origem IP), domain (origem de domínio) e oss (Bucket OSS).
contentStringSimO endereço de origem. Pode ser um endereço IP ou um domínio.
portIntegerNãoA porta de busca da origem. Pode ser 80 (padrão), 443 (para HTTPS) ou uma porta personalizada.
priorityStringNãoA prioridade da origem. Defina como 20 para uma origem primária (padrão) ou 30 para uma origem de backup.
weightStringNãoO peso da origem. Um valor de 1 a 100. O padrão é 10.

Elementos de resposta

Elemento

Tipo

Descrição

Exemplo

object

Os dados retornados.

RequestId

string

O ID da solicitação.

15C66C7B-671A-4297-9187-2C4477247A74

Exemplos

Resposta de sucesso

JSON formato

{
  "RequestId": "15C66C7B-671A-4297-9187-2C4477247A74"
}

Códigos de erro

Código de status HTTP

Código de erro

Mensagem de erro

Descrição

400 InvalidDomainName.Malformed The specified DomainName is invalid. The specified domain name is invalid.
400 InvalidSource.Content.Malformed The specified Source Content is invalid. The information about the origin server is invalid.
400 MissingSource.Content The Source Content must be specified. No value is specified for the content field in the Sources parameter.
400 MissingSource.Type The Source Type must be specified. No value is specified for the type field in the Sources parameter.
400 InvalidSource.Type.Malformed The specified Source Type is invalid. The value specified for the type field in the Sources parameter is invalid.
400 InvalidSource.Priority.Malformed The specified Source Priority is invalid. The value specified for the priority field in the Sources parameter is invalid.
400 InvalidScope.Malformed The specified Scope is invalid. The value specified for the Scope parameter is invalid.
400 SourceIp.Exceed The maximum number of back-to-origin IP addresses is exceeded. The number of origin IP addresses exceeds the upper limit.
400 InvalidCertificate The specified certificate format is invalid. The format of the specified certificate is invalid.
400 InvalidCertificate.TooLong The maximum length of the certificate is exceeded. The maximum length of the specified certificate content has been reached.
400 CheckSourceHealthFailed Error checking the security. Provide the valid origin site information. The origin check failed. Please provide the correct origin information.
400 ExtensiveAndAllBothExist A wildcard domain name and a domain name with an all. prefix cannot be both specified. Wildcard domain names and domain names that start with "all." cannot both exist.
400 CdnTypeNotSupportExtensiveDomain Wildcard domain names are not supported. Wildcard domain names are not supported.
400 ExtensiveAndSpecificDomainConflict The wildcard domain name overlaps a domain name at the same level. Wildcard domain names and specific domain names of the same level as the wildcard domain names are mutually exclusive. Enter another domain name.
400 InvalidResourceGroupId.Malformed The specified ResourceGroupId is invalid. The value specified for the ResourceGroupId parameter is invalid. Specify a valid value and try again.
400 DomainReserved The root domain of your domain is reserved by another account. Submit a ticket to contact customer support. The root domain name of this domain name is used by another account. Submit a ticket to apply for new domain names.
400 InvalidDomainNameLevel The alicdn.com domain supports a maximum of three levels of domain. alicdn.com supports up to three domain levels for wildcard domain names.
400 EntityNotExists.ResourceGroup The resource group does not exist. The specified resource group does not exist.
400 InvalidStatus.ResourceGroup The current status of the resource group does not support this operation. This operation is not supported while the resource group is in the current state.
400 NotInternationRealIdentity Real-name registration is required for services offered in Mainland China. You have not passed real-name verification. According to the regulations issued by MIIT, you must pass real-name verification if you want to purchase information services in the Chinese mainland.
400 TopLevelDomain.NotFound The specified TopLevelDomain does not exist. The specified top-level domain name does not exist.
400 RecordCheckNotAvailable The ICP filing interface is unavailable. Please try again later. The operation for ICP filing is unavailable. Try again later.
400 IcpBlack The domain is on the ICP blacklist. The domain name is on the blacklist of the MIIT.
400 IspBlack The domain is on the ISP blacklist. The domain name is on the blacklist of Alibaba Cloud.
400 InvalidCheckUrl.Malformed The specified CheckUrl is invalid. The CheckUrl parameter is set to an invalid value.
400 DomainOwnerVerifyFail Owner verification of the root domain failed. The first time a domain name is added to DCDN, you must prove the ownership of the domain name. You must add a DNS record or upload a verification file for the domain name before it can be added to DCDN.
400 TopLevelDomain.Mismatch The specified TopLevelDomain does not match webSiteType. The top-level domain name does not match the domain name type.
400 DomainInBlacklist The domain is in the blacklist. The domain name is in the blacklist.
400 DomainOverLimit The maximum number of domains is exceeded. The maximum number of domain names has been reached.
400 SourceInBlacklist Source is in the blacklist. The origin server is in the blacklist.
400 InvalidTagKey The key should not be null, start with "acs:" or "aliyun", contain "http://" or "https://" or have special symbols:.!@#$%?/^&*)(+={}[]",'<>~·`?;.
400 InvalidTagValue The tag value cannot contain these special symbols:http://, https://
400 ReservedTagKey The tag key is used internally as a reserved field and is not allowed to be used.
400 InvalidFunctionType.Malformed The specified FunctionType is invalid.
400 InvalidfunctionType.Malformed FunctionType is malformed.
400 DomainInRiskList The domain you added may be at risk. If you have any questions, please submit a ticket. The domain name you added may be at risk. If you have any questions, please submit a work order.
400 RegionNoResource Resource allocation failed. Please submit a work order to contact customer service. Resource allocation failed. Please submit a work order to contact customer service.

Consulte Códigos de Erro para uma lista completa.

Notas de versão

Consulte Notas de Versão para uma lista completa.