1. Packages
  2. Alicloud Provider
  3. API Docs
  4. ga
  5. BasicAccelerateIp
Alibaba Cloud v3.65.1 published on Wednesday, Nov 13, 2024 by Pulumi

alicloud.ga.BasicAccelerateIp

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.65.1 published on Wednesday, Nov 13, 2024 by Pulumi

    Provides a Global Accelerator (GA) Basic Accelerate IP resource.

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

    NOTE: Available since v1.194.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.BasicAccelerator("default", {
        duration: 1,
        basicAcceleratorName: "terraform-example",
        description: "terraform-example",
        bandwidthBillingType: "CDT",
        autoUseCoupon: "true",
        autoPay: true,
    });
    const defaultBasicIpSet = new alicloud.ga.BasicIpSet("default", {
        acceleratorId: _default.id,
        accelerateRegionId: region,
        ispType: "BGP",
        bandwidth: 5,
    });
    const defaultBasicAccelerateIp = new alicloud.ga.BasicAccelerateIp("default", {
        acceleratorId: _default.id,
        ipSetId: defaultBasicIpSet.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    region = config.get("region")
    if region is None:
        region = "cn-hangzhou"
    default = alicloud.ga.BasicAccelerator("default",
        duration=1,
        basic_accelerator_name="terraform-example",
        description="terraform-example",
        bandwidth_billing_type="CDT",
        auto_use_coupon="true",
        auto_pay=True)
    default_basic_ip_set = alicloud.ga.BasicIpSet("default",
        accelerator_id=default.id,
        accelerate_region_id=region,
        isp_type="BGP",
        bandwidth=5)
    default_basic_accelerate_ip = alicloud.ga.BasicAccelerateIp("default",
        accelerator_id=default.id,
        ip_set_id=default_basic_ip_set.id)
    
    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.NewBasicAccelerator(ctx, "default", &ga.BasicAcceleratorArgs{
    			Duration:             pulumi.Int(1),
    			BasicAcceleratorName: pulumi.String("terraform-example"),
    			Description:          pulumi.String("terraform-example"),
    			BandwidthBillingType: pulumi.String("CDT"),
    			AutoUseCoupon:        pulumi.String("true"),
    			AutoPay:              pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		defaultBasicIpSet, err := ga.NewBasicIpSet(ctx, "default", &ga.BasicIpSetArgs{
    			AcceleratorId:      _default.ID(),
    			AccelerateRegionId: pulumi.String(region),
    			IspType:            pulumi.String("BGP"),
    			Bandwidth:          pulumi.Int(5),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ga.NewBasicAccelerateIp(ctx, "default", &ga.BasicAccelerateIpArgs{
    			AcceleratorId: _default.ID(),
    			IpSetId:       defaultBasicIpSet.ID(),
    		})
    		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.BasicAccelerator("default", new()
        {
            Duration = 1,
            BasicAcceleratorName = "terraform-example",
            Description = "terraform-example",
            BandwidthBillingType = "CDT",
            AutoUseCoupon = "true",
            AutoPay = true,
        });
    
        var defaultBasicIpSet = new AliCloud.Ga.BasicIpSet("default", new()
        {
            AcceleratorId = @default.Id,
            AccelerateRegionId = region,
            IspType = "BGP",
            Bandwidth = 5,
        });
    
        var defaultBasicAccelerateIp = new AliCloud.Ga.BasicAccelerateIp("default", new()
        {
            AcceleratorId = @default.Id,
            IpSetId = defaultBasicIpSet.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ga.BasicAccelerator;
    import com.pulumi.alicloud.ga.BasicAcceleratorArgs;
    import com.pulumi.alicloud.ga.BasicIpSet;
    import com.pulumi.alicloud.ga.BasicIpSetArgs;
    import com.pulumi.alicloud.ga.BasicAccelerateIp;
    import com.pulumi.alicloud.ga.BasicAccelerateIpArgs;
    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 BasicAccelerator("default", BasicAcceleratorArgs.builder()
                .duration(1)
                .basicAcceleratorName("terraform-example")
                .description("terraform-example")
                .bandwidthBillingType("CDT")
                .autoUseCoupon("true")
                .autoPay(true)
                .build());
    
            var defaultBasicIpSet = new BasicIpSet("defaultBasicIpSet", BasicIpSetArgs.builder()
                .acceleratorId(default_.id())
                .accelerateRegionId(region)
                .ispType("BGP")
                .bandwidth("5")
                .build());
    
            var defaultBasicAccelerateIp = new BasicAccelerateIp("defaultBasicAccelerateIp", BasicAccelerateIpArgs.builder()
                .acceleratorId(default_.id())
                .ipSetId(defaultBasicIpSet.id())
                .build());
    
        }
    }
    
    configuration:
      region:
        type: string
        default: cn-hangzhou
    resources:
      default:
        type: alicloud:ga:BasicAccelerator
        properties:
          duration: 1
          basicAcceleratorName: terraform-example
          description: terraform-example
          bandwidthBillingType: CDT
          autoUseCoupon: 'true'
          autoPay: true
      defaultBasicIpSet:
        type: alicloud:ga:BasicIpSet
        name: default
        properties:
          acceleratorId: ${default.id}
          accelerateRegionId: ${region}
          ispType: BGP
          bandwidth: '5'
      defaultBasicAccelerateIp:
        type: alicloud:ga:BasicAccelerateIp
        name: default
        properties:
          acceleratorId: ${default.id}
          ipSetId: ${defaultBasicIpSet.id}
    

    Create BasicAccelerateIp Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BasicAccelerateIp(name: string, args: BasicAccelerateIpArgs, opts?: CustomResourceOptions);
    @overload
    def BasicAccelerateIp(resource_name: str,
                          args: BasicAccelerateIpArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def BasicAccelerateIp(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          accelerator_id: Optional[str] = None,
                          ip_set_id: Optional[str] = None)
    func NewBasicAccelerateIp(ctx *Context, name string, args BasicAccelerateIpArgs, opts ...ResourceOption) (*BasicAccelerateIp, error)
    public BasicAccelerateIp(string name, BasicAccelerateIpArgs args, CustomResourceOptions? opts = null)
    public BasicAccelerateIp(String name, BasicAccelerateIpArgs args)
    public BasicAccelerateIp(String name, BasicAccelerateIpArgs args, CustomResourceOptions options)
    
    type: alicloud:ga:BasicAccelerateIp
    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 BasicAccelerateIpArgs
    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 BasicAccelerateIpArgs
    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 BasicAccelerateIpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BasicAccelerateIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BasicAccelerateIpArgs
    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 basicAccelerateIpResource = new AliCloud.Ga.BasicAccelerateIp("basicAccelerateIpResource", new()
    {
        AcceleratorId = "string",
        IpSetId = "string",
    });
    
    example, err := ga.NewBasicAccelerateIp(ctx, "basicAccelerateIpResource", &ga.BasicAccelerateIpArgs{
    	AcceleratorId: pulumi.String("string"),
    	IpSetId:       pulumi.String("string"),
    })
    
    var basicAccelerateIpResource = new BasicAccelerateIp("basicAccelerateIpResource", BasicAccelerateIpArgs.builder()
        .acceleratorId("string")
        .ipSetId("string")
        .build());
    
    basic_accelerate_ip_resource = alicloud.ga.BasicAccelerateIp("basicAccelerateIpResource",
        accelerator_id="string",
        ip_set_id="string")
    
    const basicAccelerateIpResource = new alicloud.ga.BasicAccelerateIp("basicAccelerateIpResource", {
        acceleratorId: "string",
        ipSetId: "string",
    });
    
    type: alicloud:ga:BasicAccelerateIp
    properties:
        acceleratorId: string
        ipSetId: string
    

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

    AcceleratorId string
    The ID of the Basic GA instance.
    IpSetId string
    The ID of the Basic Ip Set.
    AcceleratorId string
    The ID of the Basic GA instance.
    IpSetId string
    The ID of the Basic Ip Set.
    acceleratorId String
    The ID of the Basic GA instance.
    ipSetId String
    The ID of the Basic Ip Set.
    acceleratorId string
    The ID of the Basic GA instance.
    ipSetId string
    The ID of the Basic Ip Set.
    accelerator_id str
    The ID of the Basic GA instance.
    ip_set_id str
    The ID of the Basic Ip Set.
    acceleratorId String
    The ID of the Basic GA instance.
    ipSetId String
    The ID of the Basic Ip Set.

    Outputs

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

    AccelerateIpAddress string
    The address of the Basic Accelerate IP.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Basic Accelerate IP instance.
    AccelerateIpAddress string
    The address of the Basic Accelerate IP.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Basic Accelerate IP instance.
    accelerateIpAddress String
    The address of the Basic Accelerate IP.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Basic Accelerate IP instance.
    accelerateIpAddress string
    The address of the Basic Accelerate IP.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the Basic Accelerate IP instance.
    accelerate_ip_address str
    The address of the Basic Accelerate IP.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the Basic Accelerate IP instance.
    accelerateIpAddress String
    The address of the Basic Accelerate IP.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Basic Accelerate IP instance.

    Look up Existing BasicAccelerateIp Resource

    Get an existing BasicAccelerateIp 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?: BasicAccelerateIpState, opts?: CustomResourceOptions): BasicAccelerateIp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accelerate_ip_address: Optional[str] = None,
            accelerator_id: Optional[str] = None,
            ip_set_id: Optional[str] = None,
            status: Optional[str] = None) -> BasicAccelerateIp
    func GetBasicAccelerateIp(ctx *Context, name string, id IDInput, state *BasicAccelerateIpState, opts ...ResourceOption) (*BasicAccelerateIp, error)
    public static BasicAccelerateIp Get(string name, Input<string> id, BasicAccelerateIpState? state, CustomResourceOptions? opts = null)
    public static BasicAccelerateIp get(String name, Output<String> id, BasicAccelerateIpState 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:
    AccelerateIpAddress string
    The address of the Basic Accelerate IP.
    AcceleratorId string
    The ID of the Basic GA instance.
    IpSetId string
    The ID of the Basic Ip Set.
    Status string
    The status of the Basic Accelerate IP instance.
    AccelerateIpAddress string
    The address of the Basic Accelerate IP.
    AcceleratorId string
    The ID of the Basic GA instance.
    IpSetId string
    The ID of the Basic Ip Set.
    Status string
    The status of the Basic Accelerate IP instance.
    accelerateIpAddress String
    The address of the Basic Accelerate IP.
    acceleratorId String
    The ID of the Basic GA instance.
    ipSetId String
    The ID of the Basic Ip Set.
    status String
    The status of the Basic Accelerate IP instance.
    accelerateIpAddress string
    The address of the Basic Accelerate IP.
    acceleratorId string
    The ID of the Basic GA instance.
    ipSetId string
    The ID of the Basic Ip Set.
    status string
    The status of the Basic Accelerate IP instance.
    accelerate_ip_address str
    The address of the Basic Accelerate IP.
    accelerator_id str
    The ID of the Basic GA instance.
    ip_set_id str
    The ID of the Basic Ip Set.
    status str
    The status of the Basic Accelerate IP instance.
    accelerateIpAddress String
    The address of the Basic Accelerate IP.
    acceleratorId String
    The ID of the Basic GA instance.
    ipSetId String
    The ID of the Basic Ip Set.
    status String
    The status of the Basic Accelerate IP instance.

    Import

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

    $ pulumi import alicloud:ga/basicAccelerateIp:BasicAccelerateIp 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.
    alicloud logo
    Alibaba Cloud v3.65.1 published on Wednesday, Nov 13, 2024 by Pulumi