All Products
Search
Document Center

CloudOps Orchestration Service:ListStateConfigurations

Last Updated:Aug 28, 2026

Queries desired-state configurations.

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

oos:ListStateConfigurations

get

*StateConfiguration

acs:oos:{#regionId}:{#accountId}:stateconfiguration/*

*StateConfiguration

acs:oos:{#regionId}:{#accountId}:stateconfiguration/{#StateConfigurationId}

  • oos:TLSVersion
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-hangzhou

TemplateName

string

No

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

ACS-ECS-InventoryDataCollection

TemplateVersion

string

No

The version number of the template. If you do not specify this parameter, the latest version of the template is used.

v1

StateConfigurationIds

string

No

The ID of the desired-state configuration.

["sc-asfgdhj12345"]

Tags

object

No

The tags to be added to the configuration.

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

MaxResults

integer

No

The maximum number of entries per page.

50

NextToken

string

No

A pagination token. It can be used in the next request to retrieve a new page of results.

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 information about the desired-state configurations.

array<object>

UpdateTime

string

The time when the configuration was updated.

2021-04-22T03:13:32Z

CreateTime

string

The time when the desired-state configuration was created.

2021-03-22T03:13:32Z

Targets

string

The queried resources.

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

Tags

object

The tags added to the configuration.

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

StateConfigurationId

string

The ID of the desired-state configuration.

sc-a538febe18fabcdef

ScheduleExpression

string

The schedule expression.

1 hour

TemplateName

string

The name of the template.

ACS-ECS-InventoryDataCollection

TemplateVersion

string

The version of the template.

v2

ConfigureMode

string

The configuration mode. Valid values:

ApplyAndAutoCorrect

ScheduleType

string

The schedule type.

rate

Parameters

string

The parameters.

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

Description

string

The description.

inventorydata collection

ResourceGroupId

string

The resource group ID.

rg-acfmxsn4m4******

TemplateId

string

The template ID.

t-ajshjalscfhjk2214

NextToken

string

The pagination token that was used in the next request to retrieve a new page of results.

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": " inventorydata 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.