Class CfnListener
A CloudFormation AWS::VpcLattice::Listener
.
Inherited Members
Namespace: Amazon.CDK.AWS.VpcLattice
Assembly: Amazon.CDK.AWS.VpcLattice.dll
Syntax (csharp)
public class CfnListener : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnListener
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Creates a listener for a service. Before you start using your Amazon VPC Lattice service, you must add one or more listeners. A listener is a process that checks for connection requests to your services. For more information, see Listeners in the Amazon VPC Lattice User Guide .
CloudformationResource: AWS::VpcLattice::Listener
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-listener.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.VpcLattice;
var cfnListener = new CfnListener(this, "MyCfnListener", new CfnListenerProps {
DefaultAction = new DefaultActionProperty {
FixedResponse = new FixedResponseProperty {
StatusCode = 123
},
Forward = new ForwardProperty {
TargetGroups = new [] { new WeightedTargetGroupProperty {
TargetGroupIdentifier = "targetGroupIdentifier",
// the properties below are optional
Weight = 123
} }
}
},
Protocol = "protocol",
// the properties below are optional
Name = "name",
Port = 123,
ServiceIdentifier = "serviceIdentifier",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnListener(Construct, String, ICfnListenerProps) | Create a new |
CfnListener(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnListener(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The Amazon Resource Name (ARN) of the listener. |
AttrId | The ID of the listener. |
AttrServiceArn | The Amazon Resource Name (ARN) of the service. |
AttrServiceId | The ID of the service. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
DefaultAction | The action for the default rule. |
Name | The name of the listener. |
Port | The listener port. |
Protocol | The listener protocol HTTP or HTTPS. |
ServiceIdentifier | The ID or Amazon Resource Name (ARN) of the service. |
Tags | The tags for the listener. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnListener(Construct, String, ICfnListenerProps)
Create a new AWS::VpcLattice::Listener
.
public CfnListener(Construct scope, string id, ICfnListenerProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnListenerProps
- resource properties.
CfnListener(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnListener(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnListener(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnListener(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The Amazon Resource Name (ARN) of the listener.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrId
The ID of the listener.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrServiceArn
The Amazon Resource Name (ARN) of the service.
public virtual string AttrServiceArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: ServiceArn
AttrServiceId
The ID of the service.
public virtual string AttrServiceId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: ServiceId
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
DefaultAction
The action for the default rule.
public virtual object DefaultAction { get; set; }
Property Value
System.Object
Remarks
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
or fixed-response
, and it must be the last action to be performed.
Name
The name of the listener.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
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.
public virtual Nullable<double> Port { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
You can specify a value from 1
to 65535
. For HTTP, the default is 80
. For HTTPS, the default is 443
.
Protocol
The listener protocol HTTP or HTTPS.
public virtual string Protocol { get; set; }
Property Value
System.String
Remarks
ServiceIdentifier
The ID or Amazon Resource Name (ARN) of the service.
public virtual string ServiceIdentifier { get; set; }
Property Value
System.String
Remarks
Tags
The tags for the listener.
public virtual TagManager Tags { get; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>