EndpointGroup

class EndpointGroup : KotlinCustomResource

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

NOTE: Available since v1.113.0. NOTE: Listeners that use different protocols support different types of endpoint groups:

  • For a TCP or UDP listener, you can create only one default endpoint group.

  • For an HTTP or HTTPS listener, you can create one default endpoint group and one virtual endpoint group. By default, you can create only one virtual endpoint group.

  • A default endpoint group refers to the endpoint group that you configure when you create an HTTP or HTTPS listener.

  • A virtual endpoint group refers to the endpoint group that you can create on the Endpoint Group page after you create a listener.

  • After you create a virtual endpoint group for an HTTP or HTTPS listener, you can create a forwarding rule and associate the forwarding rule with the virtual endpoint group. Then, the HTTP or HTTPS listener forwards requests with different destination domain names or paths to the default or virtual endpoint group based on the forwarding rule. This way, you can use one Global Accelerator (GA) instance to accelerate access to multiple domain names or paths. For more information about how to create a forwarding rule, see Manage forwarding rules.

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.alicloud.ecs.EipAddress;
import com.pulumi.alicloud.ecs.EipAddressArgs;
import com.pulumi.alicloud.ga.EndpointGroup;
import com.pulumi.alicloud.ga.EndpointGroupArgs;
import com.pulumi.alicloud.ga.inputs.EndpointGroupEndpointConfigurationArgs;
import com.pulumi.codegen.internal.KeyedValue;
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) {
final var config = ctx.config();
final var region = config.get("region").orElse("cn-hangzhou");
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(60)
.toPort(70)
.build())
.clientAffinity("SOURCE_IP")
.protocol("UDP")
.build());
for (var i = 0; i < 2; i++) {
new EipAddress("defaultEipAddress-" + i, EipAddressArgs.builder()
.bandwidth("10")
.internetChargeType("PayByBandwidth")
.addressName("terraform-example")
.build());
}
var defaultEndpointGroup = new EndpointGroup("defaultEndpointGroup", EndpointGroupArgs.builder()
.acceleratorId(defaultAccelerator.id())
.endpointConfigurations(
EndpointGroupEndpointConfigurationArgs.builder()
.endpoint(defaultEipAddress[0].ipAddress())
.type("PublicIp")
.weight("20")
.build(),
EndpointGroupEndpointConfigurationArgs.builder()
.endpoint(defaultEipAddress[1].ipAddress())
.type("PublicIp")
.weight("20")
.build())
.endpointGroupRegion(region)
.listenerId(defaultListener.id())
.build());
}
}

Import

Ga Endpoint Group can be imported using the id, e.g.

$ pulumi import alicloud:ga/endpointGroup:EndpointGroup example <id>

Properties

Link copied to clipboard
val acceleratorId: Output<String>

The ID of the Global Accelerator instance to which the endpoint group will be added.

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

The description of the endpoint group.

Link copied to clipboard

The endpointConfigurations of the endpoint group. See endpoint_configurations below.

Link copied to clipboard

The ID of the region where the endpoint group is deployed.

Link copied to clipboard

The endpoint group type. Default value: default. Valid values: default, virtual.

Link copied to clipboard

The endpoint request protocol. Valid values: HTTP, HTTPS.

Link copied to clipboard

The interval between two consecutive health checks. Unit: seconds.

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

The path specified as the destination of the targets for health checks.

Link copied to clipboard
val healthCheckPort: Output<Int>?

The port that is used for health checks.

Link copied to clipboard

The protocol that is used to connect to the targets for health checks. Valid values: http, https, tcp.

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

The ID of the listener that is associated with the endpoint group.

Link copied to clipboard
val name: Output<String>

The name of the endpoint group.

Link copied to clipboard

Mapping between listening port and forwarding port of boarding point. See port_overrides below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>

The status of the endpoint group.

Link copied to clipboard
val tags: Output<Map<String, Any>>?

A mapping of tags to assign to the resource.

Link copied to clipboard
val thresholdCount: Output<Int>

The number of consecutive failed heath checks that must occur before the endpoint is deemed unhealthy. Default value: 3.

Link copied to clipboard
val trafficPercentage: Output<Int>?

The weight of the endpoint group when the corresponding listener is associated with multiple endpoint groups.

Link copied to clipboard
val urn: Output<String>