aws-sdk-sso 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-sso.rb +47 -0
- data/lib/aws-sdk-sso/client.rb +469 -0
- data/lib/aws-sdk-sso/client_api.rb +188 -0
- data/lib/aws-sdk-sso/customizations.rb +0 -0
- data/lib/aws-sdk-sso/errors.rb +78 -0
- data/lib/aws-sdk-sso/resource.rb +23 -0
- data/lib/aws-sdk-sso/types.rb +336 -0
- metadata +87 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ea683ddb427161679e649f7dc5a90edc9609b726060469a056d04909d2fdc11c
|
4
|
+
data.tar.gz: 57e63898c1a090f46c311cd49ea39aeb71c257f6376211c5e531d62032ab2bb3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4da10aab29aa94deaa69832b47d3884f03465689f02c8490199108abde854a494b1cd37db105a7414bb45d3946473afd69c269f5fc4ec0dc6212c31cfbc3f62d
|
7
|
+
data.tar.gz: 4c47cd84dcb6200f1acdccf83e95015d991dd3f925b5e370485816a296fefceae0be1de61dccdccb14f27d862ef7e2d719f29c7860abfcfaf87c3327211c316b
|
data/lib/aws-sdk-sso.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-sso/types'
|
12
|
+
require_relative 'aws-sdk-sso/client_api'
|
13
|
+
require_relative 'aws-sdk-sso/client'
|
14
|
+
require_relative 'aws-sdk-sso/errors'
|
15
|
+
require_relative 'aws-sdk-sso/resource'
|
16
|
+
require_relative 'aws-sdk-sso/customizations'
|
17
|
+
|
18
|
+
# This module provides support for AWS Single Sign-On. This module is available in the
|
19
|
+
# `aws-sdk-sso` gem.
|
20
|
+
#
|
21
|
+
# # Client
|
22
|
+
#
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
25
|
+
# structure.
|
26
|
+
#
|
27
|
+
# See {Client} for more information.
|
28
|
+
#
|
29
|
+
# # Errors
|
30
|
+
#
|
31
|
+
# Errors returned from AWS Single Sign-On all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::SSO::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::SSO
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,469 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/endpoint_discovery.rb'
|
19
|
+
require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
20
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
21
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
22
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
23
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
24
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
|
+
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
|
+
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
29
|
+
|
30
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:sso)
|
31
|
+
|
32
|
+
module Aws::SSO
|
33
|
+
class Client < Seahorse::Client::Base
|
34
|
+
|
35
|
+
include Aws::ClientStubs
|
36
|
+
|
37
|
+
@identifier = :sso
|
38
|
+
|
39
|
+
set_api(ClientApi::API)
|
40
|
+
|
41
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
42
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
43
|
+
add_plugin(Aws::Plugins::Logging)
|
44
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
45
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
46
|
+
add_plugin(Aws::Plugins::UserAgent)
|
47
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
48
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
49
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
50
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
51
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
52
|
+
add_plugin(Aws::Plugins::EndpointPattern)
|
53
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
54
|
+
add_plugin(Aws::Plugins::StubResponses)
|
55
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
56
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
57
|
+
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
58
|
+
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
59
|
+
add_plugin(Aws::Plugins::TransferEncoding)
|
60
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
61
|
+
add_plugin(Aws::Plugins::Protocols::RestJson)
|
62
|
+
|
63
|
+
# @overload initialize(options)
|
64
|
+
# @param [Hash] options
|
65
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
66
|
+
# Your AWS credentials. This can be an instance of any one of the
|
67
|
+
# following classes:
|
68
|
+
#
|
69
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
70
|
+
# credentials.
|
71
|
+
#
|
72
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
73
|
+
# from an EC2 IMDS on an EC2 instance.
|
74
|
+
#
|
75
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
76
|
+
# shared file, such as `~/.aws/config`.
|
77
|
+
#
|
78
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
79
|
+
#
|
80
|
+
# When `:credentials` are not configured directly, the following
|
81
|
+
# locations will be searched for credentials:
|
82
|
+
#
|
83
|
+
# * `Aws.config[:credentials]`
|
84
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
85
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
86
|
+
# * `~/.aws/credentials`
|
87
|
+
# * `~/.aws/config`
|
88
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
89
|
+
# very aggressive. Construct and pass an instance of
|
90
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
91
|
+
# timeouts.
|
92
|
+
#
|
93
|
+
# @option options [required, String] :region
|
94
|
+
# The AWS region to connect to. The configured `:region` is
|
95
|
+
# used to determine the service `:endpoint`. When not passed,
|
96
|
+
# a default `:region` is search for in the following locations:
|
97
|
+
#
|
98
|
+
# * `Aws.config[:region]`
|
99
|
+
# * `ENV['AWS_REGION']`
|
100
|
+
# * `ENV['AMAZON_REGION']`
|
101
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
102
|
+
# * `~/.aws/credentials`
|
103
|
+
# * `~/.aws/config`
|
104
|
+
#
|
105
|
+
# @option options [String] :access_key_id
|
106
|
+
#
|
107
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
108
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
109
|
+
# the background every 60 secs (default). Defaults to `false`.
|
110
|
+
#
|
111
|
+
# @option options [Boolean] :client_side_monitoring (false)
|
112
|
+
# When `true`, client-side metrics will be collected for all API requests from
|
113
|
+
# this client.
|
114
|
+
#
|
115
|
+
# @option options [String] :client_side_monitoring_client_id ("")
|
116
|
+
# Allows you to provide an identifier for this client which will be attached to
|
117
|
+
# all generated client side metrics. Defaults to an empty string.
|
118
|
+
#
|
119
|
+
# @option options [String] :client_side_monitoring_host ("127.0.0.1")
|
120
|
+
# Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
|
121
|
+
# side monitoring agent is running on, where client metrics will be published via UDP.
|
122
|
+
#
|
123
|
+
# @option options [Integer] :client_side_monitoring_port (31000)
|
124
|
+
# Required for publishing client metrics. The port that the client side monitoring
|
125
|
+
# agent is running on, where client metrics will be published via UDP.
|
126
|
+
#
|
127
|
+
# @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
|
128
|
+
# Allows you to provide a custom client-side monitoring publisher class. By default,
|
129
|
+
# will use the Client Side Monitoring Agent Publisher.
|
130
|
+
#
|
131
|
+
# @option options [Boolean] :convert_params (true)
|
132
|
+
# When `true`, an attempt is made to coerce request parameters into
|
133
|
+
# the required types.
|
134
|
+
#
|
135
|
+
# @option options [Boolean] :disable_host_prefix_injection (false)
|
136
|
+
# Set to true to disable SDK automatically adding host prefix
|
137
|
+
# to default service endpoint when available.
|
138
|
+
#
|
139
|
+
# @option options [String] :endpoint
|
140
|
+
# The client endpoint is normally constructed from the `:region`
|
141
|
+
# option. You should only configure an `:endpoint` when connecting
|
142
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
143
|
+
#
|
144
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
145
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
146
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
147
|
+
#
|
148
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
149
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
150
|
+
#
|
151
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
152
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
153
|
+
# Use this option to config the time interval in seconds for making
|
154
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
155
|
+
#
|
156
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
157
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
|
158
|
+
#
|
159
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
160
|
+
# The log formatter.
|
161
|
+
#
|
162
|
+
# @option options [Symbol] :log_level (:info)
|
163
|
+
# The log level to send messages to the `:logger` at.
|
164
|
+
#
|
165
|
+
# @option options [Logger] :logger
|
166
|
+
# The Logger instance to send log messages to. If this option
|
167
|
+
# is not set, logging will be disabled.
|
168
|
+
#
|
169
|
+
# @option options [String] :profile ("default")
|
170
|
+
# Used when loading credentials from the shared credentials file
|
171
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
172
|
+
#
|
173
|
+
# @option options [Float] :retry_base_delay (0.3)
|
174
|
+
# The base delay in seconds used by the default backoff function.
|
175
|
+
#
|
176
|
+
# @option options [Symbol] :retry_jitter (:none)
|
177
|
+
# A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
|
178
|
+
#
|
179
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
180
|
+
#
|
181
|
+
# @option options [Integer] :retry_limit (3)
|
182
|
+
# The maximum number of times to retry failed requests. Only
|
183
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
184
|
+
# are retried. Generally, these are throttling errors, data
|
185
|
+
# checksum errors, networking errors, timeout errors and auth
|
186
|
+
# errors from expired credentials.
|
187
|
+
#
|
188
|
+
# @option options [Integer] :retry_max_delay (0)
|
189
|
+
# The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
|
190
|
+
#
|
191
|
+
# @option options [String] :secret_access_key
|
192
|
+
#
|
193
|
+
# @option options [String] :session_token
|
194
|
+
#
|
195
|
+
# @option options [Boolean] :stub_responses (false)
|
196
|
+
# Causes the client to return stubbed responses. By default
|
197
|
+
# fake responses are generated and returned. You can specify
|
198
|
+
# the response data to return or errors to raise by calling
|
199
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
200
|
+
#
|
201
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
202
|
+
# requests are made, and retries are disabled.
|
203
|
+
#
|
204
|
+
# @option options [Boolean] :validate_params (true)
|
205
|
+
# When `true`, request parameters are validated before
|
206
|
+
# sending the request.
|
207
|
+
#
|
208
|
+
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
209
|
+
# requests through. Formatted like 'http://proxy.com:123'.
|
210
|
+
#
|
211
|
+
# @option options [Float] :http_open_timeout (15) The number of
|
212
|
+
# seconds to wait when opening a HTTP session before rasing a
|
213
|
+
# `Timeout::Error`.
|
214
|
+
#
|
215
|
+
# @option options [Integer] :http_read_timeout (60) The default
|
216
|
+
# number of seconds to wait for response data. This value can
|
217
|
+
# safely be set
|
218
|
+
# per-request on the session yeidled by {#session_for}.
|
219
|
+
#
|
220
|
+
# @option options [Float] :http_idle_timeout (5) The number of
|
221
|
+
# seconds a connection is allowed to sit idble before it is
|
222
|
+
# considered stale. Stale connections are closed and removed
|
223
|
+
# from the pool before making a request.
|
224
|
+
#
|
225
|
+
# @option options [Float] :http_continue_timeout (1) The number of
|
226
|
+
# seconds to wait for a 100-continue response before sending the
|
227
|
+
# request body. This option has no effect unless the request has
|
228
|
+
# "Expect" header set to "100-continue". Defaults to `nil` which
|
229
|
+
# disables this behaviour. This value can safely be set per
|
230
|
+
# request on the session yeidled by {#session_for}.
|
231
|
+
#
|
232
|
+
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
233
|
+
# HTTP debug output will be sent to the `:logger`.
|
234
|
+
#
|
235
|
+
# @option options [Boolean] :ssl_verify_peer (true) When `true`,
|
236
|
+
# SSL peer certificates are verified when establishing a
|
237
|
+
# connection.
|
238
|
+
#
|
239
|
+
# @option options [String] :ssl_ca_bundle Full path to the SSL
|
240
|
+
# certificate authority bundle file that should be used when
|
241
|
+
# verifying peer certificates. If you do not pass
|
242
|
+
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
243
|
+
# will be used if available.
|
244
|
+
#
|
245
|
+
# @option options [String] :ssl_ca_directory Full path of the
|
246
|
+
# directory that contains the unbundled SSL certificate
|
247
|
+
# authority files for verifying peer certificates. If you do
|
248
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
249
|
+
# system default will be used if available.
|
250
|
+
#
|
251
|
+
def initialize(*args)
|
252
|
+
super
|
253
|
+
end
|
254
|
+
|
255
|
+
# @!group API Operations
|
256
|
+
|
257
|
+
# Returns the STS short-term credentials for a given role name that is
|
258
|
+
# assigned to the user.
|
259
|
+
#
|
260
|
+
# @option params [required, String] :role_name
|
261
|
+
# The friendly name of the role that is assigned to the user.
|
262
|
+
#
|
263
|
+
# @option params [required, String] :account_id
|
264
|
+
# The identifier for the AWS account that is assigned to the user.
|
265
|
+
#
|
266
|
+
# @option params [required, String] :access_token
|
267
|
+
# The token issued by the `CreateToken` API call. For more information,
|
268
|
+
# see [CreateToken][1] in the *AWS SSO OIDC API Reference Guide*.
|
269
|
+
#
|
270
|
+
#
|
271
|
+
#
|
272
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
|
273
|
+
#
|
274
|
+
# @return [Types::GetRoleCredentialsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
275
|
+
#
|
276
|
+
# * {Types::GetRoleCredentialsResponse#role_credentials #role_credentials} => Types::RoleCredentials
|
277
|
+
#
|
278
|
+
# @example Request syntax with placeholder values
|
279
|
+
#
|
280
|
+
# resp = client.get_role_credentials({
|
281
|
+
# role_name: "RoleNameType", # required
|
282
|
+
# account_id: "AccountIdType", # required
|
283
|
+
# access_token: "AccessTokenType", # required
|
284
|
+
# })
|
285
|
+
#
|
286
|
+
# @example Response structure
|
287
|
+
#
|
288
|
+
# resp.role_credentials.access_key_id #=> String
|
289
|
+
# resp.role_credentials.secret_access_key #=> String
|
290
|
+
# resp.role_credentials.session_token #=> String
|
291
|
+
# resp.role_credentials.expiration #=> Integer
|
292
|
+
#
|
293
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials AWS API Documentation
|
294
|
+
#
|
295
|
+
# @overload get_role_credentials(params = {})
|
296
|
+
# @param [Hash] params ({})
|
297
|
+
def get_role_credentials(params = {}, options = {})
|
298
|
+
req = build_request(:get_role_credentials, params)
|
299
|
+
req.send_request(options)
|
300
|
+
end
|
301
|
+
|
302
|
+
# Lists all roles that are assigned to the user for a given AWS account.
|
303
|
+
#
|
304
|
+
# @option params [String] :next_token
|
305
|
+
# The page token from the previous response output when you request
|
306
|
+
# subsequent pages.
|
307
|
+
#
|
308
|
+
# @option params [Integer] :max_results
|
309
|
+
# The number of items that clients can request per page.
|
310
|
+
#
|
311
|
+
# @option params [required, String] :access_token
|
312
|
+
# The token issued by the `CreateToken` API call. For more information,
|
313
|
+
# see [CreateToken][1] in the *AWS SSO OIDC API Reference Guide*.
|
314
|
+
#
|
315
|
+
#
|
316
|
+
#
|
317
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
|
318
|
+
#
|
319
|
+
# @option params [required, String] :account_id
|
320
|
+
# The identifier for the AWS account that is assigned to the user.
|
321
|
+
#
|
322
|
+
# @return [Types::ListAccountRolesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
323
|
+
#
|
324
|
+
# * {Types::ListAccountRolesResponse#next_token #next_token} => String
|
325
|
+
# * {Types::ListAccountRolesResponse#role_list #role_list} => Array<Types::RoleInfo>
|
326
|
+
#
|
327
|
+
# @example Request syntax with placeholder values
|
328
|
+
#
|
329
|
+
# resp = client.list_account_roles({
|
330
|
+
# next_token: "NextTokenType",
|
331
|
+
# max_results: 1,
|
332
|
+
# access_token: "AccessTokenType", # required
|
333
|
+
# account_id: "AccountIdType", # required
|
334
|
+
# })
|
335
|
+
#
|
336
|
+
# @example Response structure
|
337
|
+
#
|
338
|
+
# resp.next_token #=> String
|
339
|
+
# resp.role_list #=> Array
|
340
|
+
# resp.role_list[0].role_name #=> String
|
341
|
+
# resp.role_list[0].account_id #=> String
|
342
|
+
#
|
343
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles AWS API Documentation
|
344
|
+
#
|
345
|
+
# @overload list_account_roles(params = {})
|
346
|
+
# @param [Hash] params ({})
|
347
|
+
def list_account_roles(params = {}, options = {})
|
348
|
+
req = build_request(:list_account_roles, params)
|
349
|
+
req.send_request(options)
|
350
|
+
end
|
351
|
+
|
352
|
+
# Lists all AWS accounts assigned to the user. These AWS accounts are
|
353
|
+
# assigned by the administrator of the account. For more information,
|
354
|
+
# see [Assign User Access][1] in the *AWS SSO User Guide*. This
|
355
|
+
# operation returns a paginated response.
|
356
|
+
#
|
357
|
+
#
|
358
|
+
#
|
359
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers
|
360
|
+
#
|
361
|
+
# @option params [String] :next_token
|
362
|
+
# (Optional) When requesting subsequent pages, this is the page token
|
363
|
+
# from the previous response output.
|
364
|
+
#
|
365
|
+
# @option params [Integer] :max_results
|
366
|
+
# This is the number of items clients can request per page.
|
367
|
+
#
|
368
|
+
# @option params [required, String] :access_token
|
369
|
+
# The token issued by the `CreateToken` API call. For more information,
|
370
|
+
# see [CreateToken][1] in the *AWS SSO OIDC API Reference Guide*.
|
371
|
+
#
|
372
|
+
#
|
373
|
+
#
|
374
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
|
375
|
+
#
|
376
|
+
# @return [Types::ListAccountsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
377
|
+
#
|
378
|
+
# * {Types::ListAccountsResponse#next_token #next_token} => String
|
379
|
+
# * {Types::ListAccountsResponse#account_list #account_list} => Array<Types::AccountInfo>
|
380
|
+
#
|
381
|
+
# @example Request syntax with placeholder values
|
382
|
+
#
|
383
|
+
# resp = client.list_accounts({
|
384
|
+
# next_token: "NextTokenType",
|
385
|
+
# max_results: 1,
|
386
|
+
# access_token: "AccessTokenType", # required
|
387
|
+
# })
|
388
|
+
#
|
389
|
+
# @example Response structure
|
390
|
+
#
|
391
|
+
# resp.next_token #=> String
|
392
|
+
# resp.account_list #=> Array
|
393
|
+
# resp.account_list[0].account_id #=> String
|
394
|
+
# resp.account_list[0].account_name #=> String
|
395
|
+
# resp.account_list[0].email_address #=> String
|
396
|
+
#
|
397
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts AWS API Documentation
|
398
|
+
#
|
399
|
+
# @overload list_accounts(params = {})
|
400
|
+
# @param [Hash] params ({})
|
401
|
+
def list_accounts(params = {}, options = {})
|
402
|
+
req = build_request(:list_accounts, params)
|
403
|
+
req.send_request(options)
|
404
|
+
end
|
405
|
+
|
406
|
+
# Removes the client- and server-side session that is associated with
|
407
|
+
# the user.
|
408
|
+
#
|
409
|
+
# @option params [required, String] :access_token
|
410
|
+
# The token issued by the `CreateToken` API call. For more information,
|
411
|
+
# see [CreateToken][1] in the *AWS SSO OIDC API Reference Guide*.
|
412
|
+
#
|
413
|
+
#
|
414
|
+
#
|
415
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
|
416
|
+
#
|
417
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
418
|
+
#
|
419
|
+
# @example Request syntax with placeholder values
|
420
|
+
#
|
421
|
+
# resp = client.logout({
|
422
|
+
# access_token: "AccessTokenType", # required
|
423
|
+
# })
|
424
|
+
#
|
425
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout AWS API Documentation
|
426
|
+
#
|
427
|
+
# @overload logout(params = {})
|
428
|
+
# @param [Hash] params ({})
|
429
|
+
def logout(params = {}, options = {})
|
430
|
+
req = build_request(:logout, params)
|
431
|
+
req.send_request(options)
|
432
|
+
end
|
433
|
+
|
434
|
+
# @!endgroup
|
435
|
+
|
436
|
+
# @param params ({})
|
437
|
+
# @api private
|
438
|
+
def build_request(operation_name, params = {})
|
439
|
+
handlers = @handlers.for(operation_name)
|
440
|
+
context = Seahorse::Client::RequestContext.new(
|
441
|
+
operation_name: operation_name,
|
442
|
+
operation: config.api.operation(operation_name),
|
443
|
+
client: self,
|
444
|
+
params: params,
|
445
|
+
config: config)
|
446
|
+
context[:gem_name] = 'aws-sdk-sso'
|
447
|
+
context[:gem_version] = '1.0.0'
|
448
|
+
Seahorse::Client::Request.new(handlers, context)
|
449
|
+
end
|
450
|
+
|
451
|
+
# @api private
|
452
|
+
# @deprecated
|
453
|
+
def waiter_names
|
454
|
+
[]
|
455
|
+
end
|
456
|
+
|
457
|
+
class << self
|
458
|
+
|
459
|
+
# @api private
|
460
|
+
attr_reader :identifier
|
461
|
+
|
462
|
+
# @api private
|
463
|
+
def errors_module
|
464
|
+
Errors
|
465
|
+
end
|
466
|
+
|
467
|
+
end
|
468
|
+
end
|
469
|
+
end
|
@@ -0,0 +1,188 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::SSO
|
9
|
+
# @api private
|
10
|
+
module ClientApi
|
11
|
+
|
12
|
+
include Seahorse::Model
|
13
|
+
|
14
|
+
AccessKeyType = Shapes::StringShape.new(name: 'AccessKeyType')
|
15
|
+
AccessTokenType = Shapes::StringShape.new(name: 'AccessTokenType')
|
16
|
+
AccountIdType = Shapes::StringShape.new(name: 'AccountIdType')
|
17
|
+
AccountInfo = Shapes::StructureShape.new(name: 'AccountInfo')
|
18
|
+
AccountListType = Shapes::ListShape.new(name: 'AccountListType')
|
19
|
+
AccountNameType = Shapes::StringShape.new(name: 'AccountNameType')
|
20
|
+
EmailAddressType = Shapes::StringShape.new(name: 'EmailAddressType')
|
21
|
+
ErrorDescription = Shapes::StringShape.new(name: 'ErrorDescription')
|
22
|
+
ExpirationTimestampType = Shapes::IntegerShape.new(name: 'ExpirationTimestampType')
|
23
|
+
GetRoleCredentialsRequest = Shapes::StructureShape.new(name: 'GetRoleCredentialsRequest')
|
24
|
+
GetRoleCredentialsResponse = Shapes::StructureShape.new(name: 'GetRoleCredentialsResponse')
|
25
|
+
InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
|
26
|
+
ListAccountRolesRequest = Shapes::StructureShape.new(name: 'ListAccountRolesRequest')
|
27
|
+
ListAccountRolesResponse = Shapes::StructureShape.new(name: 'ListAccountRolesResponse')
|
28
|
+
ListAccountsRequest = Shapes::StructureShape.new(name: 'ListAccountsRequest')
|
29
|
+
ListAccountsResponse = Shapes::StructureShape.new(name: 'ListAccountsResponse')
|
30
|
+
LogoutRequest = Shapes::StructureShape.new(name: 'LogoutRequest')
|
31
|
+
MaxResultType = Shapes::IntegerShape.new(name: 'MaxResultType')
|
32
|
+
NextTokenType = Shapes::StringShape.new(name: 'NextTokenType')
|
33
|
+
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
34
|
+
RoleCredentials = Shapes::StructureShape.new(name: 'RoleCredentials')
|
35
|
+
RoleInfo = Shapes::StructureShape.new(name: 'RoleInfo')
|
36
|
+
RoleListType = Shapes::ListShape.new(name: 'RoleListType')
|
37
|
+
RoleNameType = Shapes::StringShape.new(name: 'RoleNameType')
|
38
|
+
SecretAccessKeyType = Shapes::StringShape.new(name: 'SecretAccessKeyType')
|
39
|
+
SessionTokenType = Shapes::StringShape.new(name: 'SessionTokenType')
|
40
|
+
TooManyRequestsException = Shapes::StructureShape.new(name: 'TooManyRequestsException')
|
41
|
+
UnauthorizedException = Shapes::StructureShape.new(name: 'UnauthorizedException')
|
42
|
+
|
43
|
+
AccountInfo.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountIdType, location_name: "accountId"))
|
44
|
+
AccountInfo.add_member(:account_name, Shapes::ShapeRef.new(shape: AccountNameType, location_name: "accountName"))
|
45
|
+
AccountInfo.add_member(:email_address, Shapes::ShapeRef.new(shape: EmailAddressType, location_name: "emailAddress"))
|
46
|
+
AccountInfo.struct_class = Types::AccountInfo
|
47
|
+
|
48
|
+
AccountListType.member = Shapes::ShapeRef.new(shape: AccountInfo)
|
49
|
+
|
50
|
+
GetRoleCredentialsRequest.add_member(:role_name, Shapes::ShapeRef.new(shape: RoleNameType, required: true, location: "querystring", location_name: "role_name"))
|
51
|
+
GetRoleCredentialsRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountIdType, required: true, location: "querystring", location_name: "account_id"))
|
52
|
+
GetRoleCredentialsRequest.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessTokenType, required: true, location: "header", location_name: "x-amz-sso_bearer_token"))
|
53
|
+
GetRoleCredentialsRequest.struct_class = Types::GetRoleCredentialsRequest
|
54
|
+
|
55
|
+
GetRoleCredentialsResponse.add_member(:role_credentials, Shapes::ShapeRef.new(shape: RoleCredentials, location_name: "roleCredentials"))
|
56
|
+
GetRoleCredentialsResponse.struct_class = Types::GetRoleCredentialsResponse
|
57
|
+
|
58
|
+
InvalidRequestException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "message"))
|
59
|
+
InvalidRequestException.struct_class = Types::InvalidRequestException
|
60
|
+
|
61
|
+
ListAccountRolesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextTokenType, location: "querystring", location_name: "next_token"))
|
62
|
+
ListAccountRolesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultType, location: "querystring", location_name: "max_result"))
|
63
|
+
ListAccountRolesRequest.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessTokenType, required: true, location: "header", location_name: "x-amz-sso_bearer_token"))
|
64
|
+
ListAccountRolesRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountIdType, required: true, location: "querystring", location_name: "account_id"))
|
65
|
+
ListAccountRolesRequest.struct_class = Types::ListAccountRolesRequest
|
66
|
+
|
67
|
+
ListAccountRolesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextTokenType, location_name: "nextToken"))
|
68
|
+
ListAccountRolesResponse.add_member(:role_list, Shapes::ShapeRef.new(shape: RoleListType, location_name: "roleList"))
|
69
|
+
ListAccountRolesResponse.struct_class = Types::ListAccountRolesResponse
|
70
|
+
|
71
|
+
ListAccountsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextTokenType, location: "querystring", location_name: "next_token"))
|
72
|
+
ListAccountsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultType, location: "querystring", location_name: "max_result"))
|
73
|
+
ListAccountsRequest.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessTokenType, required: true, location: "header", location_name: "x-amz-sso_bearer_token"))
|
74
|
+
ListAccountsRequest.struct_class = Types::ListAccountsRequest
|
75
|
+
|
76
|
+
ListAccountsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextTokenType, location_name: "nextToken"))
|
77
|
+
ListAccountsResponse.add_member(:account_list, Shapes::ShapeRef.new(shape: AccountListType, location_name: "accountList"))
|
78
|
+
ListAccountsResponse.struct_class = Types::ListAccountsResponse
|
79
|
+
|
80
|
+
LogoutRequest.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessTokenType, required: true, location: "header", location_name: "x-amz-sso_bearer_token"))
|
81
|
+
LogoutRequest.struct_class = Types::LogoutRequest
|
82
|
+
|
83
|
+
ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "message"))
|
84
|
+
ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
|
85
|
+
|
86
|
+
RoleCredentials.add_member(:access_key_id, Shapes::ShapeRef.new(shape: AccessKeyType, location_name: "accessKeyId"))
|
87
|
+
RoleCredentials.add_member(:secret_access_key, Shapes::ShapeRef.new(shape: SecretAccessKeyType, location_name: "secretAccessKey"))
|
88
|
+
RoleCredentials.add_member(:session_token, Shapes::ShapeRef.new(shape: SessionTokenType, location_name: "sessionToken"))
|
89
|
+
RoleCredentials.add_member(:expiration, Shapes::ShapeRef.new(shape: ExpirationTimestampType, location_name: "expiration"))
|
90
|
+
RoleCredentials.struct_class = Types::RoleCredentials
|
91
|
+
|
92
|
+
RoleInfo.add_member(:role_name, Shapes::ShapeRef.new(shape: RoleNameType, location_name: "roleName"))
|
93
|
+
RoleInfo.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountIdType, location_name: "accountId"))
|
94
|
+
RoleInfo.struct_class = Types::RoleInfo
|
95
|
+
|
96
|
+
RoleListType.member = Shapes::ShapeRef.new(shape: RoleInfo)
|
97
|
+
|
98
|
+
TooManyRequestsException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "message"))
|
99
|
+
TooManyRequestsException.struct_class = Types::TooManyRequestsException
|
100
|
+
|
101
|
+
UnauthorizedException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "message"))
|
102
|
+
UnauthorizedException.struct_class = Types::UnauthorizedException
|
103
|
+
|
104
|
+
|
105
|
+
# @api private
|
106
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
107
|
+
|
108
|
+
api.version = "2019-06-10"
|
109
|
+
|
110
|
+
api.metadata = {
|
111
|
+
"apiVersion" => "2019-06-10",
|
112
|
+
"endpointPrefix" => "portal.sso",
|
113
|
+
"jsonVersion" => "1.1",
|
114
|
+
"protocol" => "rest-json",
|
115
|
+
"serviceAbbreviation" => "SSO",
|
116
|
+
"serviceFullName" => "AWS Single Sign-On",
|
117
|
+
"serviceId" => "SSO",
|
118
|
+
"signatureVersion" => "v4",
|
119
|
+
"signingName" => "awsssoportal",
|
120
|
+
"uid" => "sso-2019-06-10",
|
121
|
+
}
|
122
|
+
|
123
|
+
api.add_operation(:get_role_credentials, Seahorse::Model::Operation.new.tap do |o|
|
124
|
+
o.name = "GetRoleCredentials"
|
125
|
+
o.http_method = "GET"
|
126
|
+
o.http_request_uri = "/federation/credentials"
|
127
|
+
o['authtype'] = "none"
|
128
|
+
o.input = Shapes::ShapeRef.new(shape: GetRoleCredentialsRequest)
|
129
|
+
o.output = Shapes::ShapeRef.new(shape: GetRoleCredentialsResponse)
|
130
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
131
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
|
132
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
133
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
134
|
+
end)
|
135
|
+
|
136
|
+
api.add_operation(:list_account_roles, Seahorse::Model::Operation.new.tap do |o|
|
137
|
+
o.name = "ListAccountRoles"
|
138
|
+
o.http_method = "GET"
|
139
|
+
o.http_request_uri = "/assignment/roles"
|
140
|
+
o['authtype'] = "none"
|
141
|
+
o.input = Shapes::ShapeRef.new(shape: ListAccountRolesRequest)
|
142
|
+
o.output = Shapes::ShapeRef.new(shape: ListAccountRolesResponse)
|
143
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
144
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
|
145
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
146
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
147
|
+
o[:pager] = Aws::Pager.new(
|
148
|
+
limit_key: "max_results",
|
149
|
+
tokens: {
|
150
|
+
"next_token" => "next_token"
|
151
|
+
}
|
152
|
+
)
|
153
|
+
end)
|
154
|
+
|
155
|
+
api.add_operation(:list_accounts, Seahorse::Model::Operation.new.tap do |o|
|
156
|
+
o.name = "ListAccounts"
|
157
|
+
o.http_method = "GET"
|
158
|
+
o.http_request_uri = "/assignment/accounts"
|
159
|
+
o['authtype'] = "none"
|
160
|
+
o.input = Shapes::ShapeRef.new(shape: ListAccountsRequest)
|
161
|
+
o.output = Shapes::ShapeRef.new(shape: ListAccountsResponse)
|
162
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
163
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
|
164
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
165
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
166
|
+
o[:pager] = Aws::Pager.new(
|
167
|
+
limit_key: "max_results",
|
168
|
+
tokens: {
|
169
|
+
"next_token" => "next_token"
|
170
|
+
}
|
171
|
+
)
|
172
|
+
end)
|
173
|
+
|
174
|
+
api.add_operation(:logout, Seahorse::Model::Operation.new.tap do |o|
|
175
|
+
o.name = "Logout"
|
176
|
+
o.http_method = "POST"
|
177
|
+
o.http_request_uri = "/logout"
|
178
|
+
o['authtype'] = "none"
|
179
|
+
o.input = Shapes::ShapeRef.new(shape: LogoutRequest)
|
180
|
+
o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
|
181
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
|
182
|
+
o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
|
183
|
+
o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
|
184
|
+
end)
|
185
|
+
end
|
186
|
+
|
187
|
+
end
|
188
|
+
end
|
File without changes
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::SSO
|
9
|
+
module Errors
|
10
|
+
|
11
|
+
extend Aws::Errors::DynamicErrors
|
12
|
+
|
13
|
+
class InvalidRequestException < ServiceError
|
14
|
+
|
15
|
+
# @param [Seahorse::Client::RequestContext] context
|
16
|
+
# @param [String] message
|
17
|
+
# @param [Aws::SSO::Types::InvalidRequestException] data
|
18
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
19
|
+
super(context, message, data)
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [String]
|
23
|
+
def message
|
24
|
+
@message || @data[:message]
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
class ResourceNotFoundException < ServiceError
|
30
|
+
|
31
|
+
# @param [Seahorse::Client::RequestContext] context
|
32
|
+
# @param [String] message
|
33
|
+
# @param [Aws::SSO::Types::ResourceNotFoundException] data
|
34
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
35
|
+
super(context, message, data)
|
36
|
+
end
|
37
|
+
|
38
|
+
# @return [String]
|
39
|
+
def message
|
40
|
+
@message || @data[:message]
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
class TooManyRequestsException < ServiceError
|
46
|
+
|
47
|
+
# @param [Seahorse::Client::RequestContext] context
|
48
|
+
# @param [String] message
|
49
|
+
# @param [Aws::SSO::Types::TooManyRequestsException] data
|
50
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
51
|
+
super(context, message, data)
|
52
|
+
end
|
53
|
+
|
54
|
+
# @return [String]
|
55
|
+
def message
|
56
|
+
@message || @data[:message]
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
class UnauthorizedException < ServiceError
|
62
|
+
|
63
|
+
# @param [Seahorse::Client::RequestContext] context
|
64
|
+
# @param [String] message
|
65
|
+
# @param [Aws::SSO::Types::UnauthorizedException] data
|
66
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
67
|
+
super(context, message, data)
|
68
|
+
end
|
69
|
+
|
70
|
+
# @return [String]
|
71
|
+
def message
|
72
|
+
@message || @data[:message]
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::SSO
|
9
|
+
class Resource
|
10
|
+
|
11
|
+
# @param options ({})
|
12
|
+
# @option options [Client] :client
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options[:client] || Client.new(options)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [Client]
|
18
|
+
def client
|
19
|
+
@client
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,336 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::SSO
|
9
|
+
module Types
|
10
|
+
|
11
|
+
# Provides information about your AWS account.
|
12
|
+
#
|
13
|
+
# @!attribute [rw] account_id
|
14
|
+
# The identifier of the AWS account that is assigned to the user.
|
15
|
+
# @return [String]
|
16
|
+
#
|
17
|
+
# @!attribute [rw] account_name
|
18
|
+
# The display name of the AWS account that is assigned to the user.
|
19
|
+
# @return [String]
|
20
|
+
#
|
21
|
+
# @!attribute [rw] email_address
|
22
|
+
# The email address of the AWS account that is assigned to the user.
|
23
|
+
# @return [String]
|
24
|
+
#
|
25
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/AccountInfo AWS API Documentation
|
26
|
+
#
|
27
|
+
class AccountInfo < Struct.new(
|
28
|
+
:account_id,
|
29
|
+
:account_name,
|
30
|
+
:email_address)
|
31
|
+
include Aws::Structure
|
32
|
+
end
|
33
|
+
|
34
|
+
# @note When making an API call, you may pass GetRoleCredentialsRequest
|
35
|
+
# data as a hash:
|
36
|
+
#
|
37
|
+
# {
|
38
|
+
# role_name: "RoleNameType", # required
|
39
|
+
# account_id: "AccountIdType", # required
|
40
|
+
# access_token: "AccessTokenType", # required
|
41
|
+
# }
|
42
|
+
#
|
43
|
+
# @!attribute [rw] role_name
|
44
|
+
# The friendly name of the role that is assigned to the user.
|
45
|
+
# @return [String]
|
46
|
+
#
|
47
|
+
# @!attribute [rw] account_id
|
48
|
+
# The identifier for the AWS account that is assigned to the user.
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
# @!attribute [rw] access_token
|
52
|
+
# The token issued by the `CreateToken` API call. For more
|
53
|
+
# information, see [CreateToken][1] in the *AWS SSO OIDC API Reference
|
54
|
+
# Guide*.
|
55
|
+
#
|
56
|
+
#
|
57
|
+
#
|
58
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
|
59
|
+
# @return [String]
|
60
|
+
#
|
61
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentialsRequest AWS API Documentation
|
62
|
+
#
|
63
|
+
class GetRoleCredentialsRequest < Struct.new(
|
64
|
+
:role_name,
|
65
|
+
:account_id,
|
66
|
+
:access_token)
|
67
|
+
include Aws::Structure
|
68
|
+
end
|
69
|
+
|
70
|
+
# @!attribute [rw] role_credentials
|
71
|
+
# The credentials for the role that is assigned to the user.
|
72
|
+
# @return [Types::RoleCredentials]
|
73
|
+
#
|
74
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentialsResponse AWS API Documentation
|
75
|
+
#
|
76
|
+
class GetRoleCredentialsResponse < Struct.new(
|
77
|
+
:role_credentials)
|
78
|
+
include Aws::Structure
|
79
|
+
end
|
80
|
+
|
81
|
+
# Indicates that a problem occurred with the input to the request. For
|
82
|
+
# example, a required parameter might be missing or out of range.
|
83
|
+
#
|
84
|
+
# @!attribute [rw] message
|
85
|
+
# @return [String]
|
86
|
+
#
|
87
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/InvalidRequestException AWS API Documentation
|
88
|
+
#
|
89
|
+
class InvalidRequestException < Struct.new(
|
90
|
+
:message)
|
91
|
+
include Aws::Structure
|
92
|
+
end
|
93
|
+
|
94
|
+
# @note When making an API call, you may pass ListAccountRolesRequest
|
95
|
+
# data as a hash:
|
96
|
+
#
|
97
|
+
# {
|
98
|
+
# next_token: "NextTokenType",
|
99
|
+
# max_results: 1,
|
100
|
+
# access_token: "AccessTokenType", # required
|
101
|
+
# account_id: "AccountIdType", # required
|
102
|
+
# }
|
103
|
+
#
|
104
|
+
# @!attribute [rw] next_token
|
105
|
+
# The page token from the previous response output when you request
|
106
|
+
# subsequent pages.
|
107
|
+
# @return [String]
|
108
|
+
#
|
109
|
+
# @!attribute [rw] max_results
|
110
|
+
# The number of items that clients can request per page.
|
111
|
+
# @return [Integer]
|
112
|
+
#
|
113
|
+
# @!attribute [rw] access_token
|
114
|
+
# The token issued by the `CreateToken` API call. For more
|
115
|
+
# information, see [CreateToken][1] in the *AWS SSO OIDC API Reference
|
116
|
+
# Guide*.
|
117
|
+
#
|
118
|
+
#
|
119
|
+
#
|
120
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
|
121
|
+
# @return [String]
|
122
|
+
#
|
123
|
+
# @!attribute [rw] account_id
|
124
|
+
# The identifier for the AWS account that is assigned to the user.
|
125
|
+
# @return [String]
|
126
|
+
#
|
127
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRolesRequest AWS API Documentation
|
128
|
+
#
|
129
|
+
class ListAccountRolesRequest < Struct.new(
|
130
|
+
:next_token,
|
131
|
+
:max_results,
|
132
|
+
:access_token,
|
133
|
+
:account_id)
|
134
|
+
include Aws::Structure
|
135
|
+
end
|
136
|
+
|
137
|
+
# @!attribute [rw] next_token
|
138
|
+
# The page token client that is used to retrieve the list of accounts.
|
139
|
+
# @return [String]
|
140
|
+
#
|
141
|
+
# @!attribute [rw] role_list
|
142
|
+
# A paginated response with the list of roles and the next token if
|
143
|
+
# more results are available.
|
144
|
+
# @return [Array<Types::RoleInfo>]
|
145
|
+
#
|
146
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRolesResponse AWS API Documentation
|
147
|
+
#
|
148
|
+
class ListAccountRolesResponse < Struct.new(
|
149
|
+
:next_token,
|
150
|
+
:role_list)
|
151
|
+
include Aws::Structure
|
152
|
+
end
|
153
|
+
|
154
|
+
# @note When making an API call, you may pass ListAccountsRequest
|
155
|
+
# data as a hash:
|
156
|
+
#
|
157
|
+
# {
|
158
|
+
# next_token: "NextTokenType",
|
159
|
+
# max_results: 1,
|
160
|
+
# access_token: "AccessTokenType", # required
|
161
|
+
# }
|
162
|
+
#
|
163
|
+
# @!attribute [rw] next_token
|
164
|
+
# (Optional) When requesting subsequent pages, this is the page token
|
165
|
+
# from the previous response output.
|
166
|
+
# @return [String]
|
167
|
+
#
|
168
|
+
# @!attribute [rw] max_results
|
169
|
+
# This is the number of items clients can request per page.
|
170
|
+
# @return [Integer]
|
171
|
+
#
|
172
|
+
# @!attribute [rw] access_token
|
173
|
+
# The token issued by the `CreateToken` API call. For more
|
174
|
+
# information, see [CreateToken][1] in the *AWS SSO OIDC API Reference
|
175
|
+
# Guide*.
|
176
|
+
#
|
177
|
+
#
|
178
|
+
#
|
179
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
|
180
|
+
# @return [String]
|
181
|
+
#
|
182
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountsRequest AWS API Documentation
|
183
|
+
#
|
184
|
+
class ListAccountsRequest < Struct.new(
|
185
|
+
:next_token,
|
186
|
+
:max_results,
|
187
|
+
:access_token)
|
188
|
+
include Aws::Structure
|
189
|
+
end
|
190
|
+
|
191
|
+
# @!attribute [rw] next_token
|
192
|
+
# The page token client that is used to retrieve the list of accounts.
|
193
|
+
# @return [String]
|
194
|
+
#
|
195
|
+
# @!attribute [rw] account_list
|
196
|
+
# A paginated response with the list of account information and the
|
197
|
+
# next token if more results are available.
|
198
|
+
# @return [Array<Types::AccountInfo>]
|
199
|
+
#
|
200
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountsResponse AWS API Documentation
|
201
|
+
#
|
202
|
+
class ListAccountsResponse < Struct.new(
|
203
|
+
:next_token,
|
204
|
+
:account_list)
|
205
|
+
include Aws::Structure
|
206
|
+
end
|
207
|
+
|
208
|
+
# @note When making an API call, you may pass LogoutRequest
|
209
|
+
# data as a hash:
|
210
|
+
#
|
211
|
+
# {
|
212
|
+
# access_token: "AccessTokenType", # required
|
213
|
+
# }
|
214
|
+
#
|
215
|
+
# @!attribute [rw] access_token
|
216
|
+
# The token issued by the `CreateToken` API call. For more
|
217
|
+
# information, see [CreateToken][1] in the *AWS SSO OIDC API Reference
|
218
|
+
# Guide*.
|
219
|
+
#
|
220
|
+
#
|
221
|
+
#
|
222
|
+
# [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
|
223
|
+
# @return [String]
|
224
|
+
#
|
225
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/LogoutRequest AWS API Documentation
|
226
|
+
#
|
227
|
+
class LogoutRequest < Struct.new(
|
228
|
+
:access_token)
|
229
|
+
include Aws::Structure
|
230
|
+
end
|
231
|
+
|
232
|
+
# The specified resource doesn't exist.
|
233
|
+
#
|
234
|
+
# @!attribute [rw] message
|
235
|
+
# @return [String]
|
236
|
+
#
|
237
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ResourceNotFoundException AWS API Documentation
|
238
|
+
#
|
239
|
+
class ResourceNotFoundException < Struct.new(
|
240
|
+
:message)
|
241
|
+
include Aws::Structure
|
242
|
+
end
|
243
|
+
|
244
|
+
# Provides information about the role credentials that are assigned to
|
245
|
+
# the user.
|
246
|
+
#
|
247
|
+
# @!attribute [rw] access_key_id
|
248
|
+
# The identifier used for the temporary security credentials. For more
|
249
|
+
# information, see [Using Temporary Security Credentials to Request
|
250
|
+
# Access to AWS Resources][1] in the *AWS IAM User Guide*.
|
251
|
+
#
|
252
|
+
#
|
253
|
+
#
|
254
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html
|
255
|
+
# @return [String]
|
256
|
+
#
|
257
|
+
# @!attribute [rw] secret_access_key
|
258
|
+
# The key that is used to sign the request. For more information, see
|
259
|
+
# [Using Temporary Security Credentials to Request Access to AWS
|
260
|
+
# Resources][1] in the *AWS IAM User Guide*.
|
261
|
+
#
|
262
|
+
#
|
263
|
+
#
|
264
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html
|
265
|
+
# @return [String]
|
266
|
+
#
|
267
|
+
# @!attribute [rw] session_token
|
268
|
+
# The token used for temporary credentials. For more information, see
|
269
|
+
# [Using Temporary Security Credentials to Request Access to AWS
|
270
|
+
# Resources][1] in the *AWS IAM User Guide*.
|
271
|
+
#
|
272
|
+
#
|
273
|
+
#
|
274
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html
|
275
|
+
# @return [String]
|
276
|
+
#
|
277
|
+
# @!attribute [rw] expiration
|
278
|
+
# The date on which temporary security credentials expire.
|
279
|
+
# @return [Integer]
|
280
|
+
#
|
281
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/RoleCredentials AWS API Documentation
|
282
|
+
#
|
283
|
+
class RoleCredentials < Struct.new(
|
284
|
+
:access_key_id,
|
285
|
+
:secret_access_key,
|
286
|
+
:session_token,
|
287
|
+
:expiration)
|
288
|
+
include Aws::Structure
|
289
|
+
end
|
290
|
+
|
291
|
+
# Provides information about the role that is assigned to the user.
|
292
|
+
#
|
293
|
+
# @!attribute [rw] role_name
|
294
|
+
# The friendly name of the role that is assigned to the user.
|
295
|
+
# @return [String]
|
296
|
+
#
|
297
|
+
# @!attribute [rw] account_id
|
298
|
+
# The identifier of the AWS account assigned to the user.
|
299
|
+
# @return [String]
|
300
|
+
#
|
301
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/RoleInfo AWS API Documentation
|
302
|
+
#
|
303
|
+
class RoleInfo < Struct.new(
|
304
|
+
:role_name,
|
305
|
+
:account_id)
|
306
|
+
include Aws::Structure
|
307
|
+
end
|
308
|
+
|
309
|
+
# Indicates that the request is being made too frequently and is more
|
310
|
+
# than what the server can handle.
|
311
|
+
#
|
312
|
+
# @!attribute [rw] message
|
313
|
+
# @return [String]
|
314
|
+
#
|
315
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/TooManyRequestsException AWS API Documentation
|
316
|
+
#
|
317
|
+
class TooManyRequestsException < Struct.new(
|
318
|
+
:message)
|
319
|
+
include Aws::Structure
|
320
|
+
end
|
321
|
+
|
322
|
+
# Indicates that the request is not authorized. This can happen due to
|
323
|
+
# an invalid access token in the request.
|
324
|
+
#
|
325
|
+
# @!attribute [rw] message
|
326
|
+
# @return [String]
|
327
|
+
#
|
328
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/UnauthorizedException AWS API Documentation
|
329
|
+
#
|
330
|
+
class UnauthorizedException < Struct.new(
|
331
|
+
:message)
|
332
|
+
include Aws::Structure
|
333
|
+
end
|
334
|
+
|
335
|
+
end
|
336
|
+
end
|
metadata
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aws-sdk-sso
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Amazon Web Services
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-11-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.71.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.71.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: aws-sigv4
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.1'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.1'
|
47
|
+
description: Official AWS Ruby gem for AWS Single Sign-On (SSO). This gem is part
|
48
|
+
of the AWS SDK for Ruby.
|
49
|
+
email:
|
50
|
+
- trevrowe@amazon.com
|
51
|
+
executables: []
|
52
|
+
extensions: []
|
53
|
+
extra_rdoc_files: []
|
54
|
+
files:
|
55
|
+
- lib/aws-sdk-sso.rb
|
56
|
+
- lib/aws-sdk-sso/client.rb
|
57
|
+
- lib/aws-sdk-sso/client_api.rb
|
58
|
+
- lib/aws-sdk-sso/customizations.rb
|
59
|
+
- lib/aws-sdk-sso/errors.rb
|
60
|
+
- lib/aws-sdk-sso/resource.rb
|
61
|
+
- lib/aws-sdk-sso/types.rb
|
62
|
+
homepage: https://github.com/aws/aws-sdk-ruby
|
63
|
+
licenses:
|
64
|
+
- Apache-2.0
|
65
|
+
metadata:
|
66
|
+
source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-sso
|
67
|
+
changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-sso/CHANGELOG.md
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubygems_version: 3.0.3
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: AWS SDK for Ruby - SSO
|
87
|
+
test_files: []
|