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

iosxe.Line

Explore with Pulumi AI

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

    This resource can manage the Line configuration.

    Example Usage

    Coming soon!

    Coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.iosxe.Line;
    import com.pulumi.iosxe.LineArgs;
    import com.pulumi.iosxe.inputs.LineConsoleArgs;
    import com.pulumi.iosxe.inputs.LineVtyArgs;
    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 Line("example", LineArgs.builder()        
                .consoles(LineConsoleArgs.builder()
                    .exec_timeout_minutes(45)
                    .exec_timeout_seconds(25)
                    .first("0")
                    .password("testpasswd")
                    .password_type("0")
                    .privilege_level(15)
                    .stopbits("1")
                    .build())
                .vties(LineVtyArgs.builder()
                    .access_classes(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                    .escape_character("27")
                    .exec_timeout_minutes(45)
                    .exec_timeout_seconds(25)
                    .first(10)
                    .last(27)
                    .password("testpasswd")
                    .password_type("0")
                    .transport_preferred_protocol("none")
                    .build())
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      example:
        type: iosxe:Line
        properties:
          consoles:
            - exec_timeout_minutes: 45
              exec_timeout_seconds: 25
              first: '0'
              password: testpasswd
              password_type: '0'
              privilege_level: 15
              stopbits: '1'
          vties:
            - access_classes:
                - accessList: '2'
                  direction: in
                  vrfAlso: true
              escape_character: '27'
              exec_timeout_minutes: 45
              exec_timeout_seconds: 25
              first: 10
              last: 27
              password: testpasswd
              password_type: '0'
              transport_preferred_protocol: none
    

    Create Line Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Line(name: string, args?: LineArgs, opts?: CustomResourceOptions);
    @overload
    def Line(resource_name: str,
             args: Optional[LineArgs] = None,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Line(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             consoles: Optional[Sequence[LineConsoleArgs]] = None,
             delete_mode: Optional[str] = None,
             device: Optional[str] = None,
             vties: Optional[Sequence[LineVtyArgs]] = None)
    func NewLine(ctx *Context, name string, args *LineArgs, opts ...ResourceOption) (*Line, error)
    public Line(string name, LineArgs? args = null, CustomResourceOptions? opts = null)
    public Line(String name, LineArgs args)
    public Line(String name, LineArgs args, CustomResourceOptions options)
    
    type: iosxe:Line
    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 LineArgs
    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 LineArgs
    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 LineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LineArgs
    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 lineResource = new Iosxe.Line("lineResource", new()
    {
        Consoles = new[]
        {
            new Iosxe.Inputs.LineConsoleArgs
            {
                First = "string",
                ExecTimeoutMinutes = 0,
                ExecTimeoutSeconds = 0,
                LoginAuthentication = "string",
                LoginLocal = false,
                Password = "string",
                PasswordLevel = 0,
                PasswordType = "string",
                PrivilegeLevel = 0,
                Stopbits = "string",
            },
        },
        DeleteMode = "string",
        Device = "string",
        Vties = new[]
        {
            new Iosxe.Inputs.LineVtyArgs
            {
                First = 0,
                AccessClasses = new[]
                {
                    new Iosxe.Inputs.LineVtyAccessClassArgs
                    {
                        AccessList = "string",
                        Direction = "string",
                        VrfAlso = false,
                    },
                },
                EscapeCharacter = "string",
                ExecTimeoutMinutes = 0,
                ExecTimeoutSeconds = 0,
                Last = 0,
                LoginAuthentication = "string",
                Password = "string",
                PasswordLevel = 0,
                PasswordType = "string",
                TransportPreferredProtocol = "string",
            },
        },
    });
    
    example, err := iosxe.NewLine(ctx, "lineResource", &iosxe.LineArgs{
    	Consoles: iosxe.LineConsoleArray{
    		&iosxe.LineConsoleArgs{
    			First:               pulumi.String("string"),
    			ExecTimeoutMinutes:  pulumi.Int(0),
    			ExecTimeoutSeconds:  pulumi.Int(0),
    			LoginAuthentication: pulumi.String("string"),
    			LoginLocal:          pulumi.Bool(false),
    			Password:            pulumi.String("string"),
    			PasswordLevel:       pulumi.Int(0),
    			PasswordType:        pulumi.String("string"),
    			PrivilegeLevel:      pulumi.Int(0),
    			Stopbits:            pulumi.String("string"),
    		},
    	},
    	DeleteMode: pulumi.String("string"),
    	Device:     pulumi.String("string"),
    	Vties: iosxe.LineVtyArray{
    		&iosxe.LineVtyArgs{
    			First: pulumi.Int(0),
    			AccessClasses: iosxe.LineVtyAccessClassArray{
    				&iosxe.LineVtyAccessClassArgs{
    					AccessList: pulumi.String("string"),
    					Direction:  pulumi.String("string"),
    					VrfAlso:    pulumi.Bool(false),
    				},
    			},
    			EscapeCharacter:            pulumi.String("string"),
    			ExecTimeoutMinutes:         pulumi.Int(0),
    			ExecTimeoutSeconds:         pulumi.Int(0),
    			Last:                       pulumi.Int(0),
    			LoginAuthentication:        pulumi.String("string"),
    			Password:                   pulumi.String("string"),
    			PasswordLevel:              pulumi.Int(0),
    			PasswordType:               pulumi.String("string"),
    			TransportPreferredProtocol: pulumi.String("string"),
    		},
    	},
    })
    
    var lineResource = new Line("lineResource", LineArgs.builder()
        .consoles(LineConsoleArgs.builder()
            .first("string")
            .execTimeoutMinutes(0)
            .execTimeoutSeconds(0)
            .loginAuthentication("string")
            .loginLocal(false)
            .password("string")
            .passwordLevel(0)
            .passwordType("string")
            .privilegeLevel(0)
            .stopbits("string")
            .build())
        .deleteMode("string")
        .device("string")
        .vties(LineVtyArgs.builder()
            .first(0)
            .accessClasses(LineVtyAccessClassArgs.builder()
                .accessList("string")
                .direction("string")
                .vrfAlso(false)
                .build())
            .escapeCharacter("string")
            .execTimeoutMinutes(0)
            .execTimeoutSeconds(0)
            .last(0)
            .loginAuthentication("string")
            .password("string")
            .passwordLevel(0)
            .passwordType("string")
            .transportPreferredProtocol("string")
            .build())
        .build());
    
    line_resource = iosxe.Line("lineResource",
        consoles=[{
            "first": "string",
            "exec_timeout_minutes": 0,
            "exec_timeout_seconds": 0,
            "login_authentication": "string",
            "login_local": False,
            "password": "string",
            "password_level": 0,
            "password_type": "string",
            "privilege_level": 0,
            "stopbits": "string",
        }],
        delete_mode="string",
        device="string",
        vties=[{
            "first": 0,
            "access_classes": [{
                "access_list": "string",
                "direction": "string",
                "vrf_also": False,
            }],
            "escape_character": "string",
            "exec_timeout_minutes": 0,
            "exec_timeout_seconds": 0,
            "last": 0,
            "login_authentication": "string",
            "password": "string",
            "password_level": 0,
            "password_type": "string",
            "transport_preferred_protocol": "string",
        }])
    
    const lineResource = new iosxe.Line("lineResource", {
        consoles: [{
            first: "string",
            execTimeoutMinutes: 0,
            execTimeoutSeconds: 0,
            loginAuthentication: "string",
            loginLocal: false,
            password: "string",
            passwordLevel: 0,
            passwordType: "string",
            privilegeLevel: 0,
            stopbits: "string",
        }],
        deleteMode: "string",
        device: "string",
        vties: [{
            first: 0,
            accessClasses: [{
                accessList: "string",
                direction: "string",
                vrfAlso: false,
            }],
            escapeCharacter: "string",
            execTimeoutMinutes: 0,
            execTimeoutSeconds: 0,
            last: 0,
            loginAuthentication: "string",
            password: "string",
            passwordLevel: 0,
            passwordType: "string",
            transportPreferredProtocol: "string",
        }],
    });
    
    type: iosxe:Line
    properties:
        consoles:
            - execTimeoutMinutes: 0
              execTimeoutSeconds: 0
              first: string
              loginAuthentication: string
              loginLocal: false
              password: string
              passwordLevel: 0
              passwordType: string
              privilegeLevel: 0
              stopbits: string
        deleteMode: string
        device: string
        vties:
            - accessClasses:
                - accessList: string
                  direction: string
                  vrfAlso: false
              escapeCharacter: string
              execTimeoutMinutes: 0
              execTimeoutSeconds: 0
              first: 0
              last: 0
              loginAuthentication: string
              password: string
              passwordLevel: 0
              passwordType: string
              transportPreferredProtocol: string
    

    Line 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 Line resource accepts the following input properties:

    Consoles List<Lbrlabs.PulumiPackage.Iosxe.Inputs.LineConsole>
    Primary terminal line
    DeleteMode 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.
    Vties List<Lbrlabs.PulumiPackage.Iosxe.Inputs.LineVty>
    Virtual terminal
    Consoles []LineConsoleArgs
    Primary terminal line
    DeleteMode 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.
    Vties []LineVtyArgs
    Virtual terminal
    consoles List<LineConsole>
    Primary terminal line
    deleteMode 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.
    vties List<LineVty>
    Virtual terminal
    consoles LineConsole[]
    Primary terminal line
    deleteMode 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.
    vties LineVty[]
    Virtual terminal
    consoles Sequence[LineConsoleArgs]
    Primary terminal line
    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.
    vties Sequence[LineVtyArgs]
    Virtual terminal
    consoles List<Property Map>
    Primary terminal line
    deleteMode 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.
    vties List<Property Map>
    Virtual terminal

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Line 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 Line Resource

    Get an existing Line 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?: LineState, opts?: CustomResourceOptions): Line
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            consoles: Optional[Sequence[LineConsoleArgs]] = None,
            delete_mode: Optional[str] = None,
            device: Optional[str] = None,
            vties: Optional[Sequence[LineVtyArgs]] = None) -> Line
    func GetLine(ctx *Context, name string, id IDInput, state *LineState, opts ...ResourceOption) (*Line, error)
    public static Line Get(string name, Input<string> id, LineState? state, CustomResourceOptions? opts = null)
    public static Line get(String name, Output<String> id, LineState 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.
    The following state arguments are supported:
    Consoles List<Lbrlabs.PulumiPackage.Iosxe.Inputs.LineConsole>
    Primary terminal line
    DeleteMode 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.
    Vties List<Lbrlabs.PulumiPackage.Iosxe.Inputs.LineVty>
    Virtual terminal
    Consoles []LineConsoleArgs
    Primary terminal line
    DeleteMode 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.
    Vties []LineVtyArgs
    Virtual terminal
    consoles List<LineConsole>
    Primary terminal line
    deleteMode 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.
    vties List<LineVty>
    Virtual terminal
    consoles LineConsole[]
    Primary terminal line
    deleteMode 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.
    vties LineVty[]
    Virtual terminal
    consoles Sequence[LineConsoleArgs]
    Primary terminal line
    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.
    vties Sequence[LineVtyArgs]
    Virtual terminal
    consoles List<Property Map>
    Primary terminal line
    deleteMode 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.
    vties List<Property Map>
    Virtual terminal

    Supporting Types

    LineConsole, LineConsoleArgs

    LineVty, LineVtyArgs

    LineVtyAccessClass, LineVtyAccessClassArgs

    AccessList string
    Direction string
    VrfAlso bool
    AccessList string
    Direction string
    VrfAlso bool
    accessList String
    direction String
    vrfAlso Boolean
    accessList string
    direction string
    vrfAlso boolean
    accessList String
    direction String
    vrfAlso Boolean

    Import

     $ pulumi import iosxe:index/line:Line example "Cisco-IOS-XE-native:native/line"
    

    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.
    iosxe logo
    Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs