Modifies a specified accelerated domain name.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateDcdnDomain

The operation that you want to perform. Set the value to UpdateDcdnDomain.

DomainName String Yes example.com

The accelerated domain name to be modified. You can specify only one domain name in each call.

Sources String No [{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}]

The information about the origin address.

ResourceGroupId String No rg-xxxxx

The ID of the resource group.

TopLevelDomain String No yourTopLevelDomain

The top-level domain name.

Fields in Sources

Parameter

Type

Required

Description

type

String

Yes

The type of origin server. Valid values:

ipaddr: the IP address of the origin server.

domain: the domain name of the origin server.

oss: the URL of an Object Storage Service (OSS) bucket.

content

String

Yes

The origin address. You can specify an IP address or a domain name.

port

Integer

No

The port number. You can set the port parameter to 443 or 80. You can also customize the port number. The default value is 80. 443 is used for HTTPS back-to-origin requests.

priority

String

No

The priority of the origin server. Valid values: 20 and 30. Default value: 20. A value of 20 indicates a primary origin server. A value of 30 indicates a secondary origin server.

weight

String

No

The weight of the origin server. You must specify a value that is less than 100. Default value: 10.

Response parameters

Parameter Type Example Description
RequestId String 0AEDAF20-4DDF-4165-8750-47FF9C1929C9

The ID of the request.

Examples

Sample requests

http(s)://dcdn.aliyuncs.com/? Action=UpdateDcdnDomain
&DomainName=example.com
&Sources=[{"content":"1.1.1.1","type":"ipaddr","priority":"20","port":80}]
&<Common request parameters>

Sample success responses

XML format

<UpdateDcdnDomainResponse>
	  <RequestId>0AEDAF20-4DDF-4165-8750-47FF9C1929C9</RequestId>
</UpdateDcdnDomainResponse>

JSON format

{
  "RequestId": "0AEDAF20-4DDF-4165-8750-47FF9C1929C9"
}

Error codes

HttpCode Error code Error message Description
400 MissingDomainName The domainName parameter is required. The error message returned because the DomainName parameter is not specified.
400 InvalidDomainName.Malformed The specified DomainName is invalid. The error message returned because the domain name format is invalid.
400 InvalidSource.Content.Malformed The specified Source Content is invalid. The error message returned because the specified value of the Sources parameter is invalid. Specify a valid value.
400 InvalidTypeContent.Mismatch The specified source type does not match the specified source content. The error message returned because the specified type and content fields in the Sources parameter do not correspond to each other. Specify the required type and content.
400 MissingSource.Content The Source Content must be specified. The error message returned because the content field in the Sources parameter is not specified. Specify the field and try again later.
400 MissingSource.Type The Source Type must be specified. The error message returned because the type field in the Sources parameter is not specified. Specify the field and try again later.
400 InvalidSource.Type.Malformed The specified Source Type is invalid. The error message returned because the specified value of the type field in the Sources parameter is invalid. Specify a value in the required format.
400 InvalidSource.Priority.Malformed The specified Source Priority is invalid. The error message returned because the specified value of the priority field in the Sources parameter is invalid. Specify a value in the required format.
400 InvalidResourceGroupId.Malformed The specified ResourceGroupId is invalid. The error message returned because the specified value of the ResourceGroupId parameter is invalid. Specify a valid value.
400 EntityNotExists.ResourceGroup The resource group does not exist. The error message returned because the specified resource group does not exist.
400 InvalidStatus.ResourceGroup The current status of the resource group does not support this operation. The error message returned because the operation is not supported while the resource group is in the current state.
403 DomainInProtectedMode The domain is in protection mode. To request permission, contact Customer Service. The error message returned because the specified domain name is being protected. To call this operation, contact Alibaba Cloud customer services.
400 TopLevelDomain.NotFound The specified TopLevelDomain does not exist. The error message returned because the specified top-level domain name does not exist.

For a list of error codes, visit the API Error Center.