@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface SsoAsyncClient extends SdkClient
builder() method.
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static SsoAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
SsoAsyncClient. |
static SsoAsyncClient |
create()
Create a
SsoAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
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.
|
default CompletableFuture<GetRoleCredentialsResponse> |
getRoleCredentials(GetRoleCredentialsRequest getRoleCredentialsRequest)
Returns the STS short-term credentials for a given role name that is assigned to the user.
|
default CompletableFuture<ListAccountRolesResponse> |
listAccountRoles(Consumer<ListAccountRolesRequest.Builder> listAccountRolesRequest)
Lists all roles that are assigned to the user for a given AWS account.
|
default CompletableFuture<ListAccountRolesResponse> |
listAccountRoles(ListAccountRolesRequest listAccountRolesRequest)
Lists all roles that are assigned to the user for a given AWS account.
|
default ListAccountRolesPublisher |
listAccountRolesPaginator(Consumer<ListAccountRolesRequest.Builder> listAccountRolesRequest)
Lists all roles that are assigned to the user for a given AWS account.
|
default ListAccountRolesPublisher |
listAccountRolesPaginator(ListAccountRolesRequest listAccountRolesRequest)
Lists all roles that are assigned to the user for a given AWS account.
|
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 ListAccountsPublisher |
listAccountsPaginator(Consumer<ListAccountsRequest.Builder> listAccountsRequest)
Lists all AWS accounts assigned to the user.
|
default ListAccountsPublisher |
listAccountsPaginator(ListAccountsRequest listAccountsRequest)
Lists all AWS accounts assigned to the user.
|
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.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.static SsoAsyncClient create()
SsoAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static SsoAsyncClientBuilder builder()
SsoAsyncClient.default CompletableFuture<GetRoleCredentialsResponse> getRoleCredentials(GetRoleCredentialsRequest getRoleCredentialsRequest)
Returns the STS short-term credentials for a given role name that is assigned to the user.
getRoleCredentialsRequest - 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.Builder avoiding the
need to create one manually via GetRoleCredentialsRequest.builder()
getRoleCredentialsRequest - A Consumer that will call methods on GetRoleCredentialsRequest.Builder to create a
request.default CompletableFuture<ListAccountRolesResponse> listAccountRoles(ListAccountRolesRequest listAccountRolesRequest)
Lists all roles that are assigned to the user for a given AWS account.
listAccountRolesRequest - 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.Builder avoiding the need
to create one manually via ListAccountRolesRequest.builder()
listAccountRolesRequest - A Consumer that will call methods on ListAccountRolesRequest.Builder to create a request.default ListAccountRolesPublisher listAccountRolesPaginator(ListAccountRolesRequest listAccountRolesRequest)
Lists all roles that are assigned to the user for a given AWS account.
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 new Subscription i.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
software.amazon.awssdk.services.sso.paginators.ListAccountRolesPublisher publisher = client.listAccountRolesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
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.
listAccountRolesRequest - default ListAccountRolesPublisher listAccountRolesPaginator(Consumer<ListAccountRolesRequest.Builder> listAccountRolesRequest)
Lists all roles that are assigned to the user for a given AWS account.
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 new Subscription i.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
software.amazon.awssdk.services.sso.paginators.ListAccountRolesPublisher publisher = client.listAccountRolesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
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.Builder avoiding the need
to create one manually via ListAccountRolesRequest.builder()
listAccountRolesRequest - A Consumer that will call methods on ListAccountRolesRequest.Builder to create a request.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.
listAccountsRequest - 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.Builder avoiding the need to
create one manually via ListAccountsRequest.builder()
listAccountsRequest - A Consumer that will call methods on ListAccountsRequest.Builder to create a request.default ListAccountsPublisher listAccountsPaginator(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.
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 new Subscription i.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
software.amazon.awssdk.services.sso.paginators.ListAccountsPublisher publisher = client.listAccountsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
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.
listAccountsRequest - default ListAccountsPublisher listAccountsPaginator(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 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 new Subscription i.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
software.amazon.awssdk.services.sso.paginators.ListAccountsPublisher publisher = client.listAccountsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
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) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
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.Builder avoiding the need to
create one manually via ListAccountsRequest.builder()
listAccountsRequest - A Consumer that will call methods on ListAccountsRequest.Builder to create a request.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.
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.
logoutRequest - 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.
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.Builder avoiding the need to create
one manually via LogoutRequest.builder()
logoutRequest - A Consumer that will call methods on LogoutRequest.Builder to create a request.Copyright © 2023. All rights reserved.