Edit authorizer

Prev Next

Available in Classic and VPC

Change the authorizer settings.

Request

The following describes the request format for the endpoint. The request format is as follows:

Method URI
PUT /authorizers/{authorizer-id}

Request headers

For headers common to API Gateway, see API Gateway common request headers.

Request path parameters

The following describes the parameters.

Field Type Required Description
authorizer-id String Required ID of authorizer to edit

Request syntax

The request syntax is as follows.

{
  "authorizerName" : "authorizerName",
  "authorizerConfig" : {
    "functionId" : "functionId",
    "payload" : [ {
      "in" : "HEADER",
      "name" : "name"
    } ],
    "region" : "region"
  },
  "authorizerType" : "CLOUD_FUNCTIONS",
  "authorizerDescription" : "authorizerDescription"
}

Request body

The following describes the request body.

Field Type Required Description
authorizerName String Required Authorizer name
  • 1 to 20 characters, including English letters, numbers, and special characters "_" and "-"
authorizerConfig Object Required Configuration information for the authorizer
authorizerConfig.functionId String Required Function name of the service (type) to be supported by the authorizer
  • <E.g.> Action name of the Cloud Functions service
authorizerConfig.payload[] String Required Select the request type (header or query string) and enter a variable name for passing to the authorizer for authentication processing
authorizerConfig.payload[].in String Required Type of payload
  • HEADER | QUERY STRING
    • HEADER: header
    • QUERY STRING: query string
authorizerConfig.payload[].name String Required Payload variable name
authorizerConfig.region String Required Region code for the Cloud Functions, which is a supported service (type) for the authorizer
  • KR | JPN | SGN
  • Input value can't be null
authorizerType String Required Authorizer's support service (type)
  • CLOUD_FUNCTIONS
authorizerDescription String Optional Description of the authorizer to create
  • 0 - 300 characters

Request example

The following is a sample request.

curl -X PUT 'https://apigateway.apigw.ntruss.com/api/v1/authorizers' \
--header 'Content-Type: application/json' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
--data '{
  "authorizerName" : "authorizer-***",
  "authorizerConfig" : {
    "functionId" : "functionId",
    "payload" : [ {
      "in" : "HEADER",
      "name" : "payload-***"
    } ],
    "region" : "region"
  },
  "authorizerType" : "CLOUD_FUNCTIONS",
  "authorizerDescription" : "authorizer-*** Description"
}'

Response

The following describes the response format.

Response status codes

For response status codes common to API Gateway, see API Gateway response status codes.