Interface MacieClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface MacieClient extends AwsClient
Service client for accessing Amazon Macie. This can be created using the staticbuilder()method.Amazon Macie Classic Amazon Macie Classic has been discontinued and is no longer available.
A new Amazon Macie is now available with significant design improvements and additional features, at a lower price and in most Amazon Web Services Regions. We encourage you to take advantage of the new and improved features, and benefit from the reduced cost. To learn about features and pricing for the new Macie, see Amazon Macie. To learn how to use the new Macie, see the Amazon Macie User Guide.
-
-
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 AssociateMemberAccountResponseassociateMemberAccount(Consumer<AssociateMemberAccountRequest.Builder> associateMemberAccountRequest)(Discontinued) Associates a specified Amazon Web Services account with Amazon Macie Classic as a member account.default AssociateMemberAccountResponseassociateMemberAccount(AssociateMemberAccountRequest associateMemberAccountRequest)(Discontinued) Associates a specified Amazon Web Services account with Amazon Macie Classic as a member account.default AssociateS3ResourcesResponseassociateS3Resources(Consumer<AssociateS3ResourcesRequest.Builder> associateS3ResourcesRequest)(Discontinued) Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification.default AssociateS3ResourcesResponseassociateS3Resources(AssociateS3ResourcesRequest associateS3ResourcesRequest)(Discontinued) Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification.static MacieClientBuilderbuilder()Create a builder that can be used to configure and create aMacieClient.static MacieClientcreate()Create aMacieClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default DisassociateMemberAccountResponsedisassociateMemberAccount(Consumer<DisassociateMemberAccountRequest.Builder> disassociateMemberAccountRequest)(Discontinued) Removes the specified member account from Amazon Macie Classic.default DisassociateMemberAccountResponsedisassociateMemberAccount(DisassociateMemberAccountRequest disassociateMemberAccountRequest)(Discontinued) Removes the specified member account from Amazon Macie Classic.default DisassociateS3ResourcesResponsedisassociateS3Resources(Consumer<DisassociateS3ResourcesRequest.Builder> disassociateS3ResourcesRequest)(Discontinued) Removes specified S3 resources from being monitored by Amazon Macie Classic.default DisassociateS3ResourcesResponsedisassociateS3Resources(DisassociateS3ResourcesRequest disassociateS3ResourcesRequest)(Discontinued) Removes specified S3 resources from being monitored by Amazon Macie Classic.default ListMemberAccountsResponselistMemberAccounts(Consumer<ListMemberAccountsRequest.Builder> listMemberAccountsRequest)(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.default ListMemberAccountsResponselistMemberAccounts(ListMemberAccountsRequest listMemberAccountsRequest)(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.default ListMemberAccountsIterablelistMemberAccountsPaginator(Consumer<ListMemberAccountsRequest.Builder> listMemberAccountsRequest)(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.default ListMemberAccountsIterablelistMemberAccountsPaginator(ListMemberAccountsRequest listMemberAccountsRequest)(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.default ListS3ResourcesResponselistS3Resources(Consumer<ListS3ResourcesRequest.Builder> listS3ResourcesRequest)(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic.default ListS3ResourcesResponselistS3Resources(ListS3ResourcesRequest listS3ResourcesRequest)(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic.default ListS3ResourcesIterablelistS3ResourcesPaginator(Consumer<ListS3ResourcesRequest.Builder> listS3ResourcesRequest)(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic.default ListS3ResourcesIterablelistS3ResourcesPaginator(ListS3ResourcesRequest listS3ResourcesRequest)(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic.default MacieServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default UpdateS3ResourcesResponseupdateS3Resources(Consumer<UpdateS3ResourcesRequest.Builder> updateS3ResourcesRequest)(Discontinued) Updates the classification types for the specified S3 resources.default UpdateS3ResourcesResponseupdateS3Resources(UpdateS3ResourcesRequest updateS3ResourcesRequest)(Discontinued) Updates the classification types for the specified S3 resources.-
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
-
associateMemberAccount
default AssociateMemberAccountResponse associateMemberAccount(AssociateMemberAccountRequest associateMemberAccountRequest) throws InvalidInputException, LimitExceededException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Associates a specified Amazon Web Services account with Amazon Macie Classic as a member account.
- Parameters:
associateMemberAccountRequest-- Returns:
- Result of the AssociateMemberAccount operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.LimitExceededException- (Discontinued) The request was rejected because it attempted to create resources beyond the current Amazon Web Services account quotas. The error code describes the quota exceeded.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
associateMemberAccount
default AssociateMemberAccountResponse associateMemberAccount(Consumer<AssociateMemberAccountRequest.Builder> associateMemberAccountRequest) throws InvalidInputException, LimitExceededException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Associates a specified Amazon Web Services account with Amazon Macie Classic as a member account.
This is a convenience which creates an instance of the
AssociateMemberAccountRequest.Builderavoiding the need to create one manually viaAssociateMemberAccountRequest.builder()- Parameters:
associateMemberAccountRequest- AConsumerthat will call methods onAssociateMemberAccountRequest.Builderto create a request.- Returns:
- Result of the AssociateMemberAccount operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.LimitExceededException- (Discontinued) The request was rejected because it attempted to create resources beyond the current Amazon Web Services account quotas. The error code describes the quota exceeded.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
associateS3Resources
default AssociateS3ResourcesResponse associateS3Resources(AssociateS3ResourcesRequest associateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, LimitExceededException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification. If
memberAccountIdisn't specified, the action associates specified S3 resources with Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action associates specified S3 resources with Macie Classic for the specified member account.- Parameters:
associateS3ResourcesRequest-- Returns:
- Result of the AssociateS3Resources operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.LimitExceededException- (Discontinued) The request was rejected because it attempted to create resources beyond the current Amazon Web Services account quotas. The error code describes the quota exceeded.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
associateS3Resources
default AssociateS3ResourcesResponse associateS3Resources(Consumer<AssociateS3ResourcesRequest.Builder> associateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, LimitExceededException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification. If
memberAccountIdisn't specified, the action associates specified S3 resources with Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action associates specified S3 resources with Macie Classic for the specified member account.
This is a convenience which creates an instance of the
AssociateS3ResourcesRequest.Builderavoiding the need to create one manually viaAssociateS3ResourcesRequest.builder()- Parameters:
associateS3ResourcesRequest- AConsumerthat will call methods onAssociateS3ResourcesRequest.Builderto create a request.- Returns:
- Result of the AssociateS3Resources operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.LimitExceededException- (Discontinued) The request was rejected because it attempted to create resources beyond the current Amazon Web Services account quotas. The error code describes the quota exceeded.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
disassociateMemberAccount
default DisassociateMemberAccountResponse disassociateMemberAccount(DisassociateMemberAccountRequest disassociateMemberAccountRequest) throws InvalidInputException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Removes the specified member account from Amazon Macie Classic.
- Parameters:
disassociateMemberAccountRequest-- Returns:
- Result of the DisassociateMemberAccount operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
disassociateMemberAccount
default DisassociateMemberAccountResponse disassociateMemberAccount(Consumer<DisassociateMemberAccountRequest.Builder> disassociateMemberAccountRequest) throws InvalidInputException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Removes the specified member account from Amazon Macie Classic.
This is a convenience which creates an instance of the
DisassociateMemberAccountRequest.Builderavoiding the need to create one manually viaDisassociateMemberAccountRequest.builder()- Parameters:
disassociateMemberAccountRequest- AConsumerthat will call methods onDisassociateMemberAccountRequest.Builderto create a request.- Returns:
- Result of the DisassociateMemberAccount operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
disassociateS3Resources
default DisassociateS3ResourcesResponse disassociateS3Resources(DisassociateS3ResourcesRequest disassociateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Removes specified S3 resources from being monitored by Amazon Macie Classic. If
memberAccountIdisn't specified, the action removes specified S3 resources from Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action removes specified S3 resources from Macie Classic for the specified member account.- Parameters:
disassociateS3ResourcesRequest-- Returns:
- Result of the DisassociateS3Resources operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
disassociateS3Resources
default DisassociateS3ResourcesResponse disassociateS3Resources(Consumer<DisassociateS3ResourcesRequest.Builder> disassociateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Removes specified S3 resources from being monitored by Amazon Macie Classic. If
memberAccountIdisn't specified, the action removes specified S3 resources from Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action removes specified S3 resources from Macie Classic for the specified member account.
This is a convenience which creates an instance of the
DisassociateS3ResourcesRequest.Builderavoiding the need to create one manually viaDisassociateS3ResourcesRequest.builder()- Parameters:
disassociateS3ResourcesRequest- AConsumerthat will call methods onDisassociateS3ResourcesRequest.Builderto create a request.- Returns:
- Result of the DisassociateS3Resources operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listMemberAccounts
default ListMemberAccountsResponse listMemberAccounts(ListMemberAccountsRequest listMemberAccountsRequest) throws InternalException, InvalidInputException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.
- Parameters:
listMemberAccountsRequest-- Returns:
- Result of the ListMemberAccounts operation returned by the service.
- Throws:
InternalException- (Discontinued) Internal server error.InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listMemberAccounts
default ListMemberAccountsResponse listMemberAccounts(Consumer<ListMemberAccountsRequest.Builder> listMemberAccountsRequest) throws InternalException, InvalidInputException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.
This is a convenience which creates an instance of the
ListMemberAccountsRequest.Builderavoiding the need to create one manually viaListMemberAccountsRequest.builder()- Parameters:
listMemberAccountsRequest- AConsumerthat will call methods onListMemberAccountsRequest.Builderto create a request.- Returns:
- Result of the ListMemberAccounts operation returned by the service.
- Throws:
InternalException- (Discontinued) Internal server error.InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listMemberAccountsPaginator
default ListMemberAccountsIterable listMemberAccountsPaginator(ListMemberAccountsRequest listMemberAccountsRequest) throws InternalException, InvalidInputException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.
This is a variant of
listMemberAccounts(software.amazon.awssdk.services.macie.model.ListMemberAccountsRequest)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.macie.paginators.ListMemberAccountsIterable responses = client.listMemberAccountsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.macie.paginators.ListMemberAccountsIterable responses = client .listMemberAccountsPaginator(request); for (software.amazon.awssdk.services.macie.model.ListMemberAccountsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.macie.paginators.ListMemberAccountsIterable responses = client.listMemberAccountsPaginator(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
listMemberAccounts(software.amazon.awssdk.services.macie.model.ListMemberAccountsRequest)operation.- Parameters:
listMemberAccountsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InternalException- (Discontinued) Internal server error.InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listMemberAccountsPaginator
default ListMemberAccountsIterable listMemberAccountsPaginator(Consumer<ListMemberAccountsRequest.Builder> listMemberAccountsRequest) throws InternalException, InvalidInputException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Lists all Amazon Macie Classic member accounts for the current Macie Classic administrator account.
This is a variant of
listMemberAccounts(software.amazon.awssdk.services.macie.model.ListMemberAccountsRequest)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.macie.paginators.ListMemberAccountsIterable responses = client.listMemberAccountsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.macie.paginators.ListMemberAccountsIterable responses = client .listMemberAccountsPaginator(request); for (software.amazon.awssdk.services.macie.model.ListMemberAccountsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.macie.paginators.ListMemberAccountsIterable responses = client.listMemberAccountsPaginator(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
listMemberAccounts(software.amazon.awssdk.services.macie.model.ListMemberAccountsRequest)operation.This is a convenience which creates an instance of the
ListMemberAccountsRequest.Builderavoiding the need to create one manually viaListMemberAccountsRequest.builder()- Parameters:
listMemberAccountsRequest- AConsumerthat will call methods onListMemberAccountsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InternalException- (Discontinued) Internal server error.InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listS3Resources
default ListS3ResourcesResponse listS3Resources(ListS3ResourcesRequest listS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic. If
memberAccountIdisn't specified, the action lists the S3 resources associated with Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action lists the S3 resources associated with Macie Classic for the specified member account.- Parameters:
listS3ResourcesRequest-- Returns:
- Result of the ListS3Resources operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listS3Resources
default ListS3ResourcesResponse listS3Resources(Consumer<ListS3ResourcesRequest.Builder> listS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic. If
memberAccountIdisn't specified, the action lists the S3 resources associated with Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action lists the S3 resources associated with Macie Classic for the specified member account.
This is a convenience which creates an instance of the
ListS3ResourcesRequest.Builderavoiding the need to create one manually viaListS3ResourcesRequest.builder()- Parameters:
listS3ResourcesRequest- AConsumerthat will call methods onListS3ResourcesRequest.Builderto create a request.- Returns:
- Result of the ListS3Resources operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listS3ResourcesPaginator
default ListS3ResourcesIterable listS3ResourcesPaginator(ListS3ResourcesRequest listS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic. If
memberAccountIdisn't specified, the action lists the S3 resources associated with Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action lists the S3 resources associated with Macie Classic for the specified member account.
This is a variant of
listS3Resources(software.amazon.awssdk.services.macie.model.ListS3ResourcesRequest)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.macie.paginators.ListS3ResourcesIterable responses = client.listS3ResourcesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.macie.paginators.ListS3ResourcesIterable responses = client.listS3ResourcesPaginator(request); for (software.amazon.awssdk.services.macie.model.ListS3ResourcesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.macie.paginators.ListS3ResourcesIterable responses = client.listS3ResourcesPaginator(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
listS3Resources(software.amazon.awssdk.services.macie.model.ListS3ResourcesRequest)operation.- Parameters:
listS3ResourcesRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listS3ResourcesPaginator
default ListS3ResourcesIterable listS3ResourcesPaginator(Consumer<ListS3ResourcesRequest.Builder> listS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Lists all the S3 resources associated with Amazon Macie Classic. If
memberAccountIdisn't specified, the action lists the S3 resources associated with Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action lists the S3 resources associated with Macie Classic for the specified member account.
This is a variant of
listS3Resources(software.amazon.awssdk.services.macie.model.ListS3ResourcesRequest)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.macie.paginators.ListS3ResourcesIterable responses = client.listS3ResourcesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.macie.paginators.ListS3ResourcesIterable responses = client.listS3ResourcesPaginator(request); for (software.amazon.awssdk.services.macie.model.ListS3ResourcesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.macie.paginators.ListS3ResourcesIterable responses = client.listS3ResourcesPaginator(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
listS3Resources(software.amazon.awssdk.services.macie.model.ListS3ResourcesRequest)operation.This is a convenience which creates an instance of the
ListS3ResourcesRequest.Builderavoiding the need to create one manually viaListS3ResourcesRequest.builder()- Parameters:
listS3ResourcesRequest- AConsumerthat will call methods onListS3ResourcesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateS3Resources
default UpdateS3ResourcesResponse updateS3Resources(UpdateS3ResourcesRequest updateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Updates the classification types for the specified S3 resources. If
memberAccountIdisn't specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action updates the classification types of the S3 resources associated with Macie Classic for the specified member account.- Parameters:
updateS3ResourcesRequest-- Returns:
- Result of the UpdateS3Resources operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.InternalException- (Discontinued) Internal server error.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.MacieException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateS3Resources
default UpdateS3ResourcesResponse updateS3Resources(Consumer<UpdateS3ResourcesRequest.Builder> updateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
(Discontinued) Updates the classification types for the specified S3 resources. If
memberAccountIdisn't specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the current Macie Classic administrator account. IfmemberAccountIdis specified, the action updates the classification types of the S3 resources associated with Macie Classic for the specified member account.
This is a convenience which creates an instance of the
UpdateS3ResourcesRequest.Builderavoiding the need to create one manually viaUpdateS3ResourcesRequest.builder()- Parameters:
updateS3ResourcesRequest- AConsumerthat will call methods onUpdateS3ResourcesRequest.Builderto create a request.- Returns:
- Result of the UpdateS3Resources operation returned by the service.
- Throws:
InvalidInputException- (Discontinued) The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException- (Discontinued) You do not have required permissions to access the requested resource.InternalException- (Discontinued) Internal server error.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.MacieException- 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 MacieClient create()
Create aMacieClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static MacieClientBuilder builder()
Create a builder that can be used to configure and create aMacieClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default MacieServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-