Put Trigger
    • PDF

    Put Trigger

    • PDF

    Article Summary

    개요

    트리거를 생성 및 수정합니다.

    요청

    요청 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

    파라미터필수 여부타입제약 사항설명
    triggerNameYesstring영문, 숫자, 붙임표(-) , 밑줄 문자( _ )로 구성하여 50자 이내만 허용함트리거 이름

    요청 파라미터

    파라미터명필수 여부타입제약 사항설명
    platformNostring(classic | vpc)- 플랫폼 타입
    - default classic으로 처리됨
    typeNostring(basic | cron | github | insight | iot | object_storage | source_commit)- 트리거 타입<br

    data-tomark-pass >- default basic으로 처리됨|

    요청 바디

    요청 바디는 트리거 타입에 따라 확인해 주십시오.

    Basic Trigger

    {
      "trigger": {
          "description": "string",
          "parameters": {
    
          }
      },
        "link": {
            "productId": "string",
            "apiName": "string",
            "stageName": "string",
            "authentication": "string"
        }
    }
    
    항목필수 여부타입제약 사항설명
    triggerYesobject트리거 정보
    trigger.descriptionNostring3000 bytes 이내 문자열트리거 설명
    trigger.parametersNoobjectJSON 형식. {"key" : "value"}의 형태트리거의 디폴트 파라미터 설정
    * 액션 실행시 파라미터 적용 우선 순위
    ** 1순위: 실행 시점에 전달되는 런타임 파라미터
    ** 2순위: 연결된 트리거의 디폴트 파라미터
    ** 3순위: 액션의 디폴트 파라미터
    ** 4순위: 포함된 패키지의 디폴트 파라미터
    linkNo-link는 트리거 생성시에만 유효
    수정 시에는 적용되지 않음
    link.productIdYesstring외부 연결 주소를 생성하기 위한 API gateway의 productId
    link.apiNameYesstring외부 연결 주소를 생성하기 위한 API gateway의 apiName
    link.stageNameYesstring외부 연결 주소를 생성하기 위한 API gateway의 stageName
    link.authenticationNostring( NONE | IAM )외부 연결 주소 호출시 API gateway의 인증 방식. default NONE

    Cron Trigger

    {
        "trigger": {
            "description": "string",
            "cronOption": "string",
            "parameters": {
    
            }
        }
    }
    
    항목필수 여부타입제약 사항설명
    triggerYesobject트리거 정보
    trigger.descriptionNostring3000 bytes 이내 문자열트리거 설명
    trigger.cronOptionYesstringcron expressioncron 실행 옵션
    trigger.parametersNoobjectJSON 형식. {"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"
        }
    }
    
    항목필수 여부타입제약 사항설명
    triggerYesobject트리거 정보
    trigger.descriptionNostring3000 bytes 이내 문자열트리거 설명
    trigger.parametersNoobjectJSON 형식. {"key" : "value"}의 형태트리거의 디폴트 파라미터 설정
    * 액션 실행시 파라미터 적용 우선 순위
    ** 1순위: 실행 시점에 전달되는 런타임 파라미터
    ** 2순위: 연결된 트리거의 디폴트 파라미터
    ** 3순위: 액션의 디폴트 파라미터
    ** 4순위: 포함된 패키지의 디폴트 파라미터
    trigger.credentials.usernameYesstringGithub 유저 이름
    trigger.credentials.accessTokenYesstringGithub 액세스 토큰
    trigger.credentials.repositoryYesstringURL 형식이 아닌 '레파지토리명' 혹은 'Organization/레파지토리명' 형식으로 작성 필요Github 레파지토리
    trigger.eventsYesstring 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" 중 다중 선택 가능트리거할 이벤트 리스트
    linkNolink 데이터는 트리거 생성 시에만 유효. 수정시에는 적용되지 않음
    link.productIdYesstring외부 연결 주소를 생성하기 위한 API gateway의 productId
    link.apiNameYesstring외부 연결 주소를 생성하기 위한 API gateway의 apiName
    link.stageNameYesstring외부 연결 주소를 생성하기 위한 API gateway의 stageName

    Cloud Insight Trigger

    {
        "trigger" : {
              "description" : "string",
              "parameters" : {
    
              },
              "insightLink" : [
                    {
                        "prodKey" : "string",
                        "ruleGrpId" : "string",
                        "reminderTime" : "integer",
                        "enableNotiWhenEventClose" : "boolean"
                    }
              ]
        }
    }
    
    항목필수 여부타입제약 사항설명
    triggerYesobject트리거 정보
    trigger.descriptionNostring3000 bytes 이내 문자열트리거 설명
    trigger.parametersNoobjectJSON 형식. {"key" : "value"}의 형태트리거의 디폴트 파라미터 설정
    * 액션 실행시 파라미터 적용 우선 순위
    ** 1순위: 실행 시점에 전달되는 런타임 파라미터
    ** 2순위: 연결된 트리거의 디폴트 파라미터
    ** 3순위: 액션의 디폴트 파라미터
    ** 4순위: 포함된 패키지의 디폴트 파라미터
    trigger.insightLinkYes
    trigger.insightLink[].prodKeyYesstringInsight Trigger에 연결할 Cloud Insight Event Rule의 prodKey
    trigger.insightLink[].ruleGrpIdYesstringInsight Trigger에 연결할 Cloud Insight Event Rule의 ruleGrpId
    trigger.insightLink[].reminderTimeNointegerMIN 5 / MAX 720Insight Trigger에 연결할 Cloud Insight Event Rule의 리마인드 알림 주기 (분 단위)
    trigger.insightLink[].enableNotiWhenEventCloseNobooleanInsight Trigger에 연결할 Cloud Insight Event Rule을 Event 종료 시에도 호출할 지 여부 / default false

    Cloud IoT Core Trigger

    {
        "trigger" : {
              "description" : "string",
              "parameters" : {
    
              },
              "iotLink" : [
                    {
                      "ruleName" : "string"
                    }
              ]
        }
    }
    
    항목필수 여부타입제약 사항설명
    triggerYesobject트리거 정보
    trigger.descriptionNostring3000 bytes 이내 문자열트리거 설명
    trigger.parametersNoobjectJSON 형식. {"key" : "value"}의 형태트리거의 디폴트 파라미터 설정
    * 액션 실행시 파라미터 적용 우선 순위
    ** 1순위: 실행 시점에 전달되는 런타임 파라미터
    ** 2순위: 연결된 트리거의 디폴트 파라미터
    ** 3순위: 액션의 디폴트 파라미터
    ** 4순위: 포함된 패키지의 디폴트 파라미터
    trigger.iotLinkYes
    trigger.iotLink[].ruleNameYesstringCloud 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"
                    }
              ]
        }
    }
    
    항목필수 여부타입제약 사항설명
    triggerYesobject트리거 정보
    trigger.descriptionNostring3000 bytes 이내 문자열트리거 설명
    trigger.parametersNoobjectJSON 형식. {"key" : "value"}의 형태트리거의 디폴트 파라미터 설정
    * 액션 실행시 파라미터 적용 우선 순위
    ** 1순위: 실행 시점에 전달되는 런타임 파라미터
    ** 2순위: 연결된 트리거의 디폴트 파라미터
    ** 3순위: 액션의 디폴트 파라미터
    ** 4순위: 포함된 패키지의 디폴트 파라미터
    trigger.objectStorageLinkYes
    trigger.objectStorageLink[].bucketNameYesstringObject Storage Trigger에 연결할 Object Storage의 Bucket 이름
    trigger.objectStorageLink[].eventRuleNameYesstringObject Storage Trigger에 연결할 Object Storage의 Event Rule 이름

    Source Commit Trigger

    참고
    • SourceCommit 타입 트리거는 한국 리전, VPC 플랫폼만 지원합니다.
    {
        "trigger" : {
              "description" : "string",
              "parameters" : {
    
              },
              "sourceCommitLink" : [
                    {
                      "enable": "boolean",
                      "repositoryName" : "string",
                      "webhookName" : "string"
                    }
              ]
        }
    }
    
    항목필수 여부타입제약 사항설명
    triggerYesobject트리거 정보
    trigger.descriptionNostring3000 bytes 이내 문자열트리거 설명
    trigger.parametersNoobjectJSON 형식. {"key" : "value"}의 형태트리거의 디폴트 파라미터 설정
    * 액션 실행시 파라미터 적용 우선 순위
    ** 1순위: 실행 시점에 전달되는 런타임 파라미터
    ** 2순위: 연결된 트리거의 디폴트 파라미터
    ** 3순위: 액션의 디폴트 파라미터
    ** 4순위: 포함된 패키지의 디폴트 파라미터
    trigger.sourceCommitLinkYes
    trigger.sourceCommitLink[].enableNoboolean- Source Commit Trigger에 연결할 Source Commit Repository의 Webhook 활성화 상태 지정
    - default true
    trigger.sourceCommitLink[].repositoryNameYesstringSource Commit Trigger에 연결할 Source Commit Repository 이름
    trigger.sourceCommitLink[].webhookNameYesstringSource Commit Trigger에 연결할 Source Commit Repository의 Webhook 이름

    응답

    응답 바디

    Basic Trigger

    {
        "content": {
            "name": "string",
            "namespace": "string",
            "description": "string",
            "limits": {},
            "parameters": {
    
            },
            "resourceId": "string",
            "rules": {},
            "triggerType": "string"
        }
    }
    
    항목타입설명비고
    content.namestring트리거 이름
    content.namespacestring사용자의 네임스페이스
    content.descriptionstring트리거 설명
    content.triggerTypestring트리거 타입
    content.resourceIdstring트리거의 resourceId
    content.parametersobject트리거의 디폴트 파라미터
    content.limits사용하지 않음
    content.rulesstring트리거 액션 연결 정보

    Cron Trigger

    {
        "content": {
            "cronOption": "string",
            "description": "string",
            "limits": {},
            "name": "string",
            "namespace": "string",
            "parameters": {
    
            },
            "resourceId": "string",
            "rules": {},
            "triggerType": "string"
        }
    }
    
    항목타입설명비고
    content.descriptionstring트리거 설명
    content.triggerTypestring트리거 타입
    content.resourceIdstring트리거의 resourceId
    content.cronOptionsstring트리거의 Cron 실행옵션
    content.limits사용하지 않음
    content.namestring트리거 이름
    content.namespacestring사용자의 네임스페이스
    content.parametersobject트리거의 디폴트 파라미터
    content.rulesstring트리거 액션 연결 정보

    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.descriptionstring트리거 설명
    content.eventsstring트리거의 실행 github event 옵션
    content.limits사용하지 않음
    content.namestring트리거 이름
    content.namespacestring사용자의 네임스페이스
    content.parametersobject트리거의 디폴트 파라미터
    content.resourceIdstring트리거의 resourceId
    content.rulesstring트리거 액션 연결 정보
    content.triggerTypestring트리거 타입

    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.descriptionstring트리거 설명
    content.limits사용하지 않음
    content.namestring트리거 이름
    content.namespacestring사용자의 네임스페이스
    content.parametersobject트리거의 디폴트 파라미터
    content.insightLink연결된 Cloud Insight의 Event Rule 정보
    content.insightLink[].prodKeystring연결된 Cloud Insight Event Rule의 prodKey
    content.insightLink[].ruleGrpIdstring연결된 Cloud Insight Event Rule의 groupId
    content.insightLink[].reminderTimeinteger연결된 Cloud Insight Event Rule의 리마인드 알림 주기 (분 단위)
    content.insightLink[].enableNotiWhenEventCloseboolean연결된 Cloud Insight Event Rule을 Event 종료 시에도 호출할 지 여부
    content.resourceIdstring트리거의 resourceId
    content.rulesstring트리거 액션 연결 정보
    content.triggerTypestring트리거 타입

    Cloud IoT Core Trigger

    {
        "content" : {
              "description" : "string",
              "limits": {},
              "name": "string",
              "namespace": "string",
              "parameters" : {
    
              },
              "iotLink" : [
                    {
                        "ruleName" : "string"
                    }
              ],
              "resourceId": "string",
              "rules": {},
              "triggerType": "string"
        }
    }
    
    항목타입설명비고
    content.descriptionstring트리거 설명
    content.limits사용하지 않음
    content.namestring트리거 이름
    content.namespacestring사용자의 네임스페이스
    content.parametersobject트리거의 디폴트 파라미터
    content.iotLink연결된 Cloud IoT Core 규칙 정보
    content.iotLink[].ruleNamestring연결된 Cloud IoT Core 규칙의 이름
    content.resourceIdstring트리거의 resourceId
    content.rulesstring트리거 액션 연결 정보
    content.triggerTypestring트리거 타입

    Object Storage Trigger

    {
        "content" : {
              "description" : "string",
              "limits": {},
              "name": "string",
              "namespace": "string",
              "parameters" : {
    
              },
              "objectStorageLink" : [
                    {
                      "bucketName" : "string",
                      "eventRuleName" : "string"
                    }
              ],
              "resourceId": "string",
              "rules": {},
              "triggerType": "string"
        }
    }
    
    항목타입설명비고
    content.descriptionstring트리거 설명
    content.limits사용하지 않음
    content.namestring트리거 이름
    content.namespacestring사용자의 네임스페이스
    content.parametersobject트리거의 디폴트 파라미터
    content.objectStorageLink연결된 Object Storage Event Rule의 정보
    content.objectStorageLink[].bucketNamestring연결된 Object Storage Event Rule의 Bucket 이름
    content.objectStorageLink[].eventRuleNamestring연결된 Object Storage Event Rule의 이름
    content.resourceIdstring트리거의 resourceId
    content.rulesstring트리거 액션 연결 정보
    content.triggerTypestring트리거 타입

    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.descriptionstring트리거 설명
    content.limits사용하지 않음
    content.namestring트리거 이름
    content.namespacestring사용자의 네임스페이스
    content.parametersobject트리거의 디폴트 파라미터
    content.sourceCommitLink연결된 Object Storage Event Rule의 정보
    content.sourceCommitLink[].enableboolean연결된 Source Commit Repository의 Webhook 활성화 상태
    content.sourceCommitLink[].repositoryNamestring연결된 Source Commit Repository 이름
    content.sourceCommitLink[].webhookNamestringSource Commit Repository의 Webhook 이름
    content.resourceIdstring트리거의 resourceId
    content.rulesstring트리거 액션 연결 정보
    content.triggerTypestring트리거 타입

    이 문서가 도움이 되었습니까?

    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.