Put Trigger
  • PDF

Put Trigger

  • PDF

Summary

Creates and edits triggers.

Request

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

Parameter 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 Yes string (basic | cron | github | insight | iot | object_storage) - Trigger type
- Processed as default basic

Request body

Please check the request body 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.description No string String up to 3000 bytes Trigger description
trigger.parameter No JSON format. {"key" : "value"} format - Sets the default parameter of the action
- The top priority for parameter application is placed on the parameter delivered at the time of execution, followed by the default parameter of the action, and then the parameter of the package, in descending order
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.description No string String up to 3000 bytes Trigger description
trigger.cronOption Yes string cron expression Cron execution option
trigger.parameter No JSON format. {"key" : "value"} format - Sets the default parameter of the action
- The top priority for parameter application is placed on the parameter delivered at the time of execution, followed by the default parameter of the action, and then the parameter of the package, in descending order

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.description No string String up to 3000 bytes Trigger description
trigger.parameter No JSON format. {"key" : "value"} format - Sets the default parameter of the action
- The top priority for parameter application is placed on the parameter delivered at the time of execution, followed by the default parameter of the action, and then the parameter of the package, in descending order
trigger.credentials.username Yes string GitHub user name
trigger.credentials.accessToken Yes string GitHub access token
trigger.credentials.repository Yes string Need to use "repository name" or "Organization/repository name" format rather than a URL format GitHub repository
trigger.events Yes string array Multiple selections are available for event types among "*", "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.description No string String up to 3000 bytes Trigger description
trigger.parameters Yes JSON format. {"key" : "value"} format - Sets the default parameter of the trigger
- The top priority for parameter application is placed on the parameter delivered at the time of execution, followed by the default parameter of the action, and then the parameter of the package, in descending order
insightLink Yes
insightLink[].prodKey Yes string prodKey of the Cloud Insight event rule to be connected to the insight trigger
insightLink[].ruleGrpId Yes string prodKey of the Cloud Insight event rule to be connected to the insight 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 (by minute)
insightLink[].enableNotiWhenEventClose No boolean Whether to call Cloud Insight event rule to be connected to the insight trigger even when ending the event / default false

Cloud IoT Core trigger

{
    "trigger" : {
          "description" : "string",
          "parameters" : {

          },
          "iotLink" : [
                {
                  "ruleName" : "string"
                }
          ]
    }
}
Item Requirement status Type Restrictions Description
trigger.description No string String up to 3000 bytes Trigger description
trigger.parameters Yes JSON format. {"key" : "value"} format Sets the default parameter of the trigger
The top priority for parameter application is placed on the parameter delivered at the time of execution, followed by the default parameter of the action, and then the parameter of the package, in descending order
trigger.iotLink Yes
trigger.iotLink[].ruleName Yes string The rule names of Cloud IoT Core to connect with Cloud IoT Core trigger

Object Storage trigger

Caution

If the same bucket is used by an Object Storage event rule and an action connected to the Object Storage trigger, it may cause increased usage and excessive costs due to recursive calls.

Note

Object Storage type trigger is supported only in Korea region.

{
    "trigger" : {
          "description" : "string",
          "parameters" : {

          },
          "objectStorageLink" : [
                {
                  "bucketName" : "string",
                  "eventRuleName" : "string"
                }
          ]
    }
}
Item Requirement status Type Restrictions Description
trigger.description No string String up to 3000 bytes Trigger description
trigger.parameters Yes JSON format. {"key" : "value"} format - Sets the default parameter of the trigger
- The top priority for parameter application is placed on the parameter delivered at the time of execution, followed by the default parameter of the action, and then the parameter of the package, in descending order
trigger.objectStorageLink Yes
trigger.objectStorageLink[].bucketName Yes string Name of the Object Storage bucket to be connected to the Object Storage trigger
trigger.objectStorageLink[].eventName Yes string Name of the Object Storage event rule to be connected to the Object Storage trigger

Response

Response body

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 Trigger description
content.triggerType string Trigger type
content.resourceId string resourceId of the trigger
content.parameters string Default parameter of the trigger
content.limit 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 Trigger description
content.triggerType string Trigger type
content.resourceId string resourceId of the trigger
content.cronOptions string Trigger's Cron execution option
content.limit Not used
content.name string Trigger name
content.namespace string Namespace of the user
content.parameters string 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 Trigger description
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 map array 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 Trigger description
content.limits Not used
content.name string Trigger name
content.namespace string Namespace of the user
content.parameters map array Default parameter of the trigger
content.insightLink Event rule information of the connected Cloud Insight
content.insightLink[].prodKey string prodKey of the connected Cloud Insight event rule
content.insightLink[].ruleGrpId string groupId of the connected Cloud Insight event rule
content.insightLink[].reminderTime integer Reminder notification interval of the connected Cloud Insight event rule (by minute)
content.insightLink[].enableNotiWhenEventClose boolean Whether to call connected Cloud Insight event rule even when ending the event
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 Trigger description
content.limits Not used
content.name string Trigger name
content.namespace string Namespace of the user
content.parameters map array Default parameter of the trigger
content.iotLink Rule information of the connected Cloud IoT Core
content.iotLink[].ruleName string The 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

Note

Object Storage type trigger is supported only in Korea region.

{
    "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 Trigger description
content.limits Not used
content.name string Trigger name
content.namespace string Namespace of the user
content.parameters map array Default parameter of the trigger
content.objectStorageLink Information of the connected Object Storage event rule
content.objectStorageLink[].bucketName string Bucket name 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

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.