All Products
Search
Document Center

ApsaraVideo Live:SetLiveDomainCertificate

Last Updated:Dec 05, 2024

Enables or disables the certificate of a domain name, and modifies the certificate information.

Operation description

Obtain the domain name, and then call this operation to enable or disable the certificate of a domain name and modify the certificate information.

QPS limit

You can call this operation up to 30 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation.

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
live:SetLiveDomainCertificateupdate
*Domain
acs:cdn:*:{#accountId}:domain/{#DomainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringYes

The domain name that is secured by the certificate. The domain name uses HTTPS-based acceleration.

developer.aliyundoc.com
CertNamestringNo

The certificate name.

Cert-****
CertTypestringNo

The certificate type. Valid values:

  • upload: a custom certificate
  • cas: a certificate that is purchased from Certificate Management Service
  • free: a free certificate (for testing)
free
SSLProtocolstringYes

Specifies whether to enable the HTTPS certificate. Valid values:

  • on. If you set this parameter to on, you must also specify the SSLPub and SSLPri parameters.
  • off. This is the default value.
off
SSLPubstringNo

The public key.

Note This parameter is required only if you set the SSLProtocol parameter to on.
****
SSLPristringNo

The private key.

Note This parameter is required only if you set the SSLProtocol parameter to on.
****
ForceSetstringNo

Specifies whether to check the certificate name for duplicates. A value of 1 indicates that the system does not perform the check and overwrites the information about the certificate that has the same name. Set the value to 1.

1

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

Examples

Sample success responses

JSONformat

{
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}

Error codes

HTTP status codeError codeError message
400InvalidSSLProtocol.ValueNotSupportedThe specified value of parameter SSLProtocol is not supported.
400SSLPub.MissingParameterAn input parameter "SSLPub" that is mandatory for processing the request is not supplied.
400SSLPri.MissingParameterAn input parameter "SSLPri" that is mandatory for processing the request is not supplied.
400InvalidSSLPubThe SSLPub you provided is malformed!
400InvalidSSLPriThe SSLPri you provided is malformed!
400Certificate.MissMatchThe SSLPri does not math the specified Certificate!
400InvalidCertificate.TooLongThe Certificate you provided is over the max length!
400InvalidCertName.TooLongThe Certificate name you provided is over the max length 128!
400IllegalOperationDomainYou are not authorized to operate the domain.
400Certificate.NotPermittedOffTurn off certificate will change domain scheduling, please contact customer service
400Certificate.SettedNotEffectCertificate was successfully setted but does't take effect for protecting current service, please contact customer service
400Certificate.NotFindNot find the certificate info.
400AuthenticationFailedAuthentication failed.
400SetDomainCertificate.ParameterErrorParameters have error.
400InvalidSSLPubOrInvalidSSLPriThe SSLPri or SSLPub you provided is malformed!
400Certificate.MissMatchThe certificate is not match the private key.
400Certificate.StatusErrorCertificate is not exist or its status is error.
400DeleteFailedDelete certificate is failed.
400Certificate.DuplicatedThe certificate name is duplicated.
400Certificate.FormatErrorThe certificate format is error.
400Certificate.StatusErrorThe certificate status is error.
400Certificate.KeyNullThe private key is not null.
400Key.MalformedThe private key format is error.
400CertStorage.failedThe certificate storage failed.
400CertificateContent.DuplicatedThe certificate is already uploaded, please don't upload again.
400Certificate.ExpiredThe certificate is expired.
400InvalidDomain.notOnlineThe domain is not online, please check the domain status and try again later.
400Decode.ErrorThe certificate sslpub or sslpri decode error.
400sslPub.ErrorThe SSLPub encoded failed.
400sslPri.ErrorThe SSLPri encoded failed.
400DomainInSafeModeThis domain is in the safe mode. if you want to do this operation, please contact us!
400DomainInProtectedModeThis domain is in the protected mode. if you want to do this operation, please contact us!
400FunctionMutexFunction is mutex with other function.
403IllegalOperationIllegal domain operate is not permitted.
404CertName.MissingParameterThe CertName parameter is required.

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

Change history

Change timeSummary of changesOperation
2024-09-29API Description Update. The Error code has changedView Change Details