Put Trigger
    • PDF

    Put Trigger

    • PDF

    Article Summary

    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

    ParameterRequiredTypeService limitsDescription
    triggerNameYesstringUp to 50 characters are allowed, using English letters, numbers, hyphens (-), or underscores (_)Trigger name

    Request parameters

    Parameter nameRequiredTypeService limitsDescription
    platformNostring(classicvpc)
    typeNostring(basiccron

    >- 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",
            "authentication": "string"
        }
    }
    
    ItemRequiredTypeService limitsDescription
    triggerYesobjectTrigger information
    trigger.descriptionNostringStrings up to 3000 bytesTrigger description
    trigger.parametersNoobjectJSON format. In the form of {"key" : "value"}Set the default parameter of the trigger
    * Parameter application priority when executing an action
    ** #1: the runtime parameters delivered at time of running
    ** #2: the default parameters of the connected trigger
    ** #3: the default parameters of the action
    ** #4: the default parameters of the included package
    linkNo-Link is valid only when creating a trigger
    Not applied when editing
    link.productIdYesstringproductId of the API gateway for creating an external link address
    link.apiNameYesstringapiName of the API gateway for creating an external link address
    link.stageNameYesstringstageName of the API gateway for creating an external link address
    link.authenticationNostring( NONEIAM )

    Cron Trigger

    {
        "trigger": {
            "description": "string",
            "cronOption": "string",
            "parameters": {
    
            }
        }
    }
    
    ItemRequiredTypeService limitsDescription
    triggerYesobjectTrigger information
    trigger.descriptionNostringStrings up to 3000 bytesTrigger description
    trigger.cronOptionYesstringcron expressioncron execution options
    trigger.parametersNoobjectJSON format. In the form of {"key" : "value"}Set the default parameter of the trigger
    * Parameter application priority when executing an action
    ** #1: the runtime parameters delivered at time of running
    ** #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"
        }
    }
    
    ItemRequiredTypeService limitsDescription
    triggerYesobjectTrigger information
    trigger.descriptionNostringStrings up to 3000 bytesTrigger description
    trigger.parametersNoobjectJSON format. In the form of {"key" : "value"}Set the default parameter of the trigger
    * Parameter application priority when executing an action
    ** #1: the runtime parameters delivered at time of running
    ** #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.usernameYesstringGitHub username
    trigger.credentials.accessTokenYesstringGitHub access token
    trigger.credentials.repositoryYesstringIt is necessary to create it in the 'Repository Name' or 'Organization/Repository Name' format, not the URL formatGithub repository
    trigger.eventsYesstring arraySelect 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
    linkNoLink data is valid only when creating a trigger. Not applied when editing
    link.productIdYesstringproductId of the API gateway for creating an external link address
    link.apiNameYesstringapiName of the API gateway for creating an external link address
    link.stageNameYesstringstageName 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"
                    }
              ]
        }
    }
    
    ItemRequiredTypeService limitsDescription
    triggerYesobjectTrigger information
    trigger.descriptionNostringStrings up to 3000 bytesTrigger description
    trigger.parametersNoobjectJSON format. In the form of {"key" : "value"}Set the default parameter of the trigger
    * Parameter application priority when executing an action
    ** #1: the runtime parameters delivered at time of running
    ** #2: the default parameters of the connected trigger
    ** #3: the default parameters of the action
    ** #4: the default parameters of the included package
    trigger.insightLinkYes
    trigger.insightLink[].prodKeyYesstringEvent rule prodKey of Cloud Insight to be connected to Insight Trigger
    trigger.insightLink[].ruleGrpIdYesstringEvent ruleGrpId of the Cloud Insight event rule to be connected to the insight trigger
    trigger.insightLink[].reminderTimeNointegerMIN 5 / MAX 720Reminder notification cycle of the Cloud Insight event rule to be connected to the insight trigger (in minutes)
    trigger.insightLink[].enableNotiWhenEventCloseNobooleanWhether 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"
                    }
              ]
        }
    }
    
    ItemRequiredTypeService limitsDescription
    triggerYesobjectTrigger information
    trigger.descriptionNostringStrings up to 3000 bytesTrigger description
    trigger.parametersNoobjectJSON format. In the form of {"key" : "value"}Set the default parameter of the trigger
    * Parameter application priority when executing an action
    ** #1: the runtime parameters delivered at time of running
    ** #2: the default parameters of the connected trigger
    ** #3: the default parameters of the action
    ** #4: the default parameters of the included package
    trigger.iotLinkYes
    trigger.iotLink[].ruleNameYesstringThe 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"
                    }
              ]
        }
    }
    
    ItemRequiredTypeService limitsDescription
    triggerYesobjectTrigger information
    trigger.descriptionNostringStrings up to 3000 bytesTrigger description
    trigger.parametersNoobjectJSON format. In the form of {"key" : "value"}Set the default parameter of the trigger
    * Parameter application priority when executing an action
    ** #1: the runtime parameters delivered at time of running
    ** #2: the default parameters of the connected trigger
    ** #3: the default parameters of the action
    ** #4: the default parameters of the included package
    trigger.objectStorageLinkYes
    trigger.objectStorageLink[].bucketNameYesstringThe name of the bucket of the object storage to be connected to the object storage trigger
    trigger.objectStorageLink[].eventRuleNameYesstringThe 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"
                    }
              ]
        }
    }
    
    ItemRequiredTypeService limitsDescription
    triggerYesobjectTrigger information
    trigger.descriptionNostringStrings up to 3000 bytesTrigger description
    trigger.parametersNoobjectJSON format. In the form of {"key" : "value"}Set the default parameter of the trigger
    * Parameter application priority when executing an action
    ** #1: the runtime parameters delivered at time of running
    ** #2: the default parameters of the connected trigger
    ** #3: the default parameters of the action
    ** #4: the default parameters of the included package
    trigger.sourceCommitLinkYes
    trigger.sourceCommitLink[].enableNoboolean- Specifies the Webhook activation status of the Source Commit Repository to be linked to the Source Commit Trigger
    - default true
    trigger.sourceCommitLink[].repositoryNameYesstringName of the Source Commit Repository to be linked to the Source Commit Trigger
    trigger.sourceCommitLink[].webhookNameYesstringThe 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"
        }
    }
    
    ItemTypeDescriptionNote
    content.namestringTrigger name
    content.namespacestringNamespace of the user
    content.descriptionstringTrigger description
    content.triggerTypestringTrigger type
    content.resourceIdstringresourceId of the trigger
    content.parametersobjectDefault parameter of the trigger
    content.limitsNot used
    content.rulesstringConnection information of the trigger action

    Cron Trigger

    {
        "content": {
            "cronOption": "string",
            "description": "string",
            "limits": {},
            "name": "string",
            "namespace": "string",
            "parameters": {
    
            },
            "resourceId": "string",
            "rules": {},
            "triggerType": "string"
        }
    }
    
    ItemTypeDescriptionNote
    content.descriptionstringTrigger description
    content.triggerTypestringTrigger type
    content.resourceIdstringresourceId of the trigger
    content.cronOptionsstringCron execution options of the trigger
    content.limitsNot used
    content.namestringTrigger name
    content.namespacestringNamespace of the user
    content.parametersobjectDefault parameter of the trigger
    content.rulesstringConnection 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"
        }
    }
    
    ItemTypeDescriptionNote
    content.credentialsTrigger GitHub linkage information
    content.descriptionstringTrigger description
    content.eventsstringTrigger's GitHub event execution option
    content.limitsNot used
    content.namestringTrigger name
    content.namespacestringNamespace of the user
    content.parametersobjectDefault parameter of the trigger
    content.resourceIdstringresourceId of the trigger
    content.rulesstringConnection information of the trigger action
    content.triggerTypestringTrigger 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"
        }
    }
    
    ItemTypeDescriptionNote
    content.descriptionstringTrigger description
    content.limitsNot used
    content.namestringTrigger name
    content.namespacestringNamespace of the user
    content.parametersobjectDefault parameter of the trigger
    content.insightLinkEvent rule information of Cloud Insight that has been connected
    content.insightLink[].prodKeystringprodKey of the connected Cloud Insight Event Rule
    content.insightLink[].ruleGrpIdstringEvent rule groupId of Cloud Insight that has been connected
    content.insightLink[].reminderTimeintegerReminder notification cycle of the Cloud Insight event rule (in minutes)
    content.insightLink[].enableNotiWhenEventClosebooleanWhether to call the connected Cloud Insight Event Rule when the event ends
    content.resourceIdstringresourceId of the trigger
    content.rulesstringConnection information of the trigger action
    content.triggerTypestringTrigger type

    Cloud IoT Core Trigger

    {
        "content" : {
              "description" : "string",
              "limits": {},
              "name": "string",
              "namespace": "string",
              "parameters" : {
    
              },
              "iotLink" : [
                    {
                        "ruleName" : "string"
                    }
              ],
              "resourceId": "string",
              "rules": {},
              "triggerType": "string"
        }
    }
    
    ItemTypeDescriptionNote
    content.descriptionstringTrigger description
    content.limitsNot used
    content.namestringTrigger name
    content.namespacestringNamespace of the user
    content.parametersobjectDefault parameter of the trigger
    content.iotLinkConnected Cloud IoT Core rule information
    content.iotLink[].ruleNamestringName of the Connected Cloud IoT Core rule
    content.resourceIdstringresourceId of the trigger
    content.rulesstringConnection information of the trigger action
    content.triggerTypestringTrigger type

    Object Storage Trigger

    {
        "content" : {
              "description" : "string",
              "limits": {},
              "name": "string",
              "namespace": "string",
              "parameters" : {
    
              },
              "objectStorageLink" : [
                    {
                      "bucketName" : "string",
                      "eventRuleName" : "string"
                    }
              ],
              "resourceId": "string",
              "rules": {},
              "triggerType": "string"
        }
    }
    
    ItemTypeDescriptionNote
    content.descriptionstringTrigger description
    content.limitsNot used
    content.namestringTrigger name
    content.namespacestringNamespace of the user
    content.parametersobjectDefault parameter of the trigger
    content.objectStorageLinkConnected object storage event rule information
    content.objectStorageLink[].bucketNamestringName of the bucket of the connected object storage event rule
    content.objectStorageLink[].eventRuleNamestringName of the connected object storage event rule
    content.resourceIdstringresourceId of the trigger
    content.rulesstringConnection information of the trigger action
    content.triggerTypestringTrigger 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"
        }
    }
    
    ItemTypeDescriptionNote
    content.descriptionstringTrigger description
    content.limitsNot used
    content.namestringTrigger name
    content.namespacestringNamespace of the user
    content.parametersobjectDefault parameter of the trigger
    content.sourceCommitLinkConnected object storage event rule information
    content.sourceCommitLink[].enablebooleanWebhook activation status of the linked Source Commit Repository
    content.sourceCommitLink[].repositoryNamestringName of the linked Source Commit Repository
    content.sourceCommitLink[].webhookNamestringWebhook name of the Source Commit Repository
    content.resourceIdstringresourceId of the trigger
    content.rulesstringConnection information of the trigger action
    content.triggerTypestringTrigger 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.