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) | - 트리거 타입<br |
data-tomark-pass >- default basic으로 처리됨|
요청 바디
요청 바디는 트리거 타입에 따라 확인해 주십시오.
Basic Trigger
{
"trigger": {
"description": "string",
"parameters": {
}
},
"link": {
"productId": "string",
"apiName": "string",
"stageName": "string"
}
}
항목 | 필수 여부 | 타입 | 제약 사항 | 설명 |
---|---|---|---|---|
trigger | Yes | object | 트리거 정보 | |
trigger.description | No | string | 3000 bytes 이내 문자열 | 트리거 설명 |
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 | 3000 bytes 이내 문자열 | 트리거 설명 |
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 | 3000 bytes 이내 문자열 | 트리거 설명 |
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 | 3000 bytes 이내 문자열 | 트리거 설명 |
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 | 3000 bytes 이내 문자열 | 트리거 설명 |
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 | 3000 bytes 이내 문자열 | 트리거 설명 |
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 | 3000 bytes 이내 문자열 | 트리거 설명 |
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 | 트리거 타입 |
이 문서가 도움이 되었습니까?