dsh_api

Module dsh_api_client_factory

Source
Expand description

§Factory for DSH API client

This module provides factories for creating DshApiClient instances, based on the platform and the tenant’s name, group id and user id. These parameters can either be provided as function arguments, or via a set of environment variables.

§Environment variables

§DSH_API_PLATFORM

Target platform on which the tenant’s environment lives.

  • nplz - Non production landing zone
  • poc - Proof of concept platform
  • prod - Production landing zone
  • prodaz -
  • prodlz -

§DSH_API_TENANT

Tenant id for the target tenant. The target tenant is the tenant whose resources will be managed via the api.

§DSH_API_SECRET_[platform]_[tenant]

Secret api token for the target tenant. The placeholders [platform] and [tenant] need to be substituted with the platform name and the tenant name in all capitals, with hyphens (-) replaced by underscores (_).

E.g. if the platform is nplz and the tenant name is greenbox-dev, the environment variable must be DSH_API_SECRET_NPLZ_GREENBOX_DEV.

§DSH_API_GUID_[tenant]

Group id and user id for the target tenant. The placeholder [tenant] needs to be substituted with the tenant name in all capitals, with hyphens (-) replaced by underscores (_).

E.g. if the tenant name is greenbox-dev, the environment variable must be DSH_API_GUID_GREENBOX_DEV.

Structs§