CfnListenerProps
- class aws_cdk.aws_vpclattice.CfnListenerProps(*, default_action, protocol, name=None, port=None, service_identifier=None, tags=None)
Bases:
object
Properties for defining a
CfnListener
.- Parameters:
default_action (
Union
[IResolvable
,DefaultActionProperty
,Dict
[str
,Any
]]) – The action for the default rule. Each listener has a default rule. Each rule consists of a priority, one or more actions, and one or more conditions. The default rule is the rule that’s used if no other rules match. 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.protocol (
str
) – The listener protocol HTTP or HTTPS.name (
Optional
[str
]) – The name of the listener. A listener name must be unique within a service. 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.port (
Union
[int
,float
,None
]) – The listener port. You can specify a value from1
to65535
. For HTTP, the default is80
. For HTTPS, the default is443
.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 listener.
- Link:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-listener.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_listener_props = vpclattice.CfnListenerProps( default_action=vpclattice.CfnListener.DefaultActionProperty( fixed_response=vpclattice.CfnListener.FixedResponseProperty( status_code=123 ), forward=vpclattice.CfnListener.ForwardProperty( target_groups=[vpclattice.CfnListener.WeightedTargetGroupProperty( target_group_identifier="targetGroupIdentifier", # the properties below are optional weight=123 )] ) ), protocol="protocol", # the properties below are optional name="name", port=123, service_identifier="serviceIdentifier", tags=[CfnTag( key="key", value="value" )] )
Attributes
- default_action
The action for the default rule.
Each listener has a default rule. Each rule consists of a priority, one or more actions, and one or more conditions. The default rule is the rule that’s used if no other rules match. 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.
- name
The name of the listener.
A listener name must be unique within a service. 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.
- port
The listener port.
You can specify a value from
1
to65535
. For HTTP, the default is80
. For HTTPS, the default is443
.
- protocol
The listener protocol HTTP or HTTPS.
- service_identifier
The ID or Amazon Resource Name (ARN) of the service.
- tags
The tags for the listener.