All Products
Search
Document Center

Edge Security Acceleration:SetDcdnDomainSSLCertificate

Last Updated:Oct 13, 2025

You can call SetDcdnDomainSSLCertificate to enable or disable the certificate feature for a domain name and update the certificate information.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dcdn:SetDcdnDomainSSLCertificate

none

*Domain

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

None None

Request parameters

Parameter

Type

Required

Description

Example

DomainName

string

Yes

The domain name to which the certificate belongs. The domain name must be an HTTPS-accelerated domain name.

example.com

CertName

string

No

The name of the certificate. You can specify only one name. This parameter is valid only when CertType is set to upload. In this case, you can specify a name for the new certificate.

yourCertName

CertId

integer

No

The ID of the certificate. This parameter is required only when CertType is set to cas. In this case, specify the ID of an existing certificate.

8089870

CertType

string

No

The type of the certificate. Valid values:

  • upload: A custom certificate that you upload.

  • cas: A certificate that you purchase from Alibaba Cloud SSL Certificates Service.

upload

SSLProtocol

string

Yes

Specifies whether to enable the SSL certificate. Valid values:

  • on: Enable.

  • off: Disable.

off

SSLPub

string

No

The content of the SSL certificate. Specify this parameter only when you enable the certificate.

xxx

SSLPri

string

No

The content of the private key. Specify this parameter only when you enable the certificate.

y****

CertRegion

string

No

The region where the certificate is located. This parameter is valid only when you set CertType to cas. Valid values are cn-hangzhou and ap-southeast-1. The default value is cn-hangzhou. If you are an Alibaba Cloud international account user, set this parameter to ap-southeast-1.

Valid values:

  • ap-southeast-1 :

    ap-southeast-1

  • cn-hangzhou :

    cn-hangzhou

cn-hangzhou

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

A7C69682-7F88-40DD-A198-10D0309E439D

Examples

Success response

JSON format

{
  "RequestId": "A7C69682-7F88-40DD-A198-10D0309E439D"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidSSLProtocol.ValueNotSupported The specified SSLProtocol is invalid. The specified SSL certificate parameter is invalid. Set the value to on or off.
400 SSLPub.MissingParameter The SSLPub parameter is required. The SSLPub parameter is not specified.
400 SSLPri.MissingParameter The SSLPri parameter is required. The SSLPri parameter is not specified.
400 InvalidSSLPub The specified SSLPub is invalid. The value specified for the SSLPub parameter is invalid.
400 InvalidSSLPri The specified SSLPri is invalid. The value specified for the SSLPri parameter is invalid.
400 Certificate.MissMatch The SSLPri does not match the certificate. The certificate and private key do not match.
400 InvalidCertificate.TooLong The maximum length of the certificate is exceeded. The maximum length of the specified certificate content has been reached.
400 InvalidCertName.TooLong The length of the certificate name cannot exceed 128 characters. The certificate name cannot contain more than 128 characters.
400 AuthenticationFailed Error performing verification. Identity authentication failed.
400 SetDomainCertificate.ParameterError The specified parameters are invalid. The specified parameter values are invalid.
400 Certificate.StatusError The status of the certificate is invalid. The specified certificate status is invalid.
400 DeleteFailed Error deleting the certificate. Failed to delete the certificate.
400 Certificate.NotFind The certificate does not exist. The specified certificate does not exist.
400 Certificate.Duplicated The certificate name already exists. The certificate is duplicated.
400 Certificate.FormatError The format of the certificate is invalid. The specified certificate format is invalid.
400 Certificate.KeyNull The private key is required. The private key is not specified.
400 Key.Malformed The specified Key format is invalid. The Key parameter is set in an invalid format.
400 CertStorage.failed Error saving the certificate. Failed to store the certificate.
400 CertificateContent.Duplicated The certificate has been uploaded; do not upload again. The specified certificate has been uploaded. Do not upload the certificate again.
400 Certificate.Expired The certificate has expired. The certificate has expired.
400 InvalidDomain.notOnline The domain is offline. Check the status of the domain and try again later. The specified domain name status is invalid. Check whether the domain name is online and try again later.
400 Decode.Error Error decoding the SSLPub or SSLPri certificate. The system has failed to decode the public key or the private key of the SSL certificate.
400 sslPub.Error Error encoding SSLPub. Failed to encode sslPub.
400 sslPri.Error Error encoding SSLPri. Failed to encode SSLPri.
400 DomainInSafeMode The domain is in safe mode. To request permission, contact Customer Service. The specified domain name is in the protected mode. If you must perform this operation, submit a ticket.
400 CreateCertificateFailed Create certificate failed,please try again. The certificate failed to be created. Create the certificate again.
400 Abs.CertRegion.ValueNotSupported CertRegion is not supported. The certificate region is not supported.
400 CertNameAlreadyExists The CertName already exists. The certificate name already exists.
403 DomainInProtectedMode The domain is in protection mode. To request permission, contact Customer Service. The specified domain name is in the protected mode. If you must perform this operation, contact customer service.
404 CertName.MissingParameter You must specify CertName.
404 InvalidDomain.Offline The domain is offline. The domain name is disabled.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.