diff --git a/.gitignore b/.gitignore
index f56bd3d387c..03662deba31 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,8 @@ rust_dev_preview
.vectors
# .snippets are created temporarily as build artifacts
.snippets
+# Ignore build-related files and directories in kotlin/services/
+kotlin/services/**/build/
+kotlin/services/**/gradle/
+kotlin/services/**/gradlew
+kotlin/services/**/gradlew.bat
\ No newline at end of file
diff --git a/.tools/readmes/multi.py b/.tools/readmes/multi.py
index 6d6d06c93da..c8438b11817 100755
--- a/.tools/readmes/multi.py
+++ b/.tools/readmes/multi.py
@@ -72,6 +72,7 @@ def main():
skipped = []
failed = []
+ written = []
for language_and_version in args.languages:
(language, version) = language_and_version.split(":")
@@ -79,30 +80,32 @@ def main():
logging.debug(f"Skipping {language}:{version}")
else:
for service in args.services:
+ id = f"{language}:{version}:{service}"
try:
scanner.set_example(language, service)
- logging.debug(f"Rendering {language}:{version}:{service}")
+ logging.debug("Rendering %s", id)
renderer = Renderer(scanner, int(version), args.safe)
result = renderer.render()
if result is None:
+ logging.info("Render returned empty for %s", id)
+ skipped.append(id)
continue
if args.dry_run:
if not renderer.check():
- failed.append(f"{language}:{version}:{service}")
+ failed.append(id)
else:
renderer.write()
+ written.append(id)
except FileNotFoundError:
- skip = f"{language}:{version}:{service}"
- skipped.append(skip)
+ skipped.append(id)
except Exception:
- skip = f"{language}:{version}:{service}"
- logging.exception(
- f"Exception rendering {skip}",
- )
+ logging.exception("Exception rendering %s", id)
+ failed.append(id)
+ done_list = "\n\t".join(written)
skip_list = "\n\t".join(skipped)
- logging.info(f"Run complete. Skipped: {skip_list}")
+ logging.info(f"Run complete.\nWrote: {done_list}\nSkipped: {skip_list}")
if len(failed) > 0:
failed_list = "\n\t".join(failed)
logging.warning(f"READMEs with incorrect formatting:\n\t{failed_list}")
diff --git a/.tools/readmes/render.py b/.tools/readmes/render.py
index a7474327964..e1845ea408f 100644
--- a/.tools/readmes/render.py
+++ b/.tools/readmes/render.py
@@ -113,9 +113,10 @@ def _transform_service(self):
def _transform_actions(self, pre_actions):
post_actions = []
for _, pre in pre_actions.items():
- api = ""
- if self.scanner.svc_name in pre["services"]:
+ try:
api = next(iter(pre["services"][self.scanner.svc_name]))
+ except:
+ api = ""
action = {
"title_abbrev": pre["title_abbrev"],
"synopsis": pre["synopsis"],
@@ -272,6 +273,7 @@ def render(self):
unsupported=unsupported,
)
self.readme_text = self._expand_entities(self.readme_text)
+ return self
def write(self):
if self.safe and Path(self.readme_filename).exists():
@@ -286,4 +288,4 @@ def write(self):
def check(self):
with open(self.readme_filename, "r", encoding="utf-8") as f:
readme_current = f.read()
- readme_current != self.readme_text
+ return readme_current == self.readme_text
diff --git a/aws-cli/bash-linux/dynamodb/README.md b/aws-cli/bash-linux/dynamodb/README.md
index d809ec5664d..77be2702a40 100644
--- a/aws-cli/bash-linux/dynamodb/README.md
+++ b/aws-cli/bash-linux/dynamodb/README.md
@@ -33,18 +33,18 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `aws-c
Code excerpts that show you how to call individual service functions.
-- [Create a table](dynamodb_operations.sh#L23) (`CreateTable`)
-- [Delete a table](dynamodb_operations.sh#L1004) (`DeleteTable`)
-- [Delete an item from a table](dynamodb_operations.sh#L541) (`DeleteItem`)
-- [Get a batch of items](dynamodb_operations.sh#L908) (`BatchGetItem`)
-- [Get an item from a table](dynamodb_operations.sh#L445) (`GetItem`)
-- [Get information about a table](dynamodb_operations.sh#L189) (`DescribeTable`)
-- [List tables](dynamodb_operations.sh#L975) (`ListTables`)
-- [Put an item in a table](dynamodb_operations.sh#L263) (`PutItem`)
-- [Query a table](dynamodb_operations.sh#L620) (`Query`)
-- [Scan a table](dynamodb_operations.sh#L730) (`Scan`)
-- [Update an item in a table](dynamodb_operations.sh#L344) (`UpdateItem`)
-- [Write a batch of items](dynamodb_operations.sh#L840) (`BatchWriteItem`)
+- [Create a table](dynamodb_operations.sh#L25) (`CreateTable`)
+- [Delete a table](dynamodb_operations.sh#L1006) (`DeleteTable`)
+- [Delete an item from a table](dynamodb_operations.sh#L543) (`DeleteItem`)
+- [Get a batch of items](dynamodb_operations.sh#L910) (`BatchGetItem`)
+- [Get an item from a table](dynamodb_operations.sh#L447) (`GetItem`)
+- [Get information about a table](dynamodb_operations.sh#L191) (`DescribeTable`)
+- [List tables](dynamodb_operations.sh#L977) (`ListTables`)
+- [Put an item in a table](dynamodb_operations.sh#L265) (`PutItem`)
+- [Query a table](dynamodb_operations.sh#L622) (`Query`)
+- [Scan a table](dynamodb_operations.sh#L732) (`Scan`)
+- [Update an item in a table](dynamodb_operations.sh#L346) (`UpdateItem`)
+- [Write a batch of items](dynamodb_operations.sh#L842) (`BatchWriteItem`)
### Scenarios
diff --git a/aws-cli/bash-linux/iam/README.md b/aws-cli/bash-linux/iam/README.md
index dfcfa5dfbc8..9f798d49bed 100644
--- a/aws-cli/bash-linux/iam/README.md
+++ b/aws-cli/bash-linux/iam/README.md
@@ -33,19 +33,19 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `aws-c
Code excerpts that show you how to call individual service functions.
-- [Attach a policy to a role](iam_operations.sh#L501) (`AttachRolePolicy`)
-- [Create a policy](iam_operations.sh#L426) (`CreatePolicy`)
-- [Create a role](iam_operations.sh#L347) (`CreateRole`)
-- [Create a user](iam_operations.sh#L118) (`CreateUser`)
-- [Create an access key](iam_operations.sh#L197) (`CreateAccessKey`)
-- [Delete a policy](iam_operations.sh#L651) (`DeletePolicy`)
-- [Delete a role](iam_operations.sh#L721) (`DeleteRole`)
-- [Delete a user](iam_operations.sh#L873) (`DeleteUser`)
-- [Delete an access key](iam_operations.sh#L792) (`DeleteAccessKey`)
-- [Detach a policy from a role](iam_operations.sh#L576) (`DetachRolePolicy`)
-- [Get a user](iam_operations.sh#L22) (`GetUser`)
-- [List a user's access keys](iam_operations.sh#L278) (`ListAccessKeys`)
-- [List users](iam_operations.sh#L61) (`ListUsers`)
+- [Attach a policy to a role](iam_operations.sh#L503) (`AttachRolePolicy`)
+- [Create a policy](iam_operations.sh#L428) (`CreatePolicy`)
+- [Create a role](iam_operations.sh#L349) (`CreateRole`)
+- [Create a user](iam_operations.sh#L120) (`CreateUser`)
+- [Create an access key](iam_operations.sh#L199) (`CreateAccessKey`)
+- [Delete a policy](iam_operations.sh#L653) (`DeletePolicy`)
+- [Delete a role](iam_operations.sh#L723) (`DeleteRole`)
+- [Delete a user](iam_operations.sh#L875) (`DeleteUser`)
+- [Delete an access key](iam_operations.sh#L794) (`DeleteAccessKey`)
+- [Detach a policy from a role](iam_operations.sh#L578) (`DetachRolePolicy`)
+- [Get a user](iam_operations.sh#L24) (`GetUser`)
+- [List a user's access keys](iam_operations.sh#L280) (`ListAccessKeys`)
+- [List users](iam_operations.sh#L63) (`ListUsers`)
### Scenarios
diff --git a/aws-cli/bash-linux/medical-imaging/README.md b/aws-cli/bash-linux/medical-imaging/README.md
index 64c53d5722f..f57da7fa2d7 100644
--- a/aws-cli/bash-linux/medical-imaging/README.md
+++ b/aws-cli/bash-linux/medical-imaging/README.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `aws-c
Code excerpts that show you how to call individual service functions.
-- [Create a data store](medical_imaging_operations.sh#L22) (`CreateDatastore`)
-- [Delete a data store](medical_imaging_operations.sh#L218) (`DeleteDatastore`)
-- [Get data store properties](medical_imaging_operations.sh#L147) (`GetDatastore`)
-- [List data stores](medical_imaging_operations.sh#L91) (`ListDatastores`)
+- [Create a data store](medical_imaging_operations.sh#L24) (`CreateDatastore`)
+- [Delete a data store](medical_imaging_operations.sh#L220) (`DeleteDatastore`)
+- [Get data store properties](medical_imaging_operations.sh#L149) (`GetDatastore`)
+- [List data stores](medical_imaging_operations.sh#L93) (`ListDatastores`)
diff --git a/aws-cli/bash-linux/s3/README.md b/aws-cli/bash-linux/s3/README.md
index 1a27df4af0a..36ec5fd101e 100644
--- a/aws-cli/bash-linux/s3/README.md
+++ b/aws-cli/bash-linux/s3/README.md
@@ -33,15 +33,15 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `aws-c
Code excerpts that show you how to call individual service functions.
-- [Copy an object from one bucket to another](bucket-lifecycle-operations/bucket_operations.sh#L207) (`CopyObject`)
-- [Create a bucket](bucket-lifecycle-operations/bucket_operations.sh#L55) (`CreateBucket`)
-- [Delete an empty bucket](bucket-lifecycle-operations/bucket_operations.sh#L348) (`DeleteBucket`)
-- [Delete an object](bucket-lifecycle-operations/bucket_operations.sh#L277) (`DeleteObject`)
-- [Delete multiple objects](bucket-lifecycle-operations/bucket_operations.sh#L308) (`DeleteObjects`)
-- [Determine the existence of a bucket](bucket-lifecycle-operations/bucket_operations.sh#L25) (`HeadBucket`)
-- [Get an object from a bucket](bucket-lifecycle-operations/bucket_operations.sh#L173) (`GetObject`)
-- [List objects in a bucket](bucket-lifecycle-operations/awsdocs_general.sh#L98) (`ListObjectsV2`)
-- [Upload an object to a bucket](bucket-lifecycle-operations/bucket_operations.sh#L139) (`PutObject`)
+- [Copy an object from one bucket to another](bucket-lifecycle-operations/bucket_operations.sh#L202) (`CopyObject`)
+- [Create a bucket](bucket-lifecycle-operations/bucket_operations.sh#L50) (`CreateBucket`)
+- [Delete an empty bucket](bucket-lifecycle-operations/bucket_operations.sh#L343) (`DeleteBucket`)
+- [Delete an object](bucket-lifecycle-operations/bucket_operations.sh#L272) (`DeleteObject`)
+- [Delete multiple objects](bucket-lifecycle-operations/bucket_operations.sh#L303) (`DeleteObjects`)
+- [Determine the existence of a bucket](bucket-lifecycle-operations/bucket_operations.sh#L20) (`HeadBucket`)
+- [Get an object from a bucket](bucket-lifecycle-operations/bucket_operations.sh#L168) (`GetObject`)
+- [List objects in a bucket](bucket-lifecycle-operations/awsdocs_general.sh#L94) (`ListObjectsV2`)
+- [Upload an object to a bucket](bucket-lifecycle-operations/bucket_operations.sh#L134) (`PutObject`)
### Scenarios
diff --git a/cpp/example_code/acm/README.md b/cpp/example_code/acm/README.md
index 18c676cfc67..c7845345cd5 100644
--- a/cpp/example_code/acm/README.md
+++ b/cpp/example_code/acm/README.md
@@ -44,7 +44,7 @@ Next, for information on code example structures and how to build and run the ex
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -54,6 +54,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/aurora/README.md b/cpp/example_code/aurora/README.md
index 98de88cd1d9..07d55b24707 100644
--- a/cpp/example_code/aurora/README.md
+++ b/cpp/example_code/aurora/README.md
@@ -46,21 +46,21 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Create a DB cluster](getting_started_with_db_clusters.cpp#L499) (`CreateDBCluster`)
-- [Create a DB cluster parameter group](getting_started_with_db_clusters.cpp#L335) (`CreateDBClusterParameterGroup`)
-- [Create a DB cluster snapshot](getting_started_with_db_clusters.cpp#L663) (`CreateDBClusterSnapshot`)
-- [Create a DB instance in a DB cluster](getting_started_with_db_clusters.cpp#L590) (`CreateDBInstance`)
-- [Delete a DB cluster](getting_started_with_db_clusters.cpp#L1033) (`DeleteDBCluster`)
-- [Delete a DB cluster parameter group](getting_started_with_db_clusters.cpp#L1103) (`DeleteDBClusterParameterGroup`)
-- [Delete a DB instance](getting_started_with_db_clusters.cpp#L1003) (`DeleteDBInstance`)
-- [Describe DB cluster parameter groups](getting_started_with_db_clusters.cpp#L297) (`DescribeDBClusterParameterGroups`)
-- [Describe DB cluster snapshots](getting_started_with_db_clusters.cpp#L703) (`DescribeDBClusterSnapshots`)
-- [Describe DB clusters](getting_started_with_db_clusters.cpp#L748) (`DescribeDBClusters`)
-- [Describe DB instances](getting_started_with_db_clusters.cpp#L885) (`DescribeDBInstances`)
-- [Describe database engine versions](getting_started_with_db_clusters.cpp#L847) (`DescribeDBEngineVersions`)
-- [Describe options for DB instances](getting_started_with_db_clusters.cpp#L925) (`DescribeOrderableDBInstanceOptions`)
-- [Describe parameters from a DB cluster parameter group](getting_started_with_db_clusters.cpp#L788) (`DescribeDBClusterParameters`)
-- [Update parameters in a DB cluster parameter group](getting_started_with_db_clusters.cpp#L404) (`ModifyDBClusterParameterGroup`)
+- [Create a DB cluster](getting_started_with_db_clusters.cpp#L497) (`CreateDBCluster`)
+- [Create a DB cluster parameter group](getting_started_with_db_clusters.cpp#L333) (`CreateDBClusterParameterGroup`)
+- [Create a DB cluster snapshot](getting_started_with_db_clusters.cpp#L661) (`CreateDBClusterSnapshot`)
+- [Create a DB instance in a DB cluster](getting_started_with_db_clusters.cpp#L588) (`CreateDBInstance`)
+- [Delete a DB cluster](getting_started_with_db_clusters.cpp#L1031) (`DeleteDBCluster`)
+- [Delete a DB cluster parameter group](getting_started_with_db_clusters.cpp#L1101) (`DeleteDBClusterParameterGroup`)
+- [Delete a DB instance](getting_started_with_db_clusters.cpp#L1001) (`DeleteDBInstance`)
+- [Describe DB cluster parameter groups](getting_started_with_db_clusters.cpp#L295) (`DescribeDBClusterParameterGroups`)
+- [Describe DB cluster snapshots](getting_started_with_db_clusters.cpp#L701) (`DescribeDBClusterSnapshots`)
+- [Describe DB clusters](getting_started_with_db_clusters.cpp#L746) (`DescribeDBClusters`)
+- [Describe DB instances](getting_started_with_db_clusters.cpp#L883) (`DescribeDBInstances`)
+- [Describe database engine versions](getting_started_with_db_clusters.cpp#L845) (`DescribeDBEngineVersions`)
+- [Describe options for DB instances](getting_started_with_db_clusters.cpp#L923) (`DescribeOrderableDBInstanceOptions`)
+- [Describe parameters from a DB cluster parameter group](getting_started_with_db_clusters.cpp#L786) (`DescribeDBClusterParameters`)
+- [Update parameters in a DB cluster parameter group](getting_started_with_db_clusters.cpp#L402) (`ModifyDBClusterParameterGroup`)
### Scenarios
@@ -83,7 +83,7 @@ Sample applications that work across multiple AWS services.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -93,6 +93,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/cloudwatch-logs/README.md b/cpp/example_code/cloudwatch-logs/README.md
index cd9a10863eb..63ea6d586fb 100644
--- a/cpp/example_code/cloudwatch-logs/README.md
+++ b/cpp/example_code/cloudwatch-logs/README.md
@@ -58,7 +58,7 @@ Code excerpts that show you how to call individual service functions.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -68,6 +68,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/cloudwatch/README.md b/cpp/example_code/cloudwatch/README.md
index a00ef27236b..d0bdc7049c9 100644
--- a/cpp/example_code/cloudwatch/README.md
+++ b/cpp/example_code/cloudwatch/README.md
@@ -62,7 +62,7 @@ Code excerpts that show you how to call individual service functions.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -72,6 +72,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/codebuild/README.md b/cpp/example_code/codebuild/README.md
index 6412e5d1e32..51bd1e263df 100644
--- a/cpp/example_code/codebuild/README.md
+++ b/cpp/example_code/codebuild/README.md
@@ -44,7 +44,7 @@ Next, for information on code example structures and how to build and run the ex
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -54,6 +54,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/dynamodb/Readme.md b/cpp/example_code/dynamodb/Readme.md
index 900900b0b7a..26b170cc724 100644
--- a/cpp/example_code/dynamodb/Readme.md
+++ b/cpp/example_code/dynamodb/Readme.md
@@ -46,20 +46,20 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Create a table](create_table.cpp#L29) (`CreateTable`)
-- [Delete a table](delete_table.cpp#L25) (`DeleteTable`)
-- [Delete an item from a table](delete_item.cpp#L24) (`DeleteItem`)
-- [Get a batch of items](batch_get_item.cpp#L32) (`BatchGetItem`)
-- [Get an item from a table](get_item.cpp#L26) (`GetItem`)
-- [Get information about a table](describe_table.cpp#L25) (`DescribeTable`)
-- [List tables](list_tables.cpp#L27) (`ListTables`)
-- [Put an item in a table](put_item.cpp#L27) (`PutItem`)
-- [Query a table](query_items.cpp#L24) (`Query`)
-- [Run a PartiQL statement](dynamodb_partiql_single_scenario.cpp#L49) (`ExecuteStatement`)
-- [Run batches of PartiQL statements](dynamodb_partiql_batch_scenario.cpp#L50) (`BatchExecuteStatement`)
-- [Scan a table](scan_table.cpp#L24) (`Scan`)
-- [Update an item in a table](update_item.cpp#L26) (`UpdateItem`)
-- [Write a batch of items](batch_write_item.cpp#L51) (`BatchWriteItem`)
+- [Create a table](create_table.cpp#L27) (`CreateTable`)
+- [Delete a table](delete_table.cpp#L23) (`DeleteTable`)
+- [Delete an item from a table](delete_item.cpp#L22) (`DeleteItem`)
+- [Get a batch of items](batch_get_item.cpp#L30) (`BatchGetItem`)
+- [Get an item from a table](get_item.cpp#L24) (`GetItem`)
+- [Get information about a table](describe_table.cpp#L23) (`DescribeTable`)
+- [List tables](list_tables.cpp#L26) (`ListTables`)
+- [Put an item in a table](put_item.cpp#L25) (`PutItem`)
+- [Query a table](query_items.cpp#L22) (`Query`)
+- [Run a PartiQL statement](dynamodb_partiql_single_scenario.cpp#L47) (`ExecuteStatement`)
+- [Run batches of PartiQL statements](dynamodb_partiql_batch_scenario.cpp#L48) (`BatchExecuteStatement`)
+- [Scan a table](scan_table.cpp#L23) (`Scan`)
+- [Update an item in a table](update_item.cpp#L24) (`UpdateItem`)
+- [Write a batch of items](batch_write_item.cpp#L49) (`BatchWriteItem`)
### Scenarios
@@ -84,7 +84,7 @@ Sample applications that work across multiple AWS services.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -94,6 +94,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/ebs/README.md b/cpp/example_code/ebs/README.md
index 9359a778344..b827a4fc588 100644
--- a/cpp/example_code/ebs/README.md
+++ b/cpp/example_code/ebs/README.md
@@ -44,7 +44,7 @@ Next, for information on code example structures and how to build and run the ex
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -54,6 +54,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/ec2/README.md b/cpp/example_code/ec2/README.md
index df481fca65a..10d9f791db9 100644
--- a/cpp/example_code/ec2/README.md
+++ b/cpp/example_code/ec2/README.md
@@ -46,28 +46,28 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Add tags to resources](create_instance.cpp#L74) (`CreateTags`)
-- [Allocate an Elastic IP address](allocate_address.cpp#L45) (`AllocateAddress`)
-- [Associate an Elastic IP address with an instance](allocate_address.cpp#L60) (`AssociateAddress`)
-- [Create a security group](create_security_group.cpp#L61) (`CreateSecurityGroup`)
-- [Create a security key pair](create_key_pair.cpp#L35) (`CreateKeyPair`)
-- [Create and run an instance](create_instance.cpp#L46) (`RunInstances`)
-- [Delete a security group](delete_security_group.cpp#L34) (`DeleteSecurityGroup`)
-- [Delete a security key pair](delete_key_pair.cpp#L35) (`DeleteKeyPair`)
-- [Describe Availability Zones](describe_regions_and_zones.cpp#L40) (`DescribeAvailabilityZones`)
-- [Describe Regions](describe_regions_and_zones.cpp#L43) (`DescribeRegions`)
-- [Describe instances](describe_instances.cpp#L35) (`DescribeInstances`)
-- [Disable detailed monitoring](monitor_instance.cpp#L84) (`UnmonitorInstances`)
-- [Enable monitoring](monitor_instance.cpp#L37) (`MonitorInstances`)
-- [Get data about a security group](describe_security_groups.cpp#L36) (`DescribeSecurityGroups`)
-- [Get details about Elastic IP addresses](describe_addresses.cpp#L35) (`DescribeAddresses`)
-- [List security key pairs](describe_key_pairs.cpp#L35) (`DescribeKeyPairs`)
-- [Reboot an instance](reboot_instance.cpp#L34) (`RebootInstances`)
-- [Release an Elastic IP address](release_address.cpp#L33) (`ReleaseAddress`)
-- [Set inbound rules for a security group](allocate_address.cpp#L41) (`AuthorizeSecurityGroupIngress`)
-- [Start an instance](start_stop_instance.cpp#L39) (`StartInstances`)
-- [Stop an instance](start_stop_instance.cpp#L85) (`StopInstances`)
-- [Terminate an instance](terminate_instances.cpp#L32) (`TerminateInstances`)
+- [Add tags to resources](create_instance.cpp#L72) (`CreateTags`)
+- [Allocate an Elastic IP address](allocate_address.cpp#L43) (`AllocateAddress`)
+- [Associate an Elastic IP address with an instance](allocate_address.cpp#L58) (`AssociateAddress`)
+- [Create a security group](create_security_group.cpp#L59) (`CreateSecurityGroup`)
+- [Create a security key pair](create_key_pair.cpp#L33) (`CreateKeyPair`)
+- [Create and run an instance](create_instance.cpp#L44) (`RunInstances`)
+- [Delete a security group](delete_security_group.cpp#L32) (`DeleteSecurityGroup`)
+- [Delete a security key pair](delete_key_pair.cpp#L34) (`DeleteKeyPair`)
+- [Describe Availability Zones](describe_regions_and_zones.cpp#L38) (`DescribeAvailabilityZones`)
+- [Describe Regions](describe_regions_and_zones.cpp#L41) (`DescribeRegions`)
+- [Describe instances](describe_instances.cpp#L33) (`DescribeInstances`)
+- [Disable detailed monitoring](monitor_instance.cpp#L82) (`UnmonitorInstances`)
+- [Enable monitoring](monitor_instance.cpp#L35) (`MonitorInstances`)
+- [Get data about a security group](describe_security_groups.cpp#L34) (`DescribeSecurityGroups`)
+- [Get details about Elastic IP addresses](describe_addresses.cpp#L33) (`DescribeAddresses`)
+- [List security key pairs](describe_key_pairs.cpp#L33) (`DescribeKeyPairs`)
+- [Reboot an instance](reboot_instance.cpp#L32) (`RebootInstances`)
+- [Release an Elastic IP address](release_address.cpp#L31) (`ReleaseAddress`)
+- [Set inbound rules for a security group](allocate_address.cpp#L39) (`AuthorizeSecurityGroupIngress`)
+- [Start an instance](start_stop_instance.cpp#L38) (`StartInstances`)
+- [Stop an instance](start_stop_instance.cpp#L84) (`StopInstances`)
+- [Terminate an instance](terminate_instances.cpp#L30) (`TerminateInstances`)
@@ -77,7 +77,7 @@ Code excerpts that show you how to call individual service functions.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -87,6 +87,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/eventbridge/README.md b/cpp/example_code/eventbridge/README.md
index 13e5473e3bc..e6ecd2282ab 100644
--- a/cpp/example_code/eventbridge/README.md
+++ b/cpp/example_code/eventbridge/README.md
@@ -41,7 +41,7 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Add a target](put_targets.cpp#L17) (`PutTargets`)
+- [Add a target](put_targets.cpp#L15) (`PutTargets`)
- [Create a rule](put_rule.cpp#L14) (`PutRule`)
- [Send events](put_events.cpp#L15) (`PutEvents`)
@@ -53,7 +53,7 @@ Code excerpts that show you how to call individual service functions.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -63,6 +63,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/glacier/README.md b/cpp/example_code/glacier/README.md
index 509da18d3bc..224f56b15ab 100644
--- a/cpp/example_code/glacier/README.md
+++ b/cpp/example_code/glacier/README.md
@@ -44,7 +44,7 @@ Next, for information on code example structures and how to build and run the ex
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -54,6 +54,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/glue/README.md b/cpp/example_code/glue/README.md
index b0d3b9137b6..522a17b174c 100644
--- a/cpp/example_code/glue/README.md
+++ b/cpp/example_code/glue/README.md
@@ -46,19 +46,19 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Create a crawler](glue_getting_started_scenario.cpp#L871) (`CreateCrawler`)
-- [Create a job definition](glue_getting_started_scenario.cpp#L871) (`CreateJob`)
-- [Delete a crawler](glue_getting_started_scenario.cpp#L871) (`DeleteCrawler`)
-- [Delete a database from the Data Catalog](glue_getting_started_scenario.cpp#L871) (`DeleteDatabase`)
-- [Delete a job definition](glue_getting_started_scenario.cpp#L871) (`DeleteJob`)
-- [Get a crawler](glue_getting_started_scenario.cpp#L871) (`GetCrawler`)
-- [Get a database from the Data Catalog](glue_getting_started_scenario.cpp#L871) (`GetDatabase`)
-- [Get a job run](glue_getting_started_scenario.cpp#L871) (`GetJobRun`)
-- [Get runs of a job](glue_getting_started_scenario.cpp#L871) (`GetJobRuns`)
-- [Get tables from a database](glue_getting_started_scenario.cpp#L871) (`GetTables`)
-- [List job definitions](glue_getting_started_scenario.cpp#L871) (`ListJobs`)
-- [Start a crawler](glue_getting_started_scenario.cpp#L871) (`StartCrawler`)
-- [Start a job run](glue_getting_started_scenario.cpp#L871) (`StartJobRun`)
+- [Create a crawler](glue_getting_started_scenario.cpp#L869) (`CreateCrawler`)
+- [Create a job definition](glue_getting_started_scenario.cpp#L869) (`CreateJob`)
+- [Delete a crawler](glue_getting_started_scenario.cpp#L869) (`DeleteCrawler`)
+- [Delete a database from the Data Catalog](glue_getting_started_scenario.cpp#L869) (`DeleteDatabase`)
+- [Delete a job definition](glue_getting_started_scenario.cpp#L869) (`DeleteJob`)
+- [Get a crawler](glue_getting_started_scenario.cpp#L869) (`GetCrawler`)
+- [Get a database from the Data Catalog](glue_getting_started_scenario.cpp#L869) (`GetDatabase`)
+- [Get a job run](glue_getting_started_scenario.cpp#L869) (`GetJobRun`)
+- [Get runs of a job](glue_getting_started_scenario.cpp#L869) (`GetJobRuns`)
+- [Get tables from a database](glue_getting_started_scenario.cpp#L869) (`GetTables`)
+- [List job definitions](glue_getting_started_scenario.cpp#L869) (`ListJobs`)
+- [Start a crawler](glue_getting_started_scenario.cpp#L869) (`StartCrawler`)
+- [Start a job run](glue_getting_started_scenario.cpp#L869) (`StartJobRun`)
### Scenarios
@@ -75,7 +75,7 @@ functions within the same service.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -85,6 +85,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/iam/README.md b/cpp/example_code/iam/README.md
index 9c53eff3bab..738ce682131 100644
--- a/cpp/example_code/iam/README.md
+++ b/cpp/example_code/iam/README.md
@@ -46,30 +46,30 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Attach a policy to a role](attach_role_policy.cpp#L40) (`AttachRolePolicy`)
-- [Attach an inline policy to a role](put_role_policy.cpp#L37) (`PutRolePolicy`)
-- [Create a policy](create_policy.cpp#L45) (`CreatePolicy`)
-- [Create a role](create_role.cpp#L37) (`CreateRole`)
-- [Create a user](create_user.cpp#L42) (`CreateUser`)
-- [Create an access key](create_access_key.cpp#L37) (`CreateAccessKey`)
-- [Create an alias for an account](create_account_alias.cpp#L37) (`CreateAccountAlias`)
-- [Delete a policy](delete_policy.cpp#L40) (`DeletePolicy`)
-- [Delete a server certificate](delete_server_certificate.cpp#L36) (`DeleteServerCertificate`)
-- [Delete a user](delete_user.cpp#L44) (`DeleteUser`)
-- [Delete an access key](delete_access_key.cpp#L37) (`DeleteAccessKey`)
-- [Delete an account alias](delete_account_alias.cpp#L37) (`DeleteAccountAlias`)
-- [Detach a policy from a role](detach_role_policy.cpp#L43) (`DetachRolePolicy`)
-- [Get a policy](get_policy.cpp#L38) (`GetPolicy`)
-- [Get a server certificate](get_server_certificate.cpp#L38) (`GetServerCertificate`)
-- [Get data about the last use of an access key](access_key_last_used.cpp#L38) (`GetAccessKeyLastUsed`)
-- [List a user's access keys](list_access_keys.cpp#L39) (`ListAccessKeys`)
-- [List account aliases](list_account_aliases.cpp#L38) (`ListAccountAliases`)
-- [List policies](list_policies.cpp#L37) (`ListPolicies`)
-- [List server certificates](list_server_certificates.cpp#L37) (`ListServerCertificates`)
-- [List users](list_users.cpp#L36) (`ListUsers`)
-- [Update a server certificate](update_server_certificate.cpp#L37) (`UpdateServerCertificate`)
-- [Update a user](update_user.cpp#L39) (`UpdateUser`)
-- [Update an access key](update_access_key.cpp#L42) (`UpdateAccessKey`)
+- [Attach a policy to a role](attach_role_policy.cpp#L38) (`AttachRolePolicy`)
+- [Attach an inline policy to a role](put_role_policy.cpp#L35) (`PutRolePolicy`)
+- [Create a policy](create_policy.cpp#L43) (`CreatePolicy`)
+- [Create a role](create_role.cpp#L35) (`CreateRole`)
+- [Create a user](create_user.cpp#L40) (`CreateUser`)
+- [Create an access key](create_access_key.cpp#L35) (`CreateAccessKey`)
+- [Create an alias for an account](create_account_alias.cpp#L35) (`CreateAccountAlias`)
+- [Delete a policy](delete_policy.cpp#L38) (`DeletePolicy`)
+- [Delete a server certificate](delete_server_certificate.cpp#L34) (`DeleteServerCertificate`)
+- [Delete a user](delete_user.cpp#L42) (`DeleteUser`)
+- [Delete an access key](delete_access_key.cpp#L35) (`DeleteAccessKey`)
+- [Delete an account alias](delete_account_alias.cpp#L35) (`DeleteAccountAlias`)
+- [Detach a policy from a role](detach_role_policy.cpp#L41) (`DetachRolePolicy`)
+- [Get a policy](get_policy.cpp#L36) (`GetPolicy`)
+- [Get a server certificate](get_server_certificate.cpp#L36) (`GetServerCertificate`)
+- [Get data about the last use of an access key](access_key_last_used.cpp#L36) (`GetAccessKeyLastUsed`)
+- [List a user's access keys](list_access_keys.cpp#L37) (`ListAccessKeys`)
+- [List account aliases](list_account_aliases.cpp#L36) (`ListAccountAliases`)
+- [List policies](list_policies.cpp#L35) (`ListPolicies`)
+- [List server certificates](list_server_certificates.cpp#L35) (`ListServerCertificates`)
+- [List users](list_users.cpp#L34) (`ListUsers`)
+- [Update a server certificate](update_server_certificate.cpp#L35) (`UpdateServerCertificate`)
+- [Update a user](update_user.cpp#L37) (`UpdateUser`)
+- [Update an access key](update_access_key.cpp#L40) (`UpdateAccessKey`)
### Scenarios
@@ -86,7 +86,7 @@ functions within the same service.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -96,6 +96,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/kinesis/README.md b/cpp/example_code/kinesis/README.md
index 5c0ec7b680b..d395442b821 100644
--- a/cpp/example_code/kinesis/README.md
+++ b/cpp/example_code/kinesis/README.md
@@ -44,7 +44,7 @@ Next, for information on code example structures and how to build and run the ex
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -54,6 +54,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/lambda/README.md b/cpp/example_code/lambda/README.md
index fda14efc7c9..425fe49c06a 100644
--- a/cpp/example_code/lambda/README.md
+++ b/cpp/example_code/lambda/README.md
@@ -46,13 +46,13 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Create a function](get_started_with_functions_scenario.cpp#L607) (`CreateFunction`)
-- [Delete a function](get_started_with_functions_scenario.cpp#L607) (`DeleteFunction`)
-- [Get a function](get_started_with_functions_scenario.cpp#L607) (`GetFunction`)
-- [Invoke a function](get_started_with_functions_scenario.cpp#L607) (`Invoke`)
-- [List functions](get_started_with_functions_scenario.cpp#L607) (`ListFunctions`)
-- [Update function code](get_started_with_functions_scenario.cpp#L607) (`UpdateFunctionCode`)
-- [Update function configuration](get_started_with_functions_scenario.cpp#L607) (`UpdateFunctionConfiguration`)
+- [Create a function](get_started_with_functions_scenario.cpp#L605) (`CreateFunction`)
+- [Delete a function](get_started_with_functions_scenario.cpp#L605) (`DeleteFunction`)
+- [Get a function](get_started_with_functions_scenario.cpp#L605) (`GetFunction`)
+- [Invoke a function](get_started_with_functions_scenario.cpp#L605) (`Invoke`)
+- [List functions](get_started_with_functions_scenario.cpp#L605) (`ListFunctions`)
+- [Update function code](get_started_with_functions_scenario.cpp#L605) (`UpdateFunctionCode`)
+- [Update function configuration](get_started_with_functions_scenario.cpp#L605) (`UpdateFunctionConfiguration`)
### Scenarios
@@ -75,7 +75,7 @@ Sample applications that work across multiple AWS services.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -85,6 +85,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/medical-imaging/README.md b/cpp/example_code/medical-imaging/README.md
index 3cbfc027260..3f5d3208ecc 100644
--- a/cpp/example_code/medical-imaging/README.md
+++ b/cpp/example_code/medical-imaging/README.md
@@ -46,12 +46,12 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Delete an image set](delete_image_set.cpp#L24) (`DeleteImageSet`)
-- [Get an image frame](get_image_frame.cpp#L26) (`GetImageFrame`)
-- [Get import job properties](get_dicom_import_job.cpp#L24) (`GetDICOMImportJob`)
-- [Get metadata for an image set](get_image_set_metadata.cpp#L24) (`GetImageSetMetadata`)
-- [Import bulk data into a data store](start_dicom_import_job.cpp#L24) (`StartDICOMImportJob`)
-- [Search image sets](search_image_sets.cpp#L25) (`SearchImageSets`)
+- [Delete an image set](delete_image_set.cpp#L23) (`DeleteImageSet`)
+- [Get an image frame](get_image_frame.cpp#L24) (`GetImageFrame`)
+- [Get import job properties](get_dicom_import_job.cpp#L23) (`GetDICOMImportJob`)
+- [Get metadata for an image set](get_image_set_metadata.cpp#L23) (`GetImageSetMetadata`)
+- [Import bulk data into a data store](start_dicom_import_job.cpp#L23) (`StartDICOMImportJob`)
+- [Search image sets](search_image_sets.cpp#L24) (`SearchImageSets`)
### Scenarios
@@ -92,7 +92,7 @@ This example shows you how to get started using HealthImaging.
#### Get started with image sets and image frames
-This example shows you how to get started with HealthImaging image sets and image frames.
+This example shows you how to import DICOM files and download image frames in HealthImaging.The implementation is structured as a workflow command-line application.
- Set up resources for a DICOM import.
- Import DICOM files into a data store.
diff --git a/cpp/example_code/rds/README.md b/cpp/example_code/rds/README.md
index 1e8bf70b71d..d06ada28cb2 100644
--- a/cpp/example_code/rds/README.md
+++ b/cpp/example_code/rds/README.md
@@ -46,18 +46,18 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Create a DB instance](getting_started_with_db_instances.cpp#L483) (`CreateDBInstance`)
-- [Create a DB parameter group](getting_started_with_db_instances.cpp#L315) (`CreateDBParameterGroup`)
-- [Create a snapshot of a DB instance](getting_started_with_db_instances.cpp#L561) (`CreateDBSnapshot`)
-- [Delete a DB instance](getting_started_with_db_instances.cpp#L859) (`DeleteDBInstance`)
-- [Delete a DB parameter group](getting_started_with_db_instances.cpp#L913) (`DeleteDBParameterGroup`)
-- [Describe DB instances](getting_started_with_db_instances.cpp#L738) (`DescribeDBInstances`)
-- [Describe DB parameter groups](getting_started_with_db_instances.cpp#L277) (`DescribeDBParameterGroups`)
-- [Describe database engine versions](getting_started_with_db_instances.cpp#L700) (`DescribeDBEngineVersions`)
-- [Describe options for DB instances](getting_started_with_db_instances.cpp#L778) (`DescribeOrderableDBInstanceOptions`)
-- [Describe parameters in a DB parameter group](getting_started_with_db_instances.cpp#L641) (`DescribeDBParameters`)
-- [Describe snapshots of DB instances](getting_started_with_db_instances.cpp#L599) (`DescribeDBSnapshots`)
-- [Update parameters in a DB parameter group](getting_started_with_db_instances.cpp#L384) (`ModifyDBParameterGroup`)
+- [Create a DB instance](getting_started_with_db_instances.cpp#L481) (`CreateDBInstance`)
+- [Create a DB parameter group](getting_started_with_db_instances.cpp#L313) (`CreateDBParameterGroup`)
+- [Create a snapshot of a DB instance](getting_started_with_db_instances.cpp#L559) (`CreateDBSnapshot`)
+- [Delete a DB instance](getting_started_with_db_instances.cpp#L857) (`DeleteDBInstance`)
+- [Delete a DB parameter group](getting_started_with_db_instances.cpp#L911) (`DeleteDBParameterGroup`)
+- [Describe DB instances](getting_started_with_db_instances.cpp#L736) (`DescribeDBInstances`)
+- [Describe DB parameter groups](getting_started_with_db_instances.cpp#L275) (`DescribeDBParameterGroups`)
+- [Describe database engine versions](getting_started_with_db_instances.cpp#L698) (`DescribeDBEngineVersions`)
+- [Describe options for DB instances](getting_started_with_db_instances.cpp#L776) (`DescribeOrderableDBInstanceOptions`)
+- [Describe parameters in a DB parameter group](getting_started_with_db_instances.cpp#L639) (`DescribeDBParameters`)
+- [Describe snapshots of DB instances](getting_started_with_db_instances.cpp#L597) (`DescribeDBSnapshots`)
+- [Update parameters in a DB parameter group](getting_started_with_db_instances.cpp#L382) (`ModifyDBParameterGroup`)
### Scenarios
@@ -80,7 +80,7 @@ Sample applications that work across multiple AWS services.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -90,6 +90,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/redshift/README.md b/cpp/example_code/redshift/README.md
index 0bcc0f25d56..6a170e16fdd 100644
--- a/cpp/example_code/redshift/README.md
+++ b/cpp/example_code/redshift/README.md
@@ -44,7 +44,7 @@ Next, for information on code example structures and how to build and run the ex
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -54,6 +54,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/s3/README.md b/cpp/example_code/s3/README.md
index 36d4fa870ab..7a1b4467ec4 100644
--- a/cpp/example_code/s3/README.md
+++ b/cpp/example_code/s3/README.md
@@ -47,24 +47,24 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
- [Add a policy to a bucket](put_bucket_policy.cpp#L38) (`PutBucketPolicy`)
-- [Copy an object from one bucket to another](copy_object.cpp#L34) (`CopyObject`)
-- [Create a bucket](create_bucket.cpp#L35) (`CreateBucket`)
-- [Delete a policy from a bucket](delete_bucket_policy.cpp#L32) (`DeleteBucketPolicy`)
-- [Delete an empty bucket](delete_bucket.cpp#L32) (`DeleteBucket`)
-- [Delete an object](delete_object.cpp#L33) (`DeleteObject`)
-- [Delete multiple objects](delete_objects.cpp#L35) (`DeleteObjects`)
-- [Delete the website configuration from a bucket](delete_website_config.cpp#L32) (`DeleteBucketWebsite`)
-- [Get an object from a bucket](get_object.cpp#L34) (`GetObject`)
-- [Get the ACL of a bucket](get_bucket_acl.cpp#L39) (`GetBucketAcl`)
-- [Get the ACL of an object](get_put_object_acl.cpp#L46) (`GetObjectAcl`)
-- [Get the policy for a bucket](get_bucket_policy.cpp#L33) (`GetBucketPolicy`)
-- [Get the website configuration for a bucket](get_website_config.cpp#L32) (`GetBucketWebsite`)
-- [List buckets](list_buckets.cpp#L31) (`ListBuckets`)
-- [List objects in a bucket](list_objects.cpp#L33) (`ListObjectsV2`)
+- [Copy an object from one bucket to another](copy_object.cpp#L32) (`CopyObject`)
+- [Create a bucket](create_bucket.cpp#L33) (`CreateBucket`)
+- [Delete a policy from a bucket](delete_bucket_policy.cpp#L30) (`DeleteBucketPolicy`)
+- [Delete an empty bucket](delete_bucket.cpp#L30) (`DeleteBucket`)
+- [Delete an object](delete_object.cpp#L31) (`DeleteObject`)
+- [Delete multiple objects](delete_objects.cpp#L33) (`DeleteObjects`)
+- [Delete the website configuration from a bucket](delete_website_config.cpp#L30) (`DeleteBucketWebsite`)
+- [Get an object from a bucket](get_object.cpp#L33) (`GetObject`)
+- [Get the ACL of a bucket](get_bucket_acl.cpp#L37) (`GetBucketAcl`)
+- [Get the ACL of an object](get_put_object_acl.cpp#L44) (`GetObjectAcl`)
+- [Get the policy for a bucket](get_bucket_policy.cpp#L32) (`GetBucketPolicy`)
+- [Get the website configuration for a bucket](get_website_config.cpp#L30) (`GetBucketWebsite`)
+- [List buckets](list_buckets.cpp#L29) (`ListBuckets`)
+- [List objects in a bucket](list_objects.cpp#L31) (`ListObjectsV2`)
- [Set a new ACL for a bucket](put_bucket_acl.cpp#L49) (`PutBucketAcl`)
-- [Set the ACL of an object](get_put_object_acl.cpp#L173) (`PutObjectAcl`)
-- [Set the website configuration for a bucket](put_website_config.cpp#L36) (`PutBucketWebsite`)
-- [Upload an object to a bucket](put_object.cpp#L35) (`PutObject`)
+- [Set the ACL of an object](get_put_object_acl.cpp#L171) (`PutObjectAcl`)
+- [Set the website configuration for a bucket](put_website_config.cpp#L34) (`PutBucketWebsite`)
+- [Upload an object to a bucket](put_object.cpp#L33) (`PutObject`)
### Scenarios
@@ -87,7 +87,7 @@ Sample applications that work across multiple AWS services.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -97,6 +97,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/ses/README.md b/cpp/example_code/ses/README.md
index 50d7efcd4d1..0eafb2ce752 100644
--- a/cpp/example_code/ses/README.md
+++ b/cpp/example_code/ses/README.md
@@ -41,22 +41,22 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Create a receipt filter](create_receipt_filter.cpp#L26) (`CreateReceiptFilter`)
-- [Create a receipt rule](create_receipt_rule.cpp#L27) (`CreateReceiptRule`)
-- [Create a receipt rule set](create_receipt_rule_set.cpp#L23) (`CreateReceiptRuleSet`)
-- [Create an email template](create_template.cpp#L24) (`CreateTemplate`)
-- [Delete a receipt filter](delete_receipt_filter.cpp#L23) (`DeleteReceiptFilter`)
-- [Delete a receipt rule](delete_receipt_rule.cpp#L23) (`DeleteReceiptRule`)
-- [Delete a rule set](delete_receipt_rule_set.cpp#L23) (`DeleteReceiptRuleSet`)
-- [Delete an email template](delete_template.cpp#L23) (`DeleteTemplate`)
-- [Delete an identity](delete_identity.cpp#L23) (`DeleteIdentity`)
-- [Get an existing email template](get_template.cpp#L24) (`GetTemplate`)
-- [List identities](list_identities.cpp#L23) (`ListIdentities`)
-- [List receipt filters](list_receipt_filters.cpp#L24) (`ListReceiptFilters`)
-- [Send email](send_email.cpp#L28) (`SendEmail`)
-- [Send templated email](send_templated_email.cpp#L25) (`SendTemplatedEmail`)
-- [Update an email template](update_template.cpp#L24) (`UpdateTemplate`)
-- [Verify an email identity](verify_email_identity.cpp#L23) (`VerifyEmailIdentity`)
+- [Create a receipt filter](create_receipt_filter.cpp#L24) (`CreateReceiptFilter`)
+- [Create a receipt rule](create_receipt_rule.cpp#L25) (`CreateReceiptRule`)
+- [Create a receipt rule set](create_receipt_rule_set.cpp#L21) (`CreateReceiptRuleSet`)
+- [Create an email template](create_template.cpp#L22) (`CreateTemplate`)
+- [Delete a receipt filter](delete_receipt_filter.cpp#L21) (`DeleteReceiptFilter`)
+- [Delete a receipt rule](delete_receipt_rule.cpp#L21) (`DeleteReceiptRule`)
+- [Delete a rule set](delete_receipt_rule_set.cpp#L21) (`DeleteReceiptRuleSet`)
+- [Delete an email template](delete_template.cpp#L21) (`DeleteTemplate`)
+- [Delete an identity](delete_identity.cpp#L21) (`DeleteIdentity`)
+- [Get an existing email template](get_template.cpp#L22) (`GetTemplate`)
+- [List identities](list_identities.cpp#L21) (`ListIdentities`)
+- [List receipt filters](list_receipt_filters.cpp#L22) (`ListReceiptFilters`)
+- [Send email](send_email.cpp#L26) (`SendEmail`)
+- [Send templated email](send_templated_email.cpp#L23) (`SendTemplatedEmail`)
+- [Update an email template](update_template.cpp#L22) (`UpdateTemplate`)
+- [Verify an email identity](verify_email_identity.cpp#L21) (`VerifyEmailIdentity`)
### Cross-service examples
@@ -72,7 +72,7 @@ Sample applications that work across multiple AWS services.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -82,6 +82,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/sns/README.md b/cpp/example_code/sns/README.md
index 822a69c0699..46fd1f757da 100644
--- a/cpp/example_code/sns/README.md
+++ b/cpp/example_code/sns/README.md
@@ -46,22 +46,22 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Create a topic](create_topic.cpp#L23) (`CreateTopic`)
-- [Delete a subscription](unsubscribe.cpp#L23) (`Unsubscribe`)
-- [Delete a topic](delete_topic.cpp#L23) (`DeleteTopic`)
-- [Get the properties of a topic](get_topic_attributes.cpp#L24) (`GetTopicAttributes`)
-- [Get the settings for sending SMS messages](get_sms_type.cpp#L23) (`GetSMSAttributes`)
-- [List the subscribers of a topic](list_subscriptions.cpp#L23) (`ListSubscriptions`)
-- [List topics](list_topics.cpp#L23) (`ListTopics`)
-- [Publish a message with an attribute](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L54) (`Publish`)
-- [Publish an SMS text message](publish_sms.cpp#L23) (`Publish`)
-- [Publish to a topic](publish_to_topic.cpp#L23) (`Publish`)
-- [Set the default settings for sending SMS messages](set_sms_type.cpp#L23) (`SetSMSAttributes`)
-- [Subscribe a Lambda function to a topic](subscribe_lambda.cpp#L23) (`Subscribe`)
-- [Subscribe a mobile application to a topic](subscribe_app.cpp#L23) (`Subscribe`)
-- [Subscribe an SQS queue to a topic](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L817) (`Subscribe`)
-- [Subscribe an email address to a topic](subscribe_email.cpp#L18) (`Subscribe`)
-- [Subscribe with a filter to a topic](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L54) (`Subscribe`)
+- [Create a topic](create_topic.cpp#L21) (`CreateTopic`)
+- [Delete a subscription](unsubscribe.cpp#L21) (`Unsubscribe`)
+- [Delete a topic](delete_topic.cpp#L21) (`DeleteTopic`)
+- [Get the properties of a topic](get_topic_attributes.cpp#L22) (`GetTopicAttributes`)
+- [Get the settings for sending SMS messages](get_sms_type.cpp#L21) (`GetSMSAttributes`)
+- [List the subscribers of a topic](list_subscriptions.cpp#L21) (`ListSubscriptions`)
+- [List topics](list_topics.cpp#L21) (`ListTopics`)
+- [Publish a message with an attribute](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L52) (`Publish`)
+- [Publish an SMS text message](publish_sms.cpp#L21) (`Publish`)
+- [Publish to a topic](publish_to_topic.cpp#L21) (`Publish`)
+- [Set the default settings for sending SMS messages](set_sms_type.cpp#L21) (`SetSMSAttributes`)
+- [Subscribe a Lambda function to a topic](subscribe_lambda.cpp#L21) (`Subscribe`)
+- [Subscribe a mobile application to a topic](subscribe_app.cpp#L21) (`Subscribe`)
+- [Subscribe an SQS queue to a topic](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L815) (`Subscribe`)
+- [Subscribe an email address to a topic](subscribe_email.cpp#L10) (`Subscribe`)
+- [Subscribe with a filter to a topic](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L52) (`Subscribe`)
### Cross-service examples
@@ -77,7 +77,7 @@ Sample applications that work across multiple AWS services.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -87,6 +87,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/sqs/README.md b/cpp/example_code/sqs/README.md
index 176794b97ed..dbd6a5bc009 100644
--- a/cpp/example_code/sqs/README.md
+++ b/cpp/example_code/sqs/README.md
@@ -46,19 +46,19 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Change how long a queue waits for a message](long_polling_on_existing_queue.cpp#L87) (`SetQueueAttributes`)
-- [Change message timeout visibility](change_message_visibility.cpp#L26) (`ChangeMessageVisibility`)
-- [Configure a dead-letter queue](dead_letter_queue.cpp#L123) (`SetQueueAttributes`)
-- [Create a queue](create_queue.cpp#L25) (`CreateQueue`)
-- [Delete a batch of messages from a queue](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L646) (`DeleteMessageBatch`)
-- [Delete a message from a queue](delete_message.cpp#L25) (`DeleteMessage`)
-- [Delete a queue](delete_queue.cpp#L26) (`DeleteQueue`)
-- [Get attributes for a queue](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L382) (`GetQueueAttributes`)
-- [Get the URL of a queue](get_queue_url.cpp#L25) (`GetQueueUrl`)
-- [List queues](list_queues.cpp#L25) (`ListQueues`)
-- [Receive messages from a queue](receive_message.cpp#L25) (`ReceiveMessage`)
-- [Send a message to a queue](send_message.cpp#L25) (`SendMessage`)
-- [Set queue attributes](set_queue_attributes.cpp#L23) (`SetQueueAttributes`)
+- [Change how long a queue waits for a message](long_polling_on_existing_queue.cpp#L85) (`SetQueueAttributes`)
+- [Change message timeout visibility](change_message_visibility.cpp#L24) (`ChangeMessageVisibility`)
+- [Configure a dead-letter queue](dead_letter_queue.cpp#L121) (`SetQueueAttributes`)
+- [Create a queue](create_queue.cpp#L23) (`CreateQueue`)
+- [Delete a batch of messages from a queue](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L644) (`DeleteMessageBatch`)
+- [Delete a message from a queue](delete_message.cpp#L23) (`DeleteMessage`)
+- [Delete a queue](delete_queue.cpp#L24) (`DeleteQueue`)
+- [Get attributes for a queue](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L380) (`GetQueueAttributes`)
+- [Get the URL of a queue](get_queue_url.cpp#L23) (`GetQueueUrl`)
+- [List queues](list_queues.cpp#L23) (`ListQueues`)
+- [Receive messages from a queue](receive_message.cpp#L23) (`ReceiveMessage`)
+- [Send a message to a queue](send_message.cpp#L23) (`SendMessage`)
+- [Set queue attributes](set_queue_attributes.cpp#L21) (`SetQueueAttributes`)
### Scenarios
@@ -75,7 +75,7 @@ functions within the same service.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -85,6 +85,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/sts/README.md b/cpp/example_code/sts/README.md
index 6f1f87c2f31..1efc692e7cf 100644
--- a/cpp/example_code/sts/README.md
+++ b/cpp/example_code/sts/README.md
@@ -41,7 +41,7 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Assume a role](assume_role.cpp#L39) (`AssumeRole`)
+- [Assume a role](assume_role.cpp#L37) (`AssumeRole`)
@@ -51,7 +51,7 @@ Code excerpts that show you how to call individual service functions.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -61,6 +61,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/cpp/example_code/transcribe/README.md b/cpp/example_code/transcribe/README.md
index 25e03aa603b..d3928a92bdf 100644
--- a/cpp/example_code/transcribe/README.md
+++ b/cpp/example_code/transcribe/README.md
@@ -41,7 +41,7 @@ Next, for information on code example structures and how to build and run the ex
Code excerpts that show you how to call individual service functions.
-- [Produce real-time transcriptions](get_transcript.cpp#L26) (`StartStreamTranscriptionAsync`)
+- [Produce real-time transcriptions](get_transcript.cpp#L28) (`StartStreamTranscriptionAsync`)
@@ -51,7 +51,7 @@ Code excerpts that show you how to call individual service functions.
### Instructions
-An executable is built for each source file. These executables are located in the build folder and have
+An executable is built for each source file in this folder. These executables are located in the build folder and have
"run_" prepended to the source file name, minus the suffix. See the "main" function in the source file for further instructions.
For example, to run the action in the source file "my_action.cpp", execute the following command from within the build folder. The command
@@ -61,6 +61,9 @@ will display any required arguments.
./run_my_action
```
+If the source file is in a different folder, instructions can be found in the README in that
+folder.
+
diff --git a/dotnetv3/Cognito/README.md b/dotnetv3/Cognito/README.md
index 61b063e689e..22d0053028b 100644
--- a/dotnetv3/Cognito/README.md
+++ b/dotnetv3/Cognito/README.md
@@ -52,7 +52,7 @@ Code excerpts that show you how to call individual service functions.
- [Resend a confirmation code](Actions/CognitoWrapper.cs#L264) (`ResendConfirmationCode`)
- [Respond to an authentication challenge](Actions/CognitoWrapper.cs#L72) (`AdminRespondToAuthChallenge`)
- [Sign up a user](Actions/CognitoWrapper.cs#L311) (`SignUp`)
-- [Start authentication with a tracked device](Actions/CognitoWrapper.cs#L184) (`InitiateAuth`)
+- [Start authentication](Actions/CognitoWrapper.cs#L184) (`InitiateAuth`)
- [Start authentication with administrator credentials](Actions/CognitoWrapper.cs#L156) (`AdminInitiateAuth`)
- [Verify an MFA application with a user](Actions/CognitoWrapper.cs#L111) (`VerifySoftwareToken`)
diff --git a/gov2/aurora/README.md b/gov2/aurora/README.md
index fd981b2e656..642ceba5c74 100644
--- a/gov2/aurora/README.md
+++ b/gov2/aurora/README.md
@@ -38,21 +38,21 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` fo
Code excerpts that show you how to call individual service functions.
-- [Create a DB cluster](actions/clusters.go#L158) (`CreateDBCluster`)
-- [Create a DB cluster parameter group](actions/clusters.go#L45) (`CreateDBClusterParameterGroup`)
-- [Create a DB cluster snapshot](actions/clusters.go#L204) (`CreateDBClusterSnapshot`)
-- [Create a DB instance in a DB cluster](actions/clusters.go#L241) (`CreateDBInstance`)
-- [Delete a DB cluster](actions/clusters.go#L186) (`DeleteDBCluster`)
-- [Delete a DB cluster parameter group](actions/clusters.go#L69) (`DeleteDBClusterParameterGroup`)
-- [Delete a DB instance](actions/clusters.go#L288) (`DeleteDBInstance`)
-- [Describe DB cluster parameter groups](actions/clusters.go#L21) (`DescribeDBClusterParameterGroups`)
-- [Describe DB cluster snapshots](actions/clusters.go#L223) (`DescribeDBClusterSnapshots`)
-- [Describe DB clusters](actions/clusters.go#L134) (`DescribeDBClusters`)
-- [Describe DB instances](actions/clusters.go#L263) (`DescribeDBInstances`)
-- [Describe database engine versions](actions/clusters.go#L307) (`DescribeDBEngineVersions`)
-- [Describe options for DB instances](actions/clusters.go#L328) (`DescribeOrderableDBInstanceOptions`)
-- [Describe parameters from a DB cluster parameter group](actions/clusters.go#L87) (`DescribeDBClusterParameters`)
-- [Update parameters in a DB cluster parameter group](actions/clusters.go#L115) (`ModifyDBClusterParameterGroup`)
+- [Create a DB cluster](actions/clusters.go#L160) (`CreateDBCluster`)
+- [Create a DB cluster parameter group](actions/clusters.go#L47) (`CreateDBClusterParameterGroup`)
+- [Create a DB cluster snapshot](actions/clusters.go#L206) (`CreateDBClusterSnapshot`)
+- [Create a DB instance in a DB cluster](actions/clusters.go#L243) (`CreateDBInstance`)
+- [Delete a DB cluster](actions/clusters.go#L188) (`DeleteDBCluster`)
+- [Delete a DB cluster parameter group](actions/clusters.go#L71) (`DeleteDBClusterParameterGroup`)
+- [Delete a DB instance](actions/clusters.go#L290) (`DeleteDBInstance`)
+- [Describe DB cluster parameter groups](actions/clusters.go#L23) (`DescribeDBClusterParameterGroups`)
+- [Describe DB cluster snapshots](actions/clusters.go#L225) (`DescribeDBClusterSnapshots`)
+- [Describe DB clusters](actions/clusters.go#L136) (`DescribeDBClusters`)
+- [Describe DB instances](actions/clusters.go#L265) (`DescribeDBInstances`)
+- [Describe database engine versions](actions/clusters.go#L309) (`DescribeDBEngineVersions`)
+- [Describe options for DB instances](actions/clusters.go#L330) (`DescribeOrderableDBInstanceOptions`)
+- [Describe parameters from a DB cluster parameter group](actions/clusters.go#L89) (`DescribeDBClusterParameters`)
+- [Update parameters in a DB cluster parameter group](actions/clusters.go#L117) (`ModifyDBClusterParameterGroup`)
### Scenarios
diff --git a/javascriptv3/example_code/cloudwatch-events/README.md b/javascriptv3/example_code/cloudwatch-events/README.md
index 9de58deec76..4ea6e0637cd 100644
--- a/javascriptv3/example_code/cloudwatch-events/README.md
+++ b/javascriptv3/example_code/cloudwatch-events/README.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Adding a target](actions/put-targets.js#L6) (`PutTargets`)
-- [Create a scheduled rule](actions/put-rule.js#L6) (`PutRule`)
-- [Send events](actions/put-events.js#L6) (`PutEvents`)
+- [Adding a target](actions/put-targets.js#L4) (`PutTargets`)
+- [Create a scheduled rule](actions/put-rule.js#L4) (`PutRule`)
+- [Send events](actions/put-events.js#L4) (`PutEvents`)
diff --git a/javascriptv3/example_code/cloudwatch-logs/scenarios/large-query/README.md b/javascriptv3/example_code/cloudwatch-logs/scenarios/large-query/README.md
index f609feda606..99b88bbb1fd 100644
--- a/javascriptv3/example_code/cloudwatch-logs/scenarios/large-query/README.md
+++ b/javascriptv3/example_code/cloudwatch-logs/scenarios/large-query/README.md
@@ -32,9 +32,9 @@ Use the following steps to create the necessary resources in AWS CloudFormation
1. In your local terminal, change directories to [resources](../../../../../workflows/cloudwatch_logs_large_query/resources/).
1. Run `aws cloudformation deploy --template-file stack.yaml --stack-name CloudWatchLargeQuery`
1. Run `./make-log-files.sh`. This will output two timestamps for use in the following step.
-1. Run `export QUERY_START_DATE=`. Replace `` with the output from the previous step. Repeat this for `QUERY_END_DATE`.
-1. Run `./put-log-events.sh`.
-1. Wait five minutes for logs to settle and to make sure you're not querying for logs that exist in the future.
+1. Copy and run the `export QUERY_START_DATE=<...>` and `export QUERY_END_DATE=<...>` from the `make-log-files.sh` output.
+3. Run `./put-log-events.sh`.
+4. Wait five minutes for logs to settle and to make sure you're not querying for logs that exist in the future.
### Run the scenario
diff --git a/javascriptv3/example_code/cloudwatch/README.md b/javascriptv3/example_code/cloudwatch/README.md
index 96820ccb600..456cf244646 100644
--- a/javascriptv3/example_code/cloudwatch/README.md
+++ b/javascriptv3/example_code/cloudwatch/README.md
@@ -33,13 +33,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Create a metric alarm](actions/put-metric-alarm.js#L6) (`PutMetricAlarm`)
-- [Delete alarms](actions/delete-alarms.js#L6) (`DeleteAlarms`)
-- [Describe alarms for a metric](actions/describe-alarms.js#L6) (`DescribeAlarmsForMetric`)
-- [Disable alarm actions](actions/disable-alarm-actions.js#L6) (`DisableAlarmActions`)
-- [Enable alarm actions](actions/enable-alarm-actions.js#L6) (`EnableAlarmActions`)
-- [List metrics](actions/list-metrics.js#L6) (`ListMetrics`)
-- [Put data into a metric](actions/put-metric-data.js#L6) (`PutMetricData`)
+- [Create a metric alarm](actions/put-metric-alarm.js#L4) (`PutMetricAlarm`)
+- [Delete alarms](actions/delete-alarms.js#L4) (`DeleteAlarms`)
+- [Describe alarms for a metric](actions/describe-alarms.js#L4) (`DescribeAlarmsForMetric`)
+- [Disable alarm actions](actions/disable-alarm-actions.js#L4) (`DisableAlarmActions`)
+- [Enable alarm actions](actions/enable-alarm-actions.js#L4) (`EnableAlarmActions`)
+- [List metrics](actions/list-metrics.js#L4) (`ListMetrics`)
+- [Put data into a metric](actions/put-metric-data.js#L4) (`PutMetricData`)
diff --git a/javascriptv3/example_code/codebuild/README.md b/javascriptv3/example_code/codebuild/README.md
index ce9e9a86561..d619303f574 100644
--- a/javascriptv3/example_code/codebuild/README.md
+++ b/javascriptv3/example_code/codebuild/README.md
@@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Create a project](actions/create-project.js#L8) (`CreateProject`)
+- [Create a project](actions/create-project.js#L6) (`CreateProject`)
diff --git a/javascriptv3/example_code/cognito-identity-provider/README.md b/javascriptv3/example_code/cognito-identity-provider/README.md
index 8a44662cdcf..c803562ac9c 100644
--- a/javascriptv3/example_code/cognito-identity-provider/README.md
+++ b/javascriptv3/example_code/cognito-identity-provider/README.md
@@ -31,25 +31,25 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello Amazon Cognito](hello.js#L8) (`ListUserPools`)
+- [Hello Amazon Cognito](hello.js#L6) (`ListUserPools`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Confirm a user](actions/confirm-sign-up.js#L11) (`ConfirmSignUp`)
-- [Confirm an MFA device for tracking](actions/confirm-device.js#L11) (`ConfirmDevice`)
-- [Get a token to associate an MFA application with a user](actions/associate-software-token.js#L11) (`AssociateSoftwareToken`)
-- [Get information about a user](actions/admin-get-user.js#L11) (`AdminGetUser`)
-- [List users](actions/list-users.js#L11) (`ListUsers`)
-- [Resend a confirmation code](actions/resend-confirmation-code.js#L11) (`ResendConfirmationCode`)
-- [Respond to SRP authentication challenges](actions/respond-to-auth-challenge.js#L12) (`RespondToAuthChallenge`)
-- [Respond to an authentication challenge](actions/admin-respond-to-auth-challenge.js#L12) (`AdminRespondToAuthChallenge`)
-- [Sign up a user](actions/sign-up.js#L11) (`SignUp`)
-- [Start authentication with a tracked device](actions/initiate-auth.js#L12) (`InitiateAuth`)
-- [Start authentication with administrator credentials](actions/admin-initiate-auth.js#L12) (`AdminInitiateAuth`)
-- [Verify an MFA application with a user](actions/verify-software-token.js#L11) (`VerifySoftwareToken`)
+- [Confirm a user](actions/confirm-sign-up.js#L9) (`ConfirmSignUp`)
+- [Confirm an MFA device for tracking](actions/confirm-device.js#L9) (`ConfirmDevice`)
+- [Get a token to associate an MFA application with a user](actions/associate-software-token.js#L9) (`AssociateSoftwareToken`)
+- [Get information about a user](actions/admin-get-user.js#L9) (`AdminGetUser`)
+- [List users](actions/list-users.js#L9) (`ListUsers`)
+- [Resend a confirmation code](actions/resend-confirmation-code.js#L9) (`ResendConfirmationCode`)
+- [Respond to SRP authentication challenges](actions/respond-to-auth-challenge.js#L10) (`RespondToAuthChallenge`)
+- [Respond to an authentication challenge](actions/admin-respond-to-auth-challenge.js#L10) (`AdminRespondToAuthChallenge`)
+- [Sign up a user](actions/sign-up.js#L9) (`SignUp`)
+- [Start authentication](actions/initiate-auth.js#L10) (`InitiateAuth`)
+- [Start authentication with administrator credentials](actions/admin-initiate-auth.js#L10) (`AdminInitiateAuth`)
+- [Verify an MFA application with a user](actions/verify-software-token.js#L9) (`VerifySoftwareToken`)
### Scenarios
diff --git a/javascriptv3/example_code/dynamodb/README.md b/javascriptv3/example_code/dynamodb/README.md
index 8421a983f6e..ec0a3ac8ea4 100644
--- a/javascriptv3/example_code/dynamodb/README.md
+++ b/javascriptv3/example_code/dynamodb/README.md
@@ -31,27 +31,27 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello DynamoDB](hello.js#L8) (`ListTables`)
+- [Hello DynamoDB](hello.js#L6) (`ListTables`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a table](actions/create-table.js#L8) (`CreateTable`)
-- [Delete a table](actions/delete-table.js#L8) (`DeleteTable`)
-- [Delete an item from a table](actions/document-client/delete.js#L8) (`DeleteItem`)
-- [Get a batch of items](actions/document-client/batch-get.js#L8) (`BatchGetItem`)
-- [Get an item from a table](actions/document-client/get.js#L8) (`GetItem`)
-- [Get information about a table](actions/describe-table.js#L8) (`DescribeTable`)
-- [List tables](actions/list-tables.js#L8) (`ListTables`)
-- [Put an item in a table](actions/document-client/put.js#L8) (`PutItem`)
-- [Query a table](actions/document-client/query.js#L8) (`Query`)
-- [Run a PartiQL statement](actions/partiql/partiql-put.js#L8) (`ExecuteStatement`)
-- [Run batches of PartiQL statements](actions/partiql/partiql-batch-put.js#L8) (`BatchExecuteStatement`)
-- [Scan a table](actions/document-client/scan.js#L8) (`Scan`)
-- [Update an item in a table](actions/document-client/update.js#L8) (`UpdateItem`)
-- [Write a batch of items](actions/document-client/batch-write.js#L8) (`BatchWriteItem`)
+- [Create a table](actions/create-table.js#L6) (`CreateTable`)
+- [Delete a table](actions/delete-table.js#L6) (`DeleteTable`)
+- [Delete an item from a table](actions/document-client/delete.js#L6) (`DeleteItem`)
+- [Get a batch of items](actions/document-client/batch-get.js#L6) (`BatchGetItem`)
+- [Get an item from a table](actions/document-client/get.js#L6) (`GetItem`)
+- [Get information about a table](actions/describe-table.js#L6) (`DescribeTable`)
+- [List tables](actions/list-tables.js#L6) (`ListTables`)
+- [Put an item in a table](actions/document-client/put.js#L6) (`PutItem`)
+- [Query a table](actions/document-client/query.js#L6) (`Query`)
+- [Run a PartiQL statement](actions/partiql/partiql-put.js#L6) (`ExecuteStatement`)
+- [Run batches of PartiQL statements](actions/partiql/partiql-batch-put.js#L6) (`BatchExecuteStatement`)
+- [Scan a table](actions/document-client/scan.js#L6) (`Scan`)
+- [Update an item in a table](actions/document-client/update.js#L6) (`UpdateItem`)
+- [Write a batch of items](actions/document-client/batch-write.js#L6) (`BatchWriteItem`)
### Scenarios
diff --git a/javascriptv3/example_code/ec2/README.md b/javascriptv3/example_code/ec2/README.md
index f63e4b2cd62..950a05dfa46 100644
--- a/javascriptv3/example_code/ec2/README.md
+++ b/javascriptv3/example_code/ec2/README.md
@@ -7,7 +7,7 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Elastic Com
-_Amazon EC2 is a web service that provides resizable computing capacity—literally, servers in Amazon's data centers—that you use to build and host your software systems._
+_Amazon EC2 is a web service that provides resizable computing capacity—literally, servers in Amazon's data centers—that you use to build and host your software systems._
## ⚠ Important
diff --git a/javascriptv3/example_code/eventbridge/README.md b/javascriptv3/example_code/eventbridge/README.md
index 19bc7340b75..f0e95d69d92 100644
--- a/javascriptv3/example_code/eventbridge/README.md
+++ b/javascriptv3/example_code/eventbridge/README.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Add a target](actions/put-targets.js#L6) (`PutTargets`)
-- [Create a rule](actions/put-rule.js#L6) (`PutRule`)
-- [Send events](actions/put-events.js#L6) (`PutEvents`)
+- [Add a target](actions/put-targets.js#L4) (`PutTargets`)
+- [Create a rule](actions/put-rule.js#L4) (`PutRule`)
+- [Send events](actions/put-events.js#L4) (`PutEvents`)
diff --git a/javascriptv3/example_code/glacier/README.md b/javascriptv3/example_code/glacier/README.md
index 688c6b44118..b2a70882ab9 100644
--- a/javascriptv3/example_code/glacier/README.md
+++ b/javascriptv3/example_code/glacier/README.md
@@ -34,8 +34,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
- [Create a multipart upload](None) (`UploadMultipartPart`)
-- [Create a vault](src/libs/glacierClient.js#L13) (`CreateVault`)
-- [Upload an archive to a vault](src/libs/glacierClient.js#L13) (`UploadArchive`)
+- [Create a vault](src/libs/glacierClient.js#L15) (`CreateVault`)
+- [Upload an archive to a vault](src/libs/glacierClient.js#L15) (`UploadArchive`)
diff --git a/javascriptv3/example_code/glue/README.md b/javascriptv3/example_code/glue/README.md
index dad4118188f..e2d5a409a26 100644
--- a/javascriptv3/example_code/glue/README.md
+++ b/javascriptv3/example_code/glue/README.md
@@ -31,29 +31,29 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello AWS Glue](hello.js#L8) (`ListJobs`)
+- [Hello AWS Glue](hello.js#L6) (`ListJobs`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a crawler](actions/create-crawler.js#L8) (`CreateCrawler`)
-- [Create a job definition](actions/create-job.js#L8) (`CreateJob`)
-- [Delete a crawler](actions/delete-crawler.js#L8) (`DeleteCrawler`)
-- [Delete a database from the Data Catalog](actions/delete-database.js#L8) (`DeleteDatabase`)
-- [Delete a job definition](actions/delete-job.js#L8) (`DeleteJob`)
-- [Delete a table from a database](actions/delete-table.js#L8) (`DeleteTable`)
-- [Get a crawler](actions/get-crawler.js#L8) (`GetCrawler`)
-- [Get a database from the Data Catalog](actions/get-database.js#L8) (`GetDatabase`)
-- [Get a job run](actions/get-job-run.js#L8) (`GetJobRun`)
-- [Get databases from the Data Catalog](actions/get-databases.js#L8) (`GetDatabases`)
-- [Get job from the Data Catalog](actions/get-job.js#L8) (`GetJob`)
-- [Get runs of a job](actions/get-job-runs.js#L8) (`GetJobRuns`)
-- [Get tables from a database](actions/get-tables.js#L8) (`GetTables`)
-- [List job definitions](actions/list-jobs.js#L8) (`ListJobs`)
-- [Start a crawler](actions/start-crawler.js#L8) (`StartCrawler`)
-- [Start a job run](actions/start-job-run.js#L8) (`StartJobRun`)
+- [Create a crawler](actions/create-crawler.js#L6) (`CreateCrawler`)
+- [Create a job definition](actions/create-job.js#L6) (`CreateJob`)
+- [Delete a crawler](actions/delete-crawler.js#L6) (`DeleteCrawler`)
+- [Delete a database from the Data Catalog](actions/delete-database.js#L6) (`DeleteDatabase`)
+- [Delete a job definition](actions/delete-job.js#L6) (`DeleteJob`)
+- [Delete a table from a database](actions/delete-table.js#L6) (`DeleteTable`)
+- [Get a crawler](actions/get-crawler.js#L6) (`GetCrawler`)
+- [Get a database from the Data Catalog](actions/get-database.js#L6) (`GetDatabase`)
+- [Get a job run](actions/get-job-run.js#L6) (`GetJobRun`)
+- [Get databases from the Data Catalog](actions/get-databases.js#L6) (`GetDatabases`)
+- [Get job from the Data Catalog](actions/get-job.js#L6) (`GetJob`)
+- [Get runs of a job](actions/get-job-runs.js#L6) (`GetJobRuns`)
+- [Get tables from a database](actions/get-tables.js#L6) (`GetTables`)
+- [List job definitions](actions/list-jobs.js#L6) (`ListJobs`)
+- [Start a crawler](actions/start-crawler.js#L6) (`StartCrawler`)
+- [Start a job run](actions/start-job-run.js#L6) (`StartJobRun`)
### Scenarios
diff --git a/javascriptv3/example_code/lambda/README.md b/javascriptv3/example_code/lambda/README.md
index 78b4ed9e664..3d06982c6fa 100644
--- a/javascriptv3/example_code/lambda/README.md
+++ b/javascriptv3/example_code/lambda/README.md
@@ -31,20 +31,20 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello Lambda](hello.js#L8) (`ListFunctions`)
+- [Hello Lambda](hello.js#L6) (`ListFunctions`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a function](actions/create-function.js#L17) (`CreateFunction`)
-- [Delete a function](actions/delete-function.js#L7) (`DeleteFunction`)
-- [Get a function](actions/get-function.js#L7) (`GetFunction`)
-- [Invoke a function](actions/invoke.js#L7) (`Invoke`)
-- [List functions](actions/list-functions.js#L7) (`ListFunctions`)
-- [Update function code](actions/update-function-code.js#L17) (`UpdateFunctionCode`)
-- [Update function configuration](actions/update-function-configuration.js#L14) (`UpdateFunctionConfiguration`)
+- [Create a function](actions/create-function.js#L15) (`CreateFunction`)
+- [Delete a function](actions/delete-function.js#L5) (`DeleteFunction`)
+- [Get a function](actions/get-function.js#L5) (`GetFunction`)
+- [Invoke a function](actions/invoke.js#L5) (`Invoke`)
+- [List functions](actions/list-functions.js#L5) (`ListFunctions`)
+- [Update function code](actions/update-function-code.js#L15) (`UpdateFunctionCode`)
+- [Update function configuration](actions/update-function-configuration.js#L12) (`UpdateFunctionConfiguration`)
### Scenarios
diff --git a/javascriptv3/example_code/medical-imaging/README.md b/javascriptv3/example_code/medical-imaging/README.md
index f06a5ffe166..0c1a6c83366 100644
--- a/javascriptv3/example_code/medical-imaging/README.md
+++ b/javascriptv3/example_code/medical-imaging/README.md
@@ -31,31 +31,31 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello HealthImaging](actions/create-datastore.js#L8) (`ListDatastores`)
+- [Hello HealthImaging](hello.js#L6) (`ListDatastores`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add a tag to a resource](actions/tag-resource.js#L8) (`TagResource`)
-- [Copy an image set](actions/copy-image-set.js#L8) (`CopyImageSet`)
-- [Create a data store](actions/create-datastore.js#L8) (`CreateDatastore`)
-- [Delete a data store](actions/delete-datastore.js#L8) (`DeleteDatastore`)
-- [Delete an image set](actions/delete-image-set.js#L8) (`DeleteImageSet`)
-- [Get an image frame](actions/get-image-frame.js#L9) (`GetImageFrame`)
-- [Get data store properties](actions/get-datastore.js#L8) (`GetDatastore`)
-- [Get image set properties](actions/get-image-set.js#L8) (`GetImageSet`)
-- [Get import job properties](actions/get-dicom-import-job.js#L8) (`GetDICOMImportJob`)
-- [Get metadata for an image set](actions/get-image-set-metadata.js#L8) (`GetImageSetMetadata`)
-- [Import bulk data into a data store](actions/start-dicom-import-job.js#L8) (`StartDICOMImportJob`)
-- [List data stores](actions/list-datastores.js#L8) (`ListDatastores`)
-- [List image set versions](actions/list-image-set-versions.js#L8) (`ListImageSetVersions`)
-- [List import jobs for a data store](actions/list-dicom-import-jobs.js#L8) (`ListDICOMImportJobs`)
-- [List tags for a resource](actions/list-tags-for-resource.js#L8) (`ListTagsForResource`)
-- [Remove a tag from a resource](actions/untag-resource.js#L8) (`UntagResource`)
-- [Search image sets](actions/search-image-sets.js#L8) (`SearchImageSets`)
-- [Update image set metadata](actions/update-image-set-metadata.js#L8) (`UpdateImageSetMetadata`)
+- [Add a tag to a resource](actions/tag-resource.js#L6) (`TagResource`)
+- [Copy an image set](actions/copy-image-set.js#L6) (`CopyImageSet`)
+- [Create a data store](actions/create-datastore.js#L6) (`CreateDatastore`)
+- [Delete a data store](actions/delete-datastore.js#L6) (`DeleteDatastore`)
+- [Delete an image set](actions/delete-image-set.js#L6) (`DeleteImageSet`)
+- [Get an image frame](actions/get-image-frame.js#L7) (`GetImageFrame`)
+- [Get data store properties](actions/get-datastore.js#L6) (`GetDatastore`)
+- [Get image set properties](actions/get-image-set.js#L6) (`GetImageSet`)
+- [Get import job properties](actions/get-dicom-import-job.js#L6) (`GetDICOMImportJob`)
+- [Get metadata for an image set](actions/get-image-set-metadata.js#L6) (`GetImageSetMetadata`)
+- [Import bulk data into a data store](actions/start-dicom-import-job.js#L6) (`StartDICOMImportJob`)
+- [List data stores](actions/list-datastores.js#L6) (`ListDatastores`)
+- [List image set versions](actions/list-image-set-versions.js#L6) (`ListImageSetVersions`)
+- [List import jobs for a data store](actions/list-dicom-import-jobs.js#L6) (`ListDICOMImportJobs`)
+- [List tags for a resource](actions/list-tags-for-resource.js#L6) (`ListTagsForResource`)
+- [Remove a tag from a resource](actions/untag-resource.js#L6) (`UntagResource`)
+- [Search image sets](actions/search-image-sets.js#L6) (`SearchImageSets`)
+- [Update image set metadata](actions/update-image-set-metadata.js#L10) (`UpdateImageSetMetadata`)
### Scenarios
@@ -105,24 +105,24 @@ node ./hello.js
This example shows you how to tag a HealthImaging data store.
-
-
+
+
-
-
+
+
#### Tagging an image set
This example shows you how to tag a HealthImaging image set.
-
-
+
+
-
-
+
+
### Tests
diff --git a/javascriptv3/example_code/personalize/README.md b/javascriptv3/example_code/personalize/README.md
index 886a3d0bb08..cfb76fd1319 100644
--- a/javascriptv3/example_code/personalize/README.md
+++ b/javascriptv3/example_code/personalize/README.md
@@ -33,20 +33,20 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Create a batch interface job](src/personalize_createBatchInferenceJob.js#L27) (`CreateBatchInferenceJob`)
-- [Create a batch segment job](src/personalize_createBatchSegmentJob.js#L25) (`CreateBatchSegmentJob`)
-- [Create a campaign](src/personalize_createCampaign.js#L20) (`CreateCampaign`)
-- [Create a dataset](src/personalize_createDataset.js#L21) (`CreateDataset`)
-- [Create a dataset export job](src/personalize_createDatasetExportJob.js#L22) (`CreateDatasetExportJob`)
-- [Create a dataset group](src/personalize_createDatasetGroup.js#L19) (`CreateDatasetGroup`)
-- [Create a dataset import job](src/personalize_createDatasetImportJob.js#L21) (`CreateDatasetImportJob`)
-- [Create a domain schema](src/personalize_createDomainSchema.js#L20) (`CreateSchema`)
-- [Create a filter](src/personalize_createFilter.js#L19) (`CreateFilter`)
-- [Create a recommender](src/personalize_createRecommender.js#L20) (`CreateRecommender`)
-- [Create a schema](src/personalize_createSchema.js#L19) (`CreateSchema`)
-- [Create a solution](src/personalize_createSolution.js#L20) (`CreateSolution`)
-- [Create a solution version](src/personalize_createSolutionVersion.js#L18) (`CreateSolutionVersion`)
-- [Create an event tracker](src/personalize_createEventTracker.js#L19) (`CreateEventTracker`)
+- [Create a batch interface job](src/personalize_createBatchInferenceJob.js#L31) (`CreateBatchInferenceJob`)
+- [Create a batch segment job](src/personalize_createBatchSegmentJob.js#L27) (`CreateBatchSegmentJob`)
+- [Create a campaign](src/personalize_createCampaign.js#L22) (`CreateCampaign`)
+- [Create a dataset](src/personalize_createDataset.js#L23) (`CreateDataset`)
+- [Create a dataset export job](src/personalize_createDatasetExportJob.js#L24) (`CreateDatasetExportJob`)
+- [Create a dataset group](src/personalize_createDatasetGroup.js#L21) (`CreateDatasetGroup`)
+- [Create a dataset import job](src/personalize_createDatasetImportJob.js#L23) (`CreateDatasetImportJob`)
+- [Create a domain schema](src/personalize_createDomainSchema.js#L22) (`CreateSchema`)
+- [Create a filter](src/personalize_createFilter.js#L21) (`CreateFilter`)
+- [Create a recommender](src/personalize_createRecommender.js#L22) (`CreateRecommender`)
+- [Create a schema](src/personalize_createSchema.js#L21) (`CreateSchema`)
+- [Create a solution](src/personalize_createSolution.js#L22) (`CreateSolution`)
+- [Create a solution version](src/personalize_createSolutionVersion.js#L20) (`CreateSolutionVersion`)
+- [Create an event tracker](src/personalize_createEventTracker.js#L21) (`CreateEventTracker`)
diff --git a/javascriptv3/example_code/pinpoint/README.md b/javascriptv3/example_code/pinpoint/README.md
index 9ae721e53c9..5ac3ae21024 100644
--- a/javascriptv3/example_code/pinpoint/README.md
+++ b/javascriptv3/example_code/pinpoint/README.md
@@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Send email and text messages](src/libs/pinClient.js#L14) (`SendMessages`)
+- [Send email and text messages](src/libs/pinClient.js#L16) (`SendMessages`)
diff --git a/javascriptv3/example_code/redshift/README.md b/javascriptv3/example_code/redshift/README.md
index 16681fec846..b145ddaa218 100644
--- a/javascriptv3/example_code/redshift/README.md
+++ b/javascriptv3/example_code/redshift/README.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Create a cluster](src/libs/redshiftClient.js#L13) (`CreateCluster`)
-- [Delete a cluster](src/libs/redshiftClient.js#L13) (`DeleteCluster`)
-- [Describe your clusters](src/libs/redshiftClient.js#L13) (`DescribeClusters`)
-- [Modify a cluster](src/libs/redshiftClient.js#L13) (`ModifyCluster`)
+- [Create a cluster](src/libs/redshiftClient.js#L15) (`CreateCluster`)
+- [Delete a cluster](src/libs/redshiftClient.js#L15) (`DeleteCluster`)
+- [Describe your clusters](src/libs/redshiftClient.js#L15) (`DescribeClusters`)
+- [Modify a cluster](src/libs/redshiftClient.js#L15) (`ModifyCluster`)
diff --git a/javascriptv3/example_code/s3/README.md b/javascriptv3/example_code/s3/README.md
index c3a59927de4..043c547bd56 100644
--- a/javascriptv3/example_code/s3/README.md
+++ b/javascriptv3/example_code/s3/README.md
@@ -31,32 +31,32 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello Amazon S3](hello.js#L8) (`ListBuckets`)
+- [Hello Amazon S3](hello.js#L6) (`ListBuckets`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add CORS rules to a bucket](actions/put-bucket-cors.js#L8) (`PutBucketCors`)
-- [Add a policy to a bucket](actions/put-bucket-policy.js#L8) (`PutBucketPolicy`)
-- [Copy an object from one bucket to another](actions/copy-object.js#L8) (`CopyObject`)
-- [Create a bucket](actions/create-bucket.js#L8) (`CreateBucket`)
-- [Delete a policy from a bucket](actions/delete-bucket-policy.js#L8) (`DeleteBucketPolicy`)
-- [Delete an empty bucket](actions/delete-bucket.js#L8) (`DeleteBucket`)
-- [Delete an object](actions/delete-object.js#L8) (`DeleteObject`)
-- [Delete multiple objects](actions/delete-objects.js#L8) (`DeleteObjects`)
-- [Delete the website configuration from a bucket](actions/delete-bucket-website.js#L8) (`DeleteBucketWebsite`)
-- [Get CORS rules for a bucket](actions/get-bucket-cors.js#L8) (`GetBucketCors`)
-- [Get an object from a bucket](actions/get-object.js#L8) (`GetObject`)
-- [Get the ACL of a bucket](actions/get-bucket-acl.js#L8) (`GetBucketAcl`)
-- [Get the policy for a bucket](actions/get-bucket-policy.js#L8) (`GetBucketPolicy`)
-- [Get the website configuration for a bucket](actions/get-bucket-website.js#L8) (`GetBucketWebsite`)
-- [List buckets](actions/list-buckets.js#L8) (`ListBuckets`)
-- [List objects in a bucket](actions/list-objects.js#L8) (`ListObjectsV2`)
-- [Set a new ACL for a bucket](actions/put-bucket-acl.js#L8) (`PutBucketAcl`)
-- [Set the website configuration for a bucket](actions/put-bucket-website.js#L8) (`PutBucketWebsite`)
-- [Upload an object to a bucket](actions/put-object.js#L8) (`PutObject`)
+- [Add CORS rules to a bucket](actions/put-bucket-cors.js#L6) (`PutBucketCors`)
+- [Add a policy to a bucket](actions/put-bucket-policy.js#L6) (`PutBucketPolicy`)
+- [Copy an object from one bucket to another](actions/copy-object.js#L6) (`CopyObject`)
+- [Create a bucket](actions/create-bucket.js#L6) (`CreateBucket`)
+- [Delete a policy from a bucket](actions/delete-bucket-policy.js#L6) (`DeleteBucketPolicy`)
+- [Delete an empty bucket](actions/delete-bucket.js#L6) (`DeleteBucket`)
+- [Delete an object](actions/delete-object.js#L6) (`DeleteObject`)
+- [Delete multiple objects](actions/delete-objects.js#L6) (`DeleteObjects`)
+- [Delete the website configuration from a bucket](actions/delete-bucket-website.js#L6) (`DeleteBucketWebsite`)
+- [Get CORS rules for a bucket](actions/get-bucket-cors.js#L6) (`GetBucketCors`)
+- [Get an object from a bucket](actions/get-object.js#L6) (`GetObject`)
+- [Get the ACL of a bucket](actions/get-bucket-acl.js#L6) (`GetBucketAcl`)
+- [Get the policy for a bucket](actions/get-bucket-policy.js#L6) (`GetBucketPolicy`)
+- [Get the website configuration for a bucket](actions/get-bucket-website.js#L6) (`GetBucketWebsite`)
+- [List buckets](actions/list-buckets.js#L6) (`ListBuckets`)
+- [List objects in a bucket](actions/list-objects.js#L6) (`ListObjectsV2`)
+- [Set a new ACL for a bucket](actions/put-bucket-acl.js#L6) (`PutBucketAcl`)
+- [Set the website configuration for a bucket](actions/put-bucket-website.js#L6) (`PutBucketWebsite`)
+- [Upload an object to a bucket](actions/put-object.js#L6) (`PutObject`)
### Scenarios
diff --git a/javascriptv3/example_code/sagemaker/README.md b/javascriptv3/example_code/sagemaker/README.md
index 4f75d727cdb..f58eb6dd664 100644
--- a/javascriptv3/example_code/sagemaker/README.md
+++ b/javascriptv3/example_code/sagemaker/README.md
@@ -31,17 +31,17 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello SageMaker](hello.js#L8) (`ListNotebookInstances`)
+- [Hello SageMaker](hello.js#L6) (`ListNotebookInstances`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a pipeline](scenarios/wkflw-sagemaker-geospatial-pipeline/lib.js#L368) (`CreatePipeline`)
-- [Delete a pipeline](scenarios/wkflw-sagemaker-geospatial-pipeline/lib.js#L403) (`DeletePipeline`)
-- [Describe a pipeline execution](scenarios/wkflw-sagemaker-geospatial-pipeline/lib.js#L594) (`DescribePipelineExecution`)
-- [Execute a pipeline](scenarios/wkflw-sagemaker-geospatial-pipeline/lib.js#L509) (`StartPipelineExecution`)
+- [Create a pipeline](scenarios/wkflw-sagemaker-geospatial-pipeline/lib.js#L366) (`CreatePipeline`)
+- [Delete a pipeline](scenarios/wkflw-sagemaker-geospatial-pipeline/lib.js#L401) (`DeletePipeline`)
+- [Describe a pipeline execution](scenarios/wkflw-sagemaker-geospatial-pipeline/lib.js#L592) (`DescribePipelineExecution`)
+- [Execute a pipeline](scenarios/wkflw-sagemaker-geospatial-pipeline/lib.js#L507) (`StartPipelineExecution`)
### Scenarios
diff --git a/javascriptv3/example_code/secrets-manager/README.md b/javascriptv3/example_code/secrets-manager/README.md
index 42984fc546e..1244a1d236a 100644
--- a/javascriptv3/example_code/secrets-manager/README.md
+++ b/javascriptv3/example_code/secrets-manager/README.md
@@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Get a secret value](actions/get-secret-value.js#L7) (`GetSecretValue`)
+- [Get a secret value](actions/get-secret-value.js#L5) (`GetSecretValue`)
diff --git a/javascriptv3/example_code/ses/README.md b/javascriptv3/example_code/ses/README.md
index 98ac54b2ec6..e7d5f5aebe3 100644
--- a/javascriptv3/example_code/ses/README.md
+++ b/javascriptv3/example_code/ses/README.md
@@ -33,26 +33,26 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Create a receipt filter](src/ses_createreceiptfilter.js#L15) (`CreateReceiptFilter`)
-- [Create a receipt rule](src/ses_createreceiptrule.js#L16) (`CreateReceiptRule`)
-- [Create a receipt rule set](src/ses_createreceiptruleset.js#L14) (`CreateReceiptRuleSet`)
-- [Create an email template](src/ses_createtemplate.js#L15) (`CreateTemplate`)
-- [Delete a receipt filter](src/ses_deletereceiptfilter.js#L15) (`DeleteReceiptFilter`)
-- [Delete a receipt rule](src/ses_deletereceiptrule.js#L15) (`DeleteReceiptRule`)
-- [Delete a rule set](src/ses_deletereceiptruleset.js#L15) (`DeleteReceiptRuleSet`)
-- [Delete an email template](src/ses_deletetemplate.js#L14) (`DeleteTemplate`)
-- [Delete an identity](src/ses_deleteidentity.js#L15) (`DeleteIdentity`)
-- [Get an existing email template](src/ses_gettemplate.js#L14) (`GetTemplate`)
-- [List email templates](src/ses_listtemplates.js#L14) (`ListTemplates`)
-- [List identities](src/ses_listidentities.js#L14) (`ListIdentities`)
-- [List receipt filters](src/ses_listreceiptfilters.js#L14) (`ListReceiptFilters`)
-- [Send bulk templated email](src/ses_sendbulktemplatedemail.js#L15) (`SendBulkTemplatedEmail`)
-- [Send email](src/ses_sendemail.js#L15) (`SendEmail`)
-- [Send raw email](src/send-with-attachments.js#L8) (`SendRawEmail`)
-- [Send templated email](src/ses_sendtemplatedemail.js#L15) (`SendTemplatedEmail`)
-- [Update an email template](src/ses_updatetemplate.js#L14) (`UpdateTemplate`)
-- [Verify a domain identity](src/ses_verifydomainidentity.js#L14) (`VerifyDomainIdentity`)
-- [Verify an email identity](src/ses_verifyemailidentity.js#L15) (`VerifyEmailIdentity`)
+- [Create a receipt filter](src/ses_createreceiptfilter.js#L16) (`CreateReceiptFilter`)
+- [Create a receipt rule](src/ses_createreceiptrule.js#L17) (`CreateReceiptRule`)
+- [Create a receipt rule set](src/ses_createreceiptruleset.js#L15) (`CreateReceiptRuleSet`)
+- [Create an email template](src/ses_createtemplate.js#L16) (`CreateTemplate`)
+- [Delete a receipt filter](src/ses_deletereceiptfilter.js#L16) (`DeleteReceiptFilter`)
+- [Delete a receipt rule](src/ses_deletereceiptrule.js#L16) (`DeleteReceiptRule`)
+- [Delete a rule set](src/ses_deletereceiptruleset.js#L16) (`DeleteReceiptRuleSet`)
+- [Delete an email template](src/ses_deletetemplate.js#L15) (`DeleteTemplate`)
+- [Delete an identity](src/ses_deleteidentity.js#L16) (`DeleteIdentity`)
+- [Get an existing email template](src/ses_gettemplate.js#L15) (`GetTemplate`)
+- [List email templates](src/ses_listtemplates.js#L15) (`ListTemplates`)
+- [List identities](src/ses_listidentities.js#L15) (`ListIdentities`)
+- [List receipt filters](src/ses_listreceiptfilters.js#L15) (`ListReceiptFilters`)
+- [Send bulk templated email](src/ses_sendbulktemplatedemail.js#L16) (`SendBulkTemplatedEmail`)
+- [Send email](src/ses_sendemail.js#L16) (`SendEmail`)
+- [Send raw email](src/send-with-attachments.js#L6) (`SendRawEmail`)
+- [Send templated email](src/ses_sendtemplatedemail.js#L16) (`SendTemplatedEmail`)
+- [Update an email template](src/ses_updatetemplate.js#L15) (`UpdateTemplate`)
+- [Verify a domain identity](src/ses_verifydomainidentity.js#L15) (`VerifyDomainIdentity`)
+- [Verify an email identity](src/ses_verifyemailidentity.js#L16) (`VerifyEmailIdentity`)
### Cross-service examples
diff --git a/javascriptv3/example_code/sns/README.md b/javascriptv3/example_code/sns/README.md
index 1d27896431b..6b0bcc6d817 100644
--- a/javascriptv3/example_code/sns/README.md
+++ b/javascriptv3/example_code/sns/README.md
@@ -31,31 +31,31 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello Amazon SNS](hello.js#L8) (`ListTopics`)
+- [Hello Amazon SNS](hello.js#L6) (`ListTopics`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Check whether a phone number is opted out](libs/snsClient.js#L6) (`CheckIfPhoneNumberIsOptedOut`)
-- [Confirm an endpoint owner wants to receive messages](libs/snsClient.js#L6) (`ConfirmSubscription`)
-- [Create a topic](libs/snsClient.js#L6) (`CreateTopic`)
-- [Delete a subscription](libs/snsClient.js#L6) (`Unsubscribe`)
-- [Delete a topic](libs/snsClient.js#L6) (`DeleteTopic`)
-- [Get the properties of a topic](libs/snsClient.js#L6) (`GetTopicAttributes`)
-- [Get the settings for sending SMS messages](libs/snsClient.js#L6) (`GetSMSAttributes`)
-- [List the subscribers of a topic](libs/snsClient.js#L6) (`ListSubscriptions`)
-- [List topics](libs/snsClient.js#L6) (`ListTopics`)
-- [Publish a message with an attribute](../cross-services/wkflw-topics-queues/TopicsQueuesWkflw.js#L269) (`Publish`)
-- [Publish to a topic](libs/snsClient.js#L6) (`Publish`)
-- [Set the default settings for sending SMS messages](libs/snsClient.js#L6) (`SetSMSAttributes`)
-- [Set topic attributes](libs/snsClient.js#L6) (`SetTopicAttributes`)
-- [Subscribe a Lambda function to a topic](libs/snsClient.js#L6) (`Subscribe`)
-- [Subscribe a mobile application to a topic](libs/snsClient.js#L6) (`Subscribe`)
-- [Subscribe an SQS queue to a topic](actions/subscribe-queue.js#L8) (`Subscribe`)
-- [Subscribe an email address to a topic](libs/snsClient.js#L6) (`Subscribe`)
-- [Subscribe with a filter to a topic](actions/subscribe-queue-filtered.js#L8) (`Subscribe`)
+- [Check whether a phone number is opted out](libs/snsClient.js#L4) (`CheckIfPhoneNumberIsOptedOut`)
+- [Confirm an endpoint owner wants to receive messages](libs/snsClient.js#L4) (`ConfirmSubscription`)
+- [Create a topic](libs/snsClient.js#L4) (`CreateTopic`)
+- [Delete a subscription](libs/snsClient.js#L4) (`Unsubscribe`)
+- [Delete a topic](libs/snsClient.js#L4) (`DeleteTopic`)
+- [Get the properties of a topic](libs/snsClient.js#L4) (`GetTopicAttributes`)
+- [Get the settings for sending SMS messages](libs/snsClient.js#L4) (`GetSMSAttributes`)
+- [List the subscribers of a topic](libs/snsClient.js#L4) (`ListSubscriptions`)
+- [List topics](libs/snsClient.js#L4) (`ListTopics`)
+- [Publish a message with an attribute](../cross-services/wkflw-topics-queues/TopicsQueuesWkflw.js#L267) (`Publish`)
+- [Publish to a topic](libs/snsClient.js#L4) (`Publish`)
+- [Set the default settings for sending SMS messages](libs/snsClient.js#L4) (`SetSMSAttributes`)
+- [Set topic attributes](libs/snsClient.js#L4) (`SetTopicAttributes`)
+- [Subscribe a Lambda function to a topic](libs/snsClient.js#L4) (`Subscribe`)
+- [Subscribe a mobile application to a topic](libs/snsClient.js#L4) (`Subscribe`)
+- [Subscribe an SQS queue to a topic](actions/subscribe-queue.js#L6) (`Subscribe`)
+- [Subscribe an email address to a topic](libs/snsClient.js#L4) (`Subscribe`)
+- [Subscribe with a filter to a topic](actions/subscribe-queue-filtered.js#L6) (`Subscribe`)
diff --git a/javascriptv3/example_code/sqs/README.md b/javascriptv3/example_code/sqs/README.md
index b4abfb102f7..c02579a1191 100644
--- a/javascriptv3/example_code/sqs/README.md
+++ b/javascriptv3/example_code/sqs/README.md
@@ -31,25 +31,25 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello Amazon SQS](hello.js#L8) (`ListQueues`)
+- [Hello Amazon SQS](hello.js#L6) (`ListQueues`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Change message timeout visibility](actions/change-message-visibility.js#L7) (`ChangeMessageVisibility`)
-- [Configure a dead-letter queue](actions/set-attributes-dead-letter.js#L8) (`SetQueueAttributes`)
-- [Create a queue](actions/create-queue.js#L7) (`CreateQueue`)
-- [Delete a batch of messages from a queue](actions/receive-delete-message.js#L8) (`DeleteMessageBatch`)
-- [Delete a message from a queue](actions/receive-delete-message.js#L8) (`DeleteMessage`)
-- [Delete a queue](actions/delete-queue.js#L8) (`DeleteQueue`)
-- [Get attributes for a queue](actions/get-queue-attributes.js#L8) (`GetQueueAttributes`)
-- [Get the URL of a queue](actions/get-queue-url.js#L8) (`GetQueueUrl`)
-- [List queues](actions/list-queues.js#L8) (`ListQueues`)
-- [Receive messages from a queue](actions/receive-delete-message.js#L8) (`ReceiveMessage`)
-- [Send a message to a queue](actions/send-message.js#L8) (`SendMessage`)
-- [Set queue attributes](actions/set-queue-attributes.js#L8) (`SetQueueAttributes`)
+- [Change message timeout visibility](actions/change-message-visibility.js#L5) (`ChangeMessageVisibility`)
+- [Configure a dead-letter queue](actions/set-attributes-dead-letter.js#L6) (`SetQueueAttributes`)
+- [Create a queue](actions/create-queue.js#L9) (`CreateQueue`)
+- [Delete a batch of messages from a queue](actions/receive-delete-message.js#L6) (`DeleteMessageBatch`)
+- [Delete a message from a queue](actions/receive-delete-message.js#L6) (`DeleteMessage`)
+- [Delete a queue](actions/delete-queue.js#L6) (`DeleteQueue`)
+- [Get attributes for a queue](actions/get-queue-attributes.js#L6) (`GetQueueAttributes`)
+- [Get the URL of a queue](actions/get-queue-url.js#L6) (`GetQueueUrl`)
+- [List queues](actions/list-queues.js#L6) (`ListQueues`)
+- [Receive messages from a queue](actions/receive-delete-message.js#L6) (`ReceiveMessage`)
+- [Send a message to a queue](actions/send-message.js#L6) (`SendMessage`)
+- [Set queue attributes](actions/set-queue-attributes.js#L6) (`SetQueueAttributes`)
### Scenarios
diff --git a/javascriptv3/example_code/sts/README.md b/javascriptv3/example_code/sts/README.md
index 2ee6f1c2900..8e2432f0b47 100644
--- a/javascriptv3/example_code/sts/README.md
+++ b/javascriptv3/example_code/sts/README.md
@@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Assume a role](libs/client.js#L6) (`AssumeRole`)
+- [Assume a role](libs/client.js#L4) (`AssumeRole`)
diff --git a/javascriptv3/example_code/support/README.md b/javascriptv3/example_code/support/README.md
index d34e2a6cbe6..a1997cd0bff 100644
--- a/javascriptv3/example_code/support/README.md
+++ b/javascriptv3/example_code/support/README.md
@@ -31,21 +31,21 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
### Get started
-- [Hello Support](hello.js#L8) (`DescribeServices`)
+- [Hello Support](hello.js#L6) (`DescribeServices`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add a communication to a case](actions/add-communication-to-case.js#L8) (`AddCommunicationToCase`)
-- [Add an attachment to a set](actions/add-attachments-to-set.js#L8) (`AddAttachmentsToSet`)
-- [Create a case](actions/create-case.js#L8) (`CreateCase`)
-- [Describe an attachment](actions/describe-attachment.js#L8) (`DescribeAttachment`)
-- [Describe cases](actions/describe-cases.js#L8) (`DescribeCases`)
-- [Describe communications](actions/describe-communications.js#L8) (`DescribeCommunications`)
-- [Describe severity levels](actions/describe-severity-levels.js#L8) (`DescribeSeverityLevels`)
-- [Resolve case](actions/resolve-case.js#L8) (`ResolveCase`)
+- [Add a communication to a case](actions/add-communication-to-case.js#L6) (`AddCommunicationToCase`)
+- [Add an attachment to a set](actions/add-attachments-to-set.js#L6) (`AddAttachmentsToSet`)
+- [Create a case](actions/create-case.js#L6) (`CreateCase`)
+- [Describe an attachment](actions/describe-attachment.js#L6) (`DescribeAttachment`)
+- [Describe cases](actions/describe-cases.js#L6) (`DescribeCases`)
+- [Describe communications](actions/describe-communications.js#L6) (`DescribeCommunications`)
+- [Describe severity levels](actions/describe-severity-levels.js#L6) (`DescribeSeverityLevels`)
+- [Resolve case](actions/resolve-case.js#L6) (`ResolveCase`)
### Scenarios
diff --git a/javascriptv3/example_code/transcribe/README.md b/javascriptv3/example_code/transcribe/README.md
index 8294d286be2..cc440d2b100 100644
--- a/javascriptv3/example_code/transcribe/README.md
+++ b/javascriptv3/example_code/transcribe/README.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
Code excerpts that show you how to call individual service functions.
-- [Delete a transcription job](src/transcribe_delete_job.js#L16) (`DeleteTranscriptionJob`)
-- [List transcription jobs](src/transcribe_list_jobs.js#L16) (`ListTranscriptionJobs`)
-- [Start a transcription job](src/transcribe_create_job.js#L21) (`StartTranscriptionJob`)
+- [Delete a transcription job](src/transcribe_delete_job.js#L17) (`DeleteTranscriptionJob`)
+- [List transcription jobs](src/transcribe_list_jobs.js#L17) (`ListTranscriptionJobs`)
+- [Start a transcription job](src/transcribe_create_job.js#L22) (`StartTranscriptionJob`)
diff --git a/javav2/example_code/bedrock/Readme.md b/javav2/example_code/bedrock/Readme.md
index 79b6770c708..d88833414b0 100644
--- a/javav2/example_code/bedrock/Readme.md
+++ b/javav2/example_code/bedrock/Readme.md
@@ -34,7 +34,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [List available Amazon Bedrock foundation models](src/main/java/com/example/bedrock/ListFoundationModels.java#L42) (`ListFoundationModels`)
+- [List available Amazon Bedrock foundation models](src/main/java/com/example/bedrock/ListFoundationModels.java#L36) (`ListFoundationModels`)
diff --git a/javav2/example_code/cloudfront/Readme.md b/javav2/example_code/cloudfront/Readme.md
index a91cf05cb96..f588103fd7d 100644
--- a/javav2/example_code/cloudfront/Readme.md
+++ b/javav2/example_code/cloudfront/Readme.md
@@ -33,13 +33,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a distribution](src/main/java/com/example/cloudfront/CreateDistribution.java#L11) (`CreateDistribution`)
-- [Create a function](src/main/java/com/example/cloudfront/CreateFunction.java#L12) (`CreateFunction`)
-- [Create a key group](src/main/java/com/example/cloudfront/CreateKeyGroup.java#L11) (`CreateKeyGroup`)
-- [Delete a distribution](src/main/java/com/example/cloudfront/DeleteDistribution.java#L11) (`DeleteDistribution`)
-- [Delete signing resources](src/main/java/com/example/cloudfront/DeleteSigningResources.java#L11) (`DeleteKeyGroup`)
-- [Update a distribution](src/main/java/com/example/cloudfront/ModifyDistribution.java#L12) (`UpdateDistribution`)
-- [Upload a public key](src/main/java/com/example/cloudfront/CreatePublicKey.java#L11) (`CreatePublicKey`)
+- [Create a distribution](src/main/java/com/example/cloudfront/CreateDistribution.java#L6) (`CreateDistribution`)
+- [Create a function](src/main/java/com/example/cloudfront/CreateFunction.java#L6) (`CreateFunction`)
+- [Create a key group](src/main/java/com/example/cloudfront/CreateKeyGroup.java#L6) (`CreateKeyGroup`)
+- [Delete a distribution](src/main/java/com/example/cloudfront/DeleteDistribution.java#L6) (`DeleteDistribution`)
+- [Delete signing resources](src/main/java/com/example/cloudfront/DeleteSigningResources.java#L6) (`DeleteKeyGroup`)
+- [Update a distribution](src/main/java/com/example/cloudfront/ModifyDistribution.java#L6) (`UpdateDistribution`)
+- [Upload a public key](src/main/java/com/example/cloudfront/CreatePublicKey.java#L6) (`CreatePublicKey`)
### Scenarios
diff --git a/javav2/example_code/cloudwatch/Readme.md b/javav2/example_code/cloudwatch/Readme.md
index 35651dd32aa..cde8d6fbadc 100644
--- a/javav2/example_code/cloudwatch/Readme.md
+++ b/javav2/example_code/cloudwatch/Readme.md
@@ -31,31 +31,31 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello CloudWatch](src/main/java/com/example/cloudwatch/HelloService.java#L12) (`ListMetrics`)
+- [Hello CloudWatch](src/main/java/com/example/cloudwatch/HelloService.java#L6) (`ListMetrics`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a dashboard](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L775) (`PutDashboard`)
-- [Create a metric alarm](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L661) (`PutMetricAlarm`)
-- [Create an anomaly detector](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L433) (`PutAnomalyDetector`)
-- [Delete alarms](src/main/java/com/example/cloudwatch/DeleteAlarm.java#L10) (`DeleteAlarms`)
-- [Delete an anomaly detector](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L301) (`DeleteAnomalyDetector`)
-- [Delete dashboards](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L349) (`DeleteDashboards`)
-- [Describe alarm history](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L462) (`DescribeAlarmHistory`)
-- [Describe alarms](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L637) (`DescribeAlarms`)
-- [Describe alarms for a metric](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L497) (`DescribeAlarmsForMetric`)
-- [Describe anomaly detectors](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L405) (`DescribeAnomalyDetectors`)
-- [Disable alarm actions](src/main/java/com/example/cloudwatch/DisableAlarmActions.java#L10) (`DisableAlarmActions`)
-- [Enable alarm actions](src/main/java/com/example/cloudwatch/EnableAlarmActions.java#L10) (`EnableAlarmActions`)
-- [Get a metric data image](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L365) (`GetMetricWidgetImage`)
-- [Get metric data](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L578) (`GetMetricData`)
-- [Get metric statistics](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L844) (`GetMetricStatistics`)
-- [List dashboards](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L757) (`ListDashboards`)
-- [List metrics](src/main/java/com/example/cloudwatch/ListMetrics.java#L11) (`ListMetrics`)
-- [Put data into a metric](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L532) (`PutMetricData`)
+- [Create a dashboard](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L773) (`PutDashboard`)
+- [Create a metric alarm](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L659) (`PutMetricAlarm`)
+- [Create an anomaly detector](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L431) (`PutAnomalyDetector`)
+- [Delete alarms](src/main/java/com/example/cloudwatch/DeleteAlarm.java#L6) (`DeleteAlarms`)
+- [Delete an anomaly detector](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L299) (`DeleteAnomalyDetector`)
+- [Delete dashboards](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L347) (`DeleteDashboards`)
+- [Describe alarm history](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L460) (`DescribeAlarmHistory`)
+- [Describe alarms](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L635) (`DescribeAlarms`)
+- [Describe alarms for a metric](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L495) (`DescribeAlarmsForMetric`)
+- [Describe anomaly detectors](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L403) (`DescribeAnomalyDetectors`)
+- [Disable alarm actions](src/main/java/com/example/cloudwatch/DisableAlarmActions.java#L6) (`DisableAlarmActions`)
+- [Enable alarm actions](src/main/java/com/example/cloudwatch/EnableAlarmActions.java#L6) (`EnableAlarmActions`)
+- [Get a metric data image](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L363) (`GetMetricWidgetImage`)
+- [Get metric data](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L576) (`GetMetricData`)
+- [Get metric statistics](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L843) (`GetMetricStatistics`)
+- [List dashboards](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L755) (`ListDashboards`)
+- [List metrics](src/main/java/com/example/cloudwatch/ListMetrics.java#L6) (`ListMetrics`)
+- [Put data into a metric](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L530) (`PutMetricData`)
### Scenarios
diff --git a/javav2/example_code/comprehend/Readme.md b/javav2/example_code/comprehend/Readme.md
index 8a267b1c9ae..347adb2e17a 100644
--- a/javav2/example_code/comprehend/Readme.md
+++ b/javav2/example_code/comprehend/Readme.md
@@ -33,12 +33,12 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a document classifier](src/main/java/com/example/comprehend/DocumentClassifierDemo.java#L11) (`CreateDocumentClassifier`)
-- [Detect entities in a document](src/main/java/com/example/comprehend/DetectEntities.java#L12) (`DetectEntities`)
-- [Detect key phrases in a document](src/main/java/com/example/comprehend/DetectKeyPhrases.java#L12) (`DetectKeyPhrases`)
-- [Detect syntactical elements of a document](src/main/java/com/example/comprehend/DetectSyntax.java#L11) (`DetectSyntax`)
-- [Detect the dominant language in a document](src/main/java/com/example/comprehend/DetectLanguage.java#L12) (`DetectDominantLanguage`)
-- [Detect the sentiment of a document](src/main/java/com/example/comprehend/DetectSentiment.java#L11) (`DetectSentiment`)
+- [Create a document classifier](src/main/java/com/example/comprehend/DocumentClassifierDemo.java#L6) (`CreateDocumentClassifier`)
+- [Detect entities in a document](src/main/java/com/example/comprehend/DetectEntities.java#L6) (`DetectEntities`)
+- [Detect key phrases in a document](src/main/java/com/example/comprehend/DetectKeyPhrases.java#L6) (`DetectKeyPhrases`)
+- [Detect syntactical elements of a document](src/main/java/com/example/comprehend/DetectSyntax.java#L6) (`DetectSyntax`)
+- [Detect the dominant language in a document](src/main/java/com/example/comprehend/DetectLanguage.java#L6) (`DetectDominantLanguage`)
+- [Detect the sentiment of a document](src/main/java/com/example/comprehend/DetectSentiment.java#L6) (`DetectSentiment`)
diff --git a/javav2/example_code/dynamodb/Readme.md b/javav2/example_code/dynamodb/Readme.md
index 8e5a0fc7b46..73a1029387d 100644
--- a/javav2/example_code/dynamodb/Readme.md
+++ b/javav2/example_code/dynamodb/Readme.md
@@ -31,24 +31,25 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello DynamoDB](src/main/java/com/example/dynamodb/ListTables.java#L12) (`ListTables`)
+- [Hello DynamoDB](src/main/java/com/example/dynamodb/ListTables.java#L6) (`ListTables`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a table](src/main/java/com/example/dynamodb/CreateTable.java#L12) (`CreateTable`)
-- [Delete a table](src/main/java/com/example/dynamodb/DeleteTable.java#L11) (`DeleteTable`)
-- [Delete an item from a table](src/main/java/com/example/dynamodb/DeleteItem.java#L12) (`DeleteItem`)
-- [Get an item from a table](src/main/java/com/example/dynamodb/GetItem.java#L12) (`GetItem`)
-- [Get information about a table](src/main/java/com/example/dynamodb/DescribeTable.java#L12) (`DescribeTable`)
-- [List tables](src/main/java/com/example/dynamodb/ListTables.java#L12) (`ListTables`)
-- [Put an item in a table](src/main/java/com/example/dynamodb/PutItem.java#L11) (`PutItem`)
-- [Query a table](src/main/java/com/example/dynamodb/Query.java#L11) (`Query`)
-- [Scan a table](src/main/java/com/example/dynamodb/DynamoDBScanItems.java#L11) (`Scan`)
-- [Update an item in a table](src/main/java/com/example/dynamodb/UpdateItem.java#L12) (`UpdateItem`)
-- [Write a batch of items](src/main/java/com/example/dynamodb/enhanced/EnhancedBatchWriteItems.java#L11) (`BatchWriteItem`)
+- [Create a table](src/main/java/com/example/dynamodb/CreateTable.java#L6) (`CreateTable`)
+- [Delete a table](src/main/java/com/example/dynamodb/DeleteTable.java#L6) (`DeleteTable`)
+- [Delete an item from a table](src/main/java/com/example/dynamodb/DeleteItem.java#L6) (`DeleteItem`)
+- [Get a batch of items](src/main/java/com/example/dynamodb/BatchReadItems.java#L6) (`BatchGetItem`)
+- [Get an item from a table](src/main/java/com/example/dynamodb/GetItem.java#L6) (`GetItem`)
+- [Get information about a table](src/main/java/com/example/dynamodb/DescribeTable.java#L6) (`DescribeTable`)
+- [List tables](src/main/java/com/example/dynamodb/ListTables.java#L6) (`ListTables`)
+- [Put an item in a table](src/main/java/com/example/dynamodb/PutItem.java#L6) (`PutItem`)
+- [Query a table](src/main/java/com/example/dynamodb/Query.java#L6) (`Query`)
+- [Scan a table](src/main/java/com/example/dynamodb/DynamoDBScanItems.java#L6) (`Scan`)
+- [Update an item in a table](src/main/java/com/example/dynamodb/UpdateItem.java#L6) (`UpdateItem`)
+- [Write a batch of items](src/main/java/com/example/dynamodb/BatchWriteItems.java#L6) (`BatchWriteItem`)
### Scenarios
diff --git a/javav2/example_code/ec2/Readme.md b/javav2/example_code/ec2/Readme.md
index 736041cb497..0d6ba069bb6 100644
--- a/javav2/example_code/ec2/Readme.md
+++ b/javav2/example_code/ec2/Readme.md
@@ -31,30 +31,30 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello Amazon EC2](src/main/java/com/example/ec2/DescribeSecurityGroups.java#L12) (`DescribeSecurityGroups`)
+- [Hello Amazon EC2](src/main/java/com/example/ec2/DescribeSecurityGroups.java#L6) (`DescribeSecurityGroups`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Allocate an Elastic IP address](src/main/java/com/example/ec2/AllocateAddress.java#L11) (`AllocateAddress`)
-- [Associate an Elastic IP address with an instance](src/main/java/com/example/ec2/EC2Scenario.java#L326) (`AssociateAddress`)
-- [Create a security group](src/main/java/com/example/ec2/CreateSecurityGroup.java#L11) (`CreateSecurityGroup`)
-- [Create a security key pair](src/main/java/com/example/ec2/CreateKeyPair.java#L11) (`CreateKeyPair`)
-- [Create and run an instance](src/main/java/com/example/ec2/CreateInstance.java#L12) (`RunInstances`)
-- [Delete a security group](src/main/java/com/example/ec2/DeleteSecurityGroup.java#L11) (`DeleteSecurityGroup`)
-- [Delete a security key pair](src/main/java/com/example/ec2/DeleteKeyPair.java#L12) (`DeleteKeyPair`)
-- [Describe instances](src/main/java/com/example/ec2/EC2Scenario.java#L406) (`DescribeInstances`)
-- [Disassociate an Elastic IP address from an instance](src/main/java/com/example/ec2/EC2Scenario.java#L309) (`DisassociateAddress`)
-- [Get data about a security group](src/main/java/com/example/ec2/EC2Scenario.java#L550) (`DescribeSecurityGroups`)
-- [Get data about instance types](src/main/java/com/example/ec2/EC2Scenario.java#L459) (`DescribeInstanceTypes`)
-- [List security key pairs](src/main/java/com/example/ec2/DescribeKeyPairs.java#L10) (`DescribeKeyPairs`)
-- [Release an Elastic IP address](src/main/java/com/example/ec2/ReleaseAddress.java#L11) (`ReleaseAddress`)
-- [Set inbound rules for a security group](src/main/java/com/example/ec2/EC2Scenario.java#L569) (`AuthorizeSecurityGroupIngress`)
-- [Start an instance](src/main/java/com/example/ec2/EC2Scenario.java#L361) (`StartInstances`)
-- [Stop an instance](src/main/java/com/example/ec2/EC2Scenario.java#L384) (`StopInstances`)
-- [Terminate an instance](src/main/java/com/example/ec2/TerminateInstance.java#L11) (`TerminateInstances`)
+- [Allocate an Elastic IP address](src/main/java/com/example/ec2/AllocateAddress.java#L6) (`AllocateAddress`)
+- [Associate an Elastic IP address with an instance](src/main/java/com/example/ec2/EC2Scenario.java#L325) (`AssociateAddress`)
+- [Create a security group](src/main/java/com/example/ec2/CreateSecurityGroup.java#L6) (`CreateSecurityGroup`)
+- [Create a security key pair](src/main/java/com/example/ec2/CreateKeyPair.java#L6) (`CreateKeyPair`)
+- [Create and run an instance](src/main/java/com/example/ec2/CreateInstance.java#L6) (`RunInstances`)
+- [Delete a security group](src/main/java/com/example/ec2/DeleteSecurityGroup.java#L6) (`DeleteSecurityGroup`)
+- [Delete a security key pair](src/main/java/com/example/ec2/DeleteKeyPair.java#L6) (`DeleteKeyPair`)
+- [Describe instances](src/main/java/com/example/ec2/EC2Scenario.java#L405) (`DescribeInstances`)
+- [Disassociate an Elastic IP address from an instance](src/main/java/com/example/ec2/EC2Scenario.java#L308) (`DisassociateAddress`)
+- [Get data about a security group](src/main/java/com/example/ec2/EC2Scenario.java#L552) (`DescribeSecurityGroups`)
+- [Get data about instance types](src/main/java/com/example/ec2/EC2Scenario.java#L461) (`DescribeInstanceTypes`)
+- [List security key pairs](src/main/java/com/example/ec2/DescribeKeyPairs.java#L6) (`DescribeKeyPairs`)
+- [Release an Elastic IP address](src/main/java/com/example/ec2/ReleaseAddress.java#L6) (`ReleaseAddress`)
+- [Set inbound rules for a security group](src/main/java/com/example/ec2/EC2Scenario.java#L572) (`AuthorizeSecurityGroupIngress`)
+- [Start an instance](src/main/java/com/example/ec2/EC2Scenario.java#L360) (`StartInstances`)
+- [Stop an instance](src/main/java/com/example/ec2/EC2Scenario.java#L383) (`StopInstances`)
+- [Terminate an instance](src/main/java/com/example/ec2/TerminateInstance.java#L6) (`TerminateInstances`)
### Scenarios
diff --git a/javav2/example_code/ecs/Readme.md b/javav2/example_code/ecs/Readme.md
index 5d6932e3859..888de46dfd3 100644
--- a/javav2/example_code/ecs/Readme.md
+++ b/javav2/example_code/ecs/Readme.md
@@ -33,13 +33,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a cluster](src/main/java/com/example/ecs/CreateCluster.java#L12) (`CreateCluster`)
-- [Create a service](src/main/java/com/example/ecs/CreateService.java#L12) (`CreateService`)
-- [Delete a service](src/main/java/com/example/ecs/DeleteService.java#L12) (`DeleteService`)
-- [Describe clusters](src/main/java/com/example/ecs/DescribeClusters.java#L12) (`DescribeClusters`)
-- [Describe tasks](src/main/java/com/example/ecs/ListTaskDefinitions.java#L11) (`DescribeTasks`)
-- [List clusters](src/main/java/com/example/ecs/ListClusters.java#L11) (`ListClusters`)
-- [Update a service](src/main/java/com/example/ecs/UpdateService.java#L11) (`UpdateService`)
+- [Create a cluster](src/main/java/com/example/ecs/CreateCluster.java#L6) (`CreateCluster`)
+- [Create a service](src/main/java/com/example/ecs/CreateService.java#L6) (`CreateService`)
+- [Delete a service](src/main/java/com/example/ecs/DeleteService.java#L6) (`DeleteService`)
+- [Describe clusters](src/main/java/com/example/ecs/DescribeClusters.java#L6) (`DescribeClusters`)
+- [Describe tasks](src/main/java/com/example/ecs/ListTaskDefinitions.java#L6) (`DescribeTasks`)
+- [List clusters](src/main/java/com/example/ecs/ListClusters.java#L6) (`ListClusters`)
+- [Update a service](src/main/java/com/example/ecs/UpdateService.java#L6) (`UpdateService`)
diff --git a/javav2/example_code/eventbridge/Readme.md b/javav2/example_code/eventbridge/Readme.md
index 86585a4066a..8f54b0ac1a5 100644
--- a/javav2/example_code/eventbridge/Readme.md
+++ b/javav2/example_code/eventbridge/Readme.md
@@ -31,24 +31,24 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello EventBridge](src/main/java/com/example/eventbridge/HelloEventBridge.java#L22) (`ListEventBuses`)
+- [Hello EventBridge](src/main/java/com/example/eventbridge/HelloEventBridge.java#L16) (`ListEventBuses`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add a target](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L601) (`PutTargets`)
-- [Create a rule](src/main/java/com/example/eventbridge/CreateRuleSchedule.java#L66) (`PutRule`)
-- [Delete a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L371) (`DeleteRule`)
-- [Describe a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L505) (`DescribeRule`)
-- [Disable a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L522) (`DisableRule`)
-- [Enable a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L522) (`EnableRule`)
-- [List rule names for a target](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L573) (`ListRuleNamesByTarget`)
-- [List rules](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L641) (`ListRules`)
-- [List targets for a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L587) (`ListTargetsByRule`)
-- [Remove targets from a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L382) (`RemoveTargets`)
-- [Send events](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L405) (`PutEvents`)
+- [Add a target](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L605) (`PutTargets`)
+- [Create a rule](src/main/java/com/example/eventbridge/CreateRuleSchedule.java#L60) (`PutRule`)
+- [Delete a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L374) (`DeleteRule`)
+- [Describe a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L509) (`DescribeRule`)
+- [Disable a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L526) (`DisableRule`)
+- [Enable a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L526) (`EnableRule`)
+- [List rule names for a target](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L577) (`ListRuleNamesByTarget`)
+- [List rules](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L649) (`ListRules`)
+- [List targets for a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L591) (`ListTargetsByRule`)
+- [Remove targets from a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L385) (`RemoveTargets`)
+- [Send events](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L408) (`PutEvents`)
### Scenarios
diff --git a/javav2/example_code/forecast/Readme.md b/javav2/example_code/forecast/Readme.md
index 6322d941259..d9b7114f0f4 100644
--- a/javav2/example_code/forecast/Readme.md
+++ b/javav2/example_code/forecast/Readme.md
@@ -33,13 +33,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a data set](src/main/java/com/example/forecast/CreateDataSet.java#L11) (`CreateDataset`)
-- [Create a forecast](src/main/java/com/example/forecast/CreateForecast.java#L11) (`CreateForecast`)
-- [Delete a data set](src/main/java/com/example/forecast/DeleteDataset.java#L12) (`DeleteDataset`)
-- [Delete a forecast](src/main/java/com/example/forecast/DeleteDataset.java#L12) (`DeleteForecast`)
-- [Describe a forecast](src/main/java/com/example/forecast/DescribeForecast.java#L12) (`DescribeForecast`)
-- [List data set groups](src/main/java/com/example/forecast/ListDataSetGroups.java#L12) (`ListDatasetGroups`)
-- [List forecasts](src/main/java/com/example/forecast/ListForecasts.java#L12) (`ListForecasts`)
+- [Create a data set](src/main/java/com/example/forecast/CreateDataSet.java#L6) (`CreateDataset`)
+- [Create a forecast](src/main/java/com/example/forecast/CreateForecast.java#L6) (`CreateForecast`)
+- [Delete a data set](src/main/java/com/example/forecast/DeleteDataset.java#L6) (`DeleteDataset`)
+- [Delete a forecast](src/main/java/com/example/forecast/DeleteDataset.java#L6) (`DeleteForecast`)
+- [Describe a forecast](src/main/java/com/example/forecast/DescribeForecast.java#L6) (`DescribeForecast`)
+- [List data set groups](src/main/java/com/example/forecast/ListDataSetGroups.java#L6) (`ListDatasetGroups`)
+- [List forecasts](src/main/java/com/example/forecast/ListForecasts.java#L6) (`ListForecasts`)
diff --git a/javav2/example_code/glacier/Readme.md b/javav2/example_code/glacier/Readme.md
index da3985b0926..95422a99c8a 100644
--- a/javav2/example_code/glacier/Readme.md
+++ b/javav2/example_code/glacier/Readme.md
@@ -33,12 +33,12 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a vault](src/main/java/com/example/glacier/CreateVault.java#L11) (`CreateVault`)
-- [Delete a vault](src/main/java/com/example/glacier/DeleteVault.java#L11) (`DeleteVault`)
-- [Delete an archive](src/main/java/com/example/glacier/DeleteArchive.java#L11) (`DeleteArchive`)
-- [List vaults](src/main/java/com/example/glacier/ListVaults.java#L10) (`ListVaults`)
-- [Retrieve a vault inventory](src/main/java/com/example/glacier/ArchiveDownload.java#L12) (`InitiateJob`)
-- [Upload an archive to a vault](src/main/java/com/example/glacier/UploadArchive.java#L11) (`UploadArchive`)
+- [Create a vault](src/main/java/com/example/glacier/CreateVault.java#L6) (`CreateVault`)
+- [Delete a vault](src/main/java/com/example/glacier/DeleteVault.java#L6) (`DeleteVault`)
+- [Delete an archive](src/main/java/com/example/glacier/DeleteArchive.java#L6) (`DeleteArchive`)
+- [List vaults](src/main/java/com/example/glacier/ListVaults.java#L6) (`ListVaults`)
+- [Retrieve a vault inventory](src/main/java/com/example/glacier/ArchiveDownload.java#L6) (`InitiateJob`)
+- [Upload an archive to a vault](src/main/java/com/example/glacier/UploadArchive.java#L6) (`UploadArchive`)
diff --git a/javav2/example_code/glue/Readme.md b/javav2/example_code/glue/Readme.md
index 1af1a9f018f..ddaab0952e7 100644
--- a/javav2/example_code/glue/Readme.md
+++ b/javav2/example_code/glue/Readme.md
@@ -31,18 +31,18 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello AWS Glue](src/main/java/com/example/glue/HelloGlue.java#L9) (`ListJobs`)
+- [Hello AWS Glue](src/main/java/com/example/glue/HelloGlue.java#L4) (`ListJobs`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a crawler](src/main/java/com/example/glue/CreateCrawler.java#L12) (`CreateCrawler`)
-- [Get a crawler](src/main/java/com/example/glue/GetCrawler.java#L11) (`GetCrawler`)
-- [Get a database from the Data Catalog](src/main/java/com/example/glue/GetDatabase.java#L11) (`GetDatabase`)
-- [Get tables from a database](src/main/java/com/example/glue/GetTable.java#L11) (`GetTables`)
-- [Start a crawler](src/main/java/com/example/glue/StartCrawler.java#L11) (`StartCrawler`)
+- [Create a crawler](src/main/java/com/example/glue/CreateCrawler.java#L6) (`CreateCrawler`)
+- [Get a crawler](src/main/java/com/example/glue/GetCrawler.java#L6) (`GetCrawler`)
+- [Get a database from the Data Catalog](src/main/java/com/example/glue/GetDatabase.java#L6) (`GetDatabase`)
+- [Get tables from a database](src/main/java/com/example/glue/GetTable.java#L6) (`GetTables`)
+- [Start a crawler](src/main/java/com/example/glue/StartCrawler.java#L6) (`StartCrawler`)
### Scenarios
diff --git a/javav2/example_code/iam/Readme.md b/javav2/example_code/iam/Readme.md
index 80a8d261a58..e156845d2c7 100644
--- a/javav2/example_code/iam/Readme.md
+++ b/javav2/example_code/iam/Readme.md
@@ -31,29 +31,29 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello IAM](src/main/java/com/example/iam/HelloIAM.java#L11) (`ListPolicies`)
+- [Hello IAM](src/main/java/com/example/iam/HelloIAM.java#L6) (`ListPolicies`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Attach a policy to a role](src/main/java/com/example/iam/AttachRolePolicy.java#L11) (`AttachRolePolicy`)
-- [Create a policy](src/main/java/com/example/iam/CreatePolicy.java#L11) (`CreatePolicy`)
-- [Create a role](src/main/java/com/example/iam/CreateRole.java#L12) (`CreateRole`)
-- [Create a user](src/main/java/com/example/iam/CreateUser.java#L11) (`CreateUser`)
-- [Create an access key](src/main/java/com/example/iam/CreateAccessKey.java#L11) (`CreateAccessKey`)
-- [Create an alias for an account](src/main/java/com/example/iam/CreateAccountAlias.java#L11) (`CreateAccountAlias`)
-- [Delete a policy](src/main/java/com/example/iam/DeletePolicy.java#L11) (`DeletePolicy`)
-- [Delete a user](src/main/java/com/example/iam/DeleteUser.java#L11) (`DeleteUser`)
-- [Delete an access key](src/main/java/com/example/iam/DeleteAccessKey.java#L11) (`DeleteAccessKey`)
-- [Delete an account alias](src/main/java/com/example/iam/DeleteAccountAlias.java#L11) (`DeleteAccountAlias`)
-- [Detach a policy from a role](src/main/java/com/example/iam/DetachRolePolicy.java#L10) (`DetachRolePolicy`)
-- [List a user's access keys](src/main/java/com/example/iam/ListAccessKeys.java#L10) (`ListAccessKeys`)
-- [List account aliases](src/main/java/com/example/iam/ListAccountAliases.java#L11) (`ListAccountAliases`)
-- [List users](src/main/java/com/example/iam/ListUsers.java#L11) (`ListUsers`)
-- [Update a user](src/main/java/com/example/iam/UpdateUser.java#L11) (`UpdateUser`)
-- [Update an access key](src/main/java/com/example/iam/UpdateAccessKey.java#L11) (`UpdateAccessKey`)
+- [Attach a policy to a role](src/main/java/com/example/iam/AttachRolePolicy.java#L6) (`AttachRolePolicy`)
+- [Create a policy](src/main/java/com/example/iam/CreatePolicy.java#L6) (`CreatePolicy`)
+- [Create a role](src/main/java/com/example/iam/CreateRole.java#L6) (`CreateRole`)
+- [Create a user](src/main/java/com/example/iam/CreateUser.java#L6) (`CreateUser`)
+- [Create an access key](src/main/java/com/example/iam/CreateAccessKey.java#L6) (`CreateAccessKey`)
+- [Create an alias for an account](src/main/java/com/example/iam/CreateAccountAlias.java#L6) (`CreateAccountAlias`)
+- [Delete a policy](src/main/java/com/example/iam/DeletePolicy.java#L6) (`DeletePolicy`)
+- [Delete a user](src/main/java/com/example/iam/DeleteUser.java#L6) (`DeleteUser`)
+- [Delete an access key](src/main/java/com/example/iam/DeleteAccessKey.java#L6) (`DeleteAccessKey`)
+- [Delete an account alias](src/main/java/com/example/iam/DeleteAccountAlias.java#L6) (`DeleteAccountAlias`)
+- [Detach a policy from a role](src/main/java/com/example/iam/DetachRolePolicy.java#L6) (`DetachRolePolicy`)
+- [List a user's access keys](src/main/java/com/example/iam/ListAccessKeys.java#L6) (`ListAccessKeys`)
+- [List account aliases](src/main/java/com/example/iam/ListAccountAliases.java#L6) (`ListAccountAliases`)
+- [List users](src/main/java/com/example/iam/ListUsers.java#L6) (`ListUsers`)
+- [Update a user](src/main/java/com/example/iam/UpdateUser.java#L6) (`UpdateUser`)
+- [Update an access key](src/main/java/com/example/iam/UpdateAccessKey.java#L6) (`UpdateAccessKey`)
### Scenarios
diff --git a/javav2/example_code/keyspaces/Readme.md b/javav2/example_code/keyspaces/Readme.md
index 93c631fd8df..f808c17564c 100644
--- a/javav2/example_code/keyspaces/Readme.md
+++ b/javav2/example_code/keyspaces/Readme.md
@@ -31,23 +31,23 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello Amazon Keyspaces](src/main/java/com/example/keyspace/HelloKeyspaces.java#L13) (`ListKeyspaces`)
+- [Hello Amazon Keyspaces](src/main/java/com/example/keyspace/HelloKeyspaces.java#L6) (`ListKeyspaces`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L607) (`CreateKeyspace`)
-- [Create a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L501) (`CreateTable`)
-- [Delete a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L233) (`DeleteKeyspace`)
-- [Delete a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L272) (`DeleteTable`)
-- [Get data about a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L589) (`GetKeyspace`)
-- [Get data about a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L466) (`GetTable`)
-- [List keyspaces](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L570) (`ListKeyspaces`)
-- [List tables in a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L446) (`ListTables`)
+- [Create a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L611) (`CreateKeyspace`)
+- [Create a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L505) (`CreateTable`)
+- [Delete a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L230) (`DeleteKeyspace`)
+- [Delete a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L271) (`DeleteTable`)
+- [Get data about a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L593) (`GetKeyspace`)
+- [Get data about a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L469) (`GetTable`)
+- [List keyspaces](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L574) (`ListKeyspaces`)
+- [List tables in a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L449) (`ListTables`)
- [Restore a table to a point in time](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L322) (`RestoreTable`)
-- [Update a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L367) (`UpdateTable`)
+- [Update a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L369) (`UpdateTable`)
### Scenarios
diff --git a/javav2/example_code/kinesis/Readme.md b/javav2/example_code/kinesis/Readme.md
index 58149704824..dbf914eb23f 100644
--- a/javav2/example_code/kinesis/Readme.md
+++ b/javav2/example_code/kinesis/Readme.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a stream](src/main/java/com/example/kinesis/CreateDataStream.java#L11) (`CreateStream`)
-- [Delete a stream](src/main/java/com/example/kinesis/DeleteDataStream.java#L11) (`DeleteStream`)
-- [Get data in batches from a stream](src/main/java/com/example/kinesis/GetRecords.java#L11) (`GetRecords`)
-- [Put data into a stream](src/main/java/com/example/kinesis/StockTradesWriter.java#L12) (`PutRecord`)
+- [Create a stream](src/main/java/com/example/kinesis/CreateDataStream.java#L6) (`CreateStream`)
+- [Delete a stream](src/main/java/com/example/kinesis/DeleteDataStream.java#L6) (`DeleteStream`)
+- [Get data in batches from a stream](src/main/java/com/example/kinesis/GetRecords.java#L6) (`GetRecords`)
+- [Put data into a stream](src/main/java/com/example/kinesis/StockTradesWriter.java#L6) (`PutRecord`)
diff --git a/javav2/example_code/kms/Readme.md b/javav2/example_code/kms/Readme.md
index ef32072084a..fb9476a441d 100644
--- a/javav2/example_code/kms/Readme.md
+++ b/javav2/example_code/kms/Readme.md
@@ -33,17 +33,17 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a grant for a key](src/main/java/com/example/kms/CreateGrant.java#L11) (`CreateGrant`)
-- [Create a key](src/main/java/com/example/kms/CreateCustomerKey.java#L12) (`CreateKey`)
-- [Create an alias for a key](src/main/java/com/example/kms/CreateAlias.java#L12) (`CreateAlias`)
-- [Decrypt ciphertext](src/main/java/com/example/kms/EncryptDataKey.java#L83) (`Decrypt`)
-- [Describe a key](src/main/java/com/example/kms/DescribeKey.java#L12) (`DescribeKey`)
-- [Disable a key](src/main/java/com/example/kms/DisableCustomerKey.java#L12) (`DisableKey`)
-- [Enable a key](src/main/java/com/example/kms/EnableCustomerKey.java#L11) (`EnableKey`)
-- [Encrypt text using a key](src/main/java/com/example/kms/EncryptDataKey.java#L12) (`Encrypt`)
-- [List aliases for a key](src/main/java/com/example/kms/ListAliases.java#L12) (`ListAliases`)
-- [List grants for a key](src/main/java/com/example/kms/ListGrants.java#L11) (`ListGrants`)
-- [List keys](src/main/java/com/example/kms/ListKeys.java#L12) (`ListKeys`)
+- [Create a grant for a key](src/main/java/com/example/kms/CreateGrant.java#L6) (`CreateGrant`)
+- [Create a key](src/main/java/com/example/kms/CreateCustomerKey.java#L6) (`CreateKey`)
+- [Create an alias for a key](src/main/java/com/example/kms/CreateAlias.java#L6) (`CreateAlias`)
+- [Decrypt ciphertext](src/main/java/com/example/kms/EncryptDataKey.java#L78) (`Decrypt`)
+- [Describe a key](src/main/java/com/example/kms/DescribeKey.java#L6) (`DescribeKey`)
+- [Disable a key](src/main/java/com/example/kms/DisableCustomerKey.java#L6) (`DisableKey`)
+- [Enable a key](src/main/java/com/example/kms/EnableCustomerKey.java#L6) (`EnableKey`)
+- [Encrypt text using a key](src/main/java/com/example/kms/EncryptDataKey.java#L6) (`Encrypt`)
+- [List aliases for a key](src/main/java/com/example/kms/ListAliases.java#L6) (`ListAliases`)
+- [List grants for a key](src/main/java/com/example/kms/ListGrants.java#L6) (`ListGrants`)
+- [List keys](src/main/java/com/example/kms/ListKeys.java#L6) (`ListKeys`)
diff --git a/javav2/example_code/lambda/Readme.md b/javav2/example_code/lambda/Readme.md
index d7433c31c80..f4f36d3cec4 100644
--- a/javav2/example_code/lambda/Readme.md
+++ b/javav2/example_code/lambda/Readme.md
@@ -31,16 +31,16 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello Lambda](src/main/java/com/example/lambda/ListLambdaFunctions.java#L10) (`ListFunctions`)
+- [Hello Lambda](src/main/java/com/example/lambda/ListLambdaFunctions.java#L4) (`ListFunctions`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a function](src/main/java/com/example/lambda/CreateFunction.java#L12) (`CreateFunction`)
-- [Delete a function](src/main/java/com/example/lambda/DeleteFunction.java#L14) (`DeleteFunction`)
-- [Invoke a function](src/main/java/com/example/lambda/LambdaInvoke.java#L14) (`Invoke`)
+- [Create a function](src/main/java/com/example/lambda/CreateFunction.java#L6) (`CreateFunction`)
+- [Delete a function](src/main/java/com/example/lambda/DeleteFunction.java#L7) (`DeleteFunction`)
+- [Invoke a function](src/main/java/com/example/lambda/LambdaInvoke.java#L7) (`Invoke`)
### Scenarios
diff --git a/javav2/example_code/mediaconvert/Readme.md b/javav2/example_code/mediaconvert/Readme.md
index f9baa21a291..8fb2c7e6304 100644
--- a/javav2/example_code/mediaconvert/Readme.md
+++ b/javav2/example_code/mediaconvert/Readme.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a transcoding job](src/main/java/com/example/mediaconvert/CreateJob.java#L9) (`CreateJob`)
-- [Get a transcoding job](src/main/java/com/example/mediaconvert/GetJob.java#L12) (`GetJob`)
-- [List transcoding jobs](src/main/java/com/example/mediaconvert/ListJobs.java#L12) (`ListJobs`)
+- [Create a transcoding job](src/main/java/com/example/mediaconvert/CreateJob.java#L4) (`CreateJob`)
+- [Get a transcoding job](src/main/java/com/example/mediaconvert/GetJob.java#L6) (`GetJob`)
+- [List transcoding jobs](src/main/java/com/example/mediaconvert/ListJobs.java#L6) (`ListJobs`)
diff --git a/javav2/example_code/mediastore/Readme.md b/javav2/example_code/mediastore/Readme.md
index c7adfe76a69..f4a90752b62 100644
--- a/javav2/example_code/mediastore/Readme.md
+++ b/javav2/example_code/mediastore/Readme.md
@@ -33,13 +33,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a container](src/main/java/com/example/mediastore/CreateContainer.java#L12) (`CreateContainer`)
-- [Delete a container](src/main/java/com/example/mediastore/CreateContainer.java#L12) (`DeleteContainer`)
-- [Delete an object](src/main/java/com/example/mediastore/DeleteObject.java#L12) (`DeleteObject`)
-- [Describe a container](src/main/java/com/example/mediastore/DescribeContainer.java#L12) (`DescribeContainer`)
-- [Get an object](src/main/java/com/example/mediastore/GetObject.java#L12) (`GetObject`)
-- [List containers](src/main/java/com/example/mediastore/ListContainers.java#L12) (`ListContainers`)
-- [Put an object into a container](src/main/java/com/example/mediastore/PutObject.java#L12) (`PutObject`)
+- [Create a container](src/main/java/com/example/mediastore/CreateContainer.java#L6) (`CreateContainer`)
+- [Delete a container](src/main/java/com/example/mediastore/CreateContainer.java#L6) (`DeleteContainer`)
+- [Delete an object](src/main/java/com/example/mediastore/DeleteObject.java#L6) (`DeleteObject`)
+- [Describe a container](src/main/java/com/example/mediastore/DescribeContainer.java#L6) (`DescribeContainer`)
+- [Get an object](src/main/java/com/example/mediastore/GetObject.java#L6) (`GetObject`)
+- [List containers](src/main/java/com/example/mediastore/ListContainers.java#L6) (`ListContainers`)
+- [Put an object into a container](src/main/java/com/example/mediastore/PutObject.java#L6) (`PutObject`)
diff --git a/javav2/example_code/medicalimaging/README.md b/javav2/example_code/medicalimaging/README.md
index 34a5bee2bbf..2ea66198256 100644
--- a/javav2/example_code/medicalimaging/README.md
+++ b/javav2/example_code/medicalimaging/README.md
@@ -33,24 +33,24 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Add a tag to a resource](src/main/java/com/example/medicalimaging/TagResource.java#L60) (`TagResource`)
-- [Copy an image set](src/main/java/com/example/medicalimaging/CopyImageSet.java#L70) (`CopyImageSet`)
-- [Create a data store](src/main/java/com/example/medicalimaging/CreateDatastore.java#L57) (`CreateDatastore`)
-- [Delete a data store](src/main/java/com/example/medicalimaging/DeleteDatastore.java#L55) (`DeleteDatastore`)
-- [Delete an image set](src/main/java/com/example/medicalimaging/DeleteImageSet.java#L58) (`DeleteImageSet`)
-- [Get an image frame](src/main/java/com/example/medicalimaging/GetImageFrame.java#L67) (`GetImageFrame`)
-- [Get data store properties](src/main/java/com/example/medicalimaging/GetDatastore.java#L60) (`GetDatastore`)
-- [Get image set properties](src/main/java/com/example/medicalimaging/GetImageSet.java#L68) (`GetImageSet`)
-- [Get import job properties](src/main/java/com/example/medicalimaging/GetDicomImportJob.java#L84) (`GetDICOMImportJob`)
-- [Get metadata for an image set](src/main/java/com/example/medicalimaging/GetImageSet.java#L68) (`GetImageSetMetadata`)
-- [Import bulk data into a data store](src/main/java/com/example/medicalimaging/StartDicomImportJob.java#L67) (`StartDICOMImportJob`)
-- [List data stores](src/main/java/com/example/medicalimaging/ListDatastores.java#L51) (`ListDatastores`)
-- [List image set versions](src/main/java/com/example/medicalimaging/ListImageSetVersions.java#L66) (`ListImageSetVersions`)
-- [List import jobs for a data store](src/main/java/com/example/medicalimaging/ListDicomImportJobs.java#L63) (`ListDICOMImportJobs`)
-- [List tags for a resource](src/main/java/com/example/medicalimaging/ListTagsForResource.java#L61) (`ListTagsForResource`)
-- [Remove a tag from a resource](src/main/java/com/example/medicalimaging/UntagResource.java#L60) (`UntagResource`)
-- [Search image sets](src/main/java/com/example/medicalimaging/SearchImageSets.java#L128) (`SearchImageSets`)
-- [Update image set metadata](src/main/java/com/example/medicalimaging/UpdateImageSetMetadata.java#L78) (`UpdateImageSetMetadata`)
+- [Add a tag to a resource](src/main/java/com/example/medicalimaging/TagResource.java#L54) (`TagResource`)
+- [Copy an image set](src/main/java/com/example/medicalimaging/CopyImageSet.java#L65) (`CopyImageSet`)
+- [Create a data store](src/main/java/com/example/medicalimaging/CreateDatastore.java#L52) (`CreateDatastore`)
+- [Delete a data store](src/main/java/com/example/medicalimaging/DeleteDatastore.java#L50) (`DeleteDatastore`)
+- [Delete an image set](src/main/java/com/example/medicalimaging/DeleteImageSet.java#L53) (`DeleteImageSet`)
+- [Get an image frame](src/main/java/com/example/medicalimaging/GetImageFrame.java#L61) (`GetImageFrame`)
+- [Get data store properties](src/main/java/com/example/medicalimaging/GetDatastore.java#L55) (`GetDatastore`)
+- [Get image set properties](src/main/java/com/example/medicalimaging/GetImageSet.java#L62) (`GetImageSet`)
+- [Get import job properties](src/main/java/com/example/medicalimaging/GetDicomImportJob.java#L79) (`GetDICOMImportJob`)
+- [Get metadata for an image set](src/main/java/com/example/medicalimaging/GetImageSetMetadata.java#L63) (`GetImageSetMetadata`)
+- [Import bulk data into a data store](src/main/java/com/example/medicalimaging/StartDicomImportJob.java#L65) (`StartDICOMImportJob`)
+- [List data stores](src/main/java/com/example/medicalimaging/ListDatastores.java#L46) (`ListDatastores`)
+- [List image set versions](src/main/java/com/example/medicalimaging/ListImageSetVersions.java#L61) (`ListImageSetVersions`)
+- [List import jobs for a data store](src/main/java/com/example/medicalimaging/ListDicomImportJobs.java#L58) (`ListDICOMImportJobs`)
+- [List tags for a resource](src/main/java/com/example/medicalimaging/ListTagsForResource.java#L56) (`ListTagsForResource`)
+- [Remove a tag from a resource](src/main/java/com/example/medicalimaging/UntagResource.java#L54) (`UntagResource`)
+- [Search image sets](src/main/java/com/example/medicalimaging/SearchImageSets.java#L130) (`SearchImageSets`)
+- [Update image set metadata](src/main/java/com/example/medicalimaging/UpdateImageSetMetadata.java#L75) (`UpdateImageSetMetadata`)
### Scenarios
@@ -79,24 +79,24 @@ functions within the same service.
This example shows you how to tag a HealthImaging data store.
-
-
+
+
-
-
+
+
#### Tagging an image set
This example shows you how to tag a HealthImaging image set.
-
-
+
+
-
-
+
+
### Tests
diff --git a/javav2/example_code/opensearch/Readme.md b/javav2/example_code/opensearch/Readme.md
index 30937e233a3..ddde5591a8d 100644
--- a/javav2/example_code/opensearch/Readme.md
+++ b/javav2/example_code/opensearch/Readme.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a domain](src/main/java/com/example/search/CreateDomain.java#L11) (`CreateDomain`)
-- [Delete a domain](src/main/java/com/example/search/DeleteDomain.java#L12) (`DeleteDomain`)
-- [List domains](src/main/java/com/example/search/ListDomainNames.java#L11) (`ListDomainNames`)
-- [Modify a cluster configuration](src/main/java/com/example/search/UpdateDomain.java#L12) (`UpdateDomainConfig`)
+- [Create a domain](src/main/java/com/example/search/CreateDomain.java#L6) (`CreateDomain`)
+- [Delete a domain](src/main/java/com/example/search/DeleteDomain.java#L6) (`DeleteDomain`)
+- [List domains](src/main/java/com/example/search/ListDomainNames.java#L6) (`ListDomainNames`)
+- [Modify a cluster configuration](src/main/java/com/example/search/UpdateDomain.java#L6) (`UpdateDomainConfig`)
diff --git a/javav2/example_code/personalize/Readme.md b/javav2/example_code/personalize/Readme.md
index 623b9a05a1e..827543f7bf1 100644
--- a/javav2/example_code/personalize/Readme.md
+++ b/javav2/example_code/personalize/Readme.md
@@ -33,30 +33,30 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a batch interface job](src/main/java/com/example/personalize/CreateBatchInferenceJob.java#L74) (`CreateBatchInferenceJob`)
-- [Create a campaign](src/main/java/com/example/personalize/CreateCampaign.java#L59) (`CreateCampaign`)
-- [Create a dataset](src/main/java/com/example/personalize/CreateDataset.java#L55) (`CreateDataset`)
-- [Create a dataset export job](src/main/java/com/example/personalize/CreateDatasetExportJob.java#L78) (`CreateDatasetExportJob`)
-- [Create a dataset group](src/main/java/com/example/personalize/CreateDatasetGroup.java#L59) (`CreateDatasetGroup`)
-- [Create a dataset import job](src/main/java/com/example/personalize/CreateDatasetImportJob.java#L68) (`CreateDatasetImportJob`)
-- [Create a domain schema](src/main/java/com/example/personalize/CreateDomainSchema.java#L65) (`CreateSchema`)
-- [Create a filter](src/main/java/com/example/personalize/CreateFilter.java#L59) (`CreateFilter`)
-- [Create a recommender](src/main/java/com/example/personalize/CreateRecommender.java#L70) (`CreateRecommender`)
-- [Create a schema](src/main/java/com/example/personalize/CreateSchema.java#L63) (`CreateSchema`)
-- [Create a solution](src/main/java/com/example/personalize/CreateSolution.java#L64) (`CreateSolution`)
-- [Create a solution version](src/main/java/com/example/personalize/CreateSolutionVersion.java#L57) (`CreateSolutionVersion`)
-- [Create an event tracker](src/main/java/com/example/personalize/CreateEventTracker.java#L59) (`CreateEventTracker`)
-- [Delete a campaign](src/main/java/com/example/personalize/DeleteCampaign.java#L55) (`DeleteCampaign`)
-- [Delete a solution](src/main/java/com/example/personalize/DeleteSolution.java#L54) (`DeleteSolution`)
-- [Delete an event tracker](src/main/java/com/example/personalize/DeleteEventTracker.java#L34) (`DeleteEventTracker`)
-- [Describe a campaign](src/main/java/com/example/personalize/DescribeCampaign.java#L56) (`DescribeCampaign`)
-- [Describe a recipe](src/main/java/com/example/personalize/DescribeRecipe.java#L55) (`DescribeRecipe`)
-- [Describe a solution](src/main/java/com/example/personalize/DescribeSolution.java#L56) (`DescribeSolution`)
-- [List campaigns](src/main/java/com/example/personalize/ListCampaigns.java#L57) (`ListCampaigns`)
-- [List dataset groups](src/main/java/com/example/personalize/ListDatasetGroups.java#L41) (`ListDatasetGroups`)
-- [List recipes](src/main/java/com/example/personalize/ListRecipes.java#L41) (`ListRecipes`)
-- [List solutions](src/main/java/com/example/personalize/ListSolutions.java#L57) (`ListSolutions`)
-- [Update a campaign](src/main/java/com/example/personalize/UpdateCampaign.java#L61) (`UpdateCampaign`)
+- [Create a batch interface job](src/main/java/com/example/personalize/CreateBatchInferenceJob.java#L69) (`CreateBatchInferenceJob`)
+- [Create a campaign](src/main/java/com/example/personalize/CreateCampaign.java#L54) (`CreateCampaign`)
+- [Create a dataset](src/main/java/com/example/personalize/CreateDataset.java#L49) (`CreateDataset`)
+- [Create a dataset export job](src/main/java/com/example/personalize/CreateDatasetExportJob.java#L66) (`CreateDatasetExportJob`)
+- [Create a dataset group](src/main/java/com/example/personalize/CreateDatasetGroup.java#L49) (`CreateDatasetGroup`)
+- [Create a dataset import job](src/main/java/com/example/personalize/CreateDatasetImportJob.java#L57) (`CreateDatasetImportJob`)
+- [Create a domain schema](src/main/java/com/example/personalize/CreateDomainSchema.java#L54) (`CreateSchema`)
+- [Create a filter](src/main/java/com/example/personalize/CreateFilter.java#L50) (`CreateFilter`)
+- [Create a recommender](src/main/java/com/example/personalize/CreateRecommender.java#L60) (`CreateRecommender`)
+- [Create a schema](src/main/java/com/example/personalize/CreateSchema.java#L52) (`CreateSchema`)
+- [Create a solution](src/main/java/com/example/personalize/CreateSolution.java#L59) (`CreateSolution`)
+- [Create a solution version](src/main/java/com/example/personalize/CreateSolutionVersion.java#L47) (`CreateSolutionVersion`)
+- [Create an event tracker](src/main/java/com/example/personalize/CreateEventTracker.java#L50) (`CreateEventTracker`)
+- [Delete a campaign](src/main/java/com/example/personalize/DeleteCampaign.java#L50) (`DeleteCampaign`)
+- [Delete a solution](src/main/java/com/example/personalize/DeleteSolution.java#L49) (`DeleteSolution`)
+- [Delete an event tracker](src/main/java/com/example/personalize/DeleteEventTracker.java#L26) (`DeleteEventTracker`)
+- [Describe a campaign](src/main/java/com/example/personalize/DescribeCampaign.java#L52) (`DescribeCampaign`)
+- [Describe a recipe](src/main/java/com/example/personalize/DescribeRecipe.java#L50) (`DescribeRecipe`)
+- [Describe a solution](src/main/java/com/example/personalize/DescribeSolution.java#L51) (`DescribeSolution`)
+- [List campaigns](src/main/java/com/example/personalize/ListCampaigns.java#L53) (`ListCampaigns`)
+- [List dataset groups](src/main/java/com/example/personalize/ListDatasetGroups.java#L36) (`ListDatasetGroups`)
+- [List recipes](src/main/java/com/example/personalize/ListRecipes.java#L36) (`ListRecipes`)
+- [List solutions](src/main/java/com/example/personalize/ListSolutions.java#L53) (`ListSolutions`)
+- [Update a campaign](src/main/java/com/example/personalize/UpdateCampaign.java#L50) (`UpdateCampaign`)
diff --git a/javav2/example_code/pinpoint/Readme.md b/javav2/example_code/pinpoint/Readme.md
index 45654eb1976..7f9dc2dcc03 100644
--- a/javav2/example_code/pinpoint/Readme.md
+++ b/javav2/example_code/pinpoint/Readme.md
@@ -33,19 +33,19 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a campaign](src/main/java/com/example/pinpoint/CreateCampaign.java#L12) (`CreateCampaign`)
-- [Create a segment](src/main/java/com/example/pinpoint/CreateSegment.java#L12) (`CreateSegment`)
-- [Create an application](src/main/java/com/example/pinpoint/CreateApp.java#L11) (`CreateApp`)
-- [Delete an application](src/main/java/com/example/pinpoint/DeleteApp.java#L12) (`DeleteApp`)
-- [Delete an endpoint](src/main/java/com/example/pinpoint/DeleteEndpoint.java#L12) (`DeleteEndpoint`)
-- [Export an endpoint](src/main/java/com/example/pinpoint/ExportEndpoints.java#L11) (`CreateExportJob`)
-- [Get endpoints](src/main/java/com/example/pinpoint/LookUpEndpoint.java#L11) (`GetEndpoint`)
-- [Import a segment](src/main/java/com/example/pinpoint/ImportSegment.java#L10) (`CreateImportJob`)
-- [List endpoints](src/main/java/com/example/pinpoint/ListEndpointIds.java#L11) (`GetUserEndpoints`)
-- [List segments](src/main/java/com/example/pinpoint/ListSegments.java#L13) (`GetSegments`)
-- [Send email and text messages](src/main/java/com/example/pinpoint/SendEmailMessage.java#L12) (`SendMessages`)
-- [Update an endpoint](src/main/java/com/example/pinpoint/UpdateEndpoint.java#L12) (`UpdateEndpoint`)
-- [Update channels](src/main/java/com/example/pinpoint/UpdateChannel.java#L10) (`GetSmsChannel`)
+- [Create a campaign](src/main/java/com/example/pinpoint/CreateCampaign.java#L6) (`CreateCampaign`)
+- [Create a segment](src/main/java/com/example/pinpoint/CreateSegment.java#L6) (`CreateSegment`)
+- [Create an application](src/main/java/com/example/pinpoint/CreateApp.java#L6) (`CreateApp`)
+- [Delete an application](src/main/java/com/example/pinpoint/DeleteApp.java#L6) (`DeleteApp`)
+- [Delete an endpoint](src/main/java/com/example/pinpoint/DeleteEndpoint.java#L6) (`DeleteEndpoint`)
+- [Export an endpoint](src/main/java/com/example/pinpoint/ExportEndpoints.java#L6) (`CreateExportJob`)
+- [Get endpoints](src/main/java/com/example/pinpoint/LookUpEndpoint.java#L6) (`GetEndpoint`)
+- [Import a segment](src/main/java/com/example/pinpoint/ImportSegment.java#L6) (`CreateImportJob`)
+- [List endpoints](src/main/java/com/example/pinpoint/ListEndpointIds.java#L6) (`GetUserEndpoints`)
+- [List segments](src/main/java/com/example/pinpoint/ListSegments.java#L6) (`GetSegments`)
+- [Send email and text messages](src/main/java/com/example/pinpoint/SendEmailMessage.java#L6) (`SendMessages`)
+- [Update an endpoint](src/main/java/com/example/pinpoint/UpdateEndpoint.java#L6) (`UpdateEndpoint`)
+- [Update channels](src/main/java/com/example/pinpoint/UpdateChannel.java#L6) (`GetSmsChannel`)
diff --git a/javav2/example_code/polly/Readme.md b/javav2/example_code/polly/Readme.md
index 45d6704f268..cee7bb42e29 100644
--- a/javav2/example_code/polly/Readme.md
+++ b/javav2/example_code/polly/Readme.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Get voices available for synthesis](src/main/java/com/example/polly/DescribeVoicesSample.java#L12) (`DescribeVoices`)
-- [List pronunciation lexicons](src/main/java/com/example/polly/ListLexicons.java#L12) (`ListLexicons`)
-- [Synthesize speech from text](src/main/java/com/example/polly/PollyDemo.java#L12) (`SynthesizeSpeech`)
+- [Get voices available for synthesis](src/main/java/com/example/polly/DescribeVoicesSample.java#L6) (`DescribeVoices`)
+- [List pronunciation lexicons](src/main/java/com/example/polly/ListLexicons.java#L6) (`ListLexicons`)
+- [Synthesize speech from text](src/main/java/com/example/polly/PollyDemo.java#L6) (`SynthesizeSpeech`)
diff --git a/javav2/example_code/rds/Readme.md b/javav2/example_code/rds/Readme.md
index 35b529d6871..a7817aa740d 100644
--- a/javav2/example_code/rds/Readme.md
+++ b/javav2/example_code/rds/Readme.md
@@ -31,28 +31,28 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello Amazon RDS](src/main/java/com/example/rds/DescribeDBInstances.java#L11) (`DescribeDBInstances`)
+- [Hello Amazon RDS](src/main/java/com/example/rds/DescribeDBInstances.java#L6) (`DescribeDBInstances`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a DB instance](src/main/java/com/example/rds/CreateDBInstance.java#L12) (`CreateDBInstance`)
-- [Create a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L546) (`CreateDBParameterGroup`)
-- [Create a snapshot of a DB instance](src/main/java/com/example/rds/RDSScenario.java#L324) (`CreateDBSnapshot`)
-- [Create an authentication token](src/main/java/com/example/rds/GenerateRDSAuthToken.java#L20) (`GenerateRDSAuthToken`)
-- [Delete a DB instance](src/main/java/com/example/rds/DeleteDBInstance.java#L12) (`DeleteDBInstance`)
-- [Delete a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L223) (`DeleteDBParameterGroup`)
-- [Describe DB instances](src/main/java/com/example/rds/DescribeDBInstances.java#L11) (`DescribeDBInstances`)
-- [Describe DB parameter groups](src/main/java/com/example/rds/RDSScenario.java#L524) (`DescribeDBParameterGroups`)
-- [Describe database engine versions](src/main/java/com/example/rds/RDSScenario.java#L566) (`DescribeDBEngineVersions`)
-- [Describe options for DB instances](src/main/java/com/example/rds/RDSScenario.java#L436) (`DescribeOrderableDBInstanceOptions`)
-- [Describe parameters in a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L486) (`DescribeDBParameters`)
-- [Modify a DB instance](src/main/java/com/example/rds/ModifyDBInstance.java#L12) (`ModifyDBInstance`)
-- [Reboot a DB instance](src/main/java/com/example/rds/RebootDBInstance.java#L12) (`RebootDBInstance`)
-- [Retrieve attributes](src/main/java/com/example/rds/DescribeAccountAttributes.java#L12) (`DescribeAccountAttributes`)
-- [Update parameters in a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L459) (`ModifyDBParameterGroup`)
+- [Create a DB instance](src/main/java/com/example/rds/CreateDBInstance.java#L6) (`CreateDBInstance`)
+- [Create a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L554) (`CreateDBParameterGroup`)
+- [Create a snapshot of a DB instance](src/main/java/com/example/rds/RDSScenario.java#L328) (`CreateDBSnapshot`)
+- [Create an authentication token](src/main/java/com/example/rds/GenerateRDSAuthToken.java#L15) (`GenerateRDSAuthToken`)
+- [Delete a DB instance](src/main/java/com/example/rds/DeleteDBInstance.java#L6) (`DeleteDBInstance`)
+- [Delete a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L224) (`DeleteDBParameterGroup`)
+- [Describe DB instances](src/main/java/com/example/rds/DescribeDBInstances.java#L6) (`DescribeDBInstances`)
+- [Describe DB parameter groups](src/main/java/com/example/rds/RDSScenario.java#L532) (`DescribeDBParameterGroups`)
+- [Describe database engine versions](src/main/java/com/example/rds/RDSScenario.java#L573) (`DescribeDBEngineVersions`)
+- [Describe options for DB instances](src/main/java/com/example/rds/RDSScenario.java#L442) (`DescribeOrderableDBInstanceOptions`)
+- [Describe parameters in a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L492) (`DescribeDBParameters`)
+- [Modify a DB instance](src/main/java/com/example/rds/ModifyDBInstance.java#L6) (`ModifyDBInstance`)
+- [Reboot a DB instance](src/main/java/com/example/rds/RebootDBInstance.java#L6) (`RebootDBInstance`)
+- [Retrieve attributes](src/main/java/com/example/rds/DescribeAccountAttributes.java#L6) (`DescribeAccountAttributes`)
+- [Update parameters in a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L465) (`ModifyDBParameterGroup`)
### Scenarios
diff --git a/javav2/example_code/redshift/Readme.md b/javav2/example_code/redshift/Readme.md
index 4edc2975b1b..cf8908b4eab 100644
--- a/javav2/example_code/redshift/Readme.md
+++ b/javav2/example_code/redshift/Readme.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Create a cluster](src/main/java/com/example/redshift/CreateAndModifyCluster.java#L93) (`CreateCluster`)
-- [Delete a cluster](src/main/java/com/example/redshift/DeleteCluster.java#L12) (`DeleteCluster`)
-- [Describe your clusters](src/main/java/com/example/redshift/DescribeClusters.java#L12) (`DescribeClusters`)
-- [Modify a cluster](src/main/java/com/example/redshift/CreateAndModifyCluster.java#L152) (`ModifyCluster`)
+- [Create a cluster](src/main/java/com/example/redshift/CreateAndModifyCluster.java#L91) (`CreateCluster`)
+- [Delete a cluster](src/main/java/com/example/redshift/DeleteCluster.java#L6) (`DeleteCluster`)
+- [Describe your clusters](src/main/java/com/example/redshift/DescribeClusters.java#L6) (`DescribeClusters`)
+- [Modify a cluster](src/main/java/com/example/redshift/CreateAndModifyCluster.java#L150) (`ModifyCluster`)
diff --git a/javav2/example_code/rekognition/Readme.md b/javav2/example_code/rekognition/Readme.md
index a1b2c8b2041..30762785c6a 100644
--- a/javav2/example_code/rekognition/Readme.md
+++ b/javav2/example_code/rekognition/Readme.md
@@ -33,21 +33,21 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Compare faces in an image against a reference image](src/main/java/com/example/rekognition/CompareFaces.java#L11) (`CompareFaces`)
-- [Create a collection](src/main/java/com/example/rekognition/CreateCollection.java#L11) (`CreateCollection`)
-- [Delete a collection](src/main/java/com/example/rekognition/DeleteCollection.java#L12) (`DeleteCollection`)
-- [Delete faces from a collection](src/main/java/com/example/rekognition/DeleteFacesFromCollection.java#L12) (`DeleteFaces`)
-- [Describe a collection](src/main/java/com/example/rekognition/DescribeCollection.java#L12) (`DescribeCollection`)
-- [Detect faces in an image](src/main/java/com/example/rekognition/DetectFaces.java#L12) (`DetectFaces`)
-- [Detect labels in an image](src/main/java/com/example/rekognition/DetectLabels.java#L12) (`DetectLabels`)
-- [Detect moderation labels in an image](src/main/java/com/example/rekognition/DetectModerationLabels.java#L12) (`DetectModerationLabels`)
-- [Detect text in an image](src/main/java/com/example/rekognition/DetectText.java#L11) (`DetectText`)
-- [Index faces to a collection](src/main/java/com/example/rekognition/AddFacesToCollection.java#L11) (`IndexFaces`)
-- [List collections](src/main/java/com/example/rekognition/ListCollections.java#L12) (`ListCollections`)
-- [List faces in a collection](src/main/java/com/example/rekognition/ListFacesInCollection.java#L12) (`ListFaces`)
-- [Recognize celebrities in an image](src/main/java/com/example/rekognition/RecognizeCelebrities.java#L12) (`RecognizeCelebrities`)
-- [Search for faces in a collection](src/main/java/com/example/rekognition/SearchFaceMatchingImageCollection.java#L12) (`SearchFaces`)
-- [Search for faces in a collection compared to a reference image](src/main/java/com/example/rekognition/SearchFaceMatchingIdCollection.java#L11) (`SearchFacesByImage`)
+- [Compare faces in an image against a reference image](src/main/java/com/example/rekognition/CompareFaces.java#L6) (`CompareFaces`)
+- [Create a collection](src/main/java/com/example/rekognition/CreateCollection.java#L6) (`CreateCollection`)
+- [Delete a collection](src/main/java/com/example/rekognition/DeleteCollection.java#L6) (`DeleteCollection`)
+- [Delete faces from a collection](src/main/java/com/example/rekognition/DeleteFacesFromCollection.java#L6) (`DeleteFaces`)
+- [Describe a collection](src/main/java/com/example/rekognition/DescribeCollection.java#L6) (`DescribeCollection`)
+- [Detect faces in an image](src/main/java/com/example/rekognition/DetectFaces.java#L6) (`DetectFaces`)
+- [Detect labels in an image](src/main/java/com/example/rekognition/DetectLabels.java#L6) (`DetectLabels`)
+- [Detect moderation labels in an image](src/main/java/com/example/rekognition/DetectModerationLabels.java#L6) (`DetectModerationLabels`)
+- [Detect text in an image](src/main/java/com/example/rekognition/DetectText.java#L6) (`DetectText`)
+- [Index faces to a collection](src/main/java/com/example/rekognition/AddFacesToCollection.java#L6) (`IndexFaces`)
+- [List collections](src/main/java/com/example/rekognition/ListCollections.java#L6) (`ListCollections`)
+- [List faces in a collection](src/main/java/com/example/rekognition/ListFacesInCollection.java#L6) (`ListFaces`)
+- [Recognize celebrities in an image](src/main/java/com/example/rekognition/RecognizeCelebrities.java#L6) (`RecognizeCelebrities`)
+- [Search for faces in a collection](src/main/java/com/example/rekognition/SearchFaceMatchingImageCollection.java#L6) (`SearchFaces`)
+- [Search for faces in a collection compared to a reference image](src/main/java/com/example/rekognition/SearchFaceMatchingIdCollection.java#L6) (`SearchFacesByImage`)
### Scenarios
diff --git a/javav2/example_code/s3/README.md b/javav2/example_code/s3/README.md
index 4ef55d4ac02..5bcc7288eb3 100644
--- a/javav2/example_code/s3/README.md
+++ b/javav2/example_code/s3/README.md
@@ -31,35 +31,36 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello Amazon S3](src/main/java/com/example/s3/HelloS3.java#L10) (`ListBuckets`)
+- [Hello Amazon S3](src/main/java/com/example/s3/HelloS3.java#L6) (`ListBuckets`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add CORS rules to a bucket](src/main/java/com/example/s3/S3Cors.java#L12) (`PutBucketCors`)
-- [Add a lifecycle configuration to a bucket](src/main/java/com/example/s3/LifecycleConfiguration.java#L11) (`PutBucketLifecycleConfiguration`)
-- [Add a policy to a bucket](src/main/java/com/example/s3/SetBucketPolicy.java#L12) (`PutBucketPolicy`)
-- [Copy an object from one bucket to another](src/main/java/com/example/s3/CopyObject.java#L11) (`CopyObject`)
-- [Create a bucket](src/main/java/com/example/s3/CreateBucket.java#L12) (`CreateBucket`)
-- [Delete a policy from a bucket](src/main/java/com/example/s3/DeleteBucketPolicy.java#L11) (`DeleteBucketPolicy`)
-- [Delete an empty bucket](src/main/java/com/example/s3/S3BucketOps.java#L83) (`DeleteBucket`)
-- [Delete multiple objects](src/main/java/com/example/s3/DeleteMultiObjects.java#L12) (`DeleteObjects`)
-- [Delete the website configuration from a bucket](src/main/java/com/example/s3/DeleteWebsiteConfiguration.java#L12) (`DeleteBucketWebsite`)
-- [Determine the existence and content type of an object](src/main/java/com/example/s3/GetObjectContentType.java#L13) (`HeadObject`)
-- [Download objects to a local directory](src/main/java/com/example/s3/transfermanager/DownloadToDirectory.java#L11) (`DownloadDirectory`)
-- [Enable notifications](src/main/java/com/example/s3/SetBucketEventBridgeNotification.java#L11) (`PutBucketNotificationConfiguration`)
-- [Get an object from a bucket](src/main/java/com/example/s3/GetObjectData.java#L13) (`GetObject`)
-- [Get the ACL of a bucket](src/main/java/com/example/s3/GetAcl.java#L10) (`GetBucketAcl`)
-- [Get the policy for a bucket](src/main/java/com/example/s3/GetBucketPolicy.java#L12) (`GetBucketPolicy`)
-- [List in-progress multipart uploads](src/main/java/com/example/s3/ListMultipartUploads.java#L12) (`ListMultipartUploads`)
-- [List objects in a bucket](src/main/java/com/example/s3/ListObjects.java#L10) (`ListObjectsV2`)
-- [Restore an archived copy of an object](src/main/java/com/example/s3/RestoreObject.java#L13) (`RestoreObject`)
-- [Set a new ACL for a bucket](src/main/java/com/example/s3/SetAcl.java#L11) (`PutBucketAcl`)
-- [Set the website configuration for a bucket](src/main/java/com/example/s3/SetWebsiteConfiguration.java#L11) (`PutBucketWebsite`)
-- [Upload an object to a bucket](src/main/java/com/example/s3/PutObject.java#L11) (`PutObject`)
-- [Upload directory to a bucket](src/main/java/com/example/s3/transfermanager/UploadADirectory.java#L11) (`UploadDirectory`)
+- [Add CORS rules to a bucket](src/main/java/com/example/s3/S3Cors.java#L6) (`PutBucketCors`)
+- [Add a lifecycle configuration to a bucket](src/main/java/com/example/s3/LifecycleConfiguration.java#L6) (`PutBucketLifecycleConfiguration`)
+- [Add a policy to a bucket](src/main/java/com/example/s3/SetBucketPolicy.java#L6) (`PutBucketPolicy`)
+- [Copy an object from one bucket to another](src/main/java/com/example/s3/CopyObject.java#L6) (`CopyObject`)
+- [Create a bucket](src/main/java/com/example/s3/CreateBucket.java#L6) (`CreateBucket`)
+- [Delete a policy from a bucket](src/main/java/com/example/s3/DeleteBucketPolicy.java#L6) (`DeleteBucketPolicy`)
+- [Delete an empty bucket](src/main/java/com/example/s3/S3BucketOps.java#L79) (`DeleteBucket`)
+- [Delete multiple objects](src/main/java/com/example/s3/DeleteMultiObjects.java#L6) (`DeleteObjects`)
+- [Delete the website configuration from a bucket](src/main/java/com/example/s3/DeleteWebsiteConfiguration.java#L6) (`DeleteBucketWebsite`)
+- [Determine the existence and content type of an object](src/main/java/com/example/s3/GetObjectContentType.java#L6) (`HeadObject`)
+- [Download objects to a local directory](src/main/java/com/example/s3/transfermanager/DownloadToDirectory.java#L6) (`DownloadDirectory`)
+- [Enable notifications](src/main/java/com/example/s3/SetBucketEventBridgeNotification.java#L6) (`PutBucketNotificationConfiguration`)
+- [Get an object from a bucket](src/main/java/com/example/s3/GetObjectData.java#L6) (`GetObject`)
+- [Get the ACL of a bucket](src/main/java/com/example/s3/GetAcl.java#L6) (`GetBucketAcl`)
+- [Get the policy for a bucket](src/main/java/com/example/s3/GetBucketPolicy.java#L6) (`GetBucketPolicy`)
+- [List buckets](src/main/java/com/example/s3/ListBuckets.java#L6) (`ListBuckets`)
+- [List in-progress multipart uploads](src/main/java/com/example/s3/ListMultipartUploads.java#L6) (`ListMultipartUploads`)
+- [List objects in a bucket](src/main/java/com/example/s3/ListObjects.java#L6) (`ListObjectsV2`)
+- [Restore an archived copy of an object](src/main/java/com/example/s3/RestoreObject.java#L6) (`RestoreObject`)
+- [Set a new ACL for a bucket](src/main/java/com/example/s3/SetAcl.java#L6) (`PutBucketAcl`)
+- [Set the website configuration for a bucket](src/main/java/com/example/s3/SetWebsiteConfiguration.java#L6) (`PutBucketWebsite`)
+- [Upload an object to a bucket](src/main/java/com/example/s3/PutObject.java#L6) (`PutObject`)
+- [Upload directory to a bucket](src/main/java/com/example/s3/transfermanager/UploadADirectory.java#L6) (`UploadDirectory`)
### Scenarios
diff --git a/javav2/example_code/sagemaker/Readme.md b/javav2/example_code/sagemaker/Readme.md
index 2489912b3e5..89bcaff53af 100644
--- a/javav2/example_code/sagemaker/Readme.md
+++ b/javav2/example_code/sagemaker/Readme.md
@@ -31,17 +31,17 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello SageMaker](src/main/java/com/example/sage/HelloSageMaker.java#L21) (`ListNotebookInstances`)
+- [Hello SageMaker](src/main/java/com/example/sage/HelloSageMaker.java#L15) (`ListNotebookInstances`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/java/com/example/sage/SagemakerWorkflow.java#L304) (`CreatePipeline`)
-- [Delete a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/java/com/example/sage/SagemakerWorkflow.java#L292) (`DeletePipeline`)
-- [Describe a pipeline execution](../../usecases/workflow_sagemaker_pipes/src/main/java/com/example/sage/SagemakerWorkflow.java#L272) (`DescribePipelineExecution`)
-- [Execute a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/java/com/example/sage/SagemakerWorkflow.java#L342) (`StartPipelineExecution`)
+- [Create a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/java/com/example/sage/SagemakerWorkflow.java#L309) (`CreatePipeline`)
+- [Delete a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/java/com/example/sage/SagemakerWorkflow.java#L297) (`DeletePipeline`)
+- [Describe a pipeline execution](../../usecases/workflow_sagemaker_pipes/src/main/java/com/example/sage/SagemakerWorkflow.java#L275) (`DescribePipelineExecution`)
+- [Execute a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/java/com/example/sage/SagemakerWorkflow.java#L348) (`StartPipelineExecution`)
### Scenarios
diff --git a/javav2/example_code/ses/Readme.md b/javav2/example_code/ses/Readme.md
index 933790a0c85..000c37ad718 100644
--- a/javav2/example_code/ses/Readme.md
+++ b/javav2/example_code/ses/Readme.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [List email templates](src/main/java/com/example/sesv2/ListTemplates.java#L13) (`ListTemplates`)
-- [List identities](src/main/java/com/example/ses/ListIdentities.java#L13) (`ListIdentities`)
-- [Send email](src/main/java/com/example/ses/SendMessageEmailRequest.java#L13) (`SendEmail`)
-- [Send templated email](src/main/java/com/example/sesv2/SendEmailTemplate.java#L13) (`SendTemplatedEmail`)
+- [List email templates](src/main/java/com/example/sesv2/ListTemplates.java#L6) (`ListTemplates`)
+- [List identities](src/main/java/com/example/ses/ListIdentities.java#L6) (`ListIdentities`)
+- [Send email](src/main/java/com/example/ses/SendMessageEmailRequest.java#L6) (`SendEmail`)
+- [Send templated email](src/main/java/com/example/sesv2/SendEmailTemplate.java#L6) (`SendTemplatedEmail`)
diff --git a/javav2/example_code/sns/Readme.md b/javav2/example_code/sns/Readme.md
index 8da2bd16797..ae9346df4b3 100644
--- a/javav2/example_code/sns/Readme.md
+++ b/javav2/example_code/sns/Readme.md
@@ -31,33 +31,33 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello Amazon SNS](src/main/java/com/example/sns/HelloSNS.java#L8) (`ListTopics`)
+- [Hello Amazon SNS](src/main/java/com/example/sns/HelloSNS.java#L4) (`ListTopics`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add tags to a topic](src/main/java/com/example/sns/AddTags.java#L11) (`TagResource`)
-- [Check whether a phone number is opted out](src/main/java/com/example/sns/CheckOptOut.java#L10) (`CheckIfPhoneNumberIsOptedOut`)
-- [Confirm an endpoint owner wants to receive messages](src/main/java/com/example/sns/ConfirmSubscription.java#L12) (`ConfirmSubscription`)
-- [Create a topic](src/main/java/com/example/sns/CreateTopic.java#L12) (`CreateTopic`)
-- [Delete a subscription](src/main/java/com/example/sns/Unsubscribe.java#L12) (`Unsubscribe`)
-- [Delete a topic](src/main/java/com/example/sns/DeleteTopic.java#L11) (`DeleteTopic`)
-- [Get the properties of a topic](src/main/java/com/example/sns/GetTopicAttributes.java#L12) (`GetTopicAttributes`)
-- [Get the settings for sending SMS messages](src/main/java/com/example/sns/GetSMSAtrributes.java#L12) (`GetSMSAttributes`)
-- [List opted out phone numbers](src/main/java/com/example/sns/ListOptOut.java#L11) (`ListPhoneNumbersOptedOut`)
-- [List the subscribers of a topic](src/main/java/com/example/sns/ListSubscriptions.java#L12) (`ListSubscriptions`)
-- [List topics](src/main/java/com/example/sns/ListTopics.java#L12) (`ListTopics`)
-- [Publish an SMS text message](src/main/java/com/example/sns/PublishTextSMS.java#L11) (`Publish`)
-- [Publish to a topic](src/main/java/com/example/sns/PublishTopic.java#L12) (`Publish`)
+- [Add tags to a topic](src/main/java/com/example/sns/AddTags.java#L6) (`TagResource`)
+- [Check whether a phone number is opted out](src/main/java/com/example/sns/CheckOptOut.java#L6) (`CheckIfPhoneNumberIsOptedOut`)
+- [Confirm an endpoint owner wants to receive messages](src/main/java/com/example/sns/ConfirmSubscription.java#L6) (`ConfirmSubscription`)
+- [Create a topic](src/main/java/com/example/sns/CreateTopic.java#L6) (`CreateTopic`)
+- [Delete a subscription](src/main/java/com/example/sns/Unsubscribe.java#L6) (`Unsubscribe`)
+- [Delete a topic](src/main/java/com/example/sns/DeleteTopic.java#L6) (`DeleteTopic`)
+- [Get the properties of a topic](src/main/java/com/example/sns/GetTopicAttributes.java#L6) (`GetTopicAttributes`)
+- [Get the settings for sending SMS messages](src/main/java/com/example/sns/GetSMSAtrributes.java#L6) (`GetSMSAttributes`)
+- [List opted out phone numbers](src/main/java/com/example/sns/ListOptOut.java#L6) (`ListPhoneNumbersOptedOut`)
+- [List the subscribers of a topic](src/main/java/com/example/sns/ListSubscriptions.java#L6) (`ListSubscriptions`)
+- [List topics](src/main/java/com/example/sns/ListTopics.java#L6) (`ListTopics`)
+- [Publish an SMS text message](src/main/java/com/example/sns/PublishTextSMS.java#L6) (`Publish`)
+- [Publish to a topic](src/main/java/com/example/sns/PublishTopic.java#L6) (`Publish`)
- [Set a dead-letter queue for a subscription](None) (`SetSubscriptionAttributesRedrivePolicy`)
-- [Set a filter policy](src/main/java/com/example/sns/UseMessageFilterPolicy.java#L12) (`SetSubscriptionAttributes`)
-- [Set the default settings for sending SMS messages](src/main/java/com/example/sns/SetSMSAttributes.java#L11) (`SetSMSAttributes`)
-- [Set topic attributes](src/main/java/com/example/sns/SetTopicAttributes.java#L12) (`SetTopicAttributes`)
-- [Subscribe a Lambda function to a topic](src/main/java/com/example/sns/SubscribeLambda.java#L12) (`Subscribe`)
-- [Subscribe an HTTP endpoint to a topic](src/main/java/com/example/sns/SubscribeHTTPS.java#L12) (`Subscribe`)
-- [Subscribe an email address to a topic](src/main/java/com/example/sns/SubscribeEmail.java#L12) (`Subscribe`)
+- [Set a filter policy](src/main/java/com/example/sns/UseMessageFilterPolicy.java#L6) (`SetSubscriptionAttributes`)
+- [Set the default settings for sending SMS messages](src/main/java/com/example/sns/SetSMSAttributes.java#L6) (`SetSMSAttributes`)
+- [Set topic attributes](src/main/java/com/example/sns/SetTopicAttributes.java#L6) (`SetTopicAttributes`)
+- [Subscribe a Lambda function to a topic](src/main/java/com/example/sns/SubscribeLambda.java#L6) (`Subscribe`)
+- [Subscribe an HTTP endpoint to a topic](src/main/java/com/example/sns/SubscribeHTTPS.java#L6) (`Subscribe`)
+- [Subscribe an email address to a topic](src/main/java/com/example/sns/SubscribeEmail.java#L6) (`Subscribe`)
### Scenarios
diff --git a/javav2/example_code/sqs/Readme.md b/javav2/example_code/sqs/Readme.md
index 9329a828370..88cf6292071 100644
--- a/javav2/example_code/sqs/Readme.md
+++ b/javav2/example_code/sqs/Readme.md
@@ -31,21 +31,21 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello Amazon SQS](src/main/java/com/example/sqs/HelloSQS.java#L10) (`ListQueues`)
+- [Hello Amazon SQS](src/main/java/com/example/sqs/HelloSQS.java#L6) (`ListQueues`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a queue](src/main/java/com/example/sqs/SQSExample.java#L11) (`CreateQueue`)
-- [Delete a message from a queue](src/main/java/com/example/sqs/SQSExample.java#L191) (`DeleteMessage`)
-- [Delete a queue](src/main/java/com/example/sqs/DeleteQueue.java#L12) (`DeleteQueue`)
-- [Get the URL of a queue](src/main/java/com/example/sqs/SQSExample.java#L70) (`GetQueueUrl`)
-- [List queues](src/main/java/com/example/sqs/SQSExample.java#L85) (`ListQueues`)
-- [Receive messages from a queue](src/main/java/com/example/sqs/SQSExample.java#L154) (`ReceiveMessage`)
-- [Send a batch of messages to a queue](src/main/java/com/example/sqs/SQSExample.java#L135) (`SendMessageBatch`)
-- [Send a message to a queue](src/main/java/com/example/sqs/SendMessages.java#L12) (`SendMessage`)
+- [Create a queue](src/main/java/com/example/sqs/SQSExample.java#L6) (`CreateQueue`)
+- [Delete a message from a queue](src/main/java/com/example/sqs/SQSExample.java#L189) (`DeleteMessage`)
+- [Delete a queue](src/main/java/com/example/sqs/DeleteQueue.java#L6) (`DeleteQueue`)
+- [Get the URL of a queue](src/main/java/com/example/sqs/SQSExample.java#L66) (`GetQueueUrl`)
+- [List queues](src/main/java/com/example/sqs/SQSExample.java#L82) (`ListQueues`)
+- [Receive messages from a queue](src/main/java/com/example/sqs/SQSExample.java#L152) (`ReceiveMessage`)
+- [Send a batch of messages to a queue](src/main/java/com/example/sqs/SQSExample.java#L132) (`SendMessageBatch`)
+- [Send a message to a queue](src/main/java/com/example/sqs/SendMessages.java#L7) (`SendMessage`)
diff --git a/javav2/example_code/ssm/Readme.md b/javav2/example_code/ssm/Readme.md
index 867651de978..bf7fe9f7648 100644
--- a/javav2/example_code/ssm/Readme.md
+++ b/javav2/example_code/ssm/Readme.md
@@ -33,11 +33,11 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Add a parameter](src/main/java/com/example/ssm/PutParameter.java#L13) (`PutParameter`)
-- [Create a new OpsItem](src/main/java/com/example/ssm/CreateOpsItem.java#L13) (`CreateOpsItem`)
-- [Describe an OpsItem](src/main/java/com/example/ssm/DescribeOpsItems.java#L13) (`DescribeOpsItems`)
-- [Get parameters information](src/main/java/com/example/ssm/GetParameter.java#L13) (`DescribeParameters`)
-- [Updates an OpsItem](src/main/java/com/example/ssm/ResolveOpsItem.java#L13) (`UpdateOpsItem`)
+- [Add a parameter](src/main/java/com/example/ssm/PutParameter.java#L6) (`PutParameter`)
+- [Create a new OpsItem](src/main/java/com/example/ssm/CreateOpsItem.java#L6) (`CreateOpsItem`)
+- [Describe an OpsItem](src/main/java/com/example/ssm/DescribeOpsItems.java#L6) (`DescribeOpsItems`)
+- [Get parameters information](src/main/java/com/example/ssm/GetParameter.java#L6) (`DescribeParameters`)
+- [Updates an OpsItem](src/main/java/com/example/ssm/ResolveOpsItem.java#L6) (`UpdateOpsItem`)
diff --git a/javav2/example_code/sts/Readme.md b/javav2/example_code/sts/Readme.md
index 2d6baa326f1..d8f0a00c8af 100644
--- a/javav2/example_code/sts/Readme.md
+++ b/javav2/example_code/sts/Readme.md
@@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Assume a role](src/main/java/com/example/sts/AssumeRole.java#L13) (`AssumeRole`)
+- [Assume a role](src/main/java/com/example/sts/AssumeRole.java#L6) (`AssumeRole`)
diff --git a/javav2/example_code/support/Readme.md b/javav2/example_code/support/Readme.md
index 26a1ad71398..8486d8b8036 100644
--- a/javav2/example_code/support/Readme.md
+++ b/javav2/example_code/support/Readme.md
@@ -31,22 +31,22 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
### Get started
-- [Hello Support](src/main/java/com/example/support/HelloSupport.java#L12) (`DescribeServices`)
+- [Hello Support](src/main/java/com/example/support/HelloSupport.java#L6) (`DescribeServices`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add a communication to a case](src/main/java/com/example/support/SupportScenario.java#L256) (`AddCommunicationToCase`)
-- [Add an attachment to a set](src/main/java/com/example/support/SupportScenario.java#L278) (`AddAttachmentsToSet`)
-- [Create a case](src/main/java/com/example/support/SupportScenario.java#L334) (`CreateCase`)
-- [Describe an attachment](src/main/java/com/example/support/SupportScenario.java#L209) (`DescribeAttachment`)
-- [Describe cases](src/main/java/com/example/support/SupportScenario.java#L305) (`DescribeCases`)
-- [Describe communications](src/main/java/com/example/support/SupportScenario.java#L226) (`DescribeCommunications`)
-- [Describe services](src/main/java/com/example/support/SupportScenario.java#L385) (`DescribeServices`)
-- [Describe severity levels](src/main/java/com/example/support/SupportScenario.java#L360) (`DescribeSeverityLevels`)
-- [Resolve case](src/main/java/com/example/support/SupportScenario.java#L192) (`ResolveCase`)
+- [Add a communication to a case](src/main/java/com/example/support/SupportScenario.java#L254) (`AddCommunicationToCase`)
+- [Add an attachment to a set](src/main/java/com/example/support/SupportScenario.java#L276) (`AddAttachmentsToSet`)
+- [Create a case](src/main/java/com/example/support/SupportScenario.java#L332) (`CreateCase`)
+- [Describe an attachment](src/main/java/com/example/support/SupportScenario.java#L207) (`DescribeAttachment`)
+- [Describe cases](src/main/java/com/example/support/SupportScenario.java#L303) (`DescribeCases`)
+- [Describe communications](src/main/java/com/example/support/SupportScenario.java#L224) (`DescribeCommunications`)
+- [Describe services](src/main/java/com/example/support/SupportScenario.java#L383) (`DescribeServices`)
+- [Describe severity levels](src/main/java/com/example/support/SupportScenario.java#L358) (`DescribeSeverityLevels`)
+- [Resolve case](src/main/java/com/example/support/SupportScenario.java#L190) (`ResolveCase`)
### Scenarios
diff --git a/javav2/example_code/textract/Readme.md b/javav2/example_code/textract/Readme.md
index 759df0f9e57..ab1305c7f91 100644
--- a/javav2/example_code/textract/Readme.md
+++ b/javav2/example_code/textract/Readme.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [Analyze a document](src/main/java/com/example/textract/AnalyzeDocument.java#L12) (`AnalyzeDocument`)
-- [Detect text in a document](src/main/java/com/example/textract/DetectDocumentText.java#L13) (`DetectDocumentText`)
-- [Start asynchronous analysis of a document](src/main/java/com/example/textract/StartDocumentAnalysis.java#L12) (`StartDocumentAnalysis`)
+- [Analyze a document](src/main/java/com/example/textract/AnalyzeDocument.java#L6) (`AnalyzeDocument`)
+- [Detect text in a document](src/main/java/com/example/textract/DetectDocumentText.java#L6) (`DetectDocumentText`)
+- [Start asynchronous analysis of a document](src/main/java/com/example/textract/StartDocumentAnalysis.java#L6) (`StartDocumentAnalysis`)
diff --git a/javav2/example_code/transcribe/Readme.md b/javav2/example_code/transcribe/Readme.md
index c8e889abe85..e31cf844129 100644
--- a/javav2/example_code/transcribe/Readme.md
+++ b/javav2/example_code/transcribe/Readme.md
@@ -33,8 +33,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
Code excerpts that show you how to call individual service functions.
-- [List transcription jobs](src/main/java/com/amazonaws/transcribe/ListTranscriptionJobs.java#L9) (`ListTranscriptionJobs`)
-- [Start a transcription job](src/main/java/com/amazonaws/transcribestreaming/TranscribeStreamingDemoApp.java#L35) (`StartTranscriptionJob`)
+- [List transcription jobs](src/main/java/com/amazonaws/transcribe/ListTranscriptionJobs.java#L12) (`ListTranscriptionJobs`)
+- [Start a transcription job](src/main/java/com/amazonaws/transcribestreaming/TranscribeStreamingDemoApp.java#L26) (`StartTranscriptionJob`)
### Scenarios
diff --git a/kotlin/services/apigateway/build.gradle.kts b/kotlin/services/apigateway/build.gradle.kts
index 2a147b0cb15..c66333f8a15 100644
--- a/kotlin/services/apigateway/build.gradle.kts
+++ b/kotlin/services/apigateway/build.gradle.kts
@@ -1,13 +1,18 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
- kotlin("jvm") version "1.7.10"
+ kotlin("jvm") version "1.9.0"
application
}
group = "me.scmacdon"
version = "1.0-SNAPSHOT"
+java {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+}
+
buildscript {
repositories {
maven("https://plugins.gradle.org/m2/")
@@ -19,18 +24,28 @@ buildscript {
repositories {
mavenCentral()
- jcenter()
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:apigateway:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:apigateway:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
- implementation("com.google.code.gson:gson:2.10")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
+ implementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
+ implementation("com.google.code.gson:gson:2.10")
}
tasks.withType() {
- kotlinOptions.jvmTarget = "1.8"
+ kotlinOptions.jvmTarget = "17"
+}
+tasks.test {
+ useJUnitPlatform()
+ testLogging {
+ events("passed", "skipped", "failed")
+ }
+
+ // Define the test source set
+ testClassesDirs += files("build/classes/kotlin/test")
+ classpath += files("build/classes/kotlin/main", "build/resources/main")
}
diff --git a/kotlin/services/apigateway/src/test/kotlin/APIGatewayTest.kt b/kotlin/services/apigateway/src/test/kotlin/APIGatewayTest.kt
new file mode 100644
index 00000000000..a2b260bac7f
--- /dev/null
+++ b/kotlin/services/apigateway/src/test/kotlin/APIGatewayTest.kt
@@ -0,0 +1,111 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.apigateway.ApiGatewayClient
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.gateway.createAPI
+import com.kotlin.gateway.deleteAPI
+import com.kotlin.gateway.getAllDeployments
+import com.kotlin.gateway.getAllStages
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+import java.util.Random
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class APIGatewayTest {
+ lateinit var apiGatewayClient: ApiGatewayClient
+ private var restApiId = ""
+ private var httpMethod = ""
+ private var restApiName = ""
+ private var stageName = ""
+ private var newApiId = ""
+
+ @BeforeAll
+ fun setup() = runBlocking {
+ apiGatewayClient = ApiGatewayClient { region = "us-east-1" }
+ // Get values from AWS Secrets Manager.
+ val random = Random()
+ val randomNum = random.nextInt(10000 - 1 + 1) + 1
+ val gson = Gson()
+ val json: String = getSecretValues()
+ val values: SecretValues = gson.fromJson(json, SecretValues::class.java)
+ restApiId = values.restApiId.toString()
+ httpMethod = values.httpMethod.toString()
+ restApiName = values.restApiName.toString() + randomNum
+ stageName = values.stageName.toString()
+
+ /*
+ val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
+ val prop = Properties()
+
+ // load the properties file.
+ prop.load(input)
+
+ // Populate the data members required for all tests
+ restApiId = prop.getProperty("restApiId")
+ resourceId = prop.getProperty("resourceId")
+ httpMethod = prop.getProperty("httpMethod")
+ restApiName = prop.getProperty("restApiName")
+ stageName = prop.getProperty("stageName")
+ */
+ }
+
+ @Test
+ @Order(1)
+ fun createRestApiTest() = runBlocking {
+ newApiId = createAPI(restApiId).toString()
+ println("Test 2 passed")
+ }
+
+ @Test
+ @Order(2)
+ fun getDeploymentsTest() = runBlocking {
+ getAllDeployments(newApiId)
+ println("Test 4 passed")
+ }
+
+ @Test
+ @Order(3)
+ fun getAllStagesTest() = runBlocking {
+ getAllStages(newApiId)
+ println("Test 5 passed")
+ }
+
+ @Test
+ @Order(4)
+ fun DeleteRestApi() = runBlocking {
+ deleteAPI(newApiId)
+ println("Test 6 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/apigateway"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/apigateway (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val restApiId: String? = null
+ val restApiName: String? = null
+ val httpMethod: String? = null
+ val stageName: String? = null
+ }
+}
diff --git a/kotlin/services/appsync/build.gradle.kts b/kotlin/services/appsync/build.gradle.kts
index ac30a9be3b5..878516357f1 100644
--- a/kotlin/services/appsync/build.gradle.kts
+++ b/kotlin/services/appsync/build.gradle.kts
@@ -27,10 +27,10 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:appsync:1.0.0")
- implementation("aws.sdk.kotlin:sts:1.0.0")
- implementation("aws.sdk.kotlin:s3:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:appsync:1.0.30")
+ implementation("aws.sdk.kotlin:sts:1.0.30")
+ implementation("aws.sdk.kotlin:s3:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
implementation("com.google.code.gson:gson:2.10")
diff --git a/kotlin/services/appsync/src/test/kotlin/AppSyncTest.kt b/kotlin/services/appsync/src/test/kotlin/AppSyncTest.kt
index 0ca358bdfa5..e7f6968f309 100644
--- a/kotlin/services/appsync/src/test/kotlin/AppSyncTest.kt
+++ b/kotlin/services/appsync/src/test/kotlin/AppSyncTest.kt
@@ -1,37 +1,49 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
import com.example.appsync.createDS
import com.example.appsync.createKey
import com.example.appsync.deleteDS
import com.example.appsync.deleteKey
import com.example.appsync.getDS
import com.example.appsync.getKeys
+import com.google.gson.Gson
import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
import org.junit.jupiter.api.Order
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.TestMethodOrder
-import java.io.InputStream
-import java.util.Properties
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@TestMethodOrder(OrderAnnotation::class)
class AppSyncTest {
-
private var apiId = ""
private var dsName = ""
private var dsRole = ""
private var tableName = ""
- private var keyId = "" // gets dynamically set in a test.
- private var dsARN = "" // gets dynamically set in a test.
+ private var keyId = ""
@BeforeAll
- fun setup() {
+ fun setup() = runBlocking {
+ // Get test values from AWS Secrets Manager.
+ val gson = Gson()
+ val json = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ apiId = values.apiId.toString()
+ dsName = values.dsName.toString()
+ dsRole = values.dsRole.toString()
+ tableName = values.tableName.toString()
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ /*
val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
val prop = Properties()
prop.load(input)
@@ -39,68 +51,79 @@ class AppSyncTest {
dsName = prop.getProperty("dsName")
dsRole = prop.getProperty("dsRole")
tableName = prop.getProperty("tableName")
+ */
}
@Test
@Order(1)
- fun whenInitializingAWSService_thenNotNull() = runBlocking {
- assertTrue(!apiId.isEmpty())
- assertTrue(!dsName.isEmpty())
- assertTrue(!dsRole.isEmpty())
- assertTrue(!tableName.isEmpty())
- println("Test 1 passed")
- }
-
- @Test
- @Order(2)
fun CreateApiKey() = runBlocking {
keyId = createKey(apiId).toString()
assertTrue(!keyId.isEmpty())
- println("Test 2 passed")
+ println("Test 1 passed")
}
@Test
- @Order(3)
+ @Order(2)
fun CreateDataSource() = runBlocking {
val dsARN = createDS(dsName, dsRole, apiId, tableName)
if (dsARN != null) {
- assertTrue(!dsARN.isEmpty())
+ assertTrue(dsARN.isNotEmpty())
}
- println("Test 3 passed")
+ println("Test 2 passed")
}
@Test
- @Order(4)
+ @Order(3)
fun GetDataSource() = runBlocking {
getDS(apiId, dsName)
- println("Test 4 passed")
+ println("Test 3 passed")
}
@Test
- @Order(5)
+ @Order(4)
fun ListGraphqlApis() = runBlocking {
getKeys(apiId)
- println("Test 5 passed")
+ println("Test 4 passed")
}
@Test
- @Order(6)
+ @Order(5)
fun ListApiKeys() = runBlocking {
getKeys(apiId)
- println("Test 6 passed")
+ println("Test 5 passed")
}
@Test
- @Order(7)
+ @Order(6)
fun DeleteDataSource() = runBlocking {
deleteDS(apiId, dsName)
- println("Test 7 passed")
+ println("Test 6 passed")
}
@Test
- @Order(8)
+ @Order(7)
fun DeleteApiKey() = runBlocking {
deleteKey(keyId, apiId)
- println("Test 8 passed")
+ println("Test 7 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/appsync"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/appsync (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val apiId: String? = null
+ val dsName: String? = null
+ val dsRole: String? = null
+ val tableName: String? = null
}
}
diff --git a/kotlin/services/athena/build.gradle.kts b/kotlin/services/athena/build.gradle.kts
index d9fba68e052..cbf32c6fb55 100644
--- a/kotlin/services/athena/build.gradle.kts
+++ b/kotlin/services/athena/build.gradle.kts
@@ -27,8 +27,8 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:athena:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:athena:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
implementation("com.google.code.gson:gson:2.10")
diff --git a/kotlin/services/athena/src/test/kotlin/AthenaTest.kt b/kotlin/services/athena/src/test/kotlin/AthenaTest.kt
new file mode 100644
index 00000000000..da81967f83e
--- /dev/null
+++ b/kotlin/services/athena/src/test/kotlin/AthenaTest.kt
@@ -0,0 +1,115 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.athena.createNamedQuery
+import com.kotlin.athena.deleteQueryName
+import com.kotlin.athena.listNamedQueries
+import com.kotlin.athena.listQueryIds
+import com.kotlin.athena.processResultRows
+import com.kotlin.athena.submitAthenaQuery
+import com.kotlin.athena.waitForQueryToComplete
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class AthenaTest {
+ private var nameQuery: String? = null
+ private var queryString: String? = null
+ private var database: String? = null
+ private var outputLocation: String? = null
+ private var queryId: String? = null
+
+ @BeforeAll
+ fun setup() = runBlocking {
+ // Get the values from AWS Secrets Manager.
+ val gson = Gson()
+ val json = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ nameQuery = values.nameQuery.toString()
+ queryString = values.queryString.toString()
+ database = values.database.toString()
+ outputLocation = values.outputLocation.toString()
+
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ /*
+ val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
+ val prop = Properties()
+ prop.load(input)
+ nameQuery = prop.getProperty("nameQuery")
+ queryString = prop.getProperty("queryString")
+ database = prop.getProperty("database")
+ outputLocation = prop.getProperty("outputLocation")
+ */
+ }
+
+ @Test
+ @Order(1)
+ fun createNamedQueryTest() = runBlocking {
+ queryId = createNamedQuery(queryString.toString(), nameQuery.toString(), database.toString())
+ queryId?.let { assertTrue(it.isNotEmpty()) }
+ println("Test 1 passed")
+ }
+
+ @Test
+ @Order(2)
+ fun listNamedQueryTest() = runBlocking {
+ listNamedQueries()
+ println("Test 2 passed")
+ }
+
+ @Test
+ @Order(3)
+ fun listQueryExecutionsTest() = runBlocking {
+ listQueryIds()
+ println("Test 3 passed")
+ }
+
+ @Test
+ @Order(4)
+ fun startQueryExampleTest() = runBlocking {
+ val queryExecutionId = submitAthenaQuery(queryString.toString(), database.toString(), outputLocation.toString())
+ waitForQueryToComplete(queryExecutionId)
+ processResultRows(queryExecutionId)
+ println("Test 4 passed")
+ }
+
+ @Test
+ @Order(5)
+ fun deleteNamedQueryTest() = runBlocking {
+ deleteQueryName(queryId)
+ println("Test 5 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/athena"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/xray (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val nameQuery: String? = null
+ val queryString: String? = null
+ val outputLocation: String? = null
+ val database: String? = null
+ }
+}
diff --git a/kotlin/services/autoscale/build.gradle.kts b/kotlin/services/autoscale/build.gradle.kts
index 8feae498fe5..a566d4ae062 100644
--- a/kotlin/services/autoscale/build.gradle.kts
+++ b/kotlin/services/autoscale/build.gradle.kts
@@ -27,8 +27,8 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:autoscaling:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:autoscaling:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
implementation("com.google.code.gson:gson:2.10")
diff --git a/kotlin/services/autoscale/src/test/kotlin/AutoScalingTest.kt b/kotlin/services/autoscale/src/test/kotlin/AutoScalingTest.kt
new file mode 100644
index 00000000000..422567976e2
--- /dev/null
+++ b/kotlin/services/autoscale/src/test/kotlin/AutoScalingTest.kt
@@ -0,0 +1,153 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.example.autoscaling.createAutoScalingGroup
+import com.example.autoscaling.deleteSpecificAutoScalingGroup
+import com.example.autoscaling.describeAccountLimits
+import com.example.autoscaling.describeAutoScalingGroups
+import com.example.autoscaling.describeAutoScalingInstance
+import com.example.autoscaling.describeScalingActivities
+import com.example.autoscaling.disableMetricsCollection
+import com.example.autoscaling.enableMetricsCollection
+import com.example.autoscaling.getAutoScalingGroups
+import com.example.autoscaling.getSpecificAutoScaling
+import com.example.autoscaling.setDesiredCapacity
+import com.example.autoscaling.terminateInstanceInAutoScalingGroup
+import com.example.autoscaling.updateAutoScalingGroup
+import com.google.gson.Gson
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+import java.io.IOException
+import java.util.Random
+import kotlin.system.exitProcess
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class AutoScalingTest {
+ private var groupName = ""
+ private var groupNameSc = ""
+ private var launchTemplateName = ""
+ private var vpcZoneId = ""
+ private var serviceLinkedRoleARN = ""
+
+ @BeforeAll
+ @Throws(IOException::class)
+ fun setUp() = runBlocking {
+ val random = Random()
+ val randomNum = random.nextInt(10000 - 1 + 1) + 1
+ // Get the values from AWS Secrets Manager.
+ val gson = Gson()
+ val json = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ groupName = values.groupName.toString() + randomNum
+ launchTemplateName = values.launchTemplateName.toString()
+ vpcZoneId = values.vpcZoneId.toString()
+ serviceLinkedRoleARN = values.serviceLinkedRoleARN.toString()
+ groupNameSc = values.groupNameSc.toString() + randomNum
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ /*
+ try {
+ AutoScalingTest::class.java.getClassLoader().getResourceAsStream("config.properties").use { input ->
+ val prop = Properties()
+ if (input == null) {
+ println("Sorry, unable to find config.properties")
+ return
+ }
+ prop.load(input)
+ groupName = prop.getProperty("groupName")
+ launchTemplateName = prop.getProperty("launchTemplateName")
+ subnetId = prop.getProperty("subnetId")
+ vpcZoneId = "subnet-0ddc451b8a8a1aa44" //prop.getProperty("vpcZoneId")
+ }
+ } catch (ex:IOException) {
+ ex.printStackTrace()
+ }
+ */
+ }
+
+ @Test
+ @Order(1)
+ fun testScenario() = runBlocking {
+ println("**** Create an Auto Scaling group named $groupName")
+ createAutoScalingGroup(groupName, launchTemplateName, serviceLinkedRoleARN, vpcZoneId)
+
+ println("Wait 1 min for the resources, including the instance. Otherwise, an empty instance Id is returned")
+ delay(60000)
+
+ val instanceId = getSpecificAutoScaling(groupName)
+ if (instanceId.compareTo("") == 0) {
+ println("Error - no instance Id value")
+ exitProcess(1)
+ } else {
+ println("The instance Id value is $instanceId")
+ }
+
+ println("**** Describe Auto Scaling with the Id value $instanceId")
+ describeAutoScalingInstance(instanceId)
+
+ println("**** Enable metrics collection $instanceId")
+ enableMetricsCollection(groupName)
+
+ println("**** Update an Auto Scaling group to update max size to 3")
+ updateAutoScalingGroup(groupName, launchTemplateName, serviceLinkedRoleARN)
+
+ println("**** Describe all Auto Scaling groups to show the current state of the groups")
+ describeAutoScalingGroups(groupName)
+
+ println("**** Describe account details")
+ describeAccountLimits()
+
+ println("Wait 1 min for the resources, including the instance. Otherwise, an empty instance Id is returned")
+ delay(60000)
+
+ println("**** Set desired capacity to 2")
+ setDesiredCapacity(groupName)
+
+ println("**** Get the two instance Id values and state")
+ getAutoScalingGroups(groupName)
+
+ println("**** List the scaling activities that have occurred for the group")
+ describeScalingActivities(groupName)
+
+ println("**** Terminate an instance in the Auto Scaling group")
+ terminateInstanceInAutoScalingGroup(instanceId)
+
+ println("**** Stop the metrics collection")
+ disableMetricsCollection(groupName)
+
+ println("**** Delete the Auto Scaling group")
+ deleteSpecificAutoScalingGroup(groupName)
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/autoscale"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/autoscale (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val groupName: String? = null
+ val groupNameSc: String? = null
+ val launchTemplateName: String? = null
+ val vpcZoneId: String? = null
+ val serviceLinkedRoleARN: String? = null
+ }
+}
diff --git a/kotlin/services/bedrock/README.md b/kotlin/services/bedrock/README.md
index 3926370f45c..1d1d6510720 100644
--- a/kotlin/services/bedrock/README.md
+++ b/kotlin/services/bedrock/README.md
@@ -34,7 +34,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [List available Amazon Bedrock foundation models](src/main/kotlin/com/example/bedrock/ListFoundationModels.kt#L31) (`ListFoundationModels`)
+- [List available Amazon Bedrock foundation models](src/main/kotlin/com/example/bedrock/ListFoundationModels.kt#L24) (`ListFoundationModels`)
diff --git a/kotlin/services/cloudformation/build.gradle.kts b/kotlin/services/cloudformation/build.gradle.kts
index b842f4c3624..bc69f3b9c88 100644
--- a/kotlin/services/cloudformation/build.gradle.kts
+++ b/kotlin/services/cloudformation/build.gradle.kts
@@ -27,8 +27,8 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:cloudformation:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:cloudformation:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
implementation("com.google.code.gson:gson:2.10")
diff --git a/kotlin/services/cloudformation/src/test/kotlin/CloudFormationTest.kt b/kotlin/services/cloudformation/src/test/kotlin/CloudFormationTest.kt
new file mode 100644
index 00000000000..ce01dcf7324
--- /dev/null
+++ b/kotlin/services/cloudformation/src/test/kotlin/CloudFormationTest.kt
@@ -0,0 +1,103 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.cloudformation.createCFStack
+import com.kotlin.cloudformation.deleteSpecificTemplate
+import com.kotlin.cloudformation.describeAllStacks
+import com.kotlin.cloudformation.getSpecificTemplate
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class CloudFormationTest {
+ private var stackName = ""
+ private var roleARN = ""
+ private var location = ""
+ private var key = ""
+ private var value = ""
+
+ @BeforeAll
+ fun setup() = runBlocking() {
+ // Get the values from AWS Secrets Manager.
+ val gson = Gson()
+ val json: String = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ stackName = values.stackName.toString()
+ roleARN = values.roleARN.toString()
+ location = values.location.toString()
+ key = values.key.toString()
+ value = values.value.toString()
+
+ /*
+ val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
+ val prop = Properties()
+ prop.load(input)
+ stackName = prop.getProperty("stackName")
+ roleARN = prop.getProperty("roleARN")
+ location = prop.getProperty("location")
+ key = prop.getProperty("key")
+ value = prop.getProperty("value")
+ */
+ }
+
+ @Test
+ @Order(1)
+ fun createStackTest() = runBlocking {
+ createCFStack(stackName, roleARN, location, key, value)
+ println("Test 1 passed")
+ }
+
+ @Test
+ @Order(2)
+ fun describeStacksTest() = runBlocking {
+ describeAllStacks()
+ println("Test 2 passed")
+ }
+
+ @Test
+ @Order(3)
+ fun getTemplateTest() = runBlocking {
+ getSpecificTemplate(stackName)
+ println("Test 3 passed")
+ }
+
+ @Test
+ @Order(4)
+ fun deleteStackTest() = runBlocking {
+ deleteSpecificTemplate(stackName)
+ println("Test 4 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/cloudformation"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/cloudformation (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val stackName: String? = null
+ val roleARN: String? = null
+ val location: String? = null
+ val key: String? = null
+ val value: String? = null
+ }
+}
diff --git a/kotlin/services/cloudtrail/build.gradle.kts b/kotlin/services/cloudtrail/build.gradle.kts
index 28b4255e46e..619a58cc10b 100644
--- a/kotlin/services/cloudtrail/build.gradle.kts
+++ b/kotlin/services/cloudtrail/build.gradle.kts
@@ -27,8 +27,8 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:cloudtrail:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:cloudtrail:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
implementation("com.google.code.gson:gson:2.10")
diff --git a/kotlin/services/cloudtrail/src/test/kotlin/CloudtrailKotlinTest.kt b/kotlin/services/cloudtrail/src/test/kotlin/CloudtrailKotlinTest.kt
new file mode 100644
index 00000000000..ad82fc600c3
--- /dev/null
+++ b/kotlin/services/cloudtrail/src/test/kotlin/CloudtrailKotlinTest.kt
@@ -0,0 +1,119 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.cloudtrail.createNewTrail
+import com.kotlin.cloudtrail.deleteSpecificTrail
+import com.kotlin.cloudtrail.describeSpecificTrails
+import com.kotlin.cloudtrail.getSelectors
+import com.kotlin.cloudtrail.lookupAllEvents
+import com.kotlin.cloudtrail.setSelector
+import com.kotlin.cloudtrail.startLog
+import com.kotlin.cloudtrail.stopLog
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class CloudtrailKotlinTest {
+ private var trailName = ""
+ private var s3BucketName = ""
+
+ @BeforeAll
+ fun setup() = runBlocking {
+ val gson = Gson()
+ val json: String = getSecretValues()
+ val values: SecretValues = gson.fromJson(json, SecretValues::class.java)
+ trailName = values.trailName.toString()
+ s3BucketName = values.s3BucketName.toString()
+
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ /*
+ val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
+ val prop = Properties()
+
+ // load the properties file.
+ prop.load(input)
+ trailName = prop.getProperty("trailName")
+ s3BucketName = prop.getProperty("s3BucketName")
+ */
+ }
+
+ @Test
+ @Order(1)
+ fun createTrail() = runBlocking {
+ createNewTrail(trailName, s3BucketName)
+ println("Test 1 passed")
+ }
+
+ @Test
+ @Order(2)
+ fun putEventSelectors() = runBlocking {
+ setSelector(trailName)
+ println("Test 2 passed")
+ }
+
+ @Test
+ @Order(3)
+ fun getEventSelectors() = runBlocking {
+ getSelectors(trailName)
+ println("Test 3 passed")
+ }
+
+ @Test
+ @Order(4)
+ fun lookupEvents() = runBlocking {
+ lookupAllEvents()
+ println("Test 4 passed")
+ }
+
+ @Test
+ @Order(5)
+ fun describeTrails() = runBlocking {
+ describeSpecificTrails(trailName)
+ println("Test 5 passed")
+ }
+
+ @Test
+ @Order(6)
+ fun startLogging() = runBlocking {
+ startLog(trailName)
+ stopLog(trailName)
+ println("Test 6 passed")
+ }
+
+ @Test
+ @Order(7)
+ fun deleteTrail() = runBlocking {
+ deleteSpecificTrail(trailName)
+ println("Test 7 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/cloudtrail"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/cloudtrail (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val trailName: String? = null
+ val s3BucketName: String? = null
+ }
+}
diff --git a/kotlin/services/cloudwatch/Readme.md b/kotlin/services/cloudwatch/Readme.md
index 8e7ea36e66c..28a42594d21 100644
--- a/kotlin/services/cloudwatch/Readme.md
+++ b/kotlin/services/cloudwatch/Readme.md
@@ -36,31 +36,31 @@ To run these examples, you must have the following three JSON files: jsonWidgets
### Get started
-- [Hello CloudWatch](src/main/kotlin/com/kotlin/cloudwatch/HelloService.kt#L17) (`ListMetrics`)
+- [Hello CloudWatch](src/main/kotlin/com/kotlin/cloudwatch/HelloService.kt#L11) (`ListMetrics`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a dashboard](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L680) (`PutDashboard`)
-- [Create a metric alarm](src/main/kotlin/com/kotlin/cloudwatch/PutMetricAlarm.kt#L51) (`PutMetricAlarm`)
-- [Create an anomaly detector](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L384) (`PutAnomalyDetector`)
-- [Delete alarms](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L301) (`DeleteAlarms`)
-- [Delete an anomaly detector](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L276) (`DeleteAnomalyDetector`)
-- [Delete dashboards](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L314) (`DeleteDashboards`)
-- [Describe alarm history](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L409) (`DescribeAlarmHistory`)
-- [Describe alarms](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L566) (`DescribeAlarms`)
-- [Describe alarms for a metric](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L442) (`DescribeAlarmsForMetric`)
-- [Describe anomaly detectors](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L361) (`DescribeAnomalyDetectors`)
-- [Disable alarm actions](src/main/kotlin/com/kotlin/cloudwatch/DisableAlarmActions.kt#L46) (`DisableAlarmActions`)
-- [Enable alarm actions](src/main/kotlin/com/kotlin/cloudwatch/EnableAlarmActions.kt#L45) (`EnableAlarmActions`)
-- [Get a metric data image](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L326) (`GetMetricWidgetImage`)
-- [Get metric data](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L512) (`GetMetricData`)
-- [Get metric statistics](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L745) (`GetMetricStatistics`)
-- [List dashboards](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L667) (`ListDashboards`)
-- [List metrics](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L775) (`ListMetrics`)
-- [Put data into a metric](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L471) (`PutMetricData`)
+- [Create a dashboard](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L674) (`PutDashboard`)
+- [Create a metric alarm](src/main/kotlin/com/kotlin/cloudwatch/PutMetricAlarm.kt#L45) (`PutMetricAlarm`)
+- [Create an anomaly detector](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L378) (`PutAnomalyDetector`)
+- [Delete alarms](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L295) (`DeleteAlarms`)
+- [Delete an anomaly detector](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L270) (`DeleteAnomalyDetector`)
+- [Delete dashboards](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L308) (`DeleteDashboards`)
+- [Describe alarm history](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L403) (`DescribeAlarmHistory`)
+- [Describe alarms](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L560) (`DescribeAlarms`)
+- [Describe alarms for a metric](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L436) (`DescribeAlarmsForMetric`)
+- [Describe anomaly detectors](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L355) (`DescribeAnomalyDetectors`)
+- [Disable alarm actions](src/main/kotlin/com/kotlin/cloudwatch/DisableAlarmActions.kt#L40) (`DisableAlarmActions`)
+- [Enable alarm actions](src/main/kotlin/com/kotlin/cloudwatch/EnableAlarmActions.kt#L39) (`EnableAlarmActions`)
+- [Get a metric data image](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L320) (`GetMetricWidgetImage`)
+- [Get metric data](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L506) (`GetMetricData`)
+- [Get metric statistics](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L739) (`GetMetricStatistics`)
+- [List dashboards](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L661) (`ListDashboards`)
+- [List metrics](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L769) (`ListMetrics`)
+- [Put data into a metric](src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt#L465) (`PutMetricData`)
### Scenarios
diff --git a/kotlin/services/cloudwatch/build.gradle.kts b/kotlin/services/cloudwatch/build.gradle.kts
index bc68e2bf1a1..0a50fd2b94a 100644
--- a/kotlin/services/cloudwatch/build.gradle.kts
+++ b/kotlin/services/cloudwatch/build.gradle.kts
@@ -25,10 +25,11 @@ buildscript {
repositories {
mavenCentral()
}
+
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:cloudwatch:1.0.0")
- implementation("aws.sdk.kotlin:cloudwatchevents:1.0.0")
+ implementation("aws.sdk.kotlin:cloudwatch:1.0.30")
+ implementation("aws.sdk.kotlin:cloudwatchevents:1.0.30")
implementation("aws.sdk.kotlin:cloudwatchlogs:1.0.0")
implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
diff --git a/kotlin/services/cloudwatch/src/test/kotlin/CloudWatchTest.kt b/kotlin/services/cloudwatch/src/test/kotlin/CloudWatchTest.kt
index 414f6990185..54e80709779 100644
--- a/kotlin/services/cloudwatch/src/test/kotlin/CloudWatchTest.kt
+++ b/kotlin/services/cloudwatch/src/test/kotlin/CloudWatchTest.kt
@@ -1,54 +1,32 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
-import com.kotlin.cloudwatch.DASHES
-import com.kotlin.cloudwatch.addAnomalyDetector
-import com.kotlin.cloudwatch.addMetricDataForAlarm
-import com.kotlin.cloudwatch.addMetricToDashboard
-import com.kotlin.cloudwatch.checkForMetricAlarm
-import com.kotlin.cloudwatch.createAlarm
-import com.kotlin.cloudwatch.createDashboardWithMetrics
-import com.kotlin.cloudwatch.createNewCustomMetric
-import com.kotlin.cloudwatch.deleteAlarm
-import com.kotlin.cloudwatch.deleteAnomalyDetector
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
import com.kotlin.cloudwatch.deleteCWAlarm
-import com.kotlin.cloudwatch.deleteDashboard
import com.kotlin.cloudwatch.deleteSubFilter
import com.kotlin.cloudwatch.desCWAlarms
-import com.kotlin.cloudwatch.describeAlarms
-import com.kotlin.cloudwatch.describeAnomalyDetectors
import com.kotlin.cloudwatch.describeFilters
import com.kotlin.cloudwatch.disableActions
import com.kotlin.cloudwatch.enableActions
-import com.kotlin.cloudwatch.getAlarmHistory
-import com.kotlin.cloudwatch.getAndDisplayMetricStatistics
-import com.kotlin.cloudwatch.getAndOpenMetricImage
import com.kotlin.cloudwatch.getCWLogEvents
-import com.kotlin.cloudwatch.getCustomMetricData
import com.kotlin.cloudwatch.getMetData
-import com.kotlin.cloudwatch.getMetricStatistics
-import com.kotlin.cloudwatch.getSpecificMet
-import com.kotlin.cloudwatch.listDashboards
-import com.kotlin.cloudwatch.listMets
-import com.kotlin.cloudwatch.listNameSpaces
import com.kotlin.cloudwatch.putAlarm
import com.kotlin.cloudwatch.putCWEvents
import com.kotlin.cloudwatch.putCWLogEvents
import com.kotlin.cloudwatch.putCWRule
import com.kotlin.cloudwatch.putSubFilters
import kotlinx.coroutines.runBlocking
-import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
import org.junit.jupiter.api.Order
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.TestMethodOrder
-import java.io.InputStream
-import java.util.Properties
-import java.util.Scanner
-import kotlin.collections.ArrayList
-import kotlin.system.exitProcess
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@TestMethodOrder(OrderAnnotation::class)
@@ -66,7 +44,6 @@ class CloudWatchTest {
private var namespace = ""
private var filterPattern = ""
private var ruleName = ""
-
private var myDateSc = ""
private var costDateWeekSc = ""
private var dashboardNameSc = ""
@@ -76,7 +53,34 @@ class CloudWatchTest {
private var metricImageSc = ""
@BeforeAll
- fun setup() {
+ fun setup() = runBlocking {
+ // Get the values from AWS Secrets Manager.
+ val gson = Gson()
+ val json: String = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ logGroup = values.logGroup.toString()
+ alarmName = values.alarmName.toString()
+ streamName = values.streamName.toString()
+ ruleResource = values.ruleResource.toString()
+ metricId = values.metricId.toString()
+ filterName = values.filterName.toString()
+ destinationArn = values.destinationArn.toString()
+ roleArn = values.roleArn.toString()
+ filterPattern = values.filterPattern.toString()
+ instanceId = values.instanceId.toString()
+ ruleName = values.ruleName.toString()
+ ruleArn = values.ruleArn.toString()
+ namespace = values.namespace.toString()
+ myDateSc = values.myDateSc.toString()
+ costDateWeekSc = values.costDateWeekSc.toString()
+ dashboardNameSc = values.dashboardNameSc.toString()
+ dashboardJsonSc = values.dashboardJsonSc.toString()
+ dashboardAddSc = values.dashboardAddSc.toString()
+ settingsSc = values.settingsSc.toString()
+ metricImageSc = values.metricImageSc.toString()
+
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ /*
val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
val prop = Properties()
prop.load(input)
@@ -100,265 +104,134 @@ class CloudWatchTest {
dashboardAddSc = prop.getProperty("dashboardAddSc")
settingsSc = prop.getProperty("settingsSc")
metricImageSc = prop.getProperty("metricImageSc")
+ */
}
@Test
@Order(1)
- fun whenInitializingAWSService_thenNotNull() {
- Assertions.assertNotNull(logGroup)
- Assertions.assertNotNull(alarmName)
- Assertions.assertNotNull(streamName)
- Assertions.assertNotNull(ruleResource)
- Assertions.assertNotNull(metricId)
- Assertions.assertNotNull(filterName)
- Assertions.assertNotNull(destinationArn)
- Assertions.assertNotNull(roleArn)
- Assertions.assertNotNull(filterPattern)
- Assertions.assertNotNull(instanceId)
- Assertions.assertNotNull(ruleName)
- Assertions.assertNotNull(ruleArn)
- Assertions.assertNotNull(namespace)
- println("Test 1 passed")
- }
-
- @Test
- @Order(2)
fun createAlarmTest() = runBlocking {
putAlarm(alarmName, instanceId)
- println("Test 2 passed")
+ println("Test 1 passed")
}
@Test
- @Order(3)
+ @Order(2)
fun describeAlarmsTest() = runBlocking {
desCWAlarms()
- println("Test 3 passed")
+ println("Test 2 passed")
}
@Test
- @Order(4)
+ @Order(3)
fun createSubscriptionFiltersTest() = runBlocking {
putSubFilters(filterName, filterPattern, logGroup, destinationArn)
- println("Test 4 passed")
+ println("Test 3 passed")
}
@Test
- @Order(5)
+ @Order(4)
fun describeSubscriptionFiltersTest() = runBlocking {
describeFilters(logGroup)
- println("Test 5 passed")
+ println("Test 4 passed")
}
@Test
- @Order(6)
+ @Order(5)
fun disableAlarmActionsTest() = runBlocking {
disableActions(alarmName)
- println("Test 6 passed")
+ println("Test 5 passed")
}
@Test
- @Order(7)
+ @Order(6)
fun enableAlarmActionsTest() = runBlocking {
enableActions(alarmName)
- println("Test 7 passed")
+ println("Test 6 passed")
}
@Test
- @Order(8)
+ @Order(7)
fun getLogEventsTest() = runBlocking {
getCWLogEvents(logGroup, streamName)
- println("Test 8 passed")
+ println("Test 7 passed")
}
@Test
- @Order(9)
+ @Order(8)
fun putCloudWatchEventTest() = runBlocking {
putCWEvents(ruleResource)
- println("Test 9 passed")
+ println("Test 8 passed")
}
@Test
- @Order(10)
+ @Order(9)
fun getMetricDataTest() = runBlocking {
getMetData()
- println("Test 10 passed")
+ println("Test 9 passed")
}
@Test
- @Order(11)
+ @Order(10)
fun deleteSubscriptionFilterTest() = runBlocking {
deleteSubFilter(filterName, logGroup)
- println("Test 11 passed")
+ println("Test 10 passed")
}
@Test
- @Order(12)
+ @Order(11)
fun putRuleTest() = runBlocking {
putCWRule(ruleName, ruleArn)
- println("Test 12 passed")
+ println("Test 11 passed")
}
@Test
- @Order(13)
+ @Order(12)
fun putLogEvents() = runBlocking {
putCWLogEvents(logGroup, streamName)
- println("Test 13 passed")
+ println("Test 12 passed")
}
@Test
- @Order(14)
+ @Order(13)
fun deleteCWAlarmTest() = runBlocking {
deleteCWAlarm(alarmName)
- println("Test 14 passed")
+ println("Test 13 passed")
}
- @Test
- @Order(16)
- fun TestScenario() = runBlocking {
- val inOb = Scanner(System.`in`)
- val dataPoint = "10.0".toDouble()
- println(DASHES)
- println("1. List at least five available unique namespaces from Amazon CloudWatch. Select a CloudWatch namespace from the list.")
- val list: ArrayList = listNameSpaces()
- for (z in 0..4) {
- println(" ${z + 1}. ${list[z]}")
- }
-
- var selectedNamespace: String
- var selectedMetrics = ""
- var num = inOb.nextLine().toInt()
- println("You selected $num")
-
- if (1 <= num && num <= 5) {
- selectedNamespace = list[num - 1]
- } else {
- println("You did not select a valid option.")
- exitProcess(1)
- }
- println("You selected $selectedNamespace")
- println(DASHES)
-
- println(DASHES)
- println("2. List available metrics within the selected namespace and select one from the list.")
- val metList = listMets(selectedNamespace)
- for (z in 0..4) {
- println(" ${ z + 1}. ${metList?.get(z)}")
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/cloudwatch"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
}
- num = inOb.nextLine().toInt()
- if (1 <= num && num <= 5) {
- selectedMetrics = metList!![num - 1]
- } else {
- println("You did not select a valid option.")
- System.exit(1)
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
}
- println("You selected $selectedMetrics")
- val myDimension = getSpecificMet(selectedNamespace)
- if (myDimension == null) {
- println("Error - Dimension is null")
- exitProcess(1)
- }
- println(DASHES)
-
- println(DASHES)
- println("3. Get statistics for the selected metric over the last day.")
- val metricOption: String
- val statTypes = ArrayList()
- statTypes.add("SampleCount")
- statTypes.add("Average")
- statTypes.add("Sum")
- statTypes.add("Minimum")
- statTypes.add("Maximum")
-
- for (t in 0..4) {
- println(" ${t + 1}. ${statTypes[t]}")
- }
- println("Select a metric statistic by entering a number from the preceding list:")
- num = inOb.nextLine().toInt()
- if (1 <= num && num <= 5) {
- metricOption = statTypes[num - 1]
- } else {
- println("You did not select a valid option.")
- exitProcess(1)
- }
- println("You selected $metricOption")
- getAndDisplayMetricStatistics(selectedNamespace, selectedMetrics, metricOption, myDateSc, myDimension)
- println(DASHES)
-
- println(DASHES)
- println("4. Get CloudWatch estimated billing for the last week.")
- getMetricStatistics(costDateWeekSc)
- println(DASHES)
-
- println(DASHES)
- println("5. Create a new CloudWatch dashboard with metrics.")
- createDashboardWithMetrics(dashboardNameSc, dashboardJsonSc)
- println(DASHES)
-
- println(DASHES)
- println("6. List dashboards using a paginator.")
- listDashboards()
- println(DASHES)
-
- println(DASHES)
- println("7. Create a new custom metric by adding data to it.")
- createNewCustomMetric(dataPoint)
- println(DASHES)
-
- println(DASHES)
- println("8. Add an additional metric to the dashboard.")
- addMetricToDashboard(dashboardAddSc, dashboardNameSc)
- println(DASHES)
-
- println(DASHES)
- println("9. Create an alarm for the custom metric.")
- val alarmName: String = createAlarm(settingsSc)
- println(DASHES)
-
- println(DASHES)
- println("10. Describe 10 current alarms.")
- describeAlarms()
- println(DASHES)
-
- println(DASHES)
- println("11. Get current data for the new custom metric.")
- getCustomMetricData(settingsSc)
- println(DASHES)
-
- println(DASHES)
- println("12. Push data into the custom metric to trigger the alarm.")
- addMetricDataForAlarm(settingsSc)
- println(DASHES)
-
- println(DASHES)
- println("13. Check the alarm state using the action DescribeAlarmsForMetric.")
- checkForMetricAlarm(settingsSc)
- println(DASHES)
-
- println(DASHES)
- println("14. Get alarm history for the new alarm.")
- getAlarmHistory(settingsSc, myDateSc)
- println(DASHES)
-
- println(DASHES)
- println("15. Add an anomaly detector for the custom metric.")
- addAnomalyDetector(settingsSc)
- println(DASHES)
-
- println(DASHES)
- println("16. Describe current anomaly detectors.")
- describeAnomalyDetectors(settingsSc)
- println(DASHES)
-
- println(DASHES)
- println("17. Get a metric image for the custom metric.")
- getAndOpenMetricImage(metricImageSc)
- println(DASHES)
+ }
- println(DASHES)
- println("18. Clean up the Amazon CloudWatch resources.")
- deleteDashboard(dashboardNameSc)
- deleteAlarm(alarmName)
- deleteAnomalyDetector(settingsSc)
- println(DASHES)
+ @Nested
+ @DisplayName("A class used to get test values from test/cloudwatch (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ // Provide getter methods for each of the test values
+ val logGroup: String? = null
+ val alarmName: String? = null
+ val instanceId: String? = null
+ val streamName: String? = null
+ val ruleResource: String? = null
+ val metricId: String? = null
+ val filterName: String? = null
+ val destinationArn: String? = null
+ val roleArn: String? = null
+ val ruleArn: String? = null
+ val filterPattern: String? = null
+ val ruleName: String? = null
+ val namespace: String? = null
+ val myDateSc: String? = null
+ val costDateWeekSc: String? = null
+ val dashboardNameSc: String? = null
+ val dashboardJsonSc: String? = null
+ val dashboardAddSc: String? = null
+ val settingsSc: String? = null
+ val metricImageSc: String? = null
}
}
diff --git a/kotlin/services/codepipeline/build.gradle.kts b/kotlin/services/codepipeline/build.gradle.kts
index 9f4a8c74285..d1e0006e757 100644
--- a/kotlin/services/codepipeline/build.gradle.kts
+++ b/kotlin/services/codepipeline/build.gradle.kts
@@ -27,8 +27,8 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:codepipeline:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:codepipeline:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
implementation("com.google.code.gson:gson:2.10")
diff --git a/kotlin/services/codepipeline/src/test/kotlin/PipelineServiceTest.kt b/kotlin/services/codepipeline/src/test/kotlin/PipelineServiceTest.kt
new file mode 100644
index 00000000000..6bd56fc9476
--- /dev/null
+++ b/kotlin/services/codepipeline/src/test/kotlin/PipelineServiceTest.kt
@@ -0,0 +1,106 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.pipeline.createNewPipeline
+import com.kotlin.pipeline.deleteSpecificPipeline
+import com.kotlin.pipeline.executePipeline
+import com.kotlin.pipeline.getAllPipelines
+import com.kotlin.pipeline.getSpecificPipeline
+import com.kotlin.pipeline.listExecutions
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+import java.util.*
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class PipelineServiceTest {
+ private var name: String = ""
+ private var roleArn: String = ""
+ private var s3Bucket: String = ""
+ private var s3OutputBucket: String = ""
+
+ @BeforeAll
+ fun setup() = runBlocking {
+ // Get values from AWS Secrets Manager.
+ val gson = Gson()
+ val json: String = getSecretValues()
+ val values: SecretValues = gson.fromJson(json, SecretValues::class.java)
+ name = values.name.toString()
+ roleArn = values.role.toString()
+ s3Bucket = values.s3Bucket.toString()
+ s3OutputBucket = values.s3OutputBucket.toString()
+ }
+
+ @Test
+ @Order(1)
+ fun createPipelineTest() = runBlocking {
+ createNewPipeline(name, roleArn, s3Bucket, s3OutputBucket)
+ println("\n Test 1 passed")
+ }
+
+ @Test
+ @Order(2)
+ fun startPipelineExecutionTest() = runBlocking {
+ executePipeline(name)
+ println("Test 2 passed")
+ }
+
+ @Test
+ @Order(3)
+ fun listPipelinesTest() = runBlocking {
+ getAllPipelines()
+ println("Test 3 passed")
+ }
+
+ @Test
+ @Order(4)
+ fun getPipelineTest() = runBlocking {
+ getSpecificPipeline(name)
+ println("Test 4 passed")
+ }
+
+ @Test
+ @Order(5)
+ fun listPipelineExecutionsTest() = runBlocking {
+ listExecutions(name)
+ println("Test 5 passed")
+ }
+
+ @Test
+ @Order(6)
+ fun deletePipelineTest() = runBlocking {
+ deleteSpecificPipeline(name)
+ println("Test 6 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/pipeline"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/apigateway (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val name: String? = null
+ val role: String? = null
+ val s3Bucket: String? = null
+ val s3OutputBucket: String? = null
+ }
+}
diff --git a/kotlin/services/codepipeline/src/test/resources/config.properties b/kotlin/services/codepipeline/src/test/resources/config.properties
new file mode 100644
index 00000000000..090967de2b0
--- /dev/null
+++ b/kotlin/services/codepipeline/src/test/resources/config.properties
@@ -0,0 +1,4 @@
+roleArn =
+name =
+s3Bucket =
+s3OuputBucket =
\ No newline at end of file
diff --git a/kotlin/services/cognito/build.gradle.kts b/kotlin/services/cognito/build.gradle.kts
index 100a0f96b44..06ef4f7fc0f 100644
--- a/kotlin/services/cognito/build.gradle.kts
+++ b/kotlin/services/cognito/build.gradle.kts
@@ -27,9 +27,9 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:cognitoidentityprovider:1.0.0")
- implementation("aws.sdk.kotlin:cognitoidentity:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:cognitoidentityprovider:1.0.30")
+ implementation("aws.sdk.kotlin:cognitoidentity:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
diff --git a/kotlin/services/cognito/src/test/kotlin/CognitoKotlinTest.kt b/kotlin/services/cognito/src/test/kotlin/CognitoKotlinTest.kt
index d742cade798..257fa95bff9 100644
--- a/kotlin/services/cognito/src/test/kotlin/CognitoKotlinTest.kt
+++ b/kotlin/services/cognito/src/test/kotlin/CognitoKotlinTest.kt
@@ -1,35 +1,32 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
-import com.kotlin.cognito.adminRespondToAuthChallenge
-import com.kotlin.cognito.checkAuthMethod
-import com.kotlin.cognito.confirmSignUp
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
import com.kotlin.cognito.createIdPool
import com.kotlin.cognito.createNewUser
import com.kotlin.cognito.createPool
import com.kotlin.cognito.delPool
import com.kotlin.cognito.deleteIdPool
import com.kotlin.cognito.describePool
-import com.kotlin.cognito.getAdminUser
import com.kotlin.cognito.getAllPools
import com.kotlin.cognito.getPools
-import com.kotlin.cognito.getSecretForAppMFA
import com.kotlin.cognito.listAllUserPoolClients
import com.kotlin.cognito.listPoolIdentities
-import com.kotlin.cognito.resendConfirmationCode
import com.kotlin.cognito.signUp
-import com.kotlin.cognito.verifyTOTP
import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
import org.junit.jupiter.api.Order
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.TestMethodOrder
-import java.io.InputStream
-import java.util.Properties
-import java.util.Scanner
+import java.util.UUID
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@TestMethodOrder(OrderAnnotation::class)
@@ -57,11 +54,35 @@ class CognitoKotlinTest {
private var emailMVP = ""
@BeforeAll
- fun setup() {
+ fun setup() = runBlocking {
+ val gson = Gson()
+ val json = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ userPoolName = values.userPoolName.toString()
+ username = values.username + "_" + UUID.randomUUID()
+ email = values.email.toString()
+ clientName = values.clientName.toString()
+ identityPoolName = values.identityPoolName.toString()
+ identityId = values.identityId.toString()
+ appId = values.appId.toString()
+ existingUserPoolId = values.existingUserPoolId.toString()
+ existingIdentityPoolId = values.existingIdentityPoolId.toString()
+ providerName = values.providerName.toString()
+ existingPoolName = values.existingPoolName.toString()
+ clientId = values.clientId.toString()
+ secretkey = values.secretkey.toString()
+ password = values.password.toString()
+ poolIdMVP = values.poolIdMVP.toString()
+ clientIdMVP = values.clientIdMVP.toString()
+ userNameMVP = values.userNameMVP.toString()
+ passwordMVP = values.passwordMVP.toString()
+ emailMVP = values.emailMVP.toString()
+
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ /*
+ // load the properties file.
val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
val prop = Properties()
-
- // load the properties file.
prop.load(input)
userPoolName = prop.getProperty("userPoolName")
identityId = prop.getProperty("identityId")
@@ -82,161 +103,130 @@ class CognitoKotlinTest {
userNameMVP = prop.getProperty("userNameMVP")
passwordMVP = prop.getProperty("passwordMVP")
emailMVP = prop.getProperty("emailMVP")
- }
- @Test
- @Order(1)
- fun whenInitializingAWSService_thenNotNull() {
- Assertions.assertTrue(!userPoolName.isEmpty())
- Assertions.assertTrue(!identityId.isEmpty())
- Assertions.assertTrue(!username.isEmpty())
- Assertions.assertTrue(!email.isEmpty())
- Assertions.assertTrue(!clientName.isEmpty())
- Assertions.assertTrue(!identityPoolName.isEmpty())
- Assertions.assertTrue(!appId.isEmpty())
- Assertions.assertTrue(!existingUserPoolId.isEmpty())
- Assertions.assertTrue(!existingIdentityPoolId.isEmpty())
- Assertions.assertTrue(!providerName.isEmpty())
- Assertions.assertTrue(!existingPoolName.isEmpty())
- Assertions.assertTrue(!clientId.isEmpty())
- Assertions.assertTrue(!secretkey.isEmpty())
- Assertions.assertTrue(!password.isEmpty())
- println("Test 1 passed")
+ */
}
@Test
- @Order(2)
+ @Order(1)
fun createUserPoolTest() = runBlocking {
userPoolId = createPool(userPoolName).toString()
Assertions.assertTrue(!userPoolId.isEmpty())
- println("Test 2 passed")
+ println("Test 1 passed")
}
@Test
- @Order(3)
+ @Order(2)
fun createAdminUserTest() = runBlocking {
createNewUser(userPoolId, username, email, password)
- println("Test 3 passed")
+ println("Test 2 passed")
}
@Test
- @Order(4)
+ @Order(3)
fun signUpUserTest() = runBlocking {
signUp(clientId, secretkey, username, password, email)
- println("Test 4 passed")
+ println("Test 3 passed")
}
@Test
- @Order(5)
+ @Order(4)
fun listUserPoolsTest() = runBlocking {
getAllPools()
- println("Test 5 passed")
+ println("Test 4 passed")
}
@Test
- @Order(6)
+ @Order(5)
fun listUserPoolClientsTest() = runBlocking {
listAllUserPoolClients(existingUserPoolId)
- println("Test 6 passed")
+ println("Test 5 passed")
}
@Test
- @Order(7)
+ @Order(6)
fun listUsersTest() = runBlocking {
listAllUserPoolClients(existingUserPoolId)
- println("Test 7 passed")
+ println("Test 6 passed")
}
@Test
- @Order(8)
+ @Order(7)
fun describeUserPoolTest() = runBlocking {
describePool(existingUserPoolId)
- println("Test 8 passed")
+ println("Test 7 passed")
}
@Test
- @Order(9)
+ @Order(8)
fun deleteUserPool() = runBlocking {
delPool(userPoolId)
- println("Test 9 passed")
+ println("Test 8 passed")
}
@Test
- @Order(10)
+ @Order(9)
fun createIdentityPoolTest() = runBlocking {
identityPoolId = createIdPool(identityPoolName).toString()
Assertions.assertTrue(!identityPoolId.isEmpty())
- println("Test 10 passed")
+ println("Test 9 passed")
}
@Test
- @Order(11)
+ @Order(10)
fun listIdentityProvidersTest() = runBlocking {
getPools()
- println("Test 11 passed")
+ println("Test 10 passed")
}
@Test
- @Order(12)
+ @Order(11)
fun listIdentitiesTest() = runBlocking {
listPoolIdentities(identityPoolId)
- println("Test 12 passed")
+ println("Test 11 passed")
}
@Test
- @Order(13)
+ @Order(12)
fun deleteIdentityPool() = runBlocking {
deleteIdPool(identityPoolId)
- println("Test 13 passed")
+ println("Test 12 passed")
}
- @Test
- @Order(14)
- fun testCognitoMVP() = runBlocking {
- println("*** Enter your use name")
- val inOb = Scanner(System.`in`)
- val userName = inOb.nextLine()
- println(userName)
-
- println("*** Enter your password")
- val password: String = inOb.nextLine()
-
- println("*** Enter your email")
- val email = inOb.nextLine()
-
- println("*** Signing up $userName")
- signUp(clientIdMVP, userName, password, email)
-
- println("*** Getting $userName in the user pool")
- getAdminUser(userName, poolIdMVP)
-
- println("*** Conformation code sent to $userName. Would you like to send a new code? (Yes/No)")
- val ans = inOb.nextLine()
-
- if (ans.compareTo("Yes") == 0) {
- println("*** Sending a new confirmation code")
- resendConfirmationCode(clientIdMVP, userName)
+ private suspend fun getSecretValues(): String {
+ val secretClient = SecretsManagerClient {
+ region = "us-east-1"
+ credentialsProvider = EnvironmentCredentialsProvider()
}
- println("*** Enter the confirmation code that was emailed")
- val code = inOb.nextLine()
- confirmSignUp(clientIdMVP, code, userName)
-
- println("*** Rechecking the status of $userName in the user pool")
- getAdminUser(userName, poolIdMVP)
-
- val authResponse = checkAuthMethod(clientIdMVP, userName, password, poolIdMVP)
- val mySession = authResponse.session
-
- val newSession = getSecretForAppMFA(mySession)
- println("*** Enter the 6-digit code displayed in Google Authenticator")
- val myCode = inOb.nextLine()
-
- // Verify the TOTP and register for MFA.
- verifyTOTP(newSession, myCode)
- println("*** Re-enter a 6-digit code displayed in Google Authenticator")
- val mfaCode: String = inOb.nextLine()
- val authResponse1 = checkAuthMethod(clientId, userNameMVP, password, poolIdMVP)
- val session2 = authResponse1.session
- adminRespondToAuthChallenge(userName, clientId, mfaCode, session2)
+ val secretName = "test/cognito"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/cognito (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val username: String? = null
+ val userPoolName: String? = null
+ val identityId: String? = null
+ val email: String? = null
+ val clientName: String? = null
+ val identityPoolName: String? = null
+ val existingPoolName: String? = null
+ val existingIdentityPoolId: String? = null
+ val existingUserPoolId: String? = null
+ val providerName: String? = null
+ val clientId: String? = null
+ val appId: String? = null
+ val secretkey: String? = null
+ val password: String? = null
+ val poolIdMVP: String? = null
+ val clientIdMVP: String? = null
+ val userNameMVP: String? = null
+ val passwordMVP: String? = null
+ val emailMVP: String? = null
}
}
diff --git a/kotlin/services/comprehend/build.gradle.kts b/kotlin/services/comprehend/build.gradle.kts
index 0ec109cd33c..51cf4fd5772 100644
--- a/kotlin/services/comprehend/build.gradle.kts
+++ b/kotlin/services/comprehend/build.gradle.kts
@@ -29,8 +29,8 @@ repositories {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:comprehend:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:comprehend:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
implementation("com.google.code.gson:gson:2.10")
diff --git a/kotlin/services/comprehend/src/test/java/ComprehendKotlinTest.kt b/kotlin/services/comprehend/src/test/java/ComprehendKotlinTest.kt
new file mode 100644
index 00000000000..93f47ea41f6
--- /dev/null
+++ b/kotlin/services/comprehend/src/test/java/ComprehendKotlinTest.kt
@@ -0,0 +1,112 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.comprehend.detectAllEntities
+import com.kotlin.comprehend.detectAllKeyPhrases
+import com.kotlin.comprehend.detectAllSyntax
+import com.kotlin.comprehend.detectSentiments
+import com.kotlin.comprehend.detectTheDominantLanguage
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class ComprehendKotlinTest {
+ private val 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"
+ private val frText = "Il pleut aujourd'hui à Seattle"
+ private var dataAccessRoleArn = ""
+ private var s3Uri = ""
+ private var documentClassifierName = ""
+
+ @BeforeAll
+ fun setup() = runBlocking {
+ // Get the values to run these tests from AWS Secrets Manager.
+ val gson = Gson()
+ val json = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ dataAccessRoleArn = values.dataAccessRoleArn.toString()
+ s3Uri = values.s3Uri.toString()
+ documentClassifierName = values.documentClassifier.toString()
+
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ /*
+ val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
+ val prop = Properties()
+
+ // load the properties file.
+ prop.load(input)
+
+ // Populate the data members required for all tests.
+ dataAccessRoleArn = prop.getProperty("dataAccessRoleArn")
+ s3Uri = prop.getProperty("s3Uri")
+ documentClassifierName = prop.getProperty("documentClassifier")
+ */
+ }
+
+ @Test
+ @Order(1)
+ fun detectEntitiesTest() = runBlocking {
+ detectAllEntities(text)
+ println("Test 1 passed")
+ }
+
+ @Test
+ @Order(2)
+ fun detectKeyPhrasesTest() = runBlocking {
+ detectAllKeyPhrases(text)
+ println("Test 2 passed")
+ }
+
+ @Test
+ @Order(3)
+ fun detectLanguageTest() = runBlocking {
+ detectTheDominantLanguage(frText)
+ println("Test 3 passed")
+ }
+
+ @Test
+ @Order(4)
+ fun detectSentimentTest() = runBlocking {
+ detectSentiments(text)
+ println("Test 4 passed")
+ }
+
+ @Test
+ @Order(5)
+ fun detectSyntaxTest() = runBlocking {
+ detectAllSyntax(text)
+ println("Test 5 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretClient = SecretsManagerClient {
+ region = "us-east-1"
+ credentialsProvider = EnvironmentCredentialsProvider()
+ }
+ val secretName = "test/comprehend"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/comprehend (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val dataAccessRoleArn: String? = null
+ val s3Uri: String? = null
+ val documentClassifier: String? = null
+ }
+}
diff --git a/kotlin/services/dynamodb/Readme.md b/kotlin/services/dynamodb/Readme.md
index 16bcc550ebd..375e0bd4c8f 100644
--- a/kotlin/services/dynamodb/Readme.md
+++ b/kotlin/services/dynamodb/Readme.md
@@ -33,15 +33,15 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Create a table](src/main/kotlin/com/kotlin/dynamodb/CreateTable.kt#L55) (`CreateTable`)
-- [Delete a table](src/main/kotlin/com/kotlin/dynamodb/DeleteTable.kt#L44) (`DeleteTable`)
-- [Delete an item from a table](src/main/kotlin/com/kotlin/dynamodb/DeleteItem.kt#L49) (`DeleteItem`)
-- [Get an item from a table](src/main/kotlin/com/kotlin/dynamodb/GetItem.kt#L50) (`GetItem`)
-- [List tables](src/main/kotlin/com/kotlin/dynamodb/ListTables.kt#L30) (`ListTables`)
-- [Put an item in a table](src/main/kotlin/com/kotlin/dynamodb/PutItem.kt#L63) (`PutItem`)
-- [Query a table](src/main/kotlin/com/kotlin/dynamodb/QueryTable.kt#L54) (`Query`)
-- [Scan a table](src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItems.kt#L45) (`Scan`)
-- [Update an item in a table](src/main/kotlin/com/kotlin/dynamodb/UpdateItem.kt#L57) (`UpdateItem`)
+- [Create a table](src/main/kotlin/com/kotlin/dynamodb/CreateTable.kt#L49) (`CreateTable`)
+- [Delete a table](src/main/kotlin/com/kotlin/dynamodb/DeleteTable.kt#L38) (`DeleteTable`)
+- [Delete an item from a table](src/main/kotlin/com/kotlin/dynamodb/DeleteItem.kt#L43) (`DeleteItem`)
+- [Get an item from a table](src/main/kotlin/com/kotlin/dynamodb/GetItem.kt#L44) (`GetItem`)
+- [List tables](src/main/kotlin/com/kotlin/dynamodb/ListTables.kt#L24) (`ListTables`)
+- [Put an item in a table](src/main/kotlin/com/kotlin/dynamodb/PutItem.kt#L57) (`PutItem`)
+- [Query a table](src/main/kotlin/com/kotlin/dynamodb/QueryTable.kt#L48) (`Query`)
+- [Scan a table](src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItems.kt#L39) (`Scan`)
+- [Update an item in a table](src/main/kotlin/com/kotlin/dynamodb/UpdateItem.kt#L51) (`UpdateItem`)
### Scenarios
diff --git a/kotlin/services/dynamodb/build.gradle.kts b/kotlin/services/dynamodb/build.gradle.kts
index 384f179277a..030c45d27a5 100644
--- a/kotlin/services/dynamodb/build.gradle.kts
+++ b/kotlin/services/dynamodb/build.gradle.kts
@@ -18,7 +18,7 @@ buildscript {
maven("https://plugins.gradle.org/m2/")
}
dependencies {
- classpath("org.jlleitschuh.gradle:ktlint-gradle:10.3.0")
+ classpath("org.jlleitschuh.gradle:ktlint-gradle:11.3.1")
}
}
@@ -27,8 +27,8 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:dynamodb:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:dynamodb:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/CreateTable.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/CreateTable.kt
index 3e23ae84dd7..c8af40f3eaa 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/CreateTable.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/CreateTable.kt
@@ -24,7 +24,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -48,7 +47,6 @@ suspend fun main(args: Array) {
// snippet-start:[dynamodb.kotlin.create_table.main]
suspend fun createNewTable(tableNameVal: String, key: String): String? {
-
val attDef = AttributeDefinition {
attributeName = key
attributeType = ScalarAttributeType.S
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DeleteTable.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DeleteTable.kt
index d75d01bc83b..d50eb022121 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DeleteTable.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DeleteTable.kt
@@ -37,7 +37,6 @@ suspend fun main(args: Array) {
// snippet-start:[dynamodb.kotlin.delete_table.main]
suspend fun deleteDynamoDBTable(tableNameVal: String) {
-
val request = DeleteTableRequest {
tableName = tableNameVal
}
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DescribeTable.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DescribeTable.kt
index 67809e0c238..7da16b4c80c 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DescribeTable.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DescribeTable.kt
@@ -18,7 +18,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -38,7 +37,6 @@ suspend fun main(args: Array) {
// snippet-start:[dynamodb.kotlin.describe_table.main]
suspend fun describeDymamoDBTable(tableNameVal: String?) {
-
val request = DescribeTableRequest {
tableName = tableNameVal
}
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBPartiQ.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBPartiQ.kt
index c018ead9630..53ee40e3be5 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBPartiQ.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBPartiQ.kt
@@ -23,7 +23,6 @@ import aws.sdk.kotlin.services.dynamodb.model.ExecuteStatementResponse
// snippet-start:[dynamodb.kotlin.partiql.main]
suspend fun main() {
-
val ddb = DynamoDbClient { region = "us-east-1" }
val parameters = mutableListOf()
parameters.add(AttributeValue.S("Acme Band"))
@@ -84,7 +83,6 @@ suspend fun executeStatementRequest(
statementVal: String,
parametersVal: List
): ExecuteStatementResponse? {
-
val request = ExecuteStatementRequest {
statement = statementVal
parameters = parametersVal
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItems.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItems.kt
index fe06c25ec5c..2057155bf3b 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItems.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItems.kt
@@ -18,7 +18,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -38,7 +37,6 @@ suspend fun main(args: Array) {
// snippet-start:[dynamodb.kotlin.scan_items.main]
suspend fun scanItems(tableNameVal: String) {
-
val request = ScanRequest {
tableName = tableNameVal
}
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItemsFilter.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItemsFilter.kt
index 13bb894074e..544644c2136 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItemsFilter.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/DynamoDBScanItemsFilter.kt
@@ -20,7 +20,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -40,7 +39,6 @@ suspend fun main(args: Array) {
// snippet-start:[dynamodb.kotlin.scan_items_filter.main]
suspend fun scanItemsUsingFilter(tableNameVal: String) {
-
val myMap = HashMap()
myMap.put("#archive2", "archive")
@@ -66,7 +64,6 @@ suspend fun scanItemsUsingFilter(tableNameVal: String) {
println(myVal)
}
"status" -> {
-
val myVal = splitMyString(item[key].toString())
println(myVal)
}
@@ -99,7 +96,6 @@ suspend fun scanItemsUsingFilter(tableNameVal: String) {
}
fun splitMyString(str: String): String {
-
val del1 = "="
val del2 = ")"
val parts = str.split(del1, del2)
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/GetItem.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/GetItem.kt
index de6a21e680a..b69f8f15691 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/GetItem.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/GetItem.kt
@@ -19,7 +19,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -43,7 +42,6 @@ suspend fun main(args: Array) {
// snippet-start:[dynamodb.kotlin.get_item.main]
suspend fun getSpecificItem(tableNameVal: String, keyName: String, keyVal: String) {
-
val keyToGet = mutableMapOf()
keyToGet[keyName] = AttributeValue.S(keyVal)
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ListTables.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ListTables.kt
index 104575f44e8..fac8c78ba64 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ListTables.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ListTables.kt
@@ -17,13 +17,11 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main() {
-
listAllTables()
}
// snippet-start:[dynamodb.kotlin.list_tables.main]
suspend fun listAllTables() {
-
DynamoDbClient { region = "us-east-1" }.use { ddb ->
val response = ddb.listTables(ListTablesRequest {})
response.tableNames?.forEach { tableName ->
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/PutItem.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/PutItem.kt
index d38b06795b5..3d5db4a9897 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/PutItem.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/PutItem.kt
@@ -19,7 +19,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/QueryTable.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/QueryTable.kt
index d54d1a21151..9a999d5f4c8 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/QueryTable.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/QueryTable.kt
@@ -19,7 +19,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -52,7 +51,6 @@ suspend fun queryDynTable(
partitionKeyVal: String,
partitionAlias: String
): Int {
-
val attrNameAlias = mutableMapOf()
attrNameAlias[partitionAlias] = partitionKeyName
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/Scenario.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/Scenario.kt
index 73ebe19ab45..470c9296658 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/Scenario.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/Scenario.kt
@@ -36,7 +36,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
// snippet-start:[dynamodb.kotlin.scenario.main]
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -67,7 +66,6 @@ suspend fun main(args: Array) {
// snippet-start:[dynamodb.kotlin.scenario.create_table.main]
suspend fun createScenarioTable(tableNameVal: String, key: String) {
-
val attDef = AttributeDefinition {
attributeName = key
attributeType = ScalarAttributeType.N
@@ -114,7 +112,6 @@ suspend fun createScenarioTable(tableNameVal: String, key: String) {
// snippet-start:[dynamodb.kotlin.scenario.populate_table.main]
// Load data into the table.
suspend fun loadData(tableName: String, fileName: String) {
-
val parser = JsonFactory().createParser(File(fileName))
val rootNode = ObjectMapper().readTree(parser)
val iter: Iterator = rootNode.iterator()
@@ -122,9 +119,9 @@ suspend fun loadData(tableName: String, fileName: String) {
var t = 0
while (iter.hasNext()) {
-
- if (t == 50)
+ if (t == 50) {
break
+ }
currentNode = iter.next() as ObjectNode
val year = currentNode.path("year").asInt()
@@ -162,7 +159,6 @@ suspend fun putMovie(
// snippet-start:[dynamodb.kotlin.scenario.get_item.main]
suspend fun getMovie(tableNameVal: String, keyName: String, keyVal: String) {
-
val keyToGet = mutableMapOf()
keyToGet[keyName] = AttributeValue.N(keyVal)
keyToGet["title"] = AttributeValue.S("King Kong")
@@ -184,7 +180,6 @@ suspend fun getMovie(tableNameVal: String, keyName: String, keyVal: String) {
// snippet-end:[dynamodb.kotlin.scenario.get_item.main]
suspend fun deletIssuesTable(tableNameVal: String) {
-
val request = DeleteTableRequest {
tableName = tableNameVal
}
@@ -200,7 +195,6 @@ suspend fun queryMovieTable(
partitionKeyName: String,
partitionAlias: String
): Int {
-
val attrNameAlias = mutableMapOf()
attrNameAlias[partitionAlias] = "year"
@@ -222,7 +216,6 @@ suspend fun queryMovieTable(
}
suspend fun scanMovies(tableNameVal: String) {
-
val request = ScanRequest {
tableName = tableNameVal
}
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ScenarioPartiQ.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ScenarioPartiQ.kt
index 3ac62021b99..41112217664 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ScenarioPartiQ.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ScenarioPartiQ.kt
@@ -34,7 +34,6 @@ import kotlin.system.exitProcess
// snippet-start:[dynamodb.kotlin.scenario.partiql.main]
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -74,7 +73,6 @@ suspend fun main(args: Array) {
}
suspend fun createTablePartiQL(ddb: DynamoDbClient, tableNameVal: String, key: String) {
-
val attDef = AttributeDefinition {
attributeName = key
attributeType = ScalarAttributeType.N
@@ -123,9 +121,9 @@ suspend fun loadDataPartiQL(ddb: DynamoDbClient, fileName: String) {
var t = 0
while (iter.hasNext()) {
-
- if (t == 200)
+ if (t == 200) {
break
+ }
currentNode = iter.next() as ObjectNode
val year = currentNode.path("year").asInt()
@@ -154,7 +152,6 @@ suspend fun getMoviePartiQL(ddb: DynamoDbClient) {
}
suspend fun putRecordPartiQL(ddb: DynamoDbClient) {
-
val sqlStatement = "INSERT INTO MoviesPartiQ VALUE {'year':?, 'title' : ?, 'info' : ?}"
val parameters: MutableList = java.util.ArrayList()
parameters.add(AttributeValue.N("2020"))
@@ -184,7 +181,6 @@ suspend fun queryTablePartiQL(ddb: DynamoDbClient) {
}
suspend fun deleteTablePartiQL(tableNameVal: String) {
-
val request = DeleteTableRequest {
tableName = tableNameVal
}
@@ -200,7 +196,6 @@ suspend fun executeStatementPartiQL(
statementVal: String,
parametersVal: List
): ExecuteStatementResponse {
-
val request = ExecuteStatementRequest {
statement = statementVal
parameters = parametersVal
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ScenarioPartiQLBatch.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ScenarioPartiQLBatch.kt
index 06374b861d7..1ae4f462cc6 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ScenarioPartiQLBatch.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/ScenarioPartiQLBatch.kt
@@ -36,7 +36,6 @@ import aws.sdk.kotlin.services.dynamodb.waiters.waitUntilTableExists
// snippet-start:[dynamodb.kotlin.scenario.partiql.batch.main]
suspend fun main() {
-
val ddb = DynamoDbClient { region = "us-east-1" }
val tableName = "MoviesPartiQBatch"
println("Creating an Amazon DynamoDB table named $tableName with a key named id and a sort key named title.")
@@ -48,7 +47,6 @@ suspend fun main() {
}
suspend fun createTablePartiQLBatch(ddb: DynamoDbClient, tableNameVal: String, key: String) {
-
val attDef = AttributeDefinition {
attributeName = key
attributeType = ScalarAttributeType.N
@@ -89,7 +87,6 @@ suspend fun createTablePartiQLBatch(ddb: DynamoDbClient, tableNameVal: String, k
}
suspend fun putRecordBatch(ddb: DynamoDbClient) {
-
val sqlStatement = "INSERT INTO MoviesPartiQBatch VALUE {'year':?, 'title' : ?, 'info' : ?}"
// Create three movies to add to the Amazon DynamoDB table.
@@ -185,7 +182,6 @@ suspend fun updateTableItemBatchBatch(ddb: DynamoDbClient) {
}
suspend fun deleteItemsBatch(ddb: DynamoDbClient) {
-
// Specify three records to delete.
val sqlStatement = "DELETE FROM MoviesPartiQBatch WHERE year = ? and title=?"
val parametersRec1 = mutableListOf()
@@ -230,7 +226,6 @@ suspend fun deleteItemsBatch(ddb: DynamoDbClient) {
}
suspend fun deleteTablePartiQLBatch(tableNameVal: String) {
-
val request = DeleteTableRequest {
tableName = tableNameVal
}
diff --git a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/UpdateItem.kt b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/UpdateItem.kt
index 7599a8e6cb8..435bb0b4ecd 100644
--- a/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/UpdateItem.kt
+++ b/kotlin/services/dynamodb/src/main/kotlin/com/kotlin/dynamodb/UpdateItem.kt
@@ -21,7 +21,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -56,7 +55,6 @@ suspend fun updateTableItem(
name: String,
updateVal: String
) {
-
val itemKey = mutableMapOf()
itemKey[keyName] = AttributeValue.S(keyVal)
diff --git a/kotlin/services/dynamodb/src/test/kotlin/DynamoDB.kt b/kotlin/services/dynamodb/src/test/kotlin/DynamoDB.kt
new file mode 100644
index 00000000000..e6fa70aca5b
--- /dev/null
+++ b/kotlin/services/dynamodb/src/test/kotlin/DynamoDB.kt
@@ -0,0 +1,249 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.dynamodb.DynamoDbClient
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.dynamodb.createNewTable
+import com.kotlin.dynamodb.createScenarioTable
+import com.kotlin.dynamodb.createTablePartiQL
+import com.kotlin.dynamodb.createTablePartiQLBatch
+import com.kotlin.dynamodb.deletIssuesTable
+import com.kotlin.dynamodb.deleteDynamoDBTable
+import com.kotlin.dynamodb.deleteItemsBatch
+import com.kotlin.dynamodb.deleteTablePartiQL
+import com.kotlin.dynamodb.deleteTablePartiQLBatch
+import com.kotlin.dynamodb.describeDymamoDBTable
+import com.kotlin.dynamodb.getMovie
+import com.kotlin.dynamodb.getMoviePartiQL
+import com.kotlin.dynamodb.getSpecificItem
+import com.kotlin.dynamodb.listAllTables
+import com.kotlin.dynamodb.loadData
+import com.kotlin.dynamodb.loadDataPartiQL
+import com.kotlin.dynamodb.putItemInTable
+import com.kotlin.dynamodb.putRecordBatch
+import com.kotlin.dynamodb.putRecordPartiQL
+import com.kotlin.dynamodb.queryDynTable
+import com.kotlin.dynamodb.queryTablePartiQL
+import com.kotlin.dynamodb.scanItems
+import com.kotlin.dynamodb.scanMovies
+import com.kotlin.dynamodb.updateTableItem
+import com.kotlin.dynamodb.updateTableItemBatchBatch
+import com.kotlin.dynamodb.updateTableItemPartiQL
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class DynamoDB {
+ var tableName: String = ""
+ var fileName: String = ""
+ var tableName2: String = ""
+ var key: String = ""
+ var keyValue: String = ""
+ var albumTitle: String = ""
+ var albumTitleValue: String = ""
+ var awards: String = ""
+ var awardVal: String = ""
+ var songTitle: String = ""
+ var songTitleVal: String = ""
+ var ModAwardVal: String = ""
+
+ @BeforeAll
+ fun setup() = runBlocking {
+ // Get the values from AWS Secrets Manager.
+ val gson = Gson()
+ val json = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ tableName = values.tableName.toString()
+ fileName = values.fileName.toString()
+ key = values.key.toString()
+ keyValue = values.keyValue.toString()
+ albumTitle = values.albumTitle.toString()
+ albumTitleValue = values.albumTitleValue.toString()
+ awards = values.awards.toString()
+ awardVal = values.getAwardVal().toString()
+ songTitle = values.songTitleVal.toString()
+ songTitleVal = values.songTitleVal.toString()
+ tableName2 = "Movies"
+
+ /*
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
+ val prop = java.util.Properties()
+
+ // load the properties file.
+ prop.load(input)
+ tableName = prop.getProperty("tableName")
+ tableName2 = prop.getProperty("tableName2")
+ fileName = prop.getProperty("fileName")
+ key = prop.getProperty("key")
+ keyValue = prop.getProperty("keyValue")
+ albumTitle = prop.getProperty("albumTitle")
+ albumTitleValue = prop.getProperty("AlbumTitleValue")
+ awards = prop.getProperty("Awards")
+ awardVal = prop.getProperty("AwardVal")
+ songTitle = prop.getProperty("SongTitle")
+ songTitleVal = prop.getProperty("SongTitleVal")
+ ModAwardVal = prop.getProperty("ModAwardVal")
+ */
+ }
+
+ @Test
+ @Order(1)
+ fun createTableTest() = runBlocking {
+ createNewTable(tableName, key)
+ println("Test 1 passed")
+ }
+
+ @Test
+ @Order(2)
+ fun describeTableTest() = runBlocking {
+ describeDymamoDBTable(tableName)
+ println("Test 2 passed")
+ }
+
+ @Test
+ @Order(3)
+ fun putItemTest() = runBlocking {
+ putItemInTable(
+ tableName,
+ key,
+ keyValue,
+ albumTitle,
+ albumTitleValue,
+ awards,
+ awardVal,
+ songTitle,
+ songTitleVal
+ )
+ println("Test 3 passed")
+ }
+
+ @Test
+ @Order(4)
+ fun listTablesTest() = runBlocking {
+ listAllTables()
+ println("Test 4 passed")
+ }
+
+ @Test
+ @Order(5)
+ fun updateItemTest() = runBlocking {
+ updateTableItem(tableName, key, keyValue, awards, ModAwardVal)
+ println("Test 5 passed")
+ }
+
+ @Test
+ @Order(6)
+ fun getItemTest() = runBlocking {
+ getSpecificItem(tableName, key, keyValue)
+ println("Test 6 passed")
+ }
+
+ @Test
+ @Order(7)
+ fun queryTableTest() = runBlocking {
+ queryDynTable(tableName, key, keyValue, "#a")
+ println("Test 7 passed")
+ }
+
+ @Test
+ @Order(8)
+ fun dynamoDBScanTest() = runBlocking {
+ scanItems(tableName)
+ println("Test 8 passed")
+ }
+
+ @Test
+ @Order(9)
+ fun deleteItemTest() = runBlocking {
+ com.kotlin.dynamodb.deleteDynamoDBItem(tableName, key, keyValue)
+ println("Test 9 passed")
+ }
+
+ @Test
+ @Order(10)
+ fun deleteTableTest() = runBlocking {
+ deleteDynamoDBTable(tableName)
+ println("Test 10 passed")
+ }
+
+ @Test
+ @Order(11)
+ fun TestScenario() = runBlocking {
+ createScenarioTable(tableName2, "year")
+ loadData(tableName2, fileName)
+ getMovie(tableName2, "year", "1933")
+ scanMovies(tableName2)
+ deletIssuesTable(tableName2)
+ }
+
+ @Test
+ @Order(12)
+ fun TestScenarioPartiQ() = runBlocking {
+ val tableNamePartiQ = "MoviesPartiQ"
+ val ddb = DynamoDbClient { region = "us-east-1" }
+ createTablePartiQL(ddb, tableNamePartiQ, "year")
+ loadDataPartiQL(ddb, fileName)
+ getMoviePartiQL(ddb)
+ putRecordPartiQL(ddb)
+ updateTableItemPartiQL(ddb)
+ queryTablePartiQL(ddb)
+ deleteTablePartiQL(tableNamePartiQ)
+ }
+
+ @Test
+ @Order(13)
+ fun TestScenarioPartiQBatch() = runBlocking {
+ val tableNamePartiQBatch = "MoviesPartiQBatch"
+ val ddb = DynamoDbClient { region = "us-east-1" }
+ println("Creating an Amazon DynamoDB table named $tableNamePartiQBatch with a key named id and a sort key named title.")
+ createTablePartiQLBatch(ddb, tableNamePartiQBatch, "year")
+ putRecordBatch(ddb)
+ updateTableItemBatchBatch(ddb)
+ deleteItemsBatch(ddb)
+ deleteTablePartiQLBatch(tableNamePartiQBatch)
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretClient = SecretsManagerClient {
+ region = "us-east-1"
+ credentialsProvider = EnvironmentCredentialsProvider()
+ }
+ val secretName = "test/dynamodb"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/dynamodb (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val tableName: String? = null
+ val key: String? = null
+ val keyValue: String? = null
+ val albumTitle: String? = null
+ val albumTitleValue: String? = null
+ val awards: String? = null
+ private val AwardVal: String? = null
+ private val SongTitle: String? = null
+ val songTitleVal: String? = null
+ val fileName: String? = null
+
+ fun getAwardVal(): String? {
+ return SongTitle
+ }
+ }
+}
diff --git a/kotlin/services/ec2/Readme.md b/kotlin/services/ec2/Readme.md
index fea63eff087..632cd1dac58 100644
--- a/kotlin/services/ec2/Readme.md
+++ b/kotlin/services/ec2/Readme.md
@@ -31,30 +31,30 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
### Get started
-- [Hello Amazon EC2](src/main/kotlin/com/kotlin/ec2/DescribeSecurityGroups.kt#L46) (`DescribeSecurityGroups`)
+- [Hello Amazon EC2](src/main/kotlin/com/kotlin/ec2/DescribeSecurityGroups.kt#L40) (`DescribeSecurityGroups`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Allocate an Elastic IP address](src/main/kotlin/com/kotlin/ec2/AllocateAddress.kt#L48) (`AllocateAddress`)
-- [Associate an Elastic IP address with an instance](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L287) (`AssociateAddress`)
-- [Create a security group](src/main/kotlin/com/kotlin/ec2/CreateSecurityGroup.kt#L52) (`CreateSecurityGroup`)
-- [Create a security key pair](src/main/kotlin/com/kotlin/ec2/CreateKeyPair.kt#L45) (`CreateKeyPair`)
-- [Create and run an instance](src/main/kotlin/com/kotlin/ec2/CreateInstance.kt#L50) (`RunInstances`)
-- [Delete a security group](src/main/kotlin/com/kotlin/ec2/DeleteSecurityGroup.kt#L44) (`DeleteSecurityGroup`)
-- [Delete a security key pair](src/main/kotlin/com/kotlin/ec2/DeleteKeyPair.kt#L45) (`DeleteKeyPair`)
-- [Describe instances](src/main/kotlin/com/kotlin/ec2/DescribeInstances.kt#L29) (`DescribeInstances`)
-- [Disassociate an Elastic IP address from an instance](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L275) (`DisassociateAddress`)
-- [Get data about a security group](src/main/kotlin/com/kotlin/ec2/DescribeSecurityGroups.kt#L46) (`DescribeSecurityGroups`)
-- [Get data about instance types](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L389) (`DescribeInstanceTypes`)
-- [List security key pairs](src/main/kotlin/com/kotlin/ec2/DescribeKeyPairs.kt#L29) (`DescribeKeyPairs`)
-- [Release an Elastic IP address](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L262) (`ReleaseAddress`)
-- [Set inbound rules for a security group](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L471) (`AuthorizeSecurityGroupIngress`)
-- [Start an instance](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L311) (`StartInstances`)
-- [Stop an instance](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L328) (`StopInstances`)
-- [Terminate an instance](src/main/kotlin/com/kotlin/ec2/TerminateInstance.kt#L45) (`TerminateInstances`)
+- [Allocate an Elastic IP address](src/main/kotlin/com/kotlin/ec2/AllocateAddress.kt#L42) (`AllocateAddress`)
+- [Associate an Elastic IP address with an instance](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L281) (`AssociateAddress`)
+- [Create a security group](src/main/kotlin/com/kotlin/ec2/CreateSecurityGroup.kt#L46) (`CreateSecurityGroup`)
+- [Create a security key pair](src/main/kotlin/com/kotlin/ec2/CreateKeyPair.kt#L39) (`CreateKeyPair`)
+- [Create and run an instance](src/main/kotlin/com/kotlin/ec2/CreateInstance.kt#L44) (`RunInstances`)
+- [Delete a security group](src/main/kotlin/com/kotlin/ec2/DeleteSecurityGroup.kt#L38) (`DeleteSecurityGroup`)
+- [Delete a security key pair](src/main/kotlin/com/kotlin/ec2/DeleteKeyPair.kt#L39) (`DeleteKeyPair`)
+- [Describe instances](src/main/kotlin/com/kotlin/ec2/DescribeInstances.kt#L23) (`DescribeInstances`)
+- [Disassociate an Elastic IP address from an instance](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L269) (`DisassociateAddress`)
+- [Get data about a security group](src/main/kotlin/com/kotlin/ec2/DescribeSecurityGroups.kt#L40) (`DescribeSecurityGroups`)
+- [Get data about instance types](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L383) (`DescribeInstanceTypes`)
+- [List security key pairs](src/main/kotlin/com/kotlin/ec2/DescribeKeyPairs.kt#L23) (`DescribeKeyPairs`)
+- [Release an Elastic IP address](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L256) (`ReleaseAddress`)
+- [Set inbound rules for a security group](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L465) (`AuthorizeSecurityGroupIngress`)
+- [Start an instance](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L305) (`StartInstances`)
+- [Stop an instance](src/main/kotlin/com/kotlin/ec2/EC2Scenario.kt#L322) (`StopInstances`)
+- [Terminate an instance](src/main/kotlin/com/kotlin/ec2/TerminateInstance.kt#L39) (`TerminateInstances`)
### Scenarios
diff --git a/kotlin/services/ec2/build.gradle.kts b/kotlin/services/ec2/build.gradle.kts
index 720cf96d318..8a1b490332c 100644
--- a/kotlin/services/ec2/build.gradle.kts
+++ b/kotlin/services/ec2/build.gradle.kts
@@ -18,18 +18,19 @@ buildscript {
maven("https://plugins.gradle.org/m2/")
}
dependencies {
- classpath("org.jlleitschuh.gradle:ktlint-gradle:10.3.0")
+ classpath("org.jlleitschuh.gradle:ktlint-gradle:11.3.1")
}
}
repositories {
mavenCentral()
}
+
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:ec2:1.0.0")
- implementation("aws.sdk.kotlin:ssm:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:ec2:1.0.30")
+ implementation("aws.sdk.kotlin:ssm:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.40")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
implementation("com.google.code.gson:gson:2.10")
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/AllocateAddress.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/AllocateAddress.kt
index f5d831714ef..97622fc63b9 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/AllocateAddress.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/AllocateAddress.kt
@@ -19,7 +19,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -41,7 +40,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.allocate_address.main]
suspend fun getAllocateAddress(instanceIdVal: String?): String? {
-
val allocateRequest = AllocateAddressRequest {
domain = DomainType.Vpc
}
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateInstance.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateInstance.kt
index a036c903a78..25ace94e2a3 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateInstance.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateInstance.kt
@@ -20,7 +20,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -43,7 +42,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.create_instance.main]
suspend fun createEC2Instance(name: String, amiId: String): String? {
-
val request = RunInstancesRequest {
imageId = amiId
instanceType = InstanceType.T1Micro
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateKeyPair.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateKeyPair.kt
index 865c91daa94..43f7785d5f5 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateKeyPair.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateKeyPair.kt
@@ -17,7 +17,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -38,7 +37,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.create_key_pair.main]
suspend fun createEC2KeyPair(keyNameVal: String) {
-
val request = CreateKeyPairRequest {
keyName = keyNameVal
}
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateSecurityGroup.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateSecurityGroup.kt
index beecfc13c1c..7b87ab62af7 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateSecurityGroup.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateSecurityGroup.kt
@@ -20,7 +20,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -45,7 +44,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.create_security_group.main]
suspend fun createEC2SecurityGroup(groupNameVal: String?, groupDescVal: String?, vpcIdVal: String?): String? {
-
val request = CreateSecurityGroupRequest {
groupName = groupNameVal
description = groupDescVal
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteKeyPair.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteKeyPair.kt
index e89472afc09..7842f45b158 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteKeyPair.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteKeyPair.kt
@@ -17,7 +17,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -38,7 +37,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.delete_key_pair.main]
suspend fun deleteKeys(keyPair: String?) {
-
val request = DeleteKeyPairRequest {
keyName = keyPair
}
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteSecurityGroup.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteSecurityGroup.kt
index 4f2349b7b2c..16dc2938a3f 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteSecurityGroup.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteSecurityGroup.kt
@@ -17,7 +17,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -37,7 +36,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.delete_security_group.main]
suspend fun deleteEC2SecGroup(groupIdVal: String) {
-
val request = DeleteSecurityGroupRequest {
groupId = groupIdVal
}
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeAccount.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeAccount.kt
index bddfd8970cc..a90932ae0ff 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeAccount.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeAccount.kt
@@ -16,13 +16,11 @@ For more information, see the following documentation topic:
https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main() {
-
describeEC2Account()
}
// snippet-start:[ec2.kotlin.describe_account.main]
suspend fun describeEC2Account() {
-
Ec2Client { region = "us-west-2" }.use { ec2 ->
val accountResults = ec2.describeAccountAttributes(DescribeAccountAttributesRequest {})
accountResults.accountAttributes?.forEach { attribute ->
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstanceTags.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstanceTags.kt
index 0b0d104954d..3fdd75606d1 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstanceTags.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstanceTags.kt
@@ -18,7 +18,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -38,7 +37,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.describe_instances_tags.main]
suspend fun describeEC2Tags(resourceIdVal: String) {
-
val filter = Filter {
name = "resource-id"
values = listOf(resourceIdVal)
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstances.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstances.kt
index 1944dba8f7c..f2547cb33e4 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstances.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstances.kt
@@ -22,7 +22,6 @@ suspend fun main() {
// snippet-start:[ec2.kotlin.describe_instances.main]
suspend fun describeEC2Instances() {
-
val request = DescribeInstancesRequest {
maxResults = 6
}
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeKeyPairs.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeKeyPairs.kt
index 54136de95f5..894ea6e824e 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeKeyPairs.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeKeyPairs.kt
@@ -22,7 +22,6 @@ suspend fun main() {
// snippet-start:[ec2.kotlin.describe_key_pairs.main]
suspend fun describeEC2Keys() {
-
Ec2Client { region = "us-west-2" }.use { ec2 ->
val response = ec2.describeKeyPairs(DescribeKeyPairsRequest {})
response.keyPairs?.forEach { keyPair ->
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeRegionsAndZones.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeRegionsAndZones.kt
index bc6cd2bc7b6..30bb40d2a78 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeRegionsAndZones.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeRegionsAndZones.kt
@@ -18,13 +18,11 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main() {
-
describeEC2RegionsAndZones()
}
// snippet-start:[ec2.kotlin.describe_region_and_zones.main]
suspend fun describeEC2RegionsAndZones() {
-
Ec2Client { region = "us-west-2" }.use { ec2 ->
val regionsResponse = ec2.describeRegions(DescribeRegionsRequest {})
regionsResponse.regions?.forEach { region ->
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeSecurityGroups.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeSecurityGroups.kt
index 626f84deaa3..d8a1939da6f 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeSecurityGroups.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeSecurityGroups.kt
@@ -18,7 +18,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -39,7 +38,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.describe_security_groups.main]
suspend fun describeEC2SecurityGroups(groupId: String) {
-
val request = DescribeSecurityGroupsRequest {
groupIds = listOf(groupId)
}
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeVPCs.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeVPCs.kt
index b9ce0adaeca..e1b0e364ced 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeVPCs.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeVPCs.kt
@@ -18,7 +18,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -39,7 +38,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.describe_vpc.main]
suspend fun describeEC2Vpcs(vpcId: String) {
-
val request = DescribeVpcsRequest {
vpcIds = listOf(vpcId)
}
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/FindRunningInstances.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/FindRunningInstances.kt
index 118fc4e034d..c80d2fa532f 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/FindRunningInstances.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/FindRunningInstances.kt
@@ -22,7 +22,6 @@ suspend fun main() {
// snippet-start:[ec2.kotlin.running_instances.main]
suspend fun findRunningEC2Instances() {
-
val filter = Filter {
name = "instance-state-name"
values = listOf("running")
diff --git a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/TerminateInstance.kt b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/TerminateInstance.kt
index 204e203895e..1cc9a2fe402 100644
--- a/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/TerminateInstance.kt
+++ b/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/TerminateInstance.kt
@@ -17,7 +17,6 @@ https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html
*/
suspend fun main(args: Array) {
-
val usage = """
Usage:
@@ -38,7 +37,6 @@ suspend fun main(args: Array) {
// snippet-start:[ec2.kotlin.terminate_instance.main]
suspend fun terminateEC2(instanceID: String) {
-
val request = TerminateInstancesRequest {
instanceIds = listOf(instanceID)
}
diff --git a/kotlin/services/ec2/src/test/kotlin/EC2Test.kt b/kotlin/services/ec2/src/test/kotlin/EC2Test.kt
index 74dc46cdc9e..a120921031d 100644
--- a/kotlin/services/ec2/src/test/kotlin/EC2Test.kt
+++ b/kotlin/services/ec2/src/test/kotlin/EC2Test.kt
@@ -1,6 +1,10 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
import com.kotlin.ec2.DASHES
import com.kotlin.ec2.allocateAddressSc
import com.kotlin.ec2.associateAddressSc
@@ -37,13 +41,15 @@ import com.kotlin.ec2.terminateEC2Sc
import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
import org.junit.jupiter.api.Order
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.TestMethodOrder
import java.io.IOException
-import java.util.Properties
+import java.util.Random
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@TestMethodOrder(OrderAnnotation::class)
@@ -66,7 +72,28 @@ class EC2Test {
@BeforeAll
@Throws(IOException::class)
- fun setUp() {
+ fun setUp() = runBlocking {
+ // Get the values to run these tests from AWS Secrets Manager.
+ val random = Random()
+ val randomNum: Int = random.nextInt(10000 - 1 + 1) + 1
+ val gson = Gson()
+ val json: String = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ ami = values.ami.toString()
+ instanceName = values.instanceName.toString()
+ keyName = values.keyNameSc.toString()
+ groupName = values.groupName.toString() + randomNum
+ groupDesc = values.groupDesc.toString()
+ vpcId = values.vpcId.toString()
+ keyNameSc = values.keyNameSc.toString() + randomNum
+ fileNameSc = values.fileNameSc.toString()
+ groupDescSc = values.groupDescSc.toString()
+ groupNameSc = values.groupNameSc.toString() + randomNum
+ vpcIdSc = values.vpcIdSc.toString()
+ myIpAddressSc = values.myIpAddressSc.toString()
+
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ /*
try {
EC2Test::class.java.classLoader.getResourceAsStream("config.properties").use { input ->
val prop = Properties()
@@ -94,6 +121,7 @@ class EC2Test {
} catch (ex: IOException) {
ex.printStackTrace()
}
+ */
}
@Test
@@ -101,28 +129,28 @@ class EC2Test {
fun createInstanceTest() = runBlocking {
instanceId = createEC2Instance(instanceName, ami).toString()
assertTrue(instanceId.isNotEmpty())
- println("Test 2 passed")
+ println("Test 1 passed")
}
@Test
@Order(2)
fun createKeyPairTest() = runBlocking {
createEC2KeyPair(keyName)
- println("Test 3 passed")
+ println("Test 2 passed")
}
@Test
@Order(3)
fun describeKeyPairTest() = runBlocking {
describeEC2Keys()
- println("Test 4 passed")
+ println("Test 3 passed")
}
@Test
@Order(4)
fun deleteKeyPairTest() = runBlocking {
deleteKeys(keyName)
- println("Test 5 passed")
+ println("Test 4 passed")
}
@Test
@@ -130,70 +158,70 @@ class EC2Test {
fun createSecurityGroupTest() = runBlocking {
groupId = createEC2SecurityGroup(groupName, groupDesc, vpcId).toString()
assertTrue(groupId.isNotEmpty())
- println("Test 6 passed")
+ println("Test 5 passed")
}
@Test
@Order(6)
fun describeSecurityGroupTest() = runBlocking {
describeEC2SecurityGroups(groupId)
- println("Test 7 passed")
+ println("Test 6 passed")
}
@Test
@Order(7)
fun deleteSecurityGroupTest() = runBlocking {
deleteEC2SecGroup(groupId)
- println("Test 8 passed")
+ println("Test 7 passed")
}
@Test
@Order(8)
fun describeAccountTest() = runBlocking {
describeEC2Account()
- println("Test 9 passed")
+ println("Test 8 passed")
}
@Test
@Order(9)
fun describeInstancesTest() = runBlocking {
describeEC2Instances()
- println("Test 10 passed")
+ println("Test 9 passed")
}
@Test
@Order(10)
fun describeRegionsAndZonesTest() = runBlocking {
describeEC2RegionsAndZones()
- println("Test 11 passed")
+ println("Test 10 passed")
}
@Test
@Order(11)
fun describeVPCsTest() = runBlocking {
describeEC2Vpcs(vpcId)
- println("Test 12 passed")
+ println("Test 11 passed")
}
@Test
@Order(12)
fun findRunningInstancesTest() = runBlocking {
findRunningEC2Instances()
- println("Test 13 passed")
+ println("Test 12 passed")
}
@Test
@Order(13)
fun describeAddressesTest() = runBlocking {
describeEC2Address()
- println("Test 14 passed")
+ println("Test 13 passed")
}
@Test
@Order(14)
fun terminateInstanceTEst() = runBlocking {
terminateEC2(instanceId)
- println("Test 15 passed")
+ println("Test 14 passed")
}
@Test
@@ -237,12 +265,15 @@ class EC2Test {
println(DASHES)
println("7. Get a list of instance types.")
- val instanceType = getInstanceTypesSc()
+ var instanceType = getInstanceTypesSc()
assertTrue(instanceType.isNotEmpty())
println(DASHES)
println(DASHES)
println("8. Create an instance.")
+ instanceType = "m5.large"
+ println("Wait 1 min before creating the instance using $instanceType")
+ // TimeUnit.MINUTES.sleep(1)
newInstanceId = runInstanceSc(instanceType, keyNameSc, groupNameSc, amiValue.toString())
assertTrue(newInstanceId.isNotEmpty())
println(DASHES)
@@ -309,4 +340,32 @@ class EC2Test {
deleteKeysSc(keyNameSc)
println(DASHES)
}
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/ec2"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/ec2 (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val ami: String? = null
+ val instanceName: String? = null
+ val keyPair: String? = null
+ val groupName: String? = null
+ val groupDesc: String? = null
+ val vpcId: String? = null
+ val keyNameSc: String? = null
+ val fileNameSc: String? = null
+ val groupNameSc: String? = null
+ val groupDescSc: String? = null
+ val vpcIdSc: String? = null
+ val myIpAddressSc: String? = null
+ }
}
diff --git a/kotlin/services/ecs/build.gradle.kts b/kotlin/services/ecs/build.gradle.kts
index 6e9137f4f6d..2ff83b3d2be 100644
--- a/kotlin/services/ecs/build.gradle.kts
+++ b/kotlin/services/ecs/build.gradle.kts
@@ -18,7 +18,7 @@ buildscript {
maven("https://plugins.gradle.org/m2/")
}
dependencies {
- classpath("org.jlleitschuh.gradle:ktlint-gradle:10.3.0")
+ classpath("org.jlleitschuh.gradle:ktlint-gradle:11.3.1")
}
}
@@ -27,8 +27,8 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:ecs:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:ecs:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.0")
diff --git a/kotlin/services/ecs/src/test/kotlin/ESCTest.kt b/kotlin/services/ecs/src/test/kotlin/ESCTest.kt
new file mode 100644
index 00000000000..6aec5d1c7e3
--- /dev/null
+++ b/kotlin/services/ecs/src/test/kotlin/ESCTest.kt
@@ -0,0 +1,140 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.ecs.createGivenCluster
+import com.kotlin.ecs.createNewService
+import com.kotlin.ecs.deleteSpecificService
+import com.kotlin.ecs.descCluster
+import com.kotlin.ecs.getAllTasks
+import com.kotlin.ecs.listAllClusters
+import com.kotlin.ecs.updateSpecificService
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+import java.util.UUID
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class ESCTest {
+ var clusterName = ""
+ var clusterARN = ""
+ var securityGroups: String = ""
+ var taskId: String = ""
+ var subnet: String = ""
+ var serviceName: String = ""
+ var serviceArn: String = ""
+ var taskDefinition: String = ""
+ var clusterArn: String = "arn:aws:ecs:us-east-1:814548047983:cluster/ScottCluste11"
+
+ @BeforeAll
+ fun setup() = runBlocking {
+ // Get the values to run these tests from AWS Secrets Manager.
+ val gson = Gson()
+ val json: String = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ clusterName = values.clusterName.toString() + UUID.randomUUID()
+ taskId = values.taskId.toString()
+ subnet = values.subnet.toString()
+ securityGroups = values.securityGroups.toString()
+ serviceName = values.serviceName.toString() + UUID.randomUUID()
+ taskDefinition = values.taskDefinition.toString()
+
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ // val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
+ // val prop = Properties()
+
+ // load the properties file.
+ // prop.load(input)
+
+ // Populate the data members required for all tests
+ // clusterName = prop.getProperty("clusterName")
+ // taskId = prop.getProperty("taskId")
+ // subnet = prop.getProperty("subnet")
+ // securityGroups = prop.getProperty("securityGroups")
+ // serviceName = prop.getProperty("serviceName")
+ // taskDefinition = prop.getProperty("taskDefinition")
+ }
+
+ @Test
+ @Order(1)
+ fun createClusterTest() = runBlocking {
+ clusterARN = createGivenCluster(clusterName).toString()
+ println("Test 1 passed")
+ }
+
+ @Test
+ @Order(2)
+ fun createServiceTest() = runBlocking {
+ serviceArn = createNewService(clusterArn, serviceName, securityGroups, subnet, taskDefinition).toString()
+ println("Test 2 passed")
+ }
+
+ @Test
+ @Order(3)
+ fun listClustersTest() = runBlocking {
+ listAllClusters()
+ println("Test 3 passed")
+ }
+
+ @Test
+ @Order(4)
+ fun describeClustersTest() = runBlocking {
+ descCluster(clusterArn)
+ println("Test 4 passed")
+ }
+
+ @Test
+ @Order(5)
+ fun listTaskDefinitionsTest() = runBlocking {
+ getAllTasks(clusterArn, taskId)
+ println("Test 5 passed")
+ }
+
+ @Test
+ @Order(6)
+ fun updateServiceTest() = runBlocking {
+ updateSpecificService(clusterArn, serviceArn)
+ println("Test 6 passed")
+ }
+
+ @Test
+ @Order(7)
+ fun deleteServiceTest() = runBlocking {
+ deleteSpecificService(clusterArn, serviceArn)
+ println("Test 7 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretClient = SecretsManagerClient {
+ region = "us-east-1"
+ credentialsProvider = EnvironmentCredentialsProvider()
+ }
+ val secretName = "test/ecs"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/ecs (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val clusterName: String? = null
+ val securityGroups: String? = null
+ val subnet: String? = null
+ val taskId: String? = null
+ val serviceName: String? = null
+ val taskDefinition: String? = null
+ }
+}
diff --git a/kotlin/services/elasticbeanstalk/build.gradle.kts b/kotlin/services/elasticbeanstalk/build.gradle.kts
index 738e0ff64a1..4b88a344e44 100644
--- a/kotlin/services/elasticbeanstalk/build.gradle.kts
+++ b/kotlin/services/elasticbeanstalk/build.gradle.kts
@@ -18,7 +18,7 @@ buildscript {
maven("https://plugins.gradle.org/m2/")
}
dependencies {
- classpath("org.jlleitschuh.gradle:ktlint-gradle:10.3.0")
+ classpath("org.jlleitschuh.gradle:ktlint-gradle:11.3.1")
}
}
@@ -28,8 +28,8 @@ repositories {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:elasticbeanstalk:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:elasticbeanstalk:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
diff --git a/kotlin/services/elasticbeanstalk/src/test/kotlin/ElasticBeanstalkTest.kt b/kotlin/services/elasticbeanstalk/src/test/kotlin/ElasticBeanstalkTest.kt
index aaf9d0dba4c..bef12a89a41 100644
--- a/kotlin/services/elasticbeanstalk/src/test/kotlin/ElasticBeanstalkTest.kt
+++ b/kotlin/services/elasticbeanstalk/src/test/kotlin/ElasticBeanstalkTest.kt
@@ -1,53 +1,47 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
-import aws.sdk.kotlin.services.elasticbeanstalk.ElasticBeanstalkClient
-import com.aws.example.*
+import com.aws.example.createApp
+import com.aws.example.createEBEnvironment
+import com.aws.example.deleteApp
+import com.aws.example.describeApps
+import com.aws.example.describeEnv
+import com.aws.example.getOptions
import kotlinx.coroutines.runBlocking
-import org.junit.jupiter.api.*
+import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
import java.io.IOException
import java.net.URISyntaxException
-import java.util.*
+import java.util.Random
import java.util.concurrent.TimeUnit
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@TestMethodOrder(OrderAnnotation::class)
class ElasticBeanstalkTest {
-
- lateinit var beanstalkClient: ElasticBeanstalkClient
- var appName: String = ""
- var envName: String = ""
+ var appName: String = "TestApp"
+ var envName: String = "TestEnv"
var appArn: String = ""
var envArn: String = ""
@BeforeAll
@Throws(IOException::class, URISyntaxException::class)
fun setUp() {
- beanstalkClient = ElasticBeanstalkClient{ region = "us-east-1" }
-
- try {
- ElasticBeanstalkTest::class.java.classLoader.getResourceAsStream("config.properties").use { input ->
- val prop = Properties()
- if (input == null) {
- println("Sorry, unable to find config.properties")
- return
- }
-
- prop.load(input)
- appName = prop.getProperty("appName")
- envName = prop.getProperty("envName")
- }
- } catch (ex: IOException) {
- ex.printStackTrace()
- }
+ val random = Random()
+ val randomNum = random.nextInt(10000 - 1 + 1) + 1
+ appName = appName + randomNum
+ envName = envName + randomNum
}
@Test
@Order(1)
fun whenInitializingAWSService_thenNotNull() {
- Assertions.assertNotNull(beanstalkClient)
+ Assertions.assertNotNull(appName)
println("Test 1 passed")
}
@@ -62,7 +56,7 @@ class ElasticBeanstalkTest {
@Test
@Order(3)
fun CreateEnvironment() = runBlocking {
- envArn = createEBEnvironment( envName, appName)
+ envArn = createEBEnvironment(envName, appName)
assertTrue(!envArn.isEmpty())
println("Test 3 passed")
}
diff --git a/kotlin/services/emr/build.gradle.kts b/kotlin/services/emr/build.gradle.kts
index 389f277ff56..cc377b837d6 100644
--- a/kotlin/services/emr/build.gradle.kts
+++ b/kotlin/services/emr/build.gradle.kts
@@ -18,7 +18,7 @@ buildscript {
maven("https://plugins.gradle.org/m2/")
}
dependencies {
- classpath("org.jlleitschuh.gradle:ktlint-gradle:10.3.0")
+ classpath("org.jlleitschuh.gradle:ktlint-gradle:11.3.1")
}
}
@@ -27,8 +27,8 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:emr:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:emr:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
implementation("com.google.code.gson:gson:2.10")
diff --git a/kotlin/services/emr/src/test/kotlin/EMRTest.kt b/kotlin/services/emr/src/test/kotlin/EMRTest.kt
new file mode 100644
index 00000000000..9271c3fcdc5
--- /dev/null
+++ b/kotlin/services/emr/src/test/kotlin/EMRTest.kt
@@ -0,0 +1,99 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.emr.listAllClusters
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+import java.io.IOException
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class EMRTest {
+ private var jar = ""
+ private var myClass = ""
+ private var keys = ""
+ private var logUri = ""
+ private var name = ""
+ private var jobFlowId = ""
+ private var existingClusterId = ""
+
+ @BeforeAll
+ @Throws(IOException::class)
+ fun setUp() = runBlocking {
+ // Get the values to run these tests from AWS Secrets Manager.
+ val gson = Gson()
+ val json: String = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ jar = values.jar.toString()
+ myClass = values.myClass.toString()
+ keys = values.keys.toString()
+ logUri = values.logUri.toString()
+ name = values.name.toString()
+ existingClusterId = values.existingClusterId.toString()
+
+ /*
+ try {
+ EMRTest::class.java.classLoader.getResourceAsStream("config.properties").use { input ->
+ val prop = Properties()
+ if (input == null) {
+ println("Sorry, unable to find config.properties")
+ return
+ }
+
+ // load a properties file from class path, inside static method
+ prop.load(input)
+
+ // Populate the data members required for all tests
+ jar = prop.getProperty("jar")
+ myClass = prop.getProperty("myClass")
+ keys = prop.getProperty("keys")
+ logUri = prop.getProperty("logUri")
+ name = prop.getProperty("name")
+ existingClusterId = prop.getProperty("existingClusterId")
+ }
+ } catch (ex: IOException) {
+ ex.printStackTrace()
+ }
+ */
+ }
+
+ @Test
+ @Order(1)
+ fun listClustersTest() = runBlocking {
+ listAllClusters()
+ println("Test 3 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "text/emr"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/emr (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val existingClusterId: String? = null
+ val jar: String? = null
+ val myClass: String? = null
+ val keys: String? = null
+ val name: String? = null
+ val logUri: String? = null
+ }
+}
diff --git a/kotlin/services/eventbridge/Readme.md b/kotlin/services/eventbridge/Readme.md
index 8e5a08d273d..d402ba091b0 100644
--- a/kotlin/services/eventbridge/Readme.md
+++ b/kotlin/services/eventbridge/Readme.md
@@ -31,24 +31,24 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
### Get started
-- [Hello EventBridge](src/main/kotlin/com/kotlin/eventbridge/HelloEventBridge.kt#L11) (`ListEventBuses`)
+- [Hello EventBridge](src/main/kotlin/com/kotlin/eventbridge/HelloEventBridge.kt#L5) (`ListEventBuses`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add a target](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L550) (`PutTargets`)
-- [Create a rule](src/main/kotlin/com/kotlin/eventbridge/CreateRuleSchedule.kt#L55) (`PutRule`)
-- [Delete a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L329) (`DeleteRule`)
-- [Describe a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L463) (`DescribeRule`)
-- [Disable a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L476) (`DisableRule`)
-- [Enable a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L476) (`EnableRule`)
-- [List rule names for a target](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L520) (`ListRuleNamesByTarget`)
-- [List rules](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L618) (`ListRules`)
-- [List targets for a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L535) (`ListTargetsByRule`)
-- [Remove targets from a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L341) (`RemoveTargets`)
-- [Send events](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L367) (`PutEvents`)
+- [Add a target](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L544) (`PutTargets`)
+- [Create a rule](src/main/kotlin/com/kotlin/eventbridge/CreateRuleSchedule.kt#L49) (`PutRule`)
+- [Delete a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L323) (`DeleteRule`)
+- [Describe a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L457) (`DescribeRule`)
+- [Disable a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L470) (`DisableRule`)
+- [Enable a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L470) (`EnableRule`)
+- [List rule names for a target](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L514) (`ListRuleNamesByTarget`)
+- [List rules](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L612) (`ListRules`)
+- [List targets for a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L529) (`ListTargetsByRule`)
+- [Remove targets from a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L335) (`RemoveTargets`)
+- [Send events](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L361) (`PutEvents`)
### Scenarios
diff --git a/kotlin/services/eventbridge/src/test/kotlin/EventBridgeKotlinTest.kt b/kotlin/services/eventbridge/src/test/kotlin/EventBridgeKotlinTest.kt
index bb5c247ebb0..b9c8f8f5c27 100644
--- a/kotlin/services/eventbridge/src/test/kotlin/EventBridgeKotlinTest.kt
+++ b/kotlin/services/eventbridge/src/test/kotlin/EventBridgeKotlinTest.kt
@@ -1,39 +1,15 @@
-// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
-// SPDX-License-Identifier: Apache-2.0
+/*
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ SPDX-License-Identifier: Apache-2.0
+*/
-import com.kotlin.eventbridge.DASHES
-import com.kotlin.eventbridge.addEventRule
-import com.kotlin.eventbridge.addSnsEventRule
-import com.kotlin.eventbridge.changeRuleState
-import com.kotlin.eventbridge.checkBucket
-import com.kotlin.eventbridge.checkRule
-import com.kotlin.eventbridge.cleanupResources
-import com.kotlin.eventbridge.createBucket
-import com.kotlin.eventbridge.createIAMRole
-import com.kotlin.eventbridge.createSnsTopic
import com.kotlin.eventbridge.listBusesHello
-import com.kotlin.eventbridge.listRules
-import com.kotlin.eventbridge.listTargetRules
-import com.kotlin.eventbridge.listTargets
-import com.kotlin.eventbridge.setBucketNotification
-import com.kotlin.eventbridge.subEmail
-import com.kotlin.eventbridge.triggerCustomRule
-import com.kotlin.eventbridge.updateCustomRuleTargetWithTransform
-import com.kotlin.eventbridge.updateSnsEventRule
-import com.kotlin.eventbridge.updateToCustomRule
-import com.kotlin.eventbridge.uploadTextFiletoS3
-import kotlinx.coroutines.delay
import kotlinx.coroutines.runBlocking
-import org.junit.jupiter.api.Assertions
-import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
import org.junit.jupiter.api.Order
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.TestMethodOrder
-import java.io.InputStream
-import java.util.*
-import kotlin.system.exitProcess
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@TestMethodOrder(OrderAnnotation::class)
@@ -45,162 +21,10 @@ class EventBridgeKotlinTest {
private var json = ""
private var targetId = ""
- @BeforeAll
- fun setup() {
- val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
- val prop = Properties()
- prop.load(input)
-
- // Populate the data members required for all tests.
- roleNameSc = prop.getProperty("roleNameSc")
- bucketNameSc = prop.getProperty("bucketNameSc")
- topicNameSc = prop.getProperty("topicNameSc")
- eventRuleNameSc = prop.getProperty("eventRuleNameSc")
- }
-
@Test
@Order(1)
fun HelloEventBridgeTest() = runBlocking {
listBusesHello()
println("Test 1 passed")
}
-
- @Test
- @Order(2)
- fun EventBridgeTest() = runBlocking {
- val sc = Scanner(System.`in`)
- val polJSON = "{" +
- "\"Version\": \"2012-10-17\"," +
- "\"Statement\": [{" +
- "\"Effect\": \"Allow\"," +
- "\"Principal\": {" +
- "\"Service\": \"events.amazonaws.com\"" +
- "}," +
- "\"Action\": \"sts:AssumeRole\"" +
- "}]" +
- "}"
-
- println(DASHES)
- println("1. Create an AWS Identity and Access Management (IAM) role to use with Amazon EventBridge.")
- val roleArn = createIAMRole(roleNameSc, polJSON)
- Assertions.assertFalse(roleArn!!.isEmpty())
- println(DASHES)
-
- println(DASHES)
- println("2. Create an S3 bucket with EventBridge events enabled.")
- if (checkBucket(bucketNameSc)) {
- println("$bucketNameSc already exists. Ending this scenario.")
- exitProcess(1)
- }
-
- createBucket(bucketNameSc)
- delay(3000)
- setBucketNotification(bucketNameSc)
- println(DASHES)
-
- println(DASHES)
- println("3. Create a rule that triggers when an object is uploaded to Amazon S3.")
- delay(10000)
- addEventRule(roleArn, bucketNameSc, eventRuleNameSc)
- println(DASHES)
-
- println(DASHES)
- println("4. List rules on the event bus.")
- listRules()
- println(DASHES)
-
- println(DASHES)
- println("5. Create a new SNS topic for testing and let the user subscribe to the topic.")
- val topicArn = createSnsTopic(topicNameSc)
- Assertions.assertFalse(topicArn!!.isEmpty())
- println(DASHES)
-
- println(DASHES)
- println("6. Add a target to the rule that sends an email to the specified topic.")
- println("Enter your email to subscribe to the Amazon SNS topic:")
- val email = sc.nextLine()
- subEmail(topicArn, email)
- println("Use the link in the email you received to confirm your subscription. Then press enter to continue.")
- sc.nextLine()
- println(DASHES)
-
- println(DASHES)
- println("7. Create an EventBridge event that sends an email when an Amazon S3 object is created.")
- addSnsEventRule(eventRuleNameSc, topicArn, topicNameSc, eventRuleNameSc, bucketNameSc)
- println(DASHES)
-
- println(DASHES)
- println("8. List Targets.")
- listTargets(eventRuleNameSc)
- println(DASHES)
-
- println(DASHES)
- println(" 9. List the rules for the same target.")
- listTargetRules(topicArn)
- println(DASHES)
-
- println(DASHES)
- println("10. Trigger the rule by uploading a file to the S3 bucket.")
- println("Press enter to continue.")
- sc.nextLine()
- uploadTextFiletoS3(bucketNameSc)
- println(DASHES)
-
- println(DASHES)
- println("11. Disable a specific rule.")
- changeRuleState(eventRuleNameSc, false)
- println(DASHES)
-
- println(DASHES)
- println("12. Check and print the state of the rule.")
- checkRule(eventRuleNameSc)
- println(DASHES)
-
- println(DASHES)
- println("13. Add a transform to the rule to change the text of the email.")
- updateSnsEventRule(topicArn, eventRuleNameSc)
- println(DASHES)
-
- println(DASHES)
- println("14. Enable a specific rule.")
- changeRuleState(eventRuleNameSc, true)
- println(DASHES)
-
- println(DASHES)
- println("15. Trigger the updated rule by uploading a file to the S3 bucket.")
- println("Press Enter to continue.")
- sc.nextLine()
- uploadTextFiletoS3(bucketNameSc)
- println(DASHES)
-
- println(DASHES)
- println("16. Update the rule to be a custom rule pattern.")
- updateToCustomRule(eventRuleNameSc)
- println("Updated event rule $eventRuleNameSc to use a custom pattern.")
- updateCustomRuleTargetWithTransform(topicArn, eventRuleNameSc)
- println("Updated event target $topicArn.")
- println(DASHES)
-
- println(DASHES)
- println("17. Send an event to trigger the rule. This will trigger a subscription email.")
- triggerCustomRule(email)
- println("Events have been sent. Press Enter to continue.")
- sc.nextLine()
- println(DASHES)
-
- println(DASHES)
- println("18. Clean up resources.")
- println("Do you want to clean up resources (y/n)")
- val ans = sc.nextLine()
- if (ans.compareTo("y") == 0) {
- cleanupResources(topicArn, eventRuleNameSc, bucketNameSc, roleNameSc)
- } else {
- println("The resources will not be cleaned up. ")
- }
- println(DASHES)
-
- println(DASHES)
- println("The Amazon EventBridge example scenario has successfully completed.")
- println(DASHES)
- }
}
diff --git a/kotlin/services/firehose/build.gradle.kts b/kotlin/services/firehose/build.gradle.kts
index 7a709f2fa4c..bf82dcea949 100644
--- a/kotlin/services/firehose/build.gradle.kts
+++ b/kotlin/services/firehose/build.gradle.kts
@@ -18,7 +18,7 @@ buildscript {
maven("https://plugins.gradle.org/m2/")
}
dependencies {
- classpath("org.jlleitschuh.gradle:ktlint-gradle:10.3.0")
+ classpath("org.jlleitschuh.gradle:ktlint-gradle:11.3.1")
}
}
@@ -27,8 +27,8 @@ repositories {
}
apply(plugin = "org.jlleitschuh.gradle.ktlint")
dependencies {
- implementation("aws.sdk.kotlin:firehose:1.0.0")
- implementation("aws.sdk.kotlin:secretsmanager:1.0.0")
+ implementation("aws.sdk.kotlin:firehose:1.0.30")
+ implementation("aws.sdk.kotlin:secretsmanager:1.0.30")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:0.30.0")
implementation("aws.smithy.kotlin:http-client-engine-crt:0.30.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
diff --git a/kotlin/services/firehose/src/test/kotlin/FirehoseTest.kt b/kotlin/services/firehose/src/test/kotlin/FirehoseTest.kt
new file mode 100644
index 00000000000..b65fa5c2353
--- /dev/null
+++ b/kotlin/services/firehose/src/test/kotlin/FirehoseTest.kt
@@ -0,0 +1,116 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+import aws.sdk.kotlin.runtime.auth.credentials.EnvironmentCredentialsProvider
+import aws.sdk.kotlin.services.secretsmanager.SecretsManagerClient
+import aws.sdk.kotlin.services.secretsmanager.model.GetSecretValueRequest
+import com.google.gson.Gson
+import com.kotlin.firehose.addStockTradeData
+import com.kotlin.firehose.createStream
+import com.kotlin.firehose.delStream
+import com.kotlin.firehose.listStreams
+import com.kotlin.firehose.putSingleRecord
+import kotlinx.coroutines.runBlocking
+import org.junit.jupiter.api.BeforeAll
+import org.junit.jupiter.api.DisplayName
+import org.junit.jupiter.api.MethodOrderer.OrderAnnotation
+import org.junit.jupiter.api.Nested
+import org.junit.jupiter.api.Order
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.TestInstance
+import org.junit.jupiter.api.TestMethodOrder
+import java.util.UUID
+import java.util.concurrent.TimeUnit
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@TestMethodOrder(OrderAnnotation::class)
+class FirehoseTest {
+ private var bucketARN = ""
+ private var roleARN = ""
+ private var newStream = ""
+ private var textValue = ""
+ private var delStream = ""
+
+ @BeforeAll
+ fun setup() = runBlocking {
+ // Get the values to run these tests from AWS Secrets Manager.
+ val gson = Gson()
+ val json: String = getSecretValues()
+ val values = gson.fromJson(json, SecretValues::class.java)
+ bucketARN = values.bucketARN.toString()
+ roleARN = values.roleARN.toString()
+ newStream = values.newStream.toString() + UUID.randomUUID()
+ textValue = values.textValue.toString()
+
+ // Uncomment this code block if you prefer using a config.properties file to retrieve AWS values required for these tests.
+ /*
+ val input: InputStream = this.javaClass.getClassLoader().getResourceAsStream("config.properties")
+ val prop = Properties()
+ prop.load(input)
+ bucketARN = prop.getProperty("bucketARN")
+ roleARN = prop.getProperty("roleARN")
+ newStream = prop.getProperty("newStream")
+ textValue = prop.getProperty("textValue")
+ existingStream = prop.getProperty("existingStream")
+ delStream = prop.getProperty("delStream")
+ */
+ }
+
+ @Test
+ @Order(2)
+ fun createDeliveryStreamTest() = runBlocking {
+ createStream(bucketARN, roleARN, newStream)
+ println("Test 2 passed")
+ }
+
+ @Test
+ @Order(3)
+ fun putRecordsTest() = runBlocking {
+ // Wait for the resource to become available
+ println("Wait 15 mins for resource to become available.")
+ TimeUnit.MINUTES.sleep(15)
+ putSingleRecord(textValue, newStream)
+ println("Test 3 passed")
+ }
+
+ @Test
+ @Order(4)
+ fun putBatchRecordsTest() = runBlocking {
+ addStockTradeData(newStream)
+ println("Test 4 passed")
+ }
+
+ @Test
+ @Order(5)
+ fun listDeliveryStreamsTest() = runBlocking {
+ listStreams()
+ println("Test 5 passed")
+ }
+
+ @Test
+ @Order(6)
+ fun deleteStreamTest() = runBlocking {
+ delStream(newStream)
+ println("Test 6 passed")
+ }
+
+ private suspend fun getSecretValues(): String {
+ val secretName = "test/firehose"
+ val valueRequest = GetSecretValueRequest {
+ secretId = secretName
+ }
+ SecretsManagerClient { region = "us-east-1"; credentialsProvider = EnvironmentCredentialsProvider() }.use { secretClient ->
+ val valueResponse = secretClient.getSecretValue(valueRequest)
+ return valueResponse.secretString.toString()
+ }
+ }
+
+ @Nested
+ @DisplayName("A class used to get test values from test/firehose (an AWS Secrets Manager secret)")
+ internal class SecretValues {
+ val bucketARN: String? = null
+ val roleARN: String? = null
+ val newStream: String? = null
+ val textValue: String? = null
+ }
+}
diff --git a/kotlin/services/glue/Readme.md b/kotlin/services/glue/Readme.md
index d29d23c5d2b..09a3321ee2b 100644
--- a/kotlin/services/glue/Readme.md
+++ b/kotlin/services/glue/Readme.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Create a crawler](src/main/kotlin/com/kotlin/glue/CreateCrawler.kt#L54) (`CreateCrawler`)
-- [Get a crawler](src/main/kotlin/com/kotlin/glue/GetCrawler.kt#L44) (`GetCrawler`)
-- [Get a database from the Data Catalog](src/main/kotlin/com/kotlin/glue/GetDatabase.kt#L46) (`GetDatabase`)
-- [Start a crawler](src/main/kotlin/com/kotlin/glue/StartCrawler.kt#L44) (`StartCrawler`)
+- [Create a crawler](src/main/kotlin/com/kotlin/glue/CreateCrawler.kt#L49) (`CreateCrawler`)
+- [Get a crawler](src/main/kotlin/com/kotlin/glue/GetCrawler.kt#L39) (`GetCrawler`)
+- [Get a database from the Data Catalog](src/main/kotlin/com/kotlin/glue/GetDatabase.kt#L41) (`GetDatabase`)
+- [Start a crawler](src/main/kotlin/com/kotlin/glue/StartCrawler.kt#L39) (`StartCrawler`)
### Scenarios
diff --git a/kotlin/services/iam/Readme.md b/kotlin/services/iam/Readme.md
index d41a77aa5e5..769cc9ed87d 100644
--- a/kotlin/services/iam/Readme.md
+++ b/kotlin/services/iam/Readme.md
@@ -33,21 +33,21 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Attach a policy to a role](src/main/kotlin/com/kotlin/iam/AttachRolePolicy.kt#L48) (`AttachRolePolicy`)
-- [Create a policy](src/main/kotlin/com/kotlin/iam/CreatePolicy.kt#L45) (`CreatePolicy`)
-- [Create a user](src/main/kotlin/com/kotlin/iam/CreateUser.kt#L45) (`CreateUser`)
-- [Create an access key](src/main/kotlin/com/kotlin/iam/CreateAccessKey.kt#L46) (`CreateAccessKey`)
-- [Create an alias for an account](src/main/kotlin/com/kotlin/iam/CreateAccountAlias.kt#L45) (`CreateAccountAlias`)
-- [Delete a policy](src/main/kotlin/com/kotlin/iam/DeletePolicy.kt#L44) (`DeletePolicy`)
-- [Delete a user](src/main/kotlin/com/kotlin/iam/DeleteUser.kt#L44) (`DeleteUser`)
-- [Delete an access key](src/main/kotlin/com/kotlin/iam/DeleteAccessKey.kt#L46) (`DeleteAccessKey`)
-- [Delete an account alias](src/main/kotlin/com/kotlin/iam/DeleteAccountAlias.kt#L44) (`DeleteAccountAlias`)
-- [Detach a policy from a role](src/main/kotlin/com/kotlin/iam/DetachRolePolicy.kt#L46) (`DetachRolePolicy`)
-- [Get a policy](src/main/kotlin/com/kotlin/iam/GetPolicy.kt#L43) (`GetPolicy`)
-- [List a user's access keys](src/main/kotlin/com/kotlin/iam/ListAccessKeys.kt#L43) (`ListAccessKeys`)
-- [List account aliases](src/main/kotlin/com/kotlin/iam/ListAccountAliases.kt#L29) (`ListAccountAliases`)
-- [List users](src/main/kotlin/com/kotlin/iam/ListUsers.kt#L29) (`ListUsers`)
-- [Update a user](src/main/kotlin/com/kotlin/iam/UpdateUser.kt#L46) (`UpdateUser`)
+- [Attach a policy to a role](src/main/kotlin/com/kotlin/iam/AttachRolePolicy.kt#L42) (`AttachRolePolicy`)
+- [Create a policy](src/main/kotlin/com/kotlin/iam/CreatePolicy.kt#L39) (`CreatePolicy`)
+- [Create a user](src/main/kotlin/com/kotlin/iam/CreateUser.kt#L39) (`CreateUser`)
+- [Create an access key](src/main/kotlin/com/kotlin/iam/CreateAccessKey.kt#L40) (`CreateAccessKey`)
+- [Create an alias for an account](src/main/kotlin/com/kotlin/iam/CreateAccountAlias.kt#L39) (`CreateAccountAlias`)
+- [Delete a policy](src/main/kotlin/com/kotlin/iam/DeletePolicy.kt#L38) (`DeletePolicy`)
+- [Delete a user](src/main/kotlin/com/kotlin/iam/DeleteUser.kt#L38) (`DeleteUser`)
+- [Delete an access key](src/main/kotlin/com/kotlin/iam/DeleteAccessKey.kt#L40) (`DeleteAccessKey`)
+- [Delete an account alias](src/main/kotlin/com/kotlin/iam/DeleteAccountAlias.kt#L38) (`DeleteAccountAlias`)
+- [Detach a policy from a role](src/main/kotlin/com/kotlin/iam/DetachRolePolicy.kt#L40) (`DetachRolePolicy`)
+- [Get a policy](src/main/kotlin/com/kotlin/iam/GetPolicy.kt#L38) (`GetPolicy`)
+- [List a user's access keys](src/main/kotlin/com/kotlin/iam/ListAccessKeys.kt#L38) (`ListAccessKeys`)
+- [List account aliases](src/main/kotlin/com/kotlin/iam/ListAccountAliases.kt#L23) (`ListAccountAliases`)
+- [List users](src/main/kotlin/com/kotlin/iam/ListUsers.kt#L23) (`ListUsers`)
+- [Update a user](src/main/kotlin/com/kotlin/iam/UpdateUser.kt#L40) (`UpdateUser`)
### Scenarios
diff --git a/kotlin/services/keyspaces/Readme.md b/kotlin/services/keyspaces/Readme.md
index 7625a0756be..a38daa8e74a 100644
--- a/kotlin/services/keyspaces/Readme.md
+++ b/kotlin/services/keyspaces/Readme.md
@@ -31,23 +31,23 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
### Get started
-- [Hello Amazon Keyspaces](src/main/kotlin/com/example/keyspace/HelloKeyspaces.kt#L16) (`ListKeyspaces`)
+- [Hello Amazon Keyspaces](src/main/kotlin/com/example/keyspace/HelloKeyspaces.kt#L9) (`ListKeyspaces`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a keyspace](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L557) (`CreateKeyspace`)
-- [Create a table](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L467) (`CreateTable`)
-- [Delete a keyspace](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L214) (`DeleteKeyspace`)
-- [Delete a table](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L250) (`DeleteTable`)
-- [Get data about a keyspace](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L544) (`GetKeyspace`)
-- [Get data about a table](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L436) (`GetTable`)
-- [List keyspaces](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L532) (`ListKeyspaces`)
-- [List tables in a keyspace](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L417) (`ListTables`)
-- [Restore a table to a point in time](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L295) (`RestoreTable`)
-- [Update a table](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L339) (`UpdateTable`)
+- [Create a keyspace](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L551) (`CreateKeyspace`)
+- [Create a table](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L461) (`CreateTable`)
+- [Delete a keyspace](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L208) (`DeleteKeyspace`)
+- [Delete a table](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L244) (`DeleteTable`)
+- [Get data about a keyspace](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L538) (`GetKeyspace`)
+- [Get data about a table](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L430) (`GetTable`)
+- [List keyspaces](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L526) (`ListKeyspaces`)
+- [List tables in a keyspace](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L411) (`ListTables`)
+- [Restore a table to a point in time](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L289) (`RestoreTable`)
+- [Update a table](src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt#L333) (`UpdateTable`)
### Scenarios
diff --git a/kotlin/services/kms/Readme.md b/kotlin/services/kms/Readme.md
index a57fa0205a6..7cf93475a22 100644
--- a/kotlin/services/kms/Readme.md
+++ b/kotlin/services/kms/Readme.md
@@ -33,17 +33,17 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Create a grant for a key](src/main/kotlin/com/kotlin/kms/CreateGrant.kt#L50) (`CreateGrant`)
-- [Create a key](src/main/kotlin/com/kotlin/kms/CreateCustomerKey.kt#L34) (`CreateKey`)
-- [Create an alias for a key](src/main/kotlin/com/kotlin/kms/CreateAlias.kt#L46) (`CreateAlias`)
-- [Decrypt ciphertext](src/main/kotlin/com/kotlin/kms/EncryptDataKey.kt#L49) (`Decrypt`)
-- [Describe a key](src/main/kotlin/com/kotlin/kms/DescribeKey.kt#L44) (`DescribeKey`)
-- [Disable a key](src/main/kotlin/com/kotlin/kms/DisableCustomerKey.kt#L44) (`DisableKey`)
-- [Enable a key](src/main/kotlin/com/kotlin/kms/EnableCustomerKey.kt#L44) (`EnableKey`)
-- [Encrypt text using a key](src/main/kotlin/com/kotlin/kms/EncryptDataKey.kt#L49) (`Encrypt`)
-- [List aliases for a key](src/main/kotlin/com/kotlin/kms/ListAliases.kt#L29) (`ListAliases`)
-- [List grants for a key](src/main/kotlin/com/kotlin/kms/ListGrants.kt#L43) (`ListGrants`)
-- [List keys](src/main/kotlin/com/kotlin/kms/ListKeys.kt#L28) (`ListKeys`)
+- [Create a grant for a key](src/main/kotlin/com/kotlin/kms/CreateGrant.kt#L44) (`CreateGrant`)
+- [Create a key](src/main/kotlin/com/kotlin/kms/CreateCustomerKey.kt#L28) (`CreateKey`)
+- [Create an alias for a key](src/main/kotlin/com/kotlin/kms/CreateAlias.kt#L40) (`CreateAlias`)
+- [Decrypt ciphertext](src/main/kotlin/com/kotlin/kms/EncryptDataKey.kt#L43) (`Decrypt`)
+- [Describe a key](src/main/kotlin/com/kotlin/kms/DescribeKey.kt#L38) (`DescribeKey`)
+- [Disable a key](src/main/kotlin/com/kotlin/kms/DisableCustomerKey.kt#L38) (`DisableKey`)
+- [Enable a key](src/main/kotlin/com/kotlin/kms/EnableCustomerKey.kt#L38) (`EnableKey`)
+- [Encrypt text using a key](src/main/kotlin/com/kotlin/kms/EncryptDataKey.kt#L43) (`Encrypt`)
+- [List aliases for a key](src/main/kotlin/com/kotlin/kms/ListAliases.kt#L23) (`ListAliases`)
+- [List grants for a key](src/main/kotlin/com/kotlin/kms/ListGrants.kt#L37) (`ListGrants`)
+- [List keys](src/main/kotlin/com/kotlin/kms/ListKeys.kt#L22) (`ListKeys`)
diff --git a/kotlin/services/lambda/Readme.md b/kotlin/services/lambda/Readme.md
index 815f9f06e56..26026ce7868 100644
--- a/kotlin/services/lambda/Readme.md
+++ b/kotlin/services/lambda/Readme.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Create a function](src/main/kotlin/com/kotlin/lambda/CreateFunction.kt#L57) (`CreateFunction`)
-- [Delete a function](src/main/kotlin/com/kotlin/lambda/DeleteFunction.kt#L45) (`DeleteFunction`)
-- [Invoke a function](src/main/kotlin/com/kotlin/lambda/LambdaInvoke.kt#L46) (`Invoke`)
+- [Create a function](src/main/kotlin/com/kotlin/lambda/CreateFunction.kt#L51) (`CreateFunction`)
+- [Delete a function](src/main/kotlin/com/kotlin/lambda/DeleteFunction.kt#L39) (`DeleteFunction`)
+- [Invoke a function](src/main/kotlin/com/kotlin/lambda/LambdaInvoke.kt#L40) (`Invoke`)
### Scenarios
diff --git a/kotlin/services/mediaconvert/Readme.md b/kotlin/services/mediaconvert/Readme.md
index 7a0c869a9d8..bbb97925b28 100644
--- a/kotlin/services/mediaconvert/Readme.md
+++ b/kotlin/services/mediaconvert/Readme.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Create a transcoding job](src/main/kotlin/com/kotlin/mediaconvert/CreateJob.kt#L143) (`CreateJob`)
-- [Get a transcoding job](src/main/kotlin/com/kotlin/mediaconvert/GetJob.kt#L46) (`GetJob`)
-- [List transcoding jobs](src/main/kotlin/com/kotlin/mediaconvert/ListJobs.kt#L34) (`ListJobs`)
+- [Create a transcoding job](src/main/kotlin/com/kotlin/mediaconvert/CreateJob.kt#L137) (`CreateJob`)
+- [Get a transcoding job](src/main/kotlin/com/kotlin/mediaconvert/GetJob.kt#L41) (`GetJob`)
+- [List transcoding jobs](src/main/kotlin/com/kotlin/mediaconvert/ListJobs.kt#L28) (`ListJobs`)
diff --git a/kotlin/services/opensearch/Readme.md b/kotlin/services/opensearch/Readme.md
index 75c278a9083..4ae0d23da3f 100644
--- a/kotlin/services/opensearch/Readme.md
+++ b/kotlin/services/opensearch/Readme.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Create a domain](src/main/kotlin/com/example/search/CreateDomain.kt#L49) (`CreateDomain`)
-- [Delete a domain](src/main/kotlin/com/example/search/DeleteDomain.kt#L45) (`DeleteDomain`)
-- [List domains](src/main/kotlin/com/example/search/ListDomainNames.kt#L29) (`ListDomainNames`)
-- [Modify a cluster configuration](src/main/kotlin/com/example/search/UpdateDomain.kt#L42) (`UpdateDomainConfig`)
+- [Create a domain](src/main/kotlin/com/example/search/CreateDomain.kt#L43) (`CreateDomain`)
+- [Delete a domain](src/main/kotlin/com/example/search/DeleteDomain.kt#L39) (`DeleteDomain`)
+- [List domains](src/main/kotlin/com/example/search/ListDomainNames.kt#L23) (`ListDomainNames`)
+- [Modify a cluster configuration](src/main/kotlin/com/example/search/UpdateDomain.kt#L37) (`UpdateDomainConfig`)
diff --git a/kotlin/services/pinpoint/Readme.md b/kotlin/services/pinpoint/Readme.md
index d54e019e700..dc116c5462c 100644
--- a/kotlin/services/pinpoint/Readme.md
+++ b/kotlin/services/pinpoint/Readme.md
@@ -33,14 +33,14 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Create a campaign](src/main/kotlin/com/kotlin/pinpoint/CreateCampaign.kt#L52) (`CreateCampaign`)
-- [Create a segment](src/main/kotlin/com/kotlin/pinpoint/CreateSegment.kt#L55) (`CreateSegment`)
-- [Create an application](src/main/kotlin/com/kotlin/pinpoint/CreateApp.kt#L46) (`CreateApp`)
-- [Delete an application](src/main/kotlin/com/kotlin/pinpoint/DeleteApp.kt#L44) (`DeleteApp`)
-- [Delete an endpoint](src/main/kotlin/com/kotlin/pinpoint/DeleteEndpoint.kt#L46) (`DeleteEndpoint`)
-- [Get endpoints](src/main/kotlin/com/kotlin/pinpoint/LookUpEndpoint.kt#L48) (`GetEndpoint`)
-- [List segments](src/main/kotlin/com/kotlin/pinpoint/ListSegments.kt#L44) (`GetSegments`)
-- [Send email and text messages](src/main/kotlin/com/kotlin/pinpoint/SendEmailMessage.kt#L58) (`SendMessages`)
+- [Create a campaign](src/main/kotlin/com/kotlin/pinpoint/CreateCampaign.kt#L46) (`CreateCampaign`)
+- [Create a segment](src/main/kotlin/com/kotlin/pinpoint/CreateSegment.kt#L49) (`CreateSegment`)
+- [Create an application](src/main/kotlin/com/kotlin/pinpoint/CreateApp.kt#L40) (`CreateApp`)
+- [Delete an application](src/main/kotlin/com/kotlin/pinpoint/DeleteApp.kt#L38) (`DeleteApp`)
+- [Delete an endpoint](src/main/kotlin/com/kotlin/pinpoint/DeleteEndpoint.kt#L40) (`DeleteEndpoint`)
+- [Get endpoints](src/main/kotlin/com/kotlin/pinpoint/LookUpEndpoint.kt#L42) (`GetEndpoint`)
+- [List segments](src/main/kotlin/com/kotlin/pinpoint/ListSegments.kt#L38) (`GetSegments`)
+- [Send email and text messages](src/main/kotlin/com/kotlin/pinpoint/SendEmailMessage.kt#L17) (`SendMessages`)
diff --git a/kotlin/services/rds/Readme.md b/kotlin/services/rds/Readme.md
index ed10ff39695..8c6073195af 100644
--- a/kotlin/services/rds/Readme.md
+++ b/kotlin/services/rds/Readme.md
@@ -33,11 +33,11 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Create a DB instance](src/main/kotlin/com/kotlin/rds/CreateDBInstance.kt#L61) (`CreateDBInstance`)
-- [Delete a DB instance](src/main/kotlin/com/kotlin/rds/DeleteDBInstance.kt#L44) (`DeleteDBInstance`)
-- [Describe DB instances](src/main/kotlin/com/kotlin/rds/DescribeDBInstances.kt#L27) (`DescribeDBInstances`)
-- [Modify a DB instance](src/main/kotlin/com/kotlin/rds/ModifyDBInstance.kt#L46) (`ModifyDBInstance`)
-- [Retrieve attributes](src/main/kotlin/com/kotlin/rds/DescribeAccountAttributes.kt#L28) (`DescribeAccountAttributes`)
+- [Create a DB instance](src/main/kotlin/com/kotlin/rds/CreateDBInstance.kt#L55) (`CreateDBInstance`)
+- [Delete a DB instance](src/main/kotlin/com/kotlin/rds/DeleteDBInstance.kt#L38) (`DeleteDBInstance`)
+- [Describe DB instances](src/main/kotlin/com/kotlin/rds/DescribeDBInstances.kt#L22) (`DescribeDBInstances`)
+- [Modify a DB instance](src/main/kotlin/com/kotlin/rds/ModifyDBInstance.kt#L40) (`ModifyDBInstance`)
+- [Retrieve attributes](src/main/kotlin/com/kotlin/rds/DescribeAccountAttributes.kt#L22) (`DescribeAccountAttributes`)
### Scenarios
diff --git a/kotlin/services/redshift/Readme.md b/kotlin/services/redshift/Readme.md
index 9852cfecd39..82aedfa7b1f 100644
--- a/kotlin/services/redshift/Readme.md
+++ b/kotlin/services/redshift/Readme.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Create a cluster](src/main/kotlin/com/kotlin/redshift/CreateAndModifyCluster.kt#L62) (`CreateCluster`)
-- [Delete a cluster](src/main/kotlin/com/kotlin/redshift/DeleteCluster.kt#L45) (`DeleteCluster`)
-- [Describe your clusters](src/main/kotlin/com/kotlin/redshift/DescribeClusters.kt#L28) (`DescribeClusters`)
-- [Modify a cluster](src/main/kotlin/com/kotlin/redshift/CreateAndModifyCluster.kt#L112) (`ModifyCluster`)
+- [Create a cluster](src/main/kotlin/com/kotlin/redshift/CreateAndModifyCluster.kt#L56) (`CreateCluster`)
+- [Delete a cluster](src/main/kotlin/com/kotlin/redshift/DeleteCluster.kt#L39) (`DeleteCluster`)
+- [Describe your clusters](src/main/kotlin/com/kotlin/redshift/DescribeClusters.kt#L22) (`DescribeClusters`)
+- [Modify a cluster](src/main/kotlin/com/kotlin/redshift/CreateAndModifyCluster.kt#L106) (`ModifyCluster`)
diff --git a/kotlin/services/rekognition/Readme.md b/kotlin/services/rekognition/Readme.md
index 23768374a98..7205415bb04 100644
--- a/kotlin/services/rekognition/Readme.md
+++ b/kotlin/services/rekognition/Readme.md
@@ -33,19 +33,19 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Compare faces in an image against a reference image](src/main/kotlin/com/kotlin/rekognition/CompareFaces.kt#L48) (`CompareFaces`)
-- [Create a collection](src/main/kotlin/com/kotlin/rekognition/CreateCollection.kt#L44) (`CreateCollection`)
-- [Delete a collection](src/main/kotlin/com/kotlin/rekognition/DeleteCollection.kt#L44) (`DeleteCollection`)
-- [Delete faces from a collection](src/main/kotlin/com/kotlin/rekognition/DeleteFacesFromCollection.kt#L43) (`DeleteFaces`)
-- [Describe a collection](src/main/kotlin/com/kotlin/rekognition/DescribeCollection.kt#L44) (`DescribeCollection`)
-- [Detect faces in an image](src/main/kotlin/com/kotlin/rekognition/DetectFaces.kt#L46) (`DetectFaces`)
-- [Detect labels in an image](src/main/kotlin/com/kotlin/rekognition/DetectLabels.kt#L45) (`DetectLabels`)
-- [Detect moderation labels in an image](src/main/kotlin/com/kotlin/rekognition/DetectModerationLabels.kt#L44) (`DetectModerationLabels`)
-- [Detect text in an image](src/main/kotlin/com/kotlin/rekognition/DetectText.kt#L45) (`DetectText`)
-- [Index faces to a collection](src/main/kotlin/com/kotlin/rekognition/AddFacesToCollection.kt#L48) (`IndexFaces`)
-- [List collections](src/main/kotlin/com/kotlin/rekognition/ListCollections.kt#L27) (`ListCollections`)
-- [List faces in a collection](src/main/kotlin/com/kotlin/rekognition/ListFacesInCollection.kt#L42) (`ListFaces`)
-- [Recognize celebrities in an image](src/main/kotlin/com/kotlin/rekognition/RecognizeCelebrities.kt#L45) (`RecognizeCelebrities`)
+- [Compare faces in an image against a reference image](src/main/kotlin/com/kotlin/rekognition/CompareFaces.kt#L43) (`CompareFaces`)
+- [Create a collection](src/main/kotlin/com/kotlin/rekognition/CreateCollection.kt#L38) (`CreateCollection`)
+- [Delete a collection](src/main/kotlin/com/kotlin/rekognition/DeleteCollection.kt#L39) (`DeleteCollection`)
+- [Delete faces from a collection](src/main/kotlin/com/kotlin/rekognition/DeleteFacesFromCollection.kt#L38) (`DeleteFaces`)
+- [Describe a collection](src/main/kotlin/com/kotlin/rekognition/DescribeCollection.kt#L39) (`DescribeCollection`)
+- [Detect faces in an image](src/main/kotlin/com/kotlin/rekognition/DetectFaces.kt#L41) (`DetectFaces`)
+- [Detect labels in an image](src/main/kotlin/com/kotlin/rekognition/DetectLabels.kt#L40) (`DetectLabels`)
+- [Detect moderation labels in an image](src/main/kotlin/com/kotlin/rekognition/DetectModerationLabels.kt#L39) (`DetectModerationLabels`)
+- [Detect text in an image](src/main/kotlin/com/kotlin/rekognition/DetectText.kt#L40) (`DetectText`)
+- [Index faces to a collection](src/main/kotlin/com/kotlin/rekognition/AddFacesToCollection.kt#L43) (`IndexFaces`)
+- [List collections](src/main/kotlin/com/kotlin/rekognition/ListCollections.kt#L22) (`ListCollections`)
+- [List faces in a collection](src/main/kotlin/com/kotlin/rekognition/ListFacesInCollection.kt#L37) (`ListFaces`)
+- [Recognize celebrities in an image](src/main/kotlin/com/kotlin/rekognition/RecognizeCelebrities.kt#L40) (`RecognizeCelebrities`)
### Scenarios
diff --git a/kotlin/services/s3/Readme.md b/kotlin/services/s3/Readme.md
index 90208cb61f5..ffd7643a3b7 100644
--- a/kotlin/services/s3/Readme.md
+++ b/kotlin/services/s3/Readme.md
@@ -33,16 +33,18 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
Code excerpts that show you how to call individual service functions.
-- [Copy an object from one bucket to another](src/main/kotlin/com/kotlin/s3/CopyObject.kt#L52) (`CopyObject`)
-- [Create a bucket](src/main/kotlin/com/kotlin/s3/CreateBucket.kt#L43) (`CreateBucket`)
-- [Delete a policy from a bucket](src/main/kotlin/com/kotlin/s3/DeleteBucketPolicy.kt#L45) (`DeleteBucketPolicy`)
-- [Delete multiple objects](src/main/kotlin/com/kotlin/s3/DeleteObjects.kt#L48) (`DeleteObjects`)
-- [Get an object from a bucket](src/main/kotlin/com/kotlin/s3/GetObjectData.kt#L50) (`GetObject`)
-- [Get the ACL of an object](src/main/kotlin/com/kotlin/s3/GetAcl.kt#L45) (`GetObjectAcl`)
-- [Get the policy for a bucket](src/main/kotlin/com/kotlin/s3/GetBucketPolicy.kt#L46) (`GetBucketPolicy`)
-- [List objects in a bucket](src/main/kotlin/com/kotlin/s3/ListObjects.kt#L44) (`ListObjectsV2`)
-- [Set a new ACL for a bucket](src/main/kotlin/com/kotlin/s3/SetAcl.kt#L52) (`PutBucketAcl`)
-- [Upload an object to a bucket](src/main/kotlin/com/kotlin/s3/PutObject.kt#L50) (`PutObject`)
+- [Copy an object from one bucket to another](src/main/kotlin/com/kotlin/s3/CopyObject.kt#L45) (`CopyObject`)
+- [Create a Multi-Region Access Point](src/main/kotlin/com/kotlin/s3/MrapExample.kt#L182) (`CreateMultiRegionAccessPoint`)
+- [Create a bucket](src/main/kotlin/com/kotlin/s3/CreateBucket.kt#L36) (`CreateBucket`)
+- [Delete a policy from a bucket](src/main/kotlin/com/kotlin/s3/DeleteBucketPolicy.kt#L38) (`DeleteBucketPolicy`)
+- [Delete multiple objects](src/main/kotlin/com/kotlin/s3/DeleteObjects.kt#L41) (`DeleteObjects`)
+- [Get an object from a Multi-Region Access Point](src/main/kotlin/com/kotlin/s3/MrapExample.kt#L171) (`GetObject`)
+- [Get an object from a bucket](src/main/kotlin/com/kotlin/s3/GetObjectData.kt#L43) (`GetObject`)
+- [Get the ACL of an object](src/main/kotlin/com/kotlin/s3/GetAcl.kt#L39) (`GetObjectAcl`)
+- [Get the policy for a bucket](src/main/kotlin/com/kotlin/s3/GetBucketPolicy.kt#L39) (`GetBucketPolicy`)
+- [List objects in a bucket](src/main/kotlin/com/kotlin/s3/ListObjects.kt#L37) (`ListObjectsV2`)
+- [Set a new ACL for a bucket](src/main/kotlin/com/kotlin/s3/SetAcl.kt#L45) (`PutBucketAcl`)
+- [Upload an object to a bucket](src/main/kotlin/com/kotlin/s3/PutObject.kt#L43) (`PutObject`)
### Scenarios
diff --git a/kotlin/services/sagemaker/Readme.md b/kotlin/services/sagemaker/Readme.md
index 3cf5f43c62a..ccda0f8fe88 100644
--- a/kotlin/services/sagemaker/Readme.md
+++ b/kotlin/services/sagemaker/Readme.md
@@ -31,17 +31,17 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
### Get started
-- [Hello SageMaker](src/main/kotlin/com/kotlin/sage/ListNotebooks.kt#L28) (`ListNotebookInstances`)
+- [Hello SageMaker](src/main/kotlin/com/kotlin/sage/ListNotebooks.kt#L22) (`ListNotebookInstances`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/kotlin/com/example/sage/SagemakerWorkflow.kt#L500) (`CreatePipeline`)
-- [Delete a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/kotlin/com/example/sage/SagemakerWorkflow.kt#L205) (`DeletePipeline`)
-- [Describe a pipeline execution](../../usecases/workflow_sagemaker_pipes/src/main/kotlin/com/example/sage/SagemakerWorkflow.kt#L396) (`DescribePipelineExecution`)
-- [Execute a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/kotlin/com/example/sage/SagemakerWorkflow.kt#L417) (`StartPipelineExecution`)
+- [Create a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/kotlin/com/example/sage/SagemakerWorkflow.kt#L494) (`CreatePipeline`)
+- [Delete a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/kotlin/com/example/sage/SagemakerWorkflow.kt#L199) (`DeletePipeline`)
+- [Describe a pipeline execution](../../usecases/workflow_sagemaker_pipes/src/main/kotlin/com/example/sage/SagemakerWorkflow.kt#L390) (`DescribePipelineExecution`)
+- [Execute a pipeline](../../usecases/workflow_sagemaker_pipes/src/main/kotlin/com/example/sage/SagemakerWorkflow.kt#L411) (`StartPipelineExecution`)
### Scenarios
diff --git a/kotlin/services/sns/Readme.md b/kotlin/services/sns/Readme.md
index 923d14b3509..22c1cfb6bd0 100644
--- a/kotlin/services/sns/Readme.md
+++ b/kotlin/services/sns/Readme.md
@@ -31,25 +31,25 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
### Get started
-- [Hello Amazon SNS](src/main/kotlin/com/kotlin/sns/HelloSNS.kt#L11) (`ListTopics`)
+- [Hello Amazon SNS](src/main/kotlin/com/kotlin/sns/HelloSNS.kt#L6) (`ListTopics`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add tags to a topic](src/main/kotlin/com/kotlin/sns/AddTags.kt#L46) (`TagResource`)
-- [Create a topic](src/main/kotlin/com/kotlin/sns/CreateTopic.kt#L46) (`CreateTopic`)
-- [Delete a subscription](src/main/kotlin/com/kotlin/sns/Unsubscribe.kt#L44) (`Unsubscribe`)
-- [Delete a topic](src/main/kotlin/com/kotlin/sns/DeleteTopic.kt#L45) (`DeleteTopic`)
-- [Get the properties of a topic](src/main/kotlin/com/kotlin/sns/GetTopicAttributes.kt#L45) (`GetTopicAttributes`)
-- [List the subscribers of a topic](src/main/kotlin/com/kotlin/sns/ListSubscriptions.kt#L27) (`ListSubscriptions`)
-- [List topics](src/main/kotlin/com/kotlin/sns/ListTopics.kt#L29) (`ListTopics`)
-- [Publish an SMS text message](src/main/kotlin/com/kotlin/sns/PublishTextSMS.kt#L47) (`Publish`)
-- [Publish to a topic](src/main/kotlin/com/kotlin/sns/PublishTopic.kt#L45) (`Publish`)
-- [Set topic attributes](src/main/kotlin/com/kotlin/sns/SetTopicAttributes.kt#L48) (`SetTopicAttributes`)
-- [Subscribe a Lambda function to a topic](src/main/kotlin/com/kotlin/sns/SubscribeLambda.kt#L46) (`Subscribe`)
-- [Subscribe an email address to a topic](src/main/kotlin/com/kotlin/sns/SubscribeEmail.kt#L47) (`Subscribe`)
+- [Add tags to a topic](src/main/kotlin/com/kotlin/sns/AddTags.kt#L40) (`TagResource`)
+- [Create a topic](src/main/kotlin/com/kotlin/sns/CreateTopic.kt#L40) (`CreateTopic`)
+- [Delete a subscription](src/main/kotlin/com/kotlin/sns/Unsubscribe.kt#L38) (`Unsubscribe`)
+- [Delete a topic](src/main/kotlin/com/kotlin/sns/DeleteTopic.kt#L39) (`DeleteTopic`)
+- [Get the properties of a topic](src/main/kotlin/com/kotlin/sns/GetTopicAttributes.kt#L39) (`GetTopicAttributes`)
+- [List the subscribers of a topic](src/main/kotlin/com/kotlin/sns/ListSubscriptions.kt#L22) (`ListSubscriptions`)
+- [List topics](src/main/kotlin/com/kotlin/sns/ListTopics.kt#L23) (`ListTopics`)
+- [Publish an SMS text message](src/main/kotlin/com/kotlin/sns/PublishTextSMS.kt#L41) (`Publish`)
+- [Publish to a topic](src/main/kotlin/com/kotlin/sns/PublishTopic.kt#L40) (`Publish`)
+- [Set topic attributes](src/main/kotlin/com/kotlin/sns/SetTopicAttributes.kt#L42) (`SetTopicAttributes`)
+- [Subscribe a Lambda function to a topic](src/main/kotlin/com/kotlin/sns/SubscribeLambda.kt#L40) (`Subscribe`)
+- [Subscribe an email address to a topic](src/main/kotlin/com/kotlin/sns/SubscribeEmail.kt#L41) (`Subscribe`)
diff --git a/kotlin/services/sqs/Readme.md b/kotlin/services/sqs/Readme.md
index 7aefdc10fdd..6831107cb6a 100644
--- a/kotlin/services/sqs/Readme.md
+++ b/kotlin/services/sqs/Readme.md
@@ -31,19 +31,19 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
### Get started
-- [Hello Amazon SQS](src/main/kotlin/com/kotlin/sqs/HelloSQS.kt#L9) (`ListQueues`)
+- [Hello Amazon SQS](src/main/kotlin/com/kotlin/sqs/HelloSQS.kt#L4) (`ListQueues`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a queue](src/main/kotlin/com/kotlin/sqs/CreateQueue.kt#L45) (`CreateQueue`)
-- [Delete a message from a queue](src/main/kotlin/com/kotlin/sqs/DeleteMessages.kt#L45) (`DeleteMessage`)
-- [Delete a queue](src/main/kotlin/com/kotlin/sqs/DeleteMessages.kt#L45) (`DeleteQueue`)
-- [List queues](src/main/kotlin/com/kotlin/sqs/ListQueues.kt#L28) (`ListQueues`)
-- [Receive messages from a queue](src/main/kotlin/com/kotlin/sqs/ReceiveMessages.kt#L44) (`ReceiveMessage`)
-- [Send a message to a queue](src/main/kotlin/com/kotlin/sqs/SendMessages.kt#L50) (`SendMessage`)
+- [Create a queue](src/main/kotlin/com/kotlin/sqs/CreateQueue.kt#L39) (`CreateQueue`)
+- [Delete a message from a queue](src/main/kotlin/com/kotlin/sqs/DeleteMessages.kt#L39) (`DeleteMessage`)
+- [Delete a queue](src/main/kotlin/com/kotlin/sqs/DeleteMessages.kt#L39) (`DeleteQueue`)
+- [List queues](src/main/kotlin/com/kotlin/sqs/ListQueues.kt#L22) (`ListQueues`)
+- [Receive messages from a queue](src/main/kotlin/com/kotlin/sqs/ReceiveMessages.kt#L38) (`ReceiveMessage`)
+- [Send a message to a queue](src/main/kotlin/com/kotlin/sqs/SendMessages.kt#L44) (`SendMessage`)
diff --git a/kotlin/services/support/Readme.md b/kotlin/services/support/Readme.md
index c2bbcdfef34..da4e122e7e0 100644
--- a/kotlin/services/support/Readme.md
+++ b/kotlin/services/support/Readme.md
@@ -31,22 +31,22 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotli
### Get started
-- [Hello Support](src/main/kotlin/com/example/support/HelloSupport.kt#L14) (`DescribeServices`)
+- [Hello Support](src/main/kotlin/com/example/support/HelloSupport.kt#L9) (`DescribeServices`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Add a communication to a case](src/main/kotlin/com/example/support/SupportScenario.kt#L179) (`AddCommunicationToCase`)
-- [Add an attachment to a set](src/main/kotlin/com/example/support/SupportScenario.kt#L198) (`AddAttachmentsToSet`)
-- [Create a case](src/main/kotlin/com/example/support/SupportScenario.kt#L241) (`CreateCase`)
-- [Describe an attachment](src/main/kotlin/com/example/support/SupportScenario.kt#L146) (`DescribeAttachment`)
-- [Describe cases](src/main/kotlin/com/example/support/SupportScenario.kt#L218) (`DescribeCases`)
-- [Describe communications](src/main/kotlin/com/example/support/SupportScenario.kt#L159) (`DescribeCommunications`)
-- [Describe services](src/main/kotlin/com/example/support/SupportScenario.kt#L282) (`DescribeServices`)
-- [Describe severity levels](src/main/kotlin/com/example/support/SupportScenario.kt#L262) (`DescribeSeverityLevels`)
-- [Resolve case](src/main/kotlin/com/example/support/SupportScenario.kt#L134) (`ResolveCase`)
+- [Add a communication to a case](src/main/kotlin/com/example/support/SupportScenario.kt#L173) (`AddCommunicationToCase`)
+- [Add an attachment to a set](src/main/kotlin/com/example/support/SupportScenario.kt#L192) (`AddAttachmentsToSet`)
+- [Create a case](src/main/kotlin/com/example/support/SupportScenario.kt#L235) (`CreateCase`)
+- [Describe an attachment](src/main/kotlin/com/example/support/SupportScenario.kt#L140) (`DescribeAttachment`)
+- [Describe cases](src/main/kotlin/com/example/support/SupportScenario.kt#L212) (`DescribeCases`)
+- [Describe communications](src/main/kotlin/com/example/support/SupportScenario.kt#L153) (`DescribeCommunications`)
+- [Describe services](src/main/kotlin/com/example/support/SupportScenario.kt#L276) (`DescribeServices`)
+- [Describe severity levels](src/main/kotlin/com/example/support/SupportScenario.kt#L256) (`DescribeSeverityLevels`)
+- [Resolve case](src/main/kotlin/com/example/support/SupportScenario.kt#L128) (`ResolveCase`)
### Scenarios
diff --git a/php/cross_service/aurora_item_tracker/README.md b/php/cross_service/aurora_item_tracker/README.md
index 452f786c746..bad530621eb 100644
--- a/php/cross_service/aurora_item_tracker/README.md
+++ b/php/cross_service/aurora_item_tracker/README.md
@@ -61,8 +61,9 @@ For *Database username*, choose *Connect with a Secrets Manager ARN*. Put the *S
the *describe-stacks* command from the AWS CDK instructions. Do the same for the database name.
This opens a SQL query console. You can run any raw SQL queries here that you want. Run the
-following to create the work table.
+following statement to create the work table.
+If you are using the MySQL-compatible edition:
```sql
create table work_items (
work_item_id INT AUTO_INCREMENT PRIMARY KEY,
@@ -75,6 +76,19 @@ create table work_items (
);
```
+If you are using the PostgreSQL-compatible edition:
+```sql
+create table work_items (
+ work_item_id SERIAL PRIMARY KEY,
+ created_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ description TEXT,
+ guide TEXT,
+ status TEXT,
+ username VARCHAR(45),
+ archive BOOL DEFAULT false
+);
+```
+
#### Application functionality
A user can perform the following tasks in the AWS Tracker application:
diff --git a/php/example_code/auto-scaling/Readme.md b/php/example_code/auto-scaling/Readme.md
index 56884a55c3d..c1ba14c4f16 100644
--- a/php/example_code/auto-scaling/Readme.md
+++ b/php/example_code/auto-scaling/Readme.md
@@ -36,23 +36,23 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `php`
### Get started
-- [Hello Auto Scaling](GettingStartedWithAutoScaling.php#L245) (`DescribeAutoScalingGroups`)
+- [Hello Auto Scaling](GettingStartedWithAutoScaling.php#L252) (`DescribeAutoScalingGroups`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Create a group](AutoScalingService.php#L23) (`CreateAutoScalingGroup`)
-- [Delete a group](AutoScalingService.php#L62) (`DeleteAutoScalingGroup`)
-- [Disable metrics collection for a group](AutoScalingService.php#L177) (`DisableMetricsCollection`)
-- [Enable metrics collection for a group](AutoScalingService.php#L167) (`EnableMetricsCollection`)
-- [Get information about groups](AutoScalingService.php#L72) (`DescribeAutoScalingGroups`)
-- [Get information about instances](AutoScalingService.php#L149) (`DescribeAutoScalingInstances`)
-- [Get information about scaling activities](AutoScalingService.php#L158) (`DescribeScalingActivities`)
-- [Set the desired capacity of a group](AutoScalingService.php#L139) (`SetDesiredCapacity`)
-- [Terminate an instance in a group](AutoScalingService.php#L86) (`TerminateInstanceInAutoScalingGroup`)
-- [Update a group](AutoScalingService.php#L43) (`UpdateAutoScalingGroup`)
+- [Create a group](AutoScalingService.php#L22) (`CreateAutoScalingGroup`)
+- [Delete a group](AutoScalingService.php#L61) (`DeleteAutoScalingGroup`)
+- [Disable metrics collection for a group](AutoScalingService.php#L176) (`DisableMetricsCollection`)
+- [Enable metrics collection for a group](AutoScalingService.php#L166) (`EnableMetricsCollection`)
+- [Get information about groups](AutoScalingService.php#L71) (`DescribeAutoScalingGroups`)
+- [Get information about instances](AutoScalingService.php#L148) (`DescribeAutoScalingInstances`)
+- [Get information about scaling activities](AutoScalingService.php#L157) (`DescribeScalingActivities`)
+- [Set the desired capacity of a group](AutoScalingService.php#L138) (`SetDesiredCapacity`)
+- [Terminate an instance in a group](AutoScalingService.php#L85) (`TerminateInstanceInAutoScalingGroup`)
+- [Update a group](AutoScalingService.php#L42) (`UpdateAutoScalingGroup`)
### Scenarios
diff --git a/php/example_code/bedrock-runtime/BedrockRuntimeService.php b/php/example_code/bedrock-runtime/BedrockRuntimeService.php
index 01182939f5b..1940fbe2c38 100644
--- a/php/example_code/bedrock-runtime/BedrockRuntimeService.php
+++ b/php/example_code/bedrock-runtime/BedrockRuntimeService.php
@@ -43,7 +43,7 @@ public function invokeClaude($prompt)
$modelId = 'anthropic.claude-v2';
# Claude requires you to enclose the prompt as follows:
- $prompt = 'Human: {$prompt}\n\nAssistant:';
+ $prompt = "\n\nHuman: {$prompt}\n\nAssistant:";
$body = [
'prompt' => $prompt,
diff --git a/php/example_code/bedrock/README.md b/php/example_code/bedrock/README.md
index 3b9c950cc7c..a6ee0ec4871 100644
--- a/php/example_code/bedrock/README.md
+++ b/php/example_code/bedrock/README.md
@@ -40,7 +40,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `php`
Code excerpts that show you how to call individual service functions.
-- [List available Amazon Bedrock foundation models](BedrockService.php#L32) (`ListFoundationModels`)
+- [List available Amazon Bedrock foundation models](BedrockService.php#L31) (`ListFoundationModels`)
diff --git a/php/example_code/dynamodb/Readme.md b/php/example_code/dynamodb/Readme.md
index e9d6a1c330c..c26f40ee383 100644
--- a/php/example_code/dynamodb/Readme.md
+++ b/php/example_code/dynamodb/Readme.md
@@ -34,17 +34,17 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `php`
Code excerpts that show you how to call individual service functions.
- [Create a table](dynamodb_basics/GettingStartedWithDynamoDB.php#L52) (`CreateTable`)
-- [Delete a table](DynamoDBService.php#L85) (`DeleteTable`)
+- [Delete a table](DynamoDBService.php#L84) (`DeleteTable`)
- [Delete an item from a table](dynamodb_basics/GettingStartedWithDynamoDB.php#L100) (`DeleteItem`)
- [Get an item from a table](dynamodb_basics/GettingStartedWithDynamoDB.php#L131) (`GetItem`)
-- [List tables](DynamoDBService.php#L65) (`ListTables`)
+- [List tables](DynamoDBService.php#L64) (`ListTables`)
- [Put an item in a table](dynamodb_basics/GettingStartedWithDynamoDB.php#L67) (`PutItem`)
- [Query a table](dynamodb_basics/GettingStartedWithDynamoDB.php#L158) (`Query`)
-- [Run a PartiQL statement](DynamoDBService.php#L244) (`ExecuteStatement`)
-- [Run batches of PartiQL statements](DynamoDBService.php#L274) (`BatchExecuteStatement`)
+- [Run a PartiQL statement](DynamoDBService.php#L243) (`ExecuteStatement`)
+- [Run batches of PartiQL statements](DynamoDBService.php#L273) (`BatchExecuteStatement`)
- [Scan a table](dynamodb_basics/GettingStartedWithDynamoDB.php#L178) (`Scan`)
- [Update an item in a table](dynamodb_basics/GettingStartedWithDynamoDB.php#L136) (`UpdateItem`)
-- [Write a batch of items](DynamoDBService.php#L202) (`BatchWriteItem`)
+- [Write a batch of items](DynamoDBService.php#L201) (`BatchWriteItem`)
### Scenarios
@@ -55,6 +55,12 @@ functions within the same service.
- [Query a table by using batches of PartiQL statements](DynamoDBService.php)
- [Query a table using PartiQL](DynamoDBService.php)
+### Cross-service examples
+
+Sample applications that work across multiple AWS services.
+
+- [Create a serverless application to manage photos](../../applications/photo_asset_manager)
+
diff --git a/php/example_code/glue/README.md b/php/example_code/glue/README.md
new file mode 100644
index 00000000000..65e2fd0fcb0
--- /dev/null
+++ b/php/example_code/glue/README.md
@@ -0,0 +1,114 @@
+# AWS Glue code examples for the SDK for PHP
+
+## Overview
+
+Shows how to use the AWS SDK for PHP to work with AWS Glue.
+
+
+
+
+_AWS Glue is a scalable, serverless data integration service that makes it easy to discover, prepare, and combine data for analytics, machine learning, and application development._
+
+## ⚠ Important
+
+* Running this code might result in charges to your AWS account. For more details, see [AWS Pricing](https://aws.amazon.com/pricing/) and [Free Tier](https://aws.amazon.com/free/).
+* Running the tests might result in charges to your AWS account.
+* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege).
+* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services).
+
+
+
+
+## Code examples
+
+### Prerequisites
+
+For prerequisites, see the [README](../../README.md#Prerequisites) in the `php` folder.
+
+
+
+
+
+### Single actions
+
+Code excerpts that show you how to call individual service functions.
+
+- [Create a crawler](GettingStartedWithGlue.php#L47) (`CreateCrawler`)
+- [Create a job definition](GettingStartedWithGlue.php#L54) (`CreateJob`)
+- [Delete a crawler](GettingStartedWithGlue.php#L180) (`DeleteCrawler`)
+- [Delete a database from the Data Catalog](GettingStartedWithGlue.php#L173) (`DeleteDatabase`)
+- [Delete a job definition](GettingStartedWithGlue.php#L159) (`DeleteJob`)
+- [Delete a table from a database](GettingStartedWithGlue.php#L166) (`DeleteTable`)
+- [Get a crawler](GettingStartedWithGlue.php#L69) (`GetCrawler`)
+- [Get a database from the Data Catalog](GettingStartedWithGlue.php#L58) (`GetDatabase`)
+- [Get a job run](GettingStartedWithGlue.php#L107) (`GetJobRun`)
+- [Get runs of a job](GettingStartedWithGlue.php#L107) (`GetJobRuns`)
+- [Get tables from a database](GettingStartedWithGlue.php#L58) (`GetTables`)
+- [List job definitions](GettingStartedWithGlue.php#L151) (`ListJobs`)
+- [Start a crawler](GettingStartedWithGlue.php#L47) (`StartCrawler`)
+- [Start a job run](GettingStartedWithGlue.php#L107) (`StartJobRun`)
+
+### Scenarios
+
+Code examples that show you how to accomplish a specific task by calling multiple
+functions within the same service.
+
+- [Get started with crawlers and jobs](GlueService.php)
+
+
+
+
+
+## Run the examples
+
+### Instructions
+
+
+
+
+
+
+
+#### Get started with crawlers and jobs
+
+This example shows you how to do the following:
+
+- Create a crawler that crawls a public Amazon S3 bucket and generates a database of CSV-formatted metadata.
+- List information about databases and tables in your AWS Glue Data Catalog.
+- Create a job to extract CSV data from the S3 bucket, transform the data, and load JSON-formatted output into another S3 bucket.
+- List information about job runs, view transformed data, and clean up resources.
+
+
+
+
+
+
+
+
+### Tests
+
+⚠ Running tests might result in charges to your AWS account.
+
+
+To find instructions for running these tests, see the [README](../../README.md#Tests)
+in the `php` folder.
+
+
+
+
+
+
+## Additional resources
+
+- [AWS Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/what-is-glue.html)
+- [AWS Glue API Reference](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api.html)
+- [SDK for PHP AWS Glue reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Glue.html)
+
+
+
+
+---
+
+Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+
+SPDX-License-Identifier: Apache-2.0
\ No newline at end of file
diff --git a/php/example_code/iam/README.md b/php/example_code/iam/README.md
index c8d048647c6..ab15793461e 100644
--- a/php/example_code/iam/README.md
+++ b/php/example_code/iam/README.md
@@ -33,21 +33,21 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `php`
Code excerpts that show you how to call individual service functions.
-- [Attach a policy to a role](GettingStartedWithIAM.php#L47) (`AttachRolePolicy`)
-- [Create a policy](GettingStartedWithIAM.php#L47) (`CreatePolicy`)
-- [Create a role](GettingStartedWithIAM.php#L47) (`CreateRole`)
-- [Create a service-linked role](GettingStartedWithIAM.php#L47) (`CreateServiceLinkedRole`)
-- [Create a user](GettingStartedWithIAM.php#L47) (`CreateUser`)
-- [Get a policy](GettingStartedWithIAM.php#L47) (`GetPolicy`)
-- [Get a role](GettingStartedWithIAM.php#L47) (`GetRole`)
-- [Get the account password policy](GettingStartedWithIAM.php#L47) (`GetAccountPasswordPolicy`)
-- [List SAML providers](GettingStartedWithIAM.php#L47) (`ListSAMLProviders`)
-- [List groups](GettingStartedWithIAM.php#L47) (`ListGroups`)
-- [List inline policies for a role](GettingStartedWithIAM.php#L47) (`ListRolePolicies`)
-- [List policies](GettingStartedWithIAM.php#L47) (`ListPolicies`)
-- [List policies attached to a role](GettingStartedWithIAM.php#L47) (`ListAttachedRolePolicies`)
-- [List roles](GettingStartedWithIAM.php#L47) (`ListRoles`)
-- [List users](GettingStartedWithIAM.php#L47) (`ListUsers`)
+- [Attach a policy to a role](GettingStartedWithIAM.php#L46) (`AttachRolePolicy`)
+- [Create a policy](GettingStartedWithIAM.php#L46) (`CreatePolicy`)
+- [Create a role](GettingStartedWithIAM.php#L46) (`CreateRole`)
+- [Create a service-linked role](GettingStartedWithIAM.php#L46) (`CreateServiceLinkedRole`)
+- [Create a user](GettingStartedWithIAM.php#L46) (`CreateUser`)
+- [Get a policy](GettingStartedWithIAM.php#L46) (`GetPolicy`)
+- [Get a role](GettingStartedWithIAM.php#L46) (`GetRole`)
+- [Get the account password policy](GettingStartedWithIAM.php#L46) (`GetAccountPasswordPolicy`)
+- [List SAML providers](GettingStartedWithIAM.php#L46) (`ListSAMLProviders`)
+- [List groups](GettingStartedWithIAM.php#L46) (`ListGroups`)
+- [List inline policies for a role](GettingStartedWithIAM.php#L46) (`ListRolePolicies`)
+- [List policies](GettingStartedWithIAM.php#L46) (`ListPolicies`)
+- [List policies attached to a role](GettingStartedWithIAM.php#L46) (`ListAttachedRolePolicies`)
+- [List roles](GettingStartedWithIAM.php#L46) (`ListRoles`)
+- [List users](GettingStartedWithIAM.php#L46) (`ListUsers`)
### Scenarios
diff --git a/php/example_code/lambda/Readme.md b/php/example_code/lambda/Readme.md
index 9b0ffd7051b..c579c70b782 100644
--- a/php/example_code/lambda/Readme.md
+++ b/php/example_code/lambda/Readme.md
@@ -33,13 +33,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `php`
Code excerpts that show you how to call individual service functions.
-- [Create a function](LambdaService.php#L32) (`CreateFunction`)
-- [Delete a function](LambdaService.php#L109) (`DeleteFunction`)
-- [Get a function](LambdaService.php#L51) (`GetFunction`)
-- [Invoke a function](LambdaService.php#L76) (`Invoke`)
-- [List functions](LambdaService.php#L60) (`ListFunctions`)
-- [Update function code](LambdaService.php#L87) (`UpdateFunctionCode`)
-- [Update function configuration](LambdaService.php#L98) (`UpdateFunctionConfiguration`)
+- [Create a function](LambdaService.php#L31) (`CreateFunction`)
+- [Delete a function](LambdaService.php#L108) (`DeleteFunction`)
+- [Get a function](LambdaService.php#L50) (`GetFunction`)
+- [Invoke a function](LambdaService.php#L75) (`Invoke`)
+- [List functions](LambdaService.php#L59) (`ListFunctions`)
+- [Update function code](LambdaService.php#L86) (`UpdateFunctionCode`)
+- [Update function configuration](LambdaService.php#L97) (`UpdateFunctionConfiguration`)
### Scenarios
@@ -48,6 +48,12 @@ functions within the same service.
- [Get started with functions](GettingStartedWithLambda.php)
+### Cross-service examples
+
+Sample applications that work across multiple AWS services.
+
+- [Create a serverless application to manage photos](../../applications/photo_asset_manager)
+
diff --git a/php/example_code/sns/README.md b/php/example_code/sns/README.md
index 850ec2d2c51..4ebe7626f6f 100644
--- a/php/example_code/sns/README.md
+++ b/php/example_code/sns/README.md
@@ -33,22 +33,28 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `php`
Code excerpts that show you how to call individual service functions.
-- [Check whether a phone number is opted out](CheckOptOut.php#L19) (`CheckIfPhoneNumberIsOptedOut`)
-- [Confirm an endpoint owner wants to receive messages](ConfirmSubscription.php#L19) (`ConfirmSubscription`)
-- [Create a topic](CreateTopic.php#L19) (`CreateTopic`)
-- [Delete a subscription](Unsubscribe.php#L19) (`Unsubscribe`)
-- [Delete a topic](DeleteTopic.php#L19) (`DeleteTopic`)
-- [Get the properties of a topic](GetTopicAttributes.php#L34) (`GetTopicAttributes`)
-- [Get the settings for sending SMS messages](GetSMSAtrributes.php#L19) (`GetSMSAttributes`)
-- [List opted out phone numbers](ListOptOut.php#L19) (`ListPhoneNumbersOptedOut`)
-- [List the subscribers of a topic](ListSubscriptions.php#L19) (`ListSubscriptions`)
-- [List topics](ListTopics.php#L19) (`ListTopics`)
-- [Publish an SMS text message](PublishTextSMS.php#L19) (`Publish`)
-- [Publish to a topic](PublishTopic.php#L19) (`Publish`)
-- [Set the default settings for sending SMS messages](SetSMSAttributes.php#L34) (`SetSMSAttributes`)
-- [Set topic attributes](SetTopicAttributes.php#L19) (`SetTopicAttributes`)
-- [Subscribe an HTTP endpoint to a topic](SubscribeHTTPS.php#L19) (`Subscribe`)
-- [Subscribe an email address to a topic](SubscribeEmail.php#L19) (`Subscribe`)
+- [Check whether a phone number is opted out](CheckOptOut.php#L10) (`CheckIfPhoneNumberIsOptedOut`)
+- [Confirm an endpoint owner wants to receive messages](ConfirmSubscription.php#L10) (`ConfirmSubscription`)
+- [Create a topic](CreateTopic.php#L10) (`CreateTopic`)
+- [Delete a subscription](Unsubscribe.php#L10) (`Unsubscribe`)
+- [Delete a topic](DeleteTopic.php#L10) (`DeleteTopic`)
+- [Get the properties of a topic](GetTopicAttributes.php#L26) (`GetTopicAttributes`)
+- [Get the settings for sending SMS messages](GetSMSAtrributes.php#L10) (`GetSMSAttributes`)
+- [List opted out phone numbers](ListOptOut.php#L10) (`ListPhoneNumbersOptedOut`)
+- [List the subscribers of a topic](ListSubscriptions.php#L10) (`ListSubscriptions`)
+- [List topics](ListTopics.php#L10) (`ListTopics`)
+- [Publish an SMS text message](PublishTextSMS.php#L10) (`Publish`)
+- [Publish to a topic](PublishTopic.php#L10) (`Publish`)
+- [Set the default settings for sending SMS messages](SetSMSAttributes.php#L26) (`SetSMSAttributes`)
+- [Set topic attributes](SetTopicAttributes.php#L10) (`SetTopicAttributes`)
+- [Subscribe an HTTP endpoint to a topic](SubscribeHTTPS.php#L10) (`Subscribe`)
+- [Subscribe an email address to a topic](SubscribeEmail.php#L10) (`Subscribe`)
+
+### Cross-service examples
+
+Sample applications that work across multiple AWS services.
+
+- [Create a serverless application to manage photos](../../applications/photo_asset_manager)
diff --git a/python/example_code/bedrock-runtime/bedrock_runtime_wrapper.py b/python/example_code/bedrock-runtime/bedrock_runtime_wrapper.py
index 72a6cfa1297..aebb1826c57 100644
--- a/python/example_code/bedrock-runtime/bedrock_runtime_wrapper.py
+++ b/python/example_code/bedrock-runtime/bedrock_runtime_wrapper.py
@@ -118,7 +118,7 @@ def invoke_llama2(self, prompt):
Invokes the Meta Llama 2 large-language model to run an inference
using the input provided in the request body.
- :param prompt: The prompt that you want Jurassic-2 to complete.
+ :param prompt: The prompt that you want Llama 2 to complete.
:return: Inference response from the model.
"""
diff --git a/python/example_code/cognito/README.md b/python/example_code/cognito/README.md
index 61db132e654..7a1b5372269 100644
--- a/python/example_code/cognito/README.md
+++ b/python/example_code/cognito/README.md
@@ -38,25 +38,25 @@ python -m pip install -r requirements.txt
Code excerpts that show you how to call individual service functions.
-- [Confirm a user](cognito_idp_actions.py#L130) (`ConfirmSignUp`)
-- [Confirm an MFA device for tracking](cognito_idp_actions.py#L341) (`ConfirmDevice`)
-- [Get a token to associate an MFA application with a user](cognito_idp_actions.py#L240) (`AssociateSoftwareToken`)
-- [Get information about a user](cognito_idp_actions.py#L22) (`AdminGetUser`)
-- [List users](cognito_idp_actions.py#L163) (`ListUsers`)
-- [Resend a confirmation code](cognito_idp_actions.py#L103) (`ResendConfirmationCode`)
-- [Respond to SRP authentication challenges](cognito_idp_actions.py#L407) (`RespondToAuthChallenge`)
-- [Respond to an authentication challenge](cognito_idp_actions.py#L291) (`AdminRespondToAuthChallenge`)
-- [Sign up a user](cognito_idp_actions.py#L55) (`SignUp`)
-- [Start authentication with a tracked device](cognito_idp_actions.py#L406) (`InitiateAuth`)
-- [Start authentication with administrator credentials](cognito_idp_actions.py#L186) (`AdminInitiateAuth`)
-- [Verify an MFA application with a user](cognito_idp_actions.py#L264) (`VerifySoftwareToken`)
+- [Confirm a user](cognito_idp_actions.py#L131) (`ConfirmSignUp`)
+- [Confirm an MFA device for tracking](cognito_idp_actions.py#L342) (`ConfirmDevice`)
+- [Get a token to associate an MFA application with a user](cognito_idp_actions.py#L241) (`AssociateSoftwareToken`)
+- [Get information about a user](cognito_idp_actions.py#L23) (`AdminGetUser`)
+- [List users](cognito_idp_actions.py#L164) (`ListUsers`)
+- [Resend a confirmation code](cognito_idp_actions.py#L104) (`ResendConfirmationCode`)
+- [Respond to SRP authentication challenges](cognito_idp_actions.py#L408) (`RespondToAuthChallenge`)
+- [Respond to an authentication challenge](cognito_idp_actions.py#L292) (`AdminRespondToAuthChallenge`)
+- [Sign up a user](cognito_idp_actions.py#L56) (`SignUp`)
+- [Start authentication](cognito_idp_actions.py#L407) (`InitiateAuth`)
+- [Start authentication with administrator credentials](cognito_idp_actions.py#L187) (`AdminInitiateAuth`)
+- [Verify an MFA application with a user](cognito_idp_actions.py#L265) (`VerifySoftwareToken`)
### Scenarios
Code examples that show you how to accomplish a specific task by calling multiple
functions within the same service.
-- [Sign up a user with a user pool that requires MFA](scenario_signup_user_with_mfa.py)
+- [Sign up a user with a user pool that requires MFA](cognito_idp_actions.py)
@@ -95,7 +95,7 @@ the scenario.
Start the example by running the following at a command prompt:
```
-python scenario_signup_user_with_mfa.py
+python cognito_idp_actions.py
```
diff --git a/python/example_code/medical-imaging/README.md b/python/example_code/medical-imaging/README.md
index 1639b2ae3d1..759320bb377 100644
--- a/python/example_code/medical-imaging/README.md
+++ b/python/example_code/medical-imaging/README.md
@@ -84,8 +84,8 @@ functions within the same service.
This example shows you how to tag a HealthImaging data store.
-
-
+
+
Start the example by running the following at a command prompt:
@@ -94,16 +94,16 @@ python tagging_data_stores.py
```
-
-
+
+
#### Tagging an image set
This example shows you how to tag a HealthImaging image set.
-
-
+
+
Start the example by running the following at a command prompt:
@@ -112,8 +112,8 @@ python tagging_image_sets.py
```
-
-
+
+
### Tests
diff --git a/ruby/example_code/glue/README.md b/ruby/example_code/glue/README.md
index e75309b18a1..8f747082721 100644
--- a/ruby/example_code/glue/README.md
+++ b/ruby/example_code/glue/README.md
@@ -33,20 +33,20 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `ruby`
Code excerpts that show you how to call individual service functions.
-- [Create a crawler](glue_wrapper.rb#L34) (`CreateCrawler`)
-- [Create a job definition](glue_wrapper.rb#L116) (`CreateJob`)
-- [Delete a crawler](glue_wrapper.rb#L75) (`DeleteCrawler`)
-- [Delete a database from the Data Catalog](glue_wrapper.rb#L228) (`DeleteDatabase`)
-- [Delete a job definition](glue_wrapper.rb#L203) (`DeleteJob`)
-- [Delete a table from a database](glue_wrapper.rb#L215) (`DeleteTable`)
-- [Get a crawler](glue_wrapper.rb#L18) (`GetCrawler`)
-- [Get a database from the Data Catalog](glue_wrapper.rb#L88) (`GetDatabase`)
-- [Get a job run](glue_wrapper.rb#L191) (`GetJobRun`)
-- [Get runs of a job](glue_wrapper.rb#L178) (`GetJobRuns`)
-- [Get tables from a database](glue_wrapper.rb#L102) (`GetTables`)
-- [List job definitions](glue_wrapper.rb#L166) (`ListJobs`)
-- [Start a crawler](glue_wrapper.rb#L62) (`StartCrawler`)
-- [Start a job run](glue_wrapper.rb#L142) (`StartJobRun`)
+- [Create a crawler](glue_wrapper.rb#L36) (`CreateCrawler`)
+- [Create a job definition](glue_wrapper.rb#L118) (`CreateJob`)
+- [Delete a crawler](glue_wrapper.rb#L77) (`DeleteCrawler`)
+- [Delete a database from the Data Catalog](glue_wrapper.rb#L230) (`DeleteDatabase`)
+- [Delete a job definition](glue_wrapper.rb#L205) (`DeleteJob`)
+- [Delete a table from a database](glue_wrapper.rb#L217) (`DeleteTable`)
+- [Get a crawler](glue_wrapper.rb#L20) (`GetCrawler`)
+- [Get a database from the Data Catalog](glue_wrapper.rb#L90) (`GetDatabase`)
+- [Get a job run](glue_wrapper.rb#L193) (`GetJobRun`)
+- [Get runs of a job](glue_wrapper.rb#L180) (`GetJobRuns`)
+- [Get tables from a database](glue_wrapper.rb#L104) (`GetTables`)
+- [List job definitions](glue_wrapper.rb#L168) (`ListJobs`)
+- [Start a crawler](glue_wrapper.rb#L64) (`StartCrawler`)
+- [Start a job run](glue_wrapper.rb#L144) (`StartJobRun`)
### Scenarios
diff --git a/rustv1/examples/batch/README.md b/rustv1/examples/batch/README.md
index f9301bf5ea9..a6c3de09ed1 100644
--- a/rustv1/examples/batch/README.md
+++ b/rustv1/examples/batch/README.md
@@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Describe compute environments](src/bin/batch-helloworld.rs#L24) (`DescribeComputeEnvironments`)
+- [Describe compute environments](src/bin/batch-helloworld.rs#L22) (`DescribeComputeEnvironments`)
diff --git a/rustv1/examples/cloudwatchlogs/Cargo.toml b/rustv1/examples/cloudwatchlogs/Cargo.toml
index 87f3686e5b8..b81c82de7ab 100644
--- a/rustv1/examples/cloudwatchlogs/Cargo.toml
+++ b/rustv1/examples/cloudwatchlogs/Cargo.toml
@@ -12,8 +12,18 @@ edition = "2021"
[dependencies]
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
-aws-sdk-cloudwatchlogs = { version = "1.3.0" }
+aws-sdk-cloudwatchlogs = { version = "1.3.0", features = ["test-util"]}
aws-types = { version = "1.0.1" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
+chrono = "0.4.32"
+tracing = "0.1.40"
+async-recursion = "1.0.5"
+
+sdk-examples-test-utils = { path = "../../test-utils" }
+futures = "0.3.30"
+
+[dev-dependencies]
+aws-smithy-mocks-experimental = "0.1.0"
+# aws-smithy-runtime = { version="1", features = ["test-util"] }
diff --git a/rustv1/examples/cloudwatchlogs/src/bin/large-query.rs b/rustv1/examples/cloudwatchlogs/src/bin/large-query.rs
new file mode 100644
index 00000000000..47b4e591be1
--- /dev/null
+++ b/rustv1/examples/cloudwatchlogs/src/bin/large-query.rs
@@ -0,0 +1,434 @@
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+#![allow(clippy::result_large_err)]
+
+use async_recursion::async_recursion;
+use futures::join;
+use std::{
+ collections::HashSet,
+ env,
+ fmt::Display,
+ time::{Duration, Instant},
+};
+use tracing::info;
+
+use aws_config::BehaviorVersion;
+use aws_sdk_cloudwatchlogs::{
+ error::ProvideErrorMetadata,
+ operation::get_query_results::GetQueryResultsOutput,
+ types::{QueryStatus, ResultField},
+ Client, Error,
+};
+use chrono::{DateTime, Utc};
+
+use sdk_examples_test_utils::wait_on;
+
+#[derive(Debug)]
+enum LargeQueryError {
+ DateOutOfBounds,
+ FromCloudwatchLogs(Error),
+ FromChronoParse(chrono::ParseError),
+}
+
+#[derive(Clone)]
+pub struct DateRange(DateTime, DateTime);
+impl DateRange {
+ pub fn split(&self) -> (DateRange, DateRange) {
+ let mid = (self.1 - self.0) / 2;
+ (
+ DateRange(self.0, self.0 + mid),
+ DateRange(self.0 + mid + Duration::from_millis(1), self.1),
+ )
+ }
+}
+
+impl Display for DateRange {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "from {} to {}", self.0.format("%+"), self.1.format("%+"))
+ }
+}
+
+struct CloudWatchLongQuery {
+ client: Client,
+ log_group_name: String,
+ date_range: DateRange,
+ limit: i32,
+ results: Vec>,
+ elapsed_time: Option,
+ status_done: HashSet,
+}
+
+impl CloudWatchLongQuery {
+ fn new(client: Client, log_group_name: String, date_range: DateRange) -> Self {
+ Self {
+ client,
+ log_group_name,
+ date_range,
+ limit: 10_000,
+ results: vec![],
+ elapsed_time: None,
+ status_done: HashSet::from([
+ QueryStatus::Complete,
+ QueryStatus::Failed,
+ QueryStatus::Cancelled,
+ QueryStatus::Timeout,
+ ]),
+ }
+ }
+
+ pub async fn run(&mut self) -> Result<(), LargeQueryError> {
+ self.elapsed_time = None;
+ self.results.clear();
+ let start = Instant::now();
+
+ let results = self.large_query(&self.date_range).await;
+ self.elapsed_time = Some(start.elapsed());
+
+ results.map(|e| {
+ self.results = e;
+ })
+ }
+
+ #[async_recursion]
+ async fn large_query(
+ &self,
+ date_range: &DateRange,
+ ) -> Result>, LargeQueryError> {
+ info!("Running query {date_range}");
+
+ let logs = self.query(date_range).await?;
+
+ info!(
+ "Query date range {date_range} found {} entries.",
+ logs.len()
+ );
+
+ if logs.len() < self.limit.try_into().unwrap() {
+ return Ok(logs);
+ }
+
+ let mut last_log_date: DateTime = get_last_log_date(&logs)?;
+ last_log_date += Duration::from_millis(1);
+ let (r1, r2) = DateRange(last_log_date, date_range.1).split();
+
+ let (a, b) = join!(self.large_query(&r1), self.large_query(&r2));
+
+ let logs = [logs, a?, b?].concat();
+
+ Ok(logs)
+ }
+
+ async fn get_query_results(
+ &self,
+ query_id: &str,
+ ) -> Result {
+ wait_on!(
+ self.client.get_query_results().query_id(query_id),
+ |get_query_results| {
+ eprintln!("{:?}", get_query_results.status);
+ self.status_done.contains(
+ get_query_results
+ .status()
+ .unwrap_or(&QueryStatus::UnknownValue),
+ )
+ }
+ )
+ .await
+ .map_err(|err| LargeQueryError::FromCloudwatchLogs(err.into()))
+ }
+
+ async fn query(
+ &self,
+ date_range: &DateRange,
+ ) -> Result>, LargeQueryError> {
+ let query_id = self.start_query(date_range).await?;
+ info!("Started query {date_range} as {query_id}");
+ let results = self.get_query_results(query_id.as_str()).await?;
+ info!("Finished query {query_id}");
+ Ok(results.results.unwrap_or_default())
+ }
+
+ async fn start_query(&self, date_range: &DateRange) -> Result {
+ let response = self
+ .client
+ .start_query()
+ .log_group_name(self.log_group_name.clone())
+ .query_string("fields @timestamp, @message | sort @timestamp asc")
+ .start_time(date_range.0.timestamp())
+ .end_time(date_range.1.timestamp())
+ .limit(self.limit)
+ .send()
+ .await;
+ match response {
+ Ok(start) => Ok(start.query_id.expect("start query query_id")),
+ Err(err) => {
+ if err
+ .message()
+ .unwrap_or_default()
+ .starts_with("Query's end date and time")
+ {
+ Err(LargeQueryError::DateOutOfBounds)
+ } else {
+ Err(LargeQueryError::FromCloudwatchLogs(err.into()))
+ }
+ }
+ }
+ }
+}
+
+fn get_last_log_date(results: &[Vec]) -> Result, LargeQueryError> {
+ let last = results
+ .last()
+ .expect("last query item")
+ .iter()
+ .find(|e| matches!(e.field(), Some("@timestamp")))
+ .expect("timestamp field")
+ .value()
+ .expect("timestamp field value");
+
+ DateTime::parse_from_rfc3339(format!("{last}Z").as_str())
+ .map(|e| e.to_utc())
+ .map_err(LargeQueryError::FromChronoParse)
+}
+
+#[tokio::main]
+async fn main() -> Result<(), LargeQueryError> {
+ tracing_subscriber::fmt::init();
+
+ let group = env::var("QUERY_GROUP").unwrap_or("/workflows/cloudwatch-logs/large-query".into());
+ let start_date = DateTime::from_timestamp_millis(
+ env::var("QUERY_START_DATE")
+ .expect("lookup QUERY_START_DATE")
+ .parse()
+ .unwrap(),
+ )
+ .expect("parse start date")
+ .with_timezone(&Utc);
+ let end_date = DateTime::from_timestamp_millis(
+ env::var("QUERY_END_DATE")
+ .expect("lookup QUERY_END_DATE")
+ .parse()
+ .unwrap(),
+ )
+ .expect("parse end date")
+ .with_timezone(&Utc);
+
+ println!("{group}");
+ println!("{start_date}");
+ println!("{end_date}");
+
+ let shared_config = aws_config::from_env()
+ .behavior_version(BehaviorVersion::latest())
+ .load()
+ .await;
+ let client = Client::new(&shared_config);
+
+ let mut query = CloudWatchLongQuery::new(client, group, DateRange(start_date, end_date));
+
+ query.run().await.expect("run query to completion");
+
+ eprintln!("Total results: {}", query.results.len());
+
+ Ok(())
+}
+
+#[cfg(test)]
+mod test {
+ use super::*;
+ use aws_config::Region;
+ use aws_sdk_cloudwatchlogs::{operation::start_query::StartQueryOutput, Config};
+ use aws_smithy_mocks_experimental::{mock, MockResponseInterceptor, Rule};
+ use chrono::{TimeZone, Utc};
+
+ fn client_from_rules(rules: &[&Rule], enforce_order: bool) -> Client {
+ let mut mock_response_interceptor = MockResponseInterceptor::new();
+ for rule in rules {
+ mock_response_interceptor = mock_response_interceptor.with_rule(rule)
+ }
+ if enforce_order {
+ mock_response_interceptor = mock_response_interceptor.enforce_order();
+ }
+ Client::from_conf(
+ Config::builder()
+ .with_test_defaults()
+ .region(Region::from_static("us-east-1"))
+ .interceptor(mock_response_interceptor)
+ .build(),
+ )
+ }
+
+ // Test the behavior of the DateRange::split function.
+ #[tokio::test]
+ async fn test_date_range_split() {
+ let start_date = DateTime::parse_from_rfc3339("2024-02-01 12:00:00Z")
+ .unwrap()
+ .with_timezone(&Utc);
+ let end_date = DateTime::parse_from_rfc3339("2024-02-10 12:00:00Z")
+ .unwrap()
+ .with_timezone(&Utc);
+ let date_range = DateRange(start_date, end_date);
+
+ // Act: Call the split method on this DateRange instance.
+ let (first_half, second_half) = date_range.split();
+
+ // Assert: Verify that the resulting DateRanges cover the entire span of the original DateRange without overlap or gaps.
+ assert_eq!(
+ first_half.0, start_date,
+ "First half should start at start date"
+ );
+ assert_eq!(
+ second_half.1, end_date,
+ "Second half should end at end date"
+ );
+
+ assert_eq!(
+ first_half.1,
+ second_half.0 - Duration::from_millis(1),
+ "No separation from start and end dates"
+ );
+ }
+
+ // Test the large_query method for a range with less than the limit of log entries.
+ #[tokio::test]
+ async fn test_large_query_with_small_range() {
+ let start_date = DateTime::parse_from_rfc3339("2024-02-01 12:00:00Z")
+ .unwrap()
+ .with_timezone(&Utc);
+ let end_date = DateTime::parse_from_rfc3339("2024-02-10 12:00:00Z")
+ .unwrap()
+ .with_timezone(&Utc);
+ let date_range = DateRange(start_date, end_date);
+
+ // Arrange: Set up a scenario where the query returns fewer logs than the limit.
+ let start_query = mock!(Client::start_query)
+ .then_output(|| StartQueryOutput::builder().query_id("1").build());
+ let small_result = mock!(Client::get_query_results)
+ .match_requests(|req| matches!(req.query_id(), Some("1")))
+ .then_output(|| {
+ GetQueryResultsOutput::builder()
+ .status(QueryStatus::Complete)
+ .set_results(Some(vec![
+ vec![
+ ResultField::builder()
+ .field("@message")
+ .value("test 1")
+ .build(),
+ ResultField::builder()
+ .field("@timestamp")
+ .value("2024-02-02 12:00:00")
+ .build(),
+ ],
+ vec![
+ ResultField::builder()
+ .field("@message")
+ .value("test 2")
+ .build(),
+ ResultField::builder()
+ .field("@timestamp")
+ .value("2024-02-03 12:00:00")
+ .build(),
+ ],
+ ]))
+ .build()
+ });
+
+ let client = client_from_rules(&[&start_query, &small_result], false);
+
+ let query = CloudWatchLongQuery::new(client, "testing".into(), date_range.clone());
+ // Act: Invoke the large_query method with this range.
+ let response = query.large_query(&date_range).await.unwrap();
+
+ // Assert: Ensure that the method returns the correct logs without further splitting the range.
+ assert_eq!(start_query.num_calls(), 1);
+ assert_eq!(response.len(), 2);
+ }
+
+ // Test the get_query_results method's handling of different query statuses.
+ #[tokio::test]
+ async fn test_get_query_results_statuses_for_waiter() {
+ let start_date = DateTime::parse_from_rfc3339("2024-02-01 12:00:00Z")
+ .unwrap()
+ .with_timezone(&Utc);
+ let end_date = DateTime::parse_from_rfc3339("2024-02-10 12:00:00Z")
+ .unwrap()
+ .with_timezone(&Utc);
+ let date_range = DateRange(start_date, end_date);
+
+ let get_query_results_0 = mock!(Client::get_query_results).then_output(|| {
+ GetQueryResultsOutput::builder()
+ .status(QueryStatus::Running)
+ .build()
+ });
+ let get_query_results_1 = mock!(Client::get_query_results).then_output(|| {
+ GetQueryResultsOutput::builder()
+ .status(QueryStatus::Complete)
+ .set_results(Some(vec![
+ vec![
+ ResultField::builder()
+ .field("@message")
+ .value("test 1")
+ .build(),
+ ResultField::builder()
+ .field("@timestamp")
+ .value("2024-02-02 12:00:00")
+ .build(),
+ ],
+ vec![
+ ResultField::builder()
+ .field("@message")
+ .value("test 2")
+ .build(),
+ ResultField::builder()
+ .field("@timestamp")
+ .value("2024-02-03 12:00:00")
+ .build(),
+ ],
+ ]))
+ .build()
+ });
+
+ let client = client_from_rules(&[&get_query_results_0, &get_query_results_1], true);
+
+ // Arrange: Mock different responses from CloudWatch Logs with varying statuses.
+ let query = CloudWatchLongQuery::new(client, "testing".into(), date_range.clone());
+ let query_id = "1";
+
+ // Act: Call the get_query_results method with these mocked responses.
+ let response = query.get_query_results(query_id).await.unwrap();
+
+ // Assert: Verify that the method handles different statuses correctly, particularly error statuses.
+ assert_eq!(get_query_results_0.num_calls(), 1);
+ assert_eq!(get_query_results_1.num_calls(), 1);
+ assert_eq!(response.results.unwrap().len(), 2);
+ }
+
+ // Test for correct parsing of timestamps in get_last_log_date.
+ #[tokio::test]
+ async fn test_get_last_log_date_parsing() {
+ // Arrange: Provide a set of log entries with known timestamps.
+ let results = vec![
+ vec![ResultField::builder()
+ .field("@timestamp")
+ .value("2022-01-01T12:00:00")
+ .build()],
+ vec![ResultField::builder()
+ .field("@timestamp")
+ .value("2022-01-02T12:00:00")
+ .build()],
+ vec![ResultField::builder()
+ .field("@timestamp")
+ .value("2022-01-03T12:00:00")
+ .build()],
+ ];
+
+ // Act: Call the get_last_log_date function with these log entries.
+ let last_log_date = get_last_log_date(&results).unwrap();
+
+ // Assert: Verify that the function returns the correct last timestamp.
+ assert_eq!(
+ Some(last_log_date),
+ Utc.with_ymd_and_hms(2022, 1, 3, 12, 0, 0).single()
+ );
+ }
+}
diff --git a/rustv1/examples/dynamodb/README.md b/rustv1/examples/dynamodb/README.md
index eae520f8b09..5b44eed7704 100644
--- a/rustv1/examples/dynamodb/README.md
+++ b/rustv1/examples/dynamodb/README.md
@@ -33,13 +33,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Create a table](src/scenario/create.rs#L14) (`CreateTable`)
-- [Delete a table](src/scenario/delete.rs#L38) (`DeleteTable`)
-- [Delete an item from a table](src/scenario/delete.rs#L14) (`DeleteItem`)
-- [List tables](src/scenario/list.rs#L9) (`ListTables`)
-- [Put an item in a table](src/scenario/add.rs#L27) (`PutItem`)
-- [Query a table](src/scenario/movies/server.rs#L28) (`Query`)
-- [Scan a table](src/scenario/list.rs#L180) (`Scan`)
+- [Create a table](src/scenario/create.rs#L12) (`CreateTable`)
+- [Delete a table](src/scenario/delete.rs#L36) (`DeleteTable`)
+- [Delete an item from a table](src/scenario/delete.rs#L12) (`DeleteItem`)
+- [List tables](src/scenario/list.rs#L7) (`ListTables`)
+- [Put an item in a table](src/scenario/add.rs#L25) (`PutItem`)
+- [Query a table](src/scenario/movies/server.rs#L30) (`Query`)
+- [Scan a table](src/scenario/list.rs#L178) (`Scan`)
### Scenarios
diff --git a/rustv1/examples/ebs/README.md b/rustv1/examples/ebs/README.md
index fa08182a8bc..c7eb79fc490 100644
--- a/rustv1/examples/ebs/README.md
+++ b/rustv1/examples/ebs/README.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Create a snapshot](src/bin/create-snapshot.rs#L34) (`StartSnapshot`)
-- [Seal and complete a snapshot](src/bin/create-snapshot.rs#L73) (`CompleteSnapshot`)
-- [Write a block of data to a snapshot](src/bin/create-snapshot.rs#L49) (`PutSnapshotBlock`)
+- [Create a snapshot](src/bin/create-snapshot.rs#L32) (`StartSnapshot`)
+- [Seal and complete a snapshot](src/bin/create-snapshot.rs#L71) (`CompleteSnapshot`)
+- [Write a block of data to a snapshot](src/bin/create-snapshot.rs#L47) (`PutSnapshotBlock`)
diff --git a/rustv1/examples/ec2/README.md b/rustv1/examples/ec2/README.md
index f50399f0892..2aa63faf7ff 100644
--- a/rustv1/examples/ec2/README.md
+++ b/rustv1/examples/ec2/README.md
@@ -33,15 +33,15 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Delete a snapshot](../ebs/src/bin/delete-snapshot.rs#L28) (`DeleteSnapshot`)
-- [Describe Regions](src/bin/ec2-helloworld.rs#L24) (`DescribeRegions`)
-- [Describe instance status](src/bin/list-all-instance-events.rs#L24) (`DescribeInstanceStatus`)
-- [Describe instances](src/bin/describe-instances.rs#L28) (`DescribeInstances`)
-- [Describe snapshots](../ebs/src/bin/get-snapshot-state.rs#L29) (`DescribeSnapshots`)
-- [Enable monitoring](src/bin/monitor-instance.rs#L28) (`MonitorInstances`)
-- [Reboot an instance](src/bin/reboot-instance.rs#L28) (`RebootInstances`)
-- [Start an instance](src/bin/start-instance.rs#L28) (`StartInstances`)
-- [Stop an instance](src/bin/stop-instance.rs#L28) (`StopInstances`)
+- [Delete a snapshot](../ebs/src/bin/delete-snapshot.rs#L26) (`DeleteSnapshot`)
+- [Describe Regions](src/bin/ec2-helloworld.rs#L22) (`DescribeRegions`)
+- [Describe instance status](src/bin/list-all-instance-events.rs#L22) (`DescribeInstanceStatus`)
+- [Describe instances](src/bin/describe-instances.rs#L26) (`DescribeInstances`)
+- [Describe snapshots](../ebs/src/bin/get-snapshot-state.rs#L27) (`DescribeSnapshots`)
+- [Enable monitoring](src/bin/monitor-instance.rs#L26) (`MonitorInstances`)
+- [Reboot an instance](src/bin/reboot-instance.rs#L26) (`RebootInstances`)
+- [Start an instance](src/bin/start-instance.rs#L26) (`StartInstances`)
+- [Stop an instance](src/bin/stop-instance.rs#L26) (`StopInstances`)
diff --git a/rustv1/examples/ecr/README.md b/rustv1/examples/ecr/README.md
index 4e4c6d70885..df619b77263 100644
--- a/rustv1/examples/ecr/README.md
+++ b/rustv1/examples/ecr/README.md
@@ -33,8 +33,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [List the image IDs](src/bin/list-images.rs#L28) (`ListImages`)
-- [List your repositories](src/bin/describe-repos.rs#L24) (`DescribeRepositories`)
+- [List the image IDs](src/bin/list-images.rs#L26) (`ListImages`)
+- [List your repositories](src/bin/describe-repos.rs#L22) (`DescribeRepositories`)
diff --git a/rustv1/examples/ecs/README.md b/rustv1/examples/ecs/README.md
index 92449286d1e..4616eb460f9 100644
--- a/rustv1/examples/ecs/README.md
+++ b/rustv1/examples/ecs/README.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Create a cluster](src/bin/cluster.rs#L28) (`CreateCluster`)
-- [Delete a cluster](src/bin/cluster.rs#L38) (`DeleteCluster`)
-- [Describe clusters](src/bin/describe-clusters.rs#L24) (`DescribeClusters`)
+- [Create a cluster](src/bin/cluster.rs#L26) (`CreateCluster`)
+- [Delete a cluster](src/bin/cluster.rs#L36) (`DeleteCluster`)
+- [Describe clusters](src/bin/describe-clusters.rs#L22) (`DescribeClusters`)
diff --git a/rustv1/examples/eks/README.md b/rustv1/examples/eks/README.md
index 739d771f33a..50216693801 100644
--- a/rustv1/examples/eks/README.md
+++ b/rustv1/examples/eks/README.md
@@ -33,8 +33,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Create a cluster control plane](src/bin/create-delete-cluster.rs#L38) (`CreateCluster`)
-- [Delete a cluster control plane](src/bin/create-delete-cluster.rs#L63) (`DeleteCluster`)
+- [Create a cluster control plane](src/bin/create-delete-cluster.rs#L36) (`CreateCluster`)
+- [Delete a cluster control plane](src/bin/create-delete-cluster.rs#L61) (`DeleteCluster`)
diff --git a/rustv1/examples/firehose/README.md b/rustv1/examples/firehose/README.md
index 6e2d8cd8733..ae59f230c9b 100644
--- a/rustv1/examples/firehose/README.md
+++ b/rustv1/examples/firehose/README.md
@@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Write multiple data records](src/bin/put-records-batch.rs#L32) (`PutRecordBatch`)
+- [Write multiple data records](src/bin/put-records-batch.rs#L30) (`PutRecordBatch`)
diff --git a/rustv1/examples/iam/README.md b/rustv1/examples/iam/README.md
index 80e34a3d722..0754299bc60 100644
--- a/rustv1/examples/iam/README.md
+++ b/rustv1/examples/iam/README.md
@@ -31,37 +31,37 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
### Get started
-- [Hello IAM](src/bin/hello.rs#L1) (`ListPolicies`)
+- [Hello IAM](src/bin/hello.rs#L3) (`ListPolicies`)
### Single actions
Code excerpts that show you how to call individual service functions.
-- [Attach a policy to a role](src/iam-service-lib.rs#L223) (`AttachRolePolicy`)
-- [Attach a policy to a user](src/iam-service-lib.rs#L238) (`AttachUserPolicy`)
-- [Create a policy](src/iam-service-lib.rs#L20) (`CreatePolicy`)
-- [Create a role](src/iam-service-lib.rs#L67) (`CreateRole`)
-- [Create a service-linked role](src/iam-service-lib.rs#L419) (`CreateServiceLinkedRole`)
-- [Create a user](src/iam-service-lib.rs#L89) (`CreateUser`)
-- [Create an access key](src/iam-service-lib.rs#L272) (`CreateAccessKey`)
-- [Delete a policy](src/iam-service-lib.rs#L340) (`DeletePolicy`)
-- [Delete a role](src/iam-service-lib.rs#L162) (`DeleteRole`)
-- [Delete a service-linked role](src/iam-service-lib.rs#L178) (`DeleteServiceLinkedRole`)
-- [Delete a user](src/iam-service-lib.rs#L193) (`DeleteUser`)
-- [Delete an access key](src/iam-service-lib.rs#L296) (`DeleteAccessKey`)
-- [Delete an inline policy from a user](src/iam-service-lib.rs#L351) (`DeleteUserPolicy`)
-- [Detach a policy from a role](src/iam-service-lib.rs#L323) (`DetachRolePolicy`)
-- [Detach a policy from a user](src/iam-service-lib.rs#L255) (`DetachUserPolicy`)
-- [Get a role](src/iam-service-lib.rs#L115) (`GetRole`)
-- [Get the account password policy](src/iam-service-lib.rs#L438) (`GetAccountPasswordPolicy`)
-- [List SAML providers](src/iam-service-lib.rs#L488) (`ListSAMLProviders`)
-- [List groups](src/iam-service-lib.rs#L400) (`ListGroups`)
-- [List inline policies for a role](src/iam-service-lib.rs#L469) (`ListRolePolicies`)
-- [List policies](src/iam-service-lib.rs#L368) (`ListPolicies`)
-- [List policies attached to a role](src/iam-service-lib.rs#L448) (`ListAttachedRolePolicies`)
-- [List roles](src/iam-service-lib.rs#L97) (`ListRoles`)
-- [List users](src/iam-service-lib.rs#L125) (`ListUsers`)
+- [Attach a policy to a role](src/iam-service-lib.rs#L221) (`AttachRolePolicy`)
+- [Attach a policy to a user](src/iam-service-lib.rs#L236) (`AttachUserPolicy`)
+- [Create a policy](src/iam-service-lib.rs#L18) (`CreatePolicy`)
+- [Create a role](src/iam-service-lib.rs#L65) (`CreateRole`)
+- [Create a service-linked role](src/iam-service-lib.rs#L417) (`CreateServiceLinkedRole`)
+- [Create a user](src/iam-service-lib.rs#L87) (`CreateUser`)
+- [Create an access key](src/iam-service-lib.rs#L270) (`CreateAccessKey`)
+- [Delete a policy](src/iam-service-lib.rs#L338) (`DeletePolicy`)
+- [Delete a role](src/iam-service-lib.rs#L160) (`DeleteRole`)
+- [Delete a service-linked role](src/iam-service-lib.rs#L176) (`DeleteServiceLinkedRole`)
+- [Delete a user](src/iam-service-lib.rs#L191) (`DeleteUser`)
+- [Delete an access key](src/iam-service-lib.rs#L294) (`DeleteAccessKey`)
+- [Delete an inline policy from a user](src/iam-service-lib.rs#L349) (`DeleteUserPolicy`)
+- [Detach a policy from a role](src/iam-service-lib.rs#L321) (`DetachRolePolicy`)
+- [Detach a policy from a user](src/iam-service-lib.rs#L253) (`DetachUserPolicy`)
+- [Get a role](src/iam-service-lib.rs#L113) (`GetRole`)
+- [Get the account password policy](src/iam-service-lib.rs#L436) (`GetAccountPasswordPolicy`)
+- [List SAML providers](src/iam-service-lib.rs#L486) (`ListSAMLProviders`)
+- [List groups](src/iam-service-lib.rs#L398) (`ListGroups`)
+- [List inline policies for a role](src/iam-service-lib.rs#L467) (`ListRolePolicies`)
+- [List policies](src/iam-service-lib.rs#L366) (`ListPolicies`)
+- [List policies attached to a role](src/iam-service-lib.rs#L446) (`ListAttachedRolePolicies`)
+- [List roles](src/iam-service-lib.rs#L95) (`ListRoles`)
+- [List users](src/iam-service-lib.rs#L123) (`ListUsers`)
### Scenarios
diff --git a/rustv1/examples/iot/README.md b/rustv1/examples/iot/README.md
index 4a684f988f0..88c870540a6 100644
--- a/rustv1/examples/iot/README.md
+++ b/rustv1/examples/iot/README.md
@@ -33,8 +33,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Get endpoint information](src/bin/describe-endpoint.rs#L28) (`DescribeEndpoint`)
-- [List your things](src/bin/list-things.rs#L24) (`ListThings`)
+- [Get endpoint information](src/bin/describe-endpoint.rs#L26) (`DescribeEndpoint`)
+- [List your things](src/bin/list-things.rs#L22) (`ListThings`)
diff --git a/rustv1/examples/kinesis/README.md b/rustv1/examples/kinesis/README.md
index b0fbe3a3a40..2ce2a7de4bf 100644
--- a/rustv1/examples/kinesis/README.md
+++ b/rustv1/examples/kinesis/README.md
@@ -33,11 +33,11 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Create a stream](src/bin/create-stream.rs#L28) (`CreateStream`)
-- [Delete a stream](src/bin/delete-stream.rs#L28) (`DeleteStream`)
-- [Describe a stream](src/bin/describe-stream.rs#L28) (`DescribeStream`)
-- [List streams](src/bin/list-streams.rs#L24) (`ListStreams`)
-- [Put data into a stream](src/bin/put-record.rs#L37) (`PutRecord`)
+- [Create a stream](src/bin/create-stream.rs#L26) (`CreateStream`)
+- [Delete a stream](src/bin/delete-stream.rs#L26) (`DeleteStream`)
+- [Describe a stream](src/bin/describe-stream.rs#L26) (`DescribeStream`)
+- [List streams](src/bin/list-streams.rs#L22) (`ListStreams`)
+- [Put data into a stream](src/bin/put-record.rs#L35) (`PutRecord`)
diff --git a/rustv1/examples/kms/README.md b/rustv1/examples/kms/README.md
index 1e565c78366..4af5623c9d8 100644
--- a/rustv1/examples/kms/README.md
+++ b/rustv1/examples/kms/README.md
@@ -33,14 +33,14 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Create a key](src/bin/create-key.rs#L24) (`CreateKey`)
-- [Create a random byte string](src/bin/generate-random.rs#L29) (`GenerateRandom`)
-- [Decrypt ciphertext](src/bin/decrypt.rs#L34) (`Decrypt`)
-- [Encrypt text using a key](src/bin/encrypt.rs#L39) (`Encrypt`)
-- [Generate a plaintext data key for client-side encryption](src/bin/generate-data-key.rs#L29) (`GenerateDataKey`)
-- [Generate an encrypted data key](src/bin/generate-data-key-without-plaintext.rs#L29) (`GenerateDataKeyWithoutPlaintext`)
-- [List keys](src/bin/list-keys.rs#L24) (`ListKeys`)
-- [Recencrypt ciphertext from one key to another](src/bin/reencrypt-data.rs#L44) (`ReEncrypt`)
+- [Create a key](src/bin/create-key.rs#L22) (`CreateKey`)
+- [Create a random byte string](src/bin/generate-random.rs#L27) (`GenerateRandom`)
+- [Decrypt ciphertext](src/bin/decrypt.rs#L32) (`Decrypt`)
+- [Encrypt text using a key](src/bin/encrypt.rs#L37) (`Encrypt`)
+- [Generate a plaintext data key for client-side encryption](src/bin/generate-data-key.rs#L27) (`GenerateDataKey`)
+- [Generate an encrypted data key](src/bin/generate-data-key-without-plaintext.rs#L27) (`GenerateDataKeyWithoutPlaintext`)
+- [List keys](src/bin/list-keys.rs#L22) (`ListKeys`)
+- [Recencrypt ciphertext from one key to another](src/bin/reencrypt-data.rs#L42) (`ReEncrypt`)
diff --git a/rustv1/examples/medialive/README.md b/rustv1/examples/medialive/README.md
index e5933269626..5f07649a016 100644
--- a/rustv1/examples/medialive/README.md
+++ b/rustv1/examples/medialive/README.md
@@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [List inputs](src/bin/medialive-helloworld.rs#L24) (`ListInputs`)
+- [List inputs](src/bin/medialive-helloworld.rs#L22) (`ListInputs`)
diff --git a/rustv1/examples/mediapackage/README.md b/rustv1/examples/mediapackage/README.md
index 28de1dc1066..4b027c18052 100644
--- a/rustv1/examples/mediapackage/README.md
+++ b/rustv1/examples/mediapackage/README.md
@@ -33,8 +33,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [List channels](src/bin/mediapackage-helloworld.rs#L24) (`ListChannels`)
-- [List your origin endpoints](src/bin/list-endpoints.rs#L24) (`ListOriginEndpoints`)
+- [List channels](src/bin/mediapackage-helloworld.rs#L22) (`ListChannels`)
+- [List your origin endpoints](src/bin/list-endpoints.rs#L22) (`ListOriginEndpoints`)
diff --git a/rustv1/examples/polly/README.md b/rustv1/examples/polly/README.md
index 7017a3b8584..7f9542c7f5c 100644
--- a/rustv1/examples/polly/README.md
+++ b/rustv1/examples/polly/README.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Get voices available for synthesis](src/bin/describe-voices.rs#L24) (`DescribeVoices`)
-- [List pronunciation lexicons](src/bin/list-lexicons.rs#L24) (`ListLexicons`)
-- [Store a pronunciation lexicon](src/bin/put-lexicon.rs#L36) (`PutLexicon`)
-- [Synthesize speech from text](src/bin/synthesize-speech.rs#L31) (`SynthesizeSpeech`)
+- [Get voices available for synthesis](src/bin/describe-voices.rs#L22) (`DescribeVoices`)
+- [List pronunciation lexicons](src/bin/list-lexicons.rs#L22) (`ListLexicons`)
+- [Store a pronunciation lexicon](src/bin/put-lexicon.rs#L34) (`PutLexicon`)
+- [Synthesize speech from text](src/bin/synthesize-speech.rs#L29) (`SynthesizeSpeech`)
diff --git a/rustv1/examples/qldb/README.md b/rustv1/examples/qldb/README.md
index 5f2a32ced21..e5fa15834d9 100644
--- a/rustv1/examples/qldb/README.md
+++ b/rustv1/examples/qldb/README.md
@@ -33,8 +33,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Create a ledger](src/bin/create-ledger.rs#L29) (`CreateLedger`)
-- [List your ledgers](src/bin/list-ledgers.rs#L24) (`ListLedgers`)
+- [Create a ledger](src/bin/create-ledger.rs#L27) (`CreateLedger`)
+- [List your ledgers](src/bin/list-ledgers.rs#L22) (`ListLedgers`)
diff --git a/rustv1/examples/s3/README.md b/rustv1/examples/s3/README.md
index 7678c00093e..0ade0dfa383 100644
--- a/rustv1/examples/s3/README.md
+++ b/rustv1/examples/s3/README.md
@@ -33,20 +33,20 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Complete a multipart upload](src/bin/s3-multipart-upload.rs#L138) (`CompleteMultipartUpload`)
+- [Complete a multipart upload](src/bin/s3-multipart-upload.rs#L136) (`CompleteMultipartUpload`)
- [Copy an object from one bucket to another](src/s3-service-lib.rs#L99) (`CopyObject`)
- [Create a bucket](src/s3-service-lib.rs#L156) (`CreateBucket`)
-- [Create a multipart upload](src/bin/s3-multipart-upload.rs#L50) (`CreateMultipartUpload`)
-- [Delete an empty bucket](src/s3-service-lib.rs#L25) (`DeleteBucket`)
-- [Delete an object](src/bin/delete-object.rs#L32) (`DeleteObject`)
-- [Delete multiple objects](src/s3-service-lib.rs#L33) (`DeleteObjects`)
-- [Get an object from a bucket](src/bin/get-object.rs#L18) (`GetObject`)
+- [Create a multipart upload](src/bin/s3-multipart-upload.rs#L48) (`CreateMultipartUpload`)
+- [Delete an empty bucket](src/s3-service-lib.rs#L23) (`DeleteBucket`)
+- [Delete an object](src/bin/delete-object.rs#L30) (`DeleteObject`)
+- [Delete multiple objects](src/s3-service-lib.rs#L31) (`DeleteObjects`)
+- [Get an object from a bucket](src/bin/get-object.rs#L20) (`GetObject`)
- [Get an object from a bucket if it has been modified](src/bin/if-modified-since.rs#L6) (`GetObject`)
-- [Get the Region location for a bucket](src/bin/list-buckets.rs#L28) (`GetBucketLocation`)
-- [List buckets](src/bin/list-buckets.rs#L28) (`ListBuckets`)
-- [List object versions in a bucket](src/bin/list-object-versions.rs#L28) (`ListObjectVersions`)
+- [Get the Region location for a bucket](src/bin/list-buckets.rs#L26) (`GetBucketLocation`)
+- [List buckets](src/bin/list-buckets.rs#L26) (`ListBuckets`)
+- [List object versions in a bucket](src/bin/list-object-versions.rs#L26) (`ListObjectVersions`)
- [List objects in a bucket](src/s3-service-lib.rs#L73) (`ListObjectsV2`)
-- [Upload a single part of a multipart upload](src/bin/s3-multipart-upload.rs#L114) (`UploadPart`)
+- [Upload a single part of a multipart upload](src/bin/s3-multipart-upload.rs#L112) (`UploadPart`)
- [Upload an object to a bucket](src/s3-service-lib.rs#L137) (`PutObject`)
### Scenarios
diff --git a/rustv1/examples/sagemaker/README.md b/rustv1/examples/sagemaker/README.md
index 44689634d5d..62e6ad6464b 100644
--- a/rustv1/examples/sagemaker/README.md
+++ b/rustv1/examples/sagemaker/README.md
@@ -33,8 +33,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [List notebook instances](src/bin/sagemaker-helloworld.rs#L24) (`ListNotebookInstances`)
-- [List training jobs](src/bin/list-training-jobs.rs#L26) (`ListTrainingJobs`)
+- [List notebook instances](src/bin/sagemaker-helloworld.rs#L22) (`ListNotebookInstances`)
+- [List training jobs](src/bin/list-training-jobs.rs#L24) (`ListTrainingJobs`)
diff --git a/rustv1/examples/sns/README.md b/rustv1/examples/sns/README.md
index 7b49832476a..e20abec3ab7 100644
--- a/rustv1/examples/sns/README.md
+++ b/rustv1/examples/sns/README.md
@@ -33,10 +33,10 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Create a topic](src/bin/create-topic.rs#L28) (`CreateTopic`)
-- [List topics](src/bin/list-topics.rs#L24) (`ListTopics`)
-- [Publish to a topic](src/bin/sns-hello-world.rs#L32) (`Publish`)
-- [Subscribe an email address to a topic](src/bin/sns-hello-world.rs#L32) (`Subscribe`)
+- [Create a topic](src/bin/create-topic.rs#L26) (`CreateTopic`)
+- [List topics](src/bin/list-topics.rs#L22) (`ListTopics`)
+- [Publish to a topic](src/bin/sns-hello-world.rs#L30) (`Publish`)
+- [Subscribe an email address to a topic](src/bin/sns-hello-world.rs#L30) (`Subscribe`)
diff --git a/rustv1/examples/sqs/README.md b/rustv1/examples/sqs/README.md
index ccb6e7c553f..ae9eed7d440 100644
--- a/rustv1/examples/sqs/README.md
+++ b/rustv1/examples/sqs/README.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [List queues](src/bin/sqs-hello-world.rs#L33) (`ListQueues`)
-- [Receive messages from a queue](src/bin/sqs-hello-world.rs#L66) (`ReceiveMessage`)
-- [Send a message to a queue](src/bin/sqs-hello-world.rs#L45) (`SendMessage`)
+- [List queues](src/bin/sqs-hello-world.rs#L30) (`ListQueues`)
+- [Receive messages from a queue](src/bin/sqs-hello-world.rs#L62) (`ReceiveMessage`)
+- [Send a message to a queue](src/bin/sqs-hello-world.rs#L42) (`SendMessage`)
diff --git a/rustv1/examples/ssm/README.md b/rustv1/examples/ssm/README.md
index 6e482abbd4a..88c57251f97 100644
--- a/rustv1/examples/ssm/README.md
+++ b/rustv1/examples/ssm/README.md
@@ -33,8 +33,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Add a parameter](src/bin/create-parameter.rs#L37) (`PutParameter`)
-- [Get parameters information](src/bin/describe-parameters.rs#L24) (`DescribeParameters`)
+- [Add a parameter](src/bin/create-parameter.rs#L35) (`PutParameter`)
+- [Get parameters information](src/bin/describe-parameters.rs#L22) (`DescribeParameters`)
diff --git a/rustv1/examples/sts/README.md b/rustv1/examples/sts/README.md
index 1b42f356c3f..42a89777b5c 100644
--- a/rustv1/examples/sts/README.md
+++ b/rustv1/examples/sts/README.md
@@ -33,7 +33,7 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `rustv
Code excerpts that show you how to call individual service functions.
-- [Assume a role](src/bin/assume-role.rs#L34) (`AssumeRole`)
+- [Assume a role](src/bin/assume-role.rs#L32) (`AssumeRole`)
diff --git a/rustv1/test-utils/src/waiter.rs b/rustv1/test-utils/src/waiter.rs
index ce6e59ffda0..8247025ea4a 100644
--- a/rustv1/test-utils/src/waiter.rs
+++ b/rustv1/test-utils/src/waiter.rs
@@ -11,7 +11,7 @@ use tokio;
// Wait at most 25 seconds.
const MAX_WAIT: Duration = Duration::from_secs(5 * 60);
// Wait half a second at a time.
-const POLL_TIME: Duration = Duration::from_millis(500);
+const DEFAULT_INTERVAL: Duration = Duration::from_millis(500);
#[derive(Debug)]
pub struct WaitError(Duration);
@@ -29,7 +29,7 @@ impl Display for WaitError {
pub struct Waiter {
start: SystemTime,
max: Duration,
- poll: Duration,
+ interval: Duration,
}
impl Waiter {
@@ -37,11 +37,14 @@ impl Waiter {
WaiterBuilder::default()
}
- fn new(max: Duration, poll: Duration) -> Self {
+ /**
+ * *
+ */
+ fn new(max: Duration, interval: Duration) -> Self {
Waiter {
start: SystemTime::now(),
max,
- poll,
+ interval,
}
}
@@ -53,7 +56,7 @@ impl Waiter {
{
Err(WaitError(self.max))
} else {
- tokio::time::sleep(self.poll).await;
+ tokio::time::sleep(self.interval).await;
Ok(())
}
}
@@ -61,7 +64,7 @@ impl Waiter {
impl Default for Waiter {
fn default() -> Self {
- Waiter::new(MAX_WAIT, POLL_TIME)
+ Waiter::new(MAX_WAIT, DEFAULT_INTERVAL)
}
}
@@ -83,6 +86,45 @@ impl WaiterBuilder {
}
pub fn build(self) -> Waiter {
- Waiter::new(self.max.unwrap_or(MAX_WAIT), self.poll.unwrap_or(POLL_TIME))
+ Waiter::new(
+ self.max.unwrap_or(MAX_WAIT),
+ self.poll.unwrap_or(DEFAULT_INTERVAL),
+ )
}
}
+
+/// Create an async block to repeat a request until the result of the test is true.
+/// The test will work on a completed request - that is, retries, errors, etc will happen before
+/// the test is called. The response is considered done and successful by the SDK.
+/// For example, this can be used to wait for a long-running operation to change to `status: Done|Cancelled`.
+///
+/// - $waiter is a Waiter used to sleep between attempts, with a maximum timeout.
+/// - $req is an expr that evaluates to an API call that can be `.clone().send().await`ed.
+/// - $test is an expr that should be an Fn which gets passed the successful response of the
+#[macro_export]
+macro_rules! wait_on {
+ (
+ $req: expr,
+ $test: expr
+ ) => {
+ wait_on!($crate::waiter::Waiter::default(), $req, $test)
+ };
+ (
+ $waiter: expr,
+ $req: expr,
+ $test: expr
+ ) => {
+ async {
+ let mut sleep = Ok(());
+ let mut response = $req.clone().send().await;
+ while sleep.is_ok() {
+ if response.as_ref().map($test).unwrap_or(false) {
+ break;
+ }
+ response = $req.clone().send().await;
+ sleep = $waiter.sleep().await;
+ }
+ response
+ }
+ };
+}
diff --git a/sap-abap/services/bdr/README.md b/sap-abap/services/bdr/README.md
index afa0bd1baab..aa7a31b33d8 100644
--- a/sap-abap/services/bdr/README.md
+++ b/sap-abap/services/bdr/README.md
@@ -33,8 +33,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `sap-a
Code excerpts that show you how to call individual service functions.
-- [Image generation with Stability.ai Stable Diffusion XL](zcl_aws1_bdr_actions.clas.abap#L115) (`InvokeModel`)
-- [Text generation with Anthropic Claude 2](zcl_aws1_bdr_actions.clas.abap#L44) (`InvokeModel`)
+- [Image generation with Stability.ai Stable Diffusion XL](zcl_aws1_bdr_actions.clas.abap#L177) (`InvokeModel`)
+- [Text generation with Anthropic Claude 2](zcl_aws1_bdr_actions.clas.abap#L107) (`InvokeModel`)
diff --git a/sap-abap/services/textract/README.md b/sap-abap/services/textract/README.md
index cd5ce36d26e..9b7ed70a153 100644
--- a/sap-abap/services/textract/README.md
+++ b/sap-abap/services/textract/README.md
@@ -33,11 +33,11 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `sap-a
Code excerpts that show you how to call individual service functions.
-- [Analyze a document](zcl_aws1_tex_actions.clas.abap#L59) (`AnalyzeDocument`)
-- [Detect text in a document](zcl_aws1_tex_actions.clas.abap#L130) (`DetectDocumentText`)
-- [Get data about a document analysis job](zcl_aws1_tex_actions.clas.abap#L182) (`GetDocumentAnalysis`)
-- [Start asynchronous analysis of a document](zcl_aws1_tex_actions.clas.abap#L218) (`StartDocumentAnalysis`)
-- [Start asynchronous text detection](zcl_aws1_tex_actions.clas.abap#L292) (`StartDocumentTextDetection`)
+- [Analyze a document](zcl_aws1_tex_actions.clas.abap#L64) (`AnalyzeDocument`)
+- [Detect text in a document](zcl_aws1_tex_actions.clas.abap#L139) (`DetectDocumentText`)
+- [Get data about a document analysis job](zcl_aws1_tex_actions.clas.abap#L200) (`GetDocumentAnalysis`)
+- [Start asynchronous analysis of a document](zcl_aws1_tex_actions.clas.abap#L258) (`StartDocumentAnalysis`)
+- [Start asynchronous text detection](zcl_aws1_tex_actions.clas.abap#L329) (`StartDocumentTextDetection`)
### Scenarios
diff --git a/swift/example_code/cognito-identity/README.md b/swift/example_code/cognito-identity/README.md
index 87620f53f93..2482ed432ce 100644
--- a/swift/example_code/cognito-identity/README.md
+++ b/swift/example_code/cognito-identity/README.md
@@ -33,9 +33,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `swift
Code excerpts that show you how to call individual service functions.
-- [Create an identity pool](FindOrCreateIdentityPool/Sources/CognitoIdentityHandler/CognitoIdentityHandler.swift#L94) (`CreateIdentityPool`)
-- [Delete an identity pool](FindOrCreateIdentityPool/Sources/CognitoIdentityHandler/CognitoIdentityHandler.swift#L116) (`DeleteIdentityPool`)
-- [List identity pools](FindOrCreateIdentityPool/Sources/CognitoIdentityHandler/CognitoIdentityHandler.swift#L27) (`CreateIdentityPool`)
+- [Create an identity pool](FindOrCreateIdentityPool/Sources/CognitoIdentityHandler/CognitoIdentityHandler.swift#L92) (`CreateIdentityPool`)
+- [Delete an identity pool](FindOrCreateIdentityPool/Sources/CognitoIdentityHandler/CognitoIdentityHandler.swift#L114) (`DeleteIdentityPool`)
+- [List identity pools](FindOrCreateIdentityPool/Sources/CognitoIdentityHandler/CognitoIdentityHandler.swift#L25) (`CreateIdentityPool`)
diff --git a/swift/example_code/s3/README.md b/swift/example_code/s3/README.md
index 99e2504139f..0fea10fcbde 100644
--- a/swift/example_code/s3/README.md
+++ b/swift/example_code/s3/README.md
@@ -39,7 +39,7 @@ Code excerpts that show you how to call individual service functions.
- [Delete an object](basics/Sources/ServiceHandler/ServiceHandler.swift#L183) (`DeleteObject`)
- [Delete multiple objects](DeleteObjects/Sources/ServiceHandler/ServiceHandler.swift#L54) (`DeleteObjects`)
- [Get an object from a bucket](basics/Sources/ServiceHandler/ServiceHandler.swift#L112) (`GetObject`)
-- [List buckets](ListBuckets/Sources/ListBuckets/S3Session.swift#L68) (`ListBuckets`)
+- [List buckets](ListBuckets/Sources/ListBuckets/S3Session.swift#L70) (`ListBuckets`)
- [List objects in a bucket](basics/Sources/ServiceHandler/ServiceHandler.swift#L204) (`ListObjectsV2`)
- [Upload an object to a bucket](basics/Sources/ServiceHandler/ServiceHandler.swift#L70) (`PutObject`)
diff --git a/workflows/cloudwatch_logs_large_query/SPECIFICATION.md b/workflows/cloudwatch_logs_large_query/SPECIFICATION.md
index aa4a18ad7fd..67f71bd1dc2 100644
--- a/workflows/cloudwatch_logs_large_query/SPECIFICATION.md
+++ b/workflows/cloudwatch_logs_large_query/SPECIFICATION.md
@@ -68,7 +68,7 @@ Start the query and wait for it to "finish". Store the `results`. If the count o
### Recursive queries
-If the result count from the previous step is 10000 (or the configured LIMIT), it is very likely that there are more results. The example should do a binary search of the remaining logs. To do this, get the date of the last log (earliest or latest, depending on sort order). Use that date as the start date of a new date range. The end date can remain the same.
+If the result count from the previous step is 10000 (or the configured LIMIT), it is very likely that there are more results. **The example must do a binary search of the remaining logs**. To do this, get the date of the last log (earliest or latest, depending on sort order). Use that date as the start date of a new date range. The end date can remain the same.
Split that date range in half, resulting in two new date ranges. Call your query function twice; once for each new date range.
diff --git a/workflows/cloudwatch_logs_large_query/resources/make-log-files.sh b/workflows/cloudwatch_logs_large_query/resources/make-log-files.sh
index e2ab2d2aa4d..fcd1863bbb4 100755
--- a/workflows/cloudwatch_logs_large_query/resources/make-log-files.sh
+++ b/workflows/cloudwatch_logs_large_query/resources/make-log-files.sh
@@ -27,12 +27,12 @@ for i in $(seq 1 "$NUM_FILES"); do
# Output the timestamp of the first entry in the first file.
if [ "$i" -eq 1 ] && [ "$j" -eq 1 ]; then
- echo "QUERY_START_DATE=$TIMESTAMP";
+ echo "export QUERY_START_DATE=$TIMESTAMP";
fi
# Output the timestamp of the last entry in the last file.
if [ "$i" -eq "$NUM_FILES" ] && [ "$j" -eq "$ENTRIES_PER_FILE" ]; then
- echo "QUERY_END_DATE=$TIMESTAMP";
+ echo "export QUERY_END_DATE=$TIMESTAMP";
fi