Put Package
- Print
- PDF
Put Package
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
Create or edit a Cloud Functions package.
Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
PUT | /packages/{packageName} |
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
|
Request query parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
platform | String | Optional | Platform type
|
Request body
The following describes the request body. If there are no fields in the request body, it should be requested as {}
empty JSON object.
Field | Type | Required | Description |
---|---|---|---|
description | String | Optional | Package description (byte)
|
parameters | Object | Optional | Default parameters of the package
|
Request example
The following is a sample request.
curl --location --request PUT 'https://cloudfunctions.apigw.ntruss.com/ncf/api/v2/packages/package001?platform=vpc' \
--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} \
--data '<See below>'
{
"description": "Create package",
"parameters": {
"name": "Cloud Funtions",
"place": "Naver Cloud Platform"
}
}
Response
The following describes the response format.
Response body
The following describes the response body.
Field | Type | Description |
---|---|---|
content.description | String | Package description |
content.name | String | Package name |
content.namespace | String | Namespace of the user |
content.parameters | Object | Default parameters of the package |
content.resourceId | String | Package's resource ID |
Response status codes
The following describes the response status codes.
HTTP status code | Code | Message | Description |
---|---|---|---|
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 |
403 | 80002 | SUB_ACC_NO_PERMISSION | Detailed permission error |
409 | 80011 | RESOURCE_NAME_CONFLICT | Duplicate resource name |
422 | 80106 | PACKAGE_COUNT_EXCEED | Maximum number of packages exceeded |
Response example
The following is a sample example.
{
"content": {
"description": "Create package",
"name": "package001",
"namespace": "****YBN*****",
"parameters": {
"name": "Cloud Funtions",
"place": "Naver Cloud Platform"
},
"resourceId": "xS***"
}
}
Was this article helpful?