alicloud.ga.CustomRoutingEndpointGroup
Explore with Pulumi AI
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 since v1.197.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const region = config.get("region") || "cn-hangzhou";
const _default = new alicloud.ga.Accelerator("default", {
duration: 1,
autoUseCoupon: true,
spec: "1",
});
const defaultBandwidthPackage = new alicloud.ga.BandwidthPackage("default", {
bandwidth: 100,
type: "Basic",
bandwidthType: "Basic",
paymentType: "PayAsYouGo",
billingType: "PayBy95",
ratio: 30,
});
const defaultBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("default", {
acceleratorId: _default.id,
bandwidthPackageId: defaultBandwidthPackage.id,
});
const defaultListener = new alicloud.ga.Listener("default", {
acceleratorId: defaultBandwidthPackageAttachment.acceleratorId,
listenerType: "CustomRouting",
portRanges: [{
fromPort: 10000,
toPort: 16000,
}],
});
const defaultCustomRoutingEndpointGroup = new alicloud.ga.CustomRoutingEndpointGroup("default", {
acceleratorId: defaultListener.acceleratorId,
listenerId: defaultListener.id,
endpointGroupRegion: region,
customRoutingEndpointGroupName: "terraform-example",
description: "terraform-example",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
region = config.get("region")
if region is None:
region = "cn-hangzhou"
default = alicloud.ga.Accelerator("default",
duration=1,
auto_use_coupon=True,
spec="1")
default_bandwidth_package = alicloud.ga.BandwidthPackage("default",
bandwidth=100,
type="Basic",
bandwidth_type="Basic",
payment_type="PayAsYouGo",
billing_type="PayBy95",
ratio=30)
default_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("default",
accelerator_id=default.id,
bandwidth_package_id=default_bandwidth_package.id)
default_listener = alicloud.ga.Listener("default",
accelerator_id=default_bandwidth_package_attachment.accelerator_id,
listener_type="CustomRouting",
port_ranges=[{
"from_port": 10000,
"to_port": 16000,
}])
default_custom_routing_endpoint_group = alicloud.ga.CustomRoutingEndpointGroup("default",
accelerator_id=default_listener.accelerator_id,
listener_id=default_listener.id,
endpoint_group_region=region,
custom_routing_endpoint_group_name="terraform-example",
description="terraform-example")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ga"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
region := "cn-hangzhou"
if param := cfg.Get("region"); param != "" {
region = param
}
_, err := ga.NewAccelerator(ctx, "default", &ga.AcceleratorArgs{
Duration: pulumi.Int(1),
AutoUseCoupon: pulumi.Bool(true),
Spec: pulumi.String("1"),
})
if err != nil {
return err
}
defaultBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "default", &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, "default", &ga.BandwidthPackageAttachmentArgs{
AcceleratorId: _default.ID(),
BandwidthPackageId: defaultBandwidthPackage.ID(),
})
if err != nil {
return err
}
defaultListener, err := ga.NewListener(ctx, "default", &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, "default", &ga.CustomRoutingEndpointGroupArgs{
AcceleratorId: defaultListener.AcceleratorId,
ListenerId: defaultListener.ID(),
EndpointGroupRegion: pulumi.String(region),
CustomRoutingEndpointGroupName: pulumi.String("terraform-example"),
Description: pulumi.String("terraform-example"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var region = config.Get("region") ?? "cn-hangzhou";
var @default = new AliCloud.Ga.Accelerator("default", new()
{
Duration = 1,
AutoUseCoupon = true,
Spec = "1",
});
var defaultBandwidthPackage = new AliCloud.Ga.BandwidthPackage("default", new()
{
Bandwidth = 100,
Type = "Basic",
BandwidthType = "Basic",
PaymentType = "PayAsYouGo",
BillingType = "PayBy95",
Ratio = 30,
});
var defaultBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("default", new()
{
AcceleratorId = @default.Id,
BandwidthPackageId = defaultBandwidthPackage.Id,
});
var defaultListener = new AliCloud.Ga.Listener("default", new()
{
AcceleratorId = defaultBandwidthPackageAttachment.AcceleratorId,
ListenerType = "CustomRouting",
PortRanges = new[]
{
new AliCloud.Ga.Inputs.ListenerPortRangeArgs
{
FromPort = 10000,
ToPort = 16000,
},
},
});
var defaultCustomRoutingEndpointGroup = new AliCloud.Ga.CustomRoutingEndpointGroup("default", new()
{
AcceleratorId = defaultListener.AcceleratorId,
ListenerId = defaultListener.Id,
EndpointGroupRegion = region,
CustomRoutingEndpointGroupName = "terraform-example",
Description = "terraform-example",
});
});
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.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 config = ctx.config();
final var region = config.get("region").orElse("cn-hangzhou");
var default_ = new Accelerator("default", 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(default_.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(region)
.customRoutingEndpointGroupName("terraform-example")
.description("terraform-example")
.build());
}
}
configuration:
region:
type: string
default: cn-hangzhou
resources:
default:
type: alicloud:ga:Accelerator
properties:
duration: 1
autoUseCoupon: true
spec: '1'
defaultBandwidthPackage:
type: alicloud:ga:BandwidthPackage
name: default
properties:
bandwidth: 100
type: Basic
bandwidthType: Basic
paymentType: PayAsYouGo
billingType: PayBy95
ratio: 30
defaultBandwidthPackageAttachment:
type: alicloud:ga:BandwidthPackageAttachment
name: default
properties:
acceleratorId: ${default.id}
bandwidthPackageId: ${defaultBandwidthPackage.id}
defaultListener:
type: alicloud:ga:Listener
name: default
properties:
acceleratorId: ${defaultBandwidthPackageAttachment.acceleratorId}
listenerType: CustomRouting
portRanges:
- fromPort: 10000
toPort: 16000
defaultCustomRoutingEndpointGroup:
type: alicloud:ga:CustomRoutingEndpointGroup
name: default
properties:
acceleratorId: ${defaultListener.acceleratorId}
listenerId: ${defaultListener.id}
endpointGroupRegion: ${region}
customRoutingEndpointGroupName: terraform-example
description: terraform-example
Create CustomRoutingEndpointGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomRoutingEndpointGroup(name: string, args: CustomRoutingEndpointGroupArgs, opts?: CustomResourceOptions);
@overload
def CustomRoutingEndpointGroup(resource_name: str,
args: CustomRoutingEndpointGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CustomRoutingEndpointGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
accelerator_id: Optional[str] = None,
endpoint_group_region: Optional[str] = None,
listener_id: Optional[str] = None,
custom_routing_endpoint_group_name: Optional[str] = None,
description: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var customRoutingEndpointGroupResource = new AliCloud.Ga.CustomRoutingEndpointGroup("customRoutingEndpointGroupResource", new()
{
AcceleratorId = "string",
EndpointGroupRegion = "string",
ListenerId = "string",
CustomRoutingEndpointGroupName = "string",
Description = "string",
});
example, err := ga.NewCustomRoutingEndpointGroup(ctx, "customRoutingEndpointGroupResource", &ga.CustomRoutingEndpointGroupArgs{
AcceleratorId: pulumi.String("string"),
EndpointGroupRegion: pulumi.String("string"),
ListenerId: pulumi.String("string"),
CustomRoutingEndpointGroupName: pulumi.String("string"),
Description: pulumi.String("string"),
})
var customRoutingEndpointGroupResource = new CustomRoutingEndpointGroup("customRoutingEndpointGroupResource", CustomRoutingEndpointGroupArgs.builder()
.acceleratorId("string")
.endpointGroupRegion("string")
.listenerId("string")
.customRoutingEndpointGroupName("string")
.description("string")
.build());
custom_routing_endpoint_group_resource = alicloud.ga.CustomRoutingEndpointGroup("customRoutingEndpointGroupResource",
accelerator_id="string",
endpoint_group_region="string",
listener_id="string",
custom_routing_endpoint_group_name="string",
description="string")
const customRoutingEndpointGroupResource = new alicloud.ga.CustomRoutingEndpointGroup("customRoutingEndpointGroupResource", {
acceleratorId: "string",
endpointGroupRegion: "string",
listenerId: "string",
customRoutingEndpointGroupName: "string",
description: "string",
});
type: alicloud:ga:CustomRoutingEndpointGroup
properties:
acceleratorId: string
customRoutingEndpointGroupName: string
description: string
endpointGroupRegion: string
listenerId: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CustomRoutingEndpointGroup resource accepts the following input properties:
- Accelerator
Id string - The ID of the GA instance.
- Endpoint
Group stringRegion - The ID of the region in which to create the endpoint group.
- Listener
Id string - The ID of the custom routing listener.
- Custom
Routing stringEndpoint Group Name - The name of the endpoint group.
- Description string
- The description of the endpoint group.
- Accelerator
Id string - The ID of the GA instance.
- Endpoint
Group stringRegion - The ID of the region in which to create the endpoint group.
- Listener
Id string - The ID of the custom routing listener.
- Custom
Routing stringEndpoint Group Name - The name of the endpoint group.
- Description string
- The description of the endpoint group.
- accelerator
Id String - The ID of the GA instance.
- endpoint
Group StringRegion - The ID of the region in which to create the endpoint group.
- listener
Id String - The ID of the custom routing listener.
- custom
Routing StringEndpoint Group Name - The name of the endpoint group.
- description String
- The description of the endpoint group.
- accelerator
Id string - The ID of the GA instance.
- endpoint
Group stringRegion - The ID of the region in which to create the endpoint group.
- listener
Id string - The ID of the custom routing listener.
- custom
Routing stringEndpoint Group Name - 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_ strregion - The ID of the region in which to create the endpoint group.
- listener_
id str - The ID of the custom routing listener.
- custom_
routing_ strendpoint_ group_ name - The name of the endpoint group.
- description str
- The description of the endpoint group.
- accelerator
Id String - The ID of the GA instance.
- endpoint
Group StringRegion - The ID of the region in which to create the endpoint group.
- listener
Id String - The ID of the custom routing listener.
- custom
Routing StringEndpoint Group Name - 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:
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.
- Accelerator
Id string - The ID of the GA instance.
- Custom
Routing stringEndpoint Group Name - The name of the endpoint group.
- Description string
- The description of the endpoint group.
- Endpoint
Group stringRegion - The ID of the region in which to create the endpoint group.
- Listener
Id string - The ID of the custom routing listener.
- Status string
- The status of the Custom Routing Endpoint Group.
- Accelerator
Id string - The ID of the GA instance.
- Custom
Routing stringEndpoint Group Name - The name of the endpoint group.
- Description string
- The description of the endpoint group.
- Endpoint
Group stringRegion - The ID of the region in which to create the endpoint group.
- Listener
Id string - The ID of the custom routing listener.
- Status string
- The status of the Custom Routing Endpoint Group.
- accelerator
Id String - The ID of the GA instance.
- custom
Routing StringEndpoint Group Name - The name of the endpoint group.
- description String
- The description of the endpoint group.
- endpoint
Group StringRegion - The ID of the region in which to create the endpoint group.
- listener
Id String - The ID of the custom routing listener.
- status String
- The status of the Custom Routing Endpoint Group.
- accelerator
Id string - The ID of the GA instance.
- custom
Routing stringEndpoint Group Name - The name of the endpoint group.
- description string
- The description of the endpoint group.
- endpoint
Group stringRegion - The ID of the region in which to create the endpoint group.
- listener
Id 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_ strendpoint_ group_ name - The name of the endpoint group.
- description str
- The description of the endpoint group.
- endpoint_
group_ strregion - 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.
- accelerator
Id String - The ID of the GA instance.
- custom
Routing StringEndpoint Group Name - The name of the endpoint group.
- description String
- The description of the endpoint group.
- endpoint
Group StringRegion - The ID of the region in which to create the endpoint group.
- listener
Id 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>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.