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

avi logo
avi 31.1.1 published on Monday, Apr 14, 2025 by vmware

    <!–

    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",
    });
    
    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")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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>
    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]
    func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)
    func LookupNetworkOutput(ctx *Context, args *LookupNetworkOutputArgs, opts ...InvokeOption) LookupNetworkResultOutput

    > 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)
    }
    public static CompletableFuture<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
    public static Output<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
    
    fn::invoke:
      function: avi:index/getNetwork:getNetwork
      arguments:
        # arguments dictionary

    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 string
    Value string
    Key string
    Value string
    key String
    value String
    key string
    value string
    key str
    value str
    key String
    value String

    GetNetworkConfigpbAttribute

    Version string
    Version string
    version String
    version string
    version String

    GetNetworkConfiguredSubnet

    GetNetworkConfiguredSubnetPrefix

    GetNetworkConfiguredSubnetPrefixIpAddr

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetNetworkConfiguredSubnetStaticIpRange

    GetNetworkConfiguredSubnetStaticIpRangeRange

    GetNetworkConfiguredSubnetStaticIpRangeRangeBegin

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetNetworkConfiguredSubnetStaticIpRangeRangeEnd

    Addr string
    Type string
    Addr string
    Type string
    addr String
    type String
    addr string
    type string
    addr str
    type str
    addr String
    type String

    GetNetworkMarker

    Key string
    Values List<string>
    Key string
    Values []string
    key String
    values List<String>
    key string
    values string[]
    key str
    values Sequence[str]
    key String
    values List<String>

    Package Details

    Repository
    avi vmware/terraform-provider-avi
    License
    Notes
    This Pulumi package is based on the avi Terraform Provider.
    avi logo
    avi 31.1.1 published on Monday, Apr 14, 2025 by vmware