CfnAuthorizerPropsMixin

class aws_cdk.mixins_preview.aws_apigatewayv2.mixins.CfnAuthorizerPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::ApiGatewayV2::Authorizer resource 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-authorizer.html

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:

IConstruct

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 x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

JWTConfigurationProperty

class CfnAuthorizerPropsMixin.JWTConfigurationProperty(*, audience=None, issuer=None)

Bases: object

The JWTConfiguration property specifies the configuration of a JWT authorizer.

Required for the JWT authorizer 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 an aud that matches at least one entry in this list. See RFC 7519 . Required for the JWT authorizer 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 the JWT authorizer type. Supported only for HTTP APIs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html

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 aud that matches at least one entry in this list. See RFC 7519 . Required for the JWT authorizer type. Supported only for HTTP APIs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html#cfn-apigatewayv2-authorizer-jwtconfiguration-audience

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 the JWT authorizer type. Supported only for HTTP APIs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-authorizer-jwtconfiguration.html#cfn-apigatewayv2-authorizer-jwtconfiguration-issuer