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

avi.getNetworkservice

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.Networkservice” sidebar_current: “docs-avi-datasource-networkservice” description: |- Get information of Avi NetworkService.

    avi.Networkservice

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as avi from "@pulumi/avi";
    
    const fooNetworkservice = avi.getNetworkservice({
        cloudRef: "/api/cloud/?tenant=admin&name=Default-Cloud",
        name: "foo",
        uuid: "networkservice-f9cf6b3e-a411-436f-95e2-2982ba2b217b",
    });
    
    import pulumi
    import pulumi_avi as avi
    
    foo_networkservice = avi.get_networkservice(cloud_ref="/api/cloud/?tenant=admin&name=Default-Cloud",
        name="foo",
        uuid="networkservice-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.LookupNetworkservice(ctx, &avi.LookupNetworkserviceArgs{
    			CloudRef: pulumi.StringRef("/api/cloud/?tenant=admin&name=Default-Cloud"),
    			Name:     pulumi.StringRef("foo"),
    			Uuid:     pulumi.StringRef("networkservice-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 fooNetworkservice = Avi.GetNetworkservice.Invoke(new()
        {
            CloudRef = "/api/cloud/?tenant=admin&name=Default-Cloud",
            Name = "foo",
            Uuid = "networkservice-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.GetNetworkserviceArgs;
    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 fooNetworkservice = AviFunctions.getNetworkservice(GetNetworkserviceArgs.builder()
                .cloudRef("/api/cloud/?tenant=admin&name=Default-Cloud")
                .name("foo")
                .uuid("networkservice-f9cf6b3e-a411-436f-95e2-2982ba2b217b")
                .build());
    
        }
    }
    
    variables:
      fooNetworkservice:
        fn::invoke:
          function: avi:getNetworkservice
          arguments:
            cloudRef: /api/cloud/?tenant=admin&name=Default-Cloud
            name: foo
            uuid: networkservice-f9cf6b3e-a411-436f-95e2-2982ba2b217b
    

    Using getNetworkservice

    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 getNetworkservice(args: GetNetworkserviceArgs, opts?: InvokeOptions): Promise<GetNetworkserviceResult>
    function getNetworkserviceOutput(args: GetNetworkserviceOutputArgs, opts?: InvokeOptions): Output<GetNetworkserviceResult>
    def get_networkservice(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) -> GetNetworkserviceResult
    def get_networkservice_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[GetNetworkserviceResult]
    func LookupNetworkservice(ctx *Context, args *LookupNetworkserviceArgs, opts ...InvokeOption) (*LookupNetworkserviceResult, error)
    func LookupNetworkserviceOutput(ctx *Context, args *LookupNetworkserviceOutputArgs, opts ...InvokeOption) LookupNetworkserviceResultOutput

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

    public static class GetNetworkservice 
    {
        public static Task<GetNetworkserviceResult> InvokeAsync(GetNetworkserviceArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkserviceResult> Invoke(GetNetworkserviceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkserviceResult> getNetworkservice(GetNetworkserviceArgs args, InvokeOptions options)
    public static Output<GetNetworkserviceResult> getNetworkservice(GetNetworkserviceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: avi:index/getNetworkservice:getNetworkservice
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getNetworkservice Result

    The following output properties are available:

    CloudRef string
    It is a reference to an object of type cloud. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    ConfigpbAttributes List<GetNetworkserviceConfigpbAttribute>
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Id string
    Markers List<GetNetworkserviceMarker>
    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
    Name of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    RoutingServices List<GetNetworkserviceRoutingService>
    Routing information of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    SeGroupRef string
    Service engine group to which the service is applied. It is a reference to an object of type serviceenginegroup. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    ServiceType string
    Indicates the type of networkservice. Enum options - ROUTING_SERVICE. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Uuid of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    VrfRef string
    Vrf context to which the service is scoped. It is a reference to an object of type vrfcontext. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    ConfigpbAttributes []GetNetworkserviceConfigpbAttribute
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Id string
    Markers []GetNetworkserviceMarker
    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
    Name of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    RoutingServices []GetNetworkserviceRoutingService
    Routing information of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    SeGroupRef string
    Service engine group to which the service is applied. It is a reference to an object of type serviceenginegroup. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    ServiceType string
    Indicates the type of networkservice. Enum options - ROUTING_SERVICE. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    Uuid string
    Uuid of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    VrfRef string
    Vrf context to which the service is scoped. It is a reference to an object of type vrfcontext. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpbAttributes List<GetNetworkserviceConfigpbAttribute>
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id String
    markers List<GetNetworkserviceMarker>
    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
    Name of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    routingServices List<GetNetworkserviceRoutingService>
    Routing information of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    seGroupRef String
    Service engine group to which the service is applied. It is a reference to an object of type serviceenginegroup. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    serviceType String
    Indicates the type of networkservice. Enum options - ROUTING_SERVICE. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Uuid of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    vrfRef String
    Vrf context to which the service is scoped. It is a reference to an object of type vrfcontext. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpbAttributes GetNetworkserviceConfigpbAttribute[]
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id string
    markers GetNetworkserviceMarker[]
    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
    Name of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    routingServices GetNetworkserviceRoutingService[]
    Routing information of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    seGroupRef string
    Service engine group to which the service is applied. It is a reference to an object of type serviceenginegroup. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    serviceType string
    Indicates the type of networkservice. Enum options - ROUTING_SERVICE. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid string
    Uuid of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    vrfRef string
    Vrf context to which the service is scoped. It is a reference to an object of type vrfcontext. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    configpb_attributes Sequence[GetNetworkserviceConfigpbAttribute]
    Protobuf versioning for config pbs. Field introduced in 21.1.1. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    id str
    markers Sequence[GetNetworkserviceMarker]
    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
    Name of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    routing_services Sequence[GetNetworkserviceRoutingService]
    Routing information of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    se_group_ref str
    Service engine group to which the service is applied. It is a reference to an object of type serviceenginegroup. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    service_type str
    Indicates the type of networkservice. Enum options - ROUTING_SERVICE. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid str
    Uuid of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    vrf_ref str
    Vrf context to which the service is scoped. It is a reference to an object of type vrfcontext. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. 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.
    id String
    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
    Name of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    routingServices List<Property Map>
    Routing information of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    seGroupRef String
    Service engine group to which the service is applied. It is a reference to an object of type serviceenginegroup. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    serviceType String
    Indicates the type of networkservice. Enum options - ROUTING_SERVICE. Field introduced in 18.2.5. 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. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    uuid String
    Uuid of the networkservice. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.
    vrfRef String
    Vrf context to which the service is scoped. It is a reference to an object of type vrfcontext. Field introduced in 18.2.5. Allowed with any value in enterprise, essentials, basic, enterprise with cloud services edition.

    Supporting Types

    GetNetworkserviceConfigpbAttribute

    Version string
    Version string
    version String
    version string
    version String

    GetNetworkserviceMarker

    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>

    GetNetworkserviceRoutingService

    GetNetworkserviceRoutingServiceFloatingIntfIp

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

    GetNetworkserviceRoutingServiceFloatingIntfIp6Address

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

    GetNetworkserviceRoutingServiceFloatingIntfIp6Se2Address

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

    GetNetworkserviceRoutingServiceFloatingIntfIpSe2

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

    GetNetworkserviceRoutingServiceFlowtableProfile

    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