aws-sdk-core 3.186.0 → 3.187.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,6 +15,7 @@ module Aws::SSOOIDC
15
15
 
16
16
  AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
17
17
  AccessToken = Shapes::StringShape.new(name: 'AccessToken')
18
+ Assertion = Shapes::StringShape.new(name: 'Assertion')
18
19
  AuthCode = Shapes::StringShape.new(name: 'AuthCode')
19
20
  AuthorizationPendingException = Shapes::StructureShape.new(name: 'AuthorizationPendingException')
20
21
  ClientId = Shapes::StringShape.new(name: 'ClientId')
@@ -23,6 +24,8 @@ module Aws::SSOOIDC
23
24
  ClientType = Shapes::StringShape.new(name: 'ClientType')
24
25
  CreateTokenRequest = Shapes::StructureShape.new(name: 'CreateTokenRequest')
25
26
  CreateTokenResponse = Shapes::StructureShape.new(name: 'CreateTokenResponse')
27
+ CreateTokenWithIAMRequest = Shapes::StructureShape.new(name: 'CreateTokenWithIAMRequest')
28
+ CreateTokenWithIAMResponse = Shapes::StructureShape.new(name: 'CreateTokenWithIAMResponse')
26
29
  DeviceCode = Shapes::StringShape.new(name: 'DeviceCode')
27
30
  Error = Shapes::StringShape.new(name: 'Error')
28
31
  ErrorDescription = Shapes::StringShape.new(name: 'ErrorDescription')
@@ -36,9 +39,12 @@ module Aws::SSOOIDC
36
39
  InvalidClientMetadataException = Shapes::StructureShape.new(name: 'InvalidClientMetadataException')
37
40
  InvalidGrantException = Shapes::StructureShape.new(name: 'InvalidGrantException')
38
41
  InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
42
+ InvalidRequestRegionException = Shapes::StructureShape.new(name: 'InvalidRequestRegionException')
39
43
  InvalidScopeException = Shapes::StructureShape.new(name: 'InvalidScopeException')
44
+ Location = Shapes::StringShape.new(name: 'Location')
40
45
  LongTimeStampType = Shapes::IntegerShape.new(name: 'LongTimeStampType')
41
46
  RefreshToken = Shapes::StringShape.new(name: 'RefreshToken')
47
+ Region = Shapes::StringShape.new(name: 'Region')
42
48
  RegisterClientRequest = Shapes::StructureShape.new(name: 'RegisterClientRequest')
43
49
  RegisterClientResponse = Shapes::StructureShape.new(name: 'RegisterClientResponse')
44
50
  Scope = Shapes::StringShape.new(name: 'Scope')
@@ -46,7 +52,9 @@ module Aws::SSOOIDC
46
52
  SlowDownException = Shapes::StructureShape.new(name: 'SlowDownException')
47
53
  StartDeviceAuthorizationRequest = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationRequest')
48
54
  StartDeviceAuthorizationResponse = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationResponse')
55
+ SubjectToken = Shapes::StringShape.new(name: 'SubjectToken')
49
56
  TokenType = Shapes::StringShape.new(name: 'TokenType')
57
+ TokenTypeURI = Shapes::StringShape.new(name: 'TokenTypeURI')
50
58
  URI = Shapes::StringShape.new(name: 'URI')
51
59
  UnauthorizedClientException = Shapes::StructureShape.new(name: 'UnauthorizedClientException')
52
60
  UnsupportedGrantTypeException = Shapes::StructureShape.new(name: 'UnsupportedGrantTypeException')
@@ -77,6 +85,27 @@ module Aws::SSOOIDC
77
85
  CreateTokenResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
78
86
  CreateTokenResponse.struct_class = Types::CreateTokenResponse
79
87
 
88
+ CreateTokenWithIAMRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
89
+ CreateTokenWithIAMRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: GrantType, required: true, location_name: "grantType"))
90
+ CreateTokenWithIAMRequest.add_member(:code, Shapes::ShapeRef.new(shape: AuthCode, location_name: "code"))
91
+ CreateTokenWithIAMRequest.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
92
+ CreateTokenWithIAMRequest.add_member(:assertion, Shapes::ShapeRef.new(shape: Assertion, location_name: "assertion"))
93
+ CreateTokenWithIAMRequest.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
94
+ CreateTokenWithIAMRequest.add_member(:redirect_uri, Shapes::ShapeRef.new(shape: URI, location_name: "redirectUri"))
95
+ CreateTokenWithIAMRequest.add_member(:subject_token, Shapes::ShapeRef.new(shape: SubjectToken, location_name: "subjectToken"))
96
+ CreateTokenWithIAMRequest.add_member(:subject_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "subjectTokenType"))
97
+ CreateTokenWithIAMRequest.add_member(:requested_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "requestedTokenType"))
98
+ CreateTokenWithIAMRequest.struct_class = Types::CreateTokenWithIAMRequest
99
+
100
+ CreateTokenWithIAMResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessToken, location_name: "accessToken"))
101
+ CreateTokenWithIAMResponse.add_member(:token_type, Shapes::ShapeRef.new(shape: TokenType, location_name: "tokenType"))
102
+ CreateTokenWithIAMResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: ExpirationInSeconds, location_name: "expiresIn"))
103
+ CreateTokenWithIAMResponse.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
104
+ CreateTokenWithIAMResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
105
+ CreateTokenWithIAMResponse.add_member(:issued_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "issuedTokenType"))
106
+ CreateTokenWithIAMResponse.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
107
+ CreateTokenWithIAMResponse.struct_class = Types::CreateTokenWithIAMResponse
108
+
80
109
  ExpiredTokenException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
