修改當前帳號指定合規包的資訊。
介面說明
本文將提供一個樣本,將合規包cp-a8a8626622af0082****中規則eip-bandwidth-limit的參數值修改為20。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
config:UpdateCompliancePack |
update |
*CompliancePack
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| CompliancePackId |
string |
是 |
合規包 ID。 關於如何擷取合規包 ID,請參見 ListCompliancePacks 。 |
cp-a8a8626622af0082**** |
| Description |
string |
否 |
合規包描述。 |
基於等保2.0三級標準,提供持續檢測合規性的建議模板,協助您提前自檢並修複問題,以便快速通過正式檢測。 |
| RiskLevel |
integer |
否 |
合規包的風險等級。取值:
|
1 |
| ConfigRules |
array<object> |
否 |
合規包中的規則列表。 當您修改合規包時,如果規則列表為空白,則保持原有規則列表不變;如果規則列表不為空白,則使用新規則替換原有規則列表中的規則。 |
|
|
array<object> |
否 |
無 |
||
| ManagedRuleIdentifier |
string |
否 |
規則模板標識。配置審計根據規則模板標識自動建立規則,並將該規則加入到當前合規包中。
|
eip-bandwidth-limit |
| ConfigRuleParameters |
array<object> |
否 |
規則參數資訊。 |
|
|
object |
否 |
無 |
||
| ParameterName |
string |
否 |
規則參數名稱。 參數 |
bandwidth |
| ParameterValue |
string |
否 |
規則參數值。 參數 |
20 |
| ConfigRuleId |
string |
否 |
規則 ID。配置審計將已有規則加入到當前合規包中。
|
cr-e918626622af000f**** |
| ConfigRuleName |
string |
否 |
規則名稱。 |
檢測閑置Elastic IP Address |
| Description |
string |
否 |
規則描述。 |
彈性公網已綁定到ECS或者NAT執行個體,非閑置狀態,視為“合規”。 |
| RiskLevel |
integer |
否 |
規則風險等級。取值:
|
1 |
| ClientToken |
string |
否 |
保證請求等冪性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。 |
1594295238-f9361358-5843-4294-8d30-b5183fac**** |
| CompliancePackName |
string |
否 |
合規包名稱。 關於如何擷取合規包名稱,請參見 ListCompliancePacks 。 |
等保三級預檢合規包 |
| RegionIdsScope |
string |
否 |
合規包僅對指定地區 ID 中的資源生效。多個地區 ID 之間用半形逗號(,)分隔。 |
cn-hangzhou |
| ExcludeRegionIdsScope |
string |
否 |
規則對指定地區內資源無效,即不對該地區內資源執行評估。多個地區 ID 之間用半形逗號(,)分隔。 |
cn-shanghai |
| ExcludeResourceIdsScope |
string |
否 |
合規包對指定資源 ID 無效,即不對該資源執行評估。多個資源 ID 之間用半形逗號(,)分隔。 |
23642660635687**** |
| ResourceIdsScope |
string |
否 |
規則對指定資源 ID 生效。多個資源 ID 之間用半形逗號(,)分隔。 |
lb-5cmbowstbkss9ta03**** |
| ResourceGroupIdsScope |
string |
否 |
合規包僅對指定資源群組 ID 中的資源生效。多個資源群組 ID 之間用半形逗號(,)分隔。 |
rg-aekzdibsjjc**** |
| ExcludeResourceGroupIdsScope |
string |
否 |
規則對指定資源群組 ID 中的資源無效,即不對該資源群組內的資源評估。多個資源群組 ID 之間用半形逗號(,)分隔。 |
rg-bnczc6r7rml**** |
| TagKeyScope |
string |
否 |
合規包僅對綁定指定標籤鍵的資源生效。 |
ECS |
| TagValueScope |
string |
否 |
合規包僅對綁定指定標籤索引值的資源生效。 說明
TagValueScope 需結合 TagKeyScope 一起使用。 |
test |
| TagsScope |
array<object> |
否 |
標籤範圍 |
|
|
object |
否 |
生效標籤。 |
||
| TagKey |
string |
否 |
標籤鍵。 |
key-1 |
| TagValue |
string |
否 |
標籤值。 |
value-1 |
| ExcludeTagsScope |
array<object> |
否 |
排除的標籤範圍 |
|
|
object |
否 |
排除標籤。 |
||
| TagKey |
string |
否 |
標籤鍵。 |
key-2 |
| TagValue |
string |
否 |
標籤值 |
value-2 |
Tag
deprecated
|
array<object> |
否 |
資源的標籤。該入參已棄用,請忽略,傳入不會生效。 最多支援綁定 20 個標籤。 |
|
|
object |
否 |
資源的標籤。 最多支援綁定 20 個標籤。 |
||
| Key |
string |
否 |
資源的標籤鍵。 一旦傳入該值,則不允許為空白字串。最多支援 64 個字元,不能以 一次最多支援輸入 20 個標籤的標籤鍵。 |
key-1 |
| Value |
string |
否 |
資源的標籤值。最多支援 20 個標籤值。一旦傳入該值,可以為空白字串。 最多支援 128 個字元,不能以 |
value-1 |
關於公用請求參數的詳情,請參見公用參數。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
無 |
||
| CompliancePackId |
string |
合規包 ID。 |
cp-a8a8626622af0082**** |
| RequestId |
string |
請求 ID。 |
6EC7AED1-172F-42AE-9C12-295BC2ADB751 |
樣本
正常返回樣本
JSON格式
{
"CompliancePackId": "cp-a8a8626622af0082****",
"RequestId": "6EC7AED1-172F-42AE-9C12-295BC2ADB751"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Invalid.CompliancePackId.Value | The specified CompliancePackId does not exist. | 合規包ID不存在。 |
| 400 | CompliancePackExceedMaxCount | The maximum number of compliance pack is exceeded. | |
| 400 | Invalid.ConfigRules.Empty | You must specify ConfigRules. | |
| 400 | Invalid.ConfigRules.Value | The specified ConfigRules is invalid. | 合規包規則中參數輸入錯誤。 |
| 400 | ConfigRuleExceedMaxRuleCount | The maximum number of config rules is exceeded. | |
| 400 | CompliancePackAlreadyPending | The compliance pack has a pending operation and cannot be updated. | 如果合規包狀態非“正常”,不能被更新。 |
| 400 | CompliancePackExists | The compliance pack already exists. | 合規包名稱重複。 |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 服務不可用。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。