MCPcopy Create free account
hub / github.com/aws/aws-cli / _build_feature_metadata

Method _build_feature_metadata

awscli/botocore/useragent.py:545–563  ·  view source on GitHub ↗

Build the features component of the User-Agent header string. Returns a single component with prefix "m" followed by a list of comma-separated metric values.

(self)

Source from the content-addressed store, hash-verified

543 return []
544
545 def _build_feature_metadata(self):
546 """
547 Build the features component of the User-Agent header string.
548
549 Returns a single component with prefix "m" followed by a list of
550 comma-separated metric values.
551 """
552 ctx = get_context()
553 context_features = set() if ctx is None else ctx.features
554 client_features = self._client_features or set()
555 features = client_features.union(context_features)
556 if not features:
557 return []
558 size_config = UserAgentComponentSizeConfig(1024, ',')
559 return [
560 UserAgentComponent(
561 'm', ','.join(features), size_config=size_config
562 )
563 ]
564
565 def _build_config_metadata(self):
566 """

Callers 1

to_stringMethod · 0.95

Calls 3

get_contextFunction · 0.90
UserAgentComponentClass · 0.85

Tested by

no test coverage detected