Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs
iosxe.getUsername
Explore with Pulumi AI
This data source can read the Username configuration.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Iosxe = Pulumi.Iosxe;
return await Deployment.RunAsync(() =>
{
var example = Iosxe.GetUsername.Invoke(new()
{
Name = "user1",
});
});
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.LookupUsername(ctx, &iosxe.LookupUsernameArgs{
Name: "user1",
}, nil)
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.IosxeFunctions;
import com.pulumi.iosxe.inputs.GetUsernameArgs;
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) {
final var example = IosxeFunctions.getUsername(GetUsernameArgs.builder()
.name("user1")
.build());
}
}
import pulumi
import pulumi_iosxe as iosxe
example = iosxe.get_username(name="user1")
import * as pulumi from "@pulumi/pulumi";
import * as iosxe from "@pulumi/iosxe";
const example = iosxe.getUsername({
name: "user1",
});
variables:
example:
fn::invoke:
Function: iosxe:getUsername
Arguments:
name: user1
Using getUsername
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getUsername(args: GetUsernameArgs, opts?: InvokeOptions): Promise<GetUsernameResult>
function getUsernameOutput(args: GetUsernameOutputArgs, opts?: InvokeOptions): Output<GetUsernameResult>
def get_username(device: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUsernameResult
def get_username_output(device: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUsernameResult]
func LookupUsername(ctx *Context, args *LookupUsernameArgs, opts ...InvokeOption) (*LookupUsernameResult, error)
func LookupUsernameOutput(ctx *Context, args *LookupUsernameOutputArgs, opts ...InvokeOption) LookupUsernameResultOutput
> Note: This function is named LookupUsername
in the Go SDK.
public static class GetUsername
{
public static Task<GetUsernameResult> InvokeAsync(GetUsernameArgs args, InvokeOptions? opts = null)
public static Output<GetUsernameResult> Invoke(GetUsernameInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUsernameResult> getUsername(GetUsernameArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: iosxe:index/getUsername:getUsername
arguments:
# arguments dictionary
The following arguments are supported:
getUsername Result
The following output properties are available:
- Description string
- description string with max 128 characters
- Id string
- The path of the retrieved object.
- Name string
- Password string
- Password
Encryption string - Privilege int
- Set user privilege level
- Secret string
- Secret
Encryption string - Device string
- A device name from the provider configuration.
- Description string
- description string with max 128 characters
- Id string
- The path of the retrieved object.
- Name string
- Password string
- Password
Encryption string - Privilege int
- Set user privilege level
- Secret string
- Secret
Encryption string - Device string
- A device name from the provider configuration.
- description String
- description string with max 128 characters
- id String
- The path of the retrieved object.
- name String
- password String
- password
Encryption String - privilege Integer
- Set user privilege level
- secret String
- secret
Encryption String - device String
- A device name from the provider configuration.
- description string
- description string with max 128 characters
- id string
- The path of the retrieved object.
- name string
- password string
- password
Encryption string - privilege number
- Set user privilege level
- secret string
- secret
Encryption string - device string
- A device name from the provider configuration.
- description str
- description string with max 128 characters
- id str
- The path of the retrieved object.
- name str
- password str
- password_
encryption str - privilege int
- Set user privilege level
- secret str
- secret_
encryption str - device str
- A device name from the provider configuration.
- description String
- description string with max 128 characters
- id String
- The path of the retrieved object.
- name String
- password String
- password
Encryption String - privilege Number
- Set user privilege level
- secret String
- secret
Encryption String - device String
- A device name from the provider configuration.
Package Details
- Repository
- iosxe lbrlabs/pulumi-iosxe
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
iosxe
Terraform Provider.