Queries desired state configurations.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oos:ListStateConfigurations |
get |
*StateConfiguration
*StateConfiguration
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-hangzhou |
| TemplateName |
string |
No |
The template name. The name can contain letters, digits, hyphens (-), and underscores (_), and can be up to 200 characters in length. |
ACS-ECS-InventoryDataCollection |
| TemplateVersion |
string |
No |
The version number. If you do not specify this parameter, the latest version is used by default. |
v1 |
| StateConfigurationIds |
string |
No |
The desired state configuration ID. |
["sc-asfgdhj12345"] |
| Tags |
object |
No |
The tags. |
{"Key": "oos", "Value": "inventory"} |
| MaxResults |
integer |
No |
The maximum number of results per page. |
50 |
| NextToken |
string |
No |
The token for the next page. |
AHJKH-AHKJHDJK-AKHDIOWJL |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-acfmxsn4m4****** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
1306108F-610C-40FD-AAD5-DA13E8B00BE9 |
| StateConfigurations |
array<object> |
The list of desired state configurations. |
|
|
array<object> |
|||
| UpdateTime |
string |
The time when the configuration was updated, in ISO 8601 format in the UTC time zone. |
2021-04-22T03:13:32Z |
| CreateTime |
string |
The time when the configuration was created, in ISO 8601 format in the UTC time zone. |
2021-03-22T03:13:32Z |
| Targets |
string |
The target resources. |
{ "ResourceType": "ALIYUN::ECS::Instance", "Filters": [ { "Type": "All", "RegionId": "cn-hangzhou", "Parameters": { "RegionId": "cn-hangzhou", "Status": "Running" } } ] } |
| Tags |
object |
The tags. |
{"Key": "oos", "Value": "inventory"} |
| StateConfigurationId |
string |
The desired state configuration ID. |
sc-a538febe18fabcdef |
| ScheduleExpression |
string |
The schedule expression. |
1 hour |
| TemplateName |
string |
The template name. |
ACS-ECS-InventoryDataCollection |
| TemplateVersion |
string |
The template version. |
v2 |
| ConfigureMode |
string |
The configuration mode. |
ApplyAndAutoCorrect |
| ScheduleType |
string |
The schedule type. |
rate |
| Parameters |
string |
The parameters. |
{"policy": {"ACS:Network": {"Collection": "Enabled"}, "ACS:Application": {"Collection": "Enabled"}}} |
| Description |
string |
The description. |
Inventory data collection |
| ResourceGroupId |
string |
The resource group ID. |
rg-acfmxsn4m4****** |
| TemplateId |
string |
The template ID. |
t-ajshjalscfhjk2214 |
| NextToken |
string |
The token for the next page. |
AAAAASO3cL82+b5iji7bfPNpMh8= |
Examples
Success response
JSON format
{
"RequestId": "1306108F-610C-40FD-AAD5-DA13E8B00BE9",
"StateConfigurations": [
{
"UpdateTime": "2021-04-22T03:13:32Z",
"CreateTime": "2021-03-22T03:13:32Z",
"Targets": "{ \"ResourceType\": \"ALIYUN::ECS::Instance\", \"Filters\": [ { \"Type\": \"All\", \"RegionId\": \"cn-hangzhou\", \"Parameters\": { \"RegionId\": \"cn-hangzhou\", \"Status\": \"Running\" } } ] }",
"Tags": {
"Key": "oos",
"Value": "inventory"
},
"StateConfigurationId": "sc-a538febe18fabcdef",
"ScheduleExpression": "1 hour",
"TemplateName": "ACS-ECS-InventoryDataCollection",
"TemplateVersion": "v2",
"ConfigureMode": "ApplyAndAutoCorrect",
"ScheduleType": "rate",
"Parameters": "{\"policy\": {\"ACS:Network\": {\"Collection\": \"Enabled\"}, \"ACS:Application\": {\"Collection\": \"Enabled\"}}}",
"Description": " Inventory data collection",
"ResourceGroupId": "rg-acfmxsn4m4******",
"TemplateId": "t-ajshjalscfhjk2214"
}
],
"NextToken": "AAAAASO3cL82+b5iji7bfPNpMh8="
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.