All Products
Search
Document Center

Dynamic Content Delivery Network:BatchSetDcdnDomainCertificate

Last Updated:Apr 11, 2024

Configures the SSL certificate and modifies the certificate information for multiple accelerated domain names at a time.

Operation description

Note You can call this operation up to 10 times per second per account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dcdn:BatchSetDcdnDomainCertificateWrite
  • Domain
    acs:dcdn:*:{#accountId}:domain/{#domainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringYes

The accelerated domain name for which you want to configure the HTTPS certificate. The accelerated domain must have HTTPS acceleration enabled. You can specify multiple domain names and separate them with commas (,).

Note You can configure up to 10 domain names in each request.
**example**.com
CertNamestringNo

The name of the certificate.

cert-te**.com
CertTypestringNo

The type of the certificate. Valid values:

  • upload: a custom certificate that you upload.
  • cas: a certificate that is acquired through Certificate Management Service.
cas
SSLProtocolstringYes

Specifies whether to enable the HTTPS certificate. Valid values:

  • on: enables the HTTPS certificate.
  • off: does not enable the HTTPS certificate.

This is the default value.

on
SSLPubstringNo

The content of the certificate. This parameter is required only if you enable the certificate.

x****
SSLPristringNo

The private key. This parameter is required only if you enable the certificate.

y****
RegionstringNo

The ID of the region.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

0AEDAF20-4DDF-4165-8750-47FF9C1929C9

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400InvalidSSLProtocol.ValueNotSupportedThe specified SSLProtocol is invalid.The specified SSL certificate parameter is invalid. Set the value to on or off.
400SSLPub.MissingParameterThe SSLPub parameter is required.The SSLPub parameter is not specified.
400SSLPri.MissingParameterThe SSLPri parameter is required.The SSLPri parameter is not specified.
400InvalidSSLPubThe specified SSLPub is invalid.The value specified for the SSLPub parameter is invalid.
400InvalidSSLPriThe specified SSLPri is invalid.The value specified for the SSLPri parameter is invalid.
400Certificate.MissMatchThe SSLPri does not match the certificate.The certificate and private key do not match.
400InvalidCertificate.TooLongThe maximum length of the certificate is exceeded.The maximum length of the specified certificate content has been reached.
400InvalidCertName.TooLongThe length of the certificate name cannot exceed 128 characters.The certificate name cannot contain more than 128 characters.
400IllegalOperationDomainYou are not authorized to operate the domain.You are not authorized to manage the domain name.
400AuthenticationFailedError performing verification.Identity authentication failed.
400SetDomainCertificate.ParameterErrorThe specified parameters are invalid.The specified parameter values are invalid.
400Certificate.StatusErrorThe status of the certificate is invalid.The specified certificate status is invalid.
400DeleteFailedError deleting the certificate.Failed to delete the certificate.
400Certificate.NotFindThe certificate does not exist.The specified certificate does not exist.
400Certificate.DuplicatedThe certificate name already exists.The certificate is duplicated.
400Certificate.FormatErrorThe format of the certificate is invalid.The specified certificate format is invalid.
400Certificate.StatusErrorThe certificate does not exist, or the status of the certificate is invalid.The specified certificate does not exist or the certificate status is invalid.
400Certificate.KeyNullThe private key is required.The private key is not specified.
400Key.MalformedThe specified Key format is invalid.The Key parameter is set in an invalid format.
400CertStorage.failedError saving the certificate.Failed to store the certificate.
400CertificateContent.DuplicatedThe certificate has been uploaded; do not upload again.The specified certificate has been uploaded. Do not upload the certificate again.
400Certificate.ExpiredThe certificate has expired.The certificate has expired.
400InvalidDomain.notOnlineThe 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.
400Decode.ErrorError decoding the SSLPub or SSLPri certificate.The system has failed to decode the public key or the private key of the SSL certificate.
400sslPub.ErrorError encoding SSLPub.Failed to encode sslPub.
400sslPri.ErrorError encoding SSLPri.Failed to encode SSLPri.
400DomainInSafeModeThe 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.
400InvalidDomainNumber.TooLongThe maximum number of DomainNumber is 50.The number of domain names cannot exceed 50.
403DomainInProtectedModeThe 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.
404CertName.MissingParameterYou must specify CertName.Enter the certificate name.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history