Listener

class Listener : KotlinCustomResource

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>

Properties

Link copied to clipboard
val acceleratorId: Output<String>

The accelerator id.

Link copied to clipboard

The certificates of the listener. See certificates below.

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

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

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

The description of the listener.

Link copied to clipboard

The XForward headers. See forwarded_for_config below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val listenerType: Output<String>

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

Link copied to clipboard
val name: Output<String>

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

The portRanges of the listener. See port_ranges below.

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

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

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

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard
val status: Output<String>

The status of the listener.

Link copied to clipboard
val urn: Output<String>