All Products
Search
Document Center

CDN:BatchSetCdnDomainServerCertificate

Last Updated:Nov 29, 2024

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

Operation description

Note
  • 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 (,)
  • If the service type of a domain name is live streaming, the service may be unavailable after you configure the certificate for the domain name. Therefore, you cannot use this operation to configure the certificate for a domain name that is used for live streaming.
  • Debugging

    You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

    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:BatchSetCdnDomainServerCertificateupdate
    *Domain
    acs:cdn:*:{#accountId}:domain/{#DomainName}
      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 (,).

    Note You can manage the SSL certificates of up to 50 accelerated domain names in each call.
    example.com
    CertNamestringNo

    The name of the certificate.

    yourCertName
    CertTypestringNo

    The type of the SSL certificate. Valid values:

    • upload: a user-uploaded SSL certificate.
    • cas: a certificate that is issued by SSL Certificates Service.
    cas
    SSLProtocolstringYes

    Specifies whether to enable the SSL certificate. Valid values:

    • on: enables the SSL certificate.
    • off: disables the SSL certificate. This is the default value.
    on
    SSLPubstringNo

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

    yourSSLPub
    SSLPristringNo

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

    yourSSLPri
    RegionstringNo

    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
    2024-05-07The Error code has changedView Change Details
    2023-03-24The Error code has changedView Change Details