CfnRoutingRulePropsMixin
- class aws_cdk.cfn_property_mixins.aws_apigatewayv2.CfnRoutingRulePropsMixin(props, *, strategy=None)
Bases:
MixinRepresents a routing rule.
When the incoming request to a domain name matches the conditions for a rule, API Gateway invokes a stage of a target API. Supported only for REST APIs.
- See:
- CloudformationResource:
AWS::ApiGatewayV2::RoutingRule
- 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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2 import aws_cdk as cdk # merge_strategy: cdk.IMergeStrategy cfn_routing_rule_props_mixin = apigatewayv2.CfnRoutingRulePropsMixin(apigatewayv2.CfnRoutingRuleMixinProps( actions=[apigatewayv2.CfnRoutingRulePropsMixin.ActionProperty( invoke_api=apigatewayv2.CfnRoutingRulePropsMixin.ActionInvokeApiProperty( api_id="apiId", stage="stage", strip_base_path=False ) )], conditions=[apigatewayv2.CfnRoutingRulePropsMixin.ConditionProperty( match_base_paths=apigatewayv2.CfnRoutingRulePropsMixin.MatchBasePathsProperty( any_of=["anyOf"] ), match_headers=apigatewayv2.CfnRoutingRulePropsMixin.MatchHeadersProperty( any_of=[apigatewayv2.CfnRoutingRulePropsMixin.MatchHeaderValueProperty( header="header", value_glob="valueGlob" )] ) )], domain_name_arn="domainNameArn", priority=123 ), strategy=merge_strategy )
Create a mixin to apply properties to
AWS::ApiGatewayV2::RoutingRule.- Parameters:
props (
Union[CfnRoutingRuleMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
None
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['actions', 'conditions', 'domainNameArn', 'priority']
Static Methods
- classmethod is_mixin(x)
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.
ActionInvokeApiProperty
- class CfnRoutingRulePropsMixin.ActionInvokeApiProperty(*, api_id=None, stage=None, strip_base_path=None)
Bases:
objectRepresents an InvokeApi action.
- Parameters:
api_id (
Optional[str]) – The API identifier of the target API.stage (
Optional[str]) – The name of the target stage.strip_base_path (
Union[bool,IResolvable,None]) – The strip base path setting. When true, API Gateway strips the incoming matched base path when forwarding the request to the target API.
- 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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2 action_invoke_api_property = apigatewayv2.CfnRoutingRulePropsMixin.ActionInvokeApiProperty( api_id="apiId", stage="stage", strip_base_path=False )
Attributes
- api_id
The API identifier of the target API.
- stage
The name of the target stage.
- strip_base_path
The strip base path setting.
When true, API Gateway strips the incoming matched base path when forwarding the request to the target API.
ActionProperty
- class CfnRoutingRulePropsMixin.ActionProperty(*, invoke_api=None)
Bases:
objectRepresents a routing rule action.
The only supported action is
invokeApi.- Parameters:
invoke_api (
Union[IResolvable,ActionInvokeApiProperty,Dict[str,Any],None]) – Represents an InvokeApi action.- 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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2 action_property = apigatewayv2.CfnRoutingRulePropsMixin.ActionProperty( invoke_api=apigatewayv2.CfnRoutingRulePropsMixin.ActionInvokeApiProperty( api_id="apiId", stage="stage", strip_base_path=False ) )
Attributes
- invoke_api
Represents an InvokeApi action.
ConditionProperty
- class CfnRoutingRulePropsMixin.ConditionProperty(*, match_base_paths=None, match_headers=None)
Bases:
objectRepresents a condition.
Conditions can contain up to two
matchHeadersconditions and onematchBasePathsconditions. API Gateway evaluates header conditions and base path conditions together. You can only use AND between header and base path conditions.- Parameters:
match_base_paths (
Union[IResolvable,MatchBasePathsProperty,Dict[str,Any],None]) – The base path to be matched.match_headers (
Union[IResolvable,MatchHeadersProperty,Dict[str,Any],None]) – The headers to be matched.
- 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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2 condition_property = apigatewayv2.CfnRoutingRulePropsMixin.ConditionProperty( match_base_paths=apigatewayv2.CfnRoutingRulePropsMixin.MatchBasePathsProperty( any_of=["anyOf"] ), match_headers=apigatewayv2.CfnRoutingRulePropsMixin.MatchHeadersProperty( any_of=[apigatewayv2.CfnRoutingRulePropsMixin.MatchHeaderValueProperty( header="header", value_glob="valueGlob" )] ) )
Attributes
- match_base_paths
The base path to be matched.
- match_headers
The headers to be matched.
MatchBasePathsProperty
- class CfnRoutingRulePropsMixin.MatchBasePathsProperty(*, any_of=None)
Bases:
objectRepresents a
MatchBasePathscondition.- Parameters:
any_of (
Optional[Sequence[str]]) – The string of the case sensitive base path to be matched.- 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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2 match_base_paths_property = apigatewayv2.CfnRoutingRulePropsMixin.MatchBasePathsProperty( any_of=["anyOf"] )
Attributes
- any_of
The string of the case sensitive base path to be matched.
MatchHeaderValueProperty
- class CfnRoutingRulePropsMixin.MatchHeaderValueProperty(*, header=None, value_glob=None)
Bases:
objectRepresents a
MatchHeaderValue.- Parameters:
header (
Optional[str]) – The case insensitive header name to be matched. The header name must be less than 40 characters and the only allowed characters area-z,A-Z,0-9, and the following special characters: ``*?-!#$%&’.^_``|~.` .value_glob (
Optional[str]) – The case sensitive header glob value to be matched against entire header value. The header glob value must be less than 128 characters and the only allowed characters area-z,A-Z,0-9, and the following special characters:*?-!#$%&'.^_``|~. Wildcard matching is supported for header glob values but must be for``*prefix-match``,``suffix-match*``, or``*infix*-match` .
- 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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2 match_header_value_property = apigatewayv2.CfnRoutingRulePropsMixin.MatchHeaderValueProperty( header="header", value_glob="valueGlob" )
Attributes
- header
The case insensitive header name to be matched.
The header name must be less than 40 characters and the only allowed characters are
a-z,A-Z,0-9, and the following special characters: ``*?-!#$%&’.^_``|~.` .
- value_glob
The case sensitive header glob value to be matched against entire header value.
The header glob value must be less than 128 characters and the only allowed characters are
a-z,A-Z,0-9, and the following special characters:*?-!#$%&'.^_``|~. Wildcard matching is supported for header glob values but must be for``*prefix-match``,``suffix-match*``, or``*infix*-match` .
MatchHeadersProperty
- class CfnRoutingRulePropsMixin.MatchHeadersProperty(*, any_of=None)
Bases:
objectRepresents a
MatchHeaderscondition.- Parameters:
any_of (
Union[IResolvable,Sequence[Union[IResolvable,MatchHeaderValueProperty,Dict[str,Any]]],None]) – The header name and header value glob to be matched. The matchHeaders condition is matched if any of the header name and header value globs are matched.- 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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2 match_headers_property = apigatewayv2.CfnRoutingRulePropsMixin.MatchHeadersProperty( any_of=[apigatewayv2.CfnRoutingRulePropsMixin.MatchHeaderValueProperty( header="header", value_glob="valueGlob" )] )
Attributes
- any_of
The header name and header value glob to be matched.
The matchHeaders condition is matched if any of the header name and header value globs are matched.