All Products
Search
Document Center

CloudOps Orchestration Service:ACS-ECS-BulkyConfigureOOSPackageWithTemporaryURL

Last Updated:Dec 23, 2025

Template name

ACS-ECS-BulkyConfigureOOSPackageWithTemporaryURL: Install or uninstall programs

Execute Now

Template description

Installing and uninstalling extension programs

Template type

Automated

Owner

Alibaba Cloud

Input parameters

Parameter

Description

Type

Required

Default value

Limit

packageName

The name of the extension to be installed.

String

Yes

regionId

The region ID.

String

No

{{ ACS::RegionId }}

action

Run the action.

String

No

install

packageVersion

The version of the extension.

String

No

""

targets

Target instance

Json

No

{'Type': 'ResourceIds', 'ResourceIds': [], 'RegionId': '{{ regionId }}'}

orderId

The order ID.

String

No

""

rateControl

Task execution concurrency

Json

No

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

parameters

The parameters in the command.

Json

No

{}

OOSAssumeRole

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

String

No

""

Output parameters

Parameter

Description

Type

commandOutput

List

configurationOutput

List

Permission policy that is required to execute the template

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "bss:DescribeOrderDetail"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "ecs:DescribeCloudAssistantStatus",
                "ecs:DescribeInstances",
                "ecs:DescribeInvocationResults",
                "ecs:DescribeInvocations",
                "ecs:RunCommand"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "oos:GetApplicationGroup",
                "oos:GetTemplate",
                "oos:ListInstancePackageStates",
                "oos:UpdateInstancePackageState"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "oss:GetObject"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Details

Details of ACS-ECS-BulkyConfigureOOSPackageWithTemporaryURL

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: Installs or uninstalls OOS packages on ECS instances.
  zh-cn: Installs or uninstalls extensions.
  name-en: ACS-ECS-BulkyConfigureOOSPackageWithTemporaryURL
  name-zh-cn: Install/Uninstall Extensions
  categories:
    - run_command
    - application_manage
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
      - update
    Default: install
    AssociationPropertyMetadata:
      LocaleKey: SoftwareOperationType
  packageName:
    Label:
      en: Package Name
      zh-cn: Extension to install
    Type: String
    AssociationProperty: 'ALIYUN::OOS::Package::PackageName'
    AssociationPropertyMetadata:
      RegionId: regionId
      Target: ${targets}
  packageVersion:
    Label:
      en: Package Version
      zh-cn: Extension version
    Type: String
    AssociationProperty: 'ALIYUN::OOS::Package::PackageVersion'
    AssociationPropertyMetadata:
      TemplateName: ${packageName}
      PublicDisabled: true
      DoRequestAtFirst: true
    Default: ''
  targets:
    Type: Json
    Label:
      en: TargetInstance
      zh-cn: Target instance
    Default:
      Type: ResourceIds
      ResourceIds: []
      RegionId: '{{ regionId }}'
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: regionId
      Status: Running
  orderId:
    Label:
      en: OrderId
      zh-cn: Order ID
    Description:
      en: The ID of Order
      zh-cn: The ID of the order.
    Type: String
    Default: ''
  rateControl:
    Label:
      en: RateControl
      zh-cn: Task execution concurrency rate
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  parameters:
    Label:
      en: Parameters
      zh-cn: Parameters in the command
    Type: Json
    Default: {}
    AssociationProperty: TemplateParameter
    AssociationPropertyMetadata:
      TemplateName: packageName
      TemplateVersion: packageVersion
      TemplateType: Package
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: RAM role for OOS to assume
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: getInstanceFromOrderId
    Action: ACS::WaitFor
    When:
      Fn::Not:
        'Fn::Equals':
          - '{{ orderId }}'
          - ''
    Description:
      en: Views the ECS instances
      zh-cn: Gets ECS instances by order ID.
    Properties:
      Service: BssOpenApi
      API: GetOrderDetail
      Parameters:
        RegionId: '{{ regionId }}'
        OrderId: '{{ orderId }}'
      DesiredValues:
        - Paid
      StopRetryValues:
        - Cancelled
      PropertySelector: Data.OrderList.Order[].PaymentStatus
    Outputs:
      instanceIds:
        Type: List
        ValueSelector: Data.OrderList.Order[].InstanceIDs | fromjson | .[]
  - Name: getInstanceFromTargets
    When:
      'Fn::Equals':
        - '{{ orderId }}'
        - ''
    Description:
      en: Views the ECS instances
      zh-cn: Gets 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 software package.
    Action: ACS::ECS::ConfigureOOSPackageWithTemporaryURLFullActions
    Properties:
      regionId: '{{ regionId }}'
      instanceId: '{{ ACS::TaskLoopItem }}'
      action: '{{ action }}'
      packageName: '{{ packageName }}'
      packageVersion: '{{ packageVersion }}'
      parameters: '{{ parameters }}'
    Loop:
      Items:
        Fn::If:
          - 'Fn::Equals':
              - '{{ orderId }}'
              - ''
          - '{{ getInstanceFromTargets.instanceIds }}'
          - '{{ getInstanceFromOrderId.instanceIds }}'
      RateControl: '{{ rateControl }}'
      Outputs:
        commandOutputs:
          AggregateType: 'Fn::ListJoin'
          AggregateField: commandOutput
        configurationOutputs:
          AggregateType: 'Fn::ListJoin'
          AggregateField: configurationOutput
    Outputs:
      commandOutput:
        Type: Json
        ValueSelector: '.|{"InstanceId": "{{ ACS::TaskLoopItem }}", "InstanceResult": [{"Package": "{{packageName}}", "PackageResult": .commandOutput}]}'
      configurationOutput:
        Type: Json
        ValueSelector: '.|{"InstanceId": "{{ ACS::TaskLoopItem }}", "InstanceResult": [{"Package": "{{packageName}}", "PackageResult": .configurationOutput}]}'
Outputs:
  commandOutput:
    Type: List
    Value: '{{ configurePackage.commandOutputs }}'
  configurationOutput:
    Type: List
    Value: '{{ configurePackage.configurationOutputs }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - packageName
          - action
          - packageVersion
          - parameters
        Label:
          default:
            zh-cn: Configure Parameters
            en: Configure Parameters
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            zh-cn: Select Instances
            en: Select Instances
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Control Options
            en: Control Options