aws-sdk-core 3.260.0 → 3.263.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdf3489f3be6d6fe071ddf109dc612c7049e906ef12f425d009e7a58bfc746bb
4
- data.tar.gz: a0cfa6a42abe97a7cf38238ab4ad6b3a29aabd5d9f6f18532460595a9af9aeac
3
+ metadata.gz: 2e12759793414117f403e7057cb739735502fdb49b051ff038d55c745852b593
4
+ data.tar.gz: d39be33db7594287f3eba7dab5dee03a0cbd0742189a7808d70b496703754c0c
5
5
  SHA512:
6
- metadata.gz: bd1b2e75d6997cd9474986a6dffb87adee2d9aecfcdaf85f70ed9633a3cb4bb21e30bc11faea17e68b945a6aa180c23e900ed95c256b68f56f09cdd86f35d974
7
- data.tar.gz: 6f126a87838230567b55780f57e6ad85019480cea159b9b7f504ed9309d8e7675adf0232ec60fdaeb583b4117aadab4fa8e36fed111ec42a0026f3e53c60df13
6
+ metadata.gz: 50573d7d9dd51663613b353a63fd648f8e481d43ea6c04d8831fa79830e8372aca0f26f69dd62f129a5e7acb6e64aae747a62a844c3be85b649754cd70e9c053
7
+ data.tar.gz: 4ff98b02a41384117b0c6beb0d231e6b5151a3c54c01dda97482e79d26d4ab1ce4322519b4b64e4ee9522ebf9ce424a661ae7d944da1f9da67fd24e1540047ec
data/CHANGELOG.md CHANGED
@@ -1,6 +1,27 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.263.0 (2026-10-29)
5
+ ------------------
6
+
7
+ * Feature - Reduce object allocation overhead for SDK responses. SDK clients now return `Aws::Response`, a subclass of `Seahorse::Client::Response`.
8
+
9
+ * Issue - Verify the server certificate hostname for `AsyncClient` HTTP/2 connections when `ssl_verify_peer` is enabled. Connections now fail if the server certificate does not match the endpoint hostname.
10
+
11
+ 3.262.0 (2026-10-28)
12
+ ------------------
13
+
14
+ * Feature - Improve User-Agent framework detection with literal matching of configured framework names.
15
+
16
+ * Issue - Fix service error parsing and response header-map extraction by matching prefixes literally. Custom models that relied on regex matching must use literal prefixes.
17
+
18
+ 3.261.0 (2026-10-26)
19
+ ------------------
20
+
21
+ * Feature - Updated Aws::Signin::Client with the latest API changes.
22
+
23
+ * Feature - Adds support for the OAuth 2.0 Token Exchange grant (RFC 8693), enabling applications to exchange identity provider issued JSON Web Tokens (JWTs) for short-lived OAuth access tokens to access supported AWS services without managing separate AWS credentials.
24
+
4
25
  3.260.0 (2026-10-21)
5
26
  ------------------
6
27
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.260.0
1
+ 3.263.0
@@ -58,7 +58,7 @@ module Aws
58
58
 
59
59
  def remove_prefix(error_code, context)
60
60
  if (prefix = context.config.api.metadata['errorPrefix'])
