interface CfnListenerProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.VpcLattice.CfnListenerProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsvpclattice#CfnListenerProps |
Java | software.amazon.awscdk.services.vpclattice.CfnListenerProps |
Python | aws_cdk.aws_vpclattice.CfnListenerProps |
TypeScript | aws-cdk-lib » aws_vpclattice » CfnListenerProps |
Properties for defining a CfnListener
.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-listener.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_vpclattice as vpclattice } from 'aws-cdk-lib';
const cfnListenerProps: vpclattice.CfnListenerProps = {
defaultAction: {
fixedResponse: {
statusCode: 123,
},
forward: {
targetGroups: [{
targetGroupIdentifier: 'targetGroupIdentifier',
// the properties below are optional
weight: 123,
}],
},
},
protocol: 'protocol',
// the properties below are optional
name: 'name',
port: 123,
serviceIdentifier: 'serviceIdentifier',
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
default | IResolvable | Default | The action for the default rule. |
protocol | string | The listener protocol. |
name? | string | The name of the listener. |
port? | number | The listener port. |
service | string | The ID or Amazon Resource Name (ARN) of the service. |
tags? | Cfn [] | The tags for the listener. |
defaultAction
Type:
IResolvable
|
Default
The action for the default rule.
Each listener has a default rule. The default rule is used if no other rules match.
protocol
Type:
string
The listener protocol.
name?
Type:
string
(optional)
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?
Type:
number
(optional)
The listener port.
You can specify a value from 1 to 65535. For HTTP, the default is 80. For HTTPS, the default is 443.
serviceIdentifier?
Type:
string
(optional)
The ID or Amazon Resource Name (ARN) of the service.
tags?
Type:
Cfn
[]
(optional)
The tags for the listener.