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.

NameRegex string

A regex string to filter CCN instances by name.

OutputFile string
Ids []string

A list of CCN instances IDs.

NameRegex string

A regex string to filter CCN instances by name.

OutputFile string
ids string[]

A list of CCN instances IDs.

nameRegex string

A regex string to filter CCN instances by name.

outputFile 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.AliCloud.CloudConnect.Outputs.GetNetworksNetwork>

A list of CCN instances. Each element contains the following attributes:

NameRegex string
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of CCN instances IDs.

Names []string

A list of CCN instances names.

Networks []GetNetworksNetwork

A list of CCN instances. Each element contains the following attributes:

NameRegex string
OutputFile string
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of CCN instances IDs.

names string[]

A list of CCN instances names.

networks GetNetworksNetwork[]

A list of CCN instances. Each element contains the following attributes:

nameRegex string
outputFile 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[GetNetworksNetwork]

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.

CidrBlock string

CidrBlock of the CCN instance.

Description string
Id string

ID of the CCN instance.

IsDefault bool

IsDefault of the CCN instance.

Name string

Name of the CCN instance.

CidrBlock string

CidrBlock of the CCN instance.

Description string
Id string

ID of the CCN instance.

IsDefault bool

IsDefault of the CCN instance.

Name string

Name of the CCN instance.

cidrBlock string

CidrBlock of the CCN instance.

description string
id string

ID of the CCN instance.

isDefault boolean

IsDefault of the CCN instance.

name string

Name of the CCN instance.

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 alicloud Terraform Provider.