61
- error_code.sub(/^#{prefix}/, '')
61
+ error_code.delete_prefix(prefix)
62
62
  else
63
63
  error_code
64
64
  end
@@ -46,10 +46,16 @@ module Aws
46
46
  # puts response.contents.map(&:key)
47
47
  # end
48
48
  #
49
+ # Every client response supports these methods. A response from an
50
+ # operation that does not paginate has a single page, so `last_page?`
51
+ # returns `true` and `each` yields only that response.
52
+ #
49
53
  module PageableResponse
50
54
 
55
+ # Adds paging methods when needed and resets cached paging state.
56
+ # An {Aws::Response} already has the methods through its class.
51
57
  def self.apply(base)
52
- base.extend Extension
58
+ base.extend Extension unless Extension === base
53
59
  base.instance_variable_set(:@last_page, nil)
54
60
  base.instance_variable_set(:@more_results, nil)
55
61
  base
@@ -217,5 +223,6 @@ module Aws
217
223
  end
218
224
 
219
225
  end
226
+
220
227
  end
221
228
  end
@@ -83,7 +83,7 @@ requests are made, and retries are disabled.
83
83
  private
84
84
 
85
85
  def stub_responses(context)
86
- resp = Seahorse::Client::Response.new(context: context)
86
+ resp = Aws::Response.new(context: context)
87
87
  async_mode = context.client.is_a? Seahorse::Client::AsyncBase
88
88
  stub = context.client.next_stub(context)
89
89
  stub[:mutex].synchronize { apply_stub(stub, resp, async_mode) }
@@ -203,7 +203,8 @@ variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
203
203
  end
204
204
 
205
205
  # Frameworks may be aws-record, aws-sdk-rails, etc.
206
- regex = /gems\/(?<name>#{frameworks_cfg.join('|')})-(?<version>\d+\.\d+\.\d+)/.freeze
206
+ names = frameworks_cfg.map { |f| Regexp.escape(f.to_s) }.join('|')
207
+ regex = /gems\/(?<name>#{names})-(?<version>\d+\.\d+\.\d+)/.freeze
207
208
  frameworks = {}
208
209
  Kernel.caller.each do |line|
209
210
  match = line.match(regex)
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ # Represents the response from an AWS service operation.
5
+ # Provides the Seahorse response interface and paging convenience methods.
6
+ #
7
+ # SDK clients return responses with paging ready to use. When constructing
8
+ # a response directly or inspecting it before paging setup in a custom handler,
9
+ # use {#data} to access or enumerate its fields. {#first} returns the response
10
+ # itself; page-state checks and complete page enumeration require a pager.
11
+ #
12
+ # @see PageableResponse
13
+ class Response < Seahorse::Client::Response
14
+ include PageableResponse::Extension
15
+
16
+ def initialize(options = {})
17
+ super
18
+ @pager = nil
19
+ @last_page = nil
20
+ @more_results = nil
21
+ end
22
+ end
23
+ end
@@ -67,9 +67,10 @@ module Aws
67
67
  data[name] = {}
68
68
  prefix = ref.location_name || ''
69
69
  headers.each do |header_name, header_value|
70
- if match = header_name.match(/^#{prefix}(.+)/i)
71
- data[name][match[1]] = header_value
72
- end
70
+ next unless header_name.length > prefix.length &&
71
+ header_name[0, prefix.length].casecmp?(prefix)
72
+
73
+ data[name][header_name[prefix.length..-1]] = header_value
73
74
  end
74
75
  end
75
76
 
@@ -69,7 +69,7 @@ module Aws
69
69
 
70
70
  def remove_prefix(error_code, context)
71
71
  if (prefix = context.config.api.metadata['errorPrefix'])
72
- error_code.sub(/^#{prefix}/, '')
72
+ error_code.delete_prefix(prefix)
73
73
  else
74
74
  error_code
75
75
  end
@@ -73,7 +73,7 @@ module Aws
73
73
 
74
74
  def remove_prefix(error_code, context)
75
75
  if (prefix = context.config.api.metadata['errorPrefix'])
76
- error_code.sub(/^#{prefix}/, '')
76
+ error_code.delete_prefix(prefix)
77
77
  else
78
78
  error_code
79
79
  end
data/lib/aws-sdk-core.rb CHANGED
@@ -45,6 +45,7 @@ module Aws
45
45
  autoload :Pager, 'aws-sdk-core/pager'
46
46
  autoload :ParamConverter, 'aws-sdk-core/param_converter'
47
47
  autoload :ParamValidator, 'aws-sdk-core/param_validator'
48
+ autoload :Response, 'aws-sdk-core/response'
48
49
  autoload :SharedConfig, 'aws-sdk-core/shared_config'
49
50
  autoload :Structure, 'aws-sdk-core/structure'
50
51
  autoload :EmptyStructure, 'aws-sdk-core/structure'
@@ -481,54 +481,12 @@ module Aws::Signin
481
481
 
482
482
  # @!group API Operations
483
483
 
484
- # CreateOAuth2Token API
485
- #
486
- # Path: /v1/token Request Method: POST Content-Type: application/json or
487
- # application/x-www-form-urlencoded
488
- #
489
- # This API implements OAuth 2.0 flows for AWS Sign-In CLI clients,
490
- # supporting both:
491
- #
492
- # 1. Authorization code redemption (grant\_type=authorization\_code) -
493
- # NOT idempotent
494
- # 2. Token refresh (grant\_type=refresh\_token) - Idempotent within
495
- # token validity window
496
- #
497
- # The operation behavior is determined by the grant\_type parameter in
498
- # the request body:
499
- #
500
- # **Authorization Code Flow (NOT Idempotent):**
501
- #
502
- # * JSON or form-encoded body with client\_id,
503
- # grant\_type=authorization\_code, code, redirect\_uri, code\_verifier
504
- # * Returns access\_token, token\_type, expires\_in, refresh\_token, and
505
- # id\_token
506
- # * Each authorization code can only be used ONCE for security (prevents
507
- # replay attacks)
508
- #
509
- # **Token Refresh Flow (Idempotent):**
510
- #
511
- # * JSON or form-encoded body with client\_id,
512
- # grant\_type=refresh\_token, refresh\_token
513
- # * Returns access\_token, token\_type, expires\_in, and refresh\_token
514
- # (no id\_token)
515
- # * Multiple calls with same refresh\_token return consistent results
516
- # within validity window
517
- #
518
- # Authentication and authorization:
519
- #
520
- # * Confidential clients: sigv4 signing required with
521
- # signin:ExchangeToken permissions
522
- # * CLI clients (public): authn/authz skipped based on client\_id &amp;
523
- # grant\_type
524
- #
525
- # Note: This operation cannot be marked as @idempotent because it
526
- # handles both idempotent (token refresh) and non-idempotent (auth code
527
- # redemption) flows in a single endpoint.
484
+ # Exchanges an authorization code or refresh token for an OAuth 2.0
485
+ # access token and refresh token.
528
486
  #
529
487
  # @option params [required, Types::CreateOAuth2TokenRequestBody] :token_input
530
- # Flattened token operation inputs The specific operation is determined
531
- # by grant\_type in the request body
488
+ # Flattened token operation inputs. The "grant\_type" in the request
489
+ # body determines the specific operation.
532
490
  #
533
491
  # @return [Types::CreateOAuth2TokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
534
492
  #
@@ -566,12 +524,11 @@ module Aws::Signin
566
524
  req.send_request(options)
567
525
  end
568
526
 
569
- # Grants permission to exchange client credentials for an OAuth 2.0
570
- # access token scoped to a resource that can be used to access AWS
571
- # services from applications
527
+ # Exchanges client credentials for an OAuth 2.0 access token scoped to a
528
+ # resource, which you can use to access AWS services from applications.
572
529
  #
573
530
  # @option params [required, String] :grant_type
574
- # OAuth 2.0 grant type. Must be "client\_credentials".
531
+ # The OAuth 2.0 grant type. Must be "client\_credentials".
575
532
  #
576
533
  # @option params [required, String] :resource
577
534
  # The OAuth resource for which the access token is requested. Example:
@@ -587,7 +544,7 @@ module Aws::Signin
587
544
  #
588
545
  # resp = client.create_o_auth_2_token_with_iam({
589
546
  # grant_type: "ClientCredentialsGrantType", # required
590
- # resource: "CreateOAuth2TokenWithIAMRequestResourceString", # required
547
+ # resource: "Resource", # required
591
548
  # })
592
549
  #
593
550
  # @example Response structure
@@ -605,6 +562,67 @@ module Aws::Signin
605
562
  req.send_request(options)
606
563
  end
607
564
 
565
+ # Exchanges a supported token for an OAuth 2.0 access token scoped to a
566
+ # resource, which you can use to access AWS services from applications.
567
+ #
568
+ # @option params [required, String] :grant_type
569
+ # The OAuth 2.0 grant type. Currently only supports
570
+ # "urn:ietf:params:oauth:grant-type:token-exchange".
571
+ #
572
+ # @option params [String] :subject_token
573
+ # The subject token that represents the identity of the party on whose
574
+ # behalf the request is made. Required when
575
+ # "grant\_type=urn:ietf:params:oauth:grant-type:token-exchange".
576
+ #
577
+ # @option params [String] :subject_token_type
578
+ # The token type of the subject token. Currently only supports
579
+ # "urn:ietf:params:oauth:token-type:jwt". Required when
580
+ # "grant\_type=urn:ietf:params:oauth:grant-type:token-exchange".
581
+ #
582
+ # @option params [String] :resource
583
+ # The OAuth resource for which the access token is requested. Required
584
+ # when "grant\_type=urn:ietf:params:oauth:grant-type:token-exchange".
585
+ # Example: "glue.amazonaws.com".
586
+ #
587
+ # @option params [String] :scope
588
+ # IAM managed policy Amazon Resource Names (ARNs) to apply as session
589
+ # policies that further scope down the permissions of the issued access
590
+ # token, provided as a space-delimited list. Example:
591
+ # "arn:aws:iam::444455556666:policy/MyPolicy".
592
+ #
593
+ # @return [Types::CreateOAuth2TokenWithTokenExchangeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
594
+ #
595
+ # * {Types::CreateOAuth2TokenWithTokenExchangeResponse#access_token #access_token} => String
596
+ # * {Types::CreateOAuth2TokenWithTokenExchangeResponse#issued_token_type #issued_token_type} => String
597
+ # * {Types::CreateOAuth2TokenWithTokenExchangeResponse#token_type #token_type} => String
598
+ # * {Types::CreateOAuth2TokenWithTokenExchangeResponse#expires_in #expires_in} => Integer
599
+ #
600
+ # @example Request syntax with placeholder values
601
+ #
602
+ # resp = client.create_o_auth_2_token_with_token_exchange({
603
+ # grant_type: "TokenExchangeGrantType", # required
604
+ # subject_token: "SubjectToken",
605
+ # subject_token_type: "SubjectTokenType",
606
+ # resource: "Resource",
607
+ # scope: "Scope",
608
+ # })
609
+ #
610
+ # @example Response structure
611
+ #
612
+ # resp.access_token #=> String
613
+ # resp.issued_token_type #=> String
614
+ # resp.token_type #=> String
615
+ # resp.expires_in #=> Integer
616
+ #
617
+ # @see http://docs.aws.amazon.com/goto/WebAPI/signin-2023-01-01/CreateOAuth2TokenWithTokenExchange AWS API Documentation
618
+ #
619
+ # @overload create_o_auth_2_token_with_token_exchange(params = {})
620
+ # @param [Hash] params ({})
621
+ def create_o_auth_2_token_with_token_exchange(params = {}, options = {})
622
+ req = build_request(:create_o_auth_2_token_with_token_exchange, params)
623
+ req.send_request(options)
624
+ end
625
+
608
626
  # Delete console authorization configuration with automatic scope
609
627
  # detection
610
628
  #
@@ -730,28 +748,21 @@ module Aws::Signin
730
748
  req.send_request(options)
731
749
  end
732
750
 
733
- # Grants permission to inspect the metadata and state of an OAuth 2.0
734
- # access token or refresh token
751
+ # Inspects the metadata and active state of an OAuth 2.0 access token or
752
+ # refresh token.
735
753
  #
736
754
  # Implements RFC 7662 OAuth 2.0 Token Introspection over a
737
- # SigV4-authenticated endpoint. Inspects the metadata of an
738
- # access\_token or refresh\_token issued by AWS Sign-In and returns the
739
- # claims associated with it.
740
- #
741
- # Inactive token semantics (RFC 7662 §2.2): when the supplied token is
742
- # unknown, expired, revoked, malformed, or owned by a different account,
743
- # the response body is exactly \{ "active": false } with all other
744
- # claims omitted.
755
+ # SigV4-authenticated endpoint. Returns the claims associated with a
756
+ # token issued by AWS Sign-In.
745
757
  #
746
758
  # @option params [required, String] :token
747
- # The string value of the token to introspect. May be either an
748
- # access\_token or a refresh\_token issued by AWS Sign-In.
759
+ # The access token or refresh token issued by AWS Sign-In.
749
760
  #
750
761
  # @option params [String] :token_type_hint
751
- # Optional hint about the type of the token submitted for introspection.
752
- # The server uses this hint to optimize lookup, but still falls back to
753
- # the other token type on miss. Allowed values: access\_token,
754
- # refresh\_token.
762
+ # An optional hint about the type of the token submitted for
763
+ # introspection, as defined in RFC 7662 §2.1. The server checks both
764
+ # token types regardless of the hint. Allowed values: "access\_token",
765
+ # "refresh\_token".
755
766
  #
756
767
  # @return [Types::IntrospectOAuth2TokenWithIAMResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
757
768
  #
@@ -939,21 +950,11 @@ module Aws::Signin
939
950
  req.send_request(options)
940
951
  end
941
952
 
942
- # Grants permission to revoke an OAuth 2.0 refresh token and its
943
- # associated refresh tokens
944
- #
945
- # Revokes a refresh\_token issued by AWS Sign-In, invalidating the
946
- # entire token chain so that the refresh\_token can no longer be used to
947
- # mint new access\_tokens.
948
- #
949
- # Idempotency: revoking an already-revoked, expired, or otherwise
950
- # invalid token still returns 200 OK with an empty body. Only the
951
- # refresh\_token type is accepted.
953
+ # Revokes an OAuth 2.0 refresh token and its associated token chain.
952
954
  #
953
955
  # @option params [required, String] :token
954
- # The refresh\_token to revoke. Must be a refresh\_token issued by AWS
955
- # Sign-In (prefix "ASOR"); access\_tokens are not accepted for
956
- # revocation.
956
+ # The refresh token to revoke. Must be a refresh token issued by AWS
957
+ # Sign-In. Access tokens are not accepted for revocation.
957
958
  #
958
959
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
959
960
  #
@@ -990,7 +991,7 @@ module Aws::Signin
990
991
  tracer: tracer
991
992
  )
992
993
  context[:gem_name] = 'aws-sdk-core'
993
- context[:gem_version] = '3.260.0'
994
+ context[:gem_version] = '3.263.0'
994
995
  Seahorse::Client::Request.new(handlers, context)
995
996
  end
996
997
 
@@ -35,8 +35,9 @@ module Aws::Signin
35
35
  CreateOAuth2TokenResponse = Shapes::StructureShape.new(name: 'CreateOAuth2TokenResponse')
36
36
  CreateOAuth2TokenResponseBody = Shapes::StructureShape.new(name: 'CreateOAuth2TokenResponseBody')
37
37
  CreateOAuth2TokenWithIAMRequest = Shapes::StructureShape.new(name: 'CreateOAuth2TokenWithIAMRequest')
38
- CreateOAuth2TokenWithIAMRequestResourceString = Shapes::StringShape.new(name: 'CreateOAuth2TokenWithIAMRequestResourceString')
39
38
  CreateOAuth2TokenWithIAMResponse = Shapes::StructureShape.new(name: 'CreateOAuth2TokenWithIAMResponse')
39
+ CreateOAuth2TokenWithTokenExchangeRequest = Shapes::StructureShape.new(name: 'CreateOAuth2TokenWithTokenExchangeRequest')
40
+ CreateOAuth2TokenWithTokenExchangeResponse = Shapes::StructureShape.new(name: 'CreateOAuth2TokenWithTokenExchangeResponse')
40
41
  DeleteConsoleAuthorizationConfigurationInput = Shapes::StructureShape.new(name: 'DeleteConsoleAuthorizationConfigurationInput')
41
42
  DeleteConsoleAuthorizationConfigurationOutput = Shapes::StructureShape.new(name: 'DeleteConsoleAuthorizationConfigurationOutput')
42
43
  DeleteResourcePermissionStatementInput = Shapes::StructureShape.new(name: 'DeleteResourcePermissionStatementInput')
@@ -54,6 +55,9 @@ module Aws::Signin
54
55
  IntrospectOAuth2TokenWithIAMResponse = Shapes::StructureShape.new(name: 'IntrospectOAuth2TokenWithIAMResponse')
55
56
  IntrospectedTokenType = Shapes::StringShape.new(name: 'IntrospectedTokenType')
56
57
  IntrospectionToken = Shapes::StringShape.new(name: 'IntrospectionToken')
58
+ InvalidGrantException = Shapes::StructureShape.new(name: 'InvalidGrantException')
59
+ InvalidScopeException = Shapes::StructureShape.new(name: 'InvalidScopeException')
60
+ IssuedOAuthAccessTokenType = Shapes::StringShape.new(name: 'IssuedOAuthAccessTokenType')
57
61
  ListResourcePermissionStatementsInput = Shapes::StructureShape.new(name: 'ListResourcePermissionStatementsInput')
58
62
  ListResourcePermissionStatementsOutput = Shapes::StructureShape.new(name: 'ListResourcePermissionStatementsOutput')
59
63
  Long = Shapes::IntegerShape.new(name: 'Long')
@@ -73,18 +77,24 @@ module Aws::Signin
73
77
  RedirectUri = Shapes::StringShape.new(name: 'RedirectUri')
74
78
  RefreshToken = Shapes::StringShape.new(name: 'RefreshToken')
75
79
  RequestedRegion = Shapes::StringShape.new(name: 'RequestedRegion')
80
+ Resource = Shapes::StringShape.new(name: 'Resource')
76
81
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
77
82
  RevocationToken = Shapes::StringShape.new(name: 'RevocationToken')
78
83
  RevokeOAuth2TokenWithIAMRequest = Shapes::StructureShape.new(name: 'RevokeOAuth2TokenWithIAMRequest')
79
84
  RevokeOAuth2TokenWithIAMResponse = Shapes::StructureShape.new(name: 'RevokeOAuth2TokenWithIAMResponse')
85
+ Scope = Shapes::StringShape.new(name: 'Scope')
80
86
  ServiceQuotaExceededException = Shapes::StructureShape.new(name: 'ServiceQuotaExceededException')
87
+ ServiceUnavailableException = Shapes::StructureShape.new(name: 'ServiceUnavailableException')
81
88
  SigninResourceBasedPolicy = Shapes::StructureShape.new(name: 'SigninResourceBasedPolicy')
82
89
  SourceIp = Shapes::StringShape.new(name: 'SourceIp')
83
90
  SourceVpc = Shapes::StringShape.new(name: 'SourceVpc')
84
91
  SourceVpce = Shapes::StringShape.new(name: 'SourceVpce')
85
92
  StatementId = Shapes::StringShape.new(name: 'StatementId')
86
93
  String = Shapes::StringShape.new(name: 'String')
94
+ SubjectToken = Shapes::StringShape.new(name: 'SubjectToken')
95
+ SubjectTokenType = Shapes::StringShape.new(name: 'SubjectTokenType')
87
96
  TargetId = Shapes::StringShape.new(name: 'TargetId')
97
+ TokenExchangeGrantType = Shapes::StringShape.new(name: 'TokenExchangeGrantType')
88
98
  TokenExpiresIn = Shapes::IntegerShape.new(name: 'TokenExpiresIn')
89
99
  TokenType = Shapes::StringShape.new(name: 'TokenType')
90
100
  TokenTypeHint = Shapes::StringShape.new(name: 'TokenTypeHint')
@@ -139,7 +149,7 @@ module Aws::Signin
139
149
  CreateOAuth2TokenResponseBody.struct_class = Types::CreateOAuth2TokenResponseBody
140
150
 
141
151
  CreateOAuth2TokenWithIAMRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: ClientCredentialsGrantType, required: true, location_name: "grant_type"))
142
- CreateOAuth2TokenWithIAMRequest.add_member(:resource, Shapes::ShapeRef.new(shape: CreateOAuth2TokenWithIAMRequestResourceString, required: true, location_name: "resource"))
152
+ CreateOAuth2TokenWithIAMRequest.add_member(:resource, Shapes::ShapeRef.new(shape: Resource, required: true, location_name: "resource"))
143
153
  CreateOAuth2TokenWithIAMRequest.struct_class = Types::CreateOAuth2TokenWithIAMRequest
144
154
 
145
155
  CreateOAuth2TokenWithIAMResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: OAuthAccessToken, required: true, location_name: "access_token"))
@@ -147,6 +157,19 @@ module Aws::Signin
147
157
  CreateOAuth2TokenWithIAMResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: TokenExpiresIn, required: true, location_name: "expires_in"))
