Search in sources :

Example 6 with PersonalizeClient

use of software.amazon.awssdk.services.personalize.PersonalizeClient in project aws-doc-sdk-examples by awsdocs.

the class DeleteEventTracker method main.

public static void main(String[] args) {
    Region region = Region.US_WEST_2;
    String eventTrackerArn = args[0];
    PersonalizeClient personalizeClient = PersonalizeClient.builder().region(region).build();
    deleteEventTracker(personalizeClient, eventTrackerArn);
    personalizeClient.close();
}
Also used : PersonalizeClient(software.amazon.awssdk.services.personalize.PersonalizeClient) Region(software.amazon.awssdk.regions.Region)

Example 7 with PersonalizeClient

use of software.amazon.awssdk.services.personalize.PersonalizeClient in project aws-doc-sdk-examples by awsdocs.

the class DescribeRecipe method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    DescribeRecipe <recipeArn>\n\n" + "Where:\n" + "    recipeArn - The ARN of the recipe.\n\n";
    if (args.length < 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String recipeArn = args[0];
    Region region = Region.US_EAST_1;
    PersonalizeClient personalizeClient = PersonalizeClient.builder().region(region).build();
    describeSpecificRecipe(personalizeClient, recipeArn);
    personalizeClient.close();
}
Also used : PersonalizeClient(software.amazon.awssdk.services.personalize.PersonalizeClient) Region(software.amazon.awssdk.regions.Region)

Example 8 with PersonalizeClient

use of software.amazon.awssdk.services.personalize.PersonalizeClient in project aws-doc-sdk-examples by awsdocs.

the class ListSolutions method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    ListSolutions <datasetGroupArn>\n\n" + "Where:\n" + "    datasetGroupArn - The ARN of the data set group.\n\n";
    if (args.length < 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String datasetGroupArn = args[0];
    Region region = Region.US_EAST_1;
    PersonalizeClient personalizeClient = PersonalizeClient.builder().region(region).build();
    listAllSolutions(personalizeClient, datasetGroupArn);
    personalizeClient.close();
}
Also used : PersonalizeClient(software.amazon.awssdk.services.personalize.PersonalizeClient) Region(software.amazon.awssdk.regions.Region)

Example 9 with PersonalizeClient

use of software.amazon.awssdk.services.personalize.PersonalizeClient in project aws-doc-sdk-examples by awsdocs.

the class UpdateCampaign method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    UpdateCampaign <campaignArn, solutionVersion, minProvisionedTPS>\n\n" + "Where:\n" + "    campaignArn - The Amazon Resource Name (ARN) of the campaign to update.\n" + "    solutionVersion - The Amazon Resource Name (ARN) of the new solution version to deploy.\n" + "    minProvisionedTPS - Specifies the requested minimum provisioned transactions" + "(recommendations) per second that Amazon Personalize will support.\n";
    if (args.length != 3) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String campaignArn = args[0];
    String solutionVersionArn = args[1];
    Integer minProvisionedTPS = Integer.parseInt(args[2]);
    // Change the region to the region where your resources are located.
    Region region = Region.US_WEST_2;
    // Build a personalize client
    PersonalizeClient personalizeClient = PersonalizeClient.builder().region(region).build();
    updateCampaign(personalizeClient, campaignArn, solutionVersionArn, minProvisionedTPS);
    personalizeClient.close();
}
Also used : PersonalizeClient(software.amazon.awssdk.services.personalize.PersonalizeClient) Region(software.amazon.awssdk.regions.Region)

Example 10 with PersonalizeClient

use of software.amazon.awssdk.services.personalize.PersonalizeClient in project aws-doc-sdk-examples by awsdocs.

the class CreateDatasetGroup method main.

public static void main(String[] args) {
    final String USAGE = "Usage:\n" + "    CreateDatasetGroup <name>\n\n" + "Where:\n" + "   name - The name for the new dataset group.\n\n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    // Change to the region where your resources are located
    Region region = Region.US_WEST_2;
    String datasetGroupName = args[0];
    PersonalizeClient personalizeClient = PersonalizeClient.builder().region(region).build();
    String datasetGroupArn = createDatasetGroup(personalizeClient, datasetGroupName);
    System.out.println("Dataset group ARN: " + datasetGroupArn);
    personalizeClient.close();
}
Also used : PersonalizeClient(software.amazon.awssdk.services.personalize.PersonalizeClient) Region(software.amazon.awssdk.regions.Region)

Aggregations

PersonalizeClient (software.amazon.awssdk.services.personalize.PersonalizeClient)23 Region (software.amazon.awssdk.regions.Region)22 DatasetProvider (com.amazonaws.personalize.client.datasets.DatasetProvider)1 MovieLensDatasetProvider (com.amazonaws.personalize.client.datasets.MovieLensDatasetProvider)1 CampaignManager (com.amazonaws.personalize.client.resource.CampaignManager)1 EventTrackerManager (com.amazonaws.personalize.client.resource.EventTrackerManager)1 IamClient (software.amazon.awssdk.services.iam.IamClient)1 IngestionMode (software.amazon.awssdk.services.personalize.model.IngestionMode)1 PersonalizeEventsClient (software.amazon.awssdk.services.personalizeevents.PersonalizeEventsClient)1 PersonalizeRuntimeClient (software.amazon.awssdk.services.personalizeruntime.PersonalizeRuntimeClient)1 S3Client (software.amazon.awssdk.services.s3.S3Client)1