Skip to main content

authorizers

Creates, updates, deletes or gets an authorizer resource or lists authorizers in a region

Overview

Nameauthorizers
TypeResource
DescriptionThe AWS::ApiGateway::Authorizer resource creates an authorization layer that API Gateway activates for methods that have authorization enabled. API Gateway activates the authorizer when a client calls those methods.
Idaws.apigateway.authorizers

Fields

NameDatatypeDescription
rest_api_idstring
authorizer_idstring
auth_typestring
authorizer_credentialsstring
authorizer_result_ttl_in_secondsinteger
authorizer_uristring
identity_sourcestring
identity_validation_expressionstring
namestring
provider_arnsarray
typestring
regionstringAWS region.

For more information, see AWS::ApiGateway::Authorizer.

Methods

NameAccessible byRequired Params
create_resourceINSERTRestApiId, Type, Name, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all authorizers in a region.

SELECT
region,
rest_api_id,
authorizer_id,
auth_type,
authorizer_credentials,
authorizer_result_ttl_in_seconds,
authorizer_uri,
identity_source,
identity_validation_expression,
name,
provider_arns,
type
FROM aws.apigateway.authorizers
WHERE region = 'us-east-1';

Gets all properties from an individual authorizer.

SELECT
region,
rest_api_id,
authorizer_id,
auth_type,
authorizer_credentials,
authorizer_result_ttl_in_seconds,
authorizer_uri,
identity_source,
identity_validation_expression,
name,
provider_arns,
type
FROM aws.apigateway.authorizers
WHERE region = 'us-east-1' AND data__Identifier = '<RestApiId>|<AuthorizerId>';

INSERT example

Use the following StackQL query and manifest file to create a new authorizer resource, using stack-deploy.

/*+ create */
INSERT INTO aws.apigateway.authorizers (
RestApiId,
Name,
Type,
region
)
SELECT
'{{ RestApiId }}',
'{{ Name }}',
'{{ Type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.apigateway.authorizers
WHERE data__Identifier = '<RestApiId|AuthorizerId>'
AND region = 'us-east-1';

Permissions

To operate on the authorizers resource, the following permissions are required:

Create

apigateway:POST,
iam:PassRole

Read

apigateway:GET

Update

apigateway:GET,
apigateway:PATCH,
iam:PassRole

Delete

apigateway:DELETE

List

apigateway:GET