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

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.Provider;
import com.pulumi.alicloud.ProviderArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.cen.Instance;
import com.pulumi.alicloud.cen.InstanceArgs;
import com.pulumi.alicloud.cen.BandwidthPackage;
import com.pulumi.alicloud.cen.BandwidthPackageArgs;
import com.pulumi.alicloud.cen.BandwidthPackageAttachment;
import com.pulumi.alicloud.cen.BandwidthPackageAttachmentArgs;
import com.pulumi.alicloud.cen.InstanceAttachment;
import com.pulumi.alicloud.cen.InstanceAttachmentArgs;
import com.pulumi.alicloud.cen.BandwidthLimit;
import com.pulumi.alicloud.cen.BandwidthLimitArgs;
import com.pulumi.resources.CustomResourceOptions;
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 name = config.get("name").orElse("tf-testAccCenBandwidthLimitConfig");
var fra = new Provider("fra", ProviderArgs.builder()
.region("eu-central-1")
.build());
var sh = new Provider("sh", ProviderArgs.builder()
.region("cn-shanghai")
.build());
var vpc1 = new Network("vpc1", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("192.168.0.0/16")
.build(), CustomResourceOptions.builder()
.provider(alicloud.fra())
.build());
var vpc2 = new Network("vpc2", NetworkArgs.builder()
.cidrBlock("172.16.0.0/12")
.build(), CustomResourceOptions.builder()
.provider(alicloud.sh())
.build());
var cen = new Instance("cen", InstanceArgs.builder()
.description("tf-testAccCenBandwidthLimitConfigDescription")
.build());
var bwp = new BandwidthPackage("bwp", BandwidthPackageArgs.builder()
.bandwidth(5)
.geographicRegionIds(
"Europe",
"China")
.build());
var bwpAttach = new BandwidthPackageAttachment("bwpAttach", BandwidthPackageAttachmentArgs.builder()
.instanceId(cen.id())
.bandwidthPackageId(bwp.id())
.build());
var vpcAttach1 = new InstanceAttachment("vpcAttach1", InstanceAttachmentArgs.builder()
.instanceId(cen.id())
.childInstanceId(vpc1.id())
.childInstanceType("VPC")
.childInstanceRegionId("eu-central-1")
.build());
var vpcAttach2 = new InstanceAttachment("vpcAttach2", InstanceAttachmentArgs.builder()
.instanceId(cen.id())
.childInstanceId(vpc2.id())
.childInstanceType("VPC")
.childInstanceRegionId("cn-shanghai")
.build());
var foo = new BandwidthLimit("foo", BandwidthLimitArgs.builder()
.instanceId(cen.id())
.regionIds(
"eu-central-1",
"cn-shanghai")
.bandwidthLimit(4)
.build(), CustomResourceOptions.builder()
.dependsOn(
bwpAttach,
vpcAttach1,
vpcAttach2)
.build());
}
}

Import

CEN bandwidth limit can be imported using the id, e.g.

$ pulumi import alicloud:cen/bandwidthLimit:BandwidthLimit example cen-abc123456:cn-beijing:eu-west-1

Properties

Link copied to clipboard
val bandwidthLimit: Output<Int>

The bandwidth configured for the interconnected regions communication.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceId: Output<String>

The ID of the CEN.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val regionIds: Output<List<String>>

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

Link copied to clipboard
val urn: Output<String>