查詢當前帳號的合規包列表。
介面說明
本文將提供一個樣本,查詢合規包列表。返回結果顯示有一條合規包記錄cp-fdc8626622af00f9****。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
config:ListCompliancePacks |
list |
*CompliancePack
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Status |
string |
否 |
合規包狀態。取值:
|
ACTIVE |
| RiskLevel |
integer |
否 |
合規包的風險等級。取值:
|
1 |
| PageSize |
integer |
否 |
分頁時每頁顯示的資料行數。 取值範圍:1~100。起始值:1。預設值:10。 |
10 |
| PageNumber |
integer |
否 |
頁碼。 起始值:1。預設值:1。 |
1 |
| Tag |
array<object> |
否 |
資源的標籤。 最多支援綁定 20 個標籤。 |
|
|
object |
否 |
資源的標籤。 最多支援綁定 20 個標籤。 |
||
| Key |
string |
否 |
資源的標籤鍵。 最多支援綁定 20 個標籤鍵。 |
key-1 |
| Value |
string |
否 |
資源的標籤值。 最多支援綁定 20 個標籤值。 |
value-1 |
關於公用請求參數的詳情,請參見公用參數。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
無。 |
||
| RequestId |
string |
請求 ID。 |
6EC7AED1-172F-42AE-9C12-295BC2ADB751 |
| CompliancePacksResult |
object |
合規包列表查詢結果。 |
|
| CompliancePacks |
array<object> |
合規包列表。 |
|
|
object |
無 |
||
| Status |
string |
合規包狀態。取值:
|
ACTIVE |
| CompliancePackId |
string |
合規包 ID。 |
cp-fdc8626622af00f9**** |
| RiskLevel |
integer |
合規包的風險等級。取值:
|
1 |
| Description |
string |
合規包描述。 |
Check the stability of Alibaba Cloud resources based on the high-availability infrastructure, capacity protection, change management, monitoring management, backup management, and fault isolation. This helps you identify issues at the earliest opportunity and improve stability and the efficiency of O&M. |
| CompliancePackName |
string |
合規包名稱。 |
BestPracticesForResourceStability |
| AccountId |
integer |
合規包歸屬的阿里雲帳號 ID。 |
120886317861**** |
| CompliancePackTemplateId |
string |
合規包模板 ID。 |
ct-484cff4e06a30062**** |
| Tags |
array<object> |
資源標籤。 |
|
|
object |
資源標籤。 |
||
| TagKey |
string |
標籤鍵。 |
key-1 |
| TagValue |
string |
標籤值。 |
value-1 |
| CreateTimestamp |
integer |
建立合規包的時間戳記。單位:毫秒。 |
1621325046000 |
| PageSize |
integer |
分頁時每頁顯示的資料行數。 |
10 |
| PageNumber |
integer |
頁碼。 |
1 |
| TotalCount |
integer |
合規包總數。 |
1 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "6EC7AED1-172F-42AE-9C12-295BC2ADB751",
"CompliancePacksResult": {
"CompliancePacks": [
{
"Status": "ACTIVE",
"CompliancePackId": "cp-fdc8626622af00f9****",
"RiskLevel": 1,
"Description": "Check the stability of Alibaba Cloud resources based on the high-availability infrastructure, capacity protection, change management, monitoring management, backup management, and fault isolation. This helps you identify issues at the earliest opportunity and improve stability and the efficiency of O&M.",
"CompliancePackName": "BestPracticesForResourceStability",
"AccountId": 0,
"CompliancePackTemplateId": "ct-484cff4e06a30062****",
"Tags": [
{
"TagKey": "key-1",
"TagValue": "value-1"
}
],
"CreateTimestamp": 1621325046000
}
],
"PageSize": 10,
"PageNumber": 1,
"TotalCount": 1
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | 您無權執行此操作。 |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 服務不可用。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。