Nom du modèle
Le modèle ACS-ECS-BulkyModifyInstanceNetworkChargeType modifie par lot la méthode de facturation réseau des instances ECS.
Description du modèle
Modifie simultanément la méthode de facturation réseau de plusieurs instances Elastic Compute Service (ECS).
Type de modèle
Automatisé
Propriétaire
Alibaba Cloud
Paramètres d'entrée
|**Paramètre**
|
**Description**
|
**Type**
|
**Obligatoire**
|
**Valeur par défaut**
|
**Limite**
| | --- | --- | --- | --- | --- | --- | |
targets
|
Instances ECS cibles.
|
Json
|
Oui
| | | |
networkChargeType
|
Méthode de facturation réseau des instances ECS.
|
String
|
Oui
| | | |
regionId
|
ID de la région.
|
String
|
Non
|
{{ ACS::RegionId }}
| | |
maxBandwidthIn
|
Bande passante entrante maximale.
|
String
|
Non
|
""
| | |
maxBandwidthOut
|
Bande passante sortante maximale.
|
String
|
Non
|
""
| | |
rateControl
|
Taux de concurrence pour l'exécution des tâches.
|
Json
|
Non
|
{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}
| | |
OOSAssumeRole
|
Rôle RAM endossé par OOS.
|
String
|
Non
|
""
| |
Paramètres de sortie
Aucun
Politique d'autorisation requise
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:ModifyInstanceNetworkSpec"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Détails
Détails du modèle ACS-ECS-BulkyModifyInstanceNetworkChargeType
Contenu du modèle
FormatVersion: OOS-2019-06-01
Description:
en: Bulk-modify the network billing method for ECS instances
name-en: ACS-ECS-BulkyModifyInstanceNetworkChargeType
categories:
- instance_manage
Parameters:
regionId:
Type: String
Label:
en: Region ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
targets:
Type: Json
Label:
en: Target Instances
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: regionId
maxBandwidthIn:
Label:
en: Maximum inbound public bandwidth
Type: String
Default: ""
maxBandwidthOut:
Label:
en: Maximum outbound public bandwidth
Type: String
Default: ""
networkChargeType:
Label:
en: Network billing method
Type: String
AllowedValues:
- PayByBandwidth
- PayByTraffic
rateControl:
Label:
en: Concurrency rate for task execution
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: The RAM role to be assumed by OOS
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
Description:
en: 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: modifyInstanceNetworkChargeType
Action: ACS::ExecuteAPI
Description:
en: Modifies the network billing method of the ECS instance.
Properties:
Service: ECS
API: ModifyInstanceNetworkSpec
Parameters:
RegionId: '{{ regionId }}'
InstanceId: '{{ ACS::TaskLoopItem }}'
NetworkChargeType: '{{ networkChargeType }}'
InternetMaxBandwidthIn:
'Fn::If':
- 'Fn::Equals':
- ""
- '{{ maxBandwidthIn }}'
- Null
- '{{ maxBandwidthIn }}'
InternetMaxBandwidthOut:
'Fn::If':
- 'Fn::Equals':
- ""
- '{{ maxBandwidthOut }}'
- Null
- '{{ maxBandwidthOut }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ getInstance.instanceIds }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- maxBandwidthIn
- maxBandwidthOut
- networkChargeType
Label:
default:
en: Configure Parameters
- Parameters:
- regionId
- targets
Label:
default:
en: Select ECS Instances
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
en: Advanced Options