1. Packages
  2. Equinix
  3. API Docs
  4. networkedge
  5. SshUser
Equinix v0.8.0 published on Tuesday, Apr 2, 2024 by Equinix

equinix.networkedge.SshUser

Explore with Pulumi AI

equinix logo
Equinix v0.8.0 published on Tuesday, Apr 2, 2024 by Equinix

    Resource equinix.networkedge.SshUser allows creation and management of Equinix Network Edge SSH users.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Equinix = Pulumi.Equinix;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var device1Id = config.Require("device1Id");
        var device2Id = config.Require("device2Id");
        var sshUser = new Equinix.NetworkEdge.SshUser("sshUser", new()
        {
            Username = "johnKent",
            DeviceIds = new[]
            {
                device1Id,
                device2Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["sshUserId"] = sshUser.Id,
        };
    });
    
    package main
    
    import (
    	"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		device1Id := cfg.Require("device1Id")
    		device2Id := cfg.Require("device2Id")
    		sshUser, err := networkedge.NewSshUser(ctx, "sshUser", &networkedge.SshUserArgs{
    			Username: pulumi.String("johnKent"),
    			DeviceIds: pulumi.StringArray{
    				pulumi.String(device1Id),
    				pulumi.String(device2Id),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("sshUserId", sshUser.ID())
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.equinix.pulumi.networkedge.SshUser;
    import com.equinix.pulumi.networkedge.SshUserArgs;
    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 config = ctx.config();
            final var device1Id = config.get("device1Id").get();
            final var device2Id = config.get("device2Id").get();
            var sshUser = new SshUser("sshUser", SshUserArgs.builder()        
                .username("johnKent")
                .deviceIds(            
                    device1Id,
                    device2Id)
                .build());
    
            ctx.export("sshUserId", sshUser.id());
        }
    }
    
    import pulumi
    import pulumi_equinix as equinix
    
    config = pulumi.Config()
    device1_id = config.require("device1Id")
    device2_id = config.require("device2Id")
    ssh_user = equinix.networkedge.SshUser("sshUser",
        username="johnKent",
        device_ids=[
            device1_id,
            device2_id,
        ])
    pulumi.export("sshUserId", ssh_user.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as equinix from "@equinix-labs/pulumi-equinix";
    
    const config = new pulumi.Config();
    const device1Id = config.require("device1Id");
    const device2Id = config.require("device2Id");
    const sshUser = new equinix.networkedge.SshUser("sshUser", {
        username: "johnKent",
        deviceIds: [
            device1Id,
            device2Id,
        ],
    });
    export const sshUserId = sshUser.id;
    
    config:
      device1Id:
        type: string
      device2Id:
        type: string
    resources:
      sshUser:
        type: equinix:networkedge:SshUser
        properties:
          username: johnKent
          deviceIds:
          - ${device1Id}
          - ${device2Id}
    outputs:
      sshUserId: ${sshUser.id}
    

    Create SshUser Resource

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

    Constructor syntax

    new SshUser(name: string, args: SshUserArgs, opts?: CustomResourceOptions);
    @overload
    def SshUser(resource_name: str,
                args: SshUserArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def SshUser(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                device_ids: Optional[Sequence[str]] = None,
                password: Optional[str] = None,
                username: Optional[str] = None)
    func NewSshUser(ctx *Context, name string, args SshUserArgs, opts ...ResourceOption) (*SshUser, error)
    public SshUser(string name, SshUserArgs args, CustomResourceOptions? opts = null)
    public SshUser(String name, SshUserArgs args)
    public SshUser(String name, SshUserArgs args, CustomResourceOptions options)
    
    type: equinix:networkedge:SshUser
    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 SshUserArgs
    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 SshUserArgs
    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 SshUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SshUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SshUserArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var sshUserResource = new Equinix.NetworkEdge.SshUser("sshUserResource", new()
    {
        DeviceIds = new[]
        {
            "string",
        },
        Password = "string",
        Username = "string",
    });
    
    example, err := networkedge.NewSshUser(ctx, "sshUserResource", &networkedge.SshUserArgs{
    	DeviceIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Password: pulumi.String("string"),
    	Username: pulumi.String("string"),
    })
    
    var sshUserResource = new SshUser("sshUserResource", SshUserArgs.builder()        
        .deviceIds("string")
        .password("string")
        .username("string")
        .build());
    
    ssh_user_resource = equinix.networkedge.SshUser("sshUserResource",
        device_ids=["string"],
        password="string",
        username="string")
    
    const sshUserResource = new equinix.networkedge.SshUser("sshUserResource", {
        deviceIds: ["string"],
        password: "string",
        username: "string",
    });
    
    type: equinix:networkedge:SshUser
    properties:
        deviceIds:
            - string
        password: string
        username: string
    

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

    DeviceIds List<string>
    list of device identifiers to which user will have access.
    Password string
    SSH user password.
    Username string
    SSH user login name.
    DeviceIds []string
    list of device identifiers to which user will have access.
    Password string
    SSH user password.
    Username string
    SSH user login name.
    deviceIds List<String>
    list of device identifiers to which user will have access.
    password String
    SSH user password.
    username String
    SSH user login name.
    deviceIds string[]
    list of device identifiers to which user will have access.
    password string
    SSH user password.
    username string
    SSH user login name.
    device_ids Sequence[str]
    list of device identifiers to which user will have access.
    password str
    SSH user password.
    username str
    SSH user login name.
    deviceIds List<String>
    list of device identifiers to which user will have access.
    password String
    SSH user password.
    username String
    SSH user login name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SshUser resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    SSH user unique identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    Uuid string
    SSH user unique identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    SSH user unique identifier.
    id string
    The provider-assigned unique ID for this managed resource.
    uuid string
    SSH user unique identifier.
    id str
    The provider-assigned unique ID for this managed resource.
    uuid str
    SSH user unique identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    uuid String
    SSH user unique identifier.

    Look up Existing SshUser Resource

    Get an existing SshUser 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?: SshUserState, opts?: CustomResourceOptions): SshUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            device_ids: Optional[Sequence[str]] = None,
            password: Optional[str] = None,
            username: Optional[str] = None,
            uuid: Optional[str] = None) -> SshUser
    func GetSshUser(ctx *Context, name string, id IDInput, state *SshUserState, opts ...ResourceOption) (*SshUser, error)
    public static SshUser Get(string name, Input<string> id, SshUserState? state, CustomResourceOptions? opts = null)
    public static SshUser get(String name, Output<String> id, SshUserState 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:
    DeviceIds List<string>
    list of device identifiers to which user will have access.
    Password string
    SSH user password.
    Username string
    SSH user login name.
    Uuid string
    SSH user unique identifier.
    DeviceIds []string
    list of device identifiers to which user will have access.
    Password string
    SSH user password.
    Username string
    SSH user login name.
    Uuid string
    SSH user unique identifier.
    deviceIds List<String>
    list of device identifiers to which user will have access.
    password String
    SSH user password.
    username String
    SSH user login name.
    uuid String
    SSH user unique identifier.
    deviceIds string[]
    list of device identifiers to which user will have access.
    password string
    SSH user password.
    username string
    SSH user login name.
    uuid string
    SSH user unique identifier.
    device_ids Sequence[str]
    list of device identifiers to which user will have access.
    password str
    SSH user password.
    username str
    SSH user login name.
    uuid str
    SSH user unique identifier.
    deviceIds List<String>
    list of device identifiers to which user will have access.
    password String
    SSH user password.
    username String
    SSH user login name.
    uuid String
    SSH user unique identifier.

    Package Details

    Repository
    equinix equinix/pulumi-equinix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the equinix Terraform Provider.
    equinix logo
    Equinix v0.8.0 published on Tuesday, Apr 2, 2024 by Equinix