class documentation

class SecretApiMixin: (source)

Known subclasses: docker.api.client.APIClient

View In Hierarchy

Undocumented

Method create_secret Create a secret
Method inspect_secret Retrieve secret metadata
Method remove_secret Remove a secret
Method secrets List secrets
@utils.minimum_version('1.25')
def create_secret(self, name, data, labels=None, driver=None): (source)

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

@utils.minimum_version('1.25')
@utils.check_resource('id')
def inspect_secret(self, id): (source)

Retrieve secret metadata Args: id (string): Full ID of the secret to inspect Returns (dict): A dictionary of metadata Raises: :py:class:`docker.errors.NotFound` if no secret with that ID exists

@utils.minimum_version('1.25')
@utils.check_resource('id')
def remove_secret(self, id): (source)

Remove a secret Args: id (string): Full ID of the secret to remove Returns (boolean): True if successful Raises: :py:class:`docker.errors.NotFound` if no secret with that ID exists

@utils.minimum_version('1.25')
def secrets(self, filters=None): (source)

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