Interface AccountClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
Operations for Amazon Web Services Account Management
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic AccountClientBuilder
builder()
Create a builder that can be used to configure and create aAccountClient
.static AccountClient
create()
Create aAccountClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.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) This is a variant oflistRegions(software.amazon.awssdk.services.account.model.ListRegionsRequest)
operation.default ListRegionsIterable
listRegionsPaginator
(ListRegionsRequest listRegionsRequest) This is a variant oflistRegions(software.amazon.awssdk.services.account.model.ListRegionsRequest)
operation.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.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadata
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods 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
-
deleteAlternateContact
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.
- Parameters:
deleteAlternateContactRequest
-- Returns:
- Result of the DeleteAlternateContact operation returned by the service.
- See Also:
-
deleteAlternateContact
default 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 viaDeleteAlternateContactRequest.builder()
- Parameters:
deleteAlternateContactRequest
- AConsumer
that will call methods onDeleteAlternateContactRequest.Builder
to create a request.- Returns:
- Result of the DeleteAlternateContact operation returned by the service.
- See Also:
-
disableRegion
default DisableRegionResponse disableRegion(DisableRegionRequest disableRegionRequest) throws ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException Disables (opts-out) a particular Region for an account.
- Parameters:
disableRegionRequest
-- Returns:
- Result of the DisableRegion operation returned by the service.
- See Also:
-
disableRegion
default 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 viaDisableRegionRequest.builder()
- Parameters:
disableRegionRequest
- AConsumer
that will call methods onDisableRegionRequest.Builder
to create a request.- Returns:
- Result of the DisableRegion operation returned by the service.
- See Also:
-
enableRegion
default EnableRegionResponse enableRegion(EnableRegionRequest enableRegionRequest) throws ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException Enables (opts-in) a particular Region for an account.
- Parameters:
enableRegionRequest
-- Returns:
- Result of the EnableRegion operation returned by the service.
- See Also:
-
enableRegion
default 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 viaEnableRegionRequest.builder()
- Parameters:
enableRegionRequest
- AConsumer
that will call methods onEnableRegionRequest.Builder
to create a request.- Returns:
- Result of the EnableRegion operation returned by the service.
- See Also:
-
getAlternateContact
default 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.
- Parameters:
getAlternateContactRequest
-- Returns:
- Result of the GetAlternateContact operation returned by the service.
- See Also:
-
getAlternateContact
default 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 viaGetAlternateContactRequest.builder()
- Parameters:
getAlternateContactRequest
- AConsumer
that will call methods onGetAlternateContactRequest.Builder
to create a request.- Returns:
- Result of the GetAlternateContact operation returned by the service.
- See Also:
-
getContactInformation
default 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.
- Parameters:
getContactInformationRequest
-- Returns:
- Result of the GetContactInformation operation returned by the service.
- See Also:
-
getContactInformation
default 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 viaGetContactInformationRequest.builder()
- Parameters:
getContactInformationRequest
- AConsumer
that will call methods onGetContactInformationRequest.Builder
to create a request.- Returns:
- Result of the GetContactInformation operation returned by the service.
- See Also:
-
getRegionOptStatus
default GetRegionOptStatusResponse getRegionOptStatus(GetRegionOptStatusRequest getRegionOptStatusRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException Retrieves the opt-in status of a particular Region.
- Parameters:
getRegionOptStatusRequest
-- Returns:
- Result of the GetRegionOptStatus operation returned by the service.
- See Also:
-
getRegionOptStatus
default 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 viaGetRegionOptStatusRequest.builder()
- Parameters:
getRegionOptStatusRequest
- AConsumer
that will call methods onGetRegionOptStatusRequest.Builder
to create a request.- Returns:
- Result of the GetRegionOptStatus operation returned by the service.
- See Also:
-
listRegions
default 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.- Parameters:
listRegionsRequest
-- Returns:
- Result of the ListRegions operation returned by the service.
- See Also:
-
listRegions
default 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 viaListRegionsRequest.builder()
- Parameters:
listRegionsRequest
- AConsumer
that will call methods onListRegionsRequest.Builder
to create a request.- Returns:
- Result of the ListRegions operation returned by the service.
- See Also:
-
listRegionsPaginator
default ListRegionsIterable listRegionsPaginator(ListRegionsRequest listRegionsRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException 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 Streamsoftware.amazon.awssdk.services.account.paginators.ListRegionsIterable responses = client.listRegionsPaginator(request); responses.stream().forEach(....);
{ @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 directlysoftware.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.- Parameters:
listRegionsRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listRegionsPaginator
default ListRegionsIterable listRegionsPaginator(Consumer<ListRegionsRequest.Builder> listRegionsRequest) throws ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException 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 Streamsoftware.amazon.awssdk.services.account.paginators.ListRegionsIterable responses = client.listRegionsPaginator(request); responses.stream().forEach(....);
{ @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 directlysoftware.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 viaListRegionsRequest.builder()
- Parameters:
listRegionsRequest
- AConsumer
that will call methods onListRegionsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
putAlternateContact
default 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.
- Parameters:
putAlternateContactRequest
-- Returns:
- Result of the PutAlternateContact operation returned by the service.
- See Also:
-
putAlternateContact
default 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 viaPutAlternateContactRequest.builder()
- Parameters:
putAlternateContactRequest
- AConsumer
that will call methods onPutAlternateContactRequest.Builder
to create a request.- Returns:
- Result of the PutAlternateContact operation returned by the service.
- See Also:
-
putContactInformation
default 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.
- Parameters:
putContactInformationRequest
-- Returns:
- Result of the PutContactInformation operation returned by the service.
- See Also:
-
putContactInformation
default 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 viaPutContactInformationRequest.builder()
- Parameters:
putContactInformationRequest
- AConsumer
that will call methods onPutContactInformationRequest.Builder
to create a request.- Returns:
- Result of the PutContactInformation operation returned by the service.
- See Also:
-
create
Create aAccountClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aAccountClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-