BandwidthLimit

Provides a CEN cross-regional interconnection bandwidth resource. To connect networks in different regions, you must set cross-region interconnection bandwidth after buying a bandwidth package. The total bandwidth set for all the interconnected regions of a bandwidth package cannot exceed the bandwidth of the bandwidth package. By default, 1 Kbps bandwidth is provided for connectivity test. To run normal business, you must buy a bandwidth package and set a proper interconnection bandwidth.

For example, a CEN instance is bound to a bandwidth package of 20 Mbps and the interconnection areas are Mainland China and North America. You can set the cross-region interconnection bandwidth between US West 1 and China East 1, China East 2, China South 1, and so on. However, the total bandwidth set for all the interconnected regions cannot exceed 20 Mbps.

For information about CEN and how to use it, see Cross-region interconnection bandwidth

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-testAccCenBandwidthLimitConfig";
        var fra = new AliCloud.Provider("fra", new AliCloud.ProviderArgs
        {
            Region = "eu-central-1",
        });
        var sh = new AliCloud.Provider("sh", new AliCloud.ProviderArgs
        {
            Region = "cn-shanghai",
        });
        var vpc1 = new AliCloud.Vpc.Network("vpc1", new AliCloud.Vpc.NetworkArgs
        {
            CidrBlock = "192.168.0.0/16",
        });
        var vpc2 = new AliCloud.Vpc.Network("vpc2", new AliCloud.Vpc.NetworkArgs
        {
            CidrBlock = "172.16.0.0/12",
        });
        var cen = new AliCloud.Cen.Instance("cen", new AliCloud.Cen.InstanceArgs
        {
            Description = "tf-testAccCenBandwidthLimitConfigDescription",
        });
        var bwp = new AliCloud.Cen.BandwidthPackage("bwp", new AliCloud.Cen.BandwidthPackageArgs
        {
            Bandwidth = 5,
            GeographicRegionIds = 
            {
                "Europe",
                "China",
            },
        });
        var bwpAttach = new AliCloud.Cen.BandwidthPackageAttachment("bwpAttach", new AliCloud.Cen.BandwidthPackageAttachmentArgs
        {
            BandwidthPackageId = bwp.Id,
            InstanceId = cen.Id,
        });
        var vpcAttach1 = new AliCloud.Cen.InstanceAttachment("vpcAttach1", new AliCloud.Cen.InstanceAttachmentArgs
        {
            ChildInstanceId = vpc1.Id,
            ChildInstanceRegionId = "eu-central-1",
            InstanceId = cen.Id,
        });
        var vpcAttach2 = new AliCloud.Cen.InstanceAttachment("vpcAttach2", new AliCloud.Cen.InstanceAttachmentArgs
        {
            ChildInstanceId = vpc2.Id,
            ChildInstanceRegionId = "cn-shanghai",
            InstanceId = cen.Id,
        });
        var foo = new AliCloud.Cen.BandwidthLimit("foo", new AliCloud.Cen.BandwidthLimitArgs
        {
            BandwidthLimit = 4,
            InstanceId = cen.Id,
            RegionIds = 
            {
                "eu-central-1",
                "cn-shanghai",
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud
import pulumi_pulumi as pulumi

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-testAccCenBandwidthLimitConfig"
fra = pulumi.providers.Alicloud("fra", region="eu-central-1")
sh = pulumi.providers.Alicloud("sh", region="cn-shanghai")
vpc1 = alicloud.vpc.Network("vpc1", cidr_block="192.168.0.0/16")
vpc2 = alicloud.vpc.Network("vpc2", cidr_block="172.16.0.0/12")
cen = alicloud.cen.Instance("cen", description="tf-testAccCenBandwidthLimitConfigDescription")
bwp = alicloud.cen.BandwidthPackage("bwp",
    bandwidth=5,
    geographic_region_ids=[
        "Europe",
        "China",
    ])
bwp_attach = alicloud.cen.BandwidthPackageAttachment("bwpAttach",
    bandwidth_package_id=bwp.id,
    instance_id=cen.id)
vpc_attach1 = alicloud.cen.InstanceAttachment("vpcAttach1",
    child_instance_id=vpc1.id,
    child_instance_region_id="eu-central-1",
    instance_id=cen.id)
vpc_attach2 = alicloud.cen.InstanceAttachment("vpcAttach2",
    child_instance_id=vpc2.id,
    child_instance_region_id="cn-shanghai",
    instance_id=cen.id)
foo = alicloud.cen.BandwidthLimit("foo",
    bandwidth_limit=4,
    instance_id=cen.id,
    region_ids=[
        "eu-central-1",
        "cn-shanghai",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "tf-testAccCenBandwidthLimitConfig";

const fra = new alicloud.Provider("fra", {
    region: "eu-central-1",
});
const sh = new alicloud.Provider("sh", {
    region: "cn-shanghai",
});
const vpc1 = new alicloud.vpc.Network("vpc1", {
    cidrBlock: "192.168.0.0/16",
}, { provider: fra });
const vpc2 = new alicloud.vpc.Network("vpc2", {
    cidrBlock: "172.16.0.0/12",
}, { provider: sh });
const cen = new alicloud.cen.Instance("cen", {
    description: "tf-testAccCenBandwidthLimitConfigDescription",
});
const bwp = new alicloud.cen.BandwidthPackage("bwp", {
    bandwidth: 5,
    geographicRegionIds: [
        "Europe",
        "China",
    ],
});
const bwpAttach = new alicloud.cen.BandwidthPackageAttachment("bwp_attach", {
    bandwidthPackageId: bwp.id,
    instanceId: cen.id,
});
const vpcAttach1 = new alicloud.cen.InstanceAttachment("vpc_attach_1", {
    childInstanceId: vpc1.id,
    childInstanceRegionId: "eu-central-1",
    instanceId: cen.id,
});
const vpcAttach2 = new alicloud.cen.InstanceAttachment("vpc_attach_2", {
    childInstanceId: vpc2.id,
    childInstanceRegionId: "cn-shanghai",
    instanceId: cen.id,
});
const foo = new alicloud.cen.BandwidthLimit("foo", {
    bandwidthLimit: 4,
    instanceId: cen.id,
    regionIds: [
        "eu-central-1",
        "cn-shanghai",
    ],
}, { dependsOn: [bwpAttach, vpcAttach1, vpcAttach2] });

Create a BandwidthLimit Resource

def BandwidthLimit(resource_name, opts=None, bandwidth_limit=None, instance_id=None, region_ids=None, __props__=None);
name string
The unique name of the resource.
args BandwidthLimitArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BandwidthLimitArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BandwidthLimitArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

BandwidthLimit Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The BandwidthLimit resource accepts the following input properties:

InstanceId string

The ID of the CEN.

Limit int

The bandwidth configured for the interconnected regions communication.

RegionIds List<string>

List of the two regions to interconnect. Must be two different regions.

BandwidthLimit int

The bandwidth configured for the interconnected regions communication.

InstanceId string

The ID of the CEN.

RegionIds []string

List of the two regions to interconnect. Must be two different regions.

bandwidthLimit number

The bandwidth configured for the interconnected regions communication.

instanceId string

The ID of the CEN.

regionIds string[]

List of the two regions to interconnect. Must be two different regions.

bandwidth_limit float

The bandwidth configured for the interconnected regions communication.

instance_id str

The ID of the CEN.

region_ids List[str]

List of the two regions to interconnect. Must be two different regions.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing BandwidthLimit Resource

Get an existing BandwidthLimit 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?: BandwidthLimitState, opts?: CustomResourceOptions): BandwidthLimit
static get(resource_name, id, opts=None, bandwidth_limit=None, instance_id=None, region_ids=None, __props__=None);
func GetBandwidthLimit(ctx *Context, name string, id IDInput, state *BandwidthLimitState, opts ...ResourceOption) (*BandwidthLimit, error)
public static BandwidthLimit Get(string name, Input<string> id, BandwidthLimitState? 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:

InstanceId string

The ID of the CEN.

Limit int

The bandwidth configured for the interconnected regions communication.

RegionIds List<string>

List of the two regions to interconnect. Must be two different regions.

BandwidthLimit int

The bandwidth configured for the interconnected regions communication.

InstanceId string

The ID of the CEN.

RegionIds []string

List of the two regions to interconnect. Must be two different regions.

bandwidthLimit number

The bandwidth configured for the interconnected regions communication.

instanceId string

The ID of the CEN.

regionIds string[]

List of the two regions to interconnect. Must be two different regions.

bandwidth_limit float

The bandwidth configured for the interconnected regions communication.

instance_id str

The ID of the CEN.

region_ids List[str]

List of the two regions to interconnect. Must be two different regions.

Package Details

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