CognitoUserPoolsAuthorizerProps

class aws_cdk.aws_apigateway.CognitoUserPoolsAuthorizerProps(*, cognito_user_pools, authorizer_name=None, identity_source=None, results_cache_ttl=None)

Bases: object

Properties for CognitoUserPoolsAuthorizer.

Parameters
  • cognito_user_pools (Sequence[IUserPool]) – The user pools to associate with this authorizer.

  • authorizer_name (Optional[str]) – An optional human friendly name for the authorizer. Note that, this is not the primary identifier of the authorizer. Default: - the unique construct ID

  • identity_source (Optional[str]) – The request header mapping expression for the bearer token. This is typically passed as part of the header, in which case this should be method.request.header.Authorizer where Authorizer is the header containing the bearer token. Default: IdentitySource.header('Authorization')

  • results_cache_ttl (Optional[Duration]) – How long APIGateway should cache the results. Max 1 hour. Disable caching by setting this to 0. Default: Duration.minutes(5)

Attributes

authorizer_name

An optional human friendly name for the authorizer.

Note that, this is not the primary identifier of the authorizer.

Default
  • the unique construct ID

Return type

Optional[str]

cognito_user_pools

The user pools to associate with this authorizer.

Return type

List[IUserPool]

identity_source

The request header mapping expression for the bearer token.

This is typically passed as part of the header, in which case this should be method.request.header.Authorizer where Authorizer is the header containing the bearer token.

Default

IdentitySource.header('Authorization')

See

https://docs.aws.amazon.com/apigateway/api-reference/link-relation/authorizer-create/#identitySource

Return type

Optional[str]

results_cache_ttl

How long APIGateway should cache the results.

Max 1 hour. Disable caching by setting this to 0.

Default

Duration.minutes(5)

Return type

Optional[Duration]