MCPcopy Create free account
hub / github.com/docker/docker-py / get

Method get

docker/models/secrets.py:37–53  ·  view source on GitHub ↗

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`

(self, secret_id)

Source from the content-addressed store, hash-verified

35 create.__doc__ = APIClient.create_secret.__doc__
36
37 def get(self, secret_id):
38 """
39 Get a secret.
40
41 Args:
42 secret_id (str): Secret ID.
43
44 Returns:
45 (:py:class:`Secret`): The secret.
46
47 Raises:
48 :py:class:`docker.errors.NotFound`
49 If the secret does not exist.
50 :py:class:`docker.errors.APIError`
51 If the server returns an error.
52 """
53 return self.prepare_model(self.client.api.inspect_secret(secret_id))
54
55 def list(self, **kwargs):
56 """

Callers 1

createMethod · 0.45

Calls 2

prepare_modelMethod · 0.80
inspect_secretMethod · 0.80

Tested by

no test coverage detected