aws-sdk-core 3.201.5 → 3.205.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +54 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +1 -0
- data/lib/aws-sdk-core/plugins/stub_responses.rb +29 -2
- data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
- data/lib/aws-sdk-core/plugins/user_agent.rb +12 -8
- data/lib/aws-sdk-core/rpc_v2/handler.rb +5 -1
- data/lib/aws-sdk-core/telemetry/base.rb +177 -0
- data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
- data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
- data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
- data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
- data/lib/aws-sdk-core/telemetry.rb +78 -0
- data/lib/aws-sdk-core.rb +2 -12
- data/lib/aws-sdk-sso/client.rb +25 -2
- data/lib/aws-sdk-sso/endpoints.rb +4 -16
- data/lib/aws-sdk-sso/plugins/endpoints.rb +10 -1
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +25 -2
- data/lib/aws-sdk-ssooidc/endpoints.rb +4 -16
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +10 -1
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +25 -2
- data/lib/aws-sdk-sts/endpoints.rb +8 -32
- data/lib/aws-sdk-sts/plugins/endpoints.rb +10 -1
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/h2/handler.rb +13 -3
- data/lib/seahorse/client/net_http/connection_pool.rb +8 -2
- data/lib/seahorse/client/net_http/handler.rb +18 -1
- data/lib/seahorse/client/plugins/net_http.rb +9 -0
- data/lib/seahorse/client/request_context.rb +8 -1
- data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
- data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
- data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
- data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
- metadata +13 -2
| @@ -14,56 +14,44 @@ module Aws::SSOOIDC | |
| 14 14 |  | 
| 15 15 | 
             
                class CreateToken
         | 
| 16 16 | 
             
                  def self.build(context)
         | 
| 17 | 
            -
                    unless context.config.regional_endpoint
         | 
| 18 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 19 | 
            -
                    end
         | 
| 20 17 | 
             
                    Aws::SSOOIDC::EndpointParameters.new(
         | 
| 21 18 | 
             
                      region: context.config.region,
         | 
| 22 19 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 23 20 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 24 | 
            -
                      endpoint: endpoint,
         | 
| 21 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 25 22 | 
             
                    )
         | 
| 26 23 | 
             
                  end
         | 
| 27 24 | 
             
                end
         | 
| 28 25 |  | 
| 29 26 | 
             
                class CreateTokenWithIAM
         | 
| 30 27 | 
             
                  def self.build(context)
         | 
| 31 | 
            -
                    unless context.config.regional_endpoint
         | 
| 32 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 33 | 
            -
                    end
         | 
| 34 28 | 
             
                    Aws::SSOOIDC::EndpointParameters.new(
         | 
| 35 29 | 
             
                      region: context.config.region,
         | 
| 36 30 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 37 31 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 38 | 
            -
                      endpoint: endpoint,
         | 
| 32 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 39 33 | 
             
                    )
         | 
| 40 34 | 
             
                  end
         | 
| 41 35 | 
             
                end
         | 
| 42 36 |  | 
| 43 37 | 
             
                class RegisterClient
         | 
| 44 38 | 
             
                  def self.build(context)
         | 
| 45 | 
            -
                    unless context.config.regional_endpoint
         | 
| 46 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 47 | 
            -
                    end
         | 
| 48 39 | 
             
                    Aws::SSOOIDC::EndpointParameters.new(
         | 
| 49 40 | 
             
                      region: context.config.region,
         | 
| 50 41 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 51 42 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 52 | 
            -
                      endpoint: endpoint,
         | 
| 43 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 53 44 | 
             
                    )
         | 
| 54 45 | 
             
                  end
         | 
| 55 46 | 
             
                end
         | 
| 56 47 |  | 
| 57 48 | 
             
                class StartDeviceAuthorization
         | 
| 58 49 | 
             
                  def self.build(context)
         | 
| 59 | 
            -
                    unless context.config.regional_endpoint
         | 
| 60 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 61 | 
            -
                    end
         | 
| 62 50 | 
             
                    Aws::SSOOIDC::EndpointParameters.new(
         | 
| 63 51 | 
             
                      region: context.config.region,
         | 
| 64 52 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 65 53 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 66 | 
            -
                      endpoint: endpoint,
         | 
| 54 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 67 55 | 
             
                    )
         | 
| 68 56 | 
             
                  end
         | 
| 69 57 | 
             
                end
         | 
| @@ -40,11 +40,20 @@ module Aws::SSOOIDC | |
| 40 40 | 
             
                      context[:auth_scheme] =
         | 
