CfnRuleProps
- class aws_cdk.aws_vpclattice.CfnRuleProps(*, action, match, priority, listener_identifier=None, name=None, service_identifier=None, tags=None)
Bases:
object
Properties for defining a
CfnRule
.- Parameters:
action (
Union
[IResolvable
,ActionProperty
,Dict
[str
,Any
]]) – Describes the action for a rule. Each rule must include exactly one of the following types of actions:forward
orfixed-response
, and it must be the last action to be performed.match (
Union
[IResolvable
,MatchProperty
,Dict
[str
,Any
]]) – The rule match.priority (
Union
[int
,float
]) – The priority assigned to the rule. Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.listener_identifier (
Optional
[str
]) – The ID or Amazon Resource Name (ARN) of the listener.name (
Optional
[str
]) – The name of the rule. The name must be unique within the listener. The valid characters are a-z, 0-9, and hyphens (-). You can’t use a hyphen as the first or last character, or immediately after another hyphen. If you don’t specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.service_identifier (
Optional
[str
]) – The ID or Amazon Resource Name (ARN) of the service.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – The tags for the rule.
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-rule.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_vpclattice as vpclattice cfn_rule_props = vpclattice.CfnRuleProps( action=vpclattice.CfnRule.ActionProperty( fixed_response=vpclattice.CfnRule.FixedResponseProperty( status_code=123 ), forward=vpclattice.CfnRule.ForwardProperty( target_groups=[vpclattice.CfnRule.WeightedTargetGroupProperty( target_group_identifier="targetGroupIdentifier", # the properties below are optional weight=123 )] ) ), match=vpclattice.CfnRule.MatchProperty( http_match=vpclattice.CfnRule.HttpMatchProperty( header_matches=[vpclattice.CfnRule.HeaderMatchProperty( match=vpclattice.CfnRule.HeaderMatchTypeProperty( contains="contains", exact="exact", prefix="prefix" ), name="name", # the properties below are optional case_sensitive=False )], method="method", path_match=vpclattice.CfnRule.PathMatchProperty( match=vpclattice.CfnRule.PathMatchTypeProperty( exact="exact", prefix="prefix" ), # the properties below are optional case_sensitive=False ) ) ), priority=123, # the properties below are optional listener_identifier="listenerIdentifier", name="name", service_identifier="serviceIdentifier", tags=[CfnTag( key="key", value="value" )] )
Attributes
- action
Describes the action for a rule.
Each rule must include exactly one of the following types of actions:
forward
orfixed-response
, and it must be the last action to be performed.
- listener_identifier
The ID or Amazon Resource Name (ARN) of the listener.
- match
The rule match.
- name
The name of the rule.
The name must be unique within the listener. The valid characters are a-z, 0-9, and hyphens (-). You can’t use a hyphen as the first or last character, or immediately after another hyphen.
If you don’t specify a name, CloudFormation generates one. However, if you specify a name, and later want to replace the resource, you must specify a new name.
- priority
The priority assigned to the rule.
Each rule for a specific listener must have a unique priority. The lower the priority number the higher the priority.
- service_identifier
The ID or Amazon Resource Name (ARN) of the service.
- tags
The tags for the rule.