1. Packages
  2. Avi Provider
  3. API Docs
  4. getNetwork
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

avi.getNetwork

Explore with Pulumi AI

<!–

Copyright 2021 VMware, Inc.
SPDX-License-Identifier: Mozilla Public License 2.0

–>

layout: “avi”

page_title: “AVI: avi.Network” sidebar_current: “docs-avi-datasource-network” description: |- Get information of Avi Network.

avi.Network

This data source is used to to get avi.Network objects.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as avi from "@pulumi/avi";

const fooNetwork = avi.getNetwork({
    cloudRef: "/api/cloud/?tenant=admin&name=Default-Cloud",
    name: "foo",
    uuid: "network-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
});
Copy
import pulumi
import pulumi_avi as avi

foo_network = avi.get_network(cloud_ref="/api/cloud/?tenant=admin&name=Default-Cloud",
    name="foo",
    uuid="network-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/avi/v31/avi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := avi.LookupNetwork(ctx, &avi.LookupNetworkArgs{
			CloudRef: pulumi.StringRef("/api/cloud/?tenant=admin&name=Default-Cloud"),
			Name:     pulumi.StringRef("foo"),
			Uuid:     pulumi.StringRef("network-f9cf6b3e-a411-436f-95e2-2982ba2b217b"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Avi = Pulumi.Avi;

return await Deployment.RunAsync(() => 
{
    var fooNetwork = Avi.GetNetwork.Invoke(new()
    {
        CloudRef = "/api/cloud/?tenant=admin&name=Default-Cloud",
        Name = "foo",
        Uuid = "network-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.avi.AviFunctions;
import com.pulumi.avi.inputs.GetNetworkArgs;
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 fooNetwork = AviFunctions.getNetwork(GetNetworkArgs.builder()
            .cloudRef("/api/cloud/?tenant=admin&name=Default-Cloud")
            .name("foo")
            .uuid("network-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
            .build());

    }
}
Copy
variables:
  fooNetwork:
    fn::invoke:
      function: avi:getNetwork
      arguments:
        cloudRef: /api/cloud/?tenant=admin&name=Default-Cloud
        name: foo
        uuid: network-f9cf6b3e-a411-436f-95e2-2982ba2b217b
Copy

Using getNetwork

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetwork(args: GetNetworkArgs, opts?: InvokeOptions): Promise<GetNetworkResult>
function getNetworkOutput(args: GetNetworkOutputArgs, opts?: InvokeOptions): Output<GetNetworkResult>
Copy
def get_network(cloud_ref: Optional[str] = None,
                id: Optional[str] = None,
                name: Optional[str] = None,
                tenant_ref: Optional[str] = None,
                uuid: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetNetworkResult
def get_network_output(cloud_ref: Optional[pulumi.Input[str]] = None,
                id: Optional[pulumi.Input[str]] = None,
                name: Optional[pulumi.Input[str]] = None,
                tenant_ref: Optional[pulumi.Input[str]] = None,
                uuid: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetNetworkResult]
Copy
func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)
func LookupNetworkOutput(ctx *Context, args *LookupNetworkOutputArgs, opts ...InvokeOption) LookupNetworkResultOutput
Copy

> Note: This function is named LookupNetwork in the Go SDK.

public static class GetNetwork 
{
    public static Task<GetNetworkResult> InvokeAsync(GetNetworkArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkResult> Invoke(GetNetworkInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
public static Output<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: avi:index/getNetwork:getNetwork
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CloudRef string
Search Network by cloud_ref.
Id string
Name string
Search Network by name.
TenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Uuid string
Search Network by uuid.
CloudRef string
Search Network by cloud_ref.
Id string
Name string
Search Network by name.
TenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Uuid string
Search Network by uuid.
cloudRef String
Search Network by cloud_ref.
id String
name String
Search Network by name.
tenantRef String
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid String
Search Network by uuid.
cloudRef string
Search Network by cloud_ref.
id string
name string
Search Network by name.
tenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid string
Search Network by uuid.
cloud_ref str
Search Network by cloud_ref.
id str
name str
Search Network by name.
tenant_ref str
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid str
Search Network by uuid.
cloudRef String
Search Network by cloud_ref.
id String
name String
Search Network by name.
tenantRef String
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid String
Search Network by uuid.

getNetwork Result

The following output properties are available:

Attrs List<GetNetworkAttr>
Key/value network attributes. Field introduced in 20.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
CloudRef string
It is a reference to an object of type cloud. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
ConfigpbAttributes List<GetNetworkConfigpbAttribute>
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
ConfiguredSubnets List<GetNetworkConfiguredSubnet>
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
DhcpEnabled string
Select the ip address management scheme for this network. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
ExcludeDiscoveredSubnets string
When selected, excludes all discovered subnets in this network from consideration for virtual service placement. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Id string
Ip6AutocfgEnabled string
Enable ipv6 auto configuration. Field introduced in 18.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Markers List<GetNetworkMarker>
List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Name string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
SyncedFromSe string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
TenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Uuid string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
VcenterDvs string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
VimgrnwRef string
It is a reference to an object of type vimgrnwruntime. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
VrfContextRef string
It is a reference to an object of type vrfcontext. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Attrs []GetNetworkAttr
Key/value network attributes. Field introduced in 20.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
CloudRef string
It is a reference to an object of type cloud. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
ConfigpbAttributes []GetNetworkConfigpbAttribute
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
ConfiguredSubnets []GetNetworkConfiguredSubnet
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
DhcpEnabled string
Select the ip address management scheme for this network. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
ExcludeDiscoveredSubnets string
When selected, excludes all discovered subnets in this network from consideration for virtual service placement. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Id string
Ip6AutocfgEnabled string
Enable ipv6 auto configuration. Field introduced in 18.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Markers []GetNetworkMarker
List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Name string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
SyncedFromSe string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
TenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
Uuid string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
VcenterDvs string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
VimgrnwRef string
It is a reference to an object of type vimgrnwruntime. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
VrfContextRef string
It is a reference to an object of type vrfcontext. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
attrs List<GetNetworkAttr>
Key/value network attributes. Field introduced in 20.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
cloudRef String
It is a reference to an object of type cloud. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpbAttributes List<GetNetworkConfigpbAttribute>
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configuredSubnets List<GetNetworkConfiguredSubnet>
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
dhcpEnabled String
Select the ip address management scheme for this network. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
excludeDiscoveredSubnets String
When selected, excludes all discovered subnets in this network from consideration for virtual service placement. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
id String
ip6AutocfgEnabled String
Enable ipv6 auto configuration. Field introduced in 18.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
markers List<GetNetworkMarker>
List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name String
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
syncedFromSe String
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
tenantRef String
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid String
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vcenterDvs String
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vimgrnwRef String
It is a reference to an object of type vimgrnwruntime. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vrfContextRef String
It is a reference to an object of type vrfcontext. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
attrs GetNetworkAttr[]
Key/value network attributes. Field introduced in 20.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
cloudRef string
It is a reference to an object of type cloud. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpbAttributes GetNetworkConfigpbAttribute[]
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configuredSubnets GetNetworkConfiguredSubnet[]
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
dhcpEnabled string
Select the ip address management scheme for this network. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
excludeDiscoveredSubnets string
When selected, excludes all discovered subnets in this network from consideration for virtual service placement. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
id string
ip6AutocfgEnabled string
Enable ipv6 auto configuration. Field introduced in 18.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
markers GetNetworkMarker[]
List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
syncedFromSe string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
tenantRef string
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vcenterDvs string
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vimgrnwRef string
It is a reference to an object of type vimgrnwruntime. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vrfContextRef string
It is a reference to an object of type vrfcontext. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
attrs Sequence[GetNetworkAttr]
Key/value network attributes. Field introduced in 20.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
cloud_ref str
It is a reference to an object of type cloud. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpb_attributes Sequence[GetNetworkConfigpbAttribute]
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configured_subnets Sequence[GetNetworkConfiguredSubnet]
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
dhcp_enabled str
Select the ip address management scheme for this network. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
exclude_discovered_subnets str
When selected, excludes all discovered subnets in this network from consideration for virtual service placement. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
id str
ip6_autocfg_enabled str
Enable ipv6 auto configuration. Field introduced in 18.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
markers Sequence[GetNetworkMarker]
List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name str
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
synced_from_se str
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
tenant_ref str
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid str
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vcenter_dvs str
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vimgrnw_ref str
It is a reference to an object of type vimgrnwruntime. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vrf_context_ref str
It is a reference to an object of type vrfcontext. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
attrs List<Property Map>
Key/value network attributes. Field introduced in 20.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
cloudRef String
It is a reference to an object of type cloud. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configpbAttributes List<Property Map>
Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
configuredSubnets List<Property Map>
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
dhcpEnabled String
Select the ip address management scheme for this network. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
excludeDiscoveredSubnets String
When selected, excludes all discovered subnets in this network from consideration for virtual service placement. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
id String
ip6AutocfgEnabled String
Enable ipv6 auto configuration. Field introduced in 18.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
markers List<Property Map>
List of labels to be used for granular rbac. Field introduced in 20.1.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
name String
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
syncedFromSe String
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
tenantRef String
It is a reference to an object of type tenant. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
uuid String
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vcenterDvs String
Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vimgrnwRef String
It is a reference to an object of type vimgrnwruntime. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
vrfContextRef String
It is a reference to an object of type vrfcontext. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.

Supporting Types

GetNetworkAttr

Key This property is required. string
Value This property is required. string
Key This property is required. string
Value This property is required. string
key This property is required. String
value This property is required. String
key This property is required. string
value This property is required. string
key This property is required. str
value This property is required. str
key This property is required. String
value This property is required. String

GetNetworkConfigpbAttribute

Version This property is required. string
Version This property is required. string
version This property is required. String
version This property is required. string
version This property is required. str
version This property is required. String

GetNetworkConfiguredSubnet

prefixes This property is required. List<Property Map>
staticIpRanges This property is required. List<Property Map>

GetNetworkConfiguredSubnetPrefix

IpAddrs This property is required. List<GetNetworkConfiguredSubnetPrefixIpAddr>
Mask This property is required. string
IpAddrs This property is required. []GetNetworkConfiguredSubnetPrefixIpAddr
Mask This property is required. string
ipAddrs This property is required. List<GetNetworkConfiguredSubnetPrefixIpAddr>
mask This property is required. String
ipAddrs This property is required. GetNetworkConfiguredSubnetPrefixIpAddr[]
mask This property is required. string
ip_addrs This property is required. Sequence[GetNetworkConfiguredSubnetPrefixIpAddr]
mask This property is required. str
ipAddrs This property is required. List<Property Map>
mask This property is required. String

GetNetworkConfiguredSubnetPrefixIpAddr

Addr This property is required. string
Type This property is required. string
Addr This property is required. string
Type This property is required. string
addr This property is required. String
type This property is required. String
addr This property is required. string
type This property is required. string
addr This property is required. str
type This property is required. str
addr This property is required. String
type This property is required. String

GetNetworkConfiguredSubnetStaticIpRange

Ranges This property is required. List<GetNetworkConfiguredSubnetStaticIpRangeRange>
Type This property is required. string
Ranges This property is required. []GetNetworkConfiguredSubnetStaticIpRangeRange
Type This property is required. string
ranges This property is required. List<GetNetworkConfiguredSubnetStaticIpRangeRange>
type This property is required. String
ranges This property is required. GetNetworkConfiguredSubnetStaticIpRangeRange[]
type This property is required. string
ranges This property is required. Sequence[GetNetworkConfiguredSubnetStaticIpRangeRange]
type This property is required. str
ranges This property is required. List<Property Map>
type This property is required. String

GetNetworkConfiguredSubnetStaticIpRangeRange

begins This property is required. List<Property Map>
ends This property is required. List<Property Map>

GetNetworkConfiguredSubnetStaticIpRangeRangeBegin

Addr This property is required. string
Type This property is required. string
Addr This property is required. string
Type This property is required. string
addr This property is required. String
type This property is required. String
addr This property is required. string
type This property is required. string
addr This property is required. str
type This property is required. str
addr This property is required. String
type This property is required. String

GetNetworkConfiguredSubnetStaticIpRangeRangeEnd

Addr This property is required. string
Type This property is required. string
Addr This property is required. string
Type This property is required. string
addr This property is required. String
type This property is required. String
addr This property is required. string
type This property is required. string
addr This property is required. str
type This property is required. str
addr This property is required. String
type This property is required. String

GetNetworkMarker

Key This property is required. string
Values This property is required. List<string>
Key This property is required. string
Values This property is required. []string
key This property is required. String
values This property is required. List<String>
key This property is required. string
values This property is required. string[]
key This property is required. str
values This property is required. Sequence[str]
key This property is required. String
values This property is required. List<String>

Package Details

Repository
avi vmware/terraform-provider-avi
License
Notes
This Pulumi package is based on the avi Terraform Provider.