Interface PersonalizeAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface PersonalizeAsyncClient extends AwsClient
Service client for accessing Amazon Personalize asynchronously. This can be created using the static builder() method.

Amazon Personalize is a machine learning service that makes it easy to add individualized recommendations to customers.

  • Field Details

  • Method Details

    • createBatchInferenceJob

      default CompletableFuture<CreateBatchInferenceJobResponse> createBatchInferenceJob(CreateBatchInferenceJobRequest createBatchInferenceJobRequest)

      Creates a batch inference job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see Creating a batch inference job.

      Parameters:
      createBatchInferenceJobRequest -
      Returns:
      A Java Future containing the result of the CreateBatchInferenceJob operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createBatchInferenceJob

      default CompletableFuture<CreateBatchInferenceJobResponse> createBatchInferenceJob(Consumer<CreateBatchInferenceJobRequest.Builder> createBatchInferenceJobRequest)

      Creates a batch inference job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see Creating a batch inference job.


      This is a convenience which creates an instance of the CreateBatchInferenceJobRequest.Builder avoiding the need to create one manually via CreateBatchInferenceJobRequest.builder()

      Parameters:
      createBatchInferenceJobRequest - A Consumer that will call methods on CreateBatchInferenceJobRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateBatchInferenceJob operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createBatchSegmentJob

      default CompletableFuture<CreateBatchSegmentJobResponse> createBatchSegmentJob(CreateBatchSegmentJobRequest createBatchSegmentJobRequest)

      Creates a batch segment job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see Getting batch recommendations and user segments.

      Parameters:
      createBatchSegmentJobRequest -
      Returns:
      A Java Future containing the result of the CreateBatchSegmentJob operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createBatchSegmentJob

      default CompletableFuture<CreateBatchSegmentJobResponse> createBatchSegmentJob(Consumer<CreateBatchSegmentJobRequest.Builder> createBatchSegmentJobRequest)

      Creates a batch segment job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see Getting batch recommendations and user segments.


      This is a convenience which creates an instance of the CreateBatchSegmentJobRequest.Builder avoiding the need to create one manually via CreateBatchSegmentJobRequest.builder()

      Parameters:
      createBatchSegmentJobRequest - A Consumer that will call methods on CreateBatchSegmentJobRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateBatchSegmentJob operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createCampaign

      default CompletableFuture<CreateCampaignResponse> createCampaign(CreateCampaignRequest createCampaignRequest)

      Creates a campaign that deploys a solution version. When a client calls the GetRecommendations and GetPersonalizedRanking APIs, a campaign is specified in the request.

      Minimum Provisioned TPS and Auto-Scaling

      A high minProvisionedTPS will increase your bill. We recommend starting with 1 for minProvisionedTPS (the default). Track your usage using Amazon CloudWatch metrics, and increase the minProvisionedTPS as necessary.

      A transaction is a single GetRecommendations or GetPersonalizedRanking call. Transactions per second (TPS) is the throughput and unit of billing for Amazon Personalize. The minimum provisioned TPS (minProvisionedTPS) specifies the baseline throughput provisioned by Amazon Personalize, and thus, the minimum billing charge.

      If your TPS increases beyond minProvisionedTPS, Amazon Personalize auto-scales the provisioned capacity up and down, but never below minProvisionedTPS. There's a short time delay while the capacity is increased that might cause loss of transactions.

      The actual TPS used is calculated as the average requests/second within a 5-minute window. You pay for maximum of either the minimum provisioned TPS or the actual TPS. We recommend starting with a low minProvisionedTPS, track your usage using Amazon CloudWatch metrics, and then increase the minProvisionedTPS as necessary.

      Status

      A campaign can be in one of the following states:

      • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

      • DELETE PENDING > DELETE IN_PROGRESS

      To get the campaign status, call DescribeCampaign.

      Wait until the status of the campaign is ACTIVE before asking the campaign for recommendations.

      Related APIs

      Parameters:
      createCampaignRequest -
      Returns:
      A Java Future containing the result of the CreateCampaign operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createCampaign

      default CompletableFuture<CreateCampaignResponse> createCampaign(Consumer<CreateCampaignRequest.Builder> createCampaignRequest)

      Creates a campaign that deploys a solution version. When a client calls the GetRecommendations and GetPersonalizedRanking APIs, a campaign is specified in the request.

      Minimum Provisioned TPS and Auto-Scaling

      A high minProvisionedTPS will increase your bill. We recommend starting with 1 for minProvisionedTPS (the default). Track your usage using Amazon CloudWatch metrics, and increase the minProvisionedTPS as necessary.

      A transaction is a single GetRecommendations or GetPersonalizedRanking call. Transactions per second (TPS) is the throughput and unit of billing for Amazon Personalize. The minimum provisioned TPS (minProvisionedTPS) specifies the baseline throughput provisioned by Amazon Personalize, and thus, the minimum billing charge.

      If your TPS increases beyond minProvisionedTPS, Amazon Personalize auto-scales the provisioned capacity up and down, but never below minProvisionedTPS. There's a short time delay while the capacity is increased that might cause loss of transactions.

      The actual TPS used is calculated as the average requests/second within a 5-minute window. You pay for maximum of either the minimum provisioned TPS or the actual TPS. We recommend starting with a low minProvisionedTPS, track your usage using Amazon CloudWatch metrics, and then increase the minProvisionedTPS as necessary.

      Status

      A campaign can be in one of the following states:

      • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

      • DELETE PENDING > DELETE IN_PROGRESS

      To get the campaign status, call DescribeCampaign.

      Wait until the status of the campaign is ACTIVE before asking the campaign for recommendations.

      Related APIs


      This is a convenience which creates an instance of the CreateCampaignRequest.Builder avoiding the need to create one manually via CreateCampaignRequest.builder()

      Parameters:
      createCampaignRequest - A Consumer that will call methods on CreateCampaignRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateCampaign operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createDataset

      default CompletableFuture<CreateDatasetResponse> createDataset(CreateDatasetRequest createDatasetRequest)

      Creates an empty dataset and adds it to the specified dataset group. Use CreateDatasetImportJob to import your training data to a dataset.

      There are three types of datasets:

      • Interactions

      • Items

      • Users

      Each dataset type has an associated schema with required field types. Only the Interactions dataset is required in order to train a model (also referred to as creating a solution).

      A dataset can be in one of the following states:

      • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

      • DELETE PENDING > DELETE IN_PROGRESS

      To get the status of the dataset, call DescribeDataset.

      Related APIs

      Parameters:
      createDatasetRequest -
      Returns:
      A Java Future containing the result of the CreateDataset operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createDataset

      default CompletableFuture<CreateDatasetResponse> createDataset(Consumer<CreateDatasetRequest.Builder> createDatasetRequest)

      Creates an empty dataset and adds it to the specified dataset group. Use CreateDatasetImportJob to import your training data to a dataset.

      There are three types of datasets:

      • Interactions

      • Items

      • Users

      Each dataset type has an associated schema with required field types. Only the Interactions dataset is required in order to train a model (also referred to as creating a solution).

      A dataset can be in one of the following states:

      • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

      • DELETE PENDING > DELETE IN_PROGRESS

      To get the status of the dataset, call DescribeDataset.

      Related APIs


      This is a convenience which creates an instance of the CreateDatasetRequest.Builder avoiding the need to create one manually via CreateDatasetRequest.builder()

      Parameters:
      createDatasetRequest - A Consumer that will call methods on CreateDatasetRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateDataset operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createDatasetExportJob

      default CompletableFuture<CreateDatasetExportJobResponse> createDatasetExportJob(CreateDatasetExportJobRequest createDatasetExportJobRequest)

      Creates a job that exports data from your dataset to an Amazon S3 bucket. To allow Amazon Personalize to export the training data, you must specify an service-linked IAM role that gives Amazon Personalize PutObject permissions for your Amazon S3 bucket. For information, see Exporting a dataset in the Amazon Personalize developer guide.

      Status

      A dataset export job can be in one of the following states:

      • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

      To get the status of the export job, call DescribeDatasetExportJob, and specify the Amazon Resource Name (ARN) of the dataset export job. The dataset export is complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

      Parameters:
      createDatasetExportJobRequest -
      Returns:
      A Java Future containing the result of the CreateDatasetExportJob operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createDatasetExportJob

      default CompletableFuture<CreateDatasetExportJobResponse> createDatasetExportJob(Consumer<CreateDatasetExportJobRequest.Builder> createDatasetExportJobRequest)

      Creates a job that exports data from your dataset to an Amazon S3 bucket. To allow Amazon Personalize to export the training data, you must specify an service-linked IAM role that gives Amazon Personalize PutObject permissions for your Amazon S3 bucket. For information, see Exporting a dataset in the Amazon Personalize developer guide.

      Status

      A dataset export job can be in one of the following states:

      • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

      To get the status of the export job, call DescribeDatasetExportJob, and specify the Amazon Resource Name (ARN) of the dataset export job. The dataset export is complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.


      This is a convenience which creates an instance of the CreateDatasetExportJobRequest.Builder avoiding the need to create one manually via CreateDatasetExportJobRequest.builder()

      Parameters:
      createDatasetExportJobRequest - A Consumer that will call methods on CreateDatasetExportJobRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateDatasetExportJob operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceNotFoundException Could not find the specified resource.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • ResourceInUseException The specified resource is in use.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createDatasetGroup

      default CompletableFuture<CreateDatasetGroupResponse> createDatasetGroup(CreateDatasetGroupRequest createDatasetGroupRequest)

      Creates an empty dataset group. A dataset group is a container for Amazon Personalize resources. A dataset group can contain at most three datasets, one for each type of dataset:

      • Interactions

      • Items

      • Users

      A dataset group can be a Domain dataset group, where you specify a domain and use pre-configured resources like recommenders, or a Custom dataset group, where you use custom resources, such as a solution with a solution version, that you deploy with a campaign. If you start with a Domain dataset group, you can still add custom resources such as solutions and solution versions trained with recipes for custom use cases and deployed with campaigns.

      A dataset group can be in one of the following states:

      • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

      • DELETE PENDING

      To get the status of the dataset group, call DescribeDatasetGroup. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the creation failed.

      You must wait until the status of the dataset group is ACTIVE before adding a dataset to the group.

      You can specify an Key Management Service (KMS) key to encrypt the datasets in the group. If you specify a KMS key, you must also include an Identity and Access Management (IAM) role that has permission to access the key.

      APIs that require a dataset group ARN in the request

      Related APIs

      Parameters:
      createDatasetGroupRequest -
      Returns:
      A Java Future containing the result of the CreateDatasetGroup operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createDatasetGroup

      default CompletableFuture<CreateDatasetGroupResponse> createDatasetGroup(Consumer<CreateDatasetGroupRequest.Builder> createDatasetGroupRequest)

      Creates an empty dataset group. A dataset group is a container for Amazon Personalize resources. A dataset group can contain at most three datasets, one for each type of dataset:

      • Interactions

      • Items

      • Users

      A dataset group can be a Domain dataset group, where you specify a domain and use pre-configured resources like recommenders, or a Custom dataset group, where you use custom resources, such as a solution with a solution version, that you deploy with a campaign. If you start with a Domain dataset group, you can still add custom resources such as solutions and solution versions trained with recipes for custom use cases and deployed with campaigns.

      A dataset group can be in one of the following states:

      • CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

      • DELETE PENDING

      To get the status of the dataset group, call DescribeDatasetGroup. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the creation failed.

      You must wait until the status of the dataset group is ACTIVE before adding a dataset to the group.

      You can specify an Key Management Service (KMS) key to encrypt the datasets in the group. If you specify a KMS key, you must also include an Identity and Access Management (IAM) role that has permission to access the key.

      APIs that require a dataset group ARN in the request

      Related APIs


      This is a convenience which creates an instance of the CreateDatasetGroupRequest.Builder avoiding the need to create one manually via CreateDatasetGroupRequest.builder()

      Parameters:
      createDatasetGroupRequest - A Consumer that will call methods on CreateDatasetGroupRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the CreateDatasetGroup operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InvalidInputException Provide a valid value for the field or parameter.
      • ResourceAlreadyExistsException The specified resource already exists.
      • LimitExceededException The limit on the number of requests per second has been exceeded.
      • TooManyTagsException You have exceeded the maximum number of tags you can apply to this resource.
      • 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.
      • PersonalizeException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • createDatasetImportJob

      default CompletableFuture<CreateDatasetImportJobResponse> createDatasetImportJob(CreateDatasetImportJobRequest createDatasetImportJobRequest)

      Creates a job that imports training data from your data source (an Amazon S3 bucket) to an Amazon Personalize dataset. To allow Amazon Personalize to ACTIVE -or- CREATE FAILED

    To get the status of the import job, call DescribeDatasetImportJob, providing the Amazon Resource Name (ARN) of the dataset import job. The dataset import is complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

    Importing takes time. You must wait until the status shows as ACTIVE before training a model using the dataset.

    Related APIs