| 41 41 | 
             
                        Aws::Endpoints.resolve_auth_scheme(context, endpoint)
         | 
| 42 42 |  | 
| 43 | 
            -
                      @handler.call(context)
         | 
| 43 | 
            +
                      with_metrics(context) { @handler.call(context) }
         | 
| 44 44 | 
             
                    end
         | 
| 45 45 |  | 
| 46 46 | 
             
                    private
         | 
| 47 47 |  | 
| 48 | 
            +
                    def with_metrics(context, &block)
         | 
| 49 | 
            +
                      metrics = []
         | 
| 50 | 
            +
                      metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
         | 
| 51 | 
            +
                      if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
         | 
| 52 | 
            +
                        metrics << 'SIGV4A_SIGNING'
         | 
| 53 | 
            +
                      end
         | 
| 54 | 
            +
                      Aws::Plugins::UserAgent.metric(*metrics, &block)
         | 
| 55 | 
            +
                    end
         | 
| 56 | 
            +
             | 
| 48 57 | 
             
                    def apply_endpoint_headers(context, headers)
         | 
| 49 58 | 
             
                      headers.each do |key, values|
         | 
| 50 59 | 
             
                        value = values
         | 
    
        data/lib/aws-sdk-ssooidc.rb
    CHANGED
    
    
    
        data/lib/aws-sdk-sts/client.rb
    CHANGED
    
    | @@ -32,6 +32,7 @@ require 'aws-sdk-core/plugins/checksum_algorithm.rb' | |
| 32 32 | 
             
            require 'aws-sdk-core/plugins/request_compression.rb'
         | 
| 33 33 | 
             
            require 'aws-sdk-core/plugins/defaults_mode.rb'
         | 
| 34 34 | 
             
            require 'aws-sdk-core/plugins/recursion_detection.rb'
         | 
| 35 | 
            +
            require 'aws-sdk-core/plugins/telemetry.rb'
         | 
| 35 36 | 
             
            require 'aws-sdk-core/plugins/sign.rb'
         | 
| 36 37 | 
             
            require 'aws-sdk-core/plugins/protocols/query.rb'
         | 
| 37 38 | 
             
            require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
         | 
| @@ -84,6 +85,7 @@ module Aws::STS | |
| 84 85 | 
             
                add_plugin(Aws::Plugins::RequestCompression)
         | 
| 85 86 | 
             
                add_plugin(Aws::Plugins::DefaultsMode)
         | 
| 86 87 | 
             
                add_plugin(Aws::Plugins::RecursionDetection)
         | 
| 88 | 
            +
                add_plugin(Aws::Plugins::Telemetry)
         | 
| 87 89 | 
             
                add_plugin(Aws::Plugins::Sign)
         | 
| 88 90 | 
             
                add_plugin(Aws::Plugins::Protocols::Query)
         | 
| 89 91 | 
             
                add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
         | 
| @@ -337,6 +339,16 @@ module Aws::STS | |
| 337 339 | 
             
                #     ** Please note ** When response stubbing is enabled, no HTTP
         | 
| 338 340 | 
             
                #     requests are made, and retries are disabled.
         | 
| 339 341 | 
             
                #
         | 
| 342 | 
            +
                #   @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
         | 
| 343 | 
            +
                #     Allows you to provide a telemetry provider, which is used to
         | 
| 344 | 
            +
                #     emit telemetry data. By default, uses `NoOpTelemetryProvider` which
         | 
| 345 | 
            +
                #     will not record or emit any telemetry data. The SDK supports the
         | 
| 346 | 
            +
                #     following telemetry providers:
         | 
| 347 | 
            +
                #
         | 
| 348 | 
            +
                #     * OpenTelemetry (OTel) - To use the OTel provider, install and require the
         | 
| 349 | 
            +
                #     `opentelemetry-sdk` gem and then, pass in an instance of a
         | 
| 350 | 
            +
                #     `Aws::Telemetry::OTelProvider` for telemetry provider.
         | 
| 351 | 
            +
                #
         | 
| 340 352 | 
             
                #   @option options [Aws::TokenProvider] :token_provider
         | 
| 341 353 | 
             
                #     A Bearer Token Provider. This can be an instance of any one of the
         | 
| 342 354 | 
             
                #     following classes:
         | 
| @@ -420,6 +432,12 @@ module Aws::STS | |
| 420 432 | 
             
                #   @option options [String] :ssl_ca_store
         | 
