Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs
iosxe.getVlan
Explore with Pulumi AI
This data source can read the VLAN configuration.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Iosxe = Pulumi.Iosxe;
return await Deployment.RunAsync(() => 
{
    var example = Iosxe.GetVlan.Invoke(new()
    {
        VlanId = 123,
    });
});
package main
import (
	"github.com/lbrlabs/pulumi-iosxe/sdk/go/iosxe"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iosxe.LookupVlan(ctx, &iosxe.LookupVlanArgs{
			VlanId: 123,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.iosxe.IosxeFunctions;
import com.pulumi.iosxe.inputs.GetVlanArgs;
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 example = IosxeFunctions.getVlan(GetVlanArgs.builder()
            .vlanId(123)
            .build());
    }
}
import pulumi
import pulumi_iosxe as iosxe
example = iosxe.get_vlan(vlan_id=123)
import * as pulumi from "@pulumi/pulumi";
import * as iosxe from "@pulumi/iosxe";
const example = iosxe.getVlan({
    vlanId: 123,
});
variables:
  example:
    fn::invoke:
      Function: iosxe:getVlan
      Arguments:
        vlanId: 123
Using getVlan
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 getVlan(args: GetVlanArgs, opts?: InvokeOptions): Promise<GetVlanResult>
function getVlanOutput(args: GetVlanOutputArgs, opts?: InvokeOptions): Output<GetVlanResult>def get_vlan(device: Optional[str] = None,
             vlan_id: Optional[int] = None,
             opts: Optional[InvokeOptions] = None) -> GetVlanResult
def get_vlan_output(device: Optional[pulumi.Input[str]] = None,
             vlan_id: Optional[pulumi.Input[int]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetVlanResult]func LookupVlan(ctx *Context, args *LookupVlanArgs, opts ...InvokeOption) (*LookupVlanResult, error)
func LookupVlanOutput(ctx *Context, args *LookupVlanOutputArgs, opts ...InvokeOption) LookupVlanResultOutput> Note: This function is named LookupVlan in the Go SDK.
public static class GetVlan 
{
    public static Task<GetVlanResult> InvokeAsync(GetVlanArgs args, InvokeOptions? opts = null)
    public static Output<GetVlanResult> Invoke(GetVlanInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVlanResult> getVlan(GetVlanArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: iosxe:index/getVlan:getVlan
  arguments:
    # arguments dictionaryThe following arguments are supported:
getVlan Result
The following output properties are available:
- Id string
 - The path of the retrieved object.
 - Name string
 - Ascii name of the VLAN
 - Private
Vlan stringAssociation  - Configure association between private VLANs
 - Private
Vlan boolCommunity  - Configure the VLAN as a community private VLAN
 - Private
Vlan boolIsolated  - Configure the VLAN as an isolated private VLAN
 - Private
Vlan boolPrimary  - Configure the VLAN as a primary private VLAN
 - Remote
Span bool - Configure as Remote SPAN VLAN
 - Shutdown bool
 - Shutdown VLAN switching
 - Vlan
Id int - a single VLAN id (allowed value range 1-4094)or Comma-separated VLAN id range.e.g. 99 or 1-30 or 1-20,30,40-50
 - Device string
 - A device name from the provider configuration.
 
- Id string
 - The path of the retrieved object.
 - Name string
 - Ascii name of the VLAN
 - Private
Vlan stringAssociation  - Configure association between private VLANs
 - Private
Vlan boolCommunity  - Configure the VLAN as a community private VLAN
 - Private
Vlan boolIsolated  - Configure the VLAN as an isolated private VLAN
 - Private
Vlan boolPrimary  - Configure the VLAN as a primary private VLAN
 - Remote
Span bool - Configure as Remote SPAN VLAN
 - Shutdown bool
 - Shutdown VLAN switching
 - Vlan
Id int - a single VLAN id (allowed value range 1-4094)or Comma-separated VLAN id range.e.g. 99 or 1-30 or 1-20,30,40-50
 - Device string
 - A device name from the provider configuration.
 
- id String
 - The path of the retrieved object.
 - name String
 - Ascii name of the VLAN
 - private
Vlan StringAssociation  - Configure association between private VLANs
 - private
Vlan BooleanCommunity  - Configure the VLAN as a community private VLAN
 - private
Vlan BooleanIsolated  - Configure the VLAN as an isolated private VLAN
 - private
Vlan BooleanPrimary  - Configure the VLAN as a primary private VLAN
 - remote
Span Boolean - Configure as Remote SPAN VLAN
 - shutdown Boolean
 - Shutdown VLAN switching
 - vlan
Id Integer - a single VLAN id (allowed value range 1-4094)or Comma-separated VLAN id range.e.g. 99 or 1-30 or 1-20,30,40-50
 - device String
 - A device name from the provider configuration.
 
- id string
 - The path of the retrieved object.
 - name string
 - Ascii name of the VLAN
 - private
Vlan stringAssociation  - Configure association between private VLANs
 - private
Vlan booleanCommunity  - Configure the VLAN as a community private VLAN
 - private
Vlan booleanIsolated  - Configure the VLAN as an isolated private VLAN
 - private
Vlan booleanPrimary  - Configure the VLAN as a primary private VLAN
 - remote
Span boolean - Configure as Remote SPAN VLAN
 - shutdown boolean
 - Shutdown VLAN switching
 - vlan
Id number - a single VLAN id (allowed value range 1-4094)or Comma-separated VLAN id range.e.g. 99 or 1-30 or 1-20,30,40-50
 - device string
 - A device name from the provider configuration.
 
- id str
 - The path of the retrieved object.
 - name str
 - Ascii name of the VLAN
 - private_
vlan_ strassociation  - Configure association between private VLANs
 - private_
vlan_ boolcommunity  - Configure the VLAN as a community private VLAN
 - private_
vlan_ boolisolated  - Configure the VLAN as an isolated private VLAN
 - private_
vlan_ boolprimary  - Configure the VLAN as a primary private VLAN
 - remote_
span bool - Configure as Remote SPAN VLAN
 - shutdown bool
 - Shutdown VLAN switching
 - vlan_
id int - a single VLAN id (allowed value range 1-4094)or Comma-separated VLAN id range.e.g. 99 or 1-30 or 1-20,30,40-50
 - device str
 - A device name from the provider configuration.
 
- id String
 - The path of the retrieved object.
 - name String
 - Ascii name of the VLAN
 - private
Vlan StringAssociation  - Configure association between private VLANs
 - private
Vlan BooleanCommunity  - Configure the VLAN as a community private VLAN
 - private
Vlan BooleanIsolated  - Configure the VLAN as an isolated private VLAN
 - private
Vlan BooleanPrimary  - Configure the VLAN as a primary private VLAN
 - remote
Span Boolean - Configure as Remote SPAN VLAN
 - shutdown Boolean
 - Shutdown VLAN switching
 - vlan
Id Number - a single VLAN id (allowed value range 1-4094)or Comma-separated VLAN id range.e.g. 99 or 1-30 or 1-20,30,40-50
 - device String
 - A device name from the provider configuration.
 
Package Details
- Repository
 - iosxe lbrlabs/pulumi-iosxe
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
iosxeTerraform Provider.