StartConfigurationRecorder

Updated at:

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 EnterpriseEdition parameter to true when 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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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:

  • true: performs a dry run. The system checks the request parameters and business logic without performing the actual operation. If the dry run succeeds, the DryRunOperation error code is returned. If the dry run fails, the corresponding error code is returned.

  • false: performs the request normally. This is the default value.

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.

  • If a request with the same client token and parameters has been successfully executed, the original business result is returned within the validity period of the idempotence record, and the request is not executed again.

  • If the parameters corresponding to the same client token are inconsistent, the IdempotentParameterMismatch error code is returned.

  • If the request is being executed, the IdempotentRequestInProgress error code is returned.

  • If the execution result cannot be determined temporarily, the IdempotentResultPending error code is returned. Verify the execution result before you change the client token and submit the request again.

  • If this parameter is not specified or contains only whitespace characters, idempotence processing is disabled.

123e4567-e89b-12d3-a456-426655440000

EnterpriseEdition

boolean

No

Specifies whether to upgrade Cloud Config to the Enterprise Edition. Valid values:

  • true

  • false: This is the default value.

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: not registered.

  • BUILDING: building.

  • REGISTERED: registered.

  • REBUILDING: rebuilding.

REGISTRABLE

OrganizationEnableStatus

string

The upgrade status of Cloud Config Enterprise Edition. Valid values:

  • REGISTRABLE: not upgraded.

  • BUILDING: upgrading.

  • REGISTERED: upgraded.

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 and ACS::ECS::NetworkInterface resource types.

["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.