Interface AccountClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface AccountClient extends AwsClient
Service client for accessing AWS Account. This can be created using the staticbuilder()method.Operations for Amazon Web Services Account Management
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default AcceptPrimaryEmailUpdateResponseacceptPrimaryEmailUpdate(Consumer<AcceptPrimaryEmailUpdateRequest.Builder> acceptPrimaryEmailUpdateRequest)Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known as the root user email address) for the specified account.default AcceptPrimaryEmailUpdateResponseacceptPrimaryEmailUpdate(AcceptPrimaryEmailUpdateRequest acceptPrimaryEmailUpdateRequest)Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known as the root user email address) for the specified account.static AccountClientBuilderbuilder()Create a builder that can be used to configure and create aAccountClient.static AccountClientcreate()Create aAccountClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default DeleteAlternateContactResponsedeleteAlternateContact(Consumer<DeleteAlternateContactRequest.Builder> deleteAlternateContactRequest)Deletes the specified alternate contact from an Amazon Web Services account.default DeleteAlternateContactResponsedeleteAlternateContact(DeleteAlternateContactRequest deleteAlternateContactRequest)Deletes the specified alternate contact from an Amazon Web Services account.default DisableRegionResponsedisableRegion(Consumer<DisableRegionRequest.Builder> disableRegionRequest)Disables (opts-out) a particular Region for an account.default DisableRegionResponsedisableRegion(DisableRegionRequest disableRegionRequest)Disables (opts-out) a particular Region for an account.default EnableRegionResponseenableRegion(Consumer<EnableRegionRequest.Builder> enableRegionRequest)Enables (opts-in) a particular Region for an account.default EnableRegionResponseenableRegion(EnableRegionRequest enableRegionRequest)Enables (opts-in) a particular Region for an account.default GetAlternateContactResponsegetAlternateContact(Consumer<GetAlternateContactRequest.Builder> getAlternateContactRequest)Retrieves the specified alternate contact attached to an Amazon Web Services account.default GetAlternateContactResponsegetAlternateContact(GetAlternateContactRequest getAlternateContactRequest)Retrieves the specified alternate contact attached to an Amazon Web Services account.default GetContactInformationResponsegetContactInformation(Consumer<GetContactInformationRequest.Builder> getContactInformationRequest)Retrieves the primary contact information of an Amazon Web Services account.default GetContactInformationResponsegetContactInformation(GetContactInformationRequest getContactInformationRequest)Retrieves the primary contact information of an Amazon Web Services account.default GetPrimaryEmailResponsegetPrimaryEmail(Consumer<GetPrimaryEmailRequest.Builder> getPrimaryEmailRequest)Retrieves the primary email address for the specified account.default GetPrimaryEmailResponsegetPrimaryEmail(GetPrimaryEmailRequest getPrimaryEmailRequest)Retrieves the primary email address for the specified account.default GetRegionOptStatusResponsegetRegionOptStatus(Consumer<GetRegionOptStatusRequest.Builder> getRegionOptStatusRequest)Retrieves the opt-in status of a particular Region.default GetRegionOptStatusResponsegetRegionOptStatus(GetRegionOptStatusRequest getRegionOptStatusRequest)Retrieves the opt-in status of a particular Region.default ListRegionsResponselistRegions(Consumer<ListRegionsRequest.Builder> listRegionsRequest)Lists all the Regions for a given account and their respective opt-in statuses.default ListRegionsResponselistRegions(ListRegionsRequest listRegionsRequest)Lists all the Regions for a given account and their respective opt-in statuses.default ListRegionsIterablelistRegionsPaginator(Consumer<ListRegionsRequest.Builder> listRegionsRequest)This is a variant oflistRegions(software.amazon.awssdk.services.account.model.ListRegionsRequest)operation.default ListRegionsIterablelistRegionsPaginator(ListRegionsRequest listRegionsRequest)This is a variant oflistRegions(software.amazon.awssdk.services.account.model.ListRegionsRequest)operation.default PutAlternateContactResponseputAlternateContact(Consumer<PutAlternateContactRequest.Builder> putAlternateContactRequest)Modifies the specified alternate contact attached to an Amazon Web Services account.default PutAlternateContactResponseputAlternateContact(PutAlternateContactRequest putAlternateContactRequest)Modifies the specified alternate contact attached to an Amazon Web Services account.default PutContactInformationResponseputContactInformation(Consumer<PutContactInformationRequest.Builder> putContactInformationRequest)Updates the primary contact information of an Amazon Web Services account.default PutContactInformationResponseputContactInformation(PutContactInformationRequest putContactInformationRequest)Updates the primary contact information of an Amazon Web Services account.default AccountServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default StartPrimaryEmailUpdateResponsestartPrimaryEmailUpdate(Consumer<StartPrimaryEmailUpdateRequest.Builder> startPrimaryEmailUpdateRequest)Starts the process to update the primary email address for the specified account.default StartPrimaryEmailUpdateResponsestartPrimaryEmailUpdate(StartPrimaryEmailUpdateRequest startPrimaryEmailUpdateRequest)Starts the process to update the primary email address for the specified account.-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
acceptPrimaryEmailUpdate
default AcceptPrimaryEmailUpdateResponse acceptPrimaryEmailUpdate(AcceptPrimaryEmailUpdateRequest acceptPrimaryEmailUpdateRequest) throws ResourceNotFoundException, ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known as the root user email address) for the specified account.
- Parameters:
acceptPrimaryEmailUpdateRequest-- Returns:
- Result of the AcceptPrimaryEmailUpdate operation returned by the service.
- Throws:
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.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.AwsServiceException- See Also:
- AWS API Documentation
-
acceptPrimaryEmailUpdate
default AcceptPrimaryEmailUpdateResponse acceptPrimaryEmailUpdate(Consumer<AcceptPrimaryEmailUpdateRequest.Builder> acceptPrimaryEmailUpdateRequest) throws ResourceNotFoundException, ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Accepts the request that originated from StartPrimaryEmailUpdate to update the primary email address (also known as the root user email address) for the specified account.
This is a convenience which creates an instance of the
AcceptPrimaryEmailUpdateRequest.Builderavoiding the need to create one manually viaAcceptPrimaryEmailUpdateRequest.builder()- Parameters:
acceptPrimaryEmailUpdateRequest- AConsumerthat will call methods onAcceptPrimaryEmailUpdateRequest.Builderto create a request.- Returns:
- Result of the AcceptPrimaryEmailUpdate operation returned by the service.
- Throws:
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.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.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaDeleteAlternateContactRequest.builder()- Parameters:
deleteAlternateContactRequest- AConsumerthat will call methods onDeleteAlternateContactRequest.Builderto create a request.- Returns:
- Result of the DeleteAlternateContact operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
disableRegion
default DisableRegionResponse disableRegion(DisableRegionRequest disableRegionRequest) throws ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Disables (opts-out) a particular Region for an account.
The act of disabling a Region will remove all IAM access to any resources that reside in that Region.
- Parameters:
disableRegionRequest-- Returns:
- Result of the DisableRegion operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.
The act of disabling a Region will remove all IAM access to any resources that reside in that Region.
This is a convenience which creates an instance of the
DisableRegionRequest.Builderavoiding the need to create one manually viaDisableRegionRequest.builder()- Parameters:
disableRegionRequest- AConsumerthat will call methods onDisableRegionRequest.Builderto create a request.- Returns:
- Result of the DisableRegion operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaEnableRegionRequest.builder()- Parameters:
enableRegionRequest- AConsumerthat will call methods onEnableRegionRequest.Builderto create a request.- Returns:
- Result of the EnableRegion operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaGetAlternateContactRequest.builder()- Parameters:
getAlternateContactRequest- AConsumerthat will call methods onGetAlternateContactRequest.Builderto create a request.- Returns:
- Result of the GetAlternateContact operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaGetContactInformationRequest.builder()- Parameters:
getContactInformationRequest- AConsumerthat will call methods onGetContactInformationRequest.Builderto create a request.- Returns:
- Result of the GetContactInformation operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getPrimaryEmail
default GetPrimaryEmailResponse getPrimaryEmail(GetPrimaryEmailRequest getPrimaryEmailRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Retrieves the primary email address for the specified account.
- Parameters:
getPrimaryEmailRequest-- Returns:
- Result of the GetPrimaryEmail operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
getPrimaryEmail
default GetPrimaryEmailResponse getPrimaryEmail(Consumer<GetPrimaryEmailRequest.Builder> getPrimaryEmailRequest) throws ResourceNotFoundException, ValidationException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Retrieves the primary email address for the specified account.
This is a convenience which creates an instance of the
GetPrimaryEmailRequest.Builderavoiding the need to create one manually viaGetPrimaryEmailRequest.builder()- Parameters:
getPrimaryEmailRequest- AConsumerthat will call methods onGetPrimaryEmailRequest.Builderto create a request.- Returns:
- Result of the GetPrimaryEmail operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaGetRegionOptStatusRequest.builder()- Parameters:
getRegionOptStatusRequest- AConsumerthat will call methods onGetRegionOptStatusRequest.Builderto create a request.- Returns:
- Result of the GetRegionOptStatus operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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-containsparameter.- Parameters:
listRegionsRequest-- Returns:
- Result of the ListRegions operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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-containsparameter.
This is a convenience which creates an instance of the
ListRegionsRequest.Builderavoiding the need to create one manually viaListRegionsRequest.builder()- Parameters:
listRegionsRequest- AConsumerthat will call methods onListRegionsRequest.Builderto create a request.- Returns:
- Result of the ListRegions operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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 Stream
2) Using For loopsoftware.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.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaListRegionsRequest.builder()- Parameters:
listRegionsRequest- AConsumerthat will call methods onListRegionsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaPutAlternateContactRequest.builder()- Parameters:
putAlternateContactRequest- AConsumerthat will call methods onPutAlternateContactRequest.Builderto create a request.- Returns:
- Result of the PutAlternateContact operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
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.Builderavoiding the need to create one manually viaPutContactInformationRequest.builder()- Parameters:
putContactInformationRequest- AConsumerthat will call methods onPutContactInformationRequest.Builderto create a request.- Returns:
- Result of the PutContactInformation operation returned by the service.
- Throws:
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.AwsServiceException- See Also:
- AWS API Documentation
-
startPrimaryEmailUpdate
default StartPrimaryEmailUpdateResponse startPrimaryEmailUpdate(StartPrimaryEmailUpdateRequest startPrimaryEmailUpdateRequest) throws ResourceNotFoundException, ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Starts the process to update the primary email address for the specified account.
- Parameters:
startPrimaryEmailUpdateRequest-- Returns:
- Result of the StartPrimaryEmailUpdate operation returned by the service.
- Throws:
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.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.AwsServiceException- See Also:
- AWS API Documentation
-
startPrimaryEmailUpdate
default StartPrimaryEmailUpdateResponse startPrimaryEmailUpdate(Consumer<StartPrimaryEmailUpdateRequest.Builder> startPrimaryEmailUpdateRequest) throws ResourceNotFoundException, ValidationException, ConflictException, AccessDeniedException, TooManyRequestsException, InternalServerException, AwsServiceException, SdkClientException, AccountException
Starts the process to update the primary email address for the specified account.
This is a convenience which creates an instance of the
StartPrimaryEmailUpdateRequest.Builderavoiding the need to create one manually viaStartPrimaryEmailUpdateRequest.builder()- Parameters:
startPrimaryEmailUpdateRequest- AConsumerthat will call methods onStartPrimaryEmailUpdateRequest.Builderto create a request.- Returns:
- Result of the StartPrimaryEmailUpdate operation returned by the service.
- Throws:
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.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.AwsServiceException- See Also:
- AWS API Documentation
-
create
static AccountClient create()
Create aAccountClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static AccountClientBuilder builder()
Create a builder that can be used to configure and create aAccountClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default AccountServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-