ALIYUN::EventBridge::Rule は、イベントバスのイベントルールを作成するために使用されます。
構文
{
"Type": "ALIYUN::EventBridge::Rule",
"Properties": {
"Status": String, // ステータス
"EventBusName": String, // イベントバス名
"FilterPattern": Map, // フィルターパターン
"Description": String, // 説明
"Targets": List, // ターゲット
"RuleName": String // ルール名
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
EventBusName | String | はい | いいえ | イベントバスの名前。 | 詳細については、「制限」をご参照ください。 |
FilterPattern | Map | はい | はい | イベントパターン。 | プロパティ値は JSON 形式である必要があります。有効な値:
説明 最大 5 つのイベントパターンを設定できます。 |
Targets | List | はい | はい | イベントが配信されるイベントターゲット。 | 詳細については、「ターゲットのプロパティ」をご参照ください。 |
RuleName | String | はい | いいえ | イベントルールの名前。 | 詳細については、「制限」をご参照ください。 |
Status | String | いいえ | はい | ルールのステータス。 | 有効な値:
|
Description | String | いいえ | はい | ルールの説明。 | なし |
ターゲットの構文
"Targets": [
{
"PushRetryStrategy": String, // プッシュ再試行ストラテジー
"Type": String, // タイプ
"Endpoint": String, // エンドポイント
"Id": String, // ID
"ParamList": List, // パラメータリスト
"DeadLetterQueue": Map, // デッドレターキュー
"ConcurrentConfig": Map, // 同時実行設定
"ErrorsTolerance": String // エラー許容範囲
}
]ターゲットのプロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
Endpoint | String | はい | いいえ | イベントターゲットのエンドポイント。 | なし |
Id | String | はい | いいえ | ターゲットのカスタム ID。 | なし |
ParamList | List | はい | いいえ | イベントによって渡されるパラメータ。 | 詳細については、「ParamList のプロパティ」をご参照ください。 |
Type | String | はい | いいえ | ターゲットのタイプ。 | なし |
PushRetryStrategy | String | いいえ | いいえ | イベントをプッシュするための再試行ポリシー。 | 有効な値:
|
DeadLetterQueue | Map | いいえ | いいえ | デッドレターキュー。 | 処理されなかったイベント、または最大再試行回数を超えたイベントは、デッドレターキューに書き込まれます。 デッドレターキュー機能をサポートするキュータイプは次のとおりです。Alibaba Cloud RocketMQ、Simple Message Queue、ApsaraMQ for Kafka、および EventBridge。詳細については、「DeadLetterQueue のプロパティ」をご参照ください。 |
ConcurrentConfig | Map | いいえ | いいえ | 同時実行設定。 | 詳細については、「ConcurrentConfig のプロパティ」をご参照ください。 |
ErrorsTolerance | String | いいえ | いいえ | エラー許容ポリシー。 | 有効な値:
|
DeadLetterQueue 構文
"DeadLetterQueue":
{
"Arn": String // ARN
}DeadLetterQueue のプロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
Arn | String | はい | いいえ | デッドレターキューの Alibaba Cloud リソースネーム (ARN)。 | 処理されなかったイベント、または最大再試行回数を超えたイベントは、デッドレターキューに書き込まれます。 ARN 機能をサポートするキュータイプは次のとおりです。Alibaba Cloud RocketMQ および Simple Message Queue。 |
ConcurrentConfig 構文
"ConcurrentConfig":
{
"Concurrency": Integer // 同時実行数
}ConcurrentConfig のプロパティ
プロパティ | タイプ | 必須 | 更新を許可 | 説明 | 制約 |
Concurrency | Integer | はい | いいえ | 同時接続数。 | なし |
ParamList 構文
"ParamList": [
{
"Form": String, // 形式
"Value": String, // 値
"ResourceKey": String, // リソースキー
"Template": String // テンプレート
}
]ParamList のプロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
Form | String | はい | いいえ | イベント変換の形式。 | 詳細については、「イベントターゲットパラメータ」をご参照ください。 |
ResourceKey | String | はい | いいえ | イベント変換のリソースキー。 | 詳細については、「イベントターゲットパラメータ」をご参照ください。 |
Value | String | はい | いいえ | イベント変換の値。 | なし |
Template | String | いいえ | いいえ | テンプレートスタイル。 | なし |
レスポンスパラメーター
Fn::GetAtt
EventBusName: イベントバスの名前。
RuleARN: イベントルールの Alibaba Cloud リソースネーム (ARN)。ARN は認証に使用できます。
RuleName: イベントルールの名前。
例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
EventBusName:
Type: String
Description: The name of the event bus. # イベントバスの名前
Targets:
Type: Json
Description: The event target to which events are delivered. # イベントが配信されるイベントターゲット
MinLength: 1
MaxLength: 5
RuleName:
Type: String
Description: The name of the event rule. # イベントルールの名前
FilterPattern:
Required: true
Type: Json
Description:
en: The event pattern, in the JSON format. # JSON 形式のイベントパターン
Label:
zh-cn: event pattern # イベントパターン
en: FilterPattern # フィルターパターン
Resources:
Rule:
Type: ALIYUN::EventBridge::Rule
Properties:
FilterPattern:
Ref: FilterPattern
EventBusName:
Ref: EventBusName
Targets:
Ref: Targets
RuleName:
Ref: RuleName
Outputs:
EventBusName:
Description: The name of the event bus. # イベントバスの名前
Value:
Fn::GetAtt:
- Rule
- EventBusName
RuleARN:
Description: The Alibaba Cloud Resource Name (ARN) of the event rule. The ARN is used for authorization. # イベントルールの Alibaba Cloud リソースネーム (ARN)。ARN は認証に使用されます。
Value:
Fn::GetAtt:
- Rule
- RuleARN
RuleName:
Description: The name of the event rule. # イベントルールの名前
Value:
Fn::GetAtt:
- Rule
- RuleName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EventBusName": {
"Type": "String",
"Description": "The name of the event bus." // イベントバスの名前
},
"Targets": {
"Type": "Json",
"Description": "The event target to which events are delivered." // イベントが配信されるイベントターゲット
"MinLength": 1,
"MaxLength": 5
},
"RuleName": {
"Type": "String",
"Description": "The name of the event rule." // イベントルールの名前
},
"FilterPattern": {
"Required": true,
"Type": "Json",
"Description": {
"en": "The event pattern, in the JSON format." // JSON 形式のイベントパターン
},
"Label": {
"zh-cn": "event pattern", // イベントパターン
"en": "FilterPattern" // フィルターパターン
}
}
},
"Resources": {
"Rule": {
"Type": "ALIYUN::EventBridge::Rule",
"Properties": {
"FilterPattern": {
"Ref": "FilterPattern"
},
"EventBusName": {
"Ref": "EventBusName"
},
"Targets": {
"Ref": "Targets"
},
"RuleName": {
"Ref": "RuleName"
}
}
}
},
"Outputs": {
"EventBusName": {
"Description": "The name of the event bus.", // イベントバスの名前
"Value": {
"Fn::GetAtt": [
"Rule",
"EventBusName"
]
}
},
"RuleARN": {
"Description": "The Alibaba Cloud Resource Name (ARN) of the event rule. The ARN is used for authorization.", // イベントルールの Alibaba Cloud リソースネーム (ARN)。ARN は認証に使用されます。
"Value": {
"Fn::GetAtt": [
"Rule",
"RuleARN"
]
}
},
"RuleName": {
"Description": "The name of the event rule.", // イベントルールの名前
"Value": {
"Fn::GetAtt": [
"Rule",
"RuleName"
]
}
}
}
}