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

Method create_from_metadata

awscli/botocore/credentials.py:440–464  ·  view source on GitHub ↗
(
        cls,
        metadata,
        refresh_using,
        method,
        advisory_timeout=None,
        mandatory_timeout=None,
    )

Source from the content-addressed store, hash-verified

438
439 @classmethod
440 def create_from_metadata(
441 cls,
442 metadata,
443 refresh_using,
444 method,
445 advisory_timeout=None,
446 mandatory_timeout=None,
447 ):
448 kwargs = {}
449 if advisory_timeout is not None:
450 kwargs['advisory_timeout'] = advisory_timeout
451 if mandatory_timeout is not None:
452 kwargs['mandatory_timeout'] = mandatory_timeout
453
454 instance = cls(
455 access_key=metadata['access_key'],
456 secret_key=metadata['secret_key'],
457 token=metadata['token'],
458 expiry_time=cls._expiry_datetime(metadata['expiry_time']),
459 method=method,
460 refresh_using=refresh_using,
461 account_id=metadata.get('account_id'),
462 **kwargs,
463 )
464 return instance
465
466 @property
467 def access_key(self):

Callers 3

loadMethod · 0.80
loadMethod · 0.80
get_credentialsMethod · 0.80

Calls 1

_expiry_datetimeMethod · 0.80

Tested by

no test coverage detected