@Generated(value="software.amazon.awssdk:codegen") public interface MacieClient extends SdkClient
builder() method.
Amazon Macie Classic is a security service that uses machine learning to automatically discover, classify, and protect sensitive data in AWS. Macie Classic recognizes sensitive data such as personally identifiable information (PII) or intellectual property, and provides you with dashboards and alerts that give visibility into how this data is being accessed or moved. For more information, see the Amazon Macie Classic User Guide.
A new Amazon Macie is now available with significant design improvements and additional features, at a lower price and in most AWS Regions. We encourage you to explore and use the new and improved features, and benefit from the reduced cost. To learn about features and pricing for the new Amazon Macie, see Amazon Macie.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
default AssociateMemberAccountResponse |
associateMemberAccount(AssociateMemberAccountRequest associateMemberAccountRequest)
Associates a specified AWS account with Amazon Macie Classic as a member account.
|
default AssociateMemberAccountResponse |
associateMemberAccount(Consumer<AssociateMemberAccountRequest.Builder> associateMemberAccountRequest)
Associates a specified AWS account with Amazon Macie Classic as a member account.
|
default AssociateS3ResourcesResponse |
associateS3Resources(AssociateS3ResourcesRequest associateS3ResourcesRequest)
Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification.
|
default AssociateS3ResourcesResponse |
associateS3Resources(Consumer<AssociateS3ResourcesRequest.Builder> associateS3ResourcesRequest)
Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification.
|
static MacieClientBuilder |
builder()
Create a builder that can be used to configure and create a
MacieClient. |
static MacieClient |
create()
Create a
MacieClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default DisassociateMemberAccountResponse |
disassociateMemberAccount(Consumer<DisassociateMemberAccountRequest.Builder> disassociateMemberAccountRequest)
Removes the specified member account from Amazon Macie Classic.
|
default DisassociateMemberAccountResponse |
disassociateMemberAccount(DisassociateMemberAccountRequest disassociateMemberAccountRequest)
Removes the specified member account from Amazon Macie Classic.
|
default DisassociateS3ResourcesResponse |
disassociateS3Resources(Consumer<DisassociateS3ResourcesRequest.Builder> disassociateS3ResourcesRequest)
Removes specified S3 resources from being monitored by Amazon Macie Classic.
|
default DisassociateS3ResourcesResponse |
disassociateS3Resources(DisassociateS3ResourcesRequest disassociateS3ResourcesRequest)
Removes specified S3 resources from being monitored by Amazon Macie Classic.
|
default ListMemberAccountsResponse |
listMemberAccounts(Consumer<ListMemberAccountsRequest.Builder> listMemberAccountsRequest)
Lists all Amazon Macie Classic member accounts for the current Amazon Macie Classic master account.
|
default ListMemberAccountsResponse |
listMemberAccounts(ListMemberAccountsRequest listMemberAccountsRequest)
Lists all Amazon Macie Classic member accounts for the current Amazon Macie Classic master account.
|
default ListMemberAccountsIterable |
listMemberAccountsPaginator(Consumer<ListMemberAccountsRequest.Builder> listMemberAccountsRequest)
Lists all Amazon Macie Classic member accounts for the current Amazon Macie Classic master account.
|
default ListMemberAccountsIterable |
listMemberAccountsPaginator(ListMemberAccountsRequest listMemberAccountsRequest)
Lists all Amazon Macie Classic member accounts for the current Amazon Macie Classic master account.
|
default ListS3ResourcesResponse |
listS3Resources(Consumer<ListS3ResourcesRequest.Builder> listS3ResourcesRequest)
Lists all the S3 resources associated with Amazon Macie Classic.
|
default ListS3ResourcesResponse |
listS3Resources(ListS3ResourcesRequest listS3ResourcesRequest)
Lists all the S3 resources associated with Amazon Macie Classic.
|
default ListS3ResourcesIterable |
listS3ResourcesPaginator(Consumer<ListS3ResourcesRequest.Builder> listS3ResourcesRequest)
Lists all the S3 resources associated with Amazon Macie Classic.
|
default ListS3ResourcesIterable |
listS3ResourcesPaginator(ListS3ResourcesRequest listS3ResourcesRequest)
Lists all the S3 resources associated with Amazon Macie Classic.
|
static ServiceMetadata |
serviceMetadata() |
default UpdateS3ResourcesResponse |
updateS3Resources(Consumer<UpdateS3ResourcesRequest.Builder> updateS3ResourcesRequest)
Updates the classification types for the specified S3 resources.
|
default UpdateS3ResourcesResponse |
updateS3Resources(UpdateS3ResourcesRequest updateS3ResourcesRequest)
Updates the classification types for the specified S3 resources.
|
serviceNameclosestatic final String SERVICE_NAME
static MacieClient create()
MacieClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static MacieClientBuilder builder()
MacieClient.default AssociateMemberAccountResponse associateMemberAccount(AssociateMemberAccountRequest associateMemberAccountRequest) throws InvalidInputException, LimitExceededException, InternalException, AwsServiceException, SdkClientException, MacieException
Associates a specified AWS account with Amazon Macie Classic as a member account.
associateMemberAccountRequest - InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.LimitExceededException - The request was rejected because it attempted to create resources beyond the current AWS account limits.
The error code describes the limit exceeded.InternalException - 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.AwsServiceExceptiondefault AssociateMemberAccountResponse associateMemberAccount(Consumer<AssociateMemberAccountRequest.Builder> associateMemberAccountRequest) throws InvalidInputException, LimitExceededException, InternalException, AwsServiceException, SdkClientException, MacieException
Associates a specified AWS account with Amazon Macie Classic as a member account.
This is a convenience which creates an instance of the AssociateMemberAccountRequest.Builder avoiding the
need to create one manually via AssociateMemberAccountRequest.builder()
associateMemberAccountRequest - A Consumer that will call methods on AssociateMemberAccountRequest.Builder to create a
request.InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.LimitExceededException - The request was rejected because it attempted to create resources beyond the current AWS account limits.
The error code describes the limit exceeded.InternalException - 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.AwsServiceExceptiondefault AssociateS3ResourcesResponse associateS3Resources(AssociateS3ResourcesRequest associateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, LimitExceededException, InternalException, AwsServiceException, SdkClientException, MacieException
Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification. If memberAccountId isn't specified, the action associates specified S3 resources with Macie Classic for the current master account. If memberAccountId is specified, the action associates specified S3 resources with Macie Classic for the specified member account.
associateS3ResourcesRequest - InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.LimitExceededException - The request was rejected because it attempted to create resources beyond the current AWS account limits.
The error code describes the limit exceeded.InternalException - 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.AwsServiceExceptiondefault AssociateS3ResourcesResponse associateS3Resources(Consumer<AssociateS3ResourcesRequest.Builder> associateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, LimitExceededException, InternalException, AwsServiceException, SdkClientException, MacieException
Associates specified S3 resources with Amazon Macie Classic for monitoring and data classification. If memberAccountId isn't specified, the action associates specified S3 resources with Macie Classic for the current master account. If memberAccountId is 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.Builder avoiding the
need to create one manually via AssociateS3ResourcesRequest.builder()
associateS3ResourcesRequest - A Consumer that will call methods on AssociateS3ResourcesRequest.Builder to create a
request.InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.LimitExceededException - The request was rejected because it attempted to create resources beyond the current AWS account limits.
The error code describes the limit exceeded.InternalException - 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.AwsServiceExceptiondefault DisassociateMemberAccountResponse disassociateMemberAccount(DisassociateMemberAccountRequest disassociateMemberAccountRequest) throws InvalidInputException, InternalException, AwsServiceException, SdkClientException, MacieException
Removes the specified member account from Amazon Macie Classic.
disassociateMemberAccountRequest - InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.InternalException - 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.AwsServiceExceptiondefault DisassociateMemberAccountResponse disassociateMemberAccount(Consumer<DisassociateMemberAccountRequest.Builder> disassociateMemberAccountRequest) throws InvalidInputException, InternalException, AwsServiceException, SdkClientException, MacieException
Removes the specified member account from Amazon Macie Classic.
This is a convenience which creates an instance of the DisassociateMemberAccountRequest.Builder avoiding
the need to create one manually via DisassociateMemberAccountRequest.builder()
disassociateMemberAccountRequest - A Consumer that will call methods on DisassociateMemberAccountRequest.Builder to create a
request.InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.InternalException - 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.AwsServiceExceptiondefault DisassociateS3ResourcesResponse disassociateS3Resources(DisassociateS3ResourcesRequest disassociateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
Removes specified S3 resources from being monitored by Amazon Macie Classic. If memberAccountId isn't specified, the action removes specified S3 resources from Macie Classic for the current master account. If memberAccountId is specified, the action removes specified S3 resources from Macie Classic for the specified member account.
disassociateS3ResourcesRequest - InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.InternalException - 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.AwsServiceExceptiondefault DisassociateS3ResourcesResponse disassociateS3Resources(Consumer<DisassociateS3ResourcesRequest.Builder> disassociateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
Removes specified S3 resources from being monitored by Amazon Macie Classic. If memberAccountId isn't specified, the action removes specified S3 resources from Macie Classic for the current master account. If memberAccountId is 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.Builder avoiding
the need to create one manually via DisassociateS3ResourcesRequest.builder()
disassociateS3ResourcesRequest - A Consumer that will call methods on DisassociateS3ResourcesRequest.Builder to create a
request.InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.InternalException - 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.AwsServiceExceptiondefault ListMemberAccountsResponse listMemberAccounts(ListMemberAccountsRequest listMemberAccountsRequest) throws InternalException, InvalidInputException, AwsServiceException, SdkClientException, MacieException
Lists all Amazon Macie Classic member accounts for the current Amazon Macie Classic master account.
listMemberAccountsRequest - InternalException - Internal server error.InvalidInputException - 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.AwsServiceExceptiondefault ListMemberAccountsResponse listMemberAccounts(Consumer<ListMemberAccountsRequest.Builder> listMemberAccountsRequest) throws InternalException, InvalidInputException, AwsServiceException, SdkClientException, MacieException
Lists all Amazon Macie Classic member accounts for the current Amazon Macie Classic master account.
This is a convenience which creates an instance of the ListMemberAccountsRequest.Builder avoiding the
need to create one manually via ListMemberAccountsRequest.builder()
listMemberAccountsRequest - A Consumer that will call methods on ListMemberAccountsRequest.Builder to create a
request.InternalException - Internal server error.InvalidInputException - 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.AwsServiceExceptiondefault ListMemberAccountsIterable listMemberAccountsPaginator(ListMemberAccountsRequest listMemberAccountsRequest) throws InternalException, InvalidInputException, AwsServiceException, SdkClientException, MacieException
Lists all Amazon Macie Classic member accounts for the current Amazon Macie Classic master 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
software.amazon.awssdk.services.macie.paginators.ListMemberAccountsIterable responses = client.listMemberAccountsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@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 directly
software.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.
listMemberAccountsRequest - InternalException - Internal server error.InvalidInputException - 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.AwsServiceExceptiondefault ListMemberAccountsIterable listMemberAccountsPaginator(Consumer<ListMemberAccountsRequest.Builder> listMemberAccountsRequest) throws InternalException, InvalidInputException, AwsServiceException, SdkClientException, MacieException
Lists all Amazon Macie Classic member accounts for the current Amazon Macie Classic master 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
software.amazon.awssdk.services.macie.paginators.ListMemberAccountsIterable responses = client.listMemberAccountsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@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 directly
software.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.Builder avoiding the
need to create one manually via ListMemberAccountsRequest.builder()
listMemberAccountsRequest - A Consumer that will call methods on ListMemberAccountsRequest.Builder to create a
request.InternalException - Internal server error.InvalidInputException - 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.AwsServiceExceptiondefault ListS3ResourcesResponse listS3Resources(ListS3ResourcesRequest listS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
Lists all the S3 resources associated with Amazon Macie Classic. If memberAccountId isn't specified, the action lists the S3 resources associated with Amazon Macie Classic for the current master account. If memberAccountId is specified, the action lists the S3 resources associated with Amazon Macie Classic for the specified member account.
listS3ResourcesRequest - InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.InternalException - 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.AwsServiceExceptiondefault ListS3ResourcesResponse listS3Resources(Consumer<ListS3ResourcesRequest.Builder> listS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
Lists all the S3 resources associated with Amazon Macie Classic. If memberAccountId isn't specified, the action lists the S3 resources associated with Amazon Macie Classic for the current master account. If memberAccountId is specified, the action lists the S3 resources associated with Amazon Macie Classic for the specified member account.
This is a convenience which creates an instance of the ListS3ResourcesRequest.Builder avoiding the need
to create one manually via ListS3ResourcesRequest.builder()
listS3ResourcesRequest - A Consumer that will call methods on ListS3ResourcesRequest.Builder to create a request.InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.InternalException - 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.AwsServiceExceptiondefault ListS3ResourcesIterable listS3ResourcesPaginator(ListS3ResourcesRequest listS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
Lists all the S3 resources associated with Amazon Macie Classic. If memberAccountId isn't specified, the action lists the S3 resources associated with Amazon Macie Classic for the current master account. If memberAccountId is specified, the action lists the S3 resources associated with Amazon 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
software.amazon.awssdk.services.macie.paginators.ListS3ResourcesIterable responses = client.listS3ResourcesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@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 directly
software.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.
listS3ResourcesRequest - InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.InternalException - 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.AwsServiceExceptiondefault ListS3ResourcesIterable listS3ResourcesPaginator(Consumer<ListS3ResourcesRequest.Builder> listS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
Lists all the S3 resources associated with Amazon Macie Classic. If memberAccountId isn't specified, the action lists the S3 resources associated with Amazon Macie Classic for the current master account. If memberAccountId is specified, the action lists the S3 resources associated with Amazon 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
software.amazon.awssdk.services.macie.paginators.ListS3ResourcesIterable responses = client.listS3ResourcesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@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 directly
software.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.Builder avoiding the need
to create one manually via ListS3ResourcesRequest.builder()
listS3ResourcesRequest - A Consumer that will call methods on ListS3ResourcesRequest.Builder to create a request.InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.InternalException - 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.AwsServiceExceptiondefault UpdateS3ResourcesResponse updateS3Resources(UpdateS3ResourcesRequest updateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
Updates the classification types for the specified S3 resources. If memberAccountId isn't specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the current master account. If memberAccountId is specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the specified member account.
updateS3ResourcesRequest - InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.InternalException - 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.AwsServiceExceptiondefault UpdateS3ResourcesResponse updateS3Resources(Consumer<UpdateS3ResourcesRequest.Builder> updateS3ResourcesRequest) throws InvalidInputException, AccessDeniedException, InternalException, AwsServiceException, SdkClientException, MacieException
Updates the classification types for the specified S3 resources. If memberAccountId isn't specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the current master account. If memberAccountId is specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the specified member account.
This is a convenience which creates an instance of the UpdateS3ResourcesRequest.Builder avoiding the need
to create one manually via UpdateS3ResourcesRequest.builder()
updateS3ResourcesRequest - A Consumer that will call methods on UpdateS3ResourcesRequest.Builder to create a request.InvalidInputException - The request was rejected because an invalid or out-of-range value was supplied for an input parameter.AccessDeniedException - You do not have required permissions to access the requested resource.InternalException - 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.AwsServiceExceptionstatic ServiceMetadata serviceMetadata()
Copyright © 2020. All rights reserved.