Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
scm.getLayer2Subinterface
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 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(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLayer2SubinterfaceResult
def get_layer2_subinterface_output(id: Optional[pulumi.Input[str]] = None,
name: 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 dictionaryThe following arguments are supported:
getLayer2Subinterface Result
The following output properties are available:
- Comment string
- Description
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Id string
- UUID of the resource
- Name string
- L2 sub-interface name
- Parent
Interface string - Parent interface
- Snippet string
- The snippet in which the resource is defined
- Tfid string
- Vlan
Tag string - VLAN tag
- Comment string
- Description
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Id string
- UUID of the resource
- Name string
- L2 sub-interface name
- Parent
Interface string - Parent interface
- Snippet string
- The snippet in which the resource is defined
- Tfid string
- Vlan
Tag string - VLAN tag
- comment String
- Description
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- id String
- UUID of the resource
- name String
- L2 sub-interface name
- parent
Interface String - Parent interface
- snippet String
- The snippet in which the resource is defined
- tfid String
- vlan
Tag String - VLAN tag
- comment string
- Description
- device string
- The device in which the resource is defined
- folder string
- The folder in which the resource is defined
- id string
- UUID of the resource
- name string
- L2 sub-interface name
- parent
Interface string - Parent interface
- snippet string
- The snippet in which the resource is defined
- tfid string
- vlan
Tag string - VLAN tag
- comment str
- Description
- device str
- The device in which the resource is defined
- folder str
- The folder in which the resource is defined
- id str
- UUID of the resource
- name str
- L2 sub-interface name
- parent_
interface str - Parent interface
- snippet str
- The snippet in which the resource is defined
- tfid str
- vlan_
tag str - VLAN tag
- comment String
- Description
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- id String
- UUID of the resource
- name String
- L2 sub-interface name
- parent
Interface String - Parent interface
- snippet String
- The snippet in which the resource is defined
- tfid String
- vlan
Tag String - VLAN tag
Package Details
- Repository
- scm pulumi/pulumi-scm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scmTerraform Provider.
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
