All Products
Search
Document Center

CloudOps Orchestration Service:ACS-ECS-BulkyAllocateAndAssociateEipAddress

Last Updated:Jun 22, 2026

Template name

ACS-ECS-BulkyAllocateAndAssociateEipAddress: Batch allocates elastic IP addresses (EIPs) and associates them with cloud product instances in the same region.

Execute now

Description

Batch allocates elastic IP addresses (EIPs) and associates them with cloud product instances in the same region.

Template type

Automation

Owner

Alibaba Cloud

Input parameters

Parameter name

Description

Type

Required

Default value

Constraints

instanceIds

The IDs of the instances to associate with EIPs.

List

Yes

regionId

The region ID.

String

No

{{ ACS::RegionId }}

instanceType

The type of cloud product instance to associate with an EIP.

String

No

NetworkInterface

internetChargeType

The billing method of the EIP.

String

No

PayByBandwidth

bandwidth

The peak bandwidth of the EIP.

Number

No

5

rateControl

The concurrency settings for task execution.

Json

No

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

OOSAssumeRole

The RAM role that OOS assumes.

String

No

“”

Output parameters

None

Required access policy

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:AllocateEipAddress",
                "ecs:DescribeEipAddresses",
                "ecs:DescribeNetworkInterfaces"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "vpc:AssociateEipAddress"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Details

ACS-ECS-BulkyAllocateAndAssociateEipAddress details

Template content

FormatVersion: OOS-2019-06-01
Description:
  en: Creates and associates elastic IP addresses (EIPs) in batch with cloud product
    instances in the same region.
  zh-cn: Creates and associates elastic IP addresses (EIPs) in batch with cloud product
    instances in the same region.
  name-en: ACS-ECS-BulkyAllocateAndAssociateEipAddress
  name-zh-cn: Creates and associates elastic IP addresses (EIPs) in batch with cloud
    product instances in the same region.
  categories:
    - instance_manage
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
      zh-cn: Region ID
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  instanceIds:
    Label:
      en: InstanceIds
      zh-cn: Instance IDs
    Description:
      en: The list of instance IDs to associate with elastic IP addresses.
      zh-cn: The list of instance IDs to associate with elastic IP addresses.
    AssociationProperty: ALIYUN::ECS::Instance::InstanceId
    AssociationPropertyMetadata:
      RegionId: regionId
    Type: List
  instanceType:
    Label:
      en: InstanceType
      zh-cn: Instance type
    Description:
      en: The type of the cloud product instance to associate.
      zh-cn: The type of the cloud product instance to associate.
    Type: String
    AllowedValues:
      - Nat
      - SlbInstance
      - EcsInstance
      - NetworkInterface
      - HaVip
    Default: NetworkInterface
  internetChargeType:
    Label:
      en: InternetChargeType
      zh-cn: EIP billing method
    Description:
      en: 'The billing method for the EIP. Valid values: PayByBandwidth (pay-by-bandwidth)
        and PayByTraffic (pay-by-data-transfer).'
      zh-cn: 'The billing method for the EIP. Valid values: PayByBandwidth (pay-by-bandwidth)
        and PayByTraffic (pay-by-data-transfer).'
    Type: String
    AllowedValues:
      - PayByBandwidth
      - PayByTraffic
    Default: PayByBandwidth
  bandwidth:
    Label:
      en: Bandwidth
      zh-cn: EIP peak bandwidth
    Description:
      en: 'The peak bandwidth of the EIP, in Mbps.'
      zh-cn: 'The peak bandwidth of the EIP, in Mbps.'
    Type: Number
    Default: 5
  rateControl:
    Label:
      en: RateControl
      zh-cn: Task execution concurrency
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 15
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: RAM role for OOS
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: associateEipAddressToENI
    Action: ACS::ECS::AllocateAndAssociateEipAddress
    Description:
      en: Associates an EIP with an instance.
      zh-cn: Associates an elastic IP address (EIP) with a cloud product instance.
    Properties:
      regionId: '{{ regionId }}'
      instanceId: '{{ ACS::TaskLoopItem }}'
      instanceType: '{{ instanceType }}'
      internetChargeType: '{{ internetChargeType }}'
      bandwidth: '{{ bandwidth }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ instanceIds }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - instanceIds
          - instanceType
          - internetChargeType
          - bandwidth
        Label:
          default:
            zh-cn: Configuration Parameters
            en: Configuration Parameters
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Advanced Options
            en: Advanced Options