class documentation

class SecretCollection(Collection): (source)

View In Hierarchy

Secrets on the Docker server.

Method create Undocumented
Method get Get a secret.
Method list List secrets. Similar to the ``docker secret ls`` command.

Inherited from Collection:

Method __call__ Undocumented
Method __init__ Undocumented
Method prepare_model Create a model from a set of attributes.
Class Variable model Undocumented
Instance Variable client Undocumented
def create(self, **kwargs): (source)
def get(self, secret_id): (source)

Get a secret. Args: secret_id (str): Secret ID. Returns: (:py:class:`Secret`): The secret. Raises: :py:class:`docker.errors.NotFound` If the secret does not exist. :py:class:`docker.errors.APIError` If the server returns an error.

def list(self, **kwargs): (source)

List secrets. Similar to the ``docker secret ls`` command. Args: filters (dict): Server-side list filtering options. Returns: (list of :py:class:`Secret`): The secrets. Raises: :py:class:`docker.errors.APIError` If the server returns an error.