Put package

Prev Next

Available in Classic and VPC

Create or edit a Cloud Functions package.

Request

This section describes the request format. The method and URI are as follows:

Method URI
PUT /packages/{packageName}

Request headers

For information about the headers common to all Cloud Funtions APIs, see Common Cloud Functions headers.

Request path parameters

The following describes the parameters.

Field Type Required Description
packageName String Required Package name
  • 1 to 50 characters, including English letters, numbers, and special characters "-" and "_", and it can't start with "-"

Request query parameters

The following describes the parameters.

Field Type Required Description
platform String Optional Platform type
  • vpc | classic (default)

Request body

You can include the following data in the body of your request: If there are no fields in the request body, it should be requested as {} empty JSON object.

Field Type Required Description
description String Optional Description of the package (byte)
  • 0 - 3000
parameters Object Optional Package default parameters
  • JSON in the form of {"key": "value"}
  • Priority of applying parameters when running actions
    • 1st priority: runtime parameters passed at runtime
    • 2nd priority: default parameters of the associated trigger
    • 3rd priority: default parameters of the action
    • 4th priority: default parameters of the included packages

Request example

The request example is as follows:

curl --location --request PUT 'https://cloudfunctions.apigw.ntruss.com/api/v2/packages/package003?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} \
--data '<See below>'
{
    "description": "Create package",
    "parameters": {
        "name": "package003",
    }
}

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Description
content.description String Package description
content.name String Package name
content.namespace String User namespace
content.parameters Object Default parameter of the package
content.resourceId String Package's resource ID

Response status codes

For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.

Response example

The response example is as follows:

{
    "content": {
        "description": "put package",
        "name": "package003",
        "namespace": "****YBN*****",
        "parameters": {
            "name": "package003"
        },
        "resourceId": "xn***"
    }
}