全部產品
Search
文件中心

:SetCdnDomainSSLCertificate - 設定CDN網域名稱認證

更新時間:Dec 14, 2025

調用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:認證中心認證。

upload

SSLProtocol

string

HTTPS 認證是否啟用。

  • on:啟用。

  • off:不啟用。

off

SSLPub

string

安全性憑證內容,不啟用認證則無需輸入,配置認證請輸入認證內容。

xxx

SSLPri

string

私密金鑰內容,不啟用認證則無需輸入,配置認證請輸入私密金鑰內容。

y****

CertRegion

string

認證所在地區,只有CertType=cas時生效。支援cn-hangzhouap-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.

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

變更歷史

更多資訊,參考變更詳情