CfnAuthorizerPropsMixin
- class aws_cdk.mixins_preview.aws_apigatewayv2.mixins.CfnAuthorizerPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::ApiGatewayV2::Authorizerresource creates an authorizer for a WebSocket API or an HTTP API.To learn more, see Controlling and managing access to a WebSocket API in API Gateway and Controlling and managing access to an HTTP API in API Gateway in the API Gateway Developer Guide .
- See:
- CloudformationResource:
AWS::ApiGatewayV2::Authorizer
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_apigatewayv2 import mixins as apigatewayv2_mixins cfn_authorizer_props_mixin = apigatewayv2_mixins.CfnAuthorizerPropsMixin(apigatewayv2_mixins.CfnAuthorizerMixinProps( api_id="apiId", authorizer_credentials_arn="authorizerCredentialsArn", authorizer_payload_format_version="authorizerPayloadFormatVersion", authorizer_result_ttl_in_seconds=123, authorizer_type="authorizerType", authorizer_uri="authorizerUri", enable_simple_responses=False, identity_source=["identitySource"], identity_validation_expression="identityValidationExpression", jwt_configuration=apigatewayv2_mixins.CfnAuthorizerPropsMixin.JWTConfigurationProperty( audience=["audience"], issuer="issuer" ), name="name" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::ApiGatewayV2::Authorizer.- Parameters:
props (
Union[CfnAuthorizerMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['apiId', 'authorizerCredentialsArn', 'authorizerPayloadFormatVersion', 'authorizerResultTtlInSeconds', 'authorizerType', 'authorizerUri', 'enableSimpleResponses', 'identitySource', 'identityValidationExpression', 'jwtConfiguration', 'name']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
JWTConfigurationProperty
- class CfnAuthorizerPropsMixin.JWTConfigurationProperty(*, audience=None, issuer=None)
Bases:
objectThe
JWTConfigurationproperty specifies the configuration of a JWT authorizer.Required for the
JWTauthorizer type. Supported only for HTTP APIs.- Parameters:
audience (
Optional[Sequence[str]]) – A list of the intended recipients of the JWT. A valid JWT must provide anaudthat matches at least one entry in this list. See RFC 7519 . Required for theJWTauthorizer type. Supported only for HTTP APIs.issuer (
Optional[str]) – 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. {region} .amazonaws.com/ {userPoolId}. Required for theJWTauthorizer type. Supported only for HTTP APIs.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_apigatewayv2 import mixins as apigatewayv2_mixins j_wTConfiguration_property = apigatewayv2_mixins.CfnAuthorizerPropsMixin.JWTConfigurationProperty( audience=["audience"], issuer="issuer" )
Attributes
- audience
A list of the intended recipients of the JWT.
A valid JWT must provide an
audthat matches at least one entry in this list. See RFC 7519 . Required for theJWTauthorizer type. Supported only for HTTP APIs.
- issuer
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. {region} .amazonaws.com/ {userPoolId}. Required for theJWTauthorizer type. Supported only for HTTP APIs.