All Products
Search
Document Center

CloudOps Orchestration Service:ACS-ECS-BulkyModifyInstanceAttributes

Last Updated:Jun 22, 2026

Template name

ACS-ECS-BulkyModifyInstanceAttributes: Batch modifies the attributes of multiple ECS instances.

Execute now

Template description

Batch modifies the attributes of multiple ECS instances.

Template type

Automation

Owner

Alibaba Cloud

Input parameters

Parameter name

Description

Type

Required

Default value

Constraints

instanceAttributes

The attributes of the ECS instances to modify.

Json

Yes

rateControl

The concurrency rate for task execution.

Json

No

{‘Mode’: ‘Concurrency’, ‘MaxErrors’: 0, ‘Concurrency’: 10}

OOSAssumeRole

The RAM role that OOS assumes.

String

No

“”

Output parameters

None

Required access policy for this template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:ModifyInstanceAttribute"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Details

For more information, see ACS-ECS-BulkyModifyInstanceAttributes details.

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: Modifies attributes of multiple ECS instances in a batch.
  zh-cn: Modifies attributes of multiple ECS instances in a batch.
  name-en: ACS-ECS-BulkyModifyInstanceAttributes
  name-zh-cn: Modifies attributes of multiple instances in a batch.
  categories:
      - instance_manage
Parameters:
  instanceAttributes:
    Description:
      en: 'Format: [{"regionId": "cn-xxx", "instanceId": "i-xxx", "hostName": "", "instanceName": "", "description": "", securityGroups: ["sg-xxx"]}]'
      zh-cn: 'Format: [{"regionId": "cn-xxx", "instanceId": "i-xxx", "hostName": "", "instanceName": "", "description": "", securityGroups: ["sg-xxx"]}]'
    Label:
      en: InstanceAttributes
      zh-cn: A list of attributes for the ECS instances.
    Type: Json
  rateControl:
    Label:
      en: RateControl
      zh-cn: The concurrency rate for task execution.
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: The RAM role that OOS assumes.
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: modifyInstanceAttribute
  Action: ACS::ECS::ModifyInstanceAttribute
  Description:
    en: Modifies the attributes of the ECS instance.
    zh-cn: Modifies the attributes of the instance.
  Properties:
    instanceAttributes: '{{ instanceAttributes }}'
    instanceId: '{{ ACS::TaskLoopItem }}'
  Loop:
    RateControl: '{{ rateControl }}'
    Items:
      'Fn::Jq':
        - All
        - '.[].instanceId'
        - '{{ instanceAttributes }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - instanceAttributes
        Label:
          default:
            zh-cn: Instance Attributes
            en: Instance Attributes
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Control Options
            en: Control Options