Nom du modèle
ACS-ESS-ECILifeCycleModifyAnalyticDBIPWhitelist : configure la liste d'autorisation des adresses IP d'une instance AnalyticDB pour Elastic Container Instance (ECI) à l'aide d'un hook de cycle de vie.
Description du modèle
Ajoute ou supprime les adresses IP des instances de conteneur élastiques dans la liste d'autorisation des adresses IP d'un cluster AnalyticDB for MySQL à l'aide d'un hook de cycle de vie.
Type de modèle
Automatisé
Propriétaire
Alibaba Cloud
Paramètres d'entrée
|
Paramètre |
Description |
Type |
Obligatoire |
Valeur par défaut |
Limite |
|
dbClusterId |
ID du cluster AnalyticDB for MySQL. |
String |
Oui |
||
|
modifyMode |
Méthode de modification de la liste d'autorisation des adresses IP. |
String |
Oui |
||
|
regionId |
ID de la région. |
String |
Non |
${regionId} |
|
|
instanceIds |
Identifiants des instances ECI. |
List |
Non |
['${instanceIds}'] |
|
|
lifecycleHookId |
ID du hook de cycle de vie. |
String |
Non |
${lifecycleHookId} |
|
|
lifecycleActionToken |
Jeton associé à une activité de mise à l'échelle spécifique liée aux instances. |
String |
Non |
${lifecycleActionToken} |
|
|
OOSAssumeRole |
Rôle RAM endossé par le service CloudOps Orchestration Service (OOS). |
String |
Non |
OOSServiceRole |
Paramètres de sortie
|
Paramètre |
Description |
Type |
|
ipAddresses |
List |
Politique requise pour exécuter le modèle
{
"Version": "1",
"Statement": [
{
"Action": [
"eci:DescribeContainerGroups"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"adb:ModifyDBClusterAccessWhiteList"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"ess:CompleteLifecycleAction"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Détails
ACS-ESS-ECILifeCycleModifyAnalyticDBIPWhitelist
Contenu du modèle
FormatVersion: OOS-2019-06-01
Description:
en: Uses a lifecycle hook to modify the IP whitelist of an AnalyticDB instance.
zh-cn: Uses a lifecycle hook to set the IP whitelist for an AnalyticDB instance.
name-en: ACS-ESS-ECILifeCycleModifyAnalyticDBIPWhitelist
name-zh-cn: Uses a lifecycle hook to set the IP whitelist for an AnalyticDB instance.
categories:
- elastic_manage
Parameters:
dbClusterId:
Label:
en: DBClusterId
zh-cn: AnalyticDB cluster ID
Type: String
modifyMode:
Label:
en: ModifyMode
zh-cn: Modification mode
Description:
en: The method used to modify the IP address whitelist. Use Append for scale-out activities and Delete for scale-in activities.
zh-cn: The method used to modify the IP address whitelist. Use Append for scale-out activities and Delete for scale-in activities.
Type: String
AllowedValues:
- Append
- Delete
regionId:
Label:
en: RegionId
zh-cn: Region ID
Description:
en: The ID of the region. Use the default value ${regionId} provided by Auto Scaling.
zh-cn: The ID of the region. Use the default value ${regionId} provided by Auto Scaling.
Type: String
Default: '${regionId}'
instanceIds:
Label:
en: InstanceIds
zh-cn: ECI instance ID list
Description:
en: The list of ECI instance IDs. Use the default value ["${instanceIds}"] provided by Auto Scaling.
zh-cn: The list of ECI instance IDs. Use the default value ["${instanceIds}"] provided by Auto Scaling.
Type: List
Default:
- '${instanceIds}'
lifecycleHookId:
Label:
en: LifecycleHookId
zh-cn: Lifecycle hook ID
Description:
en: The ID of the lifecycle hook. Use the default value ${lifecycleHookId} provided by Auto Scaling.
zh-cn: The ID of the lifecycle hook. Use the default value ${lifecycleHookId} provided by Auto Scaling.
Type: String
Default: '${lifecycleHookId}'
lifecycleActionToken:
Label:
en: LifecycleActionToken
zh-cn: Token for the specific scaling activity
Description:
en: The token for the specific scaling activity that is associated with an instance. Use the default value ${lifecycleActionToken} provided by Auto Scaling.
zh-cn: The token for the specific scaling activity that is associated with an instance. Use the default value ${lifecycleActionToken} provided by Auto Scaling.
Type: String
Default: '${lifecycleActionToken}'
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: RAM role assumed by OOS
Type: String
Default: OOSServiceRole
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstanceIpAddress
Action: 'ACS::ExecuteAPI'
Description:
en: Gets the IP addresses of the ECI instances.
zh-cn: Gets the IP addresses of the ECI instances.
OnError: CompleteLifecycleActionForAbandon
Properties:
Service: ECI
API: DescribeContainerGroups
Parameters:
RegionId: '{{ regionId }}'
ContainerGroupIds: '{{ instanceIds }}'
Outputs:
Ips:
Type: List
ValueSelector: '.ContainerGroups[].IntranetIp'
- Name: modifySecurityIps
Action: 'ACS::ExecuteAPI'
Description:
en: Modifies the whitelist.
zh-cn: Modifies the whitelist.
OnError: CompleteLifecycleActionForAbandon
OnSuccess: CompleteLifecycleActionForContinue
Properties:
Service: ADB
API: ModifyDBClusterAccessWhiteList
Parameters:
RegionId: '{{ regionId }}'
ModifyMode: '{{ modifyMode }}'
DBClusterId: '{{ dbClusterId }}'
SecurityIps:
'Fn::Join':
- ','
- '{{ getInstanceIpAddress.Ips }}'
- Name: CompleteLifecycleActionForContinue
Action: 'ACS::ExecuteAPI'
Description:
en: Changes the state of the scaling activity to Continue.
zh-cn: Changes the state of the scaling activity to Continue.
OnSuccess: 'ACS::END'
Properties:
Service: ESS
API: CompleteLifecycleAction
Parameters:
RegionId: '{{ regionId }}'
LifecycleHookId: '{{ lifecycleHookId }}'
LifecycleActionToken: '{{ lifecycleActionToken }}'
LifecycleActionResult: CONTINUE
- Name: CompleteLifecycleActionForAbandon
Action: 'ACS::ExecuteAPI'
Description:
en: Changes the state of the scaling activity to Abandon.
zh-cn: Changes the state of the scaling activity to Abandon.
Properties:
Service: ESS
API: CompleteLifecycleAction
Parameters:
RegionId: '{{ regionId }}'
LifecycleHookId: '{{ lifecycleHookId }}'
LifecycleActionToken: '{{ lifecycleActionToken }}'
LifecycleActionResult: ABANDON
Outputs:
ipAddresses:
Type: List
Value: '{{ getInstanceIpAddress.Ips }}'