全部產品
Search
文件中心

CloudOps Orchestration Service:ACS-ApiGateway-BulkyModifyApiGroupNetworkPolicy

更新時間:Sep 06, 2024

模板名稱

ACS-ApiGateway-BulkyModifyApiGroupNetworkPolicy 修改API Gatewayhttps版本支援tls1.2版本

立即執行

模板描述

修改API Gatewayhttps版本支援tls1.2版本

模板類型

自動化

所有者

Alibaba Cloud

輸入參數

參數名稱

描述

類型

是否必填

預設值

約束

groupId

API Gateway執行個體分組ID

String

httpsPolicy

HTTPS安全性原則

String

regionId

地區ID

String

{{ ACS::RegionId }}

rateControl

任務執行的並發比率

Json

{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}

OOSAssumeRole

OOS扮演的RAM角色

String

""

輸出參數

執行此模板需要的權限原則

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "cloudapi:DescribeApiGroups",
                "cloudapi:ModifyApiGroupNetworkPolicy",
                "cloudapi:ModifyInstanceAttribute"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

詳情

ACS-ApiGateway-BulkyModifyApiGroupNetworkPolicy詳情

模板內容

FormatVersion: OOS-2019-06-01
Description:
  en: Modify the https version of apigateway instance to support tls1.2
  zh-cn: 修改API Gatewayhttps版本支援tls1.2版本
  name-en: ACS-ApiGateway-BulkyModifyApiGroupNetworkPolicy
  name-zh-cn: 修改API Gatewayhttps版本支援tls1.2版本
  categories:
    - security
Parameters:
  regionId:
    Label:
      en: RegionId
      zh-cn: 地區ID
    Type: String
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  groupId:
    Label:
      en: GroupId
      zh-cn: API Gateway執行個體分組ID
    Type: String
  httpsPolicy:
    Label:
      en: HttpsPolicy
      zh-cn: HTTPS安全性原則
    Type: String
    AllowedValues:
      - HTTPS1_1_TLS1_0
      - HTTPS2_TLS1_0
      - HTTPS2_TLS1_2
  rateControl:
    Label:
      en: RateControl
      zh-cn: 任務執行的並發比率
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: OOS扮演的RAM角色
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: describeApiGroups
    Action: ACS::ExecuteAPI
    Description:
      en: Query the detailed instance type of apigateway
      zh-cn: 查詢API Gateway執行個體類型
    Properties:
      Service: CLOUDAPI
      API: DescribeApiGroups
      Parameters:
        RegionId: '{{ regionId }}'
        GroupId: '{{ groupId }}'
    Outputs:
      instanceType:
        Type: String
        ValueSelector: .ApiGroupAttributes.ApiGroupAttribute[].InstanceType
      instanceId:
        Type: String
        ValueSelector: .ApiGroupAttributes.ApiGroupAttribute[].InstanceId
  - Name: checkInstanceType
    Action: ACS::Choice
    Description:
      en: Identify the detailed instance type of apigateway
      zh-cn: 判斷API Gateway執行個體類型
    Properties:
      DefaultTask: ACS::END
      Choices:
        - When:
            Fn::Equals:
              - VPC_SHARED
              - '{{ describeApiGroups.instanceType }}'
          NextTask: modifyApiGroupNetworkPolicyForShared
        - When:
            Fn::Equals:
              - VPC_DEDICATED
              - '{{ describeApiGroups.instanceType }}'
          NextTask: modifyApiGroupNetworkPolicyForDedicated
  - Name: modifyApiGroupNetworkPolicyForShared
    Action: ACS::ExecuteAPI
    OnSuccess: ACS::END
    Description:
      en: Modify the https version of shared apigateway instance to support tls1.2
      zh-cn: 修改共用執行個體類型的API Gatewayhttps版本支援tls1.2版本
    Properties:
      Service: CLOUDAPI
      API: ModifyApiGroupNetworkPolicy
      Parameters:
        RegionId: '{{ regionId }}'
        GroupId: '{{ groupId }}'
        HttpsPolicy: '{{ httpsPolicy }}'
  - Name: modifyApiGroupNetworkPolicyForDedicated
    Action: ACS::ExecuteAPI
    OnSuccess: ACS::END
    Description:
      en: Modify the https version of dedicated apigateway instance to support tls1.2
      zh-cn: 修改專享執行個體類型的API Gatewayhttps版本支援tls1.2版本
    Properties:
      Service: CLOUDAPI
      API: ModifyInstanceAttribute
      Parameters:
        RegionId: '{{ regionId }}'
        InstanceId: '{{ describeApiGroups.instanceId }}'
        HttpsPolicy: '{{ httpsPolicy }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - httpsPolicy
        Label:
          default:
            zh-cn: 設定參數
            en: Configure Parameters
      - Parameters:
          - regionId
          - groupId
        Label:
          default:
            zh-cn: 選擇執行個體
            en: Select Instance
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: 進階選項
            en: Control Options