Tenants

Get allowed instance types

  • The list-instance-options command allows to fetch all the allowed instances for an entity type. Here’s how the command can be used:

    • To obtain a list of all available instances along with their corresponding instanceTypeId for workflows, we can use the following command:

      peak tenants list-instance-options --entity-type workflow
      
    • To obtain a list of all available instances along with their corresponding instanceTypeId for webapps, we can use the following command:

      peak tenants list-instance-options --entity-type webapp
      
    • Allowed values for the entity-type option are api-deployment, data-bridge, webapp, workflow, workspace.

Get data store credentials

  • The get-credentials command allows to fetch the credentials for a specific data store of the tenant. These credentials can then be used to connect to the data store.

  • The command expects an optional parameter called data-store-type. Type can only be data-warehouse for the time being which is also the default value for the parameter.

peak tenants get-credentials

Data Warehouse Credentials

  • The response contains different details depending on the type of the data warehouse.

    • For a tenant with Redshift data warehouse, the response has the following format

      {
          "connectionString": "postgresql://good-user:<password>@a-good-redshift-host.com:5439/good-db",
          "iamRole": "arn:aws:iam::<account>:role/<role>,arn:aws:iam::<account>:role/<role>",
          "port": "5439",
          "schema": "publish",
          "user": "good-user",
          "authType": "basic",
          "database": "good-db",
          "host": "a-good-redshift-host.com",
          "password": "<password>",
          "dataWarehouseType": "amazon_redshift"
      }
      
      • For a tenant with Snowflake data warehouse with Basic Auth, the response has the following format

      {
          "application": "good_app",
          "connectionString": "snowflake://user:<password>@host/database",
          "integration": "integration",
          "port": 443,
          "role": "role_name",
          "schema": "schema",
          "user": "user",
          "warehouse": "warehouse",
          "authType": "basic",
          "database": "dabase",
          "host": "host",
          "password": "<password>",
          "dataWarehouseType": "snowflake"
      }
      
      • For a tenant with Snowflake data warehouse with OAuth, the response has the following format

      {
          "application": "application",
          "connectionString": "snowflake://host/database?authenticator=OAUTH&token=<generated-access-token>",
          "integration": "integration_name",
          "port": 443,
          "role": "role_name",
          "schema": "schema",
          "warehouse": "warehouse",
          "accessToken": "<generated-access-token>",
          "authType": "oauth",
          "database": "database",
          "host": "host",
          "dataWarehouseType": "snowflake"
      }