Class: Aws::Plugins::UserAgent Private

Inherits:
Seahorse::Client::Plugin show all
Defined in:
lib/aws-sdk-core/plugins/user_agent.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: Handler

Constant Summary collapse

METRICS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Aws::Json.load("  {\n    \"RESOURCE_MODEL\": \"A\",\n    \"WAITER\": \"B\",\n    \"PAGINATOR\": \"C\",\n    \"RETRY_MODE_LEGACY\": \"D\",\n    \"RETRY_MODE_STANDARD\": \"E\",\n    \"RETRY_MODE_ADAPTIVE\": \"F\",\n    \"S3_TRANSFER\": \"G\",\n    \"S3_CRYPTO_V1N\": \"H\",\n    \"S3_CRYPTO_V2\": \"I\",\n    \"S3_EXPRESS_BUCKET\": \"J\",\n    \"S3_ACCESS_GRANTS\": \"K\",\n    \"GZIP_REQUEST_COMPRESSION\": \"L\",\n    \"PROTOCOL_RPC_V2_CBOR\": \"M\",\n    \"ENDPOINT_OVERRIDE\": \"N\",\n    \"ACCOUNT_ID_ENDPOINT\": \"O\",\n    \"ACCOUNT_ID_MODE_PREFERRED\": \"P\",\n    \"ACCOUNT_ID_MODE_DISABLED\": \"Q\",\n    \"ACCOUNT_ID_MODE_REQUIRED\": \"R\",\n    \"SIGV4A_SIGNING\": \"S\",\n    \"RESOLVED_ACCOUNT_ID\": \"T\",\n    \"FLEXIBLE_CHECKSUMS_REQ_CRC32\" : \"U\",\n    \"FLEXIBLE_CHECKSUMS_REQ_CRC32C\" : \"V\",\n    \"FLEXIBLE_CHECKSUMS_REQ_CRC64\" : \"W\",\n    \"FLEXIBLE_CHECKSUMS_REQ_SHA1\" : \"X\",\n    \"FLEXIBLE_CHECKSUMS_REQ_SHA256\" : \"Y\",\n    \"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED\" : \"Z\",\n    \"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED\" : \"a\",\n    \"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED\" : \"b\",\n    \"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED\" : \"c\",\n    \"DDB_MAPPER\": \"d\",\n    \"CREDENTIALS_CODE\" : \"e\",\n    \"CREDENTIALS_ENV_VARS\" : \"g\",\n    \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\" : \"h\",\n    \"CREDENTIALS_STS_ASSUME_ROLE\" : \"i\",\n    \"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID\" : \"k\",\n    \"CREDENTIALS_PROFILE\" : \"n\",\n    \"CREDENTIALS_PROFILE_SOURCE_PROFILE\" : \"o\",\n    \"CREDENTIALS_PROFILE_NAMED_PROVIDER\" : \"p\",\n    \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\" : \"q\",\n    \"CREDENTIALS_PROFILE_SSO\" : \"r\",\n    \"CREDENTIALS_SSO\" : \"s\",\n    \"CREDENTIALS_PROFILE_SSO_LEGACY\" : \"t\",\n    \"CREDENTIALS_SSO_LEGACY\" : \"u\",\n    \"CREDENTIALS_PROFILE_PROCESS\" : \"v\",\n    \"CREDENTIALS_PROCESS\" : \"w\",\n    \"CREDENTIALS_HTTP\" : \"z\",\n    \"CREDENTIALS_IMDS\" : \"0\",\n    \"SSO_LOGIN_DEVICE\" : \"1\",\n    \"SSO_LOGIN_AUTH\" : \"2\",\n    \"BEARER_SERVICE_ENV_VARS\": \"3\",\n    \"CREDENTIALS_PROFILE_LOGIN\": \"AC\",\n    \"CREDENTIALS_LOGIN\": \"AD\"\n  }\n")

Class Method Summary collapse

Methods inherited from Seahorse::Client::Plugin

#add_handlers, #add_options, after_initialize, #after_initialize, after_initialize_hooks, #before_initialize, before_initialize, before_initialize_hooks, handlers, literal, option, options

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response, #handler_for, #new_handler

Class Method Details

.feature(_feature, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated - must exist for old service gems



84
85
86
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 84

def self.feature(_feature, &block)
  block.call
end

.metric(*metrics, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



88
89
90
91
92
93
94
95
# File 'lib/aws-sdk-core/plugins/user_agent.rb', line 88

def self.metric(*metrics, &block)
  Thread.current[:aws_sdk_core_user_agent_metric] ||= []
  metrics = metrics.map { |metric| METRICS[metric] }.compact
  Thread.current[:aws_sdk_core_user_agent_metric].concat(metrics)
  block.call
ensure
  Thread.current[:aws_sdk_core_user_agent_metric].pop(metrics.size)
end