| 421 433 | 
             
                #     Sets the X509::Store to verify peer certificate.
         | 
| 422 434 | 
             
                #
         | 
| 435 | 
            +
                #   @option options [OpenSSL::X509::Certificate] :ssl_cert
         | 
| 436 | 
            +
                #     Sets a client certificate when creating http connections.
         | 
| 437 | 
            +
                #
         | 
| 438 | 
            +
                #   @option options [OpenSSL::PKey] :ssl_key
         | 
| 439 | 
            +
                #     Sets a client key when creating http connections.
         | 
| 440 | 
            +
                #
         | 
| 423 441 | 
             
                #   @option options [Float] :ssl_timeout
         | 
| 424 442 | 
             
                #     Sets the SSL timeout in seconds
         | 
| 425 443 | 
             
                #
         | 
| @@ -2382,14 +2400,19 @@ module Aws::STS | |
| 2382 2400 | 
             
                # @api private
         | 
| 2383 2401 | 
             
                def build_request(operation_name, params = {})
         | 
| 2384 2402 | 
             
                  handlers = @handlers.for(operation_name)
         | 
| 2403 | 
            +
                  tracer = config.telemetry_provider.tracer_provider.tracer(
         | 
| 2404 | 
            +
                    Aws::Telemetry.module_to_tracer_name('Aws::STS')
         | 
| 2405 | 
            +
                  )
         | 
| 2385 2406 | 
             
                  context = Seahorse::Client::RequestContext.new(
         | 
| 2386 2407 | 
             
                    operation_name: operation_name,
         | 
| 2387 2408 | 
             
                    operation: config.api.operation(operation_name),
         | 
| 2388 2409 | 
             
                    client: self,
         | 
| 2389 2410 | 
             
                    params: params,
         | 
| 2390 | 
            -
                    config: config | 
| 2411 | 
            +
                    config: config,
         | 
| 2412 | 
            +
                    tracer: tracer
         | 
| 2413 | 
            +
                  )
         | 
| 2391 2414 | 
             
                  context[:gem_name] = 'aws-sdk-core'
         | 
| 2392 | 
            -
                  context[:gem_version] = '3. | 
| 2415 | 
            +
                  context[:gem_version] = '3.205.0'
         | 
| 2393 2416 | 
             
                  Seahorse::Client::Request.new(handlers, context)
         | 
| 2394 2417 | 
             
                end
         | 
| 2395 2418 |  | 
| @@ -14,14 +14,11 @@ module Aws::STS | |
| 14 14 |  | 
| 15 15 | 
             
                class AssumeRole
         | 
| 16 16 | 
             
                  def self.build(context)
         | 
| 17 | 
            -
                    unless context.config.regional_endpoint
         | 
| 18 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 19 | 
            -
                    end
         | 
| 20 17 | 
             
                    Aws::STS::EndpointParameters.new(
         | 
| 21 18 | 
             
                      region: context.config.region,
         | 
| 22 19 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 23 20 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 24 | 
            -
                      endpoint: endpoint,
         | 
| 21 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 25 22 | 
             
                      use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
         | 
| 26 23 | 
             
                    )
         | 
| 27 24 | 
             
                  end
         | 
| @@ -29,14 +26,11 @@ module Aws::STS | |
| 29 26 |  | 
| 30 27 | 
             
                class AssumeRoleWithSAML
         | 
| 31 28 | 
             
                  def self.build(context)
         | 
| 32 | 
            -
                    unless context.config.regional_endpoint
         | 
| 33 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 34 | 
            -
                    end
         | 
| 35 29 | 
             
                    Aws::STS::EndpointParameters.new(
         | 
| 36 30 | 
             
                      region: context.config.region,
         | 
| 37 31 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 38 32 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 39 | 
            -
                      endpoint: endpoint,
         | 
| 33 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 40 34 | 
             
                      use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
         | 
| 41 35 | 
             
                    )
         | 
| 42 36 | 
             
                  end
         | 
| @@ -44,14 +38,11 @@ module Aws::STS | |
| 44 38 |  | 
| 45 39 | 
             
                class AssumeRoleWithWebIdentity
         | 
| 46 40 | 
             
                  def self.build(context)
         | 
| 47 | 
            -
                    unless context.config.regional_endpoint
         | 
| 48 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 49 | 
            -
                    end
         | 
