alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.ga.CustomRoutingEndpointGroup

Provides a Global Accelerator (GA) Custom Routing Endpoint Group resource.

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

NOTE: Available in v1.197.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var defaultAccelerators = AliCloud.Ga.GetAccelerators.Invoke(new()
    {
        Status = "active",
    });

    var defaultBandwidthPackage = new AliCloud.Ga.BandwidthPackage("defaultBandwidthPackage", new()
    {
        Bandwidth = 100,
        Type = "Basic",
        BandwidthType = "Basic",
        PaymentType = "PayAsYouGo",
        BillingType = "PayBy95",
        Ratio = 30,
    });

    var defaultBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("defaultBandwidthPackageAttachment", new()
    {
        AcceleratorId = defaultAccelerators.Apply(getAcceleratorsResult => getAcceleratorsResult.Accelerators[0]?.Id),
        BandwidthPackageId = defaultBandwidthPackage.Id,
    });

    var defaultListener = new AliCloud.Ga.Listener("defaultListener", new()
    {
        AcceleratorId = defaultBandwidthPackageAttachment.AcceleratorId,
        ListenerType = "CustomRouting",
        PortRanges = new[]
        {
            new AliCloud.Ga.Inputs.ListenerPortRangeArgs
            {
                FromPort = 10000,
                ToPort = 16000,
            },
        },
    });

    var defaultCustomRoutingEndpointGroup = new AliCloud.Ga.CustomRoutingEndpointGroup("defaultCustomRoutingEndpointGroup", new()
    {
        AcceleratorId = defaultListener.AcceleratorId,
        ListenerId = defaultListener.Id,
        EndpointGroupRegion = "cn-hangzhou",
        CustomRoutingEndpointGroupName = "example_value",
        Description = "example_value",
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultAccelerators, err := ga.GetAccelerators(ctx, &ga.GetAcceleratorsArgs{
			Status: pulumi.StringRef("active"),
		}, nil)
		if err != nil {
			return err
		}
		defaultBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "defaultBandwidthPackage", &ga.BandwidthPackageArgs{
			Bandwidth:     pulumi.Int(100),
			Type:          pulumi.String("Basic"),
			BandwidthType: pulumi.String("Basic"),
			PaymentType:   pulumi.String("PayAsYouGo"),
			BillingType:   pulumi.String("PayBy95"),
			Ratio:         pulumi.Int(30),
		})
		if err != nil {
			return err
		}
		defaultBandwidthPackageAttachment, err := ga.NewBandwidthPackageAttachment(ctx, "defaultBandwidthPackageAttachment", &ga.BandwidthPackageAttachmentArgs{
			AcceleratorId:      *pulumi.String(defaultAccelerators.Accelerators[0].Id),
			BandwidthPackageId: defaultBandwidthPackage.ID(),
		})
		if err != nil {
			return err
		}
		defaultListener, err := ga.NewListener(ctx, "defaultListener", &ga.ListenerArgs{
			AcceleratorId: defaultBandwidthPackageAttachment.AcceleratorId,
			ListenerType:  pulumi.String("CustomRouting"),
			PortRanges: ga.ListenerPortRangeArray{
				&ga.ListenerPortRangeArgs{
					FromPort: pulumi.Int(10000),
					ToPort:   pulumi.Int(16000),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = ga.NewCustomRoutingEndpointGroup(ctx, "defaultCustomRoutingEndpointGroup", &ga.CustomRoutingEndpointGroupArgs{
			AcceleratorId:                  defaultListener.AcceleratorId,
			ListenerId:                     defaultListener.ID(),
			EndpointGroupRegion:            pulumi.String("cn-hangzhou"),
			CustomRoutingEndpointGroupName: pulumi.String("example_value"),
			Description:                    pulumi.String("example_value"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ga.GaFunctions;
import com.pulumi.alicloud.ga.inputs.GetAcceleratorsArgs;
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.ga.CustomRoutingEndpointGroup;
import com.pulumi.alicloud.ga.CustomRoutingEndpointGroupArgs;
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 defaultAccelerators = GaFunctions.getAccelerators(GetAcceleratorsArgs.builder()
            .status("active")
            .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(defaultAccelerators.applyValue(getAcceleratorsResult -> getAcceleratorsResult.accelerators()[0].id()))
            .bandwidthPackageId(defaultBandwidthPackage.id())
            .build());

        var defaultListener = new Listener("defaultListener", ListenerArgs.builder()        
            .acceleratorId(defaultBandwidthPackageAttachment.acceleratorId())
            .listenerType("CustomRouting")
            .portRanges(ListenerPortRangeArgs.builder()
                .fromPort(10000)
                .toPort(16000)
                .build())
            .build());

        var defaultCustomRoutingEndpointGroup = new CustomRoutingEndpointGroup("defaultCustomRoutingEndpointGroup", CustomRoutingEndpointGroupArgs.builder()        
            .acceleratorId(defaultListener.acceleratorId())
            .listenerId(defaultListener.id())
            .endpointGroupRegion("cn-hangzhou")
            .customRoutingEndpointGroupName("example_value")
            .description("example_value")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default_accelerators = alicloud.ga.get_accelerators(status="active")
default_bandwidth_package = alicloud.ga.BandwidthPackage("defaultBandwidthPackage",
    bandwidth=100,
    type="Basic",
    bandwidth_type="Basic",
    payment_type="PayAsYouGo",
    billing_type="PayBy95",
    ratio=30)
default_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("defaultBandwidthPackageAttachment",
    accelerator_id=default_accelerators.accelerators[0].id,
    bandwidth_package_id=default_bandwidth_package.id)
default_listener = alicloud.ga.Listener("defaultListener",
    accelerator_id=default_bandwidth_package_attachment.accelerator_id,
    listener_type="CustomRouting",
    port_ranges=[alicloud.ga.ListenerPortRangeArgs(
        from_port=10000,
        to_port=16000,
    )])
default_custom_routing_endpoint_group = alicloud.ga.CustomRoutingEndpointGroup("defaultCustomRoutingEndpointGroup",
    accelerator_id=default_listener.accelerator_id,
    listener_id=default_listener.id,
    endpoint_group_region="cn-hangzhou",
    custom_routing_endpoint_group_name="example_value",
    description="example_value")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultAccelerators = alicloud.ga.getAccelerators({
    status: "active",
});
const defaultBandwidthPackage = new alicloud.ga.BandwidthPackage("defaultBandwidthPackage", {
    bandwidth: 100,
    type: "Basic",
    bandwidthType: "Basic",
    paymentType: "PayAsYouGo",
    billingType: "PayBy95",
    ratio: 30,
});
const defaultBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("defaultBandwidthPackageAttachment", {
    acceleratorId: defaultAccelerators.then(defaultAccelerators => defaultAccelerators.accelerators?.[0]?.id),
    bandwidthPackageId: defaultBandwidthPackage.id,
});
const defaultListener = new alicloud.ga.Listener("defaultListener", {
    acceleratorId: defaultBandwidthPackageAttachment.acceleratorId,
    listenerType: "CustomRouting",
    portRanges: [{
        fromPort: 10000,
        toPort: 16000,
    }],
});
const defaultCustomRoutingEndpointGroup = new alicloud.ga.CustomRoutingEndpointGroup("defaultCustomRoutingEndpointGroup", {
    acceleratorId: defaultListener.acceleratorId,
    listenerId: defaultListener.id,
    endpointGroupRegion: "cn-hangzhou",
    customRoutingEndpointGroupName: "example_value",
    description: "example_value",
});
resources:
  defaultBandwidthPackage:
    type: alicloud:ga:BandwidthPackage
    properties:
      bandwidth: 100
      type: Basic
      bandwidthType: Basic
      paymentType: PayAsYouGo
      billingType: PayBy95
      ratio: 30
  defaultBandwidthPackageAttachment:
    type: alicloud:ga:BandwidthPackageAttachment
    properties:
      acceleratorId: ${defaultAccelerators.accelerators[0].id}
      bandwidthPackageId: ${defaultBandwidthPackage.id}
  defaultListener:
    type: alicloud:ga:Listener
    properties:
      acceleratorId: ${defaultBandwidthPackageAttachment.acceleratorId}
      listenerType: CustomRouting
      portRanges:
        - fromPort: 10000
          toPort: 16000
  defaultCustomRoutingEndpointGroup:
    type: alicloud:ga:CustomRoutingEndpointGroup
    properties:
      acceleratorId: ${defaultListener.acceleratorId}
      listenerId: ${defaultListener.id}
      endpointGroupRegion: cn-hangzhou
      customRoutingEndpointGroupName: example_value
      description: example_value
variables:
  defaultAccelerators:
    fn::invoke:
      Function: alicloud:ga:getAccelerators
      Arguments:
        status: active

Create CustomRoutingEndpointGroup Resource

new CustomRoutingEndpointGroup(name: string, args: CustomRoutingEndpointGroupArgs, opts?: CustomResourceOptions);
@overload
def CustomRoutingEndpointGroup(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               accelerator_id: Optional[str] = None,
                               custom_routing_endpoint_group_name: Optional[str] = None,
                               description: Optional[str] = None,
                               endpoint_group_region: Optional[str] = None,
                               listener_id: Optional[str] = None)
@overload
def CustomRoutingEndpointGroup(resource_name: str,
                               args: CustomRoutingEndpointGroupArgs,
                               opts: Optional[ResourceOptions] = None)
func NewCustomRoutingEndpointGroup(ctx *Context, name string, args CustomRoutingEndpointGroupArgs, opts ...ResourceOption) (*CustomRoutingEndpointGroup, error)
public CustomRoutingEndpointGroup(string name, CustomRoutingEndpointGroupArgs args, CustomResourceOptions? opts = null)
public CustomRoutingEndpointGroup(String name, CustomRoutingEndpointGroupArgs args)
public CustomRoutingEndpointGroup(String name, CustomRoutingEndpointGroupArgs args, CustomResourceOptions options)
type: alicloud:ga:CustomRoutingEndpointGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CustomRoutingEndpointGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args CustomRoutingEndpointGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args CustomRoutingEndpointGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CustomRoutingEndpointGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CustomRoutingEndpointGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CustomRoutingEndpointGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The CustomRoutingEndpointGroup resource accepts the following input properties:

AcceleratorId string

The ID of the GA instance.

EndpointGroupRegion string

The ID of the region in which to create the endpoint group.

ListenerId string

The ID of the custom routing listener.

CustomRoutingEndpointGroupName string

The name of the endpoint group.

Description string

The description of the endpoint group.

AcceleratorId string

The ID of the GA instance.

EndpointGroupRegion string

The ID of the region in which to create the endpoint group.

ListenerId string

The ID of the custom routing listener.

CustomRoutingEndpointGroupName string

The name of the endpoint group.

Description string

The description of the endpoint group.

acceleratorId String

The ID of the GA instance.

endpointGroupRegion String

The ID of the region in which to create the endpoint group.

listenerId String

The ID of the custom routing listener.

customRoutingEndpointGroupName String

The name of the endpoint group.

description String

The description of the endpoint group.

acceleratorId string

The ID of the GA instance.

endpointGroupRegion string

The ID of the region in which to create the endpoint group.

listenerId string

The ID of the custom routing listener.

customRoutingEndpointGroupName string

The name of the endpoint group.

description string

The description of the endpoint group.

accelerator_id str

The ID of the GA instance.

endpoint_group_region str

The ID of the region in which to create the endpoint group.

listener_id str

The ID of the custom routing listener.

custom_routing_endpoint_group_name str

The name of the endpoint group.

description str

The description of the endpoint group.

acceleratorId String

The ID of the GA instance.

endpointGroupRegion String

The ID of the region in which to create the endpoint group.

listenerId String

The ID of the custom routing listener.

customRoutingEndpointGroupName String

The name of the endpoint group.

description String

The description of the endpoint group.

Outputs

All input properties are implicitly available as output properties. Additionally, the CustomRoutingEndpointGroup resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the Custom Routing Endpoint Group.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the Custom Routing Endpoint Group.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the Custom Routing Endpoint Group.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of the Custom Routing Endpoint Group.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of the Custom Routing Endpoint Group.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the Custom Routing Endpoint Group.

Look up Existing CustomRoutingEndpointGroup Resource

Get an existing CustomRoutingEndpointGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CustomRoutingEndpointGroupState, opts?: CustomResourceOptions): CustomRoutingEndpointGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accelerator_id: Optional[str] = None,
        custom_routing_endpoint_group_name: Optional[str] = None,
        description: Optional[str] = None,
        endpoint_group_region: Optional[str] = None,
        listener_id: Optional[str] = None,
        status: Optional[str] = None) -> CustomRoutingEndpointGroup
func GetCustomRoutingEndpointGroup(ctx *Context, name string, id IDInput, state *CustomRoutingEndpointGroupState, opts ...ResourceOption) (*CustomRoutingEndpointGroup, error)
public static CustomRoutingEndpointGroup Get(string name, Input<string> id, CustomRoutingEndpointGroupState? state, CustomResourceOptions? opts = null)
public static CustomRoutingEndpointGroup get(String name, Output<String> id, CustomRoutingEndpointGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AcceleratorId string

The ID of the GA instance.

CustomRoutingEndpointGroupName string

The name of the endpoint group.

Description string

The description of the endpoint group.

EndpointGroupRegion string

The ID of the region in which to create the endpoint group.

ListenerId string

The ID of the custom routing listener.

Status string

The status of the Custom Routing Endpoint Group.

AcceleratorId string

The ID of the GA instance.

CustomRoutingEndpointGroupName string

The name of the endpoint group.

Description string

The description of the endpoint group.

EndpointGroupRegion string

The ID of the region in which to create the endpoint group.

ListenerId string

The ID of the custom routing listener.

Status string

The status of the Custom Routing Endpoint Group.

acceleratorId String

The ID of the GA instance.

customRoutingEndpointGroupName String

The name of the endpoint group.

description String

The description of the endpoint group.

endpointGroupRegion String

The ID of the region in which to create the endpoint group.

listenerId String

The ID of the custom routing listener.

status String

The status of the Custom Routing Endpoint Group.

acceleratorId string

The ID of the GA instance.

customRoutingEndpointGroupName string

The name of the endpoint group.

description string

The description of the endpoint group.

endpointGroupRegion string

The ID of the region in which to create the endpoint group.

listenerId string

The ID of the custom routing listener.

status string

The status of the Custom Routing Endpoint Group.

accelerator_id str

The ID of the GA instance.

custom_routing_endpoint_group_name str

The name of the endpoint group.

description str

The description of the endpoint group.

endpoint_group_region str

The ID of the region in which to create the endpoint group.

listener_id str

The ID of the custom routing listener.

status str

The status of the Custom Routing Endpoint Group.

acceleratorId String

The ID of the GA instance.

customRoutingEndpointGroupName String

The name of the endpoint group.

description String

The description of the endpoint group.

endpointGroupRegion String

The ID of the region in which to create the endpoint group.

listenerId String

The ID of the custom routing listener.

status String

The status of the Custom Routing Endpoint Group.

Import

Global Accelerator (GA) Custom Routing Endpoint Group can be imported using the id, e.g.

 $ pulumi import alicloud:ga/customRoutingEndpointGroup:CustomRoutingEndpointGroup example <id>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.