All Products
Search
Document Center

Operation Orchestration Service:UpdateStateConfiguration

Last Updated:Nov 07, 2022

Updates a desired-state configuration.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the operation.
  • Condition keyword: refers to the condition keyword defined by the cloud product itself.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operateaccess levelResource typeconditional keywordAssociation operation
oos:UpdateStateConfigurationWRITE
  • OOS
    acs:oos:{#regionId}:{#accountId}:stateconfiguration/{#stateconfigurationId}
    without
without

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the region.

cn-hangzhou
DescriptionstringNo

The description.

ACS-ECS-InventoryDataCollection
ParametersobjectNo

The parameters.

ConfigureModestringNo

The configuration mode. ApplyOnce: The configuration is applied only once. After a configuration is updated, the new configuration is applied. ApplyAndMonitor: The configuration is applied only once. After the configuration is applied, the system only checks whether the configuration is migrated in the future. ApplyAndAutoCorrect: The configuration is always applied.

ApplyOnce
ScheduleTypestringNo

The schedule type.

rate
ScheduleExpressionstringNo

The schedule expression.

1 hour
TargetsstringNo

The required resources.

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

The idempotency token.

DASKJJLKADS-AHKLJHJSAKL-AJK
StateConfigurationIdstringYes

The ID of the desired-state configuration.

sc-asfgdhj12345
TagsobjectNo

The tag.

ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmxsn4m4******

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

1306108F-610C-40FD-AAD5-DA13E8B00BE9
StateConfigurationarray

The configuration list.

object
UpdateTimestring

The update time.

2021-03-22T03:13:32Z
CreateTimestring

The creation time.

2021-03-22T03:13:32Z
Targetsstring

The required resources.

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

The tag.

StateConfigurationIdstring

The ID of the desired-state configuration.

StateConfigurationId
ScheduleExpressionstring

The schedule expression.

1 hour
TemplateNamestring

The name of the template.

ACS-ECS-InventoryDataCollection
TemplateVersionstring

The version of the template.

v1
ConfigureModestring

The configuration mode.

ApplyAndAutoCorrect
ScheduleTypestring

The schedule type.

rate
Parametersstring

The parameters.

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

The description of the desired-state configuration.

collect inventory data
ResourceGroupIdstring

The ID of the resource group.

rg-acfmxsn4m4******
TemplateIdstring

The ID of the template.

t-1234asadf

Error codes

For a list of error codes, visit the API error center.