Class Listener
Provides a Global Accelerator listener.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var exampleAccelerator = new Aws.GlobalAccelerator.Accelerator("exampleAccelerator", new Aws.GlobalAccelerator.AcceleratorArgs
{
Attributes = new Aws.GlobalAccelerator.Inputs.AcceleratorAttributesArgs
{
FlowLogsEnabled = true,
FlowLogsS3Bucket = "example-bucket",
FlowLogsS3Prefix = "flow-logs/",
},
Enabled = true,
IpAddressType = "IPV4",
});
var exampleListener = new Aws.GlobalAccelerator.Listener("exampleListener", new Aws.GlobalAccelerator.ListenerArgs
{
AcceleratorArn = exampleAccelerator.Id,
ClientAffinity = "SOURCE_IP",
PortRanges =
{
new Aws.GlobalAccelerator.Inputs.ListenerPortRangeArgs
{
FromPort = 80,
ToPort = 80,
},
},
Protocol = "TCP",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.GlobalAccelerator
Assembly: Pulumi.Aws.dll
Syntax
public class Listener : CustomResource
Constructors
View SourceListener(String, ListenerArgs, CustomResourceOptions)
Create a Listener resource with the given unique name, arguments, and options.
Declaration
public Listener(string name, ListenerArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ListenerArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAcceleratorArn
The Amazon Resource Name (ARN) of your accelerator.
Declaration
public Output<string> AcceleratorArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ClientAffinity
Direct all requests from a user to the same endpoint. Valid values are NONE, SOURCE_IP. Default: NONE. If NONE, Global Accelerator uses the "five-tuple" properties of source IP address, source port, destination IP address, destination port, and protocol to select the hash value. If SOURCE_IP, Global Accelerator uses the "two-tuple" properties of source (client) IP address and destination IP address to select the hash value.
Declaration
public Output<string> ClientAffinity { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PortRanges
The list of port ranges for the connections from clients to the accelerator. Fields documented below.
Declaration
public Output<ImmutableArray<ListenerPortRange>> PortRanges { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<ListenerPortRange>> |
Protocol
The protocol for the connections from clients to the accelerator. Valid values are TCP, UDP.
Declaration
public Output<string> Protocol { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ListenerState, CustomResourceOptions)
Get an existing Listener resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Listener Get(string name, Input<string> id, ListenerState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ListenerState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Listener |