新增或修改监控中的资源类型。
说明
目前该API接口已标记为弃用,推荐使用替代API:Config(2020-09-07) - UpdateConfigurationRecorder。
接口说明
该接口仅对当前请求的阿里云账号有效。关于配置审计支持的资源类型,请参见支持配置审计的云服务。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
config:PutConfigurationRecorder |
update |
*全部资源
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
ResourceTypes |
string |
是 |
资源类型。多个资源类型之间用半角逗号(,)分隔。 |
ACS::ECS::Instance,ACS::ECS::Disk |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
无。 |
||
ConfigurationRecorder |
object |
资源监控信息。 |
|
AccountId |
integer |
当前阿里云账号 ID。 |
123456789 |
ConfigurationRecorderStatus |
string |
资源监控状态。取值:
|
REGISTERED |
ResourceTypes |
array |
资源类型列表。 |
|
string |
资源类型列表。 |
["ACS::ECS::Instance","ACS::ECS::NetworkInterface"] |
|
RequestId |
string |
请求 ID。 |
7C189ED2-30C1-492E-82B6-0D828B556ED9 |
示例
正常返回示例
JSON
格式
{
"ConfigurationRecorder": {
"AccountId": 123456789,
"ConfigurationRecorderStatus": "REGISTERED",
"ResourceTypes": [
"[\"ACS::ECS::Instance\",\"ACS::ECS::NetworkInterface\"]"
]
},
"RequestId": "7C189ED2-30C1-492E-82B6-0D828B556ED9"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | NoPermission | You are not authorized to perform this operation. | 您无权执行此操作。 |
400 | Invalid.ResourceTypes.Value | The specified resourceTypes is invalid. | 输入的资源类型为非法值。 |
400 | ProcessIsRunning | The process is running. | 进程还在执行中。 |
400 | RDMemberNoPermission | You are not authorized to perform the operation. The reasons include: 1. You have not enabled the resource directory service. 2. You are not using the administrator account of resource directory. | 您无权进行此操作,原因可能是: 1、您未启用资源目录服务。 2、您使用的不是资源目录的企业管理账号。 |
404 | AccountNotExisted | Your account does not exist. | |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 服务不可用。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?