全部產品
Search
文件中心

:ListConfigRules

更新時間:Jan 22, 2025

調用ListConfigRules介面查詢規則列表。

調試

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

請求參數

名稱 類型 是否必選 樣本值 描述
Action String ListConfigRules

要執行的操作,取值:ListConfigRules

ConfigRuleState String ACTIVE

規則的狀態。取值:

  • ACTIVE:應用中。
  • EVALUATING:評估中。
  • INACTIVE:已停用。
ComplianceType String COMPLIANT

規則的合規類型。取值:

  • COMPLIANT:合規。
  • NON_COMPLIANT:不合規。
  • NOT_APPLICABLE:不適用。
  • INSUFFICIENT_DATA:資料不充分。
RiskLevel Integer 1

規則的風險等級。取值:

  • 1:高風險。
  • 2:中風險。
  • 3:低風險。
PageNumber Integer 1

規則列表的頁碼。起始值:1。

PageSize Integer 20

分頁查詢時設定的每頁行數。取值範圍:1~100。

MultiAccount Boolean true

該參數計劃於2021年06月30日00時00分00秒前下線,其替代功能帳號組的API將於2021年05月30日00時00分00秒前上線。如果您正在使用該參數,建議您在2021年05月30日00時00分00秒之後切換為帳號組的API。關於帳號組,請參見帳號組

MemberId Long 123456789

該參數計劃於2021年06月30日00時00分00秒前下線,其替代功能帳號組的API將於2021年05月30日00時00分00秒前上線。如果您正在使用該參數,建議您在2021年05月30日00時00分00秒之後切換為帳號組的API。關於帳號組,請參見帳號組

ConfigRuleName String OSS合規管理最佳實務-OSS儲存空間ACL禁止公用讀取訪問

規則的名稱。

CompliancePackId String cp-8d5c6457e0d9002a****

規則所屬的合規包ID。

返回資料

名稱 類型 樣本值 描述
RequestId String 8195B664-9565-4685-89AC-8B5F04B44B92

請求ID。

ConfigRules Object

規則列表。

ConfigRuleList Array of ConfigRule

規則列表。

CompliancePackId String cp-8d5c6457e0d9002a****

規則所屬的合規包ID。

RiskLevel Integer 1

規則的風險等級。取值:

  • 1:高風險。
  • 2:中風險。
  • 3:低風險。
SourceOwner String ALIYUN

規則來源的歸屬。取值:

  • CUSTOM_FC:使用者自訂函數。
  • ALIYUN:託管規則。
AccountId Long 987654321

該規則歸屬的阿里雲帳號ID。

ConfigRuleState String ACTIVE

當前規則運行狀態。取值:

  • ACTIVE:應用中。
  • EVALUATING:評估中。
  • INACTIVE:已停用。
Compliance Object

規則合規情況統計。

ComplianceType String COMPLIANT

規則合規類型。取值:

  • COMPLIANT:合規。
  • NON_COMPLIANT:不合規。
  • NOT_APPLICABLE:不適用。
  • INSUFFICIENT_DATA:資料不充分。
Count Integer 161

該規則符合指定合規類型的資源數統計。

SourceIdentifier String oss-bucket-public-read-prohibited

規則標識。

  • 如果規則使用了託管規則,則該參數為託管規則名稱。
  • 如果規則使用了自訂函數,則該參數為函數ARN。
ConfigRuleArn String acs:config::120886317861****:rule/cr-8d5c6457e0d9002a****

規則ARN。

Description String OSS儲存空間的ACL策略禁止公用讀取訪問,視為“合規”。

規則的描述資訊。

CreateBy Object

規則的建立資訊。

CompliancePackId String cp-8d5c6457e0d9002a****

合規包ID。

CompliancePackName String OSS合規管理最佳實務

合規包名稱。

AutomationType String LC

修正模板類型。取值:LC。

說明 LC:邏輯編排(Logic Composer)。
ConfigRuleName String OSS合規管理最佳實務-OSS儲存空間ACL禁止公用讀取訪問

規則名稱。

ConfigRuleId String cr-8d5c6457e0d9002a****

規則ID。

Tags Array of tag

標籤。

Key String Key1

標籤值。

Value String Value1

標籤鍵。

PageNumber Integer 1

規則列表的頁碼。起始值:1。

PageSize Integer 20

分頁查詢時設定的每頁行數。取值範圍:1~100。

TotalCount Long 1

規則總數。

樣本

請求樣本

http(s)://[Endpoint]/?Action=ListConfigRules
&PageNumber=1
&PageSize=20
&<公用請求參數>

正常返回樣本

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<ListConfigRulesResponse>
	<RequestId>8195B664-9565-4685-89AC-8B5F04B44B92</RequestId>
	<ConfigRules>
		<TotalCount>1</TotalCount>
		<PageSize>20</PageSize>
		<PageNumber>1</PageNumber>
		<ConfigRuleList>
			<CompliancePackId>cp-8d5c6457e0d9002a****</CompliancePackId>
			<ConfigRuleId>cr-8d5c6457e0d9002a****</ConfigRuleId>
			<AccountId>987654321</AccountId>
			<Description>OSS儲存空間的ACL策略禁止公用讀取訪問,視為“合規”。</Description>
			<Compliance>
				<ComplianceType>COMPLIANT</ComplianceType>
				<Count>161</Count>
			</Compliance>
			<ConfigRuleArn>acs:config::120886317861****:rule/cr-8d5c6457e0d9002a****</ConfigRuleArn>
			<SourceOwner>ALIYUN</SourceOwner>
			<SourceIdentifier>oss-bucket-public-read-prohibited</SourceIdentifier>
			<CreateBy>
				<CompliancePackId>cp-8d5c6457e0d9002a628b</CompliancePackId>
				<CompliancePackName>OSS合規管理最佳實務</CompliancePackName>
				<CreatorId>1208863178612953</CreatorId>
			</CreateBy>
			<ConfigRuleName>OSS合規管理最佳實務-OSS儲存空間ACL禁止公用讀取訪問</ConfigRuleName>
			<RiskLevel>1</RiskLevel>
			<ConfigRuleState>ACTIVE</ConfigRuleState>
		</ConfigRuleList>
	</ConfigRules>
</ListConfigRulesResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "8195B664-9565-4685-89AC-8B5F04B44B92",
  "ConfigRules" : {
    "TotalCount" : 1,
    "PageSize" : 20,
    "PageNumber" : 1,
    "ConfigRuleList" : [ {
      "CompliancePackId" : "cp-8d5c6457e0d9002a****",
      "ConfigRuleId" : "cr-8d5c6457e0d9002a****",
      "AccountId" : "987654321",
      "Description" : "OSS儲存空間的ACL策略禁止公用讀取訪問,視為“合規”。",
      "Compliance" : {
        "ComplianceType" : "COMPLIANT",
        "Count" : 161
      },
      "ConfigRuleArn" : "acs:config::120886317861****:rule/cr-8d5c6457e0d9002a****",
      "SourceOwner" : "ALIYUN",
      "SourceIdentifier" : "oss-bucket-public-read-prohibited",
      "CreateBy" : {
        "CompliancePackId" : "cp-8d5c6457e0d9002a628b",
        "CompliancePackName" : "OSS合規管理最佳實務",
        "CreatorId" : "1208863178612953"
      },
      "ConfigRuleName" : "OSS合規管理最佳實務-OSS儲存空間ACL禁止公用讀取訪問",
      "RiskLevel" : 1,
      "ConfigRuleState" : "ACTIVE"
    } ]
  }
}

錯誤碼

HttpCode 錯誤碼 錯誤資訊 描述
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. 服務不可用。

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