| 50 41 | 
             
                    Aws::STS::EndpointParameters.new(
         | 
| 51 42 | 
             
                      region: context.config.region,
         | 
| 52 43 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 53 44 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 54 | 
            -
                      endpoint: endpoint,
         | 
| 45 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 55 46 | 
             
                      use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
         | 
| 56 47 | 
             
                    )
         | 
| 57 48 | 
             
                  end
         | 
| @@ -59,14 +50,11 @@ module Aws::STS | |
| 59 50 |  | 
| 60 51 | 
             
                class DecodeAuthorizationMessage
         | 
| 61 52 | 
             
                  def self.build(context)
         | 
| 62 | 
            -
                    unless context.config.regional_endpoint
         | 
| 63 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 64 | 
            -
                    end
         | 
| 65 53 | 
             
                    Aws::STS::EndpointParameters.new(
         | 
| 66 54 | 
             
                      region: context.config.region,
         | 
| 67 55 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 68 56 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 69 | 
            -
                      endpoint: endpoint,
         | 
| 57 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 70 58 | 
             
                      use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
         | 
| 71 59 | 
             
                    )
         | 
| 72 60 | 
             
                  end
         | 
| @@ -74,14 +62,11 @@ module Aws::STS | |
| 74 62 |  | 
| 75 63 | 
             
                class GetAccessKeyInfo
         | 
| 76 64 | 
             
                  def self.build(context)
         | 
| 77 | 
            -
                    unless context.config.regional_endpoint
         | 
| 78 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 79 | 
            -
                    end
         | 
| 80 65 | 
             
                    Aws::STS::EndpointParameters.new(
         | 
| 81 66 | 
             
                      region: context.config.region,
         | 
| 82 67 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 83 68 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 84 | 
            -
                      endpoint: endpoint,
         | 
| 69 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 85 70 | 
             
                      use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
         | 
| 86 71 | 
             
                    )
         | 
| 87 72 | 
             
                  end
         | 
| @@ -89,14 +74,11 @@ module Aws::STS | |
| 89 74 |  | 
| 90 75 | 
             
                class GetCallerIdentity
         | 
| 91 76 | 
             
                  def self.build(context)
         | 
| 92 | 
            -
                    unless context.config.regional_endpoint
         | 
| 93 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 94 | 
            -
                    end
         | 
| 95 77 | 
             
                    Aws::STS::EndpointParameters.new(
         | 
| 96 78 | 
             
                      region: context.config.region,
         | 
| 97 79 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 98 80 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 99 | 
            -
                      endpoint: endpoint,
         | 
| 81 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 100 82 | 
             
                      use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
         | 
| 101 83 | 
             
                    )
         | 
| 102 84 | 
             
                  end
         | 
| @@ -104,14 +86,11 @@ module Aws::STS | |
| 104 86 |  | 
| 105 87 | 
             
                class GetFederationToken
         | 
| 106 88 | 
             
                  def self.build(context)
         | 
| 107 | 
            -
                    unless context.config.regional_endpoint
         | 
| 108 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 109 | 
            -
                    end
         | 
| 110 89 | 
             
                    Aws::STS::EndpointParameters.new(
         | 
| 111 90 | 
             
                      region: context.config.region,
         | 
| 112 91 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 113 92 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 114 | 
            -
                      endpoint: endpoint,
         | 
| 93 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 115 94 | 
             
                      use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
         | 
| 116 95 | 
             
                    )
         | 
| 117 96 | 
             
                  end
         | 
| @@ -119,14 +98,11 @@ module Aws::STS | |
| 119 98 |  | 
| 120 99 | 
             
                class GetSessionToken
         | 
| 121 100 | 
             
                  def self.build(context)
         | 
| 122 | 
            -
                    unless context.config.regional_endpoint
         | 
| 123 | 
            -
                      endpoint = context.config.endpoint.to_s
         | 
| 124 | 
            -
                    end
         | 
| 125 101 | 
             
                    Aws::STS::EndpointParameters.new(
         | 
| 126 102 | 
             
                      region: context.config.region,
         | 
| 127 103 | 
             
                      use_dual_stack: context.config.use_dualstack_endpoint,
         | 
| 128 104 | 
             
                      use_fips: context.config.use_fips_endpoint,
         | 
| 129 | 
            -
                      endpoint: endpoint,
         | 
| 105 | 
            +
                      endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
         | 
| 130 106 | 
             
                      use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
         | 
| 131 107 | 
             
                    )
         | 
| 132 108 | 
             
                  end
         | 
| @@ -40,11 +40,20 @@ module Aws::STS | |
| 40 40 | 
             
                      context[:auth_scheme] =
         | 
