You can call this operation to modify an 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.

ResourceGroupId String No 123

The ID of the resource group.

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

The origin information.

TopLevelDomain String No yourTopLevelDomain

The top-level domain name.

Fields in Sources

Field

Type

Required

Description

type

String

Yes

The type of the origin server. Valid values: ipaddr: The origin is configured using an IP address. domain: The origin is configured using a domain name. oss: The origin is configured using the Internet domain name of an Alibaba Cloud Object Storage Service (OSS) bucket.

content

String

Yes

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

port

Integer

No

You can set the port parameter to 443 or 80. You can also customize the port number. Default value: 80. If you specify port 443, DCDN will communicate with the origin server by using HTTPS.

priority

String

No

The priority of the origin if multiple origins are specified. Valid values: 20 and 30. Default value: 20. A value of 20 specifies that the origin is a primary origin. A value of 30 specifies that the origin is a secondary origin.

weight

String

No

The weight of the origin if multiple origins are specified. You must specify a value 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://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

HTTP status code Error code Error message Description
400 MissingDomainName The DomainName parameter is required. The error message returned because the DomainName parameter must be specified.
400 InvalidDomainName.Malformed The specified DomainName is invalid. The error message returned because the specified DomainName parameter is invalid.
400 InvalidSource.Content.Malformed The specified Source Content is invalid. The error message returned because the specified Sources parameter is invalid.
400 InvalidTypeContent.Mismatch The specified source type does not match the specified source content. The error message returned because the type and content fields specified in the Sources parameter do not match.
400 MissingSource.Content The Source Content must be specified. The error message returned because the content field in the Sources parameter must be specified.
400 MissingSource.Type The Source Type must be specified. The error message returned because the type field in the Sources parameter must be specified.
400 InvalidSource.Type.Malformed The specified Source Type is invalid. The error message returned because the type field specified in the Sources parameter is invalid.
400 InvalidSource.Priority.Malformed The specified Source Priority is invalid. The error message returned because the priority field specified in the Sources parameter is invalid.
400 InvalidResourceGroupId.Malformed The specified ResourceGroupId is invalid. The error message returned because the specified ResourceGroupId parameter is invalid.
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 allowed when 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.