iosxe.Username
Explore with Pulumi AI
This resource can manage the Username 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.Username("example", new()
{
Description = "User1 description",
Password = "MyPassword",
PasswordEncryption = "0",
Privilege = 15,
});
});
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.NewUsername(ctx, "example", &iosxe.UsernameArgs{
Description: pulumi.String("User1 description"),
Password: pulumi.String("MyPassword"),
PasswordEncryption: pulumi.String("0"),
Privilege: pulumi.Int(15),
})
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.Username;
import com.pulumi.iosxe.UsernameArgs;
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 Username("example", UsernameArgs.builder()
.description("User1 description")
.password("MyPassword")
.passwordEncryption("0")
.privilege(15)
.build());
}
}
import pulumi
import lbrlabs_pulumi_iosxe as iosxe
example = iosxe.Username("example",
description="User1 description",
password="MyPassword",
password_encryption="0",
privilege=15)
import * as pulumi from "@pulumi/pulumi";
import * as iosxe from "@lbrlabs/pulumi-iosxe";
const example = new iosxe.Username("example", {
description: "User1 description",
password: "MyPassword",
passwordEncryption: "0",
privilege: 15,
});
resources:
example:
type: iosxe:Username
properties:
description: User1 description
password: MyPassword
passwordEncryption: '0'
privilege: 15
Create Username Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Username(name: string, args?: UsernameArgs, opts?: CustomResourceOptions);
@overload
def Username(resource_name: str,
args: Optional[UsernameArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Username(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
device: Optional[str] = None,
name: Optional[str] = None,
password: Optional[str] = None,
password_encryption: Optional[str] = None,
privilege: Optional[int] = None,
secret: Optional[str] = None,
secret_encryption: Optional[str] = None)
func NewUsername(ctx *Context, name string, args *UsernameArgs, opts ...ResourceOption) (*Username, error)
public Username(string name, UsernameArgs? args = null, CustomResourceOptions? opts = null)
public Username(String name, UsernameArgs args)
public Username(String name, UsernameArgs args, CustomResourceOptions options)
type: iosxe:Username
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 UsernameArgs
- 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 UsernameArgs
- 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 UsernameArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UsernameArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UsernameArgs
- 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 usernameResource = new Iosxe.Username("usernameResource", new()
{
Description = "string",
Device = "string",
Name = "string",
Password = "string",
PasswordEncryption = "string",
Privilege = 0,
Secret = "string",
SecretEncryption = "string",
});
example, err := iosxe.NewUsername(ctx, "usernameResource", &iosxe.UsernameArgs{
Description: pulumi.String("string"),
Device: pulumi.String("string"),
Name: pulumi.String("string"),
Password: pulumi.String("string"),
PasswordEncryption: pulumi.String("string"),
Privilege: pulumi.Int(0),
Secret: pulumi.String("string"),
SecretEncryption: pulumi.String("string"),
})
var usernameResource = new Username("usernameResource", UsernameArgs.builder()
.description("string")
.device("string")
.name("string")
.password("string")
.passwordEncryption("string")
.privilege(0)
.secret("string")
.secretEncryption("string")
.build());
username_resource = iosxe.Username("usernameResource",
description="string",
device="string",
name="string",
password="string",
password_encryption="string",
privilege=0,
secret="string",
secret_encryption="string")
const usernameResource = new iosxe.Username("usernameResource", {
description: "string",
device: "string",
name: "string",
password: "string",
passwordEncryption: "string",
privilege: 0,
secret: "string",
secretEncryption: "string",
});
type: iosxe:Username
properties:
description: string
device: string
name: string
password: string
passwordEncryption: string
privilege: 0
secret: string
secretEncryption: string
Username 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 Username resource accepts the following input properties:
- Description string
- description string with max 128 characters
- Device string
- A device name from the provider configuration.
- Name string
- Password string
- Password
Encryption string - Choices:
0
,6
,7
- Choices:
- Privilege int
- Set user privilege level - Range:
0
-15
- Secret string
- Secret
Encryption string - Choices:
0
,5
,8
,9
- Choices:
- Description string
- description string with max 128 characters
- Device string
- A device name from the provider configuration.
- Name string
- Password string
- Password
Encryption string - Choices:
0
,6
,7
- Choices:
- Privilege int
- Set user privilege level - Range:
0
-15
- Secret string
- Secret
Encryption string - Choices:
0
,5
,8
,9
- Choices:
- description String
- description string with max 128 characters
- device String
- A device name from the provider configuration.
- name String
- password String
- password
Encryption String - Choices:
0
,6
,7
- Choices:
- privilege Integer
- Set user privilege level - Range:
0
-15
- secret String
- secret
Encryption String - Choices:
0
,5
,8
,9
- Choices:
- description string
- description string with max 128 characters
- device string
- A device name from the provider configuration.
- name string
- password string
- password
Encryption string - Choices:
0
,6
,7
- Choices:
- privilege number
- Set user privilege level - Range:
0
-15
- secret string
- secret
Encryption string - Choices:
0
,5
,8
,9
- Choices:
- description str
- description string with max 128 characters
- device str
- A device name from the provider configuration.
- name str
- password str
- password_
encryption str - Choices:
0
,6
,7
- Choices:
- privilege int
- Set user privilege level - Range:
0
-15
- secret str
- secret_
encryption str - Choices:
0
,5
,8
,9
- Choices:
- description String
- description string with max 128 characters
- device String
- A device name from the provider configuration.
- name String
- password String
- password
Encryption String - Choices:
0
,6
,7
- Choices:
- privilege Number
- Set user privilege level - Range:
0
-15
- secret String
- secret
Encryption String - Choices:
0
,5
,8
,9
- Choices:
Outputs
All input properties are implicitly available as output properties. Additionally, the Username 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 Username Resource
Get an existing Username 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?: UsernameState, opts?: CustomResourceOptions): Username
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
device: Optional[str] = None,
name: Optional[str] = None,
password: Optional[str] = None,
password_encryption: Optional[str] = None,
privilege: Optional[int] = None,
secret: Optional[str] = None,
secret_encryption: Optional[str] = None) -> Username
func GetUsername(ctx *Context, name string, id IDInput, state *UsernameState, opts ...ResourceOption) (*Username, error)
public static Username Get(string name, Input<string> id, UsernameState? state, CustomResourceOptions? opts = null)
public static Username get(String name, Output<String> id, UsernameState 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.
- Description string
- description string with max 128 characters
- Device string
- A device name from the provider configuration.
- Name string
- Password string
- Password
Encryption string - Choices:
0
,6
,7
- Choices:
- Privilege int
- Set user privilege level - Range:
0
-15
- Secret string
- Secret
Encryption string - Choices:
0
,5
,8
,9
- Choices:
- Description string
- description string with max 128 characters
- Device string
- A device name from the provider configuration.
- Name string
- Password string
- Password
Encryption string - Choices:
0
,6
,7
- Choices:
- Privilege int
- Set user privilege level - Range:
0
-15
- Secret string
- Secret
Encryption string - Choices:
0
,5
,8
,9
- Choices:
- description String
- description string with max 128 characters
- device String
- A device name from the provider configuration.
- name String
- password String
- password
Encryption String - Choices:
0
,6
,7
- Choices:
- privilege Integer
- Set user privilege level - Range:
0
-15
- secret String
- secret
Encryption String - Choices:
0
,5
,8
,9
- Choices:
- description string
- description string with max 128 characters
- device string
- A device name from the provider configuration.
- name string
- password string
- password
Encryption string - Choices:
0
,6
,7
- Choices:
- privilege number
- Set user privilege level - Range:
0
-15
- secret string
- secret
Encryption string - Choices:
0
,5
,8
,9
- Choices:
- description str
- description string with max 128 characters
- device str
- A device name from the provider configuration.
- name str
- password str
- password_
encryption str - Choices:
0
,6
,7
- Choices:
- privilege int
- Set user privilege level - Range:
0
-15
- secret str
- secret_
encryption str - Choices:
0
,5
,8
,9
- Choices:
- description String
- description string with max 128 characters
- device String
- A device name from the provider configuration.
- name String
- password String
- password
Encryption String - Choices:
0
,6
,7
- Choices:
- privilege Number
- Set user privilege level - Range:
0
-15
- secret String
- secret
Encryption String - Choices:
0
,5
,8
,9
- Choices:
Import
$ pulumi import iosxe:index/username:Username example "Cisco-IOS-XE-native:native/username=user1"
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.