MCPcopy Index your code
hub / github.com/aws/aws-cli / full_config

Method full_config

awscli/botocore/session.py:384–417  ·  view source on GitHub ↗

Return the parsed config file. The ``get_config`` method returns the config associated with the specified profile. This property returns the contents of the **entire** config file. :rtype: dict

(self)

Source from the content-addressed store, hash-verified

382
383 @property
384 def full_config(self):
385 """Return the parsed config file.
386
387 The ``get_config`` method returns the config associated with the
388 specified profile. This property returns the contents of the
389 **entire** config file.
390
391 :rtype: dict
392 """
393 if self._config is None:
394 try:
395 config_file = self.get_config_variable('config_file')
396 self._config = botocore.configloader.load_config(config_file)
397 except ConfigNotFound:
398 self._config = {'profiles': {}}
399 try:
400 # Now we need to inject the profiles from the
401 # credentials file. We don't actually need the values
402 # in the creds file, only the profile names so that we
403 # can validate the user is not referring to a nonexistent
404 # profile.
405 cred_file = self.get_config_variable('credentials_file')
406 cred_profiles = botocore.configloader.raw_config_parse(
407 cred_file
408 )
409 for profile in cred_profiles:
410 cred_vars = cred_profiles[profile]
411 if profile not in self._config['profiles']:
412 self._config['profiles'][profile] = cred_vars
413 else:
414 self._config['profiles'][profile].update(cred_vars)
415 except ConfigNotFound:
416 pass
417 return self._config
418
419 def get_default_client_config(self):
420 """Retrieves the default config for creating clients

Callers

nothing calls this directly

Calls 3

get_config_variableMethod · 0.95
load_configMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected