iosxe.Line
Explore with Pulumi AI
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)
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=[iosxe.LineConsoleArgs(
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=[iosxe.LineVtyArgs(
first=0,
access_classes=[iosxe.LineVtyAccessClassArgs(
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
The Line resource accepts the following input properties:
- Consoles
List<Lbrlabs.
Pulumi Package. Iosxe. Inputs. Line Console> - Primary terminal line
- 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.
- Vties
List<Lbrlabs.
Pulumi Package. Iosxe. Inputs. Line Vty> - Virtual terminal
- Consoles
[]Line
Console Args - Primary terminal line
- 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.
- Vties
[]Line
Vty Args - Virtual terminal
- consoles
List<Line
Console> - Primary terminal line
- 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.
- vties
List<Line
Vty> - Virtual terminal
- consoles
Line
Console[] - Primary terminal line
- 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.
- vties
Line
Vty[] - Virtual terminal
- consoles
Sequence[Line
Console Args] - 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[Line
Vty Args] - Virtual terminal
- consoles List<Property Map>
- Primary terminal line
- 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.
- 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.
- Consoles
List<Lbrlabs.
Pulumi Package. Iosxe. Inputs. Line Console> - Primary terminal line
- 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.
- Vties
List<Lbrlabs.
Pulumi Package. Iosxe. Inputs. Line Vty> - Virtual terminal
- Consoles
[]Line
Console Args - Primary terminal line
- 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.
- Vties
[]Line
Vty Args - Virtual terminal
- consoles
List<Line
Console> - Primary terminal line
- 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.
- vties
List<Line
Vty> - Virtual terminal
- consoles
Line
Console[] - Primary terminal line
- 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.
- vties
Line
Vty[] - Virtual terminal
- consoles
Sequence[Line
Console Args] - 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[Line
Vty Args] - Virtual terminal
- consoles List<Property Map>
- Primary terminal line
- 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.
- vties List<Property Map>
- Virtual terminal
Supporting Types
LineConsole, LineConsoleArgs
- First string
- Exec
Timeout intMinutes - Exec
Timeout intSeconds - Login
Authentication string - Login
Local bool - Password string
- Password
Level int - Password
Type string - Privilege
Level int - Stopbits string
- First string
- Exec
Timeout intMinutes - Exec
Timeout intSeconds - Login
Authentication string - Login
Local bool - Password string
- Password
Level int - Password
Type string - Privilege
Level int - Stopbits string
- first String
- exec
Timeout IntegerMinutes - exec
Timeout IntegerSeconds - login
Authentication String - login
Local Boolean - password String
- password
Level Integer - password
Type String - privilege
Level Integer - stopbits String
- first string
- exec
Timeout numberMinutes - exec
Timeout numberSeconds - login
Authentication string - login
Local boolean - password string
- password
Level number - password
Type string - privilege
Level number - stopbits string
- first str
- exec_
timeout_ intminutes - exec_
timeout_ intseconds - login_
authentication str - login_
local bool - password str
- password_
level int - password_
type str - privilege_
level int - stopbits str
- first String
- exec
Timeout NumberMinutes - exec
Timeout NumberSeconds - login
Authentication String - login
Local Boolean - password String
- password
Level Number - password
Type String - privilege
Level Number - stopbits String
LineVty, LineVtyArgs
- First int
- Access
Classes List<Lbrlabs.Pulumi Package. Iosxe. Inputs. Line Vty Access Class> - Escape
Character string - Exec
Timeout intMinutes - Exec
Timeout intSeconds - Last int
- Login
Authentication string - Password string
- Password
Level int - Password
Type string - Transport
Preferred stringProtocol
- First int
- Access
Classes []LineVty Access Class - Escape
Character string - Exec
Timeout intMinutes - Exec
Timeout intSeconds - Last int
- Login
Authentication string - Password string
- Password
Level int - Password
Type string - Transport
Preferred stringProtocol
- first Integer
- access
Classes List<LineVty Access Class> - escape
Character String - exec
Timeout IntegerMinutes - exec
Timeout IntegerSeconds - last Integer
- login
Authentication String - password String
- password
Level Integer - password
Type String - transport
Preferred StringProtocol
- first number
- access
Classes LineVty Access Class[] - escape
Character string - exec
Timeout numberMinutes - exec
Timeout numberSeconds - last number
- login
Authentication string - password string
- password
Level number - password
Type string - transport
Preferred stringProtocol
- first Number
- access
Classes List<Property Map> - escape
Character String - exec
Timeout NumberMinutes - exec
Timeout NumberSeconds - last Number
- login
Authentication String - password String
- password
Level Number - password
Type String - transport
Preferred StringProtocol
LineVtyAccessClass, LineVtyAccessClassArgs
- Access
List string - Direction string
- Vrf
Also bool
- Access
List string - Direction string
- Vrf
Also bool
- access
List String - direction String
- vrf
Also Boolean
- access
List string - direction string
- vrf
Also boolean
- access_
list str - direction str
- vrf_
also bool
- access
List String - direction String
- vrf
Also 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.