Class 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",
},
});
}
}
Inherited Members
Namespace: Pulumi.AliCloud.Cen
Assembly: Pulumi.AliCloud.dll
Syntax
public class BandwidthLimit : CustomResource
Constructors
View SourceBandwidthLimit(String, BandwidthLimitArgs, CustomResourceOptions)
Create a BandwidthLimit resource with the given unique name, arguments, and options.
Declaration
public BandwidthLimit(string name, BandwidthLimitArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| BandwidthLimitArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceInstanceId
The ID of the CEN.
Declaration
public Output<string> InstanceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Limit
The bandwidth configured for the interconnected regions communication.
Declaration
public Output<int> Limit { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
RegionIds
List of the two regions to interconnect. Must be two different regions.
Declaration
public Output<ImmutableArray<string>> RegionIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Methods
View SourceGet(String, Input<String>, BandwidthLimitState, CustomResourceOptions)
Get an existing BandwidthLimit resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static BandwidthLimit Get(string name, Input<string> id, BandwidthLimitState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| BandwidthLimitState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| BandwidthLimit |