EndpointGroupArgs

data class EndpointGroupArgs(val acceleratorId: Output<String>? = null, val description: Output<String>? = null, val endpointConfigurations: Output<List<EndpointGroupEndpointConfigurationArgs>>? = null, val endpointGroupRegion: Output<String>? = null, val endpointGroupType: Output<String>? = null, val endpointRequestProtocol: Output<String>? = null, val healthCheckIntervalSeconds: Output<Int>? = null, val healthCheckPath: Output<String>? = null, val healthCheckPort: Output<Int>? = null, val healthCheckProtocol: Output<String>? = null, val listenerId: Output<String>? = null, val name: Output<String>? = null, val portOverrides: Output<EndpointGroupPortOverridesArgs>? = null, val tags: Output<Map<String, Any>>? = null, val thresholdCount: Output<Int>? = null, val trafficPercentage: Output<Int>? = null) : ConvertibleToJava<EndpointGroupArgs>

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>

Constructors

Link copied to clipboard
fun EndpointGroupArgs(acceleratorId: Output<String>? = null, description: Output<String>? = null, endpointConfigurations: Output<List<EndpointGroupEndpointConfigurationArgs>>? = null, endpointGroupRegion: Output<String>? = null, endpointGroupType: Output<String>? = null, endpointRequestProtocol: Output<String>? = null, healthCheckIntervalSeconds: Output<Int>? = null, healthCheckPath: Output<String>? = null, healthCheckPort: Output<Int>? = null, healthCheckProtocol: Output<String>? = null, listenerId: Output<String>? = null, name: Output<String>? = null, portOverrides: Output<EndpointGroupPortOverridesArgs>? = null, tags: Output<Map<String, Any>>? = null, thresholdCount: Output<Int>? = null, trafficPercentage: Output<Int>? = null)

Functions

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

Properties

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

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

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

The description of the endpoint group.

Link copied to clipboard

The endpointConfigurations of the endpoint group. See endpoint_configurations below.

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

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

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

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

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

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

Link copied to clipboard
val healthCheckIntervalSeconds: Output<Int>? = null

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

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

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

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

The port that is used for health checks.

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

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

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

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

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

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 tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val thresholdCount: Output<Int>? = null

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>? = null

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