Modifying a Custom Authorizer
Function
This API is used to modify a specified custom authorizer.
URI
The following table lists the HTTP/HTTPS request method and URI of the API.
|
Request Method |
URI |
|---|---|
|
PUT |
/v1/{project_id}/apigw/instances/{instance_id}/authorizers/{id} |
The following table lists the parameters in the URI.
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID, which can be obtained by the administrator on the My Credentials page. |
|
instance_id |
Yes |
String |
Instance ID, which can be obtained from the dedicated gateway information on the API Gateway console. |
|
id |
Yes |
String |
ID of a custom authorizer |
Request
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Name of the custom authorizer The name of a custom authorizer consists of 3–64 characters, starting with a letter. Only letters, digits, and underscores (_) are allowed. |
|
type |
Yes |
String |
Type of the custom authorizer, which can be:
|
|
authorizer_type |
Yes |
String |
Value: FUNC |
|
authorizer_uri |
Yes |
String |
Function URN |
|
identities |
No |
List |
Certification source |
|
ttl |
No |
Integer |
Cache duration |
|
user_data |
No |
String |
User data |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Parameter name |
|
location |
Yes |
String |
Parameter location, which can be:
|
Example request:
{
"name":"Authorizer_9dlh",
"type":"FRONTEND",
"authorizer_type":"FUNC",
"authorizer_uri":"urn:fss:regionexample:dbb5762c88f045c6a1427a952bcae284:function:default:test111",
"ttl":10,
"user_data":"aaaa",
"identities":[
{
"name":"Authorization",
"location":"HEADER"
}
]
}
Response
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
ID of the custom authorizer |
|
name |
String |
Name of the custom authorizer |
|
type |
String |
Type of the custom authorizer, which can be:
|
|
authorizer_type |
String |
Value: FUNC |
|
authorizer_uri |
String |
Function URN |
|
identities |
Array |
Certification source |
|
ttl |
Integer |
Cache duration |
|
user_data |
String |
User data |
|
create_time |
Time |
Time when the custom authorizer is created |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Parameter name |
|
location |
String |
Parameter location, which can be:
|
Example response:
{
"name":"Authorizer_9dlh",
"type":"FRONTEND",
"authorizer_type":"FUNC",
"authorizer_uri":"urn:fss:regionexample:dbb5762c88f045c6a1427a952bcae284:function:default:test111",
"identities":[
{
"name":"Authorization",
"location":"HEADER",
}
],
"ttl":10,
"user_data":"aaaa",
"id":"7345e3fe4047491ebd8ecb0acd665a4c",
"create_time":"2020-01-19T11:48:56.576611862Z"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
201 |
Created |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
500 |
Server Internal Error |
Last Article: Creating a Custom Authorizer
Next Article: Deleting a Custom Authorizer
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.