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
|
authorizerConfig |
Object | Required | Configuration information for the Authorizer |
authorizerConfig.functionId |
String | Required | Function name of the service (type) to be supported in the Authorizer
|
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)
|
authorizerType |
String | Required | Authorizer's support service (type)
|
authorizerDescription |
String | Optional | Description for the Authorizer to create.
|
payload
The following describes payload.
| Field | Type | Required | Description |
|---|---|---|---|
in |
String | Required | Payload type
|
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.