Edit Authorizer

Prev Next

Available in Classic and VPC

Change the authorizer settings.

Request

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

Method URI
PUT /api/v1/authorizers/{authorizer-id}

Request headers

For information about the headers common to all API Gateways, see API Gateway request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
authorizer-id String Required Authorizer ID 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

You can include the following data in the body of your request:

Field Type Required Description
authorizerName String Required Authorizer name
  • Enter 1-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 in the Authorizer
  • Example: Cloud Functions service's action name
authorizerConfig.payload Array Required Request type (header or query string) selection and variable name entry information for passing to the Authorizer for authentication processing: payload
authorizerConfig.region String Required Region code of the Cloud Function, which is the Authorizer's support service (type)
  • KR | JPN | SGN
  • The input value can't be null.
authorizerType String Required Authorizer's support service (type)
  • CLOUD_FUNCTIONS
authorizerDescription String Optional Description for the Authorizer to create.
  • 0-300 characters

payload

The following describes payload.

Field Type Required Description
in String Required Payload type
  • HEADER | QUERY STRING
    • HEADER: Header
    • QUERY STRING: Query string
name String Required Payload variable name

Request example

The request example is as follows:

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

This section describes the response format.

Response status codes

For information about the HTTP status codes common to all API Gateways, see API Gateway response status codes.