iosxe.InterfaceMpls
Explore with Pulumi AI
This resource can manage the Interface MPLS 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.InterfaceMpls("example", new()
{
Ip = true,
Mtu = "1200",
Type = "Loopback",
});
});
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.NewInterfaceMpls(ctx, "example", &iosxe.InterfaceMplsArgs{
Ip: pulumi.Bool(true),
Mtu: pulumi.String("1200"),
Type: pulumi.String("Loopback"),
})
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.InterfaceMpls;
import com.pulumi.iosxe.InterfaceMplsArgs;
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 InterfaceMpls("example", InterfaceMplsArgs.builder()
.ip(true)
.mtu("1200")
.type("Loopback")
.build());
}
}
import pulumi
import lbrlabs_pulumi_iosxe as iosxe
example = iosxe.InterfaceMpls("example",
ip=True,
mtu="1200",
type="Loopback")
import * as pulumi from "@pulumi/pulumi";
import * as iosxe from "@lbrlabs/pulumi-iosxe";
const example = new iosxe.InterfaceMpls("example", {
ip: true,
mtu: "1200",
type: "Loopback",
});
resources:
example:
type: iosxe:InterfaceMpls
properties:
ip: true
mtu: '1200'
type: Loopback
Create InterfaceMpls Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InterfaceMpls(name: string, args: InterfaceMplsArgs, opts?: CustomResourceOptions);
@overload
def InterfaceMpls(resource_name: str,
args: InterfaceMplsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def InterfaceMpls(resource_name: str,
opts: Optional[ResourceOptions] = None,
type: Optional[str] = None,
delete_mode: Optional[str] = None,
device: Optional[str] = None,
ip: Optional[bool] = None,
mtu: Optional[str] = None,
name: Optional[str] = None)
func NewInterfaceMpls(ctx *Context, name string, args InterfaceMplsArgs, opts ...ResourceOption) (*InterfaceMpls, error)
public InterfaceMpls(string name, InterfaceMplsArgs args, CustomResourceOptions? opts = null)
public InterfaceMpls(String name, InterfaceMplsArgs args)
public InterfaceMpls(String name, InterfaceMplsArgs args, CustomResourceOptions options)
type: iosxe:InterfaceMpls
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 InterfaceMplsArgs
- 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 InterfaceMplsArgs
- 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 InterfaceMplsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InterfaceMplsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InterfaceMplsArgs
- 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 interfaceMplsResource = new Iosxe.InterfaceMpls("interfaceMplsResource", new()
{
Type = "string",
DeleteMode = "string",
Device = "string",
Ip = false,
Mtu = "string",
Name = "string",
});
example, err := iosxe.NewInterfaceMpls(ctx, "interfaceMplsResource", &iosxe.InterfaceMplsArgs{
Type: pulumi.String("string"),
DeleteMode: pulumi.String("string"),
Device: pulumi.String("string"),
Ip: pulumi.Bool(false),
Mtu: pulumi.String("string"),
Name: pulumi.String("string"),
})
var interfaceMplsResource = new InterfaceMpls("interfaceMplsResource", InterfaceMplsArgs.builder()
.type("string")
.deleteMode("string")
.device("string")
.ip(false)
.mtu("string")
.name("string")
.build());
interface_mpls_resource = iosxe.InterfaceMpls("interfaceMplsResource",
type="string",
delete_mode="string",
device="string",
ip=False,
mtu="string",
name="string")
const interfaceMplsResource = new iosxe.InterfaceMpls("interfaceMplsResource", {
type: "string",
deleteMode: "string",
device: "string",
ip: false,
mtu: "string",
name: "string",
});
type: iosxe:InterfaceMpls
properties:
deleteMode: string
device: string
ip: false
mtu: string
name: string
type: string
InterfaceMpls Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The InterfaceMpls resource accepts the following input properties:
- Type string
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- Delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- Device string
- A device name from the provider configuration.
- Ip bool
- Configure dynamic MPLS forwarding for IP
- Mtu string
- Set MPLS Maximum Transmission Unit
- Name string
- Type string
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- Delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- Device string
- A device name from the provider configuration.
- Ip bool
- Configure dynamic MPLS forwarding for IP
- Mtu string
- Set MPLS Maximum Transmission Unit
- Name string
- type String
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- delete
Mode String - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device String
- A device name from the provider configuration.
- ip Boolean
- Configure dynamic MPLS forwarding for IP
- mtu String
- Set MPLS Maximum Transmission Unit
- name String
- type string
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device string
- A device name from the provider configuration.
- ip boolean
- Configure dynamic MPLS forwarding for IP
- mtu string
- Set MPLS Maximum Transmission Unit
- name string
- type str
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- delete_
mode str - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device str
- A device name from the provider configuration.
- ip bool
- Configure dynamic MPLS forwarding for IP
- mtu str
- Set MPLS Maximum Transmission Unit
- name str
- type String
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- delete
Mode String - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device String
- A device name from the provider configuration.
- ip Boolean
- Configure dynamic MPLS forwarding for IP
- mtu String
- Set MPLS Maximum Transmission Unit
- name String
Outputs
All input properties are implicitly available as output properties. Additionally, the InterfaceMpls 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 InterfaceMpls Resource
Get an existing InterfaceMpls 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?: InterfaceMplsState, opts?: CustomResourceOptions): InterfaceMpls
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
delete_mode: Optional[str] = None,
device: Optional[str] = None,
ip: Optional[bool] = None,
mtu: Optional[str] = None,
name: Optional[str] = None,
type: Optional[str] = None) -> InterfaceMpls
func GetInterfaceMpls(ctx *Context, name string, id IDInput, state *InterfaceMplsState, opts ...ResourceOption) (*InterfaceMpls, error)
public static InterfaceMpls Get(string name, Input<string> id, InterfaceMplsState? state, CustomResourceOptions? opts = null)
public static InterfaceMpls get(String name, Output<String> id, InterfaceMplsState 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.
- Delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- Device string
- A device name from the provider configuration.
- Ip bool
- Configure dynamic MPLS forwarding for IP
- Mtu string
- Set MPLS Maximum Transmission Unit
- Name string
- Type string
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- Delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- Device string
- A device name from the provider configuration.
- Ip bool
- Configure dynamic MPLS forwarding for IP
- Mtu string
- Set MPLS Maximum Transmission Unit
- Name string
- Type string
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- delete
Mode String - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device String
- A device name from the provider configuration.
- ip Boolean
- Configure dynamic MPLS forwarding for IP
- mtu String
- Set MPLS Maximum Transmission Unit
- name String
- type String
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- delete
Mode string - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device string
- A device name from the provider configuration.
- ip boolean
- Configure dynamic MPLS forwarding for IP
- mtu string
- Set MPLS Maximum Transmission Unit
- name string
- type string
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- delete_
mode str - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device str
- A device name from the provider configuration.
- ip bool
- Configure dynamic MPLS forwarding for IP
- mtu str
- Set MPLS Maximum Transmission Unit
- name str
- type str
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
- delete
Mode String - Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being
managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is.
Default value is
all
. - Choices:all
,attributes
- device String
- A device name from the provider configuration.
- ip Boolean
- Configure dynamic MPLS forwarding for IP
- mtu String
- Set MPLS Maximum Transmission Unit
- name String
- type String
- Interface type - Choices:
GigabitEthernet
,TwoGigabitEthernet
,FiveGigabitEthernet
,TenGigabitEthernet
,TwentyFiveGigE
,FortyGigabitEthernet
,HundredGigE
,TwoHundredGigE
,FourHundredGigE
,Loopback
,Vlan
,Port-channel
Import
$ pulumi import iosxe:index/interfaceMpls:InterfaceMpls example "Cisco-IOS-XE-native:native/interface/Loopback=1/mpls"
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.