模板名稱
ACS-Redis-ReleaseInstancePublicConnection 釋放Redis執行個體的外網地址
模板描述
釋放Redis執行個體的外網地址
模板類型
自動化
所有者
Alibaba Cloud
輸入參數
參數名稱 | 描述 | 類型 | 是否必填 | 預設值 | 約束 |
instanceId | Redis執行個體ID | String | 是 | ||
regionId | 地區ID | String | 否 | {{ ACS::RegionId }} | |
OOSAssumeRole | OOS扮演的RAM角色 | String | 否 | "" |
輸出參數
無
執行此模板需要的權限原則
{
"Version": "1",
"Statement": [
{
"Action": [
"kvstore:DescribeDBInstanceNetInfo",
"kvstore:ReleaseInstancePublicConnection"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳情
ACS-Redis-ReleaseInstancePublicConnection詳情
模板內容
FormatVersion: OOS-2019-06-01
Description:
en: Release the public address of Redis instance
zh-cn: 釋放Redis執行個體的外網地址
name-en: ACS-Redis-ReleaseInstancePublicConnection
name-zh-cn: 釋放Redis執行個體的外網地址
categories:
- security
Parameters:
regionId:
Label:
en: RegionId
zh-cn: 地區ID
Type: String
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
instanceId:
Label:
en: The id of Redis instances
zh-cn: Redis執行個體ID
Type: String
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: describeDBInstanceNetInfo
Action: 'ACS::ExecuteAPI'
Description:
en: Query the ip type and address of a Redis instance
zh-cn: 查詢Redis的串連地址和地址類型
Properties:
Service: R-KVSTORE
API: DescribeDBInstanceNetInfo
Parameters:
RegionId: '{{ regionId }}'
InstanceId: '{{ instanceId }}'
Outputs:
connectionString:
Type: String
ValueSelector: '.NetInfoItems.InstanceNetInfo[] | select(.IPType=="Public") | .ConnectionString'
- Name: checkPublicAddress
Action: 'ACS::Choice'
Description:
En: Whether to release instance public connection
Zh-cn: 是否釋放Redis執行個體的外網地址
Properties:
DefaultTask: releaseInstancePublicConnection
Choices:
- When:
'Fn::Equals':
- Null
- '{{ describeDBInstanceNetInfo.connectionString }}'
NextTask: 'ACS::END'
- Name: releaseInstancePublicConnection
Action: 'ACS::ExecuteAPI'
Description:
En: Release the public address of Redis instances
Zh-cn: 釋放Redis執行個體的外網地址
Properties:
Service: R-KVSTORE
API: ReleaseInstancePublicConnection
Parameters:
RegionId: '{{ regionId }}'
InstanceId: '{{ instanceId }}'
CurrentConnectionString: '{{ describeDBInstanceNetInfo.connectionString }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- regionId
- instanceId
Label:
default:
zh-cn: 選擇執行個體
en: Select Instances
- Parameters:
- OOSAssumeRole
Label:
default:
zh-cn: 進階選項
en: Control Options