1. Registry
  2. Packages
  3. Files.com
  4. API Docs
  5. getPublicKey
Viewing docs for Files.com v0.1.1
published on Thursday, Aug 20, 2026 by jschady
filescom logo
Viewing docs for Files.com v0.1.1
published on Thursday, Aug 20, 2026 by jschady

    A PublicKey is used to authenticate to Files.com via SFTP (SSH File Transfer Protocol). This method of authentication allows users to use their private key (which is never shared with Files.com) to authenticate themselves against the PublicKey stored on Files.com.

    When a user configures their PublicKey, it allows them to bypass traditional password-based authentication, leveraging the security of key-based authentication instead.

    Note that Files.com’s SSH support is limited to file operations only. While users can securely transfer files and manage their data via SFTP, they do not have access to a full shell environment for executing arbitrary commands.

    When generating new SSH keys, here are the available options: Files.com supports multiple SSH key algorithms: RSA (default 4096 bits, range 1024-4096 in 8-bit increments), DSA (1024 bits only), Ed25519 (256 bits), and ECDSA (256, 384, or 521 bits). When generating keys, the system uses these default lengths unless a specific length is specified.

    Files.com also supports importing additional key types that cannot be generated: security key types (sk-ecdsa-sha2-nistp256, sk-ssh-ed25519). RSA keys up to 8192 bits are also supported for import.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as filescom from "pulumi-filescom";
    
    const examplePublicKey = filescom.getPublicKey({
        id: 1,
    });
    
    import pulumi
    import pulumi_filescom as filescom
    
    example_public_key = filescom.get_public_key(id=1)
    
    package main
    
    import (
    	"github.com/jschady/pulumi-filescom/sdk/go/filescom"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := filescom.GetPublicKey(ctx, &filescom.LookupPublicKeyArgs{
    			Id: 1,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Filescom = Jschady.Filescom;
    
    return await Deployment.RunAsync(() => 
    {
        var examplePublicKey = Filescom.GetPublicKey.Invoke(new()
        {
            Id = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.filescom.FilescomFunctions;
    import com.pulumi.filescom.inputs.GetPublicKeyArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 examplePublicKey = FilescomFunctions.getPublicKey(GetPublicKeyArgs.builder()
                .id(1)
                .build());
    
        }
    }
    
    variables:
      examplePublicKey:
        fn::invoke:
          function: filescom:getPublicKey
          arguments:
            id: 1
    
    pulumi {
      required_providers {
        filescom = {
          source = "pulumi/filescom"
        }
      }
    }
    
    data "filescom_getpublickey" "examplePublicKey" {
      id = 1
    }
    

    Using getPublicKey

    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 getPublicKey(args: GetPublicKeyArgs, opts?: InvokeOptions): Promise<GetPublicKeyResult>
    function getPublicKeyOutput(args: GetPublicKeyOutputArgs, opts?: InvokeOutputOptions): Output<GetPublicKeyResult>
    def get_public_key(id: Optional[int] = None,
                       opts: Optional[InvokeOptions] = None) -> GetPublicKeyResult
    def get_public_key_output(id: pulumi.Input[Optional[int]] = None,
                       opts: Optional[InvokeOutputOptions] = None) -> Output[GetPublicKeyResult]
    func LookupPublicKey(ctx *Context, args *LookupPublicKeyArgs, opts ...InvokeOption) (*LookupPublicKeyResult, error)
    func LookupPublicKeyOutput(ctx *Context, args *LookupPublicKeyOutputArgs, opts ...InvokeOption) LookupPublicKeyResultOutput

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

    public static class GetPublicKey 
    {
        public static Task<GetPublicKeyResult> InvokeAsync(GetPublicKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetPublicKeyResult> Invoke(GetPublicKeyInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetPublicKeyResult> Invoke(GetPublicKeyInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetPublicKeyResult> getPublicKey(GetPublicKeyArgs args, InvokeOptions options)
    public static Output<GetPublicKeyResult> getPublicKey(GetPublicKeyArgs args, InvokeOptions options)
    public static Output<GetPublicKeyResult> getPublicKey(GetPublicKeyArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: filescom:index/getPublicKey:getPublicKey
      arguments:
        # arguments dictionary
    data "filescom_get_public_key" "name" {
        # arguments
    }

    The following arguments are supported:

    Id int
    Public key ID
    Id int
    Public key ID
    id number
    Public key ID
    id Integer
    Public key ID
    id number
    Public key ID
    id int
    Public key ID
    id Number
    Public key ID

    getPublicKey Result

    The following output properties are available:

    CreatedAt string
    Public key created at date/time
    Expired bool
    Is this public key expired?
    ExpiresAt string
    Public key expiration date/time
    Fingerprint string
    Public key fingerprint (MD5)
    FingerprintSha256 string
    Public key fingerprint (SHA256)
    GeneratedPrivateKey string
    Only returned when generating keys. Private key generated for the user.
    GeneratedPublicKey string
    Only returned when generating keys. Public key generated for the user.
    Id int
    Public key ID
    LastLoginAt string
    Key's most recent login time via SFTP
    Status string
    Only returned when generating keys. Can be invalid, not_generated, generating, complete
    Title string
    Public key title
    UserId int
    User ID this public key is associated with
    Username string
    Username of the user this public key is associated with
    WorkspaceId int
    Workspace ID (0 for default workspace).
    CreatedAt string
    Public key created at date/time
    Expired bool
    Is this public key expired?
    ExpiresAt string
    Public key expiration date/time
    Fingerprint string
    Public key fingerprint (MD5)
    FingerprintSha256 string
    Public key fingerprint (SHA256)
    GeneratedPrivateKey string
    Only returned when generating keys. Private key generated for the user.
    GeneratedPublicKey string
    Only returned when generating keys. Public key generated for the user.
    Id int
    Public key ID
    LastLoginAt string
    Key's most recent login time via SFTP
    Status string
    Only returned when generating keys. Can be invalid, not_generated, generating, complete
    Title string
    Public key title
    UserId int
    User ID this public key is associated with
    Username string
    Username of the user this public key is associated with
    WorkspaceId int
    Workspace ID (0 for default workspace).
    created_at string
    Public key created at date/time
    expired bool
    Is this public key expired?
    expires_at string
    Public key expiration date/time
    fingerprint string
    Public key fingerprint (MD5)
    fingerprint_sha256 string
    Public key fingerprint (SHA256)
    generated_private_key string
    Only returned when generating keys. Private key generated for the user.
    generated_public_key string
    Only returned when generating keys. Public key generated for the user.
    id number
    Public key ID
    last_login_at string
    Key's most recent login time via SFTP
    status string
    Only returned when generating keys. Can be invalid, not_generated, generating, complete
    title string
    Public key title
    user_id number
    User ID this public key is associated with
    username string
    Username of the user this public key is associated with
    workspace_id number
    Workspace ID (0 for default workspace).
    createdAt String
    Public key created at date/time
    expired Boolean
    Is this public key expired?
    expiresAt String
    Public key expiration date/time
    fingerprint String
    Public key fingerprint (MD5)
    fingerprintSha256 String
    Public key fingerprint (SHA256)
    generatedPrivateKey String
    Only returned when generating keys. Private key generated for the user.
    generatedPublicKey String
    Only returned when generating keys. Public key generated for the user.
    id Integer
    Public key ID
    lastLoginAt String
    Key's most recent login time via SFTP
    status String
    Only returned when generating keys. Can be invalid, not_generated, generating, complete
    title String
    Public key title
    userId Integer
    User ID this public key is associated with
    username String
    Username of the user this public key is associated with
    workspaceId Integer
    Workspace ID (0 for default workspace).
    createdAt string
    Public key created at date/time
    expired boolean
    Is this public key expired?
    expiresAt string
    Public key expiration date/time
    fingerprint string
    Public key fingerprint (MD5)
    fingerprintSha256 string
    Public key fingerprint (SHA256)
    generatedPrivateKey string
    Only returned when generating keys. Private key generated for the user.
    generatedPublicKey string
    Only returned when generating keys. Public key generated for the user.
    id number
    Public key ID
    lastLoginAt string
    Key's most recent login time via SFTP
    status string
    Only returned when generating keys. Can be invalid, not_generated, generating, complete
    title string
    Public key title
    userId number
    User ID this public key is associated with
    username string
    Username of the user this public key is associated with
    workspaceId number
    Workspace ID (0 for default workspace).
    created_at str
    Public key created at date/time
    expired bool
    Is this public key expired?
    expires_at str
    Public key expiration date/time
    fingerprint str
    Public key fingerprint (MD5)
    fingerprint_sha256 str
    Public key fingerprint (SHA256)
    generated_private_key str
    Only returned when generating keys. Private key generated for the user.
    generated_public_key str
    Only returned when generating keys. Public key generated for the user.
    id int
    Public key ID
    last_login_at str
    Key's most recent login time via SFTP
    status str
    Only returned when generating keys. Can be invalid, not_generated, generating, complete
    title str
    Public key title
    user_id int
    User ID this public key is associated with
    username str
    Username of the user this public key is associated with
    workspace_id int
    Workspace ID (0 for default workspace).
    createdAt String
    Public key created at date/time
    expired Boolean
    Is this public key expired?
    expiresAt String
    Public key expiration date/time
    fingerprint String
    Public key fingerprint (MD5)
    fingerprintSha256 String
    Public key fingerprint (SHA256)
    generatedPrivateKey String
    Only returned when generating keys. Private key generated for the user.
    generatedPublicKey String
    Only returned when generating keys. Public key generated for the user.
    id Number
    Public key ID
    lastLoginAt String
    Key's most recent login time via SFTP
    status String
    Only returned when generating keys. Can be invalid, not_generated, generating, complete
    title String
    Public key title
    userId Number
    User ID this public key is associated with
    username String
    Username of the user this public key is associated with
    workspaceId Number
    Workspace ID (0 for default workspace).

    Package Details

    Repository
    filescom jschady/pulumi-filescom
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the filescom Terraform Provider.
    filescom logo
    Viewing docs for Files.com v0.1.1
    published on Thursday, Aug 20, 2026 by jschady

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial