ALIYUN::FC3::Trigger は、Function Compute 3.0 トリガーを作成するために使用されます。
構文
{
"Type": "ALIYUN::FC3::Trigger",
"Properties": {
"FunctionName": String,
"TriggerType": String,
"TriggerName": String,
"TriggerConfig": Map,
"Description": String,
"InvocationRole": String,
"Qualifier": String,
"SourceArn": String
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
FunctionName | String | はい | いいえ | 関数名。 | なし。 |
TriggerType | String | はい | いいえ | トリガータイプ。 | なし。 |
TriggerName | String | はい | いいえ | トリガー名。 | 名前には、文字、数字、ハイフン(-)、およびアンダースコア(_)のみを含めることができます。 1 ~ 128 文字の長さで、数字またはハイフン(-)で始めることはできません。 |
TriggerConfig | Map | はい | はい | トリガーの構成。 | なし。 |
Description | String | いいえ | はい | トリガーの説明。 | なし。 |
InvocationRole | String | いいえ | はい | Object Storage Service (OSS) などのイベントソースが関数を呼び出すために使用する Resource Access Management (RAM) ロール。 | なし。 |
Qualifier | String | いいえ | はい | 関数のバージョンまたはエイリアス。 | なし。 |
SourceArn | String | いいえ | いいえ | トリガーのイベントソースの Alibaba Cloud Resource Name (ARN)。 | なし。 |
戻り値
Fn::GetAtt
FunctionName: 関数名。
UrlIntranet: 非公開エンドポイント。
TriggerName: トリガー名。
TriggerId: トリガー ID。
UrlInternet: パブリックエンドポイント。
例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TriggerType:
Type: String
Description:
en: Type of the trigger.
Required: true
FunctionName:
Type: String
Description:
en: The name of the function.
Required: true
TriggerName:
Type: String
Description:
en: Name of the trigger.
Required: true
TriggerConfig:
Type: Json
Description:
en: Trigger config.
Required: true
Resources:
Trigger:
Type: ALIYUN::FC3::Trigger
Properties:
TriggerType:
Ref: TriggerType
FunctionName:
Ref: FunctionName
TriggerName:
Ref: TriggerName
TriggerConfig:
Ref: TriggerConfig
Outputs:
FunctionName:
Description: Function name.
Value:
Fn::GetAtt:
- Trigger
- FunctionName
UrlIntranet:
Description: The private endpoint. In a VPC, you can access HTTP triggers by using HTTP or HTTPS.
Value:
Fn::GetAtt:
- Trigger
- UrlIntranet
TriggerName:
Description: Trigger name.
Value:
Fn::GetAtt:
- Trigger
- TriggerName
TriggerId:
Description: The trigger ID.
Value:
Fn::GetAtt:
- Trigger
- TriggerId
UrlInternet:
Description: The public domain address. You can access HTTP triggers over the Internet by using HTTP or HTTPS.
Value:
Fn::GetAtt:
- Trigger
- UrlInternet
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TriggerType": {
"Type": "String",
"Description": {
"en": "Type of the trigger."
},
"Required": true
},
"FunctionName": {
"Type": "String",
"Description": {
"en": "The name of the function."
},
"Required": true
},
"TriggerName": {
"Type": "String",
"Description": {
"en": "Name of the trigger."
},
"Required": true
},
"TriggerConfig": {
"Type": "Json",
"Description": {
"en": "Trigger config."
},
"Required": true
}
},
"Resources": {
"Trigger": {
"Type": "ALIYUN::FC3::Trigger",
"Properties": {
"TriggerType": {
"Ref": "TriggerType"
},
"FunctionName": {
"Ref": "FunctionName"
},
"TriggerName": {
"Ref": "TriggerName"
},
"TriggerConfig": {
"Ref": "TriggerConfig"
}
}
}
},
"Outputs": {
"FunctionName": {
"Description": "関数名。",
"Value": {
"Fn::GetAtt": [
"Trigger",
"FunctionName"
]
}
},
"UrlIntranet": {
"Description": "非公開エンドポイント。 VPC では、HTTP または HTTPS を使用して HTTP トリガーにアクセスできます。",
"Value": {
"Fn::GetAtt": [
"Trigger",
"UrlIntranet"
]
}
},
"TriggerName": {
"Description": "トリガー名。",
"Value": {
"Fn::GetAtt": [
"Trigger",
"TriggerName"
]
}
},
"TriggerId": {
"Description": "トリガー ID。",
"Value": {
"Fn::GetAtt": [
"Trigger",
"TriggerId"
]
}
},
"UrlInternet": {
"Description": "パブリックドメインアドレス。 HTTP または HTTPS を使用して、インターネット経由で HTTP トリガーにアクセスできます。",
"Value": {
"Fn::GetAtt": [
"Trigger",
"UrlInternet"
]
}
}
}
}