Alibaba Cloud

v3.10.0 published on Wednesday, Nov 24, 2021 by Pulumi

IpSet

Provides a Global Accelerator (GA) Ip Set resource.

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

NOTE: Available in v1.113.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleAccelerator = new AliCloud.Ga.Accelerator("exampleAccelerator", new AliCloud.Ga.AcceleratorArgs
        {
            Duration = 1,
            AutoUseCoupon = true,
            Spec = "1",
        });
        var exampleBandwidthPackage = new AliCloud.Ga.BandwidthPackage("exampleBandwidthPackage", new AliCloud.Ga.BandwidthPackageArgs
        {
            Bandwidth = 20,
            Type = "Basic",
            BandwidthType = "Basic",
            Duration = "1",
            AutoPay = true,
            Ratio = 30,
        });
        var exampleBandwidthPackageAttachment = new AliCloud.Ga.BandwidthPackageAttachment("exampleBandwidthPackageAttachment", new AliCloud.Ga.BandwidthPackageAttachmentArgs
        {
            AcceleratorId = exampleAccelerator.Id,
            BandwidthPackageId = exampleBandwidthPackage.Id,
        });
        var exampleIpSet = new AliCloud.Ga.IpSet("exampleIpSet", new AliCloud.Ga.IpSetArgs
        {
            AccelerateRegionId = "cn-hangzhou",
            Bandwidth = 5,
            AcceleratorId = exampleAccelerator.Id,
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                exampleBandwidthPackageAttachment,
            },
        });
    }

}
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 {
		exampleAccelerator, err := ga.NewAccelerator(ctx, "exampleAccelerator", &ga.AcceleratorArgs{
			Duration:      pulumi.Int(1),
			AutoUseCoupon: pulumi.Bool(true),
			Spec:          pulumi.String("1"),
		})
		if err != nil {
			return err
		}
		exampleBandwidthPackage, err := ga.NewBandwidthPackage(ctx, "exampleBandwidthPackage", &ga.BandwidthPackageArgs{
			Bandwidth:     pulumi.Int(20),
			Type:          pulumi.String("Basic"),
			BandwidthType: pulumi.String("Basic"),
			Duration:      pulumi.String("1"),
			AutoPay:       pulumi.Bool(true),
			Ratio:         pulumi.Int(30),
		})
		if err != nil {
			return err
		}
		exampleBandwidthPackageAttachment, err := ga.NewBandwidthPackageAttachment(ctx, "exampleBandwidthPackageAttachment", &ga.BandwidthPackageAttachmentArgs{
			AcceleratorId:      exampleAccelerator.ID(),
			BandwidthPackageId: exampleBandwidthPackage.ID(),
		})
		if err != nil {
			return err
		}
		_, err = ga.NewIpSet(ctx, "exampleIpSet", &ga.IpSetArgs{
			AccelerateRegionId: pulumi.String("cn-hangzhou"),
			Bandwidth:          pulumi.Int(5),
			AcceleratorId:      exampleAccelerator.ID(),
		}, pulumi.DependsOn([]pulumi.Resource{
			exampleBandwidthPackageAttachment,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_alicloud as alicloud

example_accelerator = alicloud.ga.Accelerator("exampleAccelerator",
    duration=1,
    auto_use_coupon=True,
    spec="1")
example_bandwidth_package = alicloud.ga.BandwidthPackage("exampleBandwidthPackage",
    bandwidth=20,
    type="Basic",
    bandwidth_type="Basic",
    duration="1",
    auto_pay=True,
    ratio=30)
example_bandwidth_package_attachment = alicloud.ga.BandwidthPackageAttachment("exampleBandwidthPackageAttachment",
    accelerator_id=example_accelerator.id,
    bandwidth_package_id=example_bandwidth_package.id)
example_ip_set = alicloud.ga.IpSet("exampleIpSet",
    accelerate_region_id="cn-hangzhou",
    bandwidth=5,
    accelerator_id=example_accelerator.id,
    opts=pulumi.ResourceOptions(depends_on=[example_bandwidth_package_attachment]))
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const exampleAccelerator = new alicloud.ga.Accelerator("exampleAccelerator", {
    duration: 1,
    autoUseCoupon: true,
    spec: "1",
});
const exampleBandwidthPackage = new alicloud.ga.BandwidthPackage("exampleBandwidthPackage", {
    bandwidth: 20,
    type: "Basic",
    bandwidthType: "Basic",
    duration: 1,
    autoPay: true,
    ratio: 30,
});
const exampleBandwidthPackageAttachment = new alicloud.ga.BandwidthPackageAttachment("exampleBandwidthPackageAttachment", {
    acceleratorId: exampleAccelerator.id,
    bandwidthPackageId: exampleBandwidthPackage.id,
});
const exampleIpSet = new alicloud.ga.IpSet("exampleIpSet", {
    accelerateRegionId: "cn-hangzhou",
    bandwidth: "5",
    acceleratorId: exampleAccelerator.id,
}, {
    dependsOn: [exampleBandwidthPackageAttachment],
});

Create a IpSet Resource

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

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

AccelerateRegionId string
The ID of an acceleration region.
AcceleratorId string
The ID of the Global Accelerator (GA) instance.
Bandwidth int
The bandwidth allocated to the acceleration region.
IpVersion string
The IP protocol used by the GA instance. Valid values: IPv4, IPv6. Default value is IPv4.
AccelerateRegionId string
The ID of an acceleration region.
AcceleratorId string
The ID of the Global Accelerator (GA) instance.
Bandwidth int
The bandwidth allocated to the acceleration region.
IpVersion string
The IP protocol used by the GA instance. Valid values: IPv4, IPv6. Default value is IPv4.
accelerateRegionId string
The ID of an acceleration region.
acceleratorId string
The ID of the Global Accelerator (GA) instance.
bandwidth number
The bandwidth allocated to the acceleration region.
ipVersion string
The IP protocol used by the GA instance. Valid values: IPv4, IPv6. Default value is IPv4.
accelerate_region_id str
The ID of an acceleration region.
accelerator_id str
The ID of the Global Accelerator (GA) instance.
bandwidth int
The bandwidth allocated to the acceleration region.
ip_version str
The IP protocol used by the GA instance. Valid values: IPv4, IPv6. Default value is IPv4.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
IpAddressLists List<string>
The list of accelerated IP addresses in the acceleration region.
Status string
The status of the acceleration region.
Id string
The provider-assigned unique ID for this managed resource.
IpAddressLists []string
The list of accelerated IP addresses in the acceleration region.
Status string
The status of the acceleration region.
id string
The provider-assigned unique ID for this managed resource.
ipAddressLists string[]
The list of accelerated IP addresses in the acceleration region.
status string
The status of the acceleration region.
id str
The provider-assigned unique ID for this managed resource.
ip_address_lists Sequence[str]
The list of accelerated IP addresses in the acceleration region.
status str
The status of the acceleration region.

Look up an Existing IpSet Resource

Get an existing IpSet 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?: IpSetState, opts?: CustomResourceOptions): IpSet
@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,
        ip_address_lists: Optional[Sequence[str]] = None,
        ip_version: Optional[str] = None,
        status: Optional[str] = None) -> IpSet
func GetIpSet(ctx *Context, name string, id IDInput, state *IpSetState, opts ...ResourceOption) (*IpSet, error)
public static IpSet Get(string name, Input<string> id, IpSetState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AccelerateRegionId string
The ID of an acceleration region.
AcceleratorId string
The ID of the Global Accelerator (GA) instance.
Bandwidth int
The bandwidth allocated to the acceleration region.
IpAddressLists List<string>
The list of accelerated IP addresses in the acceleration region.
IpVersion string
The IP protocol used by the GA instance. Valid values: IPv4, IPv6. Default value is IPv4.
Status string
The status of the acceleration region.
AccelerateRegionId string
The ID of an acceleration region.
AcceleratorId string
The ID of the Global Accelerator (GA) instance.
Bandwidth int
The bandwidth allocated to the acceleration region.
IpAddressLists []string
The list of accelerated IP addresses in the acceleration region.
IpVersion string
The IP protocol used by the GA instance. Valid values: IPv4, IPv6. Default value is IPv4.
Status string
The status of the acceleration region.
accelerateRegionId string
The ID of an acceleration region.
acceleratorId string
The ID of the Global Accelerator (GA) instance.
bandwidth number
The bandwidth allocated to the acceleration region.
ipAddressLists string[]
The list of accelerated IP addresses in the acceleration region.
ipVersion string
The IP protocol used by the GA instance. Valid values: IPv4, IPv6. Default value is IPv4.
status string
The status of the acceleration region.
accelerate_region_id str
The ID of an acceleration region.
accelerator_id str
The ID of the Global Accelerator (GA) instance.
bandwidth int
The bandwidth allocated to the acceleration region.
ip_address_lists Sequence[str]
The list of accelerated IP addresses in the acceleration region.
ip_version str
The IP protocol used by the GA instance. Valid values: IPv4, IPv6. Default value is IPv4.
status str
The status of the acceleration region.

Import

Ga Ip Set can be imported using the id, e.g.

 $ pulumi import alicloud:ga/ipSet:IpSet example <id>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.