1. Packages
  2. Genesis Cloud
  3. API Docs
  4. SSHKey
Genesis Cloud v0.0.26 published on Thursday, May 23, 2024 by Genesiscloud

genesiscloud.SSHKey

Explore with Pulumi AI

genesiscloud logo
Genesis Cloud v0.0.26 published on Thursday, May 23, 2024 by Genesiscloud

    SSH key resource

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Genesiscloud = GenesisCloud.PulumiPackage.Genesiscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Genesiscloud.SSHKey("example", new()
        {
            PublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com",
        });
    
    });
    
    package main
    
    import (
    	"github.com/genesiscloud/pulumi-genesiscloud/sdk/go/genesiscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := genesiscloud.NewSSHKey(ctx, "example", &genesiscloud.SSHKeyArgs{
    			PublicKey: pulumi.String("ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com"),
    		})
    		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.genesiscloud.SSHKey;
    import com.pulumi.genesiscloud.SSHKeyArgs;
    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 SSHKey("example", SSHKeyArgs.builder()        
                .publicKey("ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_genesiscloud as genesiscloud
    
    example = genesiscloud.SSHKey("example", public_key="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as genesiscloud from "@genesiscloud/pulumi-genesiscloud";
    
    const example = new genesiscloud.SSHKey("example", {publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com"});
    
    resources:
      example:
        type: genesiscloud:SSHKey
        properties:
          publicKey: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBOpdKM8wSI07+PO4xLDL7zW/kNWGbdFXeHyBU1TRlBn alice@example.com
    

    Create SSHKey Resource

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

    Constructor syntax

    new SSHKey(name: string, args: SSHKeyArgs, opts?: CustomResourceOptions);
    @overload
    def SSHKey(resource_name: str,
               args: SSHKeyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def SSHKey(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               public_key: Optional[str] = None,
               name: Optional[str] = None,
               timeouts: Optional[SSHKeyTimeoutsArgs] = None)
    func NewSSHKey(ctx *Context, name string, args SSHKeyArgs, opts ...ResourceOption) (*SSHKey, error)
    public SSHKey(string name, SSHKeyArgs args, CustomResourceOptions? opts = null)
    public SSHKey(String name, SSHKeyArgs args)
    public SSHKey(String name, SSHKeyArgs args, CustomResourceOptions options)
    
    type: genesiscloud:SSHKey
    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 SSHKeyArgs
    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 SSHKeyArgs
    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 SSHKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SSHKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SSHKeyArgs
    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 sshkeyResource = new Genesiscloud.SSHKey("sshkeyResource", new()
    {
        PublicKey = "string",
        Name = "string",
        Timeouts = new Genesiscloud.Inputs.SSHKeyTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
            Update = "string",
        },
    });
    
    example, err := genesiscloud.NewSSHKey(ctx, "sshkeyResource", &genesiscloud.SSHKeyArgs{
    	PublicKey: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	Timeouts: &genesiscloud.SSHKeyTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var sshkeyResource = new SSHKey("sshkeyResource", SSHKeyArgs.builder()        
        .publicKey("string")
        .name("string")
        .timeouts(SSHKeyTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .update("string")
            .build())
        .build());
    
    sshkey_resource = genesiscloud.SSHKey("sshkeyResource",
        public_key="string",
        name="string",
        timeouts=genesiscloud.SSHKeyTimeoutsArgs(
            create="string",
            delete="string",
            read="string",
            update="string",
        ))
    
    const sshkeyResource = new genesiscloud.SSHKey("sshkeyResource", {
        publicKey: "string",
        name: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
            update: "string",
        },
    });
    
    type: genesiscloud:SSHKey
    properties:
        name: string
        publicKey: string
        timeouts:
            create: string
            delete: string
            read: string
            update: string
    

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

    PublicKey string
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    Name string
    The human-readable name for the SSH key.
    Timeouts GenesisCloud.PulumiPackage.Genesiscloud.Inputs.SSHKeyTimeouts
    PublicKey string
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    Name string
    The human-readable name for the SSH key.
    Timeouts SSHKeyTimeoutsArgs
    publicKey String
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    name String
    The human-readable name for the SSH key.
    timeouts SSHKeyTimeouts
    publicKey string
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    name string
    The human-readable name for the SSH key.
    timeouts SSHKeyTimeouts
    public_key str
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    name str
    The human-readable name for the SSH key.
    timeouts SSHKeyTimeoutsArgs
    publicKey String
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    name String
    The human-readable name for the SSH key.
    timeouts Property Map

    Outputs

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

    CreatedAt string
    The timestamp when this SSH key was created in RFC 3339.
    Fingerprint string
    The fingerprint of the SSH key.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedAt string
    The timestamp when this SSH key was created in RFC 3339.
    Fingerprint string
    The fingerprint of the SSH key.
    Id string
    The provider-assigned unique ID for this managed resource.
    createdAt String
    The timestamp when this SSH key was created in RFC 3339.
    fingerprint String
    The fingerprint of the SSH key.
    id String
    The provider-assigned unique ID for this managed resource.
    createdAt string
    The timestamp when this SSH key was created in RFC 3339.
    fingerprint string
    The fingerprint of the SSH key.
    id string
    The provider-assigned unique ID for this managed resource.
    created_at str
    The timestamp when this SSH key was created in RFC 3339.
    fingerprint str
    The fingerprint of the SSH key.
    id str
    The provider-assigned unique ID for this managed resource.
    createdAt String
    The timestamp when this SSH key was created in RFC 3339.
    fingerprint String
    The fingerprint of the SSH key.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SSHKey Resource

    Get an existing SSHKey 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?: SSHKeyState, opts?: CustomResourceOptions): SSHKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            fingerprint: Optional[str] = None,
            name: Optional[str] = None,
            public_key: Optional[str] = None,
            timeouts: Optional[SSHKeyTimeoutsArgs] = None) -> SSHKey
    func GetSSHKey(ctx *Context, name string, id IDInput, state *SSHKeyState, opts ...ResourceOption) (*SSHKey, error)
    public static SSHKey Get(string name, Input<string> id, SSHKeyState? state, CustomResourceOptions? opts = null)
    public static SSHKey get(String name, Output<String> id, SSHKeyState 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:
    CreatedAt string
    The timestamp when this SSH key was created in RFC 3339.
    Fingerprint string
    The fingerprint of the SSH key.
    Name string
    The human-readable name for the SSH key.
    PublicKey string
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    Timeouts GenesisCloud.PulumiPackage.Genesiscloud.Inputs.SSHKeyTimeouts
    CreatedAt string
    The timestamp when this SSH key was created in RFC 3339.
    Fingerprint string
    The fingerprint of the SSH key.
    Name string
    The human-readable name for the SSH key.
    PublicKey string
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    Timeouts SSHKeyTimeoutsArgs
    createdAt String
    The timestamp when this SSH key was created in RFC 3339.
    fingerprint String
    The fingerprint of the SSH key.
    name String
    The human-readable name for the SSH key.
    publicKey String
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    timeouts SSHKeyTimeouts
    createdAt string
    The timestamp when this SSH key was created in RFC 3339.
    fingerprint string
    The fingerprint of the SSH key.
    name string
    The human-readable name for the SSH key.
    publicKey string
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    timeouts SSHKeyTimeouts
    created_at str
    The timestamp when this SSH key was created in RFC 3339.
    fingerprint str
    The fingerprint of the SSH key.
    name str
    The human-readable name for the SSH key.
    public_key str
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    timeouts SSHKeyTimeoutsArgs
    createdAt String
    The timestamp when this SSH key was created in RFC 3339.
    fingerprint String
    The fingerprint of the SSH key.
    name String
    The human-readable name for the SSH key.
    publicKey String
    SSH public key. - If the value of this attribute changes, Terraform will destroy and recreate the resource.
    timeouts Property Map

    Supporting Types

    SSHKeyTimeouts, SSHKeyTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    read String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

     $ pulumi import genesiscloud:index/sSHKey:SSHKey example 18efeec8-94f0-4776-8ff2-5e9b49c74608
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    genesiscloud genesiscloud/pulumi-genesiscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the genesiscloud Terraform Provider.
    genesiscloud logo
    Genesis Cloud v0.0.26 published on Thursday, May 23, 2024 by Genesiscloud