設置某域名下證書功能是否啟用。
調試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
授權信息
下表是API對應的授權信息,可以在RAM權限策略語句的Action
元素中使用,用來給RAM用戶或RAM角色授予調用此API的權限。具體說明如下:
- 操作:是指具體的權限點。
- 訪問級別:是指每個操作的訪問級別,取值為寫入(Write)、讀取(Read)或列出(List)。
- 資源類型:是指操作中支持授權的資源類型。具體說明如下:
- 對于必選的資源類型,用背景高亮的方式表示。
- 對于不支持資源級授權的操作,用
全部資源
表示。
- 條件關鍵字:是指云產品自身定義的條件關鍵字。
- 關聯操作:是指成功執行操作所需要的其他權限。操作者必須同時具備關聯操作的權限,操作才能成功。
操作 | 訪問級別 | 資源類型 | 條件關鍵字 | 關聯操作 |
---|---|---|---|---|
vs:SetVsDomainCertificate | update |
|
| 無 |
請求參數
名稱 | 類型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DomainName | string | 是 | 指定證書所屬加速域名。 說明
域名需要屬于 HTTPS 加速類型。
| example.aliyundoc.com |
SSLProtocol | string | 是 | HTTPS 證書是否啟用。取值:
| on |
CertName | string | 否 | 證書名稱。 | Cert-77****7 |
CertType | string | 否 | 證書類型。
| free |
SSLPub | string | 否 | 安全證書內容,不啟用證書則無需輸入,配置證書請輸入證書內容。 | 328uiuii28****82dsada81 |
SSLPri | string | 否 | 私鑰內容,不啟用證書則無需輸入,配置證書請輸入私鑰內容。 | xxxxxxx |
Region | string | 否 | 地域。 | cn-qingdao |
ForceSet | string | 否 | 設置為 1 時,忽略證書名稱重復的校驗,覆蓋原有同名證書信息。 | 1 |
返回參數
示例
正常返回示例
JSON
格式
{
"RequestId": "119F7639-4646-51A4-B6C1-300D391C0104"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
特殊錯誤碼
ErrorCode 錯誤碼 | Message 錯誤信息 | HTTP 狀態 | 語義 |
---|---|---|---|
InvalidDomain.NotFound | The domain provided does not belong to you. | 404 | 域名不存在或不屬于當前用戶。 |
IllegalOperation | Illegal domain operate is not permitted. | 403 | 沒有權限執行當前操作。 |
ServiceBusy | The specified Domain is configuring, please retry later. | 403 | 域名正在配置中,請稍后再試。 |
InvalidDomain.Offline | The domain provided is offline. | 400 | 域名已下線。 |
OperationDenied | Your CDN service is suspended. | 403 | 該賬號已經欠費,請充值。 |
InvalidSSLProtocol.ValueNotSupported | The specified value of parameter Enable is not supported. | 400 | SSLProtocol 的值不合法。 |
SSLPub.MissingParameter | An input parameter SSLPub that is mandatory for processing the request is not supplied. | 400 | SSLPub 參數缺失。 |
SSLPri.MissingParameter | An input parameter SSLPri that is mandatory for processing the request is not supplied. | 400 | SSLPri 參數缺失。 |
InvalidCertificate | The Certificate you provided is malformed! | 400 | 證書內容不合法。 |
InvalidSSLPri | The SSLPri you provided is malformed! | 400 | 私鑰內容不合法。 |
Certificate.MissMatch | The SSLPri does not math the specified Certificate! | 400 | 證書和私鑰不匹配。 |
InvalidCertificate.TooLong | The Certificate you provided is over the max length! | 400 | 證書內容超過長度限制。 |
InvalidCertName.TooLong | The Certificate name you provided is over the max length 128! | 400 | 證書名稱不能超過 128 個字符。 |
SetDomainSSLPub.ParameterError | Parameters have error. | 400 | 參數錯誤。 |
Certificate.StatusError | Certificate is not exist or its status is error. | 400 | 證書不存在或證書狀態錯誤。 |
DeleteFailed | Delete certificate is failed. | 400 | 刪除證書失敗。 |
Certificate.NotFind | Not find the certificate info. | 400 | 沒有查到相應證書。 |
Certificate.Duplicated | The certificate name is duplicated. | 400 | 證書名稱重復。 |
Certificate.FormatError | The certificate format is error. | 400 | 證書格式錯誤。 |
Certificate.StatusError | The certificate status is error. | 400 | 證書狀態錯誤。 |
Certificate.KeyNull | The SSLPri is not null. | 400 | 私鑰不能為空。 |
SSLPri.Malformed | The SSLPri format is error. | 400 | 私鑰格式錯誤。 |
Certificate.NotPermittedOff | Turn off certificate will change domain scheduling, please contact customer service. | 400 | 關閉證書會影響該域名調度,請聯系客戶調整。 |
Certificate.SettedNotEffect | Certificate was successfully setted but does’t take effect for protecting current service, please contact customer service. | 400 | 證書已經設置成功,但為保護當前服務還未生效,請聯系客服處理。 |