Secret
- class perses_api.secret.GlobalSecret[source]
Bases:
SecretBaseThe class includes all necessary methods to access the Perses global secrets API
- Parameters:
perses_api_model (APIModel) – Inject a Perses API model object that includes all necessary values and information
- class perses_api.secret.ProjectSecret[source]
Bases:
SecretBaseThe class includes all necessary methods to access the Perses project-scoped secrets API
- Parameters:
- class perses_api.secret.SecretBase[source]
Bases:
ResourceBaseThe class includes all necessary base methods to access the Perses secrets API
- Parameters:
perses_api_model (APIModel) – Inject a Perses API model object that includes all necessary values and information
- create_secret(secret) dict[source]
The method includes a functionality to create a new secret
- Parameters:
secret (Secret | GlobalSecret) – Specify the secret resource to create
- Raises:
Exception – Unspecified error by executing the API call
- Returns:
The created secret dict
- Return type:
- delete_secret(name: str) None[source]
The method includes a functionality to delete a secret by name
- Parameters:
name (str) – Specify the name of the secret to delete
- Raises:
ValueError – Missed specifying a necessary value
- get_secret(name: str) dict[source]
The method includes a functionality to retrieve a single secret by name
- Parameters:
name (str) – Specify the name of the secret to retrieve
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The secret dict
- Return type:
- get_secrets(name: str = None) list[source]
The method includes a functionality to retrieve all secrets
- update_secret(name: str, secret) dict[source]
The method includes a functionality to update an existing secret by name
- Parameters:
name (str) – Specify the name of the secret to update
secret (Secret | GlobalSecret) – Specify the updated secret resource
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The updated secret dict
- Return type: