ListenerArgs

data class ListenerArgs(val acceleratorArn: Output<String>? = null, val clientAffinity: Output<String>? = null, val portRanges: Output<List<ListenerPortRangeArgs>>? = null, val protocol: Output<String>? = null) : ConvertibleToJava<ListenerArgs>

Provides a Global Accelerator listener.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.globalaccelerator.Accelerator;
import com.pulumi.aws.globalaccelerator.AcceleratorArgs;
import com.pulumi.aws.globalaccelerator.inputs.AcceleratorAttributesArgs;
import com.pulumi.aws.globalaccelerator.Listener;
import com.pulumi.aws.globalaccelerator.ListenerArgs;
import com.pulumi.aws.globalaccelerator.inputs.ListenerPortRangeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleAccelerator = new Accelerator("exampleAccelerator", AcceleratorArgs.builder()
.ipAddressType("IPV4")
.enabled(true)
.attributes(AcceleratorAttributesArgs.builder()
.flowLogsEnabled(true)
.flowLogsS3Bucket("example-bucket")
.flowLogsS3Prefix("flow-logs/")
.build())
.build());
var exampleListener = new Listener("exampleListener", ListenerArgs.builder()
.acceleratorArn(exampleAccelerator.id())
.clientAffinity("SOURCE_IP")
.protocol("TCP")
.portRanges(ListenerPortRangeArgs.builder()
.fromPort(80)
.toPort(80)
.build())
.build());
}
}

Import

Global Accelerator listeners can be imported using the id, e.g.,

$ pulumi import aws:globalaccelerator/listener:Listener example arn:aws:globalaccelerator::111111111111:accelerator/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/listener/xxxxxxxx

Constructors

Link copied to clipboard
constructor(acceleratorArn: Output<String>? = null, clientAffinity: Output<String>? = null, portRanges: Output<List<ListenerPortRangeArgs>>? = null, protocol: Output<String>? = null)

Properties

Link copied to clipboard
val acceleratorArn: Output<String>? = null

The Amazon Resource Name (ARN) of your accelerator.

Link copied to clipboard
val clientAffinity: Output<String>? = null

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.

Link copied to clipboard
val portRanges: Output<List<ListenerPortRangeArgs>>? = null

The list of port ranges for the connections from clients to the accelerator. Fields documented below. port_range supports the following attributes:

Link copied to clipboard
val protocol: Output<String>? = null

The protocol for the connections from clients to the accelerator. Valid values are TCP, UDP.

Functions

Link copied to clipboard
open override fun toJava(): ListenerArgs