Secret: {
    createNewVersionOfSecret(secretId: string, value: string): Promise<VersionOfSecretSkeleton>;
    createSecret(secretId: string, value: string, description: string, encoding?: string, useInPlaceholders?: boolean): Promise<SecretSkeleton>;
    createVersionOfSecret(secretId: string, value: string): Promise<VersionOfSecretSkeleton>;
    deleteSecret(secretId: string): Promise<SecretSkeleton>;
    deleteVersionOfSecret(secretId: string, version: string): Promise<VersionOfSecretSkeleton>;
    disableVersionOfSecret(secretId: string, version: string): Promise<VersionOfSecretSkeleton>;
    enableVersionOfSecret(secretId: string, version: string): Promise<VersionOfSecretSkeleton>;
    exportSecret(secretId: string, includeActiveValue?: boolean, target?: string): Promise<SecretsExportInterface>;
    exportSecrets(includeActiveValues?: boolean, target?: string): Promise<SecretsExportInterface>;
    getSecret(secretId: string): Promise<SecretSkeleton>;
    getSecretVersions(secretId: string): Promise<VersionOfSecretSkeleton[]>;
    getSecrets(): Promise<SecretSkeleton[]>;
    getVersionOfSecret(secretId: string, version: string): Promise<VersionOfSecretSkeleton>;
    importSecret(secretId: string, importData: SecretsExportInterface, includeActiveValue?: boolean, source?: string): Promise<SecretSkeleton>;
    importSecrets(importData: SecretsExportInterface, includeActiveValues?: boolean, source?: string): Promise<SecretSkeleton[]>;
    putSecret(secretId: string, value: string, description: string, encoding?: string, useInPlaceholders?: boolean): Promise<SecretSkeleton>;
    readSecret(secretId: string): Promise<SecretSkeleton>;
    readSecretValue(secretId: string, target?: string, decrypt?: boolean): Promise<any>;
    readSecretValues(secretIds: string[], target?: string, decrypt?: boolean): Promise<{
        [key: string]: string;
    }>;
    readSecrets(): Promise<SecretSkeleton[]>;
    readVersionOfSecret(secretId: string, version: string): Promise<VersionOfSecretSkeleton>;
    readVersionsOfSecret(secretId: string): Promise<VersionOfSecretSkeleton[]>;
    setSecretDescription(secretId: string, description: string): Promise<any>;
    setStatusOfVersionOfSecret(secretId: string, version: string, status: VersionOfSecretStatus): Promise<VersionOfSecretSkeleton>;
    updateSecretDescription(secretId: string, description: string): Promise<any>;
}

Type declaration

  • createNewVersionOfSecret:function
  • createSecret:function
    • Create secret

      Parameters

      • secretId: string

        secret id/name

      • value: string

        secret value

      • description: string

        secret description

      • Optional encoding: string

        secret encoding (only generic is supported)

      • Optional useInPlaceholders: boolean

        flag indicating if the secret can be used in placeholders

      Returns Promise<SecretSkeleton>

      a promise that resolves to a secret

  • createVersionOfSecret:function
  • deleteSecret:function
  • deleteVersionOfSecret:function
  • disableVersionOfSecret:function
  • enableVersionOfSecret:function
  • exportSecret:function
    • Export secret. The response can be saved to file as is.

      Parameters

      • secretId: string

        secret id/name

      • Optional includeActiveValue: boolean

        include active value of secret (default: false)

      • Optional target: string

        Host URL of target environment to encrypt secret value for

      Returns Promise<SecretsExportInterface>

      Promise resolving to a SecretsExportInterface object.

  • exportSecrets:function
    • Export all secrets

      Parameters

      • Optional includeActiveValues: boolean

        include active values of secrets (default: false)

      • Optional target: string

        Host URL of target environment to encrypt secret values for

      Returns Promise<SecretsExportInterface>

      Promise resolving to an SecretsExportInterface object.

  • getSecret:function
  • getSecretVersions:function
  • getSecrets:function
  • getVersionOfSecret:function
  • importSecret:function
    • Import secret by id

      Parameters

      • secretId: string

        secret id/name

      • importData: SecretsExportInterface

        import data

      • Optional includeActiveValue: boolean

        include active value of secret (default: false)

      • Optional source: string

        Host URL of source environment where the secret was exported from

      Returns Promise<SecretSkeleton>

      imported secret object

  • importSecrets:function
  • putSecret:function
    • Create secret

      Parameters

      • secretId: string

        secret id/name

      • value: string

        secret value

      • description: string

        secret description

      • Optional encoding: string

        secret encoding (only generic is supported)

      • Optional useInPlaceholders: boolean

        flag indicating if the secret can be used in placeholders

      Returns Promise<SecretSkeleton>

      a promise that resolves to a secret

      Deprecated

      since v2.0.0 use createSecret instead

      createSecret(secretId: string, value: string, description: string, encoding?: string, useInPlaceholders?: boolean): Promise<any>
      
  • readSecret:function
  • readSecretValue:function
    • Read the value of a secret

      Parameters

      • secretId: string

        secret id/name

      • Optional target: string

        Host URL of target environment to encrypt secret value for

      • Optional decrypt: boolean

        retrieve secret value in the clear (default: false)

      Returns Promise<any>

      a promise that resolves to the value of the secret

  • readSecretValues:function
    • Read the values of an array of secrets

      Parameters

      • secretIds: string[]

        secret id/name

      • Optional target: string

        Host URL of target environment to encrypt secret values for

      • Optional decrypt: boolean

        retrieve secret values in the clear (default: false)

      Returns Promise<{
          [key: string]: string;
      }>

      a promise that resolves to a map of secret ids and values

  • readSecrets:function
  • readVersionOfSecret:function
  • readVersionsOfSecret:function
  • setSecretDescription:function
    • Set secret description

      Parameters

      • secretId: string

        secret id/name

      • description: string

        secret description

      Returns Promise<any>

      a promise that resolves to an empty string

      Deprecated

      since v2.0.0 use updateSecretDescription instead

      updateSecretDescription(secretId: string, description: string): Promise<any>
      
  • setStatusOfVersionOfSecret:function
  • updateSecretDescription:function
    • Update secret description

      Parameters

      • secretId: string

        secret id/name

      • description: string

        secret description

      Returns Promise<any>

      a promise that resolves to an empty string