1. Packages
  2. Cisco IOS XE Resource Provider
  3. API Docs
  4. getVlan
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

iosxe.getVlan

Explore with Pulumi AI

iosxe logo
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

    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 dictionary

    The following arguments are supported:

    VlanId 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.
    VlanId 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.
    vlanId 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.
    vlanId 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.
    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.
    vlanId 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.

    getVlan Result

    The following output properties are available:

    Id string
    The path of the retrieved object.
    Name string
    Ascii name of the VLAN
    PrivateVlanAssociation string
    Configure association between private VLANs
    PrivateVlanCommunity bool
    Configure the VLAN as a community private VLAN
    PrivateVlanIsolated bool
    Configure the VLAN as an isolated private VLAN
    PrivateVlanPrimary bool
    Configure the VLAN as a primary private VLAN
    RemoteSpan bool
    Configure as Remote SPAN VLAN
    Shutdown bool
    Shutdown VLAN switching
    VlanId 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
    PrivateVlanAssociation string
    Configure association between private VLANs
    PrivateVlanCommunity bool
    Configure the VLAN as a community private VLAN
    PrivateVlanIsolated bool
    Configure the VLAN as an isolated private VLAN
    PrivateVlanPrimary bool
    Configure the VLAN as a primary private VLAN
    RemoteSpan bool
    Configure as Remote SPAN VLAN
    Shutdown bool
    Shutdown VLAN switching
    VlanId 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
    privateVlanAssociation String
    Configure association between private VLANs
    privateVlanCommunity Boolean
    Configure the VLAN as a community private VLAN
    privateVlanIsolated Boolean
    Configure the VLAN as an isolated private VLAN
    privateVlanPrimary Boolean
    Configure the VLAN as a primary private VLAN
    remoteSpan Boolean
    Configure as Remote SPAN VLAN
    shutdown Boolean
    Shutdown VLAN switching
    vlanId 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
    privateVlanAssociation string
    Configure association between private VLANs
    privateVlanCommunity boolean
    Configure the VLAN as a community private VLAN
    privateVlanIsolated boolean
    Configure the VLAN as an isolated private VLAN
    privateVlanPrimary boolean
    Configure the VLAN as a primary private VLAN
    remoteSpan boolean
    Configure as Remote SPAN VLAN
    shutdown boolean
    Shutdown VLAN switching
    vlanId 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_association str
    Configure association between private VLANs
    private_vlan_community bool
    Configure the VLAN as a community private VLAN
    private_vlan_isolated bool
    Configure the VLAN as an isolated private VLAN
    private_vlan_primary bool
    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
    privateVlanAssociation String
    Configure association between private VLANs
    privateVlanCommunity Boolean
    Configure the VLAN as a community private VLAN
    privateVlanIsolated Boolean
    Configure the VLAN as an isolated private VLAN
    privateVlanPrimary Boolean
    Configure the VLAN as a primary private VLAN
    remoteSpan Boolean
    Configure as Remote SPAN VLAN
    shutdown Boolean
    Shutdown VLAN switching
    vlanId 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 iosxe Terraform Provider.
    iosxe logo
    Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs