Template name
ACS-ECS-BulkyAllocateAndAssociateEipAddress
Template description
Creates multiple elastic IP addresses (EIPs) at a time and associates the EIPs with multiple Elastic Compute Service (ECS) instances in the same region.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
Parameter | Description | Type | Required | Default value | Limit |
instanceIds | The IDs of the instances with which you want to associate the EIPs. | List | Yes | ||
regionId | The region ID. | String | No | {{ ACS::RegionId }} | |
instanceType | The type of the instance with which you want to associate the EIPs. | String | No | NetworkInterface | |
internetChargeType | The billing method of the EIPs. | String | No | PayByBandwidth | |
bandwidth | The maximum bandwidth of the EIPs. | Number | No | 5 | |
rateControl | zh-cn: the description in Chinese | Json | No | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 15} | |
OOSAssumeRole | The Resource Access Management (RAM) role that is assumed by CloudOps Orchestration Service (OOS). | String | No | "" |
Output parameters
None
Permission policy that is required to execute the template
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:AllocateEipAddress",
"ecs:DescribeEipAddresses",
"ecs:DescribeNetworkInterfaces"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"vpc:AssociateEipAddress"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
References
For more information, see ACS-ECS-BulkyAllocateAndAssociateEipAddress.yml at GitHub.
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Bulky add EIPs to common bandwidth package
zh-cn: the description in Chinese
name-en: ACS-ECS-BulkyAllocateAndAssociateEipAddress
name-zh-cn: the description in Chinese
categories:
- instance_manage
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: the description in Chinese
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
instanceIds:
Label:
en: InstanceIds
zh-cn: the description in Chinese
Description:
en: The ID list of the instance to be associated with the Elastic IP address
zh-cn: the description in Chinese
AssociationProperty: ALIYUN::ECS::Instance::InstanceId
AssociationPropertyMetadata:
RegionId: regionId
Type: List
instanceType:
Label:
en: InstanceType
zh-cn: the description in Chinese
Description:
en: The type of the cloud product instance to associate
zh-cn: the description in Chinese
Type: String
AllowedValues:
- Nat
- SlbInstance
- EcsInstance
- NetworkInterface
- HaVip
Default: NetworkInterface
internetChargeType:
Label:
en: InternetChargeType
zh-cn: the description in Chinese
Description:
en: EIP measurement method
zh-cn: the description in Chinese
Type: String
AllowedValues:
- PayByBandwidth
- PayByTraffic
Default: PayByBandwidth
bandwidth:
Label:
en: Bandwidth
zh-cn: the description in Chinese
Description:
en: 'Peak bandwidth of eip, unit: Mbps'
zh-cn: the description in Chinese
Type: Number
Default: 5
rateControl:
Label:
en: RateControl
zh-cn: the description in Chinese
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 15
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: the description in Chinese
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: associateEipAddressToENI
Action: ACS::ECS::AllocateAndAssociateEipAddress
Description:
en: Associate Eip address to instance
zh-cn: the description in Chinese
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: the description in Chinese
en: Configure Parameters
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
zh-cn: the description in Chinese
en: Control Options