148
158
  CreateOAuth2TokenWithIAMResponse.struct_class = Types::CreateOAuth2TokenWithIAMResponse
149
159
 
160
+ CreateOAuth2TokenWithTokenExchangeRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: TokenExchangeGrantType, required: true, location_name: "grant_type"))
161
+ CreateOAuth2TokenWithTokenExchangeRequest.add_member(:subject_token, Shapes::ShapeRef.new(shape: SubjectToken, location_name: "subject_token"))
162
+ CreateOAuth2TokenWithTokenExchangeRequest.add_member(:subject_token_type, Shapes::ShapeRef.new(shape: SubjectTokenType, location_name: "subject_token_type"))
163
+ CreateOAuth2TokenWithTokenExchangeRequest.add_member(:resource, Shapes::ShapeRef.new(shape: Resource, location_name: "resource"))
164
+ CreateOAuth2TokenWithTokenExchangeRequest.add_member(:scope, Shapes::ShapeRef.new(shape: Scope, location_name: "scope"))
165
+ CreateOAuth2TokenWithTokenExchangeRequest.struct_class = Types::CreateOAuth2TokenWithTokenExchangeRequest
166
+
167
+ CreateOAuth2TokenWithTokenExchangeResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: OAuthAccessToken, required: true, location_name: "access_token"))
168
+ CreateOAuth2TokenWithTokenExchangeResponse.add_member(:issued_token_type, Shapes::ShapeRef.new(shape: IssuedOAuthAccessTokenType, location_name: "issued_token_type"))
169
+ CreateOAuth2TokenWithTokenExchangeResponse.add_member(:token_type, Shapes::ShapeRef.new(shape: BearerTokenType, required: true, location_name: "token_type"))
170
+ CreateOAuth2TokenWithTokenExchangeResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: TokenExpiresIn, required: true, location_name: "expires_in"))
171
+ CreateOAuth2TokenWithTokenExchangeResponse.struct_class = Types::CreateOAuth2TokenWithTokenExchangeResponse
172
+
150
173
  DeleteConsoleAuthorizationConfigurationInput.add_member(:target_id, Shapes::ShapeRef.new(shape: TargetId, location_name: "targetId"))
