Queries desired-state configurations.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListStateConfigurations

The operation that you want to perform. Set the value to ListStateConfigurations.

RegionId String No cn-hangzhou

The ID of the region.

TemplateName String No ACS-ECS-InventoryDataCollection

The name of the template. The name must be 1 to 200 characters in length, and can contain letters, digits, hyphens (-), and underscores (_).

TemplateVersion String No v1

The version number. If you do not specify this parameter, the system uses the latest version.

StateConfigurationIds String No ["sc-asfgdhj12345"]

The ID of each desired-state configuration.

Tags Json No {"Key": "oos", "Value": "inventory"}

The tag.

MaxResults String No 50

The maximum number of entries to return on each page.


The token of the next page.

Response parameters

Parameter Type Example Description
RequestId String 1306108F-610C-40FD-AAD5-DA13E8B00BE9

The ID of the request.

StateConfigurations Array of StateConfiguration

The desired-state configurations.

ConfigureMode String ApplyAndAutoCorrect

The configuration mode.

CreateTime String 2021-03-22T03:13:32Z

The creation time.

Description String Collect data that is specified in the configuration list.

The description.

Parameters String {"policy": {"ACS:Network": {"Collection": "Enabled"}, "ACS:Application": {"Collection": "Enabled"}}}

The parameters.

ScheduleExpression String 1 hour

The schedule expression.

ScheduleType String rate

The schedule type.

StateConfigurationId String sc-a538febe18fabcdef

The ID of the desired-state configuration.

Tags Map {"Key": "oos", "Value": "inventory"}

The tag of the auxiliary media asset.

Targets String { "ResourceType": "ALIYUN::ECS::Instance", "Filters": [ { "Type": "All", "RegionId": "cn-hangzhou", "Parameters": { "RegionId": "cn-hangzhou", "Status": "Running" } } ] }

The target EMR resource.

TemplateId String t-ajshjalscfhjk2214

The ID of the cluster template.

TemplateName String ACS-ECS-InventoryDataCollection

The name of the template.

TemplateVersion String v2

The version of the template.

UpdateTime String 2021-04-22T03:13:32Z

The time when the configuration is updated.


Sample requests

&<Common request parameters>

Sample success responses

XML format

    <ScheduleExpression>1 hour</ScheduleExpression>
    <Parameters>{"policy": {"ACS:Network": {"Collection": "Enabled"}, "ACS:Application": {"Collection": "Enabled"}}}</Parameters>
    <Description>test sc</Description>
    <Targets>{ "ResourceType": "ALIYUN::ECS::Instance", "Filters": [ { "Type": "All", "RegionId": "cn-hangzhou", "Parameters": { "RegionId": "cn-hangzhou", "Status": "Running" } } ] }</Targets>
    <Tags>{"Key": "oos", "Value": "inventory"}</Tags>

JSON format

{"RequestId":"1306108F-610C-40FD-AAD5-DA13E8B00BE9","StateConfigurations":[{"ConfigureMode":"ApplyAndAutoCorrect","ScheduleExpression":"1 hour","ScheduleType":"rate","Parameters":"{\"policy\": {\"ACS:Network\": {\"Collection\": \"Enabled\"}, \"ACS:Application\": {\"Collection\": \"Enabled\"}}}","Description":"test sc","StateConfigurationId":"sc-a538febe18fabcdef","CreateTime":"2021-03-22T03:13:32Z","UpdateTime":"2021-04-22T03:13:32Z","TemplateVersion":"v2","TemplateName":"test_sc","Targets":"{ \"ResourceType\": \"ALIYUN::ECS::Instance\", \"Filters\": [ { \"Type\": \"All\", \"RegionId\": \"cn-hangzhou\", \"Parameters\": { \"RegionId\": \"cn-hangzhou\", \"Status\": \"Running\" } } ] }","Tags":"{\"Key\": \"oos\", \"Value\": \"inventory\"}","TemplateId":"t-ajshjalscfhjk2214"}]}

Error codes

For a list of error codes, visit the API Error Center.