| 41 41 | 
             
                        Aws::Endpoints.resolve_auth_scheme(context, endpoint)
         | 
| 42 42 |  | 
| 43 | 
            -
                      @handler.call(context)
         | 
| 43 | 
            +
                      with_metrics(context) { @handler.call(context) }
         | 
| 44 44 | 
             
                    end
         | 
| 45 45 |  | 
| 46 46 | 
             
                    private
         | 
| 47 47 |  | 
| 48 | 
            +
                    def with_metrics(context, &block)
         | 
| 49 | 
            +
                      metrics = []
         | 
| 50 | 
            +
                      metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
         | 
| 51 | 
            +
                      if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
         | 
| 52 | 
            +
                        metrics << 'SIGV4A_SIGNING'
         | 
| 53 | 
            +
                      end
         | 
| 54 | 
            +
                      Aws::Plugins::UserAgent.metric(*metrics, &block)
         | 
| 55 | 
            +
                    end
         | 
| 56 | 
            +
             | 
| 48 57 | 
             
                    def apply_endpoint_headers(context, headers)
         | 
| 49 58 | 
             
                      headers.each do |key, values|
         | 
| 50 59 | 
             
                        value = values
         | 
    
        data/lib/aws-sdk-sts.rb
    CHANGED
    
    
| @@ -27,6 +27,12 @@ module Seahorse | |
| 27 27 | 
             
                  class Handler < Client::Handler
         | 
| 28 28 |  | 
| 29 29 | 
             
                    def call(context)
         | 
| 30 | 
            +
                      span_wrapper(context) { _call(context) }
         | 
| 31 | 
            +
                    end
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                    private
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                    def _call(context)
         | 
| 30 36 | 
             
                      stream = nil
         | 
| 31 37 | 
             
                      begin
         | 
| 32 38 | 
             
                        conn = context.client.connection
         | 
| @@ -80,8 +86,6 @@ module Seahorse | |
| 80 86 | 
             
                      )
         | 
| 81 87 | 
             
                    end
         | 
| 82 88 |  | 
| 83 | 
            -
                    private
         | 
| 84 | 
            -
             | 
| 85 89 | 
             
                    def _register_callbacks(resp, stream, stream_mutex, close_condition, sync_queue)
         | 
| 86 90 | 
             
                      stream.on(:headers) do |headers|
         | 
| 87 91 | 
             
                        resp.signal_headers(headers)
         | 
| @@ -146,8 +150,14 @@ module Seahorse | |
| 146 150 | 
             
                      end
         | 
| 147 151 | 
             
                    end
         | 
| 148 152 |  | 
| 153 | 
            +
                    def span_wrapper(context, &block)
         | 
| 154 | 
            +
                      context.tracer.in_span(
         | 
| 155 | 
            +
                        'Handler.H2',
         | 
| 156 | 
            +
                        attributes: Aws::Telemetry.http_request_attrs(context),
         | 
| 157 | 
            +
                        &block
         | 
| 158 | 
            +
                      )
         | 
| 159 | 
            +
                    end
         | 
| 149 160 | 
             
                  end
         | 
| 150 | 
            -
             | 
| 151 161 | 
             
                end
         | 
| 152 162 | 
             
              end
         | 
| 153 163 | 
             
            end
         | 
| @@ -34,7 +34,9 @@ module Seahorse | |
| 34 34 | 
             
                      ssl_ca_bundle: nil,
         | 
| 35 35 | 
             
                      ssl_ca_directory: nil,
         | 
| 36 36 | 
             
                      ssl_ca_store: nil,
         | 
| 37 | 
            -
                      ssl_timeout: nil
         | 
| 37 | 
            +
                      ssl_timeout: nil,
         | 
| 38 | 
            +
                      ssl_cert: nil,
         | 
| 39 | 
            +
                      ssl_key: nil
         | 
| 38 40 | 
             
                    }
         | 
| 39 41 |  | 
| 40 42 | 
             
                    # @api private
         | 
| @@ -246,7 +248,9 @@ module Seahorse | |
| 246 248 | 
             
                          :ssl_ca_bundle => options[:ssl_ca_bundle],
         | 
| 247 249 | 
             
                          :ssl_ca_directory => options[:ssl_ca_directory],
         | 
| 248 250 | 
             
                          :ssl_ca_store => options[:ssl_ca_store],
         | 
| 249 | 
            -
                          :ssl_timeout => options[:ssl_timeout]
         | 
