Get action
- Print
- PDF
Get action
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
class="platform-info type-classic/vpc">Available in Classic and VPC
View a Cloud Functions action.
Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
GET | /packages/{packageName}/actions/{actionName} |
Request headers
For headers common to all Cloud Functions APIs, see Cloud Functions common headers.
Request path parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
packageName | String | Required | Package name
|
actionName | String | Required | Action name |
Request query parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
platform | String | Optional | Platform type
|
Request example
The following is a sample request.
curl --location --request GET 'https://cloudfunctions.apigw.ntruss.com/api/v2/packages/package003/actions?platform=classic' \
--header 'Content-Type: application/json' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Sub Account Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
Response
The following describes the response format.
Response body
The following describes the response body.
Basic action
The following describes the response body for basic actions.
Field | Type | Description |
---|---|---|
content.custom-options | Boolean | - |
content.description | String | Action description |
content.exec.binary | Boolean | Whether the action code file is binary or not |
content.exec.code | String | Action source code or Base64-encoded code file binary |
content.exec.kind | String | Language used |
content.exec.main | String | Functions to execute |
content.limits.memory | Integer | Size of memory allocated to the action container |
content.limits.timeout | Integer | Maximum time an action can run |
content.name | String | Action name |
content.parameters | Object | Default parameter of the action |
content.vpc | Object | VPC information
|
content.vpc.vpcNo | Integer | Number of connected VPC |
content.vpc.subnetNo | Integer | Number of connected subnet |
content.path | String | Action path |
content.raw-http | Boolean | Whether to use HTTP origin
|
content.resourceId | String | Action's resource ID |
content.web | Boolean | Set web action |
Sequence action
The following describes the response body for sequence actions.
Field | Type | Description |
---|---|---|
content.description | String | Action description |
content.exec.components | String[] | List of associated actions |
content.exec.kind | String | Action type
|
content.name | String | Action name |
content.path | String | Action path |
content.resourceId | String | Action's resource ID |
content.web | Boolean | Set web action |
Response status codes
The following describes the response status codes.
HTTP status code | Code | Message | Description |
---|---|---|---|
400 | 80302 | ACTION_PLATFORM_MISMATCH | Invalid platform parameter |
403 | 80002 | SUB_ACC_NO_PERMISSION | Resource viewing permission error |
404 | 80301 | ACTION_NOT_FOUND | Action not found |
Response example
The following is a sample response.
{
"content": {
"custom-options": false,
"description": "Create Action",
"exec": {
"binary": false,
"code": "function main(params) { \nlet name = params.name || \"World\";\nlet place = params.place || \"Naver\"; \n return {payload: \"abc\"};\n}",
"kind": "nodejs:16",
"main": "main"
},
"limits": {
"memory": 128,
"timeout": 60000
},
"name": "action000",
"parameters": {
"name": "action000"
},
"path": "****YBNzcd4Z/package003",
"raw-http": false,
"resourceId": "Sy***",
"web": false
}
}
Was this article helpful?