StartConfigurationRecorder
Sets the resource monitoring scope for the current account.
Operation description
The differences between calling this operation with a regular account and a management account of a resource directory are as follows:
If you use a regular account, you can call this operation to enable Cloud Config for the current account. You can view the resources of the current account and manage the compliance rules for the current account.
If you use a management account of a resource directory and set the
EnterpriseEditionparameter totruewhen you call this operation, you can enable Cloud Config for all member accounts. By default, a global account group that contains all member accounts is created. You can view the resources of all member accounts in the account group and manage the compliance rules for all member accounts.
This topic provides an example of enabling Cloud Config and monitoring the resources of the current account by using a regular account.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:StartConfigurationRecorder |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DryRun |
boolean |
No |
Specifies whether to perform only a dry run on the request. Valid values:
|
false |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request and prevent duplicate execution. You can generate the client token. The token can be up to 64 ASCII characters in length and is case-sensitive. You must use different client tokens for different business requests.
|
123e4567-e89b-12d3-a456-426655440000 |
| EnterpriseEdition |
boolean |
No |
Specifies whether to upgrade Cloud Config to the Enterprise Edition. Valid values:
Note
Cloud Config Enterprise Edition is upgraded to account groups. For more information, see Announcement: Cloud Config Enterprise Edition is upgraded to account groups. |
false |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| ConfigurationRecorder |
object |
The resource monitoring information. |
|
| AccountId |
integer |
The Alibaba Cloud account ID. Note
This parameter is returned only when a regular account calls this operation. |
120886317861**** |
| ConfigurationRecorderStatus |
string |
The resource monitoring status. Valid values:
|
REGISTRABLE |
| OrganizationEnableStatus |
string |
The upgrade status of Cloud Config Enterprise Edition. Valid values:
|
REGISTRABLE |
| OrganizationMasterId |
integer |
The ID of the management account. Note
This parameter is returned only when a management account calls this operation. |
100931896542**** |
| ResourceTypes |
array |
The list of resource types. |
|
|
string |
The list of resource types. Note
By default, Cloud Config returns all resource types. The returned example shows only the |
["ACS::ECS::Instance","ACS::ECS::NetworkInterface"] |
|
| RequestId |
string |
The request ID. |
A3601178-A6A2-4636-BE56-1116F73C0B0C |
Examples
Success response
JSON format
{
"ConfigurationRecorder": {
"AccountId": 0,
"ConfigurationRecorderStatus": "REGISTRABLE",
"OrganizationEnableStatus": "REGISTRABLE",
"OrganizationMasterId": 0,
"ResourceTypes": [
"[\"ACS::ECS::Instance\",\"ACS::ECS::NetworkInterface\"]"
]
},
"RequestId": "A3601178-A6A2-4636-BE56-1116F73C0B0C"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | You are not authorized to perform this operation. |
| 400 | ProcessIsRunning | The process is running. | 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. | 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. |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | |
| 400 | IdempotentParameterMismatch | The request parameters differ from the previous request with the same ClientToken. | |
| 500 | CreateSLRFail | Failed to create SLR. | Failed to create SLR. |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request has failed due to a temporary failure of the server. |
| 503 | IdempotentResultPending | The previous request outcome is unknown. Contact support before submitting another request. | |
| 409 | IdempotentRequestInProgress | The request with the same ClientToken is still being processed. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.