| 251 | 
            +
                          :ssl_timeout => options[:ssl_timeout],
         | 
| 252 | 
            +
                          :ssl_cert => options[:ssl_cert],
         | 
| 253 | 
            +
                          :ssl_key => options[:ssl_key]
         | 
| 250 254 | 
             
                        }
         | 
| 251 255 | 
             
                      end
         | 
| 252 256 |  | 
| @@ -291,6 +295,8 @@ module Seahorse | |
| 291 295 | 
             
                          http.ca_file = ssl_ca_bundle if ssl_ca_bundle
         | 
| 292 296 | 
             
                          http.ca_path = ssl_ca_directory if ssl_ca_directory
         | 
| 293 297 | 
             
                          http.cert_store = ssl_ca_store if ssl_ca_store
         | 
| 298 | 
            +
                          http.cert = ssl_cert if ssl_cert
         | 
| 299 | 
            +
                          http.key = ssl_key if ssl_key
         | 
| 294 300 | 
             
                        else
         | 
| 295 301 | 
             
                          http.verify_mode = OpenSSL::SSL::VERIFY_NONE
         | 
| 296 302 | 
             
                        end
         | 
| @@ -42,7 +42,13 @@ module Seahorse | |
| 42 42 | 
             
                    # @param [RequestContext] context
         | 
| 43 43 | 
             
                    # @return [Response]
         | 
| 44 44 | 
             
                    def call(context)
         | 
| 45 | 
            -
                       | 
| 45 | 
            +
                      span_wrapper(context) do
         | 
| 46 | 
            +
                        transmit(
         | 
| 47 | 
            +
                          context.config,
         | 
| 48 | 
            +
                          context.http_request,
         | 
| 49 | 
            +
                          context.http_response
         | 
| 50 | 
            +
                        )
         | 
| 51 | 
            +
                      end
         | 
| 46 52 | 
             
                      Response.new(context: context)
         | 
| 47 53 | 
             
                    end
         | 
| 48 54 |  | 
| @@ -192,6 +198,17 @@ module Seahorse | |
| 192 198 | 
             
                      end
         | 
| 193 199 | 
             
                    end
         | 
| 194 200 |  | 
| 201 | 
            +
                    def span_wrapper(context, &block)
         | 
| 202 | 
            +
                      context.tracer.in_span(
         | 
| 203 | 
            +
                        'Handler.NetHttp',
         | 
| 204 | 
            +
                        attributes: Aws::Telemetry.http_request_attrs(context)
         | 
| 205 | 
            +
                      ) do |span|
         | 
| 206 | 
            +
                        block.call
         | 
| 207 | 
            +
                        span.add_attributes(
         | 
| 208 | 
            +
                          Aws::Telemetry.http_response_attrs(context)
         | 
| 209 | 
            +
                        )
         | 
| 210 | 
            +
                      end
         | 
| 211 | 
            +
                    end
         | 
| 195 212 | 
             
                  end
         | 
| 196 213 | 
             
                end
         | 
| 197 214 | 
             
              end
         | 
| @@ -70,6 +70,15 @@ Sets the X509::Store to verify peer certificate. | |
| 70 70 | 
             
                      resolve_ssl_timeout(cfg)
         | 
| 71 71 | 
             
                    end
         | 
| 72 72 |  | 
| 73 | 
            +
                    option(:ssl_cert, default: nil, doc_type: OpenSSL::X509::Certificate, docstring: <<-DOCS)
         | 
| 74 | 
            +
            Sets a client certificate when creating http connections.
         | 
| 75 | 
            +
                    DOCS
         | 
| 76 | 
            +
             | 
| 77 | 
            +
             | 
| 78 | 
            +
                    option(:ssl_key, default: nil, doc_type: OpenSSL::PKey, docstring: <<-DOCS)
         | 
| 79 | 
            +
            Sets a client key when creating http connections.
         | 
| 80 | 
            +
                    DOCS
         | 
| 81 | 
            +
             | 
| 73 82 | 
             
                    option(:logger) # for backwards compat
         | 
| 74 83 |  | 
| 75 84 | 
             
                    handler(Client::NetHttp::Handler, step: :send)
         | 
| @@ -9,11 +9,14 @@ module Seahorse | |
| 9 9 | 
             
                  # @option options [required,Symbol] :operation_name (nil)
         | 
| 10 10 | 
             
                  # @option options [required,Model::Operation] :operation (nil)
         | 
| 11 11 | 
             
                  # @option options [Model::Authorizer] :authorizer (nil)
         | 
