Modifies a specified accelerated domain.

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 name of the accelerated domain to be modified. You can specify only one domain name.

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

The information about the origin address.

ResourceGroupId String No 123

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 the origin. A value of ipaddr indicates that the origin is configured by using an IP address. A value of domain indicates that the origin is configured by using a domain name. A value of oss indicates that the origin is configured by using the domain name 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. If you specify port 443, Dynamic Route for CDN (DCDN) communicates with the origin over HTTPS.

priority

String

No

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

weight

String

No

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

Response parameters

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

The ID of the request.

Examples

Sample requests

http://dcdn.aliyuncs.com?Action=UpdateDcdnDomain
&SourceType=domain
&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 another 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.
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 that is 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 that is 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 is being protected. To call this operation, contact Customer Service.
400 TopLevelDomain.NotFound The specified TopLevelDomain does not exist. The error message returned because the specified top-level domain does not exist.

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