1. Registry
  2. Packages
  3. Files.com
  4. API Docs
  5. Secret
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 Secret stores named, typed secret material for later use by features that reference the Secret by ID.

    Secret values are encrypted at rest and are write-only. API responses include metadata and configured value field names, but never include the stored secret values.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as filescom from "pulumi-filescom";
    
    const exampleSecret = new filescom.Secret("example_secret", {
        name: "Production API token",
        description: "Used by production API integrations.",
        secretType: "token",
        metadata: {
            key: "example value",
        },
        workspaceId: 0,
    });
    
    import pulumi
    import pulumi_filescom as filescom
    
    example_secret = filescom.Secret("example_secret",
        name="Production API token",
        description="Used by production API integrations.",
        secret_type="token",
        metadata={
            "key": "example value",
        },
        workspace_id=0)
    
    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.NewSecret(ctx, "example_secret", &filescom.SecretArgs{
    			Name:        pulumi.String("Production API token"),
    			Description: pulumi.String("Used by production API integrations."),
    			SecretType:  pulumi.String("token"),
    			Metadata: pulumi.Any(map[string]interface{}{
    				"key": "example value",
    			}),
    			WorkspaceId: pulumi.Int(0),
    		})
    		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 exampleSecret = new Filescom.Secret("example_secret", new()
        {
            Name = "Production API token",
            Description = "Used by production API integrations.",
            SecretType = "token",
            Metadata = new Dictionary<string, object?>
            {
                ["key"] = "example value",
            },
            WorkspaceId = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.filescom.Secret;
    import com.pulumi.filescom.SecretArgs;
    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) {
            var exampleSecret = new Secret("exampleSecret", SecretArgs.builder()
                .name("Production API token")
                .description("Used by production API integrations.")
                .secretType("token")
                .metadata(Map.of("key", "example value"))
                .workspaceId(0)
                .build());
    
        }
    }
    
    resources:
      exampleSecret:
        type: filescom:Secret
        name: example_secret
        properties:
          name: Production API token
          description: Used by production API integrations.
          secretType: token
          metadata:
            key: example value
          workspaceId: 0
    
    pulumi {
      required_providers {
        filescom = {
          source = "pulumi/filescom"
        }
      }
    }
    
    resource "filescom_secret" "example_secret" {
      name        = "Production API token"
      description = "Used by production API integrations."
      secret_type = "token"
      metadata = {
        "key" = "example value"
      }
      workspace_id = 0
    }
    

    Create Secret Resource

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

    Constructor syntax

    new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);
    @overload
    def Secret(resource_name: str,
               args: SecretArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Secret(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               secret_type: Optional[str] = None,
               description: Optional[str] = None,
               metadata: Optional[Any] = None,
               name: Optional[str] = None,
               workspace_id: Optional[int] = None)
    func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)
    public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
    public Secret(String name, SecretArgs args)
    public Secret(String name, SecretArgs args, CustomResourceOptions options)
    
    type: filescom:Secret
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "filescom_secret" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SecretArgs
    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 SecretArgs
    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 SecretArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var secretResource = new Filescom.Secret("secretResource", new()
    {
        SecretType = "string",
        Description = "string",
        Metadata = "any",
        Name = "string",
        WorkspaceId = 0,
    });
    
    example, err := filescom.NewSecret(ctx, "secretResource", &filescom.SecretArgs{
    	SecretType:  pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Metadata:    pulumi.Any("any"),
    	Name:        pulumi.String("string"),
    	WorkspaceId: pulumi.Int(0),
    })
    
    resource "filescom_secret" "secretResource" {
      lifecycle {
        create_before_destroy = true
      }
      secret_type  = "string"
      description  = "string"
      metadata     = "any"
      name         = "string"
      workspace_id = 0
    }
    
    var secretResource = new Secret("secretResource", SecretArgs.builder()
        .secretType("string")
        .description("string")
        .metadata("any")
        .name("string")
        .workspaceId(0)
        .build());
    
    secret_resource = filescom.Secret("secretResource",
        secret_type="string",
        description="string",
        metadata="any",
        name="string",
        workspace_id=0)
    
    const secretResource = new filescom.Secret("secretResource", {
        secretType: "string",
        description: "string",
        metadata: "any",
        name: "string",
        workspaceId: 0,
    });
    
    type: filescom:Secret
    properties:
        description: string
        metadata: any
        name: string
        secretType: string
        workspaceId: 0
    

    Secret Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Secret resource accepts the following input properties:

    SecretType string
    Secret type.
    Description string
    Internal description for your reference.
    Metadata object
    Non-secret metadata for the Secret type.
    Name string
    Secret name.
    WorkspaceId int
    Workspace ID. 0 means the default workspace.
    SecretType string
    Secret type.
    Description string
    Internal description for your reference.
    Metadata interface{}
    Non-secret metadata for the Secret type.
    Name string
    Secret name.
    WorkspaceId int
    Workspace ID. 0 means the default workspace.
    secret_type string
    Secret type.
    description string
    Internal description for your reference.
    metadata any
    Non-secret metadata for the Secret type.
    name string
    Secret name.
    workspace_id number
    Workspace ID. 0 means the default workspace.
    secretType String
    Secret type.
    description String
    Internal description for your reference.
    metadata Object
    Non-secret metadata for the Secret type.
    name String
    Secret name.
    workspaceId Integer
    Workspace ID. 0 means the default workspace.
    secretType string
    Secret type.
    description string
    Internal description for your reference.
    metadata any
    Non-secret metadata for the Secret type.
    name string
    Secret name.
    workspaceId number
    Workspace ID. 0 means the default workspace.
    secret_type str
    Secret type.
    description str
    Internal description for your reference.
    metadata Any
    Non-secret metadata for the Secret type.
    name str
    Secret name.
    workspace_id int
    Workspace ID. 0 means the default workspace.
    secretType String
    Secret type.
    description String
    Internal description for your reference.
    metadata Any
    Non-secret metadata for the Secret type.
    name String
    Secret name.
    workspaceId Number
    Workspace ID. 0 means the default workspace.

    Outputs

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

    CreatedAt string
    Secret create date/time.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    Secret update date/time.
    ValueFieldNames List<string>
    Names of configured secret value fields. Secret values are never returned.
    CreatedAt string
    Secret create date/time.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdatedAt string
    Secret update date/time.
    ValueFieldNames []string
    Names of configured secret value fields. Secret values are never returned.
    created_at string
    Secret create date/time.
    id string
    The provider-assigned unique ID for this managed resource.
    updated_at string
    Secret update date/time.
    value_field_names list(string)
    Names of configured secret value fields. Secret values are never returned.
    createdAt String
    Secret create date/time.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    Secret update date/time.
    valueFieldNames List<String>
    Names of configured secret value fields. Secret values are never returned.
    createdAt string
    Secret create date/time.
    id string
    The provider-assigned unique ID for this managed resource.
    updatedAt string
    Secret update date/time.
    valueFieldNames string[]
    Names of configured secret value fields. Secret values are never returned.
    created_at str
    Secret create date/time.
    id str
    The provider-assigned unique ID for this managed resource.
    updated_at str
    Secret update date/time.
    value_field_names Sequence[str]
    Names of configured secret value fields. Secret values are never returned.
    createdAt String
    Secret create date/time.
    id String
    The provider-assigned unique ID for this managed resource.
    updatedAt String
    Secret update date/time.
    valueFieldNames List<String>
    Names of configured secret value fields. Secret values are never returned.

    Look up Existing Secret Resource

    Get an existing Secret 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?: SecretState, opts?: CustomResourceOptions): Secret
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            description: Optional[str] = None,
            metadata: Optional[Any] = None,
            name: Optional[str] = None,
            secret_type: Optional[str] = None,
            updated_at: Optional[str] = None,
            value_field_names: Optional[Sequence[str]] = None,
            workspace_id: Optional[int] = None) -> Secret
    func GetSecret(ctx *Context, name string, id IDInput, state *SecretState, opts ...ResourceOption) (*Secret, error)
    public static Secret Get(string name, Input<string> id, SecretState? state, CustomResourceOptions? opts = null)
    public static Secret get(String name, Output<String> id, SecretState state, CustomResourceOptions options)
    resources:  _:    type: filescom:Secret    get:      id: ${id}
    import {
      to = filescom_secret.example
      id = "${id}"
    }
    
    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
    Secret create date/time.
    Description string
    Internal description for your reference.
    Metadata object
    Non-secret metadata for the Secret type.
    Name string
    Secret name.
    SecretType string
    Secret type.
    UpdatedAt string
    Secret update date/time.
    ValueFieldNames List<string>
    Names of configured secret value fields. Secret values are never returned.
    WorkspaceId int
    Workspace ID. 0 means the default workspace.
    CreatedAt string
    Secret create date/time.
    Description string
    Internal description for your reference.
    Metadata interface{}
    Non-secret metadata for the Secret type.
    Name string
    Secret name.
    SecretType string
    Secret type.
    UpdatedAt string
    Secret update date/time.
    ValueFieldNames []string
    Names of configured secret value fields. Secret values are never returned.
    WorkspaceId int
    Workspace ID. 0 means the default workspace.
    created_at string
    Secret create date/time.
    description string
    Internal description for your reference.
    metadata any
    Non-secret metadata for the Secret type.
    name string
    Secret name.
    secret_type string
    Secret type.
    updated_at string
    Secret update date/time.
    value_field_names list(string)
    Names of configured secret value fields. Secret values are never returned.
    workspace_id number
    Workspace ID. 0 means the default workspace.
    createdAt String
    Secret create date/time.
    description String
    Internal description for your reference.
    metadata Object
    Non-secret metadata for the Secret type.
    name String
    Secret name.
    secretType String
    Secret type.
    updatedAt String
    Secret update date/time.
    valueFieldNames List<String>
    Names of configured secret value fields. Secret values are never returned.
    workspaceId Integer
    Workspace ID. 0 means the default workspace.
    createdAt string
    Secret create date/time.
    description string
    Internal description for your reference.
    metadata any
    Non-secret metadata for the Secret type.
    name string
    Secret name.
    secretType string
    Secret type.
    updatedAt string
    Secret update date/time.
    valueFieldNames string[]
    Names of configured secret value fields. Secret values are never returned.
    workspaceId number
    Workspace ID. 0 means the default workspace.
    created_at str
    Secret create date/time.
    description str
    Internal description for your reference.
    metadata Any
    Non-secret metadata for the Secret type.
    name str
    Secret name.
    secret_type str
    Secret type.
    updated_at str
    Secret update date/time.
    value_field_names Sequence[str]
    Names of configured secret value fields. Secret values are never returned.
    workspace_id int
    Workspace ID. 0 means the default workspace.
    createdAt String
    Secret create date/time.
    description String
    Internal description for your reference.
    metadata Any
    Non-secret metadata for the Secret type.
    name String
    Secret name.
    secretType String
    Secret type.
    updatedAt String
    Secret update date/time.
    valueFieldNames List<String>
    Names of configured secret value fields. Secret values are never returned.
    workspaceId Number
    Workspace ID. 0 means the default workspace.

    Import

    The pulumi import command can be used, for example:

    Secrets can be imported by specifying the id.

    $ pulumi import filescom:index/secret:Secret example_secret 1
    

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

    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