Put Trigger
- 印刷する
- PDF
Put Trigger
- 印刷する
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
概要
トリガーを作成および修正します。
リクエスト
リクエスト URL
PUT {CLOUD_FUNCTIONS_API_URL}/triggers/{triggerName}
Content-Type: application/json; charset=utf-8
x-ncp-apigw-timestamp: {Timestamp}
x-ncp-iam-access-key: {Sub Account Access Key}
x-ncp-apigw-signature-v2: {API Gateway Signature}
Path Variables
パラメータ | 要否 | タイプ | 制約事項 | 説明 |
---|---|---|---|---|
triggerName | Yes | string | アルファベット、数字、ハイフン(-)、アンダーバ( _ )で構成し、50文字以内のみ許可 | トリガー名 |
リクエストパラメータ
パラメータ名 | 要否 | タイプ | 制約事項 | 説明 |
---|---|---|---|---|
platform | No | string | (classic | vpc) | - プラットフォームタイプ - default classicで処理 |
type | No | string | (basic | cron | github | insight | iot | object_storage | source_commit) | - トリガータイプ - default basicで処理 |
リクエストボディ
リクエストボディはトリガータイプに応じて確認してください。
Basic Trigger
{
"trigger": {
"description": "string",
"parameters": {
}
},
"link": {
"productId": "string",
"apiName": "string",
"stageName": "string"
}
}
項目 | 要否 | タイプ | 制約事項 | 説明 |
---|---|---|---|---|
trigger | Yes | object | トリガー情報 | |
trigger.description | No | string | 3000byte以内の文字列 | トリガー説明 |
trigger.parameters | No | object | JSON形式。{"key" : "value"}の形式 | トリガーのデフォルトパラメータ設定 * アクション実行時のパラメータ適用優先順位 ** 1順位: 実行時点で伝達されるランタイムパラメータ ** 2順位: 接続されたトリガーのデフォルトパラメータ ** 3順位: アクションのデフォルトパラメータ ** 4順位: 含まれるパッケージのデフォルトパラメータ |
link | No | - | linkはトリガー作成時にのみ有効 修正時には適用されない | |
link.productId | Yes | string | 外部接続アドレスを作成するための API Gatewayの productId | |
link.apiName | Yes | string | 外部接続アドレスを作成するための API Gatewayの apiName | |
link.stageName | Yes | string | 外部接続アドレスを作成するための API Gatewayの stageName |
Cron Trigger
{
"trigger": {
"description": "string",
"cronOption": "string",
"parameters": {
}
}
}
項目 | 要否 | タイプ | 制約事項 | 説明 |
---|---|---|---|---|
trigger | Yes | object | トリガー情報 | |
trigger.description | No | string | 3000byte以内の文字列 | トリガー説明 |
trigger.cronOption | Yes | string | cron expression | cron実行オプション |
trigger.parameters | No | object | JSON形式。{"key" : "value"}の形式 | トリガーのデフォルトパラメータ設定 * アクション実行時のパラメータ適用優先順位 ** 1順位: 実行時点で伝達されるランタイムパラメータ ** 2順位: 接続されたトリガーのデフォルトパラメータ ** 3順位: アクションのデフォルトパラメータ ** 4順位: 含まれるパッケージのデフォルトパラメータ |
GitHub Trigger
{
"trigger": {
"parameters": {
},
"description": "string",
"credentials": {
"username": "string",
"accessToken": "string",
"repository": "string"
},
"events": [
"string"
]
},
"link": {
"productId" : "string",
"apiName" : "string",
"stageName" : "string"
}
}
項目 | 要否 | タイプ | 制約事項 | 説明 |
---|---|---|---|---|
trigger | Yes | object | トリガー情報 | |
trigger.description | No | string | 3000byte以内の文字列 | トリガー説明 |
trigger.parameters | No | object | JSON形式。{"key" : "value"}の形式 | トリガーのデフォルトパラメータ設定 * アクション実行時のパラメータ適用優先順位 ** 1順位: 実行時点で伝達されるランタイムパラメータ ** 2順位: 接続されたトリガーのデフォルトパラメータ ** 3順位: アクションのデフォルトパラメータ ** 4順位: 含まれるパッケージのデフォルトパラメータ |
trigger.credentials.username | Yes | string | Githubユーザー名 | |
trigger.credentials.accessToken | Yes | string | Githubアクセストークン | |
trigger.credentials.repository | Yes | string | URL形式ではなく「レファジトリ名」あるいは「Organization/レファジトリ名」形式で作成が必要 | Githubレファジトリ |
trigger.events | Yes | string array | イベントの種類で "*", "check_run", "check_suite", "commit_comment", "create", "delete", "deployment", "deployment_status", "fork", "gollum", "issue_comment", "issues", "label", "member", "milestone", "page_build", "project_card", "project_column", "project", "public", "pull_request_review_comment", "pull_request_review_thread", "pull_request_review", "pull_request", "push", "repository", "repository_import", "repository_vulnerability_alert", "release", "status", "team_add", "watch", "branch_protection_rule", "code_scanning_alert", "deploy_key", "discussion_comment", "discussion", "meta", "package", "registry_package", "release", "secret_scanning_alert_location", "secret_scanning_alert", "security_and_analysis", "star", "workflow_job", "workflow_run" の中から複数選択可能 | トリガーするイベントリスト |
link | No | linkデータはトリガー作成時にのみ有効。修正時には適用されない | ||
link.productId | Yes | string | 外部接続アドレスを作成するための API Gatewayの productId | |
link.apiName | Yes | string | 外部接続アドレスを作成するための API Gatewayの apiName | |
link.stageName | Yes | string | 外部接続アドレスを作成するための API Gatewayの stageName |
Cloud Insight Trigger
{
"trigger" : {
"description" : "string",
"parameters" : {
},
"insightLink" : [
{
"prodKey" : "string",
"ruleGrpId" : "string",
"reminderTime" : "integer",
"enableNotiWhenEventClose" : "boolean"
}
]
}
}
項目 | 要否 | タイプ | 制約事項 | 説明 |
---|---|---|---|---|
trigger | Yes | object | トリガー情報 | |
trigger.description | No | string | 3000byte以内の文字列 | トリガー説明 |
trigger.parameters | No | object | JSON形式。{"key" : "value"}の形式 | トリガーのデフォルトパラメータ設定 * アクション実行時のパラメータ適用優先順位 ** 1順位: 実行時点で伝達されるランタイムパラメータ ** 2順位: 接続されたトリガーのデフォルトパラメータ ** 3順位: アクションのデフォルトパラメータ ** 4順位: 含まれるパッケージのデフォルトパラメータ |
trigger.insightLink | Yes | |||
trigger.insightLink[].prodKey | Yes | string | Insight Triggerに接続する Cloud Insight Event Ruleの prodKey | |
trigger.insightLink[].ruleGrpId | Yes | string | Insight Triggerに接続する Cloud Insight Event Ruleの ruleGrpId | |
trigger.insightLink[].reminderTime | No | integer | MIN 5 / MAX 720 | Insight Triggerに接続する Cloud Insight Event Ruleのリマインド通知周期(分単位) |
trigger.insightLink[].enableNotiWhenEventClose | No | boolean | Insight Triggerに接続する Cloud Insight Event Ruleを Event終了時にも呼び出すかどうか / default false |
Cloud IoT Core Trigger
{
"trigger" : {
"description" : "string",
"parameters" : {
},
"iotLink" : [
{
"ruleName" : "string"
}
]
}
}
項目 | 要否 | タイプ | 制約事項 | 説明 |
---|---|---|---|---|
trigger | Yes | object | トリガー情報 | |
trigger.description | No | string | 3000byte以内の文字列 | トリガー説明 |
trigger.parameters | No | object | JSON形式。{"key" : "value"}の形式 | トリガーのデフォルトパラメータ設定 * アクション実行時のパラメータ適用優先順位 ** 1順位: 実行時点で伝達されるランタイムパラメータ ** 2順位: 接続されたトリガーのデフォルトパラメータ ** 3順位: アクションのデフォルトパラメータ ** 4順位: 含まれるパッケージのデフォルトパラメータ |
trigger.iotLink | Yes | |||
trigger.iotLink[].ruleName | Yes | string | Cloud IoT Core Triggerに接続する Cloud IoT Core規則の名前 |
Object Storage Trigger
注意
Object Storage Triggerに接続されたアクションが Object Storage Event Ruleと同じ Bucketを使用する場合、再帰呼び出しによる使用量の増加および過剰な請求が発生する可能性があります。
{
"trigger" : {
"description" : "string",
"parameters" : {
},
"objectStorageLink" : [
{
"bucketName" : "string",
"eventRuleName" : "string"
}
]
}
}
項目 | 要否 | タイプ | 制約事項 | 説明 |
---|---|---|---|---|
trigger | Yes | object | トリガー情報 | |
trigger.description | No | string | 3000byte以内の文字列 | トリガー説明 |
trigger.parameters | No | object | JSON形式。{"key" : "value"}の形式 | トリガーのデフォルトパラメータ設定 * アクション実行時のパラメータ適用優先順位 ** 1順位: 実行時点で伝達されるランタイムパラメータ ** 2順位: 接続されたトリガーのデフォルトパラメータ ** 3順位: アクションのデフォルトパラメータ ** 4順位: 含まれるパッケージのデフォルトパラメータ |
trigger.objectStorageLink | Yes | |||
trigger.objectStorageLink[].bucketName | Yes | string | Object Storage Triggerに接続する Object Storageの Bucket名 | |
trigger.objectStorageLink[].eventRuleName | Yes | string | Object Storage Triggerに接続する Object Storageの Event Rule名 |
Source Commit Trigger
参考
- SourceCommitタイプトリガーは韓国リージョン、VPCプラットフォームのみサポートします。
{
"trigger" : {
"description" : "string",
"parameters" : {
},
"sourceCommitLink" : [
{
"enable": "boolean",
"repositoryName" : "string",
"webhookName" : "string"
}
]
}
}
項目 | 要否 | タイプ | 制約事項 | 説明 |
---|---|---|---|---|
trigger | Yes | object | トリガー情報 | |
trigger.description | No | string | 3000byte以内の文字列 | トリガー説明 |
trigger.parameters | No | object | JSON形式。{"key" : "value"}の形式 | トリガーのデフォルトパラメータ設定 * アクション実行時のパラメータ適用優先順位 ** 1順位: 実行時点で伝達されるランタイムパラメータ ** 2順位: 接続されたトリガーのデフォルトパラメータ ** 3順位: アクションのデフォルトパラメータ ** 4順位: 含まれるパッケージのデフォルトパラメータ |
trigger.sourceCommitLink | Yes | |||
trigger.sourceCommitLink[].enable | No | boolean | - Source Commit Triggerに接続する Source Commit Repositoryの Webhook活性化ステータス指定 - default true | |
trigger.sourceCommitLink[].repositoryName | Yes | string | Source Commit Triggerに接続する Source Commit Repository名 | |
trigger.sourceCommitLink[].webhookName | Yes | string | Source Commit Triggerに接続する Source Commit Repositoryの Webhook名 |
レスポンス
レスポンスボディ
Basic Trigger
{
"content": {
"name": "string",
"namespace": "string",
"description": "string",
"limits": {},
"parameters": {
},
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
項目 | タイプ | 説明 | 備考 |
---|---|---|---|
content.name | string | トリガー名 | |
content.namespace | string | 使用者のネームスペース | |
content.description | string | トリガー説明 | |
content.triggerType | string | トリガータイプ | |
content.resourceId | string | トリガーの resourceId | |
content.parameters | object | トリガーのデフォルトパラメータ | |
content.limits | 使用しない | ||
content.rules | string | トリガーアクション接続情報 |
Cron Trigger
{
"content": {
"cronOption": "string",
"description": "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters": {
},
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
項目 | タイプ | 説明 | 備考 |
---|---|---|---|
content.description | string | トリガー説明 | |
content.triggerType | string | トリガータイプ | |
content.resourceId | string | トリガーの resourceId | |
content.cronOptions | string | トリガーの Cron実行オプション | |
content.limits | 使用しない | ||
content.name | string | トリガー名 | |
content.namespace | string | 使用者のネームスペース | |
content.parameters | object | トリガーのデフォルトパラメータ | |
content.rules | string | トリガーアクション接続情報 |
GitHub Trigger
{
"content": {
"credentials": {
"accessToken": "string",
"repository": "string",
"username": "string"
},
"description": "string",
"events": "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters": {
},
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
項目 | タイプ | 説明 | 備考 |
---|---|---|---|
content.credentials | トリガー github接続情報 | ||
content.description | string | トリガー説明 | |
content.events | string | トリガーの実行 github eventオプション | |
content.limits | 使用しない | ||
content.name | string | トリガー名 | |
content.namespace | string | 使用者のネームスペース | |
content.parameters | object | トリガーのデフォルトパラメータ | |
content.resourceId | string | トリガーの resourceId | |
content.rules | string | トリガーアクション接続情報 | |
content.triggerType | string | トリガータイプ |
Cloud Insight Trigger
{
"content" : {
"description" : "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters" : {
},
"insightLink" : [
{
"prodKey" : "string",
"ruleGrpId" : "string",
"reminderTime" : "integer",
"enableNotiWhenEventClose" : "boolean"
}
],
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
項目 | タイプ | 説明 | 備考 |
---|---|---|---|
content.description | string | トリガー説明 | |
content.limits | 使用しない | ||
content.name | string | トリガー名 | |
content.namespace | string | 使用者のネームスペース | |
content.parameters | object | トリガーのデフォルトパラメータ | |
content.insightLink | 接続された Cloud Insightの Event Rule情報 | ||
content.insightLink[].prodKey | string | 接続された Cloud Insight Event Ruleの prodKey | |
content.insightLink[].ruleGrpId | string | 接続された Cloud Insight Event Ruleの groupId | |
content.insightLink[].reminderTime | integer | 接続された Cloud Insight Event Ruleのリマインド通知周期(分単位) | |
content.insightLink[].enableNotiWhenEventClose | boolean | 接続された Cloud Insight Event Ruleを Event終了時にも呼び出すかどうか | |
content.resourceId | string | トリガーの resourceId | |
content.rules | string | トリガーアクション接続情報 | |
content.triggerType | string | トリガータイプ |
Cloud IoT Core Trigger
{
"content" : {
"description" : "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters" : {
},
"iotLink" : [
{
"ruleName" : "string"
}
],
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
項目 | タイプ | 説明 | 備考 |
---|---|---|---|
content.description | string | トリガー説明 | |
content.limits | 使用しない | ||
content.name | string | トリガー名 | |
content.namespace | string | 使用者のネームスペース | |
content.parameters | object | トリガーのデフォルトパラメータ | |
content.iotLink | 接続された Cloud IoT Core規則情報 | ||
content.iotLink[].ruleName | string | 接続された Cloud IoT Core規則の名前 | |
content.resourceId | string | トリガーの resourceId | |
content.rules | string | トリガーアクション接続情報 | |
content.triggerType | string | トリガータイプ |
Object Storage Trigger
{
"content" : {
"description" : "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters" : {
},
"objectStorageLink" : [
{
"bucketName" : "string",
"eventRuleName" : "string"
}
],
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
項目 | タイプ | 説明 | 備考 |
---|---|---|---|
content.description | string | トリガー説明 | |
content.limits | 使用しない | ||
content.name | string | トリガー名 | |
content.namespace | string | 使用者のネームスペース | |
content.parameters | object | トリガーのデフォルトパラメータ | |
content.objectStorageLink | 接続された Object Storage Event Ruleの情報 | ||
content.objectStorageLink[].bucketName | string | 接続された Object Storage Event Ruleの Bucket名前 | |
content.objectStorageLink[].eventRuleName | string | 接続された Object Storage Event Ruleの名前 | |
content.resourceId | string | トリガーの resourceId | |
content.rules | string | トリガーアクション接続情報 | |
content.triggerType | string | トリガータイプ |
Source Commit Trigger
{
"content" : {
"description" : "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters" : {
},
"sourceCommitLink" : [
{
"enable" : "boolean",
"repositoryName" : "string",
"webhookName" : "string"
}
],
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
項目 | タイプ | 説明 | 備考 |
---|---|---|---|
content.description | string | トリガー説明 | |
content.limits | 使用しない | ||
content.name | string | トリガー名 | |
content.namespace | string | 使用者のネームスペース | |
content.parameters | object | トリガーのデフォルトパラメータ | |
content.sourceCommitLink | 接続された Object Storage Event Ruleの情報 | ||
content.sourceCommitLink[].enable | boolean | 接続された Source Commit Repositoryの Webhook活性化ステータス | |
content.sourceCommitLink[].repositoryName | string | 接続された Source Commit Repository名 | |
content.sourceCommitLink[].webhookName | string | Source Commit Repositoryの Webhook名 | |
content.resourceId | string | トリガーの resourceId | |
content.rules | string | トリガーアクション接続情報 | |
content.triggerType | string | トリガータイプ |
この記事は役に立ちましたか?