| 12 | 
            +
                  # @option options [Client] :client (nil)
         | 
| 12 13 | 
             
                  # @option options [Hash] :params ({})
         | 
| 13 14 | 
             
                  # @option options [Configuration] :config (nil)
         | 
| 14 15 | 
             
                  # @option options [Http::Request] :http_request (Http::Request.new)
         | 
| 15 16 | 
             
                  # @option options [Http::Response] :http_response (Http::Response.new)
         | 
| 16 | 
            -
                  # | 
| 17 | 
            +
                  # @option options [Integer] :retries (0)
         | 
| 18 | 
            +
                  # @option options [Aws::Telemetry::TracerBase] :tracer (Aws::Telemetry::NoOpTracer.new)
         | 
| 19 | 
            +
                  # @options options [Hash] :metadata ({})
         | 
| 17 20 | 
             
                  def initialize(options = {})
         | 
| 18 21 | 
             
                    @operation_name = options[:operation_name]
         | 
| 19 22 | 
             
                    @operation = options[:operation]
         | 
| @@ -24,6 +27,7 @@ module Seahorse | |
| 24 27 | 
             
                    @http_request = options[:http_request] || Http::Request.new
         | 
| 25 28 | 
             
                    @http_response = options[:http_response] || Http::Response.new
         | 
| 26 29 | 
             
                    @retries = 0
         | 
| 30 | 
            +
                    @tracer = options[:tracer] || Aws::Telemetry::NoOpTracer.new
         | 
| 27 31 | 
             
                    @metadata = {}
         | 
| 28 32 | 
             
                  end
         | 
| 29 33 |  | 
| @@ -54,6 +58,9 @@ module Seahorse | |
| 54 58 | 
             
                  # @return [Integer]
         | 
| 55 59 | 
             
                  attr_accessor :retries
         | 
| 56 60 |  | 
| 61 | 
            +
                  # @return [Tracer]
         | 
| 62 | 
            +
                  attr_accessor :tracer
         | 
| 63 | 
            +
             | 
| 57 64 | 
             
                  # @return [Hash]
         | 
| 58 65 | 
             
                  attr_reader :metadata
         | 
| 59 66 |  | 
| @@ -0,0 +1,46 @@ | |
| 1 | 
            +
            module Aws
         | 
| 2 | 
            +
              module Telemetry
         | 
| 3 | 
            +
                class TelemetryProviderBase
         | 
| 4 | 
            +
                  def initialize: (?tracer_provider: TracerProviderBase, ?context_manager: ContextManagerBase) -> void
         | 
| 5 | 
            +
                  attr_reader tracer_provider: TracerProviderBase
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                  attr_reader context_manager: ContextManagerBase
         | 
| 8 | 
            +
                end
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                class TracerProviderBase
         | 
| 11 | 
            +
                  def tracer: (?String name) -> TracerBase
         | 
| 12 | 
            +
                end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                class TracerBase
         | 
| 15 | 
            +
                  def start_span: (String name, ?untyped with_parent, ?Hash[String, untyped] attributes, ?SpanKind kind) -> SpanBase
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                  def in_span: (String name, ?Hash[String, untyped] attributes, ?SpanKind kind) -> SpanBase
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                  def current_span: () -> SpanBase
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                class SpanBase
         | 
| 23 | 
            +
                  def set_attribute: (String key, untyped value) -> self
         | 
| 24 | 
            +
                  alias []= set_attribute
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                  def add_attributes: (Hash[String, untyped] attributes) -> self
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                  def add_event: (String name, ?Hash[String, untyped] attributes) -> self
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                  def status=: (SpanStatus status) -> void
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                  def finish: (?Time end_timestamp) -> self
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                  def record_exception: (untyped exception, ?Hash[String, untyped] attributes) -> void
         | 
| 35 | 
            +
                end
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                class ContextManagerBase
         | 
| 38 | 
            +
                  def current: () -> untyped
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                  def attach: (untyped context) -> untyped
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                  def detach: (untyped token) -> bool
         | 
| 43 | 
            +
                end
         | 
| 44 | 
            +
             | 
| 45 | 
            +
              end
         | 
| 46 | 
            +
            end
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            module Aws
         | 
| 2 | 
            +
              module Telemetry
         | 
| 3 | 
            +
                class OTelProvider < TelemetryProviderBase
         | 
| 4 | 
            +
                  def initialize: () -> void
         | 
| 5 | 
            +
                end
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                class OTelTracerProvider < TracerProviderBase
         | 
