Namespace Pulumi.AliCloud.Cen
Classes
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",
},
});
}
}
BandwidthLimitArgs
BandwidthLimitState
BandwidthPackage
Provides a CEN bandwidth package resource. The CEN bandwidth package is an abstracted object that includes an interconnection bandwidth and interconnection areas. To buy a bandwidth package, you must specify the areas to connect. An area consists of one or more Alibaba Cloud regions. The areas in CEN include Mainland China, Asia Pacific, North America, and Europe.
For information about CEN and how to use it, see Manage bandwidth packages.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var foo = new AliCloud.Cen.BandwidthPackage("foo", new AliCloud.Cen.BandwidthPackageArgs
{
Bandwidth = 5,
GeographicRegionIds =
{
"China",
"Asia-Pacific",
},
});
}
}
BandwidthPackageArgs
BandwidthPackageAttachment
Provides a CEN bandwidth package attachment resource. The resource can be used to bind a bandwidth package to a specified CEN instance.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
// Create a new bandwidth package attachment and use it to attach a bandwidth package to a new CEN
var cen = new AliCloud.Cen.Instance("cen", new AliCloud.Cen.InstanceArgs
{
Description = "tf-testAccCenBandwidthPackageAttachmentDescription",
});
var bwp = new AliCloud.Cen.BandwidthPackage("bwp", new AliCloud.Cen.BandwidthPackageArgs
{
Bandwidth = 20,
GeographicRegionIds =
{
"China",
"Asia-Pacific",
},
});
var foo = new AliCloud.Cen.BandwidthPackageAttachment("foo", new AliCloud.Cen.BandwidthPackageAttachmentArgs
{
BandwidthPackageId = bwp.Id,
InstanceId = cen.Id,
});
}
}
BandwidthPackageAttachmentArgs
BandwidthPackageAttachmentState
BandwidthPackageState
FlowLog
FlowLogArgs
FlowLogState
GetBandwidthLimits
GetBandwidthLimitsArgs
GetBandwidthLimitsResult
GetBandwidthPackages
GetBandwidthPackagesArgs
GetBandwidthPackagesResult
GetFlowlogs
GetFlowlogsArgs
GetFlowlogsResult
GetInstances
GetInstancesArgs
GetInstancesResult
GetRegionRouteEntries
GetRegionRouteEntriesArgs
GetRegionRouteEntriesResult
GetRouteEntries
GetRouteEntriesArgs
GetRouteEntriesResult
Instance
Provides a CEN instance resource. Cloud Enterprise Network (CEN) is a service that allows you to create a global network for rapidly building a distributed business system with a hybrid cloud computing solution. CEN enables you to build a secure, private, and enterprise-class interconnected network between VPCs in different regions and your local data centers. CEN provides enterprise-class scalability that automatically responds to your dynamic computing requirements.
For information about CEN and how to use it, see What is Cloud Enterprise Network.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var cen = new AliCloud.Cen.Instance("cen", new AliCloud.Cen.InstanceArgs
{
Description = "an example for cen",
});
}
}
InstanceArgs
InstanceAttachment
InstanceAttachmentArgs
InstanceAttachmentState
InstanceGrant
Provides a CEN child instance grant resource, which allow you to authorize a VPC or VBR to a CEN of a different account.
For more information about how to use it, see Attach a network in a different account.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
// Create a new instance-grant and use it to grant one child instance of account1 to a new CEN of account 2.
var account1 = new AliCloud.Provider("account1", new AliCloud.ProviderArgs
{
AccessKey = "access123",
SecretKey = "secret123",
});
var account2 = new AliCloud.Provider("account2", new AliCloud.ProviderArgs
{
AccessKey = "access456",
SecretKey = "secret456",
});
var config = new Config();
var name = config.Get("name") ?? "tf-testAccCenInstanceGrantBasic";
var cen = new AliCloud.Cen.Instance("cen", new AliCloud.Cen.InstanceArgs
{
});
var vpc = new AliCloud.Vpc.Network("vpc", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "192.168.0.0/16",
});
var fooInstanceGrant = new AliCloud.Cen.InstanceGrant("fooInstanceGrant", new AliCloud.Cen.InstanceGrantArgs
{
CenId = cen.Id,
CenOwnerId = "uid2",
ChildInstanceId = vpc.Id,
});
var fooInstanceAttachment = new AliCloud.Cen.InstanceAttachment("fooInstanceAttachment", new AliCloud.Cen.InstanceAttachmentArgs
{
ChildInstanceId = vpc.Id,
ChildInstanceOwnerId = "uid1",
ChildInstanceRegionId = "cn-qingdao",
InstanceId = cen.Id,
});
}
}
InstanceGrantArgs
InstanceGrantState
InstanceState
PrivateZone
This topic describes how to configure PrivateZone access. PrivateZone is a VPC-based resolution and management service for private domain names. After you set a PrivateZone access, the Cloud Connect Network (CCN) and Virtual Border Router (VBR) attached to a CEN instance can access the PrivateZone service through CEN.
For information about CEN Private Zone and how to use it, see Manage CEN Private Zone.
NOTE: Available in 1.83.0+
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var defaultInstance = new AliCloud.Cen.Instance("defaultInstance", new AliCloud.Cen.InstanceArgs
{
});
var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "172.16.0.0/12",
});
var defaultInstanceAttachment = new AliCloud.Cen.InstanceAttachment("defaultInstanceAttachment", new AliCloud.Cen.InstanceAttachmentArgs
{
ChildInstanceId = defaultNetwork.Id,
ChildInstanceRegionId = "cn-hangzhou",
InstanceId = defaultInstance.Id,
});
var defaultPrivateZone = new AliCloud.Cen.PrivateZone("defaultPrivateZone", new AliCloud.Cen.PrivateZoneArgs
{
AccessRegionId = "cn-hangzhou",
CenId = defaultInstance.Id,
HostRegionId = "cn-hangzhou",
HostVpcId = defaultNetwork.Id,
});
}
}
PrivateZoneArgs
PrivateZoneState
RouteEntry
Provides a CEN route entry resource. Cloud Enterprise Network (CEN) supports publishing and withdrawing route entries of attached networks. You can publish a route entry of an attached VPC or VBR to a CEN instance, then other attached networks can learn the route if there is no route conflict. You can withdraw a published route entry when CEN does not need it any more.
For information about CEN route entries publishment and how to use it, see Manage network routes.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var hz = new AliCloud.Provider("hz", new AliCloud.ProviderArgs
{
Region = "cn-hangzhou",
});
var config = new Config();
var name = config.Get("name") ?? "tf-testAccCenRouteEntryConfig";
var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
{
AvailableDiskCategory = "cloud_efficiency",
AvailableResourceCreation = "VSwitch",
}));
var defaultInstanceTypes = defaultZones.Apply(defaultZones => Output.Create(AliCloud.Ecs.GetInstanceTypes.InvokeAsync(new AliCloud.Ecs.GetInstanceTypesArgs
{
AvailabilityZone = defaultZones.Zones[0].Id,
CpuCoreCount = 1,
MemorySize = 2,
})));
var defaultImages = Output.Create(AliCloud.Ecs.GetImages.InvokeAsync(new AliCloud.Ecs.GetImagesArgs
{
MostRecent = true,
NameRegex = "^ubuntu_18.*64",
Owners = "system",
}));
var vpc = new AliCloud.Vpc.Network("vpc", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "172.16.0.0/12",
});
var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new AliCloud.Vpc.SwitchArgs
{
AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones[0].Id),
CidrBlock = "172.16.0.0/21",
VpcId = vpc.Id,
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new AliCloud.Ecs.SecurityGroupArgs
{
Description = "foo",
VpcId = vpc.Id,
});
var defaultInstance = new AliCloud.Ecs.Instance("defaultInstance", new AliCloud.Ecs.InstanceArgs
{
ImageId = defaultImages.Apply(defaultImages => defaultImages.Images[0].Id),
InstanceName = name,
InstanceType = defaultInstanceTypes.Apply(defaultInstanceTypes => defaultInstanceTypes.InstanceTypes[0].Id),
InternetChargeType = "PayByTraffic",
InternetMaxBandwidthOut = 5,
SecurityGroups =
{
defaultSecurityGroup.Id,
},
SystemDiskCategory = "cloud_efficiency",
VswitchId = defaultSwitch.Id,
});
var cen = new AliCloud.Cen.Instance("cen", new AliCloud.Cen.InstanceArgs
{
});
var attach = new AliCloud.Cen.InstanceAttachment("attach", new AliCloud.Cen.InstanceAttachmentArgs
{
ChildInstanceId = vpc.Id,
ChildInstanceRegionId = "cn-hangzhou",
InstanceId = cen.Id,
});
var route = new AliCloud.Vpc.RouteEntry("route", new AliCloud.Vpc.RouteEntryArgs
{
DestinationCidrblock = "11.0.0.0/16",
NexthopId = defaultInstance.Id,
NexthopType = "Instance",
RouteTableId = vpc.RouteTableId,
});
var foo = new AliCloud.Cen.RouteEntry("foo", new AliCloud.Cen.RouteEntryArgs
{
CidrBlock = route.DestinationCidrblock,
InstanceId = cen.Id,
RouteTableId = vpc.RouteTableId,
});
}
}
RouteEntryArgs
RouteEntryState
RouteMap
This topic provides an overview of the route map function of Cloud Enterprise Networks (CENs). You can use the route map function to filter routes and modify route attributes. By doing so, you can manage the communication between networks attached to a CEN.
For information about CEN Route Map and how to use it, see Manage CEN Route Map.
NOTE: Available in 1.82.0+
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var defaultInstance = new AliCloud.Cen.Instance("defaultInstance", new AliCloud.Cen.InstanceArgs
{
});
var vpc00Region = new AliCloud.Provider("vpc00Region", new AliCloud.ProviderArgs
{
Region = "cn-hangzhou",
});
var vpc01Region = new AliCloud.Provider("vpc01Region", new AliCloud.ProviderArgs
{
Region = "cn-shanghai",
});
var vpc00 = new AliCloud.Vpc.Network("vpc00", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "172.16.0.0/12",
});
var vpc01 = new AliCloud.Vpc.Network("vpc01", new AliCloud.Vpc.NetworkArgs
{
CidrBlock = "172.16.0.0/12",
});
var default00 = new AliCloud.Cen.InstanceAttachment("default00", new AliCloud.Cen.InstanceAttachmentArgs
{
ChildInstanceId = vpc00.Id,
ChildInstanceRegionId = "cn-hangzhou",
InstanceId = defaultInstance.Id,
});
var default01 = new AliCloud.Cen.InstanceAttachment("default01", new AliCloud.Cen.InstanceAttachmentArgs
{
ChildInstanceId = vpc01.Id,
ChildInstanceRegionId = "cn-shanghai",
InstanceId = defaultInstance.Id,
});
var defaultRouteMap = new AliCloud.Cen.RouteMap("defaultRouteMap", new AliCloud.Cen.RouteMapArgs
{
AsPathMatchMode = "Include",
CenId = alicloud_cen_instance.Cen.Id,
CenRegionId = "cn-hangzhou",
CidrMatchMode = "Include",
CommunityMatchMode = "Include",
CommunityOperateMode = "Additive",
Description = "test-desc",
DestinationChildInstanceTypes =
{
"VPC",
},
DestinationCidrBlocks =
{
vpc01.CidrBlock,
},
DestinationInstanceIds =
{
vpc01.Id,
},
DestinationInstanceIdsReverseMatch = "false",
DestinationRouteTableIds =
{
vpc01.RouteTableId,
},
MapResult = "Permit",
MatchAsns =
{
"65501",
},
MatchCommunitySets =
{
"65501:1",
},
NextPriority = "1",
OperateCommunitySets =
{
"65501:1",
},
Preference = "20",
PrependAsPaths =
{
"65501",
},
Priority = "1",
RouteTypes =
{
"System",
},
SourceChildInstanceTypes =
{
"VPC",
},
SourceInstanceIds =
{
vpc00.Id,
},
SourceInstanceIdsReverseMatch = "false",
SourceRegionIds =
{
"cn-hangzhou",
},
SourceRouteTableIds =
{
vpc00.RouteTableId,
},
TransmitDirection = "RegionIn",
});
}
}