调用DescribeConfigurationRecorder接口查询资源监控范围。
本文将提供一个示例,查询当前阿里云账号100931896542****中资源的监控范围。返回结果显示,资源监控类型为ACS::ECS::Instance和ACS::ECS::NetworkInterface,资源监控状态为REGISTERED(已注册)。
                  
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 | 
|---|---|---|---|---|
| Action | String | 是 | DescribeConfigurationRecorder | 要执行的操作,取值:DescribeConfigurationRecorder。 | 
关于公共请求参数的详情,请参见公共参数。
返回数据
| 名称 | 类型 | 示例值 | 描述 | 
|---|---|---|---|
| RequestId | String | A3601178-A6A2-4636-BE56-1116F73C0B0C | 请求ID。 | 
| ConfigurationRecorder | Object | 资源监控信息。 | |
| OrganizationEnableStatus | String | REGISTRABLE | 企业版配置审计升级状态。取值: 
 | 
| ConfigurationRecorderStatus | String | REGISTERED | 资源监控状态。取值: 
 | 
| OrganizationMasterId | Long | 120886317861**** | 企业管理账号ID。 说明 仅当企业管理账号调用该接口时,返回该参数。
                                  | 
| AccountId | Long | 100931896542**** | 当前阿里云账号ID。 | 
| ResourceTypes | Array of String | ["ACS::ECS::Instance","ACS::ECS::NetworkInterface"] | 资源类型列表。 | 
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeConfigurationRecorder
&<公共请求参数>正常返回示例
XML格式
                  
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeConfigurationRecorderResponse>
		<RequestId>A3601178-A6A2-4636-BE56-1116F73C0B0C</RequestId>
		<ConfigurationRecorder>
			<ResourceTypes>ACS::ECS::Instance</ResourceTypes>
			<ResourceTypes>ACS::ECS::NetworkInterface</ResourceTypes>
			<AccountId>100931896542****</AccountId>
			<ConfigurationRecorderStatus>REGISTERED</ConfigurationRecorderStatus>
		</ConfigurationRecorder>
</DescribeConfigurationRecorderResponse>JSON格式
                  
HTTP/1.1 200 OK
Content-Type:application/json
{
  "RequestId" : "A3601178-A6A2-4636-BE56-1116F73C0B0C",
  "ConfigurationRecorder" : {
    "ResourceTypes" : [ "ACS::ECS::Instance", "ACS::ECS::NetworkInterface" ],
    "AccountId" : "100931896542****",
    "ConfigurationRecorderStatus" : "REGISTERED"
  }
}错误码
| 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. | 服务不可用。 | 
访问错误中心查看更多错误码。