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

Method _build_extra

awscli/botocore/useragent.py:600–624  ·  view source on GitHub ↗

User agent string components based on legacy "extra" settings. Creates components from the session-level and client-level ``user_agent_extra`` setting, if present. Both are passed through verbatim and should be appended at the end of the string. Preferred ways to in

(self)

Source from the content-addressed store, hash-verified

598 return []
599
600 def _build_extra(self):
601 """User agent string components based on legacy "extra" settings.
602
603 Creates components from the session-level and client-level
604 ``user_agent_extra`` setting, if present. Both are passed through
605 verbatim and should be appended at the end of the string.
606
607 Preferred ways to inject application-specific information into
608 botocore's User-Agent header string are the ``user_agent_appid` field
609 in :py:class:`botocore.config.Config`. The ``AWS_SDK_UA_APP_ID``
610 environment variable and the ``sdk_ua_app_id`` configuration file
611 setting are alternative ways to set the ``user_agent_appid`` config.
612 """
613 extra = []
614 if self._session_user_agent_extra:
615 extra.append(
616 RawStringUserAgentComponent(self._session_user_agent_extra)
617 )
618 if self._client_config and self._client_config.user_agent_extra:
619 extra.append(
620 RawStringUserAgentComponent(
621 self._client_config.user_agent_extra
622 )
623 )
624 return extra
625
626 def _build_legacy_ua_string(self, config_ua_override):
627 components = [config_ua_override]

Callers 1

to_stringMethod · 0.95

Calls 1

Tested by

no test coverage detected