Hierarchy

Constructors

Methods

Constructors

Methods

  • Parameters

    Returns Promise<{
        id: string;
    }>

    Description

    Creates a new secret in the profile with the specified key and value.

    See

    https://help.tago.io/portal/en/kb/articles/secrets#Creating_a_Secret Creating a Secret

    Example

    If receive an error "Authorization Denied", check policy Secrets / Create in Access Management.

    const result = await Resources.secrets.create({
    key: "API_KEY",
    value: "my-secret-value"
    });
    console.log(result); // { id: 'secret-id-132 }
  • Parameters

    • secretID: string

    Returns Promise<string>

    Description

    Permanently removes a secret from the profile.

    See

    https://help.tago.io/portal/en/kb/articles/secrets Secrets

    Example

    If receive an error "Authorization Denied", check policy Secrets / delete in Access Management.

    const result = await Resources.secrets.delete("secret-id-123");
    console.log(result); // Successfully Removed
  • Parameters

    Returns Promise<string>

    Description

    Modifies the properties of an existing secret.

    See

    https://help.tago.io/portal/en/kb/articles/secrets Secrets

    Example

    If receive an error "Authorization Denied", check policy Secrets / Edit in Access Management.

    const result = await Resources.secrets.edit("secret-id-123", {
    value: "new-secret-value",
    tags: [{ key: "type", value: "user" }]
    });
    console.log(result); // Successfully Updated
  • Parameters

    • secretID: string

    Returns Promise<SecretsInfo>

    Description

    Retrieves detailed information about a specific secret using its ID.

    See

    https://help.tago.io/portal/en/kb/articles/secrets Secrets

    Example

    If receive an error "Authorization Denied", check policy Secrets / Access in Access Management.

    const secretInfo = await Resources.secrets.info("secret-id-123");
    console.log(secretInfo); // { id: 'secret-id-123', key: 'API_KEY' }
  • Parameters

    Returns Promise<SecretsInfo[]>

    Description

    Retrieves a paginated list of all secrets stored in the profile with filtering and sorting options.

    See

    https://help.tago.io/portal/en/kb/articles/secrets Secrets

    Example

    If receive an error "Authorization Denied", check policy Secrets / Access in Access Management.

    const result = await Resources.secrets.list({
    page: 1,
    fields: ["id", "key"],
    amount: 20
    });
    console.log(result); // [ { id: 'secret-id-123', key: 'API_KEY' } ]