81
110
  ExpiredTokenException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
82
111
  ExpiredTokenException.struct_class = Types::ExpiredTokenException
@@ -101,6 +130,12 @@ module Aws::SSOOIDC
101
130
  InvalidRequestException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
102
131
  InvalidRequestException.struct_class = Types::InvalidRequestException
103
132
 
133
+ InvalidRequestRegionException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
134
+ InvalidRequestRegionException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
135
+ InvalidRequestRegionException.add_member(:endpoint, Shapes::ShapeRef.new(shape: Location, location_name: "endpoint"))
136
+ InvalidRequestRegionException.add_member(:region, Shapes::ShapeRef.new(shape: Region, location_name: "region"))
137
+ InvalidRequestRegionException.struct_class = Types::InvalidRequestRegionException
138
+
104
139
  InvalidScopeException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
105
140
  InvalidScopeException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
106
141
  InvalidScopeException.struct_class = Types::InvalidScopeException
@@ -160,7 +195,7 @@ module Aws::SSOOIDC
160
195
  "serviceFullName" => "AWS SSO OIDC",
161
196
  "serviceId" => "SSO OIDC",
162
197
  "signatureVersion" => "v4",
163
- "signingName" => "awsssooidc",
198
+ "signingName" => "sso-oauth",
164
199
  "uid" => "sso-oidc-2019-06-10",
165
200
  }
166
201
 
@@ -184,6 +219,26 @@ module Aws::SSOOIDC
184
219
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
185
220
  end)
186
221
 
222
+ api.add_operation(:create_token_with_iam, Seahorse::Model::Operation.new.tap do |o|
223
+ o.name = "CreateTokenWithIAM"
224
+ o.http_method = "POST"
225
+ o.http_request_uri = "/token?aws_iam=t"
226
+ o.input = Shapes::ShapeRef.new(shape: CreateTokenWithIAMRequest)
227
+ o.output = Shapes::ShapeRef.new(shape: CreateTokenWithIAMResponse)
228
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
229
+ o.errors << Shapes::ShapeRef.new(shape: InvalidClientException)
230
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantException)
231
+ o.errors << Shapes::ShapeRef.new(shape: UnauthorizedClientException)
232
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedGrantTypeException)
233
+ o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
234
+ o.errors << Shapes::ShapeRef.new(shape: AuthorizationPendingException)
235
+ o.errors << Shapes::ShapeRef.new(shape: SlowDownException)
236
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
237
+ o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
238
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
239
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestRegionException)
240
+ end)
241
+
187
242
  api.add_operation(:register_client, Seahorse::Model::Operation.new.tap do |o|
188
243
  o.name = "RegisterClient"
189
244
  o.http_method = "POST"
@@ -32,8 +32,8 @@ module Aws::SSOOIDC
32
32
  raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
33
  end
34
34
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
35
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
36
- if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
35
+ if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
36
+ if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
37
37
  return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.amazonaws.com", headers: {}, properties: {})
38
38
  end
39
39
  return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
@@ -26,6 +26,20 @@ module Aws::SSOOIDC
26
26
  end
27
27
  end
28
28
 
29
+ class CreateTokenWithIAM
30
+ def self.build(context)
31
+ unless context.config.regional_endpoint
32
+ endpoint = context.config.endpoint.to_s
33
+ end
34
+ Aws::SSOOIDC::EndpointParameters.new(
35
+ region: context.config.region,
36
+ use_dual_stack: context.config.use_dualstack_endpoint,
37
+ use_fips: context.config.use_fips_endpoint,
38
+ endpoint: endpoint,
39
+ )
40
+ end
41
+ end
42
+
29
43
  class RegisterClient
30
44
  def self.build(context)
31
45
  unless context.config.regional_endpoint
@@ -35,6 +35,7 @@ module Aws::SSOOIDC
35
35
  # * {InvalidClientMetadataException}
36
36
  # * {InvalidGrantException}
37
37
  # * {InvalidRequestException}
38
+ # * {InvalidRequestRegionException}
38
39
  # * {InvalidScopeException}
39
40
  # * {SlowDownException}
40
41
  # * {UnauthorizedClientException}
@@ -206,6 +207,36 @@ module Aws::SSOOIDC
206
207
  end
207
208
  end
208
209
 
210
+ class InvalidRequestRegionException < ServiceError
211
+
212
+ # @param [Seahorse::Client::RequestContext] context
213
+ # @param [String] message
214
+ # @param [Aws::SSOOIDC::Types::InvalidRequestRegionException] data
215
+ def initialize(context, message, data = Aws::EmptyStructure.new)
216
+ super(context, message, data)
217
+ end
218
+
219
+ # @return [String]
220
+ def error
221
+ @data[:error]
222
+ end
223
+
224
+ # @return [String]
225
+ def error_description
226
+ @data[:error_description]
227
+ end
228
+
229
+ # @return [String]
230
+ def endpoint
231
+ @data[:endpoint]
232
+ end
233
+
234
+ # @return [String]
235
+ def region
236
+ @data[:region]
237
+ end
238
+ end
239
+
209
240
  class InvalidScopeException < ServiceError
210
241
 
211
242
  # @param [Seahorse::Client::RequestContext] context
@@ -58,6 +58,8 @@ module Aws::SSOOIDC
58
58
  case context.operation_name
59
59
  when :create_token
60
60
  Aws::SSOOIDC::Endpoints::CreateToken.build(context)
61
+ when :create_token_with_iam
62
+ Aws::SSOOIDC::Endpoints::CreateTokenWithIAM.build(context)
61
63
  when :register_client
62
64
  Aws::SSOOIDC::Endpoints::RegisterClient.build(context)
63
65
  when :start_device_authorization