alicloud logo
Alibaba Cloud v3.30.0, Feb 1 23

alicloud.ga.BasicEndpointGroup

Provides a Global Accelerator (GA) Basic Endpoint Group resource.

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

NOTE: Available in v1.194.0+.

Example Usage

Basic Usage

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

return await Deployment.RunAsync(() => 
{
    var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
    {
        NameRegex = "default-NODELETING",
    });

    var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
    {
        VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
    });

    var defaultApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("defaultApplicationLoadBalancer", new()
    {
        LoadBalancerSpec = "slb.s2.small",
        VswitchId = defaultSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
    });

    var defaultBasicAccelerator = new AliCloud.Ga.BasicAccelerator("defaultBasicAccelerator", new()
    {
        Duration = 1,
        PricingCycle = "Month",
        BandwidthBillingType = "CDT",
        AutoPay = true,
        AutoUseCoupon = "true",
        AutoRenew = false,
        AutoRenewDuration = 1,
    });

    var defaultBasicEndpointGroup = new AliCloud.Ga.BasicEndpointGroup("defaultBasicEndpointGroup", new()
    {
        AcceleratorId = defaultBasicAccelerator.Id,
        EndpointGroupRegion = "cn-beijing",
        EndpointType = "SLB",
        EndpointAddress = defaultApplicationLoadBalancer.Id,
        EndpointSubAddress = "192.168.0.1",
        BasicEndpointGroupName = "example_value",
        Description = "example_value",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
			NameRegex: pulumi.StringRef("default-NODELETING"),
		}, nil)
		if err != nil {
			return err
		}
		defaultSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
			VpcId: pulumi.StringRef(defaultNetworks.Ids[0]),
		}, nil)
		if err != nil {
			return err
		}
		defaultApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "defaultApplicationLoadBalancer", &slb.ApplicationLoadBalancerArgs{
			LoadBalancerSpec: pulumi.String("slb.s2.small"),
			VswitchId:        *pulumi.String(defaultSwitches.Ids[0]),
		})
		if err != nil {
			return err
		}
		defaultBasicAccelerator, err := ga.NewBasicAccelerator(ctx, "defaultBasicAccelerator", &ga.BasicAcceleratorArgs{
			Duration:             pulumi.Int(1),
			PricingCycle:         pulumi.String("Month"),
			BandwidthBillingType: pulumi.String("CDT"),
			AutoPay:              pulumi.Bool(true),
			AutoUseCoupon:        pulumi.String("true"),
			AutoRenew:            pulumi.Bool(false),
			AutoRenewDuration:    pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		_, err = ga.NewBasicEndpointGroup(ctx, "defaultBasicEndpointGroup", &ga.BasicEndpointGroupArgs{
			AcceleratorId:          defaultBasicAccelerator.ID(),
			EndpointGroupRegion:    pulumi.String("cn-beijing"),
			EndpointType:           pulumi.String("SLB"),
			EndpointAddress:        defaultApplicationLoadBalancer.ID(),
			EndpointSubAddress:     pulumi.String("192.168.0.1"),
			BasicEndpointGroupName: 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.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
import com.pulumi.alicloud.slb.ApplicationLoadBalancer;
import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
import com.pulumi.alicloud.ga.BasicAccelerator;
import com.pulumi.alicloud.ga.BasicAcceleratorArgs;
import com.pulumi.alicloud.ga.BasicEndpointGroup;
import com.pulumi.alicloud.ga.BasicEndpointGroupArgs;
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 defaultNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
            .nameRegex("default-NODELETING")
            .build());

        final var defaultSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
            .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
            .build());

        var defaultApplicationLoadBalancer = new ApplicationLoadBalancer("defaultApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()        
            .loadBalancerSpec("slb.s2.small")
            .vswitchId(defaultSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
            .build());

        var defaultBasicAccelerator = new BasicAccelerator("defaultBasicAccelerator", BasicAcceleratorArgs.builder()        
            .duration(1)
            .pricingCycle("Month")
            .bandwidthBillingType("CDT")
            .autoPay(true)
            .autoUseCoupon("true")
            .autoRenew(false)
            .autoRenewDuration(1)
            .build());

        var defaultBasicEndpointGroup = new BasicEndpointGroup("defaultBasicEndpointGroup", BasicEndpointGroupArgs.builder()        
            .acceleratorId(defaultBasicAccelerator.id())
            .endpointGroupRegion("cn-beijing")
            .endpointType("SLB")
            .endpointAddress(defaultApplicationLoadBalancer.id())
            .endpointSubAddress("192.168.0.1")
            .basicEndpointGroupName("example_value")
            .description("example_value")
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
default_switches = alicloud.vpc.get_switches(vpc_id=default_networks.ids[0])
default_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("defaultApplicationLoadBalancer",
    load_balancer_spec="slb.s2.small",
    vswitch_id=default_switches.ids[0])
default_basic_accelerator = alicloud.ga.BasicAccelerator("defaultBasicAccelerator",
    duration=1,
    pricing_cycle="Month",
    bandwidth_billing_type="CDT",
    auto_pay=True,
    auto_use_coupon="true",
    auto_renew=False,
    auto_renew_duration=1)
default_basic_endpoint_group = alicloud.ga.BasicEndpointGroup("defaultBasicEndpointGroup",
    accelerator_id=default_basic_accelerator.id,
    endpoint_group_region="cn-beijing",
    endpoint_type="SLB",
    endpoint_address=default_application_load_balancer.id,
    endpoint_sub_address="192.168.0.1",
    basic_endpoint_group_name="example_value",
    description="example_value")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultNetworks = alicloud.vpc.getNetworks({
    nameRegex: "default-NODELETING",
});
const defaultSwitches = defaultNetworks.then(defaultNetworks => alicloud.vpc.getSwitches({
    vpcId: defaultNetworks.ids?.[0],
}));
const defaultApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("defaultApplicationLoadBalancer", {
    loadBalancerSpec: "slb.s2.small",
    vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.ids?.[0]),
});
const defaultBasicAccelerator = new alicloud.ga.BasicAccelerator("defaultBasicAccelerator", {
    duration: 1,
    pricingCycle: "Month",
    bandwidthBillingType: "CDT",
    autoPay: true,
    autoUseCoupon: "true",
    autoRenew: false,
    autoRenewDuration: 1,
});
const defaultBasicEndpointGroup = new alicloud.ga.BasicEndpointGroup("defaultBasicEndpointGroup", {
    acceleratorId: defaultBasicAccelerator.id,
    endpointGroupRegion: "cn-beijing",
    endpointType: "SLB",
    endpointAddress: defaultApplicationLoadBalancer.id,
    endpointSubAddress: "192.168.0.1",
    basicEndpointGroupName: "example_value",
    description: "example_value",
});
resources:
  defaultApplicationLoadBalancer:
    type: alicloud:slb:ApplicationLoadBalancer
    properties:
      loadBalancerSpec: slb.s2.small
      vswitchId: ${defaultSwitches.ids[0]}
  defaultBasicAccelerator:
    type: alicloud:ga:BasicAccelerator
    properties:
      duration: 1
      pricingCycle: Month
      bandwidthBillingType: CDT
      autoPay: true
      autoUseCoupon: 'true'
      autoRenew: false
      autoRenewDuration: 1
  defaultBasicEndpointGroup:
    type: alicloud:ga:BasicEndpointGroup
    properties:
      acceleratorId: ${defaultBasicAccelerator.id}
      endpointGroupRegion: cn-beijing
      endpointType: SLB
      endpointAddress: ${defaultApplicationLoadBalancer.id}
      endpointSubAddress: 192.168.0.1
      basicEndpointGroupName: example_value
      description: example_value
variables:
  defaultNetworks:
    fn::invoke:
      Function: alicloud:vpc:getNetworks
      Arguments:
        nameRegex: default-NODELETING
  defaultSwitches:
    fn::invoke:
      Function: alicloud:vpc:getSwitches
      Arguments:
        vpcId: ${defaultNetworks.ids[0]}

Create BasicEndpointGroup Resource

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

name string
The unique name of the resource.
args BasicEndpointGroupArgs
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 BasicEndpointGroupArgs
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 BasicEndpointGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BasicEndpointGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BasicEndpointGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BasicEndpointGroup 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 BasicEndpointGroup resource accepts the following input properties:

AcceleratorId string

The ID of the basic GA instance.

EndpointGroupRegion string

The ID of the region where you want to create the endpoint group.

BasicEndpointGroupName string

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

Description string

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

EndpointAddress string

The address of the endpoint.

EndpointSubAddress string

The sub address of the endpoint.

EndpointType string

The type of the endpoint. Valid values: ENI, SLB and ECS.

AcceleratorId string

The ID of the basic GA instance.

EndpointGroupRegion string

The ID of the region where you want to create the endpoint group.

BasicEndpointGroupName string

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

Description string

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

EndpointAddress string

The address of the endpoint.

EndpointSubAddress string

The sub address of the endpoint.

EndpointType string

The type of the endpoint. Valid values: ENI, SLB and ECS.

acceleratorId String

The ID of the basic GA instance.

endpointGroupRegion String

The ID of the region where you want to create the endpoint group.

basicEndpointGroupName String

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

description String

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

endpointAddress String

The address of the endpoint.

endpointSubAddress String

The sub address of the endpoint.

endpointType String

The type of the endpoint. Valid values: ENI, SLB and ECS.

acceleratorId string

The ID of the basic GA instance.

endpointGroupRegion string

The ID of the region where you want to create the endpoint group.

basicEndpointGroupName string

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

description string

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

endpointAddress string

The address of the endpoint.

endpointSubAddress string

The sub address of the endpoint.

endpointType string

The type of the endpoint. Valid values: ENI, SLB and ECS.

accelerator_id str

The ID of the basic GA instance.

endpoint_group_region str

The ID of the region where you want to create the endpoint group.

basic_endpoint_group_name str

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

description str

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

endpoint_address str

The address of the endpoint.

endpoint_sub_address str

The sub address of the endpoint.

endpoint_type str

The type of the endpoint. Valid values: ENI, SLB and ECS.

acceleratorId String

The ID of the basic GA instance.

endpointGroupRegion String

The ID of the region where you want to create the endpoint group.

basicEndpointGroupName String

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

description String

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

endpointAddress String

The address of the endpoint.

endpointSubAddress String

The sub address of the endpoint.

endpointType String

The type of the endpoint. Valid values: ENI, SLB and ECS.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the Basic Endpoint Group.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the Basic Endpoint Group.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the Basic Endpoint Group.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of the Basic Endpoint Group.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of the Basic Endpoint Group.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the Basic Endpoint Group.

Look up Existing BasicEndpointGroup Resource

Get an existing BasicEndpointGroup 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?: BasicEndpointGroupState, opts?: CustomResourceOptions): BasicEndpointGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accelerator_id: Optional[str] = None,
        basic_endpoint_group_name: Optional[str] = None,
        description: Optional[str] = None,
        endpoint_address: Optional[str] = None,
        endpoint_group_region: Optional[str] = None,
        endpoint_sub_address: Optional[str] = None,
        endpoint_type: Optional[str] = None,
        status: Optional[str] = None) -> BasicEndpointGroup
func GetBasicEndpointGroup(ctx *Context, name string, id IDInput, state *BasicEndpointGroupState, opts ...ResourceOption) (*BasicEndpointGroup, error)
public static BasicEndpointGroup Get(string name, Input<string> id, BasicEndpointGroupState? state, CustomResourceOptions? opts = null)
public static BasicEndpointGroup get(String name, Output<String> id, BasicEndpointGroupState 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 basic GA instance.

BasicEndpointGroupName string

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

Description string

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

EndpointAddress string

The address of the endpoint.

EndpointGroupRegion string

The ID of the region where you want to create the endpoint group.

EndpointSubAddress string

The sub address of the endpoint.

EndpointType string

The type of the endpoint. Valid values: ENI, SLB and ECS.

Status string

The status of the Basic Endpoint Group.

AcceleratorId string

The ID of the basic GA instance.

BasicEndpointGroupName string

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

Description string

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

EndpointAddress string

The address of the endpoint.

EndpointGroupRegion string

The ID of the region where you want to create the endpoint group.

EndpointSubAddress string

The sub address of the endpoint.

EndpointType string

The type of the endpoint. Valid values: ENI, SLB and ECS.

Status string

The status of the Basic Endpoint Group.

acceleratorId String

The ID of the basic GA instance.

basicEndpointGroupName String

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

description String

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

endpointAddress String

The address of the endpoint.

endpointGroupRegion String

The ID of the region where you want to create the endpoint group.

endpointSubAddress String

The sub address of the endpoint.

endpointType String

The type of the endpoint. Valid values: ENI, SLB and ECS.

status String

The status of the Basic Endpoint Group.

acceleratorId string

The ID of the basic GA instance.

basicEndpointGroupName string

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

description string

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

endpointAddress string

The address of the endpoint.

endpointGroupRegion string

The ID of the region where you want to create the endpoint group.

endpointSubAddress string

The sub address of the endpoint.

endpointType string

The type of the endpoint. Valid values: ENI, SLB and ECS.

status string

The status of the Basic Endpoint Group.

accelerator_id str

The ID of the basic GA instance.

basic_endpoint_group_name str

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

description str

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

endpoint_address str

The address of the endpoint.

endpoint_group_region str

The ID of the region where you want to create the endpoint group.

endpoint_sub_address str

The sub address of the endpoint.

endpoint_type str

The type of the endpoint. Valid values: ENI, SLB and ECS.

status str

The status of the Basic Endpoint Group.

acceleratorId String

The ID of the basic GA instance.

basicEndpointGroupName String

The name of the endpoint group. The basic_endpoint_group_name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

description String

The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain http:// or https://.

endpointAddress String

The address of the endpoint.

endpointGroupRegion String

The ID of the region where you want to create the endpoint group.

endpointSubAddress String

The sub address of the endpoint.

endpointType String

The type of the endpoint. Valid values: ENI, SLB and ECS.

status String

The status of the Basic Endpoint Group.

Import

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

 $ pulumi import alicloud:ga/basicEndpointGroup:BasicEndpointGroup 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.