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 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 in 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 com.pulumi.resources.CustomResourceOptions;
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()
.duration(1)
.autoUseCoupon(true)
.spec("1")
.build());
var deBandwidthPackage = new BandwidthPackage("deBandwidthPackage", BandwidthPackageArgs.builder()
.bandwidth("100")
.type("Basic")
.bandwidthType("Basic")
.paymentType("PayAsYouGo")
.billingType("PayBy95")
.ratio(30)
.build());
var deBandwidthPackageAttachment = new BandwidthPackageAttachment("deBandwidthPackageAttachment", BandwidthPackageAttachmentArgs.builder()
.acceleratorId(exampleAccelerator.id())
.bandwidthPackageId(deBandwidthPackage.id())
.build());
var exampleListener = new Listener("exampleListener", ListenerArgs.builder()
.acceleratorId(exampleAccelerator.id())
.portRanges(ListenerPortRangeArgs.builder()
.fromPort(60)
.toPort(70)
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(deBandwidthPackageAttachment)
.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, 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.

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

The clientAffinity of the listener. Default value is NONE. Valid values: NONE: client affinity is not maintained, that is, connection requests from the same client cannot always be directed to the same terminal node. SOURCE_IP: maintain client affinity. When a client accesses a stateful application, all requests from the same client can be directed to the same terminal node, regardless of the source port and protocol.

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

The description of the listener.

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.

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

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

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

The proxy protocol of the listener. Default value is false. Valid value: true: Turn on the keep client source IP function. After it is turned on, the back-end service is supported to view the original IP address of the client. false: keep client source IP function is not turned on.

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

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