ListenerArgs

data class ListenerArgs(val acceleratorId: Output<String>? = null, val certificates: Output<List<ListenerCertificateArgs>>? = null, val clientAffinity: Output<String>? = null, val description: Output<String>? = null, val forwardedForConfig: Output<ListenerForwardedForConfigArgs>? = null, val listenerType: Output<String>? = null, val name: Output<String>? = null, val portRanges: Output<List<ListenerPortRangeArgs>>? = null, val protocol: Output<String>? = null, val proxyProtocol: Output<Boolean>? = null, val securityPolicyId: Output<String>? = null) : ConvertibleToJava<ListenerArgs>

Provides a Global Accelerator (GA) Listener resource. For information about Global Accelerator (GA) Listener and how to use it, see What is Listener.

NOTE: Available since v1.111.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ga.Accelerator;
import com.pulumi.alicloud.ga.AcceleratorArgs;
import com.pulumi.alicloud.ga.BandwidthPackage;
import com.pulumi.alicloud.ga.BandwidthPackageArgs;
import com.pulumi.alicloud.ga.BandwidthPackageAttachment;
import com.pulumi.alicloud.ga.BandwidthPackageAttachmentArgs;
import com.pulumi.alicloud.ga.Listener;
import com.pulumi.alicloud.ga.ListenerArgs;
import com.pulumi.alicloud.ga.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 defaultAccelerator = new Accelerator("defaultAccelerator", AcceleratorArgs.builder()
.duration(1)
.autoUseCoupon(true)
.spec("1")
.build());
var defaultBandwidthPackage = new BandwidthPackage("defaultBandwidthPackage", BandwidthPackageArgs.builder()
.bandwidth(100)
.type("Basic")
.bandwidthType("Basic")
.paymentType("PayAsYouGo")
.billingType("PayBy95")
.ratio(30)
.build());
var defaultBandwidthPackageAttachment = new BandwidthPackageAttachment("defaultBandwidthPackageAttachment", BandwidthPackageAttachmentArgs.builder()
.acceleratorId(defaultAccelerator.id())
.bandwidthPackageId(defaultBandwidthPackage.id())
.build());
var defaultListener = new Listener("defaultListener", ListenerArgs.builder()
.acceleratorId(defaultBandwidthPackageAttachment.acceleratorId())
.portRanges(ListenerPortRangeArgs.builder()
.fromPort(80)
.toPort(80)
.build())
.build());
}
}

Import

Ga Listener can be imported using the id, e.g.

$ pulumi import alicloud:ga/listener:Listener example <id>

Constructors

Link copied to clipboard
fun ListenerArgs(acceleratorId: Output<String>? = null, certificates: Output<List<ListenerCertificateArgs>>? = null, clientAffinity: Output<String>? = null, description: Output<String>? = null, forwardedForConfig: Output<ListenerForwardedForConfigArgs>? = null, listenerType: Output<String>? = null, name: Output<String>? = null, portRanges: Output<List<ListenerPortRangeArgs>>? = null, protocol: Output<String>? = null, proxyProtocol: Output<Boolean>? = null, securityPolicyId: Output<String>? = null)

Functions

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

Properties

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

The accelerator id.

Link copied to clipboard

The certificates of the listener. See certificates below.

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

The clientAffinity of the listener. Default value: NONE. Valid values:

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

The description of the listener.

Link copied to clipboard

The XForward headers. See forwarded_for_config below.

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

The routing type of the listener. Default Value: Standard. Valid values:

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

The name of the listener. The length of the name is 2-128 characters. It starts with uppercase and lowercase letters or Chinese characters. It can contain numbers and underscores and dashes.

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

The portRanges of the listener. See port_ranges below.

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

Type of network transport protocol monitored. Default value: TCP. Valid values: TCP, UDP, HTTP, HTTPS.

Link copied to clipboard
val proxyProtocol: Output<Boolean>? = null

The proxy protocol of the listener. Default value: false. Valid values:

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

The ID of the security policy. NOTE: Only HTTPS listeners support this parameter. Valid values: