MCPcopy
hub / github.com/docker/docker-py / get

Method get

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

Get a config. Args: config_id (str): Config ID. Returns: (:py:class:`Config`): The config. Raises: :py:class:`docker.errors.NotFound` If the config does not exist. :py:class:`docker.errors.APIError`

(self, config_id)

Source from the content-addressed store, hash-verified

35 create.__doc__ = APIClient.create_config.__doc__
36
37 def get(self, config_id):
38 """
39 Get a config.
40
41 Args:
42 config_id (str): Config ID.
43
44 Returns:
45 (:py:class:`Config`): The config.
46
47 Raises:
48 :py:class:`docker.errors.NotFound`
49 If the config 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_config(config_id))
54
55 def list(self, **kwargs):
56 """

Callers 1

createMethod · 0.45

Calls 2

prepare_modelMethod · 0.80
inspect_configMethod · 0.80

Tested by

no test coverage detected