GetNetworks
This data source provides Cloud Connect Networks available to the user.
NOTE: Available in 1.59.0+
NOTE: Only the following regions support create Cloud Connect Network. [
cn-shanghai,cn-shanghai-finance-1,cn-hongkong,ap-southeast-1,ap-southeast-2,ap-southeast-3,ap-southeast-5,ap-northeast-1,eu-central-1]
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var defaultNetworks = Output.Create(AliCloud.CloudConnect.GetNetworks.InvokeAsync(new AliCloud.CloudConnect.GetNetworksArgs
{
Ids =
{
alicloud_cloud_connect_networks.Default.Id,
},
NameRegex = "^tf-testAcc.*",
}));
var defaultNetwork = new AliCloud.CloudConnect.Network("defaultNetwork", new AliCloud.CloudConnect.NetworkArgs
{
CidrBlock = "192.168.0.0/24",
Description = "tf-testAccCloudConnectNetworkDescription",
IsDefault = true,
});
}
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
default_networks = alicloud.cloudconnect.get_networks(ids=[alicloud_cloud_connect_networks["default"]["id"]],
name_regex="^tf-testAcc.*")
default_network = alicloud.cloudconnect.Network("defaultNetwork",
cidr_block="192.168.0.0/24",
description="tf-testAccCloudConnectNetworkDescription",
is_default=True)import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultNetworks = alicloud_cloud_connect_networks_default.id.apply(id => alicloud.cloudconnect.getNetworks({
ids: [id],
nameRegex: "^tf-testAcc.*",
}, { async: true }));
const defaultNetwork = new alicloud.cloudconnect.Network("default", {
cidrBlock: "192.168.0.0/24",
description: "tf-testAccCloudConnectNetworkDescription",
isDefault: true,
});Using GetNetworks
function getNetworks(args: GetNetworksArgs, opts?: InvokeOptions): Promise<GetNetworksResult>function get_networks(ids=None, name_regex=None, output_file=None, opts=None)func GetNetworks(ctx *Context, args *GetNetworksArgs, opts ...InvokeOption) (*GetNetworksResult, error)public static class GetNetworks {
public static Task<GetNetworksResult> InvokeAsync(GetNetworksArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Ids List<string>
A list of CCN instances IDs.
- Name
Regex string A regex string to filter CCN instances by name.
- Output
File string
- ids List[str]
A list of CCN instances IDs.
- name_
regex str A regex string to filter CCN instances by name.
- output_
file str
GetNetworks Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of CCN instances IDs.
- Names List<string>
A list of CCN instances names.
- Networks
List<Pulumi.
Ali Cloud. Cloud Connect. Outputs. Get Networks Network> A list of CCN instances. Each element contains the following attributes:
- Name
Regex string - Output
File string
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of CCN instances IDs.
- names List[str]
A list of CCN instances names.
- networks
List[Get
Networks Network] A list of CCN instances. Each element contains the following attributes:
- name_
regex str - output_
file str
Supporting Types
GetNetworksNetwork
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- cidr_
block str CidrBlock of the CCN instance.
- description str
- id str
ID of the CCN instance.
- is_
default bool IsDefault of the CCN instance.
- name str
Name of the CCN instance.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.