1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ga
  5. BasicIpSet
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.ga.BasicIpSet

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    Provides a Global Accelerator (GA) Basic Ip Set resource.

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

    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,
        pricingCycle: "Month",
        bandwidthBillingType: "CDT",
        autoPay: true,
        autoUseCoupon: "true",
        autoRenew: false,
        autoRenewDuration: 1,
    });
    const defaultBasicIpSet = new alicloud.ga.BasicIpSet("default", {
        acceleratorId: _default.id,
        accelerateRegionId: region,
        ispType: "BGP",
        bandwidth: 5,
    });
    
    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,
        pricing_cycle="Month",
        bandwidth_billing_type="CDT",
        auto_pay=True,
        auto_use_coupon="true",
        auto_renew=False,
        auto_renew_duration=1)
    default_basic_ip_set = alicloud.ga.BasicIpSet("default",
        accelerator_id=default.id,
        accelerate_region_id=region,
        isp_type="BGP",
        bandwidth=5)
    
    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),
    			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.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
    		}
    		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,
            PricingCycle = "Month",
            BandwidthBillingType = "CDT",
            AutoPay = true,
            AutoUseCoupon = "true",
            AutoRenew = false,
            AutoRenewDuration = 1,
        });
    
        var defaultBasicIpSet = new AliCloud.Ga.BasicIpSet("default", new()
        {
            AcceleratorId = @default.Id,
            AccelerateRegionId = region,
            IspType = "BGP",
            Bandwidth = 5,
        });
    
    });
    
    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 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)
                .pricingCycle("Month")
                .bandwidthBillingType("CDT")
                .autoPay(true)
                .autoUseCoupon("true")
                .autoRenew(false)
                .autoRenewDuration(1)
                .build());
    
            var defaultBasicIpSet = new BasicIpSet("defaultBasicIpSet", BasicIpSetArgs.builder()        
                .acceleratorId(default_.id())
                .accelerateRegionId(region)
                .ispType("BGP")
                .bandwidth("5")
                .build());
    
        }
    }
    
    configuration:
      region:
        type: string
        default: cn-hangzhou
    resources:
      default:
        type: alicloud:ga:BasicAccelerator
        properties:
          duration: 1
          pricingCycle: Month
          bandwidthBillingType: CDT
          autoPay: true
          autoUseCoupon: 'true'
          autoRenew: false
          autoRenewDuration: 1
      defaultBasicIpSet:
        type: alicloud:ga:BasicIpSet
        name: default
        properties:
          acceleratorId: ${default.id}
          accelerateRegionId: ${region}
          ispType: BGP
          bandwidth: '5'
    

    Create BasicIpSet Resource

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

    Constructor syntax

    new BasicIpSet(name: string, args: BasicIpSetArgs, opts?: CustomResourceOptions);
    @overload
    def BasicIpSet(resource_name: str,
                   args: BasicIpSetArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def BasicIpSet(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   accelerate_region_id: Optional[str] = None,
                   accelerator_id: Optional[str] = None,
                   bandwidth: Optional[int] = None,
                   isp_type: Optional[str] = None)
    func NewBasicIpSet(ctx *Context, name string, args BasicIpSetArgs, opts ...ResourceOption) (*BasicIpSet, error)
    public BasicIpSet(string name, BasicIpSetArgs args, CustomResourceOptions? opts = null)
    public BasicIpSet(String name, BasicIpSetArgs args)
    public BasicIpSet(String name, BasicIpSetArgs args, CustomResourceOptions options)
    
    type: alicloud:ga:BasicIpSet
    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 BasicIpSetArgs
    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 BasicIpSetArgs
    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 BasicIpSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BasicIpSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BasicIpSetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var basicIpSetResource = new AliCloud.Ga.BasicIpSet("basicIpSetResource", new()
    {
        AccelerateRegionId = "string",
        AcceleratorId = "string",
        Bandwidth = 0,
        IspType = "string",
    });
    
    example, err := ga.NewBasicIpSet(ctx, "basicIpSetResource", &ga.BasicIpSetArgs{
    	AccelerateRegionId: pulumi.String("string"),
    	AcceleratorId:      pulumi.String("string"),
    	Bandwidth:          pulumi.Int(0),
    	IspType:            pulumi.String("string"),
    })
    
    var basicIpSetResource = new BasicIpSet("basicIpSetResource", BasicIpSetArgs.builder()        
        .accelerateRegionId("string")
        .acceleratorId("string")
        .bandwidth(0)
        .ispType("string")
        .build());
    
    basic_ip_set_resource = alicloud.ga.BasicIpSet("basicIpSetResource",
        accelerate_region_id="string",
        accelerator_id="string",
        bandwidth=0,
        isp_type="string")
    
    const basicIpSetResource = new alicloud.ga.BasicIpSet("basicIpSetResource", {
        accelerateRegionId: "string",
        acceleratorId: "string",
        bandwidth: 0,
        ispType: "string",
    });
    
    type: alicloud:ga:BasicIpSet
    properties:
        accelerateRegionId: string
        acceleratorId: string
        bandwidth: 0
        ispType: string
    

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

    AccelerateRegionId string
    The ID of the acceleration region.
    AcceleratorId string
    The ID of the basic GA instance.
    Bandwidth int
    The bandwidth of the acceleration region. Unit: Mbit/s.
    IspType string
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    AccelerateRegionId string
    The ID of the acceleration region.
    AcceleratorId string
    The ID of the basic GA instance.
    Bandwidth int
    The bandwidth of the acceleration region. Unit: Mbit/s.
    IspType string
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    accelerateRegionId String
    The ID of the acceleration region.
    acceleratorId String
    The ID of the basic GA instance.
    bandwidth Integer
    The bandwidth of the acceleration region. Unit: Mbit/s.
    ispType String
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    accelerateRegionId string
    The ID of the acceleration region.
    acceleratorId string
    The ID of the basic GA instance.
    bandwidth number
    The bandwidth of the acceleration region. Unit: Mbit/s.
    ispType string
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    accelerate_region_id str
    The ID of the acceleration region.
    accelerator_id str
    The ID of the basic GA instance.
    bandwidth int
    The bandwidth of the acceleration region. Unit: Mbit/s.
    isp_type str
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    accelerateRegionId String
    The ID of the acceleration region.
    acceleratorId String
    The ID of the basic GA instance.
    bandwidth Number
    The bandwidth of the acceleration region. Unit: Mbit/s.
    ispType String
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Basic Ip Set instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Basic Ip Set instance.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Basic Ip Set instance.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the Basic Ip Set instance.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the Basic Ip Set instance.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Basic Ip Set instance.

    Look up Existing BasicIpSet Resource

    Get an existing BasicIpSet 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?: BasicIpSetState, opts?: CustomResourceOptions): BasicIpSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accelerate_region_id: Optional[str] = None,
            accelerator_id: Optional[str] = None,
            bandwidth: Optional[int] = None,
            isp_type: Optional[str] = None,
            status: Optional[str] = None) -> BasicIpSet
    func GetBasicIpSet(ctx *Context, name string, id IDInput, state *BasicIpSetState, opts ...ResourceOption) (*BasicIpSet, error)
    public static BasicIpSet Get(string name, Input<string> id, BasicIpSetState? state, CustomResourceOptions? opts = null)
    public static BasicIpSet get(String name, Output<String> id, BasicIpSetState 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:
    AccelerateRegionId string
    The ID of the acceleration region.
    AcceleratorId string
    The ID of the basic GA instance.
    Bandwidth int
    The bandwidth of the acceleration region. Unit: Mbit/s.
    IspType string
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    Status string
    The status of the Basic Ip Set instance.
    AccelerateRegionId string
    The ID of the acceleration region.
    AcceleratorId string
    The ID of the basic GA instance.
    Bandwidth int
    The bandwidth of the acceleration region. Unit: Mbit/s.
    IspType string
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    Status string
    The status of the Basic Ip Set instance.
    accelerateRegionId String
    The ID of the acceleration region.
    acceleratorId String
    The ID of the basic GA instance.
    bandwidth Integer
    The bandwidth of the acceleration region. Unit: Mbit/s.
    ispType String
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    status String
    The status of the Basic Ip Set instance.
    accelerateRegionId string
    The ID of the acceleration region.
    acceleratorId string
    The ID of the basic GA instance.
    bandwidth number
    The bandwidth of the acceleration region. Unit: Mbit/s.
    ispType string
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    status string
    The status of the Basic Ip Set instance.
    accelerate_region_id str
    The ID of the acceleration region.
    accelerator_id str
    The ID of the basic GA instance.
    bandwidth int
    The bandwidth of the acceleration region. Unit: Mbit/s.
    isp_type str
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    status str
    The status of the Basic Ip Set instance.
    accelerateRegionId String
    The ID of the acceleration region.
    acceleratorId String
    The ID of the basic GA instance.
    bandwidth Number
    The bandwidth of the acceleration region. Unit: Mbit/s.
    ispType String
    The line type of the elastic IP address (EIP) in the acceleration region. Default value: BGP. Valid values: BGP, BGP_PRO, ChinaTelecom, ChinaUnicom, ChinaMobile, ChinaTelecom_L2, ChinaUnicom_L2, ChinaMobile_L2.
    status String
    The status of the Basic Ip Set instance.

    Import

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

    $ pulumi import alicloud:ga/basicIpSet:BasicIpSet 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.54.0 published on Wednesday, Apr 24, 2024 by Pulumi