テンプレート名
ACS-ApiGateway-BulkyModifyApiGroupNetworkPolicy
テンプレートの説明
API ゲートウェイの HTTPS バージョンを変更して、Transport Layer Security (TLS) 1.2 プロトコルをサポートします。
テンプレートタイプ
自動化
所有者
Alibaba Cloud
入力パラメーター
パラメーター | 説明 | タイプ | 必須 | デフォルト値 | 制限 |
groupId | API グループの ID。 | String | はい | ||
httpsPolicy | HTTPS セキュリティポリシー。 | String | はい | ||
regionId | リージョン ID。 | String | いいえ | {{ ACS::RegionId }} | |
rateControl | レート制御設定。 | Json | いいえ | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | CloudOps Orchestration Service (OOS) がアシュームする Resource Access Management (RAM) ロール。 | String | いいえ | "" |
出力パラメーター
なし
テンプレートの実行に必要な権限ポリシー
{
"Version": "1",
"Statement": [
{
"Action": [
"cloudapi:DescribeApiGroups",
"cloudapi:ModifyApiGroupNetworkPolicy",
"cloudapi:ModifyInstanceAttribute"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
参照
詳細については、GitHub の ACS-ApiGateway-BulkyModifyApiGroupNetworkPolicy.yml をご参照ください。
テンプレートコンテンツ
FormatVersion: OOS-2019-06-01
Description:
en: Modify the https version of apigateway instance to support tls1.2
zh-cn: the description in Chinese
name-en: ACS-ApiGateway-BulkyModifyApiGroupNetworkPolicy
name-zh-cn: the description in Chinese
categories:
- security
Parameters:
regionId:
Label:
en: RegionId
zh-cn: the description in Chinese
Type: String
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
groupId:
Label:
en: GroupId
zh-cn: the description in Chinese
Type: String
httpsPolicy:
Label:
en: HttpsPolicy
zh-cn: the description in Chinese
Type: String
AllowedValues:
- HTTPS1_1_TLS1_0
- HTTPS2_TLS1_0
- HTTPS2_TLS1_2
rateControl:
Label:
en: RateControl
zh-cn: the description in Chinese
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: the description in Chinese
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: describeApiGroups
Action: ACS::ExecuteAPI
Description:
en: Query the detailed instance type of apigateway
zh-cn: the description in Chinese
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: the description in Chinese
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: the description in Chinese
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: the description in Chinese
Properties:
Service: CLOUDAPI
API: ModifyInstanceAttribute
Parameters:
RegionId: '{{ regionId }}'
InstanceId: '{{ describeApiGroups.instanceId }}'
HttpsPolicy: '{{ httpsPolicy }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- httpsPolicy
Label:
default:
zh-cn: the description in Chinese
en: Configure Parameters
- Parameters:
- regionId
- groupId
Label:
default:
zh-cn: the description in Chinese
en: Select Instance
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
zh-cn: the description in Chinese
en: Control Options