models.secrets

Module Contents

Classes

Secret() A secret.
SecretCollection() Secrets on the Docker server.
class Secret

A secret.

__repr__()
name()
remove()

Remove this secret.

Raises:
docker.errors.APIError
If secret failed to remove.
class SecretCollection

Secrets on the Docker server.

create(**kwargs)
get(secret_id)

Get a secret.

Args:
secret_id (str): Secret ID.
Returns:
(Secret): The secret.
Raises:
docker.errors.NotFound
If the secret does not exist.
docker.errors.APIError
If the server returns an error.
list(**kwargs)

List secrets. Similar to the docker secret ls command.

Args:
filters (dict): Server-side list filtering options.
Returns:
(list of Secret): The secrets.
Raises:
docker.errors.APIError
If the server returns an error.