All Products
Search
Document Center

CDN:BatchSetCdnDomainServerCertificate

Last Updated:May 30, 2023

Enables, disables, or configures the SSL certificates of one or more accelerated domain names at a time.

Operation Description

  • You can call this operation up to 10 times per second per account.
  • You can specify up to 10 domain names in each request. Separate multiple domain names with commas (,)

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
cdn:BatchSetCdnDomainServerCertificateWRITE
  • CDN
    acs:cdn:*:{#accountId}:domain/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringYes

The accelerated domain name to which the SSL certificate belongs. The type of request supported by the accelerated domain name must be HTTPS. You can specify multiple accelerated domain names and separate them with commas (,).

NoteYou can configure up to 10 domain names at a time.
example.com
CertNamestringNo

The name of the certificate.

yourCertName
CertTypestringNo

The type of the certificate. Valid values:

  • upload: a user-uploaded SSL certificate.
  • cas: a certificate that is acquired through Certificate Management Service.
cas
SSLProtocolstringYes

Specifies whether to enable the SSL certificate. Default value: off. Valid values:

  • on :enables the SSL certificate.
  • off:disables the SSL certificate
on
SSLPubstringNo

The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.

yourSSLPub
SSLPristringNo

The private key. Specify the private key only if you want to enable the SSL certificate.

yourSSLPri
RegionstringNo

The ID of the region.

your region
ForceSetstringNo

Specifies whether to check the certificate name for duplicates. If you set the value to 1, the system does not perform the check and overwrites the information about the existing certificate that uses the same name.

1

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.-
400SSLPub.MissingParameterThe SSLPub parameter is required.-
400SSLPri.MissingParameterThe SSLPri parameter is required.-
400InvalidSSLPubThe specified SSLPub is invalid.-
400InvalidSSLPriThe specified SSLPri is invalid.-
400Certificate.MissMatchThe SSLPri does not match the certificate.-
400InvalidCertificate.TooLongThe Certificate you provided is over the max lengthCertificate and private key length exceeds the limit
400InvalidCertName.TooLongThe length of the certificate name cannot exceed 128 characters.-
400IllegalOperationDomainYou are not authorized to operate the domain.You are not authorized to manage the domain name.
400AuthenticationFailedError performing verification.-
400SetDomainCertificate.ParameterErrorThe specified parameters are invalid.The specified parameter is invalid.
400Certificate.StatusErrorThe status of the certificate is invalid.-
400DeleteFailedError deleting the certificate.-
400Certificate.NotFindThe certificate does not exist.-
400Certificate.DuplicatedThe certificate name already exists.-
400Certificate.FormatErrorThe format of the certificate is invalid.The specified certificate is invalid.
400Certificate.StatusErrorThe certificate does not exist, or the status of the certificate is invalid.-
400Certificate.KeyNullThe private key is required.-
400Key.MalformedThe specified Key format is invalid.-
400CertStorage.failedError saving the certificate.-
400CertificateContent.DuplicatedThe certificate has been uploaded; do not upload again.-
400Certificate.ExpiredThe certificate has expired.-
400InvalidDomain.notOnlineThe domain is offline. Check the status of the domain and try again later.-
400Decode.ErrorError decoding the SSLPub or SSLPri certificate.-
400sslPub.ErrorError encoding SSLPub.-
400sslPri.ErrorError encoding SSLPri.-
400DomainInSafeModeThe domain is in safe mode. To request permission, contact Customer Service.-
400InvalidDomainNumber.TooLongThe number of the DomainNumber cannot exceed 10.-
403DomainInProtectedModeThe domain is in protection mode. To request permission, contact Customer Service.-
404CertName.MissingParameterThe CertName parameter is required.-

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

Change history

Change timeSummary of changesOperation
2023-03-24The error codes of the API operation change.
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404