iosxe.Vlan
Explore with Pulumi AI
This resource can manage the VLAN configuration.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Iosxe = Lbrlabs.PulumiPackage.Iosxe;
return await Deployment.RunAsync(() =>
{
var example = new Iosxe.Vlan("example", new()
{
Shutdown = false,
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.NewVlan(ctx, "example", &iosxe.VlanArgs{
Shutdown: pulumi.Bool(false),
VlanId: pulumi.Int(123),
})
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.Vlan;
import com.pulumi.iosxe.VlanArgs;
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) {
var example = new Vlan("example", VlanArgs.builder()
.shutdown(false)
.vlanId(123)
.build());
}
}
import pulumi
import lbrlabs_pulumi_iosxe as iosxe
example = iosxe.Vlan("example",
shutdown=False,
vlan_id=123)
import * as pulumi from "@pulumi/pulumi";
import * as iosxe from "@lbrlabs/pulumi-iosxe";
const example = new iosxe.Vlan("example", {
shutdown: false,
vlanId: 123,
});
resources:
example:
type: iosxe:Vlan
properties:
shutdown: false
vlanId: 123
Create Vlan Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Vlan(name: string, args: VlanArgs, opts?: CustomResourceOptions);
@overload
def Vlan(resource_name: str,
args: VlanArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Vlan(resource_name: str,
opts: Optional[ResourceOptions] = None,
vlan_id: Optional[int] = None,
device: Optional[str] = None,
name: Optional[str] = None,
private_vlan_association: Optional[str] = None,
private_vlan_community: Optional[bool] = None,
private_vlan_isolated: Optional[bool] = None,
private_vlan_primary: Optional[bool] = None,
remote_span: Optional[bool] = None,
shutdown: Optional[bool] = None)
func NewVlan(ctx *Context, name string, args VlanArgs, opts ...ResourceOption) (*Vlan, error)
public Vlan(string name, VlanArgs args, CustomResourceOptions? opts = null)
type: iosxe:Vlan
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VlanArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VlanArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VlanArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vlanResource = new Iosxe.Vlan("vlanResource", new()
{
VlanId = 0,
Device = "string",
Name = "string",
PrivateVlanAssociation = "string",
PrivateVlanCommunity = false,
PrivateVlanIsolated = false,
PrivateVlanPrimary = false,
RemoteSpan = false,
Shutdown = false,
});
example, err := iosxe.NewVlan(ctx, "vlanResource", &iosxe.VlanArgs{
VlanId: pulumi.Int(0),
Device: pulumi.String("string"),
Name: pulumi.String("string"),
PrivateVlanAssociation: pulumi.String("string"),
PrivateVlanCommunity: pulumi.Bool(false),
PrivateVlanIsolated: pulumi.Bool(false),
PrivateVlanPrimary: pulumi.Bool(false),
RemoteSpan: pulumi.Bool(false),
Shutdown: pulumi.Bool(false),
})
var vlanResource = new Vlan("vlanResource", VlanArgs.builder()
.vlanId(0)
.device("string")
.name("string")
.privateVlanAssociation("string")
.privateVlanCommunity(false)
.privateVlanIsolated(false)
.privateVlanPrimary(false)
.remoteSpan(false)
.shutdown(false)
.build());
vlan_resource = iosxe.Vlan("vlanResource",
vlan_id=0,
device="string",
name="string",
private_vlan_association="string",
private_vlan_community=False,
private_vlan_isolated=False,
private_vlan_primary=False,
remote_span=False,
shutdown=False)
const vlanResource = new iosxe.Vlan("vlanResource", {
vlanId: 0,
device: "string",
name: "string",
privateVlanAssociation: "string",
privateVlanCommunity: false,
privateVlanIsolated: false,
privateVlanPrimary: false,
remoteSpan: false,
shutdown: false,
});
type: iosxe:Vlan
properties:
device: string
name: string
privateVlanAssociation: string
privateVlanCommunity: false
privateVlanIsolated: false
privateVlanPrimary: false
remoteSpan: false
shutdown: false
vlanId: 0
Vlan Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Vlan resource accepts the following input properties:
- 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 - Range:
1
-4094
- Device string
- A device name from the provider configuration.
- 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 - Range:
1
-4094
- Device string
- A device name from the provider configuration.
- 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 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 - Range:
1
-4094
- device String
- A device name from the provider configuration.
- 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 - Range:
1
-4094
- device string
- A device name from the provider configuration.
- 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 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 - Range:
1
-4094
- device str
- A device name from the provider configuration.
- 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 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 - Range:
1
-4094
- device String
- A device name from the provider configuration.
- 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
Outputs
All input properties are implicitly available as output properties. Additionally, the Vlan resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Vlan Resource
Get an existing Vlan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VlanState, opts?: CustomResourceOptions): Vlan
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
device: Optional[str] = None,
name: Optional[str] = None,
private_vlan_association: Optional[str] = None,
private_vlan_community: Optional[bool] = None,
private_vlan_isolated: Optional[bool] = None,
private_vlan_primary: Optional[bool] = None,
remote_span: Optional[bool] = None,
shutdown: Optional[bool] = None,
vlan_id: Optional[int] = None) -> Vlan
func GetVlan(ctx *Context, name string, id IDInput, state *VlanState, opts ...ResourceOption) (*Vlan, error)
public static Vlan Get(string name, Input<string> id, VlanState? state, CustomResourceOptions? opts = null)
public static Vlan get(String name, Output<String> id, VlanState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Device string
- A device name from the provider configuration.
- 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 - Range:
1
-4094
- Device string
- A device name from the provider configuration.
- 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 - Range:
1
-4094
- device String
- A device name from the provider configuration.
- 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 - Range:
1
-4094
- device string
- A device name from the provider configuration.
- 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 - Range:
1
-4094
- device str
- A device name from the provider configuration.
- 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 - Range:
1
-4094
- device String
- A device name from the provider configuration.
- 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 - Range:
1
-4094
Import
$ pulumi import iosxe:index/vlan:Vlan example "Cisco-IOS-XE-native:native/vlan/Cisco-IOS-XE-vlan:vlan-list=123"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- iosxe lbrlabs/pulumi-iosxe
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
iosxe
Terraform Provider.