Class: Aws::SSO::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::SSO::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-sso/client.rb
Overview
An API client for SSO. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::SSO::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#get_role_credentials(params = {}) ⇒ Types::GetRoleCredentialsResponse
Returns the STS short-term credentials for a given role name that is assigned to the user.
-
#list_account_roles(params = {}) ⇒ Types::ListAccountRolesResponse
Lists all roles that are assigned to the user for a given AWS account.
-
#list_accounts(params = {}) ⇒ Types::ListAccountsResponse
Lists all AWS accounts assigned to the user.
-
#logout(params = {}) ⇒ Struct
Removes the locally stored SSO tokens from the client-side cache and sends an API call to the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in session.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Methods included from ClientStubs
#api_requests, #next_stub, #setup_stubbing, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, #inspect, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response, #handler_for, #new_handler
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
370 371 372 |
# File 'lib/aws-sdk-sso/client.rb', line 370 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
606 607 608 |
# File 'lib/aws-sdk-sso/client.rb', line 606 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
609 610 611 |
# File 'lib/aws-sdk-sso/client.rb', line 609 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
584 585 586 587 588 589 590 591 592 593 594 595 |
# File 'lib/aws-sdk-sso/client.rb', line 584 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-core' context[:gem_version] = '3.174.0' Seahorse::Client::Request.new(handlers, context) end |
#get_role_credentials(params = {}) ⇒ Types::GetRoleCredentialsResponse
Returns the STS short-term credentials for a given role name that is assigned to the user.
417 418 419 420 |
# File 'lib/aws-sdk-sso/client.rb', line 417 def get_role_credentials(params = {}, = {}) req = build_request(:get_role_credentials, params) req.send_request() end |
#list_account_roles(params = {}) ⇒ Types::ListAccountRolesResponse
Lists all roles that are assigned to the user for a given AWS account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
470 471 472 473 |
# File 'lib/aws-sdk-sso/client.rb', line 470 def list_account_roles(params = {}, = {}) req = build_request(:list_account_roles, params) req.send_request() end |
#list_accounts(params = {}) ⇒ Types::ListAccountsResponse
Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see [Assign User Access] in the *IAM Identity Center User Guide*. This operation returns a paginated response.
[1]: docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
527 528 529 530 |
# File 'lib/aws-sdk-sso/client.rb', line 527 def list_accounts(params = {}, = {}) req = build_request(:list_accounts, params) req.send_request() end |
#logout(params = {}) ⇒ Struct
Removes the locally stored SSO tokens from the client-side cache and sends an API call to the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in session.
<note markdown=“1”> If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM Identity Center sign in session is used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set. More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user, and the corresponding temporary AWS credentials are returned to the client.
After user logout, any existing IAM role sessions that were created by
using IAM Identity Center permission sets continue based on the duration configured in the permission set. For more information, see
- User authentications][1
-
in the *IAM Identity Center User Guide*.
</note>
[1]: docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html
575 576 577 578 |
# File 'lib/aws-sdk-sso/client.rb', line 575 def logout(params = {}, = {}) req = build_request(:logout, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
599 600 601 |
# File 'lib/aws-sdk-sso/client.rb', line 599 def waiter_names [] end |