All Products
Search
Document Center

CloudOps Orchestration Service:ACS-ECS-BulkyConfigureOOSPackage

Last Updated:Dec 22, 2025

Template name

ACS-ECS-BulkyConfigureOOSPackage installs OOS custom packages in batches

Execute Now

Template description

Installs a custom CloudOps Orchestration Service (OOS) software package on multiple Elastic Compute Service (ECS) instances at a time.

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Type

Required

Default value

Limit

packageName

The name of the software package to be installed.

String

Yes

targets

Target instance

Json

Yes

regionId

The region ID.

String

No

{{ ACS::RegionId }}

action

The operation to be performed on the software package.

String

No

install

packageVersion

The version of the software package to be configured.

String

No

""

rateControl

Task execution concurrency

Json

No

{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}

OOSAssumeRole

The Resource Access Management (RAM) role that is assumed by CloudOps Orchestration Service (OOS).

String

No

""

Output parameters

Parameter

Description

Type

commandOutput

List

Permission policy that is required to execute the template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:DescribeInstances",
                "ecs:DescribeInvocationResults",
                "ecs:DescribeInvocations",
                "ecs:RunCommand"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "oos:GetApplicationGroup"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Details

Details of ACS-ECS-BulkyConfigureOOSPackage

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: Use this template to install sls agent on ecs
  zh-cn: Use this template to install custom OOS packages on ECS instances in batches.
  name-en: ACS-ECS-BulkyConfigureOOSPackage
  name-zh-cn: Install Custom OOS Packages in Batches
  categories:
    - run_command
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
      zh-cn: Region ID
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  action:
    Label:
      en: Action
      zh-cn: Action
    Type: String
    AllowedValues:
      - install
      - uninstall
    Default: install
    AssociationPropertyMetadata:
      LocaleKey: SoftwareOperationType
  packageName:
    Label:
      en: packageName
      zh-cn: Package Name
    Type: String
    AssociationProperty: 'ALIYUN::OOS::Package::PackageName'
    AssociationPropertyMetadata:
      RegionId: regionId
  packageVersion:
    Label:
      en: packageVersion
      zh-cn: Package Version
    Type: String
    AssociationProperty: 'ALIYUN::OOS::Package::PackageVersion'
    AssociationPropertyMetadata:
      TemplateName: ${packageName}
    Default: ''
  targets:
    Type: Json
    Label:
      en: TargetInstance
      zh-cn: Target Instance
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: regionId
  rateControl:
    Label:
      en: RateControl
      zh-cn: Rate Control
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: The RAM role for OOS to assume
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: getInstance
    Description:
      en: Views the ECS instances
      zh-cn: Retrieves the specified ECS instances.
    Action: 'ACS::SelectTargets'
    Properties:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: '{{ regionId }}'
      Filters:
        - '{{ targets }}'
    Outputs:
      instanceIds:
        Type: List
        ValueSelector: 'Instances.Instance[].InstanceId'
  - Name: configurePackage
    Description:
      en: Configure Package
      zh-cn: Configures the package.
    Action: 'ACS::ECS::ConfigureOOSPackage'
    Properties:
      regionId: '{{ regionId }}'
      instanceId: '{{ ACS::TaskLoopItem }}'
      action: '{{ action }}'
      packageName: '{{ packageName }}'
      packageVersion: '{{ packageVersion }}'
    Loop:
      Items: '{{ getInstance.instanceIds }}'
      RateControl: '{{ rateControl }}'
      Outputs:
        commandOutputs:
          AggregateType: 'Fn::ListJoin'
          AggregateField: commandOutput
    Outputs:
      commandOutput:
        Type: String
        ValueSelector: '.|{"InstanceId": "{{ ACS::TaskLoopItem }}", "ConfigureResult": .commandOutput}'
Outputs:
  commandOutput:
    Type: List
    Value: '{{ configurePackage.commandOutputs }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - packageName
          - action
          - packageVersion
        Label:
          default:
            zh-cn: Configuration Parameters
            en: Configure Parameters
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            zh-cn: Select Instances
            en: Select Instances
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Advanced Options
            en: Control Options