すべてのプロダクト
Search
ドキュメントセンター

CloudOps Orchestration Service:ACS-Redis-ReleaseInstancePublicConnection

最終更新日:Dec 21, 2025

テンプレート名

ACS-Redis-ReleaseInstancePublicConnection - Redis インスタンスのパブリックエンドポイントをリリースします。

今すぐ実行

テンプレートの説明

ApsaraDB for Redis インスタンスのパブリックエンドポイントを解放します。

テンプレートの種類

自動化

所有者

Alibaba Cloud

入力パラメーター

パラメーター

説明

データ型

必須

デフォルト値

制限

instanceId

ApsaraDB for Redis インスタンスの ID。

String

はい

regionId

リージョン ID。

String

いいえ

{{ ACS::RegionId }}

OOSAssumeRole

CloudOps Orchestration Service (OOS) がアシュームする RAM ロール。

String

いいえ

""

出力パラメーター

該当なし。

テンプレートを実行するために必要な権限ポリシー

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "kvstore:DescribeDBInstanceNetInfo",
                "kvstore:ReleaseInstancePublicConnection"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

詳細

ACS-Redis-ReleaseInstancePublicConnection

テンプレートの内容

FormatVersion: OOS-2019-06-01
Description:
  en: Releases the public endpoint of a Redis instance.
  name-en: ACS-Redis-ReleaseInstancePublicConnection
  categories:
    - security
    - tair
Parameters:
  regionId:
    Label:
      en: Region ID
    Type: String
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  instanceId:
    Label:
      en: The ID of the Redis instance
    Type: String
  OOSAssumeRole:
    Label:
      en: The RAM role to be assumed by OOS
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: describeDBInstanceNetInfo
    Action: 'ACS::ExecuteAPI'
    Description:
      en: Queries the IP address type and endpoint of the Redis instance.
    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: Checks whether to release the public endpoint of the instance.
    Properties:
      DefaultTask: releaseInstancePublicConnection
      Choices:
        - When:
            'Fn::Equals':
              - Null
              - '{{ describeDBInstanceNetInfo.connectionString }}'
          NextTask: 'ACS::END'
  - Name: releaseInstancePublicConnection
    Action: 'ACS::ExecuteAPI'
    Description:
      en: Releases the public endpoint of the Redis instance.
    Properties:
      Service: R-KVSTORE
      API: ReleaseInstancePublicConnection
      Parameters:
        RegionId: '{{ regionId }}'
        InstanceId: '{{ instanceId }}'
        CurrentConnectionString: '{{ describeDBInstanceNetInfo.connectionString }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - regionId
          - instanceId
        Label:
          default:
            en: Select an instance
      - Parameters:
          - OOSAssumeRole
        Label:
          default:
            en: Advanced options