1. Packages
  2. DanubeData
  3. API Docs
  4. getSshKeys
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
danubedata logo
DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi

    # danubedata.getSshKeys

    Lists all SSH keys in your account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as danubedata from "@pulumi/danubedata";
    
    const all = danubedata.getSshKeys({});
    export const sshKeyIds = all.then(all => .map(key => (key.id)));
    export const sshKeyNames = all.then(all => .map(key => (key.name)));
    
    import pulumi
    import pulumi_danubedata as danubedata
    
    all = danubedata.get_ssh_keys()
    pulumi.export("sshKeyIds", [key.id for key in all.keys])
    pulumi.export("sshKeyNames", [key.name for key in all.keys])
    
    package main
    
    import (
    	"github.com/AdrianSilaghi/pulumi-danubedata/sdk/go/danubedata"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		all, err := danubedata.GetSshKeys(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("sshKeyIds", pulumi.StringArray("TODO: For expression"))
    		ctx.Export("sshKeyNames", pulumi.StringArray("TODO: For expression"))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DanubeData = Pulumi.DanubeData;
    
    return await Deployment.RunAsync(() => 
    {
        var all = DanubeData.GetSshKeys.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["sshKeyIds"] = .Select(key => 
            {
                return key.Id;
            }).ToList(),
            ["sshKeyNames"] = .Select(key => 
            {
                return key.Name;
            }).ToList(),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.danubedata.DanubedataFunctions;
    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 all = DanubedataFunctions.getSshKeys();
    
            ctx.export("sshKeyIds", "TODO: ForExpression");
            ctx.export("sshKeyNames", "TODO: ForExpression");
        }
    }
    
    Example coming soon!
    

    Find Key by Name

    import * as pulumi from "@pulumi/pulumi";
    import * as danubedata from "@danubedata/pulumi";
    import * as danubedata from "@pulumi/danubedata";
    
    const all = danubedata.getSshKeys({});
    const deployKey = all.then(all => .filter(key => key.name == "deploy-key").map(key => (key))[0]);
    const server = new danubedata.Vps("server", {
        image: "ubuntu-22.04",
        datacenter: "fsn1",
        authMethod: "ssh_key",
        sshKeyId: deployKey.id,
    });
    
    import pulumi
    import pulumi_danubedata as danubedata
    
    all = danubedata.get_ssh_keys()
    deploy_key = [key for key in all.keys if key.name == "deploy-key"][0]
    server = danubedata.Vps("server",
        image="ubuntu-22.04",
        datacenter="fsn1",
        auth_method="ssh_key",
        ssh_key_id=deploy_key.id)
    
    package main
    
    import (
    	"github.com/AdrianSilaghi/pulumi-danubedata/sdk/go/danubedata"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		all, err := danubedata.GetSshKeys(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		deployKey := "TODO: For expression"[0]
    		_, err = danubedata.NewVps(ctx, "server", &danubedata.VpsArgs{
    			Image:      pulumi.String("ubuntu-22.04"),
    			Datacenter: pulumi.String("fsn1"),
    			AuthMethod: pulumi.String("ssh_key"),
    			SshKeyId:   pulumi.String(deployKey.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DanubeData = DanubeData.DanubeData;
    using DanubeData = Pulumi.DanubeData;
    
    return await Deployment.RunAsync(() => 
    {
        var all = DanubeData.GetSshKeys.Invoke();
    
        var deployKey = .Where(key => key.Name == "deploy-key").Select(key => 
        {
            return key;
        }).ToList()[0];
    
        var server = new DanubeData.Vps("server", new()
        {
            Image = "ubuntu-22.04",
            Datacenter = "fsn1",
            AuthMethod = "ssh_key",
            SshKeyId = deployKey.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.danubedata.DanubedataFunctions;
    import com.pulumi.danubedata.Vps;
    import com.pulumi.danubedata.VpsArgs;
    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 all = DanubedataFunctions.getSshKeys();
    
            final var deployKey = "TODO: ForExpression"[0];
    
            var server = new Vps("server", VpsArgs.builder()
                .image("ubuntu-22.04")
                .datacenter("fsn1")
                .authMethod("ssh_key")
                .sshKeyId(deployKey.id())
                .build());
    
        }
    }
    
    Example coming soon!
    

    Using getSshKeys

    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 getSshKeys(opts?: InvokeOptions): Promise<GetSshKeysResult>
    function getSshKeysOutput(opts?: InvokeOptions): Output<GetSshKeysResult>
    def get_ssh_keys(opts: Optional[InvokeOptions] = None) -> GetSshKeysResult
    def get_ssh_keys_output(opts: Optional[InvokeOptions] = None) -> Output[GetSshKeysResult]
    func GetSshKeys(ctx *Context, opts ...InvokeOption) (*GetSshKeysResult, error)
    func GetSshKeysOutput(ctx *Context, opts ...InvokeOption) GetSshKeysResultOutput

    > Note: This function is named GetSshKeys in the Go SDK.

    public static class GetSshKeys 
    {
        public static Task<GetSshKeysResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetSshKeysResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSshKeysResult> getSshKeys(InvokeOptions options)
    public static Output<GetSshKeysResult> getSshKeys(InvokeOptions options)
    
    fn::invoke:
      function: danubedata:index/getSshKeys:getSshKeys
      arguments:
        # arguments dictionary

    getSshKeys Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Keys List<DanubeData.DanubeData.Outputs.GetSshKeysKey>
    List of SSH keys. Each key contains:
    Id string
    The provider-assigned unique ID for this managed resource.
    Keys []GetSshKeysKey
    List of SSH keys. Each key contains:
    id String
    The provider-assigned unique ID for this managed resource.
    keys List<GetSshKeysKey>
    List of SSH keys. Each key contains:
    id string
    The provider-assigned unique ID for this managed resource.
    keys GetSshKeysKey[]
    List of SSH keys. Each key contains:
    id str
    The provider-assigned unique ID for this managed resource.
    keys Sequence[GetSshKeysKey]
    List of SSH keys. Each key contains:
    id String
    The provider-assigned unique ID for this managed resource.
    keys List<Property Map>
    List of SSH keys. Each key contains:

    Supporting Types

    GetSshKeysKey

    CreatedAt string
    Creation timestamp.
    Fingerprint string
    SSH key fingerprint.
    Id string
    The SSH key ID.
    Name string
    Name of the key.
    PublicKey string
    The public key content.
    CreatedAt string
    Creation timestamp.
    Fingerprint string
    SSH key fingerprint.
    Id string
    The SSH key ID.
    Name string
    Name of the key.
    PublicKey string
    The public key content.
    createdAt String
    Creation timestamp.
    fingerprint String
    SSH key fingerprint.
    id String
    The SSH key ID.
    name String
    Name of the key.
    publicKey String
    The public key content.
    createdAt string
    Creation timestamp.
    fingerprint string
    SSH key fingerprint.
    id string
    The SSH key ID.
    name string
    Name of the key.
    publicKey string
    The public key content.
    created_at str
    Creation timestamp.
    fingerprint str
    SSH key fingerprint.
    id str
    The SSH key ID.
    name str
    Name of the key.
    public_key str
    The public key content.
    createdAt String
    Creation timestamp.
    fingerprint String
    SSH key fingerprint.
    id String
    The SSH key ID.
    name String
    Name of the key.
    publicKey String
    The public key content.

    Package Details

    Repository
    danubedata AdrianSilaghi/pulumi-danubedata
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the danubedata Terraform Provider.
    danubedata logo
    DanubeData v0.1.7 published on Sunday, Feb 1, 2026 by AdrianSilaghi
      Meet Neo: Your AI Platform Teammate