ALIYUN::ApiGateway::TrafficControl は、カスタムスロットリングポリシーを作成するために使用されます。
構文
{
"Type": "ALIYUN::ApiGateway::TrafficControl",
"Properties": {
"TrafficControlName": String,
"Description": String,
"UserDefault": String,
"AppDefault": String,
"TrafficControlUnit": String,
"Special": List,
"ApiDefault": Integer
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
ApiDefault | Integer | はい | はい | 各 API のデフォルトのスロットリング値。 | なし。 |
TrafficControlName | String | はい | はい | スロットリングポリシーの名前。 | 名前は 4 ~ 50 文字で、文字、数字、アンダースコア(_) を使用できます。名前はアンダースコア(_) で始めることはできません。 |
TrafficControlUnit | String | はい | はい | スロットリングポリシーの単位。 | 有効な値:
|
AppDefault | String | いいえ | はい | 各アプリケーションのデフォルトのスロットリング値。 | なし。 |
Description | String | いいえ | はい | スロットリングポリシーの説明。 | なし。 |
Special | List | いいえ | はい | カスタムスロットリングポリシーに追加する特殊ポリシーの詳細。 | なし。 |
UserDefault | String | いいえ | はい | 各ユーザーのデフォルトのスロットリング値。 | なし。 |
Special 構文
"Special": {
"SpecialType" : String,
"SpecialKey" : String,
"TrafficValue" : Integer
}Special プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
SpecialKey | String | はい | いいえ | アプリケーションまたは Alibaba Cloud アカウントの ID。SpecialType の値に基づいて値を指定します。 | なし。 |
SpecialType | String | はい | いいえ | 特殊スロットリングポリシーのタイプ。 | 有効な値:
|
TrafficValue | Integer | はい | いいえ | 特殊スロットリング値。 | なし。 |
戻り値
Fn::GetAtt
TrafficControlId: カスタムスロットリングポリシーの ID。
例
マスクされたパラメーターの値は、ビジネス要件に基づいて変更してください。
YAML 形式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
AppId:
Type: String
Description: 特殊スロットリングポリシーにおけるアプリケーションの ID。
Resources:
TrafficControl:
Type: ALIYUN::ApiGateway::TrafficControl
Properties:
TrafficControlName: test_traffic_cont****
TrafficControlUnit: MINUTE
ApiDefault: 400
UserDefault: 200
AppDefault: 100
Description: demo2
Special:
- SpecialType: APP
SpecialKey:
Ref: AppId
TrafficValue: 80JSON 形式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"AppId": {
"Type": "String",
"Description": "特殊スロットリングポリシーにおけるアプリケーションの ID。" // The ID of the application in the special throttling policy.
}
},
"Resources": {
"TrafficControl": {
"Type": "ALIYUN::ApiGateway::TrafficControl",
"Properties": {
"TrafficControlName": "test_traffic_cont****",
"TrafficControlUnit": "MINUTE",
"ApiDefault": 400,
"UserDefault": 200,
"AppDefault": 100,
"Description": "demo2",
"Special": [
{
"SpecialType": "APP",
"SpecialKey": {
"Ref": "AppId"
},
"TrafficValue": 80
}
]
}
}
}
}