151
174
  DeleteConsoleAuthorizationConfigurationInput.struct_class = Types::DeleteConsoleAuthorizationConfigurationInput
152
175
 
@@ -195,9 +218,17 @@ module Aws::Signin
195
218
  IntrospectOAuth2TokenWithIAMResponse.add_member(:jti, Shapes::ShapeRef.new(shape: String, location_name: "jti"))
196
219
  IntrospectOAuth2TokenWithIAMResponse.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountId, location_name: "account_id"))
197
220
  IntrospectOAuth2TokenWithIAMResponse.add_member(:signin_session, Shapes::ShapeRef.new(shape: String, location_name: "signin_session"))
198
- IntrospectOAuth2TokenWithIAMResponse.add_member(:resource, Shapes::ShapeRef.new(shape: String, location_name: "resource"))
221
+ IntrospectOAuth2TokenWithIAMResponse.add_member(:resource, Shapes::ShapeRef.new(shape: Resource, location_name: "resource"))
199
222
  IntrospectOAuth2TokenWithIAMResponse.struct_class = Types::IntrospectOAuth2TokenWithIAMResponse
200
223
 
224
+ InvalidGrantException.add_member(:error, Shapes::ShapeRef.new(shape: OAuth2ErrorCode, required: true, location_name: "error"))
225
+ InvalidGrantException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
226
+ InvalidGrantException.struct_class = Types::InvalidGrantException
227
+
228
+ InvalidScopeException.add_member(:error, Shapes::ShapeRef.new(shape: OAuth2ErrorCode, required: true, location_name: "error"))
229
+ InvalidScopeException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
230
+ InvalidScopeException.struct_class = Types::InvalidScopeException
231
+
201
232
  ListResourcePermissionStatementsInput.add_member(:max_results, Shapes::ShapeRef.new(shape: ConsolePermissionMaxResults, location_name: "maxResults"))
