AmazonApiGatewayV2
  1. Root
AmazonApiGatewayV2
  • Root
    • /v2/apis
      POST
    • /v2/apis
      GET
    • /v2/apis
      PUT
    • /v2/domainnames/{domainName}/apimappings
      POST
    • /v2/domainnames/{domainName}/apimappings
      GET
    • /v2/apis/{apiId}/authorizers
      POST
    • /v2/apis/{apiId}/authorizers
      GET
    • /v2/apis/{apiId}/deployments
      POST
    • /v2/apis/{apiId}/deployments
      GET
    • /v2/domainnames
      POST
    • /v2/domainnames
      GET
    • /v2/apis/{apiId}/integrations
      POST
    • /v2/apis/{apiId}/integrations
      GET
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses
      POST
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses
      GET
    • /v2/apis/{apiId}/models
      POST
    • /v2/apis/{apiId}/models
      GET
    • /v2/apis/{apiId}/routes
      POST
    • /v2/apis/{apiId}/routes
      GET
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses
      POST
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses
      GET
    • /v2/apis/{apiId}/stages
      POST
    • /v2/apis/{apiId}/stages
      GET
    • /v2/vpclinks
      POST
    • /v2/vpclinks
      GET
    • /v2/apis/{apiId}/stages/{stageName}/accesslogsettings
      DELETE
    • /v2/apis/{apiId}
      DELETE
    • /v2/apis/{apiId}
      GET
    • /v2/apis/{apiId}
      PUT
    • /v2/apis/{apiId}
      PATCH
    • /v2/domainnames/{domainName}/apimappings/{apiMappingId}
      DELETE
    • /v2/domainnames/{domainName}/apimappings/{apiMappingId}
      GET
    • /v2/domainnames/{domainName}/apimappings/{apiMappingId}
      PATCH
    • /v2/apis/{apiId}/authorizers/{authorizerId}
      DELETE
    • /v2/apis/{apiId}/authorizers/{authorizerId}
      GET
    • /v2/apis/{apiId}/authorizers/{authorizerId}
      PATCH
    • /v2/apis/{apiId}/cors
      DELETE
    • /v2/apis/{apiId}/deployments/{deploymentId}
      DELETE
    • /v2/apis/{apiId}/deployments/{deploymentId}
      GET
    • /v2/apis/{apiId}/deployments/{deploymentId}
      PATCH
    • /v2/domainnames/{domainName}
      DELETE
    • /v2/domainnames/{domainName}
      GET
    • /v2/domainnames/{domainName}
      PATCH
    • /v2/apis/{apiId}/integrations/{integrationId}
      DELETE
    • /v2/apis/{apiId}/integrations/{integrationId}
      GET
    • /v2/apis/{apiId}/integrations/{integrationId}
      PATCH
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}
      DELETE
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}
      GET
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}
      PATCH
    • /v2/apis/{apiId}/models/{modelId}
      DELETE
    • /v2/apis/{apiId}/models/{modelId}
      GET
    • /v2/apis/{apiId}/models/{modelId}
      PATCH
    • /v2/apis/{apiId}/routes/{routeId}
      DELETE
    • /v2/apis/{apiId}/routes/{routeId}
      GET
    • /v2/apis/{apiId}/routes/{routeId}
      PATCH
    • /v2/apis/{apiId}/routes/{routeId}/requestparameters/{requestParameterKey}
      DELETE
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}
      DELETE
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}
      GET
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}
      PATCH
    • /v2/apis/{apiId}/stages/{stageName}/routesettings/{routeKey}
      DELETE
    • /v2/apis/{apiId}/stages/{stageName}
      DELETE
    • /v2/apis/{apiId}/stages/{stageName}
      GET
    • /v2/apis/{apiId}/stages/{stageName}
      PATCH
    • /v2/vpclinks/{vpcLinkId}
      DELETE
    • /v2/vpclinks/{vpcLinkId}
      GET
    • /v2/vpclinks/{vpcLinkId}
      PATCH
    • /v2/apis/{apiId}/exports/{specification}
      GET
    • /v2/apis/{apiId}/stages/{stageName}/cache/authorizers
      DELETE
    • /v2/apis/{apiId}/models/{modelId}/template
      GET
    • /v2/tags/{resource-arn}
      GET
    • /v2/tags/{resource-arn}
      POST
    • /v2/tags/{resource-arn}
      DELETE
  1. Root

/v2/apis/{apiId}/authorizers/{authorizerId}

PATCH
/v2/apis/{apiId}/authorizers/{authorizerId}
Updates an Authorizer.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH '/v2/apis//authorizers/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "authorizerCredentialsArn": "string",
    "authorizerPayloadFormatVersion": "string",
    "authorizerResultTtlInSeconds": 0,
    "authorizerType": "REQUEST",
    "authorizerUri": "string",
    "enableSimpleResponses": true,
    "identitySource": [
        "string"
    ],
    "identityValidationExpression": "string",
    "jwtConfiguration": {
        "Audience": [],
        "Issuer": "string"
    },
    "name": "string"
}'
Response Response Example
200 - Example 1
{
  "AuthorizerCredentialsArn": "string",
  "AuthorizerId": "string",
  "AuthorizerPayloadFormatVersion": "string",
  "AuthorizerResultTtlInSeconds": 0,
  "AuthorizerType": "REQUEST",
  "AuthorizerUri": "string",
  "EnableSimpleResponses": true,
  "IdentitySource": {},
  "IdentityValidationExpression": "string",
  "JwtConfiguration": {
    "Audience": [],
    "Issuer": "string"
  },
  "Name": "string"
}

