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.
Idawscc.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

NameResourceAccessible byRequired Params
create_resourceauthorizersINSERTRestApiId, Type, Name, region
delete_resourceauthorizersDELETEIdentifier, region
update_resourceauthorizersUPDATEIdentifier, PatchDocument, region
list_resourcesauthorizers_list_onlySELECTregion
get_resourceauthorizersSELECTIdentifier, region

SELECT examples

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 awscc.apigateway.authorizers
WHERE
region = 'us-east-1' AND
Identifier = '{{ rest_api_id }}|{{ authorizer_id }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.apigateway.authorizers
SET PatchDocument = string('{{ {
"AuthType": auth_type,
"AuthorizerCredentials": authorizer_credentials,
"AuthorizerResultTtlInSeconds": authorizer_result_ttl_in_seconds,
"AuthorizerUri": authorizer_uri,
"IdentitySource": identity_source,
"IdentityValidationExpression": identity_validation_expression,
"Name": name,
"ProviderARNs": provider_arns,
"Type": type
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ rest_api_id }}|{{ authorizer_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.apigateway.authorizers
WHERE
Identifier = '{{ rest_api_id }}|{{ authorizer_id }}' AND
region = 'us-east-1';

Permissions

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

apigateway:POST,
iam:PassRole