Skip to content

Commit

Permalink
java - adding descriptions for athena and cloudwatch examples and add…
Browse files Browse the repository at this point in the history
…ing file names to the description for the rest
  • Loading branch information
soo-aws committed Oct 21, 2018
1 parent 0439e4c commit f6a480e
Show file tree
Hide file tree
Showing 92 changed files with 97 additions and 169 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[AthenaClientFactory.java demonstrates how to create and configure an Amazon Athena client]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-service:[athena]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


package aws.example.athena;

import com.amazonaws.ClientConfiguration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[CreateNamedQueryExample.java demonstrates how to create a named query]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-service:[athena]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


package aws.example.athena;

import com.amazonaws.services.athena.AmazonAthena;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[DeleteNamedQueryExample.java demonstrates how to delete a named query by using the named query ID.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-service:[athena]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


package aws.example.athena;

import com.amazonaws.services.athena.AmazonAthena;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[ExampleConstants.java demonstrates how to query a table created by the getting started tutorial in Athena]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-service:[athena]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


package aws.example.athena;

public class ExampleConstants {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[ListNamedQueryExample.java demonstrates how to obtain a list of named query IDs.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-service:[athena]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


package aws.example.athena;

import com.amazonaws.services.athena.AmazonAthena;
Expand Down Expand Up @@ -41,7 +38,7 @@ public static void main(String[] args) throws Exception
while (hasMoreResults) {
List<String> namedQueryIds = listNamedQueriesResult.getNamedQueryIds();
// process named query IDs

// If nextToken is not null, there are more results. Get the next page of results.
if (listNamedQueriesResult.getNextToken() != null) {
listNamedQueriesResult = athenaClient.listNamedQueries(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[ListQueryExecutionsExample.java demonstrates how to obtain a list of query execution IDs.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-service:[athena]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


package aws.example.athena;

import com.amazonaws.services.athena.AmazonAthena;
Expand Down Expand Up @@ -40,7 +37,7 @@ public static void main(String[] args) throws Exception
while (hasMoreResults) {
List<String> queryExecutionIds = listQueryExecutionsResult.getQueryExecutionIds();
// process queryExecutionIds.

System.out.println(queryExecutionIds);

//If nextToken is not null, then there are more results. Get the next page of results.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[StartQueryExample.java demonstrates how to submit a query to Athena for execution, wait till results are available, and then process the results.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-service:[athena]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


package aws.example.athena;

import com.amazonaws.services.athena.AmazonAthena;
Expand Down Expand Up @@ -170,4 +167,4 @@ private static void processRow(Row row, List<ColumnInfo> columnInfoList)
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[StopQueryExecutionExample.java demonstrates how to stop a query and check its status.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-service:[athena]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


package aws.example.athena;

import com.amazonaws.services.athena.AmazonAthena;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[DeleteAlarm.java demonstrates how to delete a CloudWatch alarm.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down Expand Up @@ -57,4 +54,3 @@ public static void main(String[] args) {
System.out.printf("Successfully deleted alarm %s", alarm_name);
}
}

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[DeleteSubscriptionFilter.java demonstrates how to delete a CloudWatch subscription filter.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down Expand Up @@ -62,4 +59,3 @@ public static void main(String[] args) {
filter);
}
}

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[DescribeAlarms.java demonstrates how to list all CloudWatch alarms.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down Expand Up @@ -59,4 +56,3 @@ public static void main(String[] args) {
}
}
}

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[DescribeSubscriptionFilters.java demonstrates how to list CloudWatch subscription filters associated with a log group.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down Expand Up @@ -55,7 +52,7 @@ public static void main(String[] args) {
new DescribeSubscriptionFiltersRequest()
.withLogGroupName(log_group)
.withLimit(1);

while(!done) {

DescribeSubscriptionFiltersResult response =
Expand All @@ -79,4 +76,3 @@ public static void main(String[] args) {
}
}
}

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[DisableAlarmActions.java demonstrates how to disables actions on a CloudWatch alarm.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[EnableAlarmActions.java demonstrates how to enables actions on a CloudWatch alarm.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down Expand Up @@ -59,4 +56,3 @@ public static void main(String[] args) {
"Successfully enabled actions on alarm %s", alarm);
}
}

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[ListMetrics.java demonstrates how to list CloudWatch metrics.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down Expand Up @@ -55,7 +52,7 @@ public static void main(String[] args) {
ListMetricsRequest request = new ListMetricsRequest()
.withMetricName(name)
.withNamespace(namespace);

boolean done = false;

while(!done) {
Expand All @@ -74,4 +71,3 @@ public static void main(String[] args) {
}
}
}

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[PutEvents.java demonstrates how to put a sample CloudWatch event.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down Expand Up @@ -68,4 +65,3 @@ public static void main(String[] args)
System.out.println("Successfully put CloudWatch event");
}
}

Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[PutMetricAlarm.java demonstrates how to create a new CloudWatch alarm based on CPU utilization for an instance.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[PutMetricData.java demonstrates how to put a sample metric data point.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[PutRule.java demonstrates how to create a CloudWatch event-routing rule.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@

//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-sourcedescription:[PutSubscriptionFilter.java demonstrates how to create a CloudWatch Logs subscription filter.]
//snippet-keyword:[Java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon Cloudwatch]
//snippet-service:[cloudwatch]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]


/*
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
Expand Down Expand Up @@ -73,4 +70,3 @@ public static void main(String[] args) {
filter);
}
}

Loading

0 comments on commit f6a480e

Please sign in to comment.