Request

Path Params
apiId
string 
required
The API identifier.
authorizerId
string 
required
The authorizer identifier.
Body Params application/json
authorizerCredentialsArn
string 
optional
Represents an Amazon Resource Name (ARN).
authorizerPayloadFormatVersion
string 
optional
A string with a length between [1-64].
authorizerResultTtlInSeconds
integer 
optional
An integer with a value between [0-3600].
>= 0<= 3600
authorizerType
enum<string> 
optional
The authorizer type. Specify REQUEST for a Lambda function using incoming request parameters. Specify JWT to use JSON Web Tokens (supported only for HTTP APIs).
Allowed values:
REQUESTJWT
authorizerUri
string 
optional
A string representation of a URI with a length between [1-2048].
enableSimpleResponses
boolean 
optional
Specifies whether a Lambda authorizer returns a response in a simple format. By default, a Lambda authorizer must return an IAM policy. If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy. Supported only for HTTP APIs. To learn more, see Working with AWS Lambda authorizers for HTTP APIs
identitySource
array[string]
optional
The identity source for which authorization is requested. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth,method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
identityValidationExpression
string 
optional
A string with a length between [0-1024].
jwtConfiguration
object 
optional
Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.
Audience
array[string]
optional
A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519. Supported only for HTTP APIs.
Issuer
string 
optional
The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp..amazonaws.com/
. Required for the JWT authorizer type. Supported only for HTTP APIs.
name
string 
optional
A string with a length between [1-128].
Examples

Responses

🟢200Success
application/json
Body
AuthorizerCredentialsArn
string 
optional
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, don't specify this parameter. Supported only for REQUEST authorizers.
AuthorizerId
string 
optional
The authorizer identifier.
AuthorizerPayloadFormatVersion
string 
optional
Specifies the format of the payload sent to an HTTP API Lambda authorizer. Required for HTTP API Lambda authorizers. Supported values are 1.0 and 2.0. To learn more, see Working with AWS Lambda authorizers for HTTP APIs.
AuthorizerResultTtlInSeconds
integer 
optional
The time to live (TTL) for cached authorizer results, in seconds. If it equals 0, authorization caching is disabled. If it is greater than 0, API Gateway caches authorizer responses. The maximum value is 3600, or 1 hour. Supported only for HTTP API Lambda authorizers.
>= 0<= 3600
AuthorizerType
enum<string> 
optional
The authorizer type. Specify REQUEST for a Lambda function using incoming request parameters. Specify JWT to use JSON Web Tokens (supported only for HTTP APIs).
Allowed values:
REQUESTJWT
AuthorizerUri
string 
optional
The authorizer's Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2::function:/invocations. In general, the URI has this form: arn:aws:apigateway::lambda:path/
, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.
EnableSimpleResponses
boolean 
optional
Specifies whether a Lambda authorizer returns a response in a simple format. If enabled, the Lambda authorizer can return a boolean value instead of an IAM policy. Supported only for HTTP APIs. To learn more, see Working with AWS Lambda authorizers for HTTP APIs
IdentitySource
object 
optional
The identity source for which authorization is requested.
For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. The identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name for WebSocket APIs. For HTTP APIs, use selection expressions prefixed with ,forexample,request.header.Auth, request.querystring.Name.TheseparametersareusedtoperformruntimevalidationforLambda−basedauthorizersbyverifyingalloftheidentity−relatedrequestparametersarepresentintherequest,notnull,andnon−empty.OnlywhenthisistruedoestheauthorizerinvoketheauthorizerLambdafunction.Otherwise,itreturnsa401UnauthorizedresponsewithoutcallingtheLambdafunction.ForHTTPAPIs,identitysourcesarealsousedasthecachekeywhencachingisenabled.Tolearnmore,see<ahref="https://docs.aws.amazon.com/apigateway/latest/developerguide/http−api−lambda−authorizer.html">WorkingwithAWSLambdaauthorizersforHTTPAPIs</a>.</p><p>ForJWT,asingleentrythatspecifieswheretoextracttheJSONWebToken(JWT)frominboundrequests.Currentlyonlyheader−basedandqueryparameter−basedselectionsaresupported,forexamplerequest.header.Authorization.
IdentityValidationExpression
string 
optional
The validation expression does not apply to the REQUEST authorizer.
JwtConfiguration
object 
optional
Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.
Audience
array[string]
optional
A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519. Supported only for HTTP APIs.
Issuer
string 
optional
The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp..amazonaws.com/
. Required for the JWT authorizer type. Supported only for HTTP APIs.
Name
string 
optional
The name of the authorizer.
🟠480NotFoundException
🟠481TooManyRequestsException
🟠482BadRequestException
🟠483ConflictException
Modified at 2023-08-15 05:49:07
Previous
/v2/apis/{apiId}/authorizers/{authorizerId}
Next
/v2/apis/{apiId}/cors
Built with