| 8 | 
            +
                  def initialize: () -> void
         | 
| 9 | 
            +
                end
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                class OTelTracer < TracerBase
         | 
| 12 | 
            +
                  def initialize: (untyped tracer) -> void
         | 
| 13 | 
            +
                end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                class OTelSpan < SpanBase
         | 
| 16 | 
            +
                  def initialize: (untyped span) -> void
         | 
| 17 | 
            +
                end
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                class OTelContextManager < ContextManagerBase
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
            end
         | 
| @@ -0,0 +1,24 @@ | |
| 1 | 
            +
            module Aws
         | 
| 2 | 
            +
              module Telemetry
         | 
| 3 | 
            +
                class SpanStatus
         | 
| 4 | 
            +
             | 
| 5 | 
            +
                  def self.unset: (?::String description) -> SpanStatus
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                  def self.ok: (?::String description) -> SpanStatus
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  def self.error: (?::String description) -> SpanStatus
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  def initialize: (Integer code, ?description: ::String) -> void
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                  attr_reader code: Integer
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                  attr_reader description: String
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                  OK: 0
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                  UNSET: 1
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                  ERROR: 2
         | 
| 22 | 
            +
                end
         | 
| 23 | 
            +
              end
         | 
| 24 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: aws-sdk-core
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 3. | 
| 4 | 
            +
              version: 3.205.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Amazon Web Services
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2024- | 
| 11 | 
            +
            date: 2024-09-11 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: jmespath
         | 
| @@ -203,6 +203,7 @@ files: | |
| 203 203 | 
             
            - lib/aws-sdk-core/plugins/signature_v2.rb
         | 
| 204 204 | 
             
            - lib/aws-sdk-core/plugins/signature_v4.rb
         | 
| 205 205 | 
             
            - lib/aws-sdk-core/plugins/stub_responses.rb
         | 
| 206 | 
            +
            - lib/aws-sdk-core/plugins/telemetry.rb
         | 
| 206 207 | 
             
            - lib/aws-sdk-core/plugins/transfer_encoding.rb
         | 
| 207 208 | 
             
            - lib/aws-sdk-core/plugins/user_agent.rb
         | 
| 208 209 | 
             
            - lib/aws-sdk-core/process_credentials.rb
         | 
| @@ -253,6 +254,12 @@ files: | |
| 253 254 | 
             
            - lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb
         | 
| 254 255 | 
             
            - lib/aws-sdk-core/stubbing/stub_data.rb
         | 
| 255 256 | 
             
            - lib/aws-sdk-core/stubbing/xml_error.rb
         | 
| 257 | 
            +
            - lib/aws-sdk-core/telemetry.rb
         | 
| 258 | 
            +
            - lib/aws-sdk-core/telemetry/base.rb
         | 
| 259 | 
            +
            - lib/aws-sdk-core/telemetry/no_op.rb
         | 
| 260 | 
            +
            - lib/aws-sdk-core/telemetry/otel.rb
         | 
| 261 | 
            +
            - lib/aws-sdk-core/telemetry/span_kind.rb
         | 
| 262 | 
            +
            - lib/aws-sdk-core/telemetry/span_status.rb
         | 
| 256 263 | 
             
            - lib/aws-sdk-core/token.rb
         | 
| 257 264 | 
             
            - lib/aws-sdk-core/token_provider.rb
         | 
| 258 265 | 
             
            - lib/aws-sdk-core/token_provider_chain.rb
         | 
| @@ -361,6 +368,10 @@ files: | |
| 361 368 | 
             
            - sig/aws-sdk-core/errors.rbs
         | 
| 362 369 | 
             
            - sig/aws-sdk-core/resources/collection.rbs
         | 
| 363 370 | 
             
            - sig/aws-sdk-core/structure.rbs
         | 
| 371 | 
            +
            - sig/aws-sdk-core/telemetry/base.rbs
         | 
| 372 | 
            +
            - sig/aws-sdk-core/telemetry/otel.rbs
         | 
| 373 | 
            +
            - sig/aws-sdk-core/telemetry/span_kind.rbs
         | 
| 374 | 
            +
            - sig/aws-sdk-core/telemetry/span_status.rbs
         | 
| 364 375 | 
             
            - sig/aws-sdk-core/waiters/errors.rbs
         | 
| 365 376 | 
             
            - sig/seahorse/client/base.rbs
         | 
| 366 377 | 
             
            - sig/seahorse/client/handler_builder.rbs
         |