api.secret

Module Contents

Classes

SecretApiMixin()
class SecretApiMixin
create_secret(name, data, labels=None, driver=None)

Create a secret

Args:

name (string): Name of the secret data (bytes): Secret data to be stored labels (dict): A mapping of labels to assign to the secret driver (DriverConfig): A custom driver configuration. If

unspecified, the default internal driver will be used

Returns (dict): ID of the newly created secret

inspect_secret(id)

Retrieve secret metadata

Args:
id (string): Full ID of the secret to remove

Returns (dict): A dictionary of metadata

Raises:
docker.errors.NotFound
if no secret with that ID exists
remove_secret(id)

Remove a secret

Args:
id (string): Full ID of the secret to remove

Returns (boolean): True if successful

Raises:
docker.errors.NotFound
if no secret with that ID exists
secrets(filters=None)

List secrets

Args:
filters (dict): A map of filters to process on the secrets list. Available filters: names

Returns (list): A list of secrets