Listener
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());
}
}
Content copied to clipboard
Import
Ga Listener can be imported using the id, e.g.
$ pulumi import alicloud:ga/listener:Listener example <id>
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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
Link copied to clipboard
Link copied to clipboard