use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.
the class EnhancedBatchWriteItems method main.
public static void main(String[] args) {
Region region = Region.US_EAST_1;
DynamoDbClient ddb = DynamoDbClient.builder().region(region).build();
DynamoDbEnhancedClient enhancedClient = DynamoDbEnhancedClient.builder().dynamoDbClient(ddb).build();
putBatchRecords(enhancedClient);
ddb.close();
}
use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.
the class EnhancedQueryRecordsWithFilter method main.
// Query the Customer table using a filter.
public static void main(String[] args) {
Region region = Region.US_EAST_1;
DynamoDbClient ddb = DynamoDbClient.builder().region(region).build();
DynamoDbEnhancedClient enhancedClient = DynamoDbEnhancedClient.builder().dynamoDbClient(ddb).build();
queryTableFilter(enhancedClient);
ddb.close();
}
use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.
the class DetectKeyPhrases method main.
public static void main(String[] args) {
String text = "Amazon.com, Inc. is located in Seattle, WA and was founded July 5th, 1994 by Jeff Bezos, allowing customers to buy everything from books to blenders. Seattle is north of Portland and south of Vancouver, BC. Other notable Seattle - based companies are Starbucks and Boeing.";
Region region = Region.US_EAST_1;
ComprehendClient comClient = ComprehendClient.builder().region(region).build();
System.out.println("Calling DetectKeyPhrases");
detectAllKeyPhrases(comClient, text);
comClient.close();
}
use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.
the class DetectSentiment method main.
public static void main(String[] args) {
String text = "Amazon.com, Inc. is located in Seattle, WA and was founded July 5th, 1994 by Jeff Bezos, allowing customers to buy everything from books to blenders. Seattle is north of Portland and south of Vancouver, BC. Other notable Seattle - based companies are Starbucks and Boeing.";
Region region = Region.US_EAST_1;
ComprehendClient comClient = ComprehendClient.builder().region(region).build();
System.out.println("Calling DetectSentiment");
detectSentiments(comClient, text);
comClient.close();
}
use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.
the class DetectPHI method main.
public static void main(String[] args) {
String text = "Pt is 87 yo woman, highschool teacher with past medical history that includes\n" + " - status post cardiac catheterization in April 2019.\n" + "She presents today with palpitations and chest pressure.\n" + "HPI : Sleeping trouble on present dosage of Clonidine. Severe Rash on face and leg, slightly itchy \n" + "Meds : Vyvanse 50 mgs po at breakfast daily, \n" + " Clonidine 0.2 mgs -- 1 and 1 / 2 tabs po qhs \n" + "HEENT : Boggy inferior turbinates, No oropharyngeal lesion \n" + "Lungs : clear \n" + "Heart : Regular rhythm \n" + "Skin : Mild erythematous eruption to hairline \n" + "\n" + "Follow-up as scheduled";
Region region = Region.US_EAST_1;
ComprehendMedicalClient medClient = ComprehendMedicalClient.builder().region(region).build();
System.out.println("Calling Detect Medical Entities");
detectPHIValues(medClient, text);
medClient.close();
}
Aggregations