Put Trigger
- Print
- PDF
Put Trigger
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Overview
Creates and edits triggers.
Requests
Request 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
Parameters | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
triggerName | Yes | string | Up to 50 characters are allowed, using English letters, numbers, hyphens (-), or underscores (_) | Trigger name |
Request Parameters
Parameter name | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
platform | No | string | (classic | vpc) | - Platform type - Processed as default classic |
type | No | string | (basic | cron | github | insight | iot | object_storage | source_commit) | - Trigger type - Processed as default basic |
Request bodies
Please check the request bodies according to the trigger type.
Basic Trigger
{
"trigger": {
"description": "string",
"parameters": {
}
},
"link": {
"productId": "string",
"apiName": "string",
"stageName": "string"
}
}
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
trigger | Yes | object | Information of the trigger | |
trigger.description | No | string | String up to 3000 bytes | Description of the trigger |
trigger.parameters | No | object | JSON format. In the form of {"key" : "value"} | Set the default parameters of the trigger. * Parameter application priority when executing an action ** #1: the runtime parameters delivered at time of execution ** #2: the default parameters of the connected trigger ** #3: the default parameters of the action ** #4: the default parameters of the included package |
link | No | - | Link is valid only when creating a trigger Not applied when editing | |
link.productId | Yes | string | productId of the API gateway for creating an external link address | |
link.apiName | Yes | string | apiName of the API gateway for creating an external link address | |
link.stageName | Yes | string | stageName of the API gateway for creating an external link address |
Cron Trigger
{
"trigger": {
"description": "string",
"cronOption": "string",
"parameters": {
}
}
}
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
trigger | Yes | object | Information of the trigger | |
trigger.description | No | string | String up to 3000 bytes | Description of the trigger |
trigger.cronOption | Yes | string | cron expression | cron execution option |
trigger.parameters | No | object | JSON format. In the form of {"key" : "value"} | Set the default parameters of the trigger. * Parameter application priority when executing an action ** #1: the runtime parameters delivered at time of execution ** #2: the default parameters of the connected trigger ** #3: the default parameters of the action ** #4: the default parameters of the included package |
GitHub Trigger
{
"trigger": {
"parameters": {
},
"description": "string",
"credentials": {
"username": "string",
"accessToken": "string",
"repository": "string"
},
"events": [
"string"
]
},
"link": {
"productId" : "string",
"apiName" : "string",
"stageName" : "string"
}
}
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
trigger | Yes | object | Information of the trigger | |
trigger.description | No | string | String up to 3000 bytes | Description of the trigger |
trigger.parameters | No | object | JSON format. In the form of {"key" : "value"} | Set the default parameters of the trigger. * Parameter application priority when executing an action ** #1: the runtime parameters delivered at time of execution ** #2: the default parameters of the connected trigger ** #3: the default parameters of the action ** #4: the default parameters of the included package |
trigger.credentials.username | Yes | string | GitHub user name | |
trigger.credentials.accessToken | Yes | string | GitHub access token | |
trigger.credentials.repository | Yes | string | It is necessary to create it in the 'Repository Name' or 'Organization/Repository Name' format, not the URL format. | Github repository |
trigger.events | Yes | string array | Select multiple event types out of "*", "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", and "workflow_run". | List of events to be triggered |
link | No | Link data is valid only when creating a trigger Not applied when editing | ||
link.productId | Yes | string | productId of the API gateway for creating an external link address | |
link.apiName | Yes | string | apiName of the API gateway for creating an external link address | |
link.stageName | Yes | string | stageName of the API gateway for creating an external link address |
Cloud Insight Trigger
{
"trigger" : {
"description" : "string",
"parameters" : {
},
"insightLink" : [
{
"prodKey" : "string",
"ruleGrpId" : "string",
"reminderTime" : "integer",
"enableNotiWhenEventClose" : "boolean"
}
]
}
}
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
trigger | Yes | object | Information of the trigger | |
trigger.description | No | string | String up to 3000 bytes | Description of the trigger |
trigger.parameters | No | object | JSON format. In the form of {"key" : "value"} | Set the default parameters of the trigger. * Parameter application priority when executing an action ** #1: the runtime parameters delivered at time of execution ** #2: the default parameters of the connected trigger ** #3: the default parameters of the action ** #4: the default parameters of the included package |
trigger.insightLink | Yes | |||
trigger.insightLink[].prodKey | Yes | string | Event rule prodKey of Cloud Insight to be connected to Insight Trigger | |
trigger.insightLink[].ruleGrpId | Yes | string | Event ruleGrpId of the Cloud Insight event rule to be connected to the insight trigger | |
trigger.insightLink[].reminderTime | No | integer | MIN 5 / MAX 720 | Reminder notification interval of the Cloud Insight event rule to be connected to the insight trigger (in minutes) |
trigger.insightLink[].enableNotiWhenEventClose | No | boolean | Whether to call the Cloud Insight event rule to be connected to the insight trigger even when the event ends / default false |
Cloud IoT Core Trigger
{
"trigger" : {
"description" : "string",
"parameters" : {
},
"iotLink" : [
{
"ruleName" : "string"
}
]
}
}
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
trigger | Yes | object | Information of the trigger | |
trigger.description | No | string | String up to 3000 bytes | Description of the trigger |
trigger.parameters | No | object | JSON format. In the form of {"key" : "value"} | Set the default parameters of the trigger. * Parameter application priority when executing an action ** #1: the runtime parameters delivered at time of execution ** #2: the default parameters of the connected trigger ** #3: the default parameters of the action ** #4: the default parameters of the included package |
trigger.iotLink | Yes | |||
trigger.iotLink[].ruleName | Yes | string | The name of the Cloud IoT Core rule to be connected to the Cloud IoT core trigger. |
Object Storage Trigger
Caution
If the action connected to the object storage trigger uses the same bucket as the object storage event rule, increased usage and excessive costs may occur due to recursive calls.
{
"trigger" : {
"description" : "string",
"parameters" : {
},
"objectStorageLink" : [
{
"bucketName" : "string",
"eventRuleName" : "string"
}
]
}
}
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
trigger | Yes | object | Information of the trigger | |
trigger.description | No | string | String up to 3000 bytes | Description of the trigger |
trigger.parameters | No | object | JSON format. In the form of {"key" : "value"} | Set the default parameters of the trigger. * Parameter application priority when executing an action ** #1: the runtime parameters delivered at time of execution ** #2: the default parameters of the connected trigger ** #3: the default parameters of the action ** #4: the default parameters of the included package |
trigger.objectStorageLink | Yes | |||
trigger.objectStorageLink[].bucketName | Yes | string | The name of the bucket of the object storage to be connected to the object storage trigger | |
trigger.objectStorageLink[].eventRuleName | Yes | string | The event rule name of the object storage to be connected to the object storage trigger |
Source Commit Trigger
Note
- SourceCommit type trigger is supported only for Korea Region and VPC platforms.
{
"trigger" : {
"description" : "string",
"parameters" : {
},
"sourceCommitLink" : [
{
"enable": "boolean",
"repositoryName" : "string",
"webhookName" : "string"
}
]
}
}
Item | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
trigger | Yes | object | Information of the trigger | |
trigger.description | No | string | String up to 3000 bytes | Description of the trigger |
trigger.parameters | No | object | JSON format. In the form of {"key" : "value"} | Set the default parameters of the trigger. * Parameter application priority when executing an action ** #1: the runtime parameters delivered at time of execution ** #2: the default parameters of the connected trigger ** #3: the default parameters of the action ** #4: the default parameters of the included package |
trigger.sourceCommitLink | Yes | |||
trigger.sourceCommitLink[].enable | No | boolean | - Specifies the Webhook activation status of the Source Commit Repository to be linked to the Source Commit Trigger - default true | |
trigger.sourceCommitLink[].repositoryName | Yes | string | Name of the Source Commit Repository to be linked to the Source Commit Trigger | |
trigger.sourceCommitLink[].webhookName | Yes | string | The Webhook name of the Source Commit Repository to be linked to the Source Commit Trigger |
Responses
Response bodies
Basic Trigger
{
"content": {
"name": "string",
"namespace": "string",
"description": "string",
"limits": {},
"parameters": {
},
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
Item | Type | Description | Remarks |
---|---|---|---|
content.name | string | Trigger name | |
content.namespace | string | Namespace of the user | |
content.description | string | Description of the trigger | |
content.triggerType | string | Trigger type | |
content.resourceId | string | resourceId of the trigger | |
content.parameters | object | Default parameter of the trigger | |
content.limits | Not used | ||
content.rules | string | Link information of the trigger action |
Cron Trigger
{
"content": {
"cronOption": "string",
"description": "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters": {
},
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
Item | Type | Description | Remarks |
---|---|---|---|
content.description | string | Description of the trigger | |
content.triggerType | string | Trigger type | |
content.resourceId | string | resourceId of the trigger | |
content.cronOptions | string | Cron execution options of the trigger | |
content.limits | Not used | ||
content.name | string | Trigger name | |
content.namespace | string | Namespace of the user | |
content.parameters | object | Default parameter of the trigger | |
content.rules | string | Link information of the trigger action |
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"
}
}
Item | Type | Description | Remarks |
---|---|---|---|
content.credentials | Trigger GitHub linkage information | ||
content.description | string | Description of the trigger | |
content.events | string | Trigger's GitHub event execution option | |
content.limits | Not used | ||
content.name | string | Trigger name | |
content.namespace | string | Namespace of the user | |
content.parameters | object | Default parameter of the trigger | |
content.resourceId | string | resourceId of the trigger | |
content.rules | string | Link information of the trigger action | |
content.triggerType | string | Trigger type |
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"
}
}
Item | Type | Description | Remarks |
---|---|---|---|
content.description | string | Description of the trigger | |
content.limits | Not used | ||
content.name | string | Trigger name | |
content.namespace | string | Namespace of the user | |
content.parameters | object | Default parameter of the trigger | |
content.insightLink | Event rule information of Cloud Insight that has been connected | ||
content.insightLink[].prodKey | string | Event rule prodKey of Cloud Insight that has been connected | |
content.insightLink[].ruleGrpId | string | Event rule groupId of Cloud Insight that has been connected | |
content.insightLink[].reminderTime | integer | Reminder notification interval of the Cloud Insight event rule (in minutes) | |
content.insightLink[].enableNotiWhenEventClose | boolean | Whether to call connected Cloud Insight event rule even when the event ends | |
content.resourceId | string | resourceId of the trigger | |
content.rules | string | Link information of the trigger action | |
content.triggerType | string | Trigger type |
Cloud IoT Core Trigger
{
"content" : {
"description" : "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters" : {
},
"iotLink" : [
{
"ruleName" : "string"
}
],
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
Item | Type | Description | Remarks |
---|---|---|---|
content.description | string | Description of the trigger | |
content.limits | Not used | ||
content.name | string | Trigger name | |
content.namespace | string | Namespace of the user | |
content.parameters | object | Default parameter of the trigger | |
content.iotLink | Connected Cloud IoT Core rule information | ||
content.iotLink[].ruleName | string | Name of the Connected Cloud IoT Core rule | |
content.resourceId | string | resourceId of the trigger | |
content.rules | string | Link information of the trigger action | |
content.triggerType | string | Trigger type |
Object Storage Trigger
{
"content" : {
"description" : "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters" : {
},
"objectStorageLink" : [
{
"bucketName" : "string",
"eventRuleName" : "string"
}
],
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
Item | Type | Description | Remarks |
---|---|---|---|
content.description | string | Description of the trigger | |
content.limits | Not used | ||
content.name | string | Trigger name | |
content.namespace | string | Namespace of the user | |
content.parameters | object | Default parameter of the trigger | |
content.objectStorageLink | Connected object storage event rule information | ||
content.objectStorageLink[].bucketName | string | Name of the bucket of the connected object storage event rule | |
content.objectStorageLink[].eventRuleName | string | Name of the connected object storage event rule | |
content.resourceId | string | resourceId of the trigger | |
content.rules | string | Link information of the trigger action | |
content.triggerType | string | Trigger type |
Source Commit Trigger
{
"content" : {
"description" : "string",
"limits": {},
"name": "string",
"namespace": "string",
"parameters" : {
},
"sourceCommitLink" : [
{
"enable" : "boolean",
"repositoryName" : "string",
"webhookName" : "string"
}
],
"resourceId": "string",
"rules": {},
"triggerType": "string"
}
}
Item | Type | Description | Remarks |
---|---|---|---|
content.description | string | Description of the trigger | |
content.limits | Not used | ||
content.name | string | Trigger name | |
content.namespace | string | Namespace of the user | |
content.parameters | object | Default parameter of the trigger | |
content.sourceCommitLink | Connected object storage event rule information | ||
content.sourceCommitLink[].enable | boolean | Webhook activation status of the linked Source Commit Repository | |
content.sourceCommitLink[].repositoryName | string | Name of the linked Source Commit Repository | |
content.sourceCommitLink[].webhookName | string | Webhook name of the Source Commit Repository | |
content.resourceId | string | resourceId of the trigger | |
content.rules | string | Link information of the trigger action | |
content.triggerType | string | Trigger type |
Was this article helpful?