Interface SsoAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder() method.The
asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient supported in the
SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in some cases such
as credentials retrieval and endpoint discovery as part of the async API call.
AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles assigned to them and get federated into the application.
Although AWS Single Sign-On was renamed, the sso and identitystore API namespaces will
continue to retain their original name for backward compatibility purposes. For more information, see IAM Identity Center rename.
This reference guide describes the IAM Identity Center Portal operations that you can call programatically and includes detailed information on data types and errors.
AWS provides SDKs that consist of libraries and sample code for various programming languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a convenient way to create programmatic access to IAM Identity Center and other AWS services. For more information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic SsoAsyncClientBuilderbuilder()Create a builder that can be used to configure and create aSsoAsyncClient.static SsoAsyncClientcreate()Create aSsoAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.getRoleCredentials(Consumer<GetRoleCredentialsRequest.Builder> getRoleCredentialsRequest) Returns the STS short-term credentials for a given role name that is assigned to the user.getRoleCredentials(GetRoleCredentialsRequest getRoleCredentialsRequest) Returns the STS short-term credentials for a given role name that is assigned to the user.listAccountRoles(Consumer<ListAccountRolesRequest.Builder> listAccountRolesRequest) Lists all roles that are assigned to the user for a given AWS account.listAccountRoles(ListAccountRolesRequest listAccountRolesRequest) Lists all roles that are assigned to the user for a given AWS account.default ListAccountRolesPublisherlistAccountRolesPaginator(Consumer<ListAccountRolesRequest.Builder> listAccountRolesRequest) This is a variant oflistAccountRoles(software.amazon.awssdk.services.sso.model.ListAccountRolesRequest)operation.default ListAccountRolesPublisherlistAccountRolesPaginator(ListAccountRolesRequest listAccountRolesRequest) This is a variant oflistAccountRoles(software.amazon.awssdk.services.sso.model.ListAccountRolesRequest)operation.default CompletableFuture<ListAccountsResponse> listAccounts(Consumer<ListAccountsRequest.Builder> listAccountsRequest) Lists all AWS accounts assigned to the user.default CompletableFuture<ListAccountsResponse> listAccounts(ListAccountsRequest listAccountsRequest) Lists all AWS accounts assigned to the user.default ListAccountsPublisherlistAccountsPaginator(Consumer<ListAccountsRequest.Builder> listAccountsRequest) This is a variant oflistAccounts(software.amazon.awssdk.services.sso.model.ListAccountsRequest)operation.default ListAccountsPublisherlistAccountsPaginator(ListAccountsRequest listAccountsRequest) This is a variant oflistAccounts(software.amazon.awssdk.services.sso.model.ListAccountsRequest)operation.default CompletableFuture<LogoutResponse> logout(Consumer<LogoutRequest.Builder> logoutRequest) 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.default CompletableFuture<LogoutResponse> logout(LogoutRequest logoutRequest) 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.default SsoServiceClientConfigurationThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
getRoleCredentials
default CompletableFuture<GetRoleCredentialsResponse> getRoleCredentials(GetRoleCredentialsRequest getRoleCredentialsRequest) Returns the STS short-term credentials for a given role name that is assigned to the user.
- Parameters:
getRoleCredentialsRequest-- Returns:
- A Java Future containing the result of the GetRoleCredentials operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getRoleCredentials
default CompletableFuture<GetRoleCredentialsResponse> getRoleCredentials(Consumer<GetRoleCredentialsRequest.Builder> getRoleCredentialsRequest) Returns the STS short-term credentials for a given role name that is assigned to the user.
This is a convenience which creates an instance of the
GetRoleCredentialsRequest.Builderavoiding the need to create one manually viaGetRoleCredentialsRequest.builder()- Parameters:
getRoleCredentialsRequest- AConsumerthat will call methods onGetRoleCredentialsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetRoleCredentials operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAccountRoles
default CompletableFuture<ListAccountRolesResponse> listAccountRoles(ListAccountRolesRequest listAccountRolesRequest) Lists all roles that are assigned to the user for a given AWS account.
- Parameters:
listAccountRolesRequest-- Returns:
- A Java Future containing the result of the ListAccountRoles operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAccountRoles
default CompletableFuture<ListAccountRolesResponse> listAccountRoles(Consumer<ListAccountRolesRequest.Builder> listAccountRolesRequest) Lists all roles that are assigned to the user for a given AWS account.
This is a convenience which creates an instance of the
ListAccountRolesRequest.Builderavoiding the need to create one manually viaListAccountRolesRequest.builder()- Parameters:
listAccountRolesRequest- AConsumerthat will call methods onListAccountRolesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListAccountRoles operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAccountRolesPaginator
default ListAccountRolesPublisher listAccountRolesPaginator(ListAccountRolesRequest listAccountRolesRequest) This is a variant of
listAccountRoles(software.amazon.awssdk.services.sso.model.ListAccountRolesRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.sso.paginators.ListAccountRolesPublisher publisher = client.listAccountRolesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.sso.paginators.ListAccountRolesPublisher publisher = client.listAccountRolesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.sso.model.ListAccountRolesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.sso.model.ListAccountRolesResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listAccountRoles(software.amazon.awssdk.services.sso.model.ListAccountRolesRequest)operation.- Parameters:
listAccountRolesRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAccountRolesPaginator
default ListAccountRolesPublisher listAccountRolesPaginator(Consumer<ListAccountRolesRequest.Builder> listAccountRolesRequest) This is a variant of
listAccountRoles(software.amazon.awssdk.services.sso.model.ListAccountRolesRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.sso.paginators.ListAccountRolesPublisher publisher = client.listAccountRolesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.sso.paginators.ListAccountRolesPublisher publisher = client.listAccountRolesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.sso.model.ListAccountRolesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.sso.model.ListAccountRolesResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listAccountRoles(software.amazon.awssdk.services.sso.model.ListAccountRolesRequest)operation.
This is a convenience which creates an instance of the
ListAccountRolesRequest.Builderavoiding the need to create one manually viaListAccountRolesRequest.builder()- Parameters:
listAccountRolesRequest- AConsumerthat will call methods onListAccountRolesRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAccounts
default CompletableFuture<ListAccountsResponse> listAccounts(ListAccountsRequest listAccountsRequest) 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.
- Parameters:
listAccountsRequest-- Returns:
- A Java Future containing the result of the ListAccounts operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAccounts
default CompletableFuture<ListAccountsResponse> listAccounts(Consumer<ListAccountsRequest.Builder> listAccountsRequest) 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.
This is a convenience which creates an instance of the
ListAccountsRequest.Builderavoiding the need to create one manually viaListAccountsRequest.builder()- Parameters:
listAccountsRequest- AConsumerthat will call methods onListAccountsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListAccounts operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAccountsPaginator
This is a variant of
listAccounts(software.amazon.awssdk.services.sso.model.ListAccountsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.sso.paginators.ListAccountsPublisher publisher = client.listAccountsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.sso.paginators.ListAccountsPublisher publisher = client.listAccountsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.sso.model.ListAccountsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.sso.model.ListAccountsResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listAccounts(software.amazon.awssdk.services.sso.model.ListAccountsRequest)operation.- Parameters:
listAccountsRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listAccountsPaginator
default ListAccountsPublisher listAccountsPaginator(Consumer<ListAccountsRequest.Builder> listAccountsRequest) This is a variant of
listAccounts(software.amazon.awssdk.services.sso.model.ListAccountsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.sso.paginators.ListAccountsPublisher publisher = client.listAccountsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.sso.paginators.ListAccountsPublisher publisher = client.listAccountsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.sso.model.ListAccountsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.sso.model.ListAccountsResponse response) { //... }; });Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listAccounts(software.amazon.awssdk.services.sso.model.ListAccountsRequest)operation.
This is a convenience which creates an instance of the
ListAccountsRequest.Builderavoiding the need to create one manually viaListAccountsRequest.builder()- Parameters:
listAccountsRequest- AConsumerthat will call methods onListAccountsRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- ResourceNotFoundException The specified resource doesn't exist.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
logout
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.
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 in the IAM Identity Center User Guide.
- Parameters:
logoutRequest-- Returns:
- A Java Future containing the result of the Logout operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
logout
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.
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 in the IAM Identity Center User Guide.
This is a convenience which creates an instance of the
LogoutRequest.Builderavoiding the need to create one manually viaLogoutRequest.builder()- Parameters:
logoutRequest- AConsumerthat will call methods onLogoutRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the Logout operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- InvalidRequestException Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.
- UnauthorizedException Indicates that the request is not authorized. This can happen due to an invalid access token in the request.
- TooManyRequestsException Indicates that the request is being made too frequently and is more than what the server can handle.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- SsoException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aSsoAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aSsoAsyncClient.
-