Cloud Functions is a service that allows you to easily run code by creating code and registering it as actions. You can easily run the desired business logic without the burden of managing servers.
To learn how to use Cloud Functions API, please see the following guide.
Common Cloud Functions settings
The following describes commonly used request and response formats in Datafence APIs.
Request
The following describes the common request format.
API URL
The request API URL is as follows:
| Region | Version | API URL | Platform |
|---|---|---|---|
| Korea | v2.0 | https://cloudfunctions.apigw.ntruss.com/api/v2 | Classic, VPC |
| Korea | v2.1 | https://cloudfunctions.apigw.ntruss.com/ncf/api/v2 | Classic, VPC |
| Singapore | v2.0 | https://sg-cloudfunctions.apigw.ntruss.com/api/v2 | VPC |
| Singapore | v2.1 | https://sg-cloudfunctions.apigw.ntruss.com/ncf/api/v2 | VPC |
| Japan | v2.0 | https://jp-cloudfunctions.apigw.ntruss.com/api/v2 | VPC |
| Japan | v2.1 | https://jp-cloudfunctions.apigw.ntruss.com/ncf/api/v2 | VPC |
Request headers
| Header name | Required | Description |
|---|---|---|
x-ncp-apigw-timestamp |
Required | This is the number of milliseconds that have elapsed since January 1, 1970 00:00:00 UTC.
|
x-ncp-iam-access-key |
Required | Access key issued on NAVER Cloud Platform
|
x-ncp-apigw-signature-v2 |
Required | Base64-encoded signature that encrypts the request information with a secret key that maps to the access key issued on NAVER Cloud Platform, using the HMAC encryption algorithm (HmacSHA256)
|
Content-type |
Required | Request data format
|
Response
The following describes the common response format.
Response body
The response body includes the following data:
error
error defines the API call failure information. The following describes error.
| Field | Type | Required | Description |
|---|---|---|---|
error |
Object | - | Error code and message |
error.errorCode |
String | Required | Error code |
error.message |
String | Required | Error message |
error.details |
String | Required | Error message detailed description |
Response status codes
The following describes the response status codes.
| HTTP status code | Code | Message | Description |
|---|---|---|---|
| 400 | 80000 | INTERNAL_EXCEPTION | Invalid request parameter |
| 400 | 80100 | PACKAGE_INVALID_NAME | Invalid name format |
| 400 | 80102 | PACKAGE_PLATFORM_MISMATCH | Invalid platform parameter |
| 400 | 80103 | PACKAGE_BODY_INVALID_TYPE | Invalid request body field type |
| 400 | 80104 | PACKAGE_BODY_MISSING_FIELD | Missing required fields in the request body |
| 400 | 80105 | PACKAGE_BODY_INVALID_VALUE | Invalid request body field value |
| 400 | 80300 | ACTION_INVALID_NAME | Invalid action name |
| 400 | 80302 | ACTION_PLATFORM_MISMATCH | Invalid platform parameter |
| 400 | 80303 | ACTION_INVALID_TYPE | Invalid action type |
| 400 | 80304 | ACTION_TYPE_MISMATCH | Action's type can't be changed |
| 400 | 80305 | ACTION_BODY_INVALID_TYPE | Invalid request body field type |
| 400 | 80306 | ACTION_BODY_MISSING_FIELD | Missing required fields in the request body |
| 400 | 80307 | ACTION_BODY_INVALID_VALUE | Invalid request body field value |
| 400 | 80316 | ACTION_INVALID_RUNTIME_PARAMS | Invalid request body format |
| 400 | 80500 | TRIGGER_INVALID_NAME | Invalid trigger name |
| 400 | 80502 | TRIGGER_PLATFORM_MISMATCH | Invalid platform parameter |
| 400 | 80503 | TRIGGER_INVALID_TYPE | Invalid trigger type |
| 400 | 80504 | TRIGGER_TYPE_MISMATCH | Trigger type can't be changed |
| 400 | 80505 | TRIGGER_BODY_INVALID_TYPE | Invalid request body field type |
| 400 | 80506 | TRIGGER_BODY_MISSING_FIELD | Missing required fields in the request body |
| 400 | 80507 | TRIGGER_BODY_INVALID_VALUE | Invalid request body field value |
| 400 | 80511 | TRIGGER_INVALID_RUNTIME_PARAMS | Request body error |
| 400 | 80512 | TRIGGER_INVOKE_FAIL | Unable to execute because no action is associated with the trigger |
| 400 | 80520 | RULE_BODY_INVALID_TYPE | Invalid request body field type |
| 400 | 80521 | RULE_BODY_MISSING_FIELD | Missing required fields in the request body |
| 400 | 80700 | NO_APIGW_SUBSCRIPTION | Need to subscribe to API Gateway |
| 400 | 80710 | NO_INSIGHT_SUBSCRIPTION | Need to subscribe to Cloud Insight |
| 400 | 80711 | INSIGHT_INVALID_EVENT_RULE | Invalid Cloud Insight event rule information |
| 400 | 80730 | NO_OBJECT_STORAGE_SUBSCRIPTION | Need to subscribe to Object Storage |
| 400 | 80731 | OBJECT_STORAGE_INVALID_EVENT_RULE | Invalid Object Storage event rule information |
| 400 | 80740 | SOURCE_COMMIT_INVALID_WEBHOOK | Invalid SourceCommit webhook information |
| 400 | 80750 | NO_SECRET_MANGER_SUBSCRIPTION | Need to subscribe to Secret Manager |
| 400 | 80751 | SECRET_MANAGER_INVALID_SECRET | Invalid Secret Manager secret information |
| 400 | 80752 | SECRET_MANAGER_SECRET_ROTATING | Secret Manager secret being replaced |
| 403 | 80002 | SUB_ACC_NO_PERMISSION | Resource viewing permission error |
| 404 | 80101 | PACKAGE_NOT_FOUND | Package not found |
| 404 | 80301 | ACTION_NOT_FOUND | Action not found |
| 404 | 80322 | ACTION_ACTIVATION_NOT_FOUND | Execution history not found |
| 404 | 80501 | TRIGGER_NOT_FOUND | Trigger not found |
| 404 | 80517 | TRIGGER_ACTIVATION_NOT_FOUND | Execution history not found |
| 404 | 80900 | RULE_NOT_FOUND | Trigger and action not associated |
| 409 | 80011 | RESOURCE_NAME_CONFLICT | Duplicate resource name |
| 409 | 80109 | PACKAGE_NOT_EMPTY | Package can't be deleted because it has actions associated with it |
| 422 | 80106 | PACKAGE_COUNT_EXCEED | Maximum number of packages exceeded |
| 422 | 80308 | ACTION_COUNT_EXCEED | Maximum number of actions exceeded |
| 422 | 80508 | TRIGGER_COUNT_EXCEED | Maximum number of triggers exceeded |
| 500 | 81311 | ACTION_NAT_EXCEPTION | Subnet query failed |
| 500 | 81312 | NAT_CREATE_FAIL | Subnet connection failed |
| 500 | 81313 | NAT_BEING_CREATED | Subnet being connected |
| 500 | 81314 | NAT_RETURN_FAIL | Subnet being disconnected |
| - | 80005 | INTEGRATION_EXCEPTION | Need to subscribe to the integrated service |
Response example
For response examples when a call is successful, see each API specification. The following is a sample response upon a failed call.
{
"error": {
"errorCode": "string",
"message": "string",
"details": "string"
}
}