202
233
  ListResourcePermissionStatementsInput.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "nextToken"))
203
234
  ListResourcePermissionStatementsInput.struct_class = Types::ListResourcePermissionStatementsInput
@@ -260,6 +291,10 @@ module Aws::Signin
260
291
  ServiceQuotaExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
261
292
  ServiceQuotaExceededException.struct_class = Types::ServiceQuotaExceededException
262
293
 
294
+ ServiceUnavailableException.add_member(:error, Shapes::ShapeRef.new(shape: OAuth2ErrorCode, required: true, location_name: "error"))
295
+ ServiceUnavailableException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
296
+ ServiceUnavailableException.struct_class = Types::ServiceUnavailableException
297
+
263
298
  SigninResourceBasedPolicy.add_member(:version, Shapes::ShapeRef.new(shape: String, location_name: "Version"))
264
299
  SigninResourceBasedPolicy.add_member(:statement, Shapes::ShapeRef.new(shape: PolicyStatements, location_name: "Statement"))
265
300
  SigninResourceBasedPolicy.struct_class = Types::SigninResourceBasedPolicy
@@ -317,6 +352,22 @@ module Aws::Signin
317
352
  o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
318
353
  end)
319
354
 
355
+ api.add_operation(:create_o_auth_2_token_with_token_exchange, Seahorse::Model::Operation.new.tap do |o|
356
+ o.name = "CreateOAuth2TokenWithTokenExchange"
357
+ o.http_method = "POST"
358
+ o.http_request_uri = "/v1/token?x-amz-oauth-token-method=token-exchange"
359
+ o['authtype'] = "none"
360
+ o['auth'] = ["smithy.api#noAuth"]
361
+ o.input = Shapes::ShapeRef.new(shape: CreateOAuth2TokenWithTokenExchangeRequest)
362
+ o.output = Shapes::ShapeRef.new(shape: CreateOAuth2TokenWithTokenExchangeResponse)
363
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantException)
364
+ o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
365
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsError)
366
+ o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableException)
367
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
368
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
369
+ end)
370
+
320
371
  api.add_operation(:delete_console_authorization_configuration, Seahorse::Model::Operation.new.tap do |o|
321
372
  o.name = "DeleteConsoleAuthorizationConfiguration"
322
373
  o.http_method = "POST"
@@ -21,6 +21,15 @@ module Aws::Signin
21
21
  end
22
22
  end
23
23
 
24
+ class CreateOAuth2TokenWithTokenExchange
25
+ def self.build(context)
26
+ Aws::Signin::EndpointParameters.create(
27
+ context.config,
28
+ is_o_auth_endpoint: true,
29
+ )
30
+ end
31
+ end
32
+
24
33
  class DeleteConsoleAuthorizationConfiguration
25
34
  def self.build(context)
26
35
  Aws::Signin::EndpointParameters.create(
@@ -107,6 +116,8 @@ module Aws::Signin
107
116
  case context.operation_name
108
117
  when :create_o_auth_2_token_with_iam
109
118
  CreateOAuth2TokenWithIAM.build(context)
119
+ when :create_o_auth_2_token_with_token_exchange
120
+ CreateOAuth2TokenWithTokenExchange.build(context)
110
121
  when :delete_console_authorization_configuration
111
122
  DeleteConsoleAuthorizationConfiguration.build(context)
112
123
  when :delete_resource_permission_statement
@@ -30,8 +30,11 @@ module Aws::Signin
30
30
  # * {AccessDeniedException}
31
31
  # * {ConflictException}
32
32
  # * {InternalServerException}
33
+ # * {InvalidGrantException}
34
+ # * {InvalidScopeException}
33
35
  # * {ResourceNotFoundException}
34
36
  # * {ServiceQuotaExceededException}
37
+ # * {ServiceUnavailableException}
35
38
  # * {TooManyRequestsError}
36
39
  # * {ValidationException}
37
40
  #
@@ -101,6 +104,46 @@ module Aws::Signin
101
104
  end
102
105
  end
103
106
 
107
+ class InvalidGrantException < ServiceError
108
+
109
+ # @param [Seahorse::Client::RequestContext] context
110
+ # @param [String] message
111
+ # @param [Aws::Signin::Types::InvalidGrantException] data
112
+ def initialize(context, message, data = Aws::EmptyStructure.new)
113
+ super(context, message, data)
114
+ end
115
+
116
+ # @return [String]
117
+ def error
118
+ @data[:error]
119
+ end
120
+
121
+ # @return [String]
122
+ def message
123
+ @message || @data[:message]
124
+ end
125
+ end
126
+
127
+ class InvalidScopeException < ServiceError
128
+
129
+ # @param [Seahorse::Client::RequestContext] context
130
+ # @param [String] message
131
+ # @param [Aws::Signin::Types::InvalidScopeException] data
132
+ def initialize(context, message, data = Aws::EmptyStructure.new)
133
+ super(context, message, data)
134
+ end
135
+
136
+ # @return [String]
137
+ def error
138
+ @data[:error]
139
+ end
140
+
141
+ # @return [String]
142
+ def message
143
+ @message || @data[:message]
144
+ end
145
+ end
146
+
104
147
  class ResourceNotFoundException < ServiceError
105
148
 
106
149
  # @param [Seahorse::Client::RequestContext] context
@@ -141,6 +184,30 @@ module Aws::Signin
141
184
  end
142
185
  end
143
186
 
187
+ class ServiceUnavailableException < ServiceError
188
+
189
+ # @param [Seahorse::Client::RequestContext] context
190
+ # @param [String] message
191
+ # @param [Aws::Signin::Types::ServiceUnavailableException] data
192
+ def initialize(context, message, data = Aws::EmptyStructure.new)
193
+ super(context, message, data)
194
+ end
195
+
196
+ # @return [String]
197
+ def error
198
+ @data[:error]
199
+ end
200
+
201
+ # @return [String]
202
+ def message
203
+ @message || @data[:message]
204
+ end
205
+
206
+ def retryable?
207
+ true
208
+ end
209
+ end
210
+
144
211
  class TooManyRequestsError < ServiceError
145
212
 
146
213
  # @param [Seahorse::Client::RequestContext] context