Secrets#
Do not construct this object directly, instead access the
secrets property of an ngrok.Client object.
- class ngrok.services.SecretsClient(client)[source]#
Secrets is an api service for securely storing and managing sensitive data such as secrets, credentials, and tokens.
- create(name='', value='', metadata='', description='', vault_id='', vault_name='')[source]#
Create a new Secret
- Parameters:
name (
str) – Name of secretvalue (
str) – Value of secretmetadata (
str) – Arbitrary user-defined metadata for this Secretdescription (
str) – description of Secretvault_id (
str) – unique identifier of the referenced vaultvault_name (
str) – name of the referenced vault
https://ngrok.com/docs/api#api-secrets-create
- Return type:
- get(id)[source]#
Get a Secret by ID
- Parameters:
id (
str) – a resource identifier
https://ngrok.com/docs/api#api-secrets-get
- Return type:
- list(before_id=None, limit=None, filter=None)[source]#
List all Secrets owned by account
- Parameters:
before_id (
str) – Expects a resource ID as its input. Returns earlier entries in the result set, sorted by ID.limit (
str) – Constrains the number of results in the dataset. See the API Overview for details.filter (
str) – A CEL expression to filter the list results. Supports logical and comparison operators to match on fields such asid,metadata,created_at, and more. See ngrok API Filtering for syntax and field details: https://ngrok.com/docs/api/api-filtering.
https://ngrok.com/docs/api#api-secrets-list
- Return type:
- update(id, name=None, value=None, metadata=None, description=None)[source]#
Update an existing Secret by ID
- Parameters:
id (
str) – identifier for Secretname (
str) – Name of secretvalue (
str) – Value of secretmetadata (
str) – Arbitrary user-defined metadata for this Secretdescription (
str) – description of Secret
https://ngrok.com/docs/api#api-secrets-update
- Return type: