1. Packages
  2. Packages
  3. Gcore Provider
  4. API Docs
  5. getStorageSshKey
Viewing docs for gcore 2.0.0-alpha.6
published on Monday, Apr 27, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.6
published on Monday, Apr 27, 2026 by g-core

    SSH keys enable secure access to SFTP storage by associating public keys with user accounts for authentication.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const exampleStorageSshKey = gcore.getStorageSshKey({
        sshKeyId: 0,
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_storage_ssh_key = gcore.get_storage_ssh_key(ssh_key_id=0)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.LookupStorageSshKey(ctx, &gcore.LookupStorageSshKeyArgs{
    			SshKeyId: pulumi.Float64Ref(0),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleStorageSshKey = Gcore.GetStorageSshKey.Invoke(new()
        {
            SshKeyId = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetStorageSshKeyArgs;
    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 exampleStorageSshKey = GcoreFunctions.getStorageSshKey(GetStorageSshKeyArgs.builder()
                .sshKeyId(0)
                .build());
    
        }
    }
    
    variables:
      exampleStorageSshKey:
        fn::invoke:
          function: gcore:getStorageSshKey
          arguments:
            sshKeyId: 0
    

    Using getStorageSshKey

    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 getStorageSshKey(args: GetStorageSshKeyArgs, opts?: InvokeOptions): Promise<GetStorageSshKeyResult>
    function getStorageSshKeyOutput(args: GetStorageSshKeyOutputArgs, opts?: InvokeOptions): Output<GetStorageSshKeyResult>
    def get_storage_ssh_key(find_one_by: Optional[GetStorageSshKeyFindOneBy] = None,
                            ssh_key_id: Optional[float] = None,
                            opts: Optional[InvokeOptions] = None) -> GetStorageSshKeyResult
    def get_storage_ssh_key_output(find_one_by: pulumi.Input[Optional[GetStorageSshKeyFindOneByArgs]] = None,
                            ssh_key_id: pulumi.Input[Optional[float]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetStorageSshKeyResult]
    func LookupStorageSshKey(ctx *Context, args *LookupStorageSshKeyArgs, opts ...InvokeOption) (*LookupStorageSshKeyResult, error)
    func LookupStorageSshKeyOutput(ctx *Context, args *LookupStorageSshKeyOutputArgs, opts ...InvokeOption) LookupStorageSshKeyResultOutput

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

    public static class GetStorageSshKey 
    {
        public static Task<GetStorageSshKeyResult> InvokeAsync(GetStorageSshKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetStorageSshKeyResult> Invoke(GetStorageSshKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStorageSshKeyResult> getStorageSshKey(GetStorageSshKeyArgs args, InvokeOptions options)
    public static Output<GetStorageSshKeyResult> getStorageSshKey(GetStorageSshKeyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getStorageSshKey:getStorageSshKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    getStorageSshKey Result

    The following output properties are available:

    CreatedAt string
    ISO 8601 timestamp when the SSH key was created
    Id double
    The ID of this resource.
    Name string
    User-defined name for the SSH key
    PublicKey string
    The SSH public key content
    FindOneBy GetStorageSshKeyFindOneBy
    SshKeyId double
    CreatedAt string
    ISO 8601 timestamp when the SSH key was created
    Id float64
    The ID of this resource.
    Name string
    User-defined name for the SSH key
    PublicKey string
    The SSH public key content
    FindOneBy GetStorageSshKeyFindOneBy
    SshKeyId float64
    createdAt String
    ISO 8601 timestamp when the SSH key was created
    id Double
    The ID of this resource.
    name String
    User-defined name for the SSH key
    publicKey String
    The SSH public key content
    findOneBy GetStorageSshKeyFindOneBy
    sshKeyId Double
    createdAt string
    ISO 8601 timestamp when the SSH key was created
    id number
    The ID of this resource.
    name string
    User-defined name for the SSH key
    publicKey string
    The SSH public key content
    findOneBy GetStorageSshKeyFindOneBy
    sshKeyId number
    created_at str
    ISO 8601 timestamp when the SSH key was created
    id float
    The ID of this resource.
    name str
    User-defined name for the SSH key
    public_key str
    The SSH public key content
    find_one_by GetStorageSshKeyFindOneBy
    ssh_key_id float
    createdAt String
    ISO 8601 timestamp when the SSH key was created
    id Number
    The ID of this resource.
    name String
    User-defined name for the SSH key
    publicKey String
    The SSH public key content
    findOneBy Property Map
    sshKeyId Number

    Supporting Types

    GetStorageSshKeyFindOneBy

    OrderBy string
    Name string
    Filter by name (partial match)
    OrderBy string
    Name string
    Filter by name (partial match)
    orderBy String
    name String
    Filter by name (partial match)
    orderBy string
    name string
    Filter by name (partial match)
    order_by str
    name str
    Filter by name (partial match)
    orderBy String
    name String
    Filter by name (partial match)

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    Viewing docs for gcore 2.0.0-alpha.6
    published on Monday, Apr 27, 2026 by g-core
      Try Pulumi Cloud free. Your team will thank you.