全部產品
Search
文件中心

CDN:SetCdnDomainSSLCertificate

更新時間:Oct 10, 2026

呼叫SetCdnDomainSSLCertificate用於設定某網域下憑證功能是否啟用及更新憑證資訊。

介面說明

  • 單使用者呼叫頻率:30 次/秒。

  • 呼叫方式:POST。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

cdn:SetCdnDomainSSLCertificate

update

*Domain

acs:cdn:*:{#accountId}:domain/{#DomainName}

無 無

請求參數

名稱

類型

必填

描述

樣本值

DomainName

string

是

指定憑證所屬加速網域,需屬於 HTTPS 加速類型。僅支援單個網域。

example.com

CertName

string

否

憑證名稱,目前只支援單個憑證名稱。 CertType=upload 時選填,給新憑證的名稱。

yourCertName

CertId

integer

否

憑證 ID。 CertType=cas 時必填,表示選擇已有憑證。

8089870

CertType

string

否

憑證類型。

  • upload:上傳憑證。

  • cas:憑證中心憑證。

枚舉值:

  • cas :

    憑證中心憑證。

  • upload :

    上傳憑證。

upload

SSLProtocol

string

是

HTTPS 憑證是否啟用。

  • on:啟用。

  • off:不啟用。

off

SSLPub

string

否

安全憑證內容,不啟用憑證則無需輸入,設定憑證請輸入憑證內容。

xxx

SSLPri

string

否

私鑰內容,不啟用憑證則無需輸入,設定憑證請輸入私鑰內容。

y****

CertRegion

string

否

憑證所在地域,只有CertType=cas時生效。支援cn-hangzhou和ap-southeast-1,預設cn-hangzhou。國際站使用者建議使用ap-southeast-1。

枚舉值:

  • ap-southeast-1 :

    ap-southeast-1

  • cn-hangzhou :

    cn-hangzhou

cn-hangzhou

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

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

樣本

正常返回樣本

JSON格式

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

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidSSLProtocol.ValueNotSupported The specified SSLProtocol is invalid.
400 SSLPub.MissingParameter The SSLPub parameter is required. SSLPub 參數缺失。
400 SSLPri.MissingParameter The SSLPri parameter is required. SSLPri 參數缺失。
400 InvalidSSLPub The specified SSLPub is invalid.
400 InvalidSSLPri The specified SSLPri is invalid.
400 Certificate.MissMatch The SSLPri does not match the certificate.
400 InvalidCertificate.TooLong The maximum length of the certificate is exceeded.
400 InvalidCertName.TooLong The length of the certificate name cannot exceed 128 characters.
400 AuthenticationFailed Error performing verification.
400 SetDomainCertificate.ParameterError The specified parameters are invalid. 指定的參數無效。
400 Certificate.StatusError The status of the certificate is invalid.
400 DeleteFailed Error deleting the certificate.
400 Certificate.NotFind The certificate does not exist.
400 Certificate.Duplicated The certificate name already exists.
400 Certificate.FormatError The format of the certificate is invalid. 憑證格式錯誤。
400 Certificate.KeyNull The private key is required.
400 Key.Malformed The specified Key format is invalid.
400 CertStorage.failed Error saving the certificate.
400 CertificateContent.Duplicated The certificate has been uploaded; do not upload again.
400 Certificate.Expired The certificate has expired.
400 InvalidDomain.notOnline The domain is offline. Check the status of the domain and try again later.
400 Decode.Error Error decoding the SSLPub or SSLPri certificate.
400 sslPub.Error Error encoding SSLPub.
400 sslPri.Error Error encoding SSLPri.
400 DomainInSafeMode The domain is in safe mode. To request permission, contact Customer Service.
400 CreateCertificateFailed Create certificate failed,please try again.
400 Abs.CertRegion.ValueNotSupported CertRegion is not supported. 不支援的憑證地域。
400 CertNameAlreadyExists The CertName already exists. 該憑證名稱已存在。
400 InvalidDomain.Offline The domain provided is offline. 網域已下線。
400 InvalidEnv The specified Env is invalid. 指定的灰度發佈憑證參數無效。
403 DomainInProtectedMode The domain is in protection mode. To request permission, contact Customer Service.
404 CertName.MissingParameter You must specify CertName.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情。