@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface AccountClient extends AwsClient
builder() method.
Operations for Amazon Web Services Account Management
| 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 AccountClientBuilder |
builder()
Create a builder that can be used to configure and create a
AccountClient. |
static AccountClient |
create()
Create a
AccountClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default DeleteAlternateContactResponse |
deleteAlternateContact(Consumer<DeleteAlternateContactRequest.Builder> deleteAlternateContactRequest)
Deletes the specified alternate contact from an Amazon Web Services account.
|
default DeleteAlternateContactResponse |
deleteAlternateContact(DeleteAlternateContactRequest deleteAlternateContactRequest)
Deletes the specified alternate contact from an Amazon Web Services account.
|
default DisableRegionResponse |
disableRegion(Consumer<DisableRegionRequest.Builder> disableRegionRequest)
Disables (opts-out) a particular Region for an account.
|
default DisableRegionResponse |
disableRegion(DisableRegionRequest disableRegionRequest)
Disables (opts-out) a particular Region for an account.
|
default EnableRegionResponse |
enableRegion(Consumer<EnableRegionRequest.Builder> enableRegionRequest)
Enables (opts-in) a particular Region for an account.
|
default EnableRegionResponse |
enableRegion(EnableRegionRequest enableRegionRequest)
Enables (opts-in) a particular Region for an account.
|
default GetAlternateContactResponse |
getAlternateContact(Consumer<GetAlternateContactRequest.Builder> getAlternateContactRequest)
Retrieves the specified alternate contact attached to an Amazon Web Services account.
|
default GetAlternateContactResponse |
getAlternateContact(GetAlternateContactRequest getAlternateContactRequest)
Retrieves the specified alternate contact attached to an Amazon Web Services account.
|
default GetContactInformationResponse |
getContactInformation(Consumer<GetContactInformationRequest.Builder> getContactInformationRequest)
Retrieves the primary contact information of an Amazon Web Services account.
|
default GetContactInformationResponse |
getContactInformation(GetContactInformationRequest getContactInformationRequest)
Retrieves the primary contact information of an Amazon Web Services account.
|
default GetRegionOptStatusResponse |
getRegionOptStatus(Consumer<GetRegionOptStatusRequest.Builder> getRegionOptStatusRequest)
Retrieves the opt-in status of a particular Region.
|
default GetRegionOptStatusResponse |
getRegionOptStatus(GetRegionOptStatusRequest getRegionOptStatusRequest)
Retrieves the opt-in status of a particular Region.
|
default ListRegionsResponse |
listRegions(Consumer<ListRegionsRequest.Builder> listRegionsRequest)
Lists all the Regions for a given account and their respective opt-in statuses.
|
default ListRegionsResponse |
listRegions(ListRegionsRequest listRegionsRequest)
Lists all the Regions for a given account and their respective opt-in statuses.
|
default ListRegionsIterable |
listRegionsPaginator(Consumer<ListRegionsRequest.Builder> listRegionsRequest)
Lists all the Regions for a given account and their respective opt-in statuses.
|
default ListRegionsIterable |
listRegionsPaginator(ListRegionsRequest listRegionsRequest)
Lists all the Regions for a given account and their respective opt-in statuses.
|
default PutAlternateContactResponse |
putAlternateContact(Consumer<PutAlternateContactRequest.Builder> putAlternateContactRequest)
Modifies the specified alternate contact attached to an Amazon Web Services account.
|
default PutAlternateContactResponse |
putAlternateContact(PutAlternateContactRequest putAlternateContactRequest)
Modifies the specified alternate contact attached to an Amazon Web Services account.
|
default PutContactInformationResponse |
putContactInformation(Consumer<PutContactInformationRequest.Builder> putContactInformationRequest)
Updates the primary contact information of an Amazon Web Services account.
|
default PutContactInformationResponse |
putContactInformation(PutContactInformationRequest putContactInformationRequest)
Updates the primary contact information of an Amazon Web Services account.
|
default AccountServiceClientConfiguration |
serviceClientConfiguration() |
static ServiceMetadata |
serviceMetadata() |
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.default DeleteAlternateContactResponse deleteAlternateContact(DeleteAlternateContactRequest deleteAlternateContactRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Deletes the specified alternate contact from an Amazon Web Services account.
For complete details about how to use the alternate contact operations, see Access or updating the alternate contacts.
Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see Enabling trusted access for Amazon Web Services Account Management.
deleteAlternateContactRequest - ResourceNotFoundException - The operation failed because it specified a resource that can't be found.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteAlternateContactResponse deleteAlternateContact(Consumer<DeleteAlternateContactRequest.Builder> deleteAlternateContactRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Deletes the specified alternate contact from an Amazon Web Services account.
For complete details about how to use the alternate contact operations, see Access or updating the alternate contacts.
Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see Enabling trusted access for Amazon Web Services Account Management.
This is a convenience which creates an instance of the DeleteAlternateContactRequest.Builder avoiding the
need to create one manually via DeleteAlternateContactRequest.builder()
deleteAlternateContactRequest - A Consumer that will call methods on
DeleteAlternateContactRequest.Builder to create a
request.ResourceNotFoundException - The operation failed because it specified a resource that can't be found.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DisableRegionResponse disableRegion(DisableRegionRequest disableRegionRequest) throws ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Disables (opts-out) a particular Region for an account.
disableRegionRequest - ValidationException - The operation failed because one of the input parameters was invalid.ConflictException - The request could not be processed because of a conflict in the current status of the resource. For
example, this happens if you try to enable a Region that is currently being disabled (in a status of
DISABLING).AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DisableRegionResponse disableRegion(Consumer<DisableRegionRequest.Builder> disableRegionRequest) throws ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Disables (opts-out) a particular Region for an account.
This is a convenience which creates an instance of the DisableRegionRequest.Builder avoiding the need to
create one manually via DisableRegionRequest.builder()
disableRegionRequest - A Consumer that will call methods on
DisableRegionRequest.Builder to create a request.ValidationException - The operation failed because one of the input parameters was invalid.ConflictException - The request could not be processed because of a conflict in the current status of the resource. For
example, this happens if you try to enable a Region that is currently being disabled (in a status of
DISABLING).AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault EnableRegionResponse enableRegion(EnableRegionRequest enableRegionRequest) throws ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Enables (opts-in) a particular Region for an account.
enableRegionRequest - ValidationException - The operation failed because one of the input parameters was invalid.ConflictException - The request could not be processed because of a conflict in the current status of the resource. For
example, this happens if you try to enable a Region that is currently being disabled (in a status of
DISABLING).AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault EnableRegionResponse enableRegion(Consumer<EnableRegionRequest.Builder> enableRegionRequest) throws ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Enables (opts-in) a particular Region for an account.
This is a convenience which creates an instance of the EnableRegionRequest.Builder avoiding the need to
create one manually via EnableRegionRequest.builder()
enableRegionRequest - A Consumer that will call methods on
EnableRegionRequest.Builder to create a request.ValidationException - The operation failed because one of the input parameters was invalid.ConflictException - The request could not be processed because of a conflict in the current status of the resource. For
example, this happens if you try to enable a Region that is currently being disabled (in a status of
DISABLING).AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetAlternateContactResponse getAlternateContact(GetAlternateContactRequest getAlternateContactRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Retrieves the specified alternate contact attached to an Amazon Web Services account.
For complete details about how to use the alternate contact operations, see Access or updating the alternate contacts.
Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see Enabling trusted access for Amazon Web Services Account Management.
getAlternateContactRequest - ResourceNotFoundException - The operation failed because it specified a resource that can't be found.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetAlternateContactResponse getAlternateContact(Consumer<GetAlternateContactRequest.Builder> getAlternateContactRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Retrieves the specified alternate contact attached to an Amazon Web Services account.
For complete details about how to use the alternate contact operations, see Access or updating the alternate contacts.
Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see Enabling trusted access for Amazon Web Services Account Management.
This is a convenience which creates an instance of the GetAlternateContactRequest.Builder avoiding the
need to create one manually via GetAlternateContactRequest.builder()
getAlternateContactRequest - A Consumer that will call methods on
GetAlternateContactRequest.Builder to create a
request.ResourceNotFoundException - The operation failed because it specified a resource that can't be found.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetContactInformationResponse getContactInformation(GetContactInformationRequest getContactInformationRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Retrieves the primary contact information of an Amazon Web Services account.
For complete details about how to use the primary contact operations, see Update the primary and alternate contact information.
getContactInformationRequest - ResourceNotFoundException - The operation failed because it specified a resource that can't be found.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetContactInformationResponse getContactInformation(Consumer<GetContactInformationRequest.Builder> getContactInformationRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Retrieves the primary contact information of an Amazon Web Services account.
For complete details about how to use the primary contact operations, see Update the primary and alternate contact information.
This is a convenience which creates an instance of the GetContactInformationRequest.Builder avoiding the
need to create one manually via GetContactInformationRequest.builder()
getContactInformationRequest - A Consumer that will call methods on
GetContactInformationRequest.Builder to create a
request.ResourceNotFoundException - The operation failed because it specified a resource that can't be found.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetRegionOptStatusResponse getRegionOptStatus(GetRegionOptStatusRequest getRegionOptStatusRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Retrieves the opt-in status of a particular Region.
getRegionOptStatusRequest - ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetRegionOptStatusResponse getRegionOptStatus(Consumer<GetRegionOptStatusRequest.Builder> getRegionOptStatusRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Retrieves the opt-in status of a particular Region.
This is a convenience which creates an instance of the GetRegionOptStatusRequest.Builder avoiding the
need to create one manually via GetRegionOptStatusRequest.builder()
getRegionOptStatusRequest - A Consumer that will call methods on
GetRegionOptStatusRequest.Builder to create a
request.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListRegionsResponse listRegions(ListRegionsRequest listRegionsRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Lists all the Regions for a given account and their respective opt-in statuses. Optionally, this list can be
filtered by the region-opt-status-contains parameter.
listRegionsRequest - ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListRegionsResponse listRegions(Consumer<ListRegionsRequest.Builder> listRegionsRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Lists all the Regions for a given account and their respective opt-in statuses. Optionally, this list can be
filtered by the region-opt-status-contains parameter.
This is a convenience which creates an instance of the ListRegionsRequest.Builder avoiding the need to
create one manually via ListRegionsRequest.builder()
listRegionsRequest - A Consumer that will call methods on
ListRegionsRequest.Builder to create a request.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListRegionsIterable listRegionsPaginator(ListRegionsRequest listRegionsRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Lists all the Regions for a given account and their respective opt-in statuses. Optionally, this list can be
filtered by the region-opt-status-contains parameter.
This is a variant of listRegions(software.amazon.awssdk.services.account.model.ListRegionsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.account.paginators.ListRegionsIterable responses = client.listRegionsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.account.paginators.ListRegionsIterable responses = client.listRegionsPaginator(request);
for (software.amazon.awssdk.services.account.model.ListRegionsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.account.paginators.ListRegionsIterable responses = client.listRegionsPaginator(request);
responses.iterator().forEachRemaining(....);
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
listRegions(software.amazon.awssdk.services.account.model.ListRegionsRequest) operation.
listRegionsRequest - ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListRegionsIterable listRegionsPaginator(Consumer<ListRegionsRequest.Builder> listRegionsRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Lists all the Regions for a given account and their respective opt-in statuses. Optionally, this list can be
filtered by the region-opt-status-contains parameter.
This is a variant of listRegions(software.amazon.awssdk.services.account.model.ListRegionsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.account.paginators.ListRegionsIterable responses = client.listRegionsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.account.paginators.ListRegionsIterable responses = client.listRegionsPaginator(request);
for (software.amazon.awssdk.services.account.model.ListRegionsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.account.paginators.ListRegionsIterable responses = client.listRegionsPaginator(request);
responses.iterator().forEachRemaining(....);
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
listRegions(software.amazon.awssdk.services.account.model.ListRegionsRequest) operation.
This is a convenience which creates an instance of the ListRegionsRequest.Builder avoiding the need to
create one manually via ListRegionsRequest.builder()
listRegionsRequest - A Consumer that will call methods on
ListRegionsRequest.Builder to create a request.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault PutAlternateContactResponse putAlternateContact(PutAlternateContactRequest putAlternateContactRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Modifies the specified alternate contact attached to an Amazon Web Services account.
For complete details about how to use the alternate contact operations, see Access or updating the alternate contacts.
Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see Enabling trusted access for Amazon Web Services Account Management.
putAlternateContactRequest - ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault PutAlternateContactResponse putAlternateContact(Consumer<PutAlternateContactRequest.Builder> putAlternateContactRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Modifies the specified alternate contact attached to an Amazon Web Services account.
For complete details about how to use the alternate contact operations, see Access or updating the alternate contacts.
Before you can update the alternate contact information for an Amazon Web Services account that is managed by Organizations, you must first enable integration between Amazon Web Services Account Management and Organizations. For more information, see Enabling trusted access for Amazon Web Services Account Management.
This is a convenience which creates an instance of the PutAlternateContactRequest.Builder avoiding the
need to create one manually via PutAlternateContactRequest.builder()
putAlternateContactRequest - A Consumer that will call methods on
PutAlternateContactRequest.Builder to create a
request.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault PutContactInformationResponse putContactInformation(PutContactInformationRequest putContactInformationRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Updates the primary contact information of an Amazon Web Services account.
For complete details about how to use the primary contact operations, see Update the primary and alternate contact information.
putContactInformationRequest - ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault PutContactInformationResponse putContactInformation(Consumer<PutContactInformationRequest.Builder> putContactInformationRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Updates the primary contact information of an Amazon Web Services account.
For complete details about how to use the primary contact operations, see Update the primary and alternate contact information.
This is a convenience which creates an instance of the PutContactInformationRequest.Builder avoiding the
need to create one manually via PutContactInformationRequest.builder()
putContactInformationRequest - A Consumer that will call methods on
PutContactInformationRequest.Builder to create a
request.ValidationException - The operation failed because one of the input parameters was invalid.AccessDeniedException - The operation failed because the calling identity doesn't have the minimum required permissions.TooManyRequestsException - The operation failed because it was called too frequently and exceeded a throttle limit.InternalServerException - The operation failed because of an error internal to Amazon Web Services. Try your operation again later.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.AccountException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionstatic AccountClient create()
AccountClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static AccountClientBuilder builder()
AccountClient.static ServiceMetadata serviceMetadata()
default AccountServiceClientConfiguration serviceClientConfiguration()
serviceClientConfiguration in interface AwsClientserviceClientConfiguration in interface SdkClientCopyright © 2023. All rights reserved.