1. Packages
  2. Strata Cloud Manager Provider
  3. API Docs
  4. getLayer2Subinterface
Strata Cloud Manager v1.0.3 published on Thursday, Jan 22, 2026 by Pulumi
scm logo
Strata Cloud Manager v1.0.3 published on Thursday, Jan 22, 2026 by Pulumi

    Layer2Subinterface data source

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scm from "@pulumi/scm";
    
    // Look up layer2 sub-interface by its ID.
    const scmL2SubinterfaceDs = scm.getLayer2Subinterface({
        id: "88f730d1-6577-492b-88a6-73d4a513dc76",
    });
    export const layer2SubinterfaceDataSourceResults = {
        id: scmL2SubinterfaceDs.then(scmL2SubinterfaceDs => scmL2SubinterfaceDs.id),
        name: scmL2SubinterfaceDs.then(scmL2SubinterfaceDs => scmL2SubinterfaceDs.name),
        comment: scmL2SubinterfaceDs.then(scmL2SubinterfaceDs => scmL2SubinterfaceDs.comment),
        vlanTag: scmL2SubinterfaceDs.then(scmL2SubinterfaceDs => scmL2SubinterfaceDs.vlanTag),
        parentInterface: scmL2SubinterfaceDs.then(scmL2SubinterfaceDs => scmL2SubinterfaceDs.parentInterface),
        folder: scmL2SubinterfaceDs.then(scmL2SubinterfaceDs => scmL2SubinterfaceDs.folder),
    };
    
    import pulumi
    import pulumi_scm as scm
    
    # Look up layer2 sub-interface by its ID.
    scm_l2_subinterface_ds = scm.get_layer2_subinterface(id="88f730d1-6577-492b-88a6-73d4a513dc76")
    pulumi.export("layer2SubinterfaceDataSourceResults", {
        "id": scm_l2_subinterface_ds.id,
        "name": scm_l2_subinterface_ds.name,
        "comment": scm_l2_subinterface_ds.comment,
        "vlanTag": scm_l2_subinterface_ds.vlan_tag,
        "parentInterface": scm_l2_subinterface_ds.parent_interface,
        "folder": scm_l2_subinterface_ds.folder,
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-scm/sdk/go/scm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Look up layer2 sub-interface by its ID.
    		scmL2SubinterfaceDs, err := scm.LookupLayer2Subinterface(ctx, &scm.LookupLayer2SubinterfaceArgs{
    			Id: "88f730d1-6577-492b-88a6-73d4a513dc76",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("layer2SubinterfaceDataSourceResults", pulumi.StringMap{
    			"id":              scmL2SubinterfaceDs.Id,
    			"name":            scmL2SubinterfaceDs.Name,
    			"comment":         scmL2SubinterfaceDs.Comment,
    			"vlanTag":         scmL2SubinterfaceDs.VlanTag,
    			"parentInterface": scmL2SubinterfaceDs.ParentInterface,
    			"folder":          scmL2SubinterfaceDs.Folder,
    		})
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scm = Pulumi.Scm;
    
    return await Deployment.RunAsync(() => 
    {
        // Look up layer2 sub-interface by its ID.
        var scmL2SubinterfaceDs = Scm.GetLayer2Subinterface.Invoke(new()
        {
            Id = "88f730d1-6577-492b-88a6-73d4a513dc76",
        });
    
        return new Dictionary<string, object?>
        {
            ["layer2SubinterfaceDataSourceResults"] = 
            {
                { "id", scmL2SubinterfaceDs.Apply(getLayer2SubinterfaceResult => getLayer2SubinterfaceResult.Id) },
                { "name", scmL2SubinterfaceDs.Apply(getLayer2SubinterfaceResult => getLayer2SubinterfaceResult.Name) },
                { "comment", scmL2SubinterfaceDs.Apply(getLayer2SubinterfaceResult => getLayer2SubinterfaceResult.Comment) },
                { "vlanTag", scmL2SubinterfaceDs.Apply(getLayer2SubinterfaceResult => getLayer2SubinterfaceResult.VlanTag) },
                { "parentInterface", scmL2SubinterfaceDs.Apply(getLayer2SubinterfaceResult => getLayer2SubinterfaceResult.ParentInterface) },
                { "folder", scmL2SubinterfaceDs.Apply(getLayer2SubinterfaceResult => getLayer2SubinterfaceResult.Folder) },
            },
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scm.ScmFunctions;
    import com.pulumi.scm.inputs.GetLayer2SubinterfaceArgs;
    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) {
            // Look up layer2 sub-interface by its ID.
            final var scmL2SubinterfaceDs = ScmFunctions.getLayer2Subinterface(GetLayer2SubinterfaceArgs.builder()
                .id("88f730d1-6577-492b-88a6-73d4a513dc76")
                .build());
    
            ctx.export("layer2SubinterfaceDataSourceResults", Map.ofEntries(
                Map.entry("id", scmL2SubinterfaceDs.id()),
                Map.entry("name", scmL2SubinterfaceDs.name()),
                Map.entry("comment", scmL2SubinterfaceDs.comment()),
                Map.entry("vlanTag", scmL2SubinterfaceDs.vlanTag()),
                Map.entry("parentInterface", scmL2SubinterfaceDs.parentInterface()),
                Map.entry("folder", scmL2SubinterfaceDs.folder())
            ));
        }
    }
    
    variables:
      # Look up layer2 sub-interface by its ID.
      scmL2SubinterfaceDs:
        fn::invoke:
          function: scm:getLayer2Subinterface
          arguments:
            id: 88f730d1-6577-492b-88a6-73d4a513dc76
    outputs:
      # Output various attributes from the found layer2 sub-interface to verify the lookups were successful.
      layer2SubinterfaceDataSourceResults:
        id: ${scmL2SubinterfaceDs.id}
        name: ${scmL2SubinterfaceDs.name}
        comment: ${scmL2SubinterfaceDs.comment}
        vlanTag: ${scmL2SubinterfaceDs.vlanTag}
        parentInterface: ${scmL2SubinterfaceDs.parentInterface}
        folder: ${scmL2SubinterfaceDs.folder}
    

    Using getLayer2Subinterface

    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 getLayer2Subinterface(args: GetLayer2SubinterfaceArgs, opts?: InvokeOptions): Promise<GetLayer2SubinterfaceResult>
    function getLayer2SubinterfaceOutput(args: GetLayer2SubinterfaceOutputArgs, opts?: InvokeOptions): Output<GetLayer2SubinterfaceResult>
    def get_layer2_subinterface(device: Optional[str] = None,
                                folder: Optional[str] = None,
                                id: Optional[str] = None,
                                name: Optional[str] = None,
                                snippet: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetLayer2SubinterfaceResult
    def get_layer2_subinterface_output(device: Optional[pulumi.Input[str]] = None,
                                folder: Optional[pulumi.Input[str]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                snippet: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetLayer2SubinterfaceResult]
    func LookupLayer2Subinterface(ctx *Context, args *LookupLayer2SubinterfaceArgs, opts ...InvokeOption) (*LookupLayer2SubinterfaceResult, error)
    func LookupLayer2SubinterfaceOutput(ctx *Context, args *LookupLayer2SubinterfaceOutputArgs, opts ...InvokeOption) LookupLayer2SubinterfaceResultOutput

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

    public static class GetLayer2Subinterface 
    {
        public static Task<GetLayer2SubinterfaceResult> InvokeAsync(GetLayer2SubinterfaceArgs args, InvokeOptions? opts = null)
        public static Output<GetLayer2SubinterfaceResult> Invoke(GetLayer2SubinterfaceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLayer2SubinterfaceResult> getLayer2Subinterface(GetLayer2SubinterfaceArgs args, InvokeOptions options)
    public static Output<GetLayer2SubinterfaceResult> getLayer2Subinterface(GetLayer2SubinterfaceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scm:index/getLayer2Subinterface:getLayer2Subinterface
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    UUID of the resource
    Device string
    The device in which the resource is defined
    Folder string
    Name string
    Snippet string
    Id string
    UUID of the resource
    Device string
    The device in which the resource is defined
    Folder string
    Name string
    Snippet string
    id String
    UUID of the resource
    device String
    The device in which the resource is defined
    folder String
    name String
    snippet String
    id string
    UUID of the resource
    device string
    The device in which the resource is defined
    folder string
    name string
    snippet string
    id str
    UUID of the resource
    device str
    The device in which the resource is defined
    folder str
    name str
    snippet str
    id String
    UUID of the resource
    device String
    The device in which the resource is defined
    folder String
    name String
    snippet String

    getLayer2Subinterface Result

    The following output properties are available:

    Comment string
    Device string
    The device in which the resource is defined
    Folder string
    Id string
    UUID of the resource
    Name string
    ParentInterface string
    Snippet string
    Tfid string
    VlanTag string
    Comment string
    Device string
    The device in which the resource is defined
    Folder string
    Id string
    UUID of the resource
    Name string
    ParentInterface string
    Snippet string
    Tfid string
    VlanTag string
    comment String
    device String
    The device in which the resource is defined
    folder String
    id String
    UUID of the resource
    name String
    parentInterface String
    snippet String
    tfid String
    vlanTag String
    comment string
    device string
    The device in which the resource is defined
    folder string
    id string
    UUID of the resource
    name string
    parentInterface string
    snippet string
    tfid string
    vlanTag string
    comment str
    device str
    The device in which the resource is defined
    folder str
    id str
    UUID of the resource
    name str
    parent_interface str
    snippet str
    tfid str
    vlan_tag str
    comment String
    device String
    The device in which the resource is defined
    folder String
    id String
    UUID of the resource
    name String
    parentInterface String
    snippet String
    tfid String
    vlanTag String

    Package Details

    Repository
    scm pulumi/pulumi-scm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scm Terraform Provider.
    scm logo
    Strata Cloud Manager v1.0.3 published on Thursday, Jan 22, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate