diff --git a/.doc_gen/readmes/config.py b/.doc_gen/readmes/config.py index 85fd5304dcf..a40bfe1de3f 100644 --- a/.doc_gen/readmes/config.py +++ b/.doc_gen/readmes/config.py @@ -67,6 +67,43 @@ 'base_folder': 'dotnetv3', 'service_folder': 'dotnetv3/{{service["name"] | capitalize}}', 'sdk_api_ref': 'https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/{{service["name"] | capitalize}}/N{{service["name"] | capitalize}}.html', + 'service_folder_overrides': { + 'acm': 'dotnetv3/ACM', + 'aurora': 'dotnetv3/Aurora', + 'auto-scaling': 'dotnetv3/AutoScaling', + 'cloudwatch': 'dotnetv3/CloudWatch', + 'cloudwatch-logs': 'dotnetv3/CloudWatchLogs', + 'cognito': 'dotnetv3/Cognito', + 'comprehend': 'dotnetv3/Comprehend', + 'dynamodb': 'dotnetv3/dynamodb', + 'ec2': 'dotnetv3/EC2', + 'ecs': 'dotnetv3/ECS', + 'eventbridge': 'dotnetv3/EventBridge', + 'glacier': 'dotnetv3/Glacier', + 'glue': 'dotnetv3/Glue', + 'iam': 'dotnetv3/IAM', + 'keyspaces': 'dotnetv3/Keyspaces', + 'kinesis': 'dotnetv3/Kinesis', + 'kms': 'dotnetv3/KMS', + 'lambda': 'dotnetv3/Lambda', + 'mediaconvert': 'dotnetv3/MediaConvert', + 'organizations': 'dotnetv3/Organizations', + 'polly': 'dotnetv3/Polly', + 'rds': 'dotnetv3/RDS', + 'rekognition': 'dotnetv3/Rekognition', + 'route-53': 'dotnetv3/Route53', + 's3': 'dotnetv3/S3', + 'sagemaker': 'dotnetv3/SageMaker', + 'secrets-manager': 'dotnetv3/SecretsManager', + 'ses': 'dotnetv3/SES', + 'sns': 'dotnetv3/SNS', + 'sqs': 'dotnetv3/SQS', + 'step-functions': 'dotnetv3/StepFunctions', + 'sts': 'dotnetv3/STS', + 'support': 'dotnetv3/Support', + 'transcribe': 'dotnetv3/Transcribe', + 'translate': 'dotnetv3/Translate', + } } }, 'PHP': { diff --git a/.doc_gen/readmes/includes/important.jinja2 b/.doc_gen/readmes/includes/important.jinja2 index 1702b7b57e5..a890a6bc44f 100644 --- a/.doc_gen/readmes/includes/important.jinja2 +++ b/.doc_gen/readmes/includes/important.jinja2 @@ -1,6 +1,6 @@ ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/.doc_gen/readmes/includes/macros.jinja2 b/.doc_gen/readmes/includes/macros.jinja2 index fb538eff5bb..11900b736c2 100644 --- a/.doc_gen/readmes/includes/macros.jinja2 +++ b/.doc_gen/readmes/includes/macros.jinja2 @@ -1,6 +1,6 @@ {% macro list_examples(examples) %} {% for ex in examples %} -* [{{ ex['title_abbrev']}}]({{ex['file']}}) {% if ex['api'] %}(`{{ex['api']}}`){% endif %} +* [{{ ex['title_abbrev']}}]({{ex['file']}}){% if ex['api'] %} (`{{ex['api']}}`){% endif %} {% endfor %} {% endmacro %} diff --git a/.doc_gen/readmes/multi.py b/.doc_gen/readmes/multi.py index c2276af7cd3..bf4c5c6318a 100644 --- a/.doc_gen/readmes/multi.py +++ b/.doc_gen/readmes/multi.py @@ -64,6 +64,8 @@ def main(): if args.dry_run: logging.info("Dry run, no changes will be made.") + skipped = [] + for language_and_version in args.languages: (language, version) = language_and_version.split(":") if int(version) not in sdks[language]["sdk"]: @@ -76,10 +78,14 @@ def main(): if not args.dry_run: Renderer(scanner, int(version), args.safe).render() except Exception as err: + skip = f"{language}:{version}:{service}" logging.error( - f"Exception rendering {language}:{version}:{service} - {err}", + f"Exception rendering {skip} - {err}", ) - raise err + skipped.append(skip) + + skip_list = "\n\t".join(skipped) + logging.info(f"Run complete. Skipped: {skip_list}") if __name__ == "__main__": diff --git a/.doc_gen/readmes/render.py b/.doc_gen/readmes/render.py index eb9a05bbfc6..5be09db186f 100644 --- a/.doc_gen/readmes/render.py +++ b/.doc_gen/readmes/render.py @@ -35,7 +35,9 @@ def __init__(self, scanner, sdk_ver, safe, svc_folder=None): if svc_folder is not None: self.lang_config['service_folder'] = svc_folder else: - if 'service_folder' in self.lang_config: + if "service_folder_overrides" in self.lang_config and scanner.svc_name in self.lang_config["service_folder_overrides"]: + self.lang_config["service_folder"] = self.lang_config["service_folder_overrides"][scanner.svc_name] + elif 'service_folder' in self.lang_config: svc_folder_tmpl = env.from_string(self.lang_config['service_folder']) self.lang_config['service_folder'] = svc_folder_tmpl.render(service=service_info) else: diff --git a/.doc_gen/readmes/scanner.py b/.doc_gen/readmes/scanner.py index 4aa2711e44b..3f572de85e9 100644 --- a/.doc_gen/readmes/scanner.py +++ b/.doc_gen/readmes/scanner.py @@ -40,6 +40,11 @@ def _load_cross(self): def _load_examples(self): self.example_meta = self._load_meta(f'{self.svc_name}_metadata.yaml', self.example_meta) + def set_example(self, language, service): + self.lang_name = language + self.svc_name = service + self.example_meta = None + def sdk(self): self._load_sdks() return self.sdk_meta[self.lang_name] diff --git a/aws-cli/bash-linux/ec2/README.md b/aws-cli/bash-linux/ec2/README.md new file mode 100644 index 00000000000..9c2465a95db --- /dev/null +++ b/aws-cli/bash-linux/ec2/README.md @@ -0,0 +1,69 @@ + +# Amazon EC2 code examples for the Command Line Interface with Bash script + +## Overview + +Shows how to use the AWS Command Line Interface with Bash script to work with Amazon Elastic Compute Cloud (Amazon EC2). + + + + +*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 + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `aws-cli` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `aws-cli` folder. + + + + + + +## Additional resources + +* [Amazon EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) +* [Amazon EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html) +* [Command Line Interface with Bash script Amazon EC2 reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/index.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/aws-cli/bash-linux/iam/README.md b/aws-cli/bash-linux/iam/README.md index 1c15c964a98..e8a149a7971 100644 --- a/aws-cli/bash-linux/iam/README.md +++ b/aws-cli/bash-linux/iam/README.md @@ -1,9 +1,9 @@ - -# IAM code examples for the Command Line Interface with Bash + +# IAM code examples for the Command Line Interface with Bash script ## Overview -Shows how to use the AWS Command Line Interface with Bash to work with AWS Identity and Access Management (IAM). +Shows how to use the AWS Command Line Interface with Bash script to work with AWS Identity and Access Management (IAM). @@ -12,7 +12,7 @@ Shows how to use the AWS Command Line Interface with Bash to work with AWS Ident ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -34,18 +34,18 @@ 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#L505) (`AttachRolePolicy`) -* [Create a policy](iam_operations.sh#L430) (`CreatePolicy`) -* [Create a role](iam_operations.sh#L351) (`CreateRole`) -* [Create a user](iam_operations.sh#L122) (`CreateUser`) -* [Create an access key](iam_operations.sh#L201) (`CreateAccessKey`) -* [Delete a policy](iam_operations.sh#L655) (`DeletePolicy`) -* [Delete a role](iam_operations.sh#L725) (`DeleteRole`) -* [Delete a user](iam_operations.sh#L877) (`DeleteUser`) -* [Delete an access key](iam_operations.sh#L796) (`DeleteAccessKey`) -* [Detach a policy from a role](iam_operations.sh#L580) (`DetachRolePolicy`) +* [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#L282) (`ListAccessKeys`) +* [List a user's access keys](iam_operations.sh#L278) (`ListAccessKeys`) * [List users](iam_operations.sh#L61) (`ListUsers`) ### Scenarios @@ -53,7 +53,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a user and assume a role](iam_create_user_assume_role_scenario.sh) +* [Create a user and assume a role](iam_operations.sh) ## Run the examples diff --git a/aws-cli/bash-linux/medical-imaging/README.md b/aws-cli/bash-linux/medical-imaging/README.md index 97dc467fdc2..61a59d6435e 100644 --- a/aws-cli/bash-linux/medical-imaging/README.md +++ b/aws-cli/bash-linux/medical-imaging/README.md @@ -1,4 +1,4 @@ - + # HealthImaging code examples for the Command Line Interface with Bash script ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS Command Line Interface with Bash script to work with AW ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -35,8 +35,8 @@ 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#L267) (`DeleteDatastore`) -* [Get data store properties](medical_imaging_operations.sh#L196) (`GetDatastore`) +* [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`) ## Run the examples diff --git a/aws-cli/bash-linux/s3/README.md b/aws-cli/bash-linux/s3/README.md index fd957832286..2db874ff360 100644 --- a/aws-cli/bash-linux/s3/README.md +++ b/aws-cli/bash-linux/s3/README.md @@ -1,9 +1,9 @@ - -# Amazon S3 code examples for the Command Line Interface + +# Amazon S3 code examples for the Command Line Interface with Bash script ## Overview -Shows how to use the AWS Command Line Interface to work with Amazon Simple Storage Service (Amazon S3). +Shows how to use the AWS Command Line Interface with Bash script to work with Amazon Simple Storage Service (Amazon S3). @@ -12,7 +12,7 @@ Shows how to use the AWS Command Line Interface to work with Amazon Simple Stora ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -41,7 +41,7 @@ Code excerpts that show you how to call individual service functions. * [Delete multiple objects](bucket-lifecycle-operations/bucket_operations.sh#L310) (`DeleteObjects`) * [Determine the existence of a bucket](bucket-lifecycle-operations/bucket_operations.sh#L24) (`HeadBucket`) * [Get an object from a bucket](bucket-lifecycle-operations/bucket_operations.sh#L175) (`GetObject`) -* [List objects in a bucket](bucket-lifecycle-operations/bucket_operations.sh#L243) (`ListObjects`) +* [List objects in a bucket](bucket-lifecycle-operations/awsdocs_general.sh#L97) (`ListObjectsV2`) * [Upload an object to a bucket](bucket-lifecycle-operations/bucket_operations.sh#L141) (`PutObject`) ### Scenarios @@ -49,7 +49,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with buckets and objects](s3_getting_started.sh) +* [Get started with buckets and objects](bucket-lifecycle-operations/bucket_operations.sh) ## Run the examples @@ -95,7 +95,7 @@ in the `aws-cli` folder. * [Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) * [Amazon S3 API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html) -* [Command Line Interface Amazon S3 reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/index.html) +* [Command Line Interface with Bash script Amazon S3 reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/index.html) diff --git a/cpp/example_code/acm/README.md b/cpp/example_code/acm/README.md new file mode 100644 index 00000000000..7942e76f5ec --- /dev/null +++ b/cpp/example_code/acm/README.md @@ -0,0 +1,81 @@ + +# ACM code examples for the SDK for C++ + +## Overview + +Shows how to use the AWS SDK for C++ to work with AWS Certificate Manager (ACM). + + + + +*ACM helps you to provision, manage, and renew publicly trusted TLS certificates on AWS based websites.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [ACM User Guide](https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html) +* [ACM API Reference](https://docs.aws.amazon.com/acm/latest/APIReference/Welcome.html) +* [SDK for C++ ACM reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-acm/html/annotated.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/cpp/example_code/aurora/README.md b/cpp/example_code/aurora/README.md index 0b9d8c51429..4a0a5f890cb 100644 --- a/cpp/example_code/aurora/README.md +++ b/cpp/example_code/aurora/README.md @@ -1,19 +1,18 @@ - + # Aurora code examples for the SDK for C++ ## Overview -Shows how to use the AWS SDK for C++ to work with Amazon Aurora (Aurora). +Shows how to use the AWS SDK for C++ to work with Amazon Aurora. -*Aurora is a fully managed relational database engine that's built for the cloud and compatible with MySQL and PostgreSQL. -Aurora is part of Amazon Relational Database Service (Amazon RDS).* +*Aurora is a fully managed relational database engine that's built for the cloud and compatible with MySQL and PostgreSQL. Amazon Aurora is part of Amazon Relational Database Service (Amazon RDS).* ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -22,36 +21,10 @@ Aurora is part of Amazon Relational Database Service (Amazon RDS).* ## Code examples -### Single actions - -Code excerpts that show you how to call individual service functions. - -* [Create a DB cluster](getting_started_with_db_clusters.cpp#L498) (`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#L589) (`CreateDBInstance`) -* [Delete a DB cluster](getting_started_with_db_clusters.cpp#L1027) (`DeleteDBCluster`) -* [Delete a DB cluster parameter group](getting_started_with_db_clusters.cpp#L1095) (`DeleteDBClusterParameterGroup`) -* [Delete a DB instance](getting_started_with_db_clusters.cpp#L997) (`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#L882) (`DescribeDBInstances`) -* [Describe database engine versions](getting_started_with_db_clusters.cpp#L844) (`DescribeDBEngineVersions`) -* [Describe options for DB instances](getting_started_with_db_clusters.cpp#L919) (`DescribeOrderableDBInstanceOptions`) -* [Describe parameters from a DB cluster parameter group](getting_started_with_db_clusters.cpp#L783) (`DescribeDBClusterParameters`) -* [Update parameters in a DB cluster parameter group](getting_started_with_db_clusters.cpp#L403) (`ModifyDBClusterParameterGroup`) - -### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple -functions within the same service. +### Prerequisites -* [Get started with DB clusters](getting_started_with_db_clusters.cpp) -## Run the examples - -### Prerequisites Before using the code examples, first complete the installation and setup steps for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for @@ -61,23 +34,74 @@ sample Hello World-style application. Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + +### Get started + +* [Hello Aurora](hello_aurora/CMakeLists.txt#L4) (`DescribeDBClusters`) + +### Single actions + +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`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with DB clusters](getting_started_with_db_clusters.cpp) + +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Create an Aurora Serverless work item tracker](../../example_code/cross-service/serverless-aurora) + +## Run the examples + ### Instructions + +#### Hello Aurora + +This example shows you how to get started using Aurora. + + + #### Get started with DB clusters This example shows you how to do the following: * Create a custom Aurora DB cluster parameter group and set parameter values. -* Create a DB cluster that is configured to use the parameter group. -* Create a DB instance in the DB cluster that contains a database. -* Take a snapshot of the DB cluster. -* Delete the instance, DB cluster, and parameter group. +* Create a DB cluster that uses the parameter group. +* Create a DB instance that contains a database. +* Take a snapshot of the DB cluster, then clean up resources. + + + + @@ -86,6 +110,8 @@ This example shows you how to do the following: ⚠ Running tests might result in charges to your AWS account. + + ```sh cd cmake -DBUILD_TESTS=ON @@ -93,6 +119,7 @@ This example shows you how to do the following: ctest ``` + diff --git a/cpp/example_code/cloudwatch-logs/README.md b/cpp/example_code/cloudwatch-logs/README.md index 813d3898514..0b1b5f500de 100644 --- a/cpp/example_code/cloudwatch-logs/README.md +++ b/cpp/example_code/cloudwatch-logs/README.md @@ -1,38 +1,89 @@ -# Amazon CloudWatch Logs C++ SDK code examples + +# CloudWatch Logs code examples for the SDK for C++ -## Purpose -The code examples in this directory demonstrate how to work with Amazon CloudWatch Logs -using the AWS SDK for C++. +## Overview -Amazon CloudWatch Logs enables you to monitor, store, and access your log files from Amazon Elastic Compute Cloud (EC2) -instances, AWS CloudTrail, or other sources. +Shows how to use the AWS SDK for C++ to work with Amazon CloudWatch Logs. -## Code examples + + -### API examples -- [Delete a subscription filter](./delete_subscription_filter.cpp) (DeleteSubscriptionFilter) -- [Describe subscription filters](./describe_subscription_filters.cpp) (DescribeSubscriptionFilters) -- [Put subscription filter](./put_subscription_filter.cpp) (PutSubscriptionFilter) +*CloudWatch Logs monitor, store, and access your log files from Amazon Elastic Compute Cloud instances, AWS CloudTrail, or other sources.* ## ⚠ Important -- We recommend that you grant your code least privilege, or at most 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) in the AWS Identity and Access Management User Guide. -- This code has not been tested in all AWS Regions. Some AWS services are available only in specific [Regions](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). -- Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). + + + -## Running the examples +## Code examples ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- Complete the installation and setup steps of [Getting Started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for C++ Developer Guide. -The Getting Started section covers how to obtain and build the SDK, and how to build your own code utilizing the SDK with a sample "Hello World"-style application. -- See [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html) for information on the structure of the code examples, building, and running the examples. - -To run these code examples, your AWS user must have permissions to perform these actions with Amazon CloudWatch Logs. -The AWS managed policy named "CloudWatchLogsFullAccess" may be used to bulk-grant the necessary permissions. -For more information on attaching policies to IAM user groups, -see [Attaching a policy to an IAM user group](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_attach-policy.html). - -## Resources -- [AWS SDK for C++ Documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) -- [Amazon CloudWatch Documentation](https://docs.aws.amazon.com/cloudwatch/) + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a subscription filter](put_subscription_filter.cpp#L16) (`PutSubscriptionFilter`) +* [Delete a subscription filter](delete_subscription_filter.cpp#L17) (`DeleteSubscriptionFilter`) +* [Describe existing subscription filters](describe_subscription_filters.cpp#L15) (`DescribeSubscriptionFilters`) + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) +* [CloudWatch Logs API Reference](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/Welcome.html) +* [SDK for C++ CloudWatch Logs reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-cloudwatch-logs/html/annotated.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/cpp/example_code/cloudwatch/README.md b/cpp/example_code/cloudwatch/README.md index 8e5bbc54e5a..cb573e36901 100644 --- a/cpp/example_code/cloudwatch/README.md +++ b/cpp/example_code/cloudwatch/README.md @@ -1,41 +1,93 @@ -# Amazon CloudWatch C++ SDK code examples + +# CloudWatch code examples for the SDK for C++ -## Purpose -The code examples in this directory demonstrate how to work with Amazon CloudWatch -using the AWS SDK for C++. +## Overview -Amazon CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes. -You no longer need to set up, manage, and scale your own monitoring systems and infrastructure. +Shows how to use the AWS SDK for C++ to work with Amazon CloudWatch. -## Code examples + + -### API examples -- [Delete an alarm](./delete_alarm.cpp) (DeleteAlarms) -- [Describe alarms](./describe_alarms.cpp) (DescribeAlarms) -- [Disable alarm actions](./disable_alarm_actions.cpp) (DisableAlarmActions) -- [Enable alarm actions](./enable_alarm_actions.cpp) (EnableAlarmActions) -- [List metrics](./list_metrics.cpp) (ListMetrics) -- [Put metric alarm](./put_metric_alarm.cpp) (PutMetricAlarm) -- [Put metric data](./put_metric_data.cpp) (PutMetricData) +*CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes.* ## ⚠ Important -- We recommend that you grant your code least privilege, or at most 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) in the AWS Identity and Access Management User Guide. -- This code has not been tested in all AWS Regions. Some AWS services are available only in specific [Regions](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). -- Running this code might result in charges to your AWS account. -## Running the examples +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- Complete the installation and setup steps of [Getting Started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for C++ Developer Guide. -The Getting Started section covers how to obtain and build the SDK, and how to build your own code utilizing the SDK with a sample "Hello World"-style application. -- See [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html) for information on the structure of the code examples, building, and running the examples. - -To run these code examples, your AWS user must have permissions to perform these actions with Amazon CloudWatch. -The AWS managed policy named "CloudWatchFullAccess" may be used to bulk-grant the necessary permissions. -For more information on attaching policies to IAM user groups, -see [Attaching a policy to an IAM user group](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_attach-policy.html). - -## Resources -- [AWS SDK for C++ Documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) -- [Amazon CloudWatch Documentation](https://docs.aws.amazon.com/cloudwatch/) + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a metric alarm](put_metric_alarm.cpp#L18) (`PutMetricAlarm`) +* [Delete alarms](delete_alarm.cpp#L15) (`DeleteAlarms`) +* [Describe alarms for a metric](describe_alarms.cpp#L13) (`DescribeAlarmsForMetric`) +* [Disable alarm actions](disable_alarm_actions.cpp#L18) (`DisableAlarmActions`) +* [Enable alarm actions](enable_alarm_actions.cpp#L20) (`EnableAlarmActions`) +* [List metrics](list_metrics.cpp#L18) (`ListMetrics`) +* [Put data into a metric](put_metric_data.cpp#L14) (`PutMetricData`) + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) +* [CloudWatch API Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) +* [SDK for C++ CloudWatch reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-cloudwatch/html/annotated.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/cpp/example_code/codebuild/README.md b/cpp/example_code/codebuild/README.md new file mode 100644 index 00000000000..d0c947e7c49 --- /dev/null +++ b/cpp/example_code/codebuild/README.md @@ -0,0 +1,81 @@ + +# CodeBuild code examples for the SDK for C++ + +## Overview + +Shows how to use the AWS SDK for C++ to work with AWS CodeBuild. + + + + +*CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.html) +* [CodeBuild API Reference](https://docs.aws.amazon.com/codebuild/latest/APIReference/Welcome.html) +* [SDK for C++ CodeBuild reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-codebuild/html/annotated.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/cpp/example_code/dynamodb/Readme.md b/cpp/example_code/dynamodb/Readme.md index 0e564d7303d..5d5f4229b20 100644 --- a/cpp/example_code/dynamodb/Readme.md +++ b/cpp/example_code/dynamodb/Readme.md @@ -1,75 +1,174 @@ -# DynamoDb code examples for the SDK for C++ + +# DynamoDB code examples for the SDK for C++ ## Overview -Sample code which demonstrates creation, deletion, modification, and querying of Amazon DynamoDB databases. +Shows how to use the AWS SDK for C++ to work with Amazon DynamoDB. -*Amazon DynamoDB is a fully managed NoSQL database service that provides fast and -predictable performance with seamless scalability.* + + -## ⚠️ Important +*DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.* -* Running this code might result in charges to your AWS account. -* Running the tests might result in charges to your AWS account +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + + +### Get started + +* [Hello DynamoDB](hello_dynamodb/CMakeLists.txt#L4) (`ListTables`) + ### Single actions Code excerpts that show you how to call individual service functions. -* [Create a table](./create_table.cpp) (CreateTable) -* [Create a table with composite key](./create_table_composite_key.cpp) (CreateTable) -* [Delete an item](./delete_item.cpp) (DeleteItem) -* [Delete a table](./delete_table.cpp) (DeleteTable) -* [Describe a table](./describe_table.cpp) (DescribeTable) -* [Get an item](./get_item.cpp) (GetItem) -* [Get items in a batch](./batch_get_item.cpp) (BatchGetItem) -* [List tables](./list_tables.cpp) (ListTables) -* [Put an item](./put_item.cpp) (PutItem) -* [Query items](./query_items.cpp) (Query) -* [Scan a table](./scan_table.cpp) (Scan) -* [Update an item](./update_item.cpp) (UpdateItem) -* [Update a table](./update_table.cpp) (UpdateTable) -* [Write a batch of items](./batch_write_item.cpp) (BatchWriteItem) +* [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`) ### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with tables, items, and queries](dynamodb_utils.cpp) +* [Query a table by using batches of PartiQL statements](dynamodb_utils.cpp) +* [Query a table using PartiQL](dynamodb_utils.cpp) + +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Create a serverless application to manage photos](../../example_code/cross-service/photo_asset_manager) -* [Getting started scenario for DynamoDB](./dynamodb_getting_started_scenario.cpp) (CreateTable, PutItem, UpdateItem, BatchWriteItem, GetItem, Query, Scan, DeleteItem, DescribeTable, DeleteTable) -* [PartiQL single statement scenario for DynamoDB](./dynamodb_partiql_single_scenario.cpp) (CreateTable, ExecuteStatement, DescribeTable, DeleteTable) -* [PartiQL batch statements scenario for DynamoDB](./dynamodb_partiql_batch_scenario.cpp) (CreateTable, BatchExecuteStatement, DescribeTable, DeleteTable) -* ## Run the examples -### Prerequisites +### Instructions -Before using the code examples, first complete the installation and setup steps -of [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for -C++ Developer Guide. -This section covers how to get and build the SDK, and how to build your own code by using the SDK with a -sample Hello World-style application. -Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + +#### Hello DynamoDB + +This example shows you how to get started using DynamoDB. + + + +#### Get started with tables, items, and queries + +This example shows you how to do the following: + +* Create a table that can hold movie data. +* Put, get, and update a single movie in the table. +* Write movie data to the table from a sample JSON file. +* Query for movies that were released in a given year. +* Scan for movies that were released in a range of years. +* Delete a movie from the table, then delete the table. + + + + + + + + +#### Query a table by using batches of PartiQL statements + +This example shows you how to do the following: + +* Get a batch of items by running multiple SELECT statements. +* Add a batch of items by running multiple INSERT statements. +* Update a batch of items by running multiple UPDATE statements. +* Delete a batch of items by running multiple DELETE statements. + + + + + + + + +#### Query a table using PartiQL + +This example shows you how to do the following: + +* Get an item by running a SELECT statement. +* Add an item by running an INSERT statement. +* Update an item by running an UPDATE statement. +* Delete an item by running a DELETE statement. + + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. -## Tests -⚠️ Running the tests might result in charges to your AWS account. ```sh cd cmake -DBUILD_TESTS=ON make - ctest - ``` + ctest +``` + + + + ## Additional resources -* [Amazon DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) -* [Amazon DynamoDB API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html) -* [AWS SDK for C++ Documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) +* [DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) +* [DynamoDB API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html) +* [SDK for C++ DynamoDB reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-dynamodb/html/annotated.html) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/cpp/example_code/ebs/README.md b/cpp/example_code/ebs/README.md new file mode 100644 index 00000000000..ac4b4594925 --- /dev/null +++ b/cpp/example_code/ebs/README.md @@ -0,0 +1,81 @@ + +# Amazon EBS code examples for the SDK for C++ + +## Overview + +Shows how to use the AWS SDK for C++ to work with Amazon Elastic Block Store (Amazon EBS). + + + + +*Amazon EBS is a web service that provides block level storage volumes for use with Amazon Elastic Compute Cloud instances.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [Amazon EBS User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) +* [Amazon EBS API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/OperationList-query-ebs.html) +* [SDK for C++ Amazon EBS reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-ebs/html/annotated.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/cpp/example_code/ec2/README.md b/cpp/example_code/ec2/README.md index 0d4ae0c0bc3..95cbc706c80 100644 --- a/cpp/example_code/ec2/README.md +++ b/cpp/example_code/ec2/README.md @@ -1,4 +1,4 @@ - + # Amazon EC2 code examples for the SDK for C++ ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for C++ to work with Amazon Elastic Compute Cloud ( ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -22,6 +22,27 @@ Shows how to use the AWS SDK for C++ to work with Amazon Elastic Compute Cloud ( ## Code examples +### Prerequisites + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + + +### Get started + +* [Hello Amazon EC2](hello_ec2/CMakeLists.txt#L4) (`DescribeSecurityGroups`) + ### Single actions Code excerpts that show you how to call individual service functions. @@ -34,43 +55,34 @@ Code excerpts that show you how to call individual service functions. * [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#L70) (`DescribeAvailabilityZones`) -* [Describe Regions](describe_regions_and_zones.cpp#L44) (`DescribeRegions`) +* [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#L35) (`RebootInstances`) +* [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#L40) (`StartInstances`) -* [Stop an instance](start_stop_instance.cpp#86) (`StopInstances`) +* [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`) ## Run the examples -### Prerequisites - -Before using the code examples, first complete the installation and setup steps -for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for -C++ Developer Guide. -This section covers how to get and build the SDK, and how to build your own code by using the SDK with a -sample Hello World-style application. - -Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). - - - - - ### Instructions +#### Hello Amazon EC2 + +This example shows you how to get started using Amazon EC2. + + ### Tests diff --git a/cpp/example_code/eventbridge/README.md b/cpp/example_code/eventbridge/README.md index 93169d58b25..29264c6c929 100644 --- a/cpp/example_code/eventbridge/README.md +++ b/cpp/example_code/eventbridge/README.md @@ -1,37 +1,89 @@ -# Amazon EventBridge C++ SDK code examples + +# EventBridge code examples for the SDK for C++ -## Purpose -The code examples in this directory demonstrate how to work with Amazon EventBridge -using the AWS SDK for C++. +## Overview -Amazon EventBridge (formerly Amazon CloudWatch Events) is a serverless event bus service that you -can use to connect your applications with data from a variety of sources. +Shows how to use the AWS SDK for C++ to work with Amazon EventBridge. -## Code examples + + -### API examples -- [Put a rule](./put_rule.cpp) (PutRule) -- [Put events](./put_events.cpp) (PutEvents) -- [Put targets](./put_targets.cpp) (PutTargets) +*EventBridge is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources.* ## ⚠ Important -- We recommend that you grant your code least privilege, or at most 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) in the AWS Identity and Access Management User Guide. -- This code has not been tested in all AWS Regions. Some AWS services are available only in specific [Regions](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). -- Running this code might result in charges to your AWS account. -## Running the examples +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- Complete the installation and setup steps of [Getting Started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for C++ Developer Guide. -The Getting Started section covers how to obtain and build the SDK, and how to build your own code utilizing the SDK with a sample "Hello World"-style application. -- See [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html) for information on the structure of the code examples, building, and running the examples. - -To run these code examples, your AWS user must have permissions to perform these actions with Amazon EventBridge. -The AWS managed policy named "AmazonEventBridgeFullAccess" may be used to bulk-grant the necessary permissions. -For more information on attaching policies to IAM user groups, -see [Attaching a policy to an IAM user group](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_attach-policy.html). - -## Resources -- [AWS SDK for C++ Documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) -- [Amazon EventBridge Documentation](https://docs.aws.amazon.com/eventbridge/) + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Add a target](put_targets.cpp#L17) (`PutTargets`) +* [Create a rule](put_rule.cpp#L14) (`PutRule`) +* [Send events](put_events.cpp#L15) (`PutEvents`) + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [EventBridge User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html) +* [EventBridge API Reference](https://docs.aws.amazon.com/eventbridge/latest/APIReference/Welcome.html) +* [SDK for C++ EventBridge reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-eventbridge/html/annotated.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/cpp/example_code/glacier/README.md b/cpp/example_code/glacier/README.md new file mode 100644 index 00000000000..6499db77536 --- /dev/null +++ b/cpp/example_code/glacier/README.md @@ -0,0 +1,81 @@ + +# S3 Glacier code examples for the SDK for C++ + +## Overview + +Shows how to use the AWS SDK for C++ to work with Amazon S3 Glacier. + + + + +*S3 Glacier provides durable and extremely low-cost storage for infrequently used data with security features for data archiving and backup.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [S3 Glacier Developer Guide](https://docs.aws.amazon.com/amazonglacier/latest/dev/introduction.html) +* [S3 Glacier API Reference](https://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-api.html) +* [SDK for C++ S3 Glacier reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-glacier/html/annotated.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/cpp/example_code/glue/README.md b/cpp/example_code/glue/README.md index 0cd2261a6ed..3a97ba2edf3 100644 --- a/cpp/example_code/glue/README.md +++ b/cpp/example_code/glue/README.md @@ -1,99 +1,131 @@ + # AWS Glue code examples for the SDK for C++ ## Overview -Shows how to use the AWS SDK for C++ to manage AWS Glue resources. +Shows how to use the AWS SDK for C++ to work with AWS Glue. -*AWS Glue is a serverless data integration service that makes it easier to discover, prepare, move, and integrate data from multiple sources for analytics, machine learning (ML), and application development.* + + -## ⚠️ Important +*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.* -* Running this code might result in charges to your AWS account. +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + + +### Get started + +* [Hello AWS Glue](hello_glue/CMakeLists.txt#L4) (`ListJobs`) + ### Single actions Code excerpts that show you how to call individual service functions. -* [Create a crawler](glue_getting_started_scenario.cpp) (CreateCrawler) -* [Create a job definition](glue_getting_started_scenario.cpp) (CreateJob) -* [Delete a crawler](glue_getting_started_scenario.cpp) (DeleteCrawler) -* [Delete a database from the Data Catalog](glue_getting_started_scenario.cpp) (DeleteDatabase) -* [Delete a job definition](glue_getting_started_scenario.cpp) (DeleteJob) -* [Get a crawler](glue_getting_started_scenario.cpp) (GetCrawler) -* [Get a database from the Data Catalog](glue_getting_started_scenario.cpp) (GetDatabase) -* [Get a job run](glue_getting_started_scenario.cpp) (GetJobRun) -* [Get runs of a job](glue_getting_started_scenario.cpp) (GetJobRuns) -* [Get tables from a database](glue_getting_started_scenario.cpp) (GetTables) -* [List job definitions](glue_getting_started_scenario.cpp) (ListJobs) -* [Start a crawler](glue_getting_started_scenario.cpp) (StartCrawler) -* [Start a job run](glue_getting_started_scenario.cpp) (StartJobRun) +* [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`) ### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -* [Get started running crawlers and jobs](glue_getting_started_scenario.cpp) - (CreateCrawler, GetCrawler, StartCrawler, GetDatabase, GetTables, - CreateJob, StartJobRun, GetJobRun, ListJobs, GetJobRuns, DeleteJob, - DeleteDatabase, DeleteCrawler) +* [Get started with crawlers and jobs](glue_getting_started_scenario.cpp) ## Run the examples -### Prerequisites +### Instructions -Before using the code examples, first complete the installation and setup steps -of [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for -C++ Developer Guide. -This section covers how to get and build the SDK, and how to build your own code by using the SDK with a -sample Hello World-style application. -Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + -Additional steps are required to run the scenario, [Get started running -crawlers and jobs](glue_getting_started_scenario.cpp). The scenario depends -on resources which can be created with an AWS Cloud Development Kit (AWS CDK) -script. The script is located at -[aws-doc-sdk-examples/resources/cdk/glue_role_bucket](../../../resources/cdk/glue_role_bucket). See "Running a CDK app" in the [README](../../../resources/cdk/README.md). +#### Hello AWS Glue -Running the CDK scripts will give an output similar to the following. +This example shows you how to get started using AWS Glue. -```sh -Outputs: -doc-example-glue-scenario-stack.BucketName = doc-example-glue-scenario-docexampleglue12345678-12345678910 -doc-example-glue-scenario-stack.RoleName = AWSGlueServiceRole-DocExample -Stack ARN: -arn:aws:cloudformation:us-east-1:123456789101:stack/doc-example-glue-scenario-stack/12345789-1234-1234-1234-123456789101 -``` -_doc-example-glue-scenario-docexampleglue6e2f12e5-6zbgwfv9hx5k_ is the name -of an Amazon Simple Storage Service (Amazon S3) bucket. +#### 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. -_AWSGlueServiceRole-DocExample_ is an AWS Identity and Access Management -(IAM) role name. + + -These two strings are the inputs required by the scenario. -## Tests + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + -⚠️ Running the tests might result in charges to your AWS account. ```sh cd cmake -DBUILD_TESTS=ON make - ctest -``` + ctest +``` + + + + ## 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) -* [AWS SDK for C++ Documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) +* [SDK for C++ AWS Glue reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-glue/html/annotated.html) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/cpp/example_code/iam/README.md b/cpp/example_code/iam/README.md index 1c92c38f122..14afe1b8f0f 100644 --- a/cpp/example_code/iam/README.md +++ b/cpp/example_code/iam/README.md @@ -1,74 +1,142 @@ -# AWS IAM code examples for the SDK for C++ + +# IAM code examples for the SDK for C++ ## Overview -The code examples in this directory demonstrate how to work with AWS Identity and Access Management (IAM) using the AWS SDK for C++. +Shows how to use the AWS SDK for C++ to work with AWS Identity and Access Management (IAM). -*IAM is a web service that helps you securely control access to AWS resources. You use IAM to control who is authenticated (signed in) and authorized (has permissions) to use resources.* + + -## ⚠️ Important +*IAM is a web service for securely controlling access to AWS services. With IAM, you can centrally manage permissions in your AWS account.* -* Running this code might result in charges to your AWS account. +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + + +### Get started + +* [Hello IAM](hello_iam/CMakeLists.txt#L4) (`ListPolicies`) + ### Single actions -- [Access the last used key](./access_key_last_used.cpp) (GetAccessKeyLastUsed) -- [Attach a role policy](./attach_role_policy.cpp) (AttachRolePolicy) -- [Create an access key](./create_access_key.cpp) (CreateAccessKey) -- [Create an account alias](./create_account_alias.cpp) (CreateAccountAlias) -- [Create a policy](./create_policy.cpp) (CreatePolicy) -- [Create a role](./create_role.cpp) (CreateRole) -- [Create a user](./create_user.cpp) (CreateUser) -- [Delete an access key](./delete_access_key.cpp) (DeleteAccessKey) -- [Delete an account alias](./delete_account_alias.cpp) (DeleteAccountAlias) -- [Delete a policy](./delete_policy.cpp) (DeletePolicy) -- [Delete a server certificate](./delete_server_certificate.cpp) (DeleteServerCertificate) -- [Delete a user](./delete_user.cpp) (DeleteUser) -- [Detach a role policy](./detach_role_policy.cpp) (DetachRolePolicy) -- [Get a policy](./get_policy.cpp) (GetPolicy) -- [Get a server certificate](./get_server_certificate.cpp) (GetServerCertificate) -- [List the access keys](./list_access_keys.cpp) (ListAccessKeys) -- [List the account aliases](./list_account_aliases.cpp) (ListAccountAliases) -- [List the policies](./list_policies.cpp) (ListPolicies) -- [List the server certificates](./list_server_certificates.cpp) (ListServerCertificates) -- [List the users](./list_users.cpp) (ListUsers) -- [Put a role policy](./put_role_policy.cpp) (putRolePolicy) -- [Update an access key](./update_access_key.cpp) (UpdateAccessKey) -- [Update a server certificate](./update_server_certificate.cpp) (UpdateServerCertificate) -- [Update a user](./update_user.cpp) (UpdateUser) +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`) ### Scenarios -- [Create an IAM user, create an IAM role, and apply the role to the user](./iam_create_user_assume_role_scenario.cpp) (CreateUser, GetUser, CreateRole, CreatePolicy, AssumeRole, ListBuckets, AttachRolePolicy, DetachRolePolicy, DeletePolicy, DeleteRole, DeleteUser) +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Create a user and assume a role](iam_create_user_assume_role_scenario.cpp) ## Run the examples -Before using the code examples, first complete the installation and setup steps of [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for C++ Developer Guide. -The Getting started section covers how to get and build the SDK, and how to build your own code by using the SDK with a sample “Hello World”-style application. +### Instructions + + + + -For information on the structure of the code examples and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). +#### Hello IAM + +This example shows you how to get started using IAM. + + + +#### Create a user and assume a role + +This example shows you how to create a user and assume a role. + +* Create a user with no permissions. +* Create a role that grants permission to list Amazon S3 buckets for the account. +* Add a policy to let the user assume the role. +* Assume the role and list S3 buckets using temporary credentials, then clean up resources. + + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. -## Tests -⚠️ Running the tests might result in charges to your AWS account. ```sh cd cmake -DBUILD_TESTS=ON make - ctest + ctest ``` + + + + ## Additional resources -- [AWS Identity and Access Management (IAM) documentation](https://aws.amazon.com/iam/index.html) -- [AWS SDK for C++ documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) -- [IAM code examples using the AWS SDK for C++](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/examples-iam.html) +* [IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) +* [IAM API Reference](https://docs.aws.amazon.com/IAM/latest/APIReference/welcome.html) +* [SDK for C++ IAM reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-iam/html/annotated.html) + + + + +--- +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/cpp/example_code/kinesis/README.md b/cpp/example_code/kinesis/README.md new file mode 100644 index 00000000000..a1f22f8ed39 --- /dev/null +++ b/cpp/example_code/kinesis/README.md @@ -0,0 +1,81 @@ + +# Kinesis code examples for the SDK for C++ + +## Overview + +Shows how to use the AWS SDK for C++ to work with Amazon Kinesis. + + + + +*Kinesis makes it easy to collect, process, and analyze video and data streams in real time.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [Kinesis Developer Guide](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) +* [Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/Welcome.html) +* [SDK for C++ Kinesis reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-kinesis/html/annotated.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/cpp/example_code/lambda/README.md b/cpp/example_code/lambda/README.md index 0e60cc1e19c..a0c6d0058fc 100644 --- a/cpp/example_code/lambda/README.md +++ b/cpp/example_code/lambda/README.md @@ -1,72 +1,132 @@ + # Lambda code examples for the SDK for C++ + ## Overview -Shows how to use the AWS SDK for C++ to create, deploy, and invoke -AWS Lambda functions. +Shows how to use the AWS SDK for C++ to work with AWS Lambda. + + + + +*Lambda allows you to run code without provisioning or managing servers.* -*AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers. You can trigger Lambda from over 200 AWS services and software as a service (SaaS) applications, and only pay for what you use.* +## ⚠ Important -## ⚠️ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + + +### Get started + +* [Hello Lambda](hello_lambda/CMakeLists.txt#L4) (`ListFunctions`) + ### Single actions Code excerpts that show you how to call individual service functions. -* [Create a function](get_started_with_functions_scenario.cpp)(CreateFunction) -* [Delete a function](get_started_with_functions_scenario.cpp)(DeleteFunction) -* [Get a function](get_started_with_functions_scenario.cpp)(GetFunction) -* [Invoke a function](get_started_with_functions_scenario.cpp)(Invoke) -* [List functions](get_started_with_functions_scenario.cpp)(ListFunctions) -* [Update function code](get_started_with_functions_scenario.cpp) - (UpdateFunctionCode) -* [Update function configuration](get_started_with_functions_scenario.cpp) - (UpdateFunctionConfiguration) -* +* [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`) + ### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* -* [Get started with functions](get_started_with_functions_scenario.cpp) - (CreateFunction, GetFunction, ListFunctions, Invoke, UpdateFunctionCode, - UpdateFunctionConfiguration, DeleteFunction) +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with functions](get_started_with_functions_scenario.cpp) + +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Create a serverless application to manage photos](../../example_code/cross-service/photo_asset_manager) ## Run the examples -### Prerequisites +### Instructions + + + + + +#### Hello Lambda + +This example shows you how to get started using Lambda. + -Before using the code examples, first complete the installation and setup steps -for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for -C++ Developer Guide. -This section covers how to get and build the SDK, and how to build your own code by using the SDK with a -sample Hello World-style application. -Next, for information about code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). +#### Get started with functions -This sample code contains a [Lambda C++ runtime implementation](cpp_lambda/) -which can be used in the "Get started with functions" scenario instead of the default Python Lambda function. +This example shows you how to do the following: + +* Create an IAM role and Lambda function, then upload handler code. +* Invoke the function with a single parameter and get results. +* Update the function code and configure with an environment variable. +* Invoke the function with new parameters and get results. Display the returned execution log. +* List the functions for your account, then clean up resources. + + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. -Instructions for building the Lambda C++ runtime are in this [README](cpp_lambda/README.md) -## Tests -⚠️ Running the tests might result in charges to your AWS account. ```sh cd cmake -DBUILD_TESTS=ON make - ctest -``` + ctest +``` + + + + ## Additional resources -* [AWS Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) -* [AWS Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) -* [AWS SDK for C++ Documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) +* [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) +* [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) +* [SDK for C++ Lambda reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-lambda/html/annotated.html) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/cpp/example_code/mediaconvert/README.md b/cpp/example_code/mediaconvert/README.md index 680a7e9f100..ff7ba22672c 100644 --- a/cpp/example_code/mediaconvert/README.md +++ b/cpp/example_code/mediaconvert/README.md @@ -1,4 +1,4 @@ - + # MediaConvert code examples for the SDK for C++ ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for C++ to work with AWS Elemental MediaConvert. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -21,15 +21,6 @@ Shows how to use the AWS SDK for C++ to work with AWS Elemental MediaConvert. ## Code examples -### Single actions - -Code excerpts that show you how to call individual service functions. - -* [Create a transcoding job](create_job.cpp#L52) (`CreateJob`) -* [Get a transcoding job](get_job.cpp#L22) (`GetJob`) -* [List transcoding jobs](list_jobs.cpp#L22) (`ListJobs`) - -## Run the examples ### Prerequisites @@ -47,6 +38,16 @@ Next, for information on code example structures and how to build and run the ex +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a transcoding job](create_job.cpp#L52) (`CreateJob`) +* [Get a transcoding job](get_job.cpp#L22) (`GetJob`) +* [List transcoding jobs](list_jobs.cpp#L22) (`ListJobs`) + +## Run the examples + ### Instructions @@ -57,6 +58,7 @@ Otherwise, you’ll quickly hit your low limit. These examples use the provided + ### Tests ⚠ Running tests might result in charges to your AWS account. diff --git a/cpp/example_code/rds/README.md b/cpp/example_code/rds/README.md index b2d9798f65f..52cfc7ccdc0 100644 --- a/cpp/example_code/rds/README.md +++ b/cpp/example_code/rds/README.md @@ -1,4 +1,4 @@ - + # Amazon RDS code examples for the SDK for C++ ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for C++ to work with Amazon Relational Database Ser ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -21,6 +21,28 @@ Shows how to use the AWS SDK for C++ to work with Amazon Relational Database Ser ## Code examples + +### Prerequisites + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + + +### Get started + +* [Hello Amazon RDS](hello_rds/CMakeLists.txt#L4) (`DescribeDBInstances`) + ### Single actions Code excerpts that show you how to call individual service functions. @@ -28,13 +50,13 @@ 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#L852) (`DeleteDBInstance`) -* [Delete a DB parameter group](getting_started_with_db_instances.cpp#L906) (`DeleteDBParameterGroup`) -* [Describe DB instances](getting_started_with_db_instances.cpp#L747) (`DescribeDBInstances`) +* [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#L713) (`DescribeDBEngineVersions`) -* [Describe options for DB instances](getting_started_with_db_instances.cpp#L786) (`DescribeOrderableDBInstanceOptions`) -* [Describe parameters in a DB parameter group](getting_started_with_db_instances.cpp#L656) (`DescribeDBParameters`) +* [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`) @@ -43,30 +65,26 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with DB instances](getting_started_with_db_instances.cpp) +* [Get started with DB instances](getting_started_with_db_instances.cpp) -## Run the examples +### Cross-service examples -### Prerequisites +Sample applications that work across multiple AWS services. +* [Create an Aurora Serverless work item tracker](../../example_code/cross-service/serverless-aurora) +## Run the examples -Before using the code examples, first complete the installation and setup steps -for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for -C++ Developer Guide. -This section covers how to get and build the SDK, and how to build your own code by using the SDK with a -sample Hello World-style application. +### Instructions -Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + - - +#### Hello Amazon RDS -### Instructions +This example shows you how to get started using Amazon RDS. - - #### Get started with DB instances @@ -78,6 +96,10 @@ This example shows you how to do the following: * Take a snapshot of the instance. * Delete the instance and parameter group. + + + + diff --git a/cpp/example_code/redshift/README.md b/cpp/example_code/redshift/README.md new file mode 100644 index 00000000000..f6ae53a4c8f --- /dev/null +++ b/cpp/example_code/redshift/README.md @@ -0,0 +1,81 @@ + +# Amazon Redshift code examples for the SDK for C++ + +## Overview + +Shows how to use the AWS SDK for C++ to work with Amazon Redshift. + + + + +*Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse service that makes it simple and cost-effective to efficiently analyze all your data using your existing business intelligence tools.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [Amazon Redshift Management Guide](https://docs.aws.amazon.com/redshift/latest/mgmt/welcome.html) +* [Amazon Redshift API Reference](https://docs.aws.amazon.com/redshift/latest/APIReference/Welcome.html) +* [SDK for C++ Amazon Redshift reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-redshift/html/annotated.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/cpp/example_code/s3/README.md b/cpp/example_code/s3/README.md index 2f5990219f0..3058d302306 100644 --- a/cpp/example_code/s3/README.md +++ b/cpp/example_code/s3/README.md @@ -1,93 +1,144 @@ -# Amazon S3 code examples for the SDK for C++ using S3Client + +# Amazon S3 code examples for the SDK for C++ ## Overview -The code examples in this directory demonstrate how to work with Amazon Simple Storage Service (Amazon S3) using the -AWS SDK for C++. +Shows how to use the AWS SDK for C++ to work with Amazon Simple Storage Service (Amazon S3). -Amazon S3 is an object storage service that offers industry-leading scalability, data availability, security, and -performance. + + -This example uses the S3Client, which is a fully-featured Amazon S3 interface and is ideally suited for smaller files. -For other classes provided by the AWS SDK for C++ that also interface to Amazon S3, see example -folder [s3-crt](../s3-crt) and example folder [transfer-manager](../transfer-manager). +*Amazon S3 is storage for the internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.* -## ⚠️ Important +## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 + + -### Single actions -Code excerpts that show you how to call individual service functions. +## Code examples -- [Copy an object](./copy_object.cpp) (CopyObject) -- [Create an S3 bucket](./create_bucket.cpp) (CreateBucket) -- [Delete an S3 bucket](./delete_bucket.cpp) (DeleteBucket) -- [Delete a bucket policy (permission to access resources) of an S3 bucket](./delete_bucket_policy.cpp) ( - DeleteBucketPolicy) -- [Delete an object from an S3 bucket](./delete_object.cpp) (DeleteObject) -- [Delete multiple objects from an S3 bucket](./delete_objects.cpp) - (DeleteObjects) -- [Delete the website configuration of an S3 bucket](./delete_website_config.cpp) (DeleteBucketWebsite) -- [Get the access control list (ACL) for an S3 bucket](./get_bucket_acl.cpp) (GetBucketAcl) -- [Get a bucket policy (permission to access resources) for an S3 bucket](./get_bucket_policy.cpp) (GetBucketPolicy) -- [Get an object out of an S3 bucket](./get_object.cpp) (GetObject) -- [Get the access control list (ACL) for an object in an S3 bucket](./get_put_object_acl.cpp) (GetObjectAcl) -- [Get and set the access control list (ACL) for an S3 bucket](./get_put_bucket_acl.cpp) (GetBucketAcl, PutBucketAcl) -- [Get the configuration of an S3 bucket configured for static website hosting](./get_website_config.cpp) ( - GetBucketWebsite) -- [List all S3 buckets](./list_buckets.cpp) (ListBuckets) -- [List all S3 buckets disabling the DNS cache (requires curl SDK configuration).](./list_buckets_disabling_dns_cache.cpp) (ListBuckets) -- [List all objects in an S3 bucket](./list_objects.cpp) (ListObjects) -- [Make requests to S3 across AWS Regions by specifying aws-global as the AWS Region](./list_objects_with_aws_global_region.cpp) (ListObjects) -- [Set the access control list (ACL) for an S3 bucket](./put_bucket_acl.cpp) (PutBucketAcl) -- [Add a bucket policy (permission to access resources) to an S3 bucket](./put_bucket_policy.cpp) (PutBucketPolicy) -- [Upload an object to an S3 bucket](./put_object.cpp) (PutObject) -- [Set the access control list (ACL) for an object in an S3 bucket](./get_put_object_acl.cpp) (PutObjectAcl) -- [Upload an object to an S3 bucket (asynchronously)](./put_object_async.cpp) (PutObjectAsync) -- [Upload an object to an S3 bucket (using a memory buffer instead of local disk copy)](./put_object_buffer.cpp) ( - PutObject) -- [Configure an S3 bucket for static website hosting](./put_website_config.cpp) (PutBucketWebsite) +### Prerequisites -### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -- [Create, list, and delete S3 buckets](./s3_getting_started_scenario.cpp) -- [Find, create, and delete an S3 bucket in a sequence](./s3_demo_for_cloud9.cpp) -## Run the examples Before using the code examples, first complete the installation and setup steps -of [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for C++ Developer Guide. This section covers how to get and build the SDK, and how to build your own code by using the SDK with a sample Hello World-style application. Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). -## Tests -⚠️ Running the tests might result in charges to your AWS account. + + + + +### Get started + +* [Hello Amazon S3](hello_s3/CMakeLists.txt#L4) (`ListBuckets`) + +### Single actions + +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`) +* [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`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with buckets and objects](s3_getting_started_scenario.cpp) + +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Create a serverless application to manage photos](../../example_code/cross-service/photo_asset_manager) + +## Run the examples + +### Instructions + + + + + +#### Hello Amazon S3 + +This example shows you how to get started using Amazon S3. + + + +#### Get started with buckets and objects + +This example shows you how to do the following: + +* Create a bucket and upload a file to it. +* Download an object from a bucket. +* Copy an object to a subfolder in a bucket. +* List the objects in a bucket. +* Delete the bucket objects and the bucket. + + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + ```sh cd cmake -DBUILD_TESTS=ON make - ctest - ./tests/s3_gtest -``` + ctest +``` + + + + ## Additional resources -- [Amazon Simple Storage Service Documentation](https://docs.aws.amazon.com/s3/index.html) -- [Amazon S3 code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/examples-s3.html) -- [AWS SDK for C++ Documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) +* [Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) +* [Amazon S3 API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html) +* [SDK for C++ Amazon S3 reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-s3/html/annotated.html) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/cpp/example_code/ses/README.md b/cpp/example_code/ses/README.md new file mode 100644 index 00000000000..5873f13b042 --- /dev/null +++ b/cpp/example_code/ses/README.md @@ -0,0 +1,87 @@ + +# Amazon SES code examples for the SDK for C++ + +## Overview + +Shows how to use the AWS SDK for C++ to work with Amazon Simple Email Service (Amazon SES). + + + + +*Amazon SES is a reliable, scalable, and cost-effective email service.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Create an Aurora Serverless work item tracker](../../example_code/cross-service/serverless-aurora) + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + + +## Additional resources + +* [Amazon SES Developer Guide](https://docs.aws.amazon.com/ses/latest/dg/Welcome.html) +* [Amazon SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/Welcome.html) +* [SDK for C++ Amazon SES reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-ses/html/annotated.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/cpp/example_code/sns/README.md b/cpp/example_code/sns/README.md index 9d0db0b3d6b..92ef6572c7f 100644 --- a/cpp/example_code/sns/README.md +++ b/cpp/example_code/sns/README.md @@ -1,4 +1,4 @@ - + # Amazon SNS code examples for the SDK for C++ ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for C++ to work with Amazon Simple Notification Ser ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -54,28 +54,21 @@ Code excerpts that show you how to call individual service functions. * [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#L509) (`Publish`) +* [Publish a message with an attribute](None) (`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`) +* [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#L424) (`Subscribe`) - -### Scenarios - -Code examples that show you how to accomplish a specific task by calling multiple -functions within the same service. - -* [Publish messages to queues](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp) +* [Subscribe with a filter to a topic](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp#L54) (`Subscribe`) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create a serverless application to manage photos](../../example_code/cross-service/photo_asset_manager) +* [Create a serverless application to manage photos](../../example_code/cross-service/photo_asset_manager) ## Run the examples @@ -89,21 +82,6 @@ Sample applications that work across multiple AWS services. This example shows you how to get started using Amazon SNS. -#### Publish messages to queues - -This example shows you how to do the following: - -* Create topic (FIFO or non-FIFO). -* Subscribe several queues to the topic with an option to apply a filter. -* Publish messages to the topic. -* Poll the queues for messages received. - - - - - - - ### Tests diff --git a/cpp/example_code/sqs/README.md b/cpp/example_code/sqs/README.md index 7ffdbf84128..aafe7caf3a1 100644 --- a/cpp/example_code/sqs/README.md +++ b/cpp/example_code/sqs/README.md @@ -1,4 +1,4 @@ - + # Amazon SQS code examples for the SDK for C++ ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for C++ to work with Amazon Simple Queue Service (A ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -54,7 +54,7 @@ Code excerpts that show you how to call individual service functions. * [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#L332) (`GetQueueAttributes`) +* [Get attributes for a queue](None) (`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`) @@ -66,7 +66,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Publish messages to queues](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp) +* [Publish messages to queues](../cross-service/topics_and_queues/messaging_with_topics_and_queues.cpp) ## Run the examples diff --git a/cpp/example_code/sts/README.md b/cpp/example_code/sts/README.md index fb892060020..8eecb6b91fa 100644 --- a/cpp/example_code/sts/README.md +++ b/cpp/example_code/sts/README.md @@ -1,53 +1,87 @@ + # AWS STS code examples for the SDK for C++ ## Overview -Shows how to use the AWS SDK for C++ to access the AWS Security Token -Service (AWS STS) to acquire temporary credentials that grant specific permissions. +Shows how to use the AWS SDK for C++ to work with AWS Security Token Service (AWS STS). -*AWS provides AWS STS as a web service that enables you to request temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or for users you authenticate (federated users).* + + -## ⚠️ Important +*AWS STS creates and provides trusted users with temporary security credentials that can control access to your AWS resources.* -* Running this code might result in charges to your AWS account. +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 - -### Single actions + + -Code excerpts that show you how to call individual service functions. +## Code examples -- [Assume a role](./assume_role.cpp) (assumeRole) +### Prerequisites -## Run the examples -### Prerequisites Before using the code examples, first complete the installation and setup steps -of [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for C++ Developer Guide. This section covers how to get and build the SDK, and how to build your own code by using the SDK with a sample Hello World-style application. Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). -## Tests -⚠️ Running the tests might result in charges to your AWS account. + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Assume a role](assume_role.cpp#L39) (`AssumeRole`) + +## Run the examples + +### Instructions + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + ```sh cd cmake -DBUILD_TESTS=ON make - ctest -``` + ctest +``` + + + + + ## Additional resources -* [AWS Identity and Access Management Documentation](https://docs.aws.amazon.com/iam/index.html) -* [AWS STS API Reference](https://docs.aws.amazon.com/STS/latest/APIReference/index.html) -* [AWS SDK for C++ Documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) +* [AWS STS User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) +* [AWS STS API Reference](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) +* [SDK for C++ AWS STS reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-sts/html/annotated.html) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/cpp/example_code/transcribe/README.md b/cpp/example_code/transcribe/README.md index 6c9c31cd522..522cd448b87 100644 --- a/cpp/example_code/transcribe/README.md +++ b/cpp/example_code/transcribe/README.md @@ -1,40 +1,87 @@ + # Amazon Transcribe code examples for the SDK for C++ + ## Overview -The code examples in this directory demonstrate how to work with Amazon Transcribe using the AWS SDK for C++. -Amazon Transcribe is an automatic speech recognition service that makes it easy to add speech to text capabilities to any application. +Shows how to use the AWS SDK for C++ to work with Amazon Transcribe. + + + + +*Amazon Transcribe provides transcription services for your audio files and audio streams.* + +## ⚠ Important -## ⚠️ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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 -### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -- [Transcribing from an audio file](./get_transcript.cpp) - Shows streaming transcription by mimicking live audio using a flat file. This example uses the following API classes: - - - TranscribeStreamingServiceClient - - StartStreamTranscriptionHandler - - StartStreamTranscriptionRequest +### Prerequisites + + + +Before using the code examples, first complete the installation and setup steps +for [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for +C++ Developer Guide. +This section covers how to get and build the SDK, and how to build your own code by using the SDK with a +sample Hello World-style application. + +Next, for information on code example structures and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Produce real-time transcriptions](get_transcript.cpp#L26) (`StartStreamTranscriptionAsync`) -## Run the Examples -Before using the code examples, first complete the installation and setup steps of [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for C++ Developer Guide. -This section covers how to obtain and build the SDK, and how to build your own code utilizing the SDK with a sample Hello World-style application. +## Run the examples -Next, for information about code example structure and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html). +### Instructions -This example relies on curl as the HTTP client. If you are using Windows, additional steps are required to build the SDK for C++ with curl support. For more information, see [Building the AWS SDK for C++ on Windows](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/setup-windows.html) in the AWS SDK for C++ Developer Guide. Additionally, code execution must be able to locate the curl dll. -To run this code example, your AWS user must have permissions to perform these actions with Amazon Transcribe. -The AWS managed policy named "AmazonTranscribeFullAccess" can be used to grant permissions in bulk for this example. -For more information on attaching policies to IAM user groups, -see [Attaching a policy to an IAM user group](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups_manage_attach-policy.html). + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + + +```sh + cd + cmake -DBUILD_TESTS=ON + make + ctest +``` + + + + ## Additional resources -- [AWS SDK for C++ Documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html) -- [Amazon Transcribe Documentation](https://docs.aws.amazon.com/transcribe/index.html) -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [Amazon Transcribe Developer Guide](https://docs.aws.amazon.com/transcribe/latest/dg/what-is.html) +* [Amazon Transcribe API Reference](https://docs.aws.amazon.com/transcribe/latest/APIReference/Welcome.html) +* [SDK for C++ Amazon Transcribe reference](https://sdk.amazonaws.com/cpp/api/LATEST/aws-cpp-sdk-transcribe/html/annotated.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/dotnetv3/ACM/README.md b/dotnetv3/ACM/README.md index 918f40baffc..774678bf211 100644 --- a/dotnetv3/ACM/README.md +++ b/dotnetv3/ACM/README.md @@ -1,4 +1,4 @@ - + # ACM code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Certificate Manager (ACM) ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -42,11 +42,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -54,8 +56,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/Aurora/README.md b/dotnetv3/Aurora/README.md index bf019ab3487..fde35ef8984 100644 --- a/dotnetv3/Aurora/README.md +++ b/dotnetv3/Aurora/README.md @@ -1,4 +1,4 @@ - + # Aurora code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Aurora. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -60,24 +60,26 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with DB clusters](Scenarios/AuroraScenario.cs) +* [Get started with DB clusters](Scenarios/AuroraScenario.cs) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create an Aurora Serverless work item tracker](../cross_service/AuroraItemTracker) +* [Create an Aurora Serverless work item tracker](../cross_service/AuroraItemTracker) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -85,8 +87,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/AutoScaling/README.md b/dotnetv3/AutoScaling/README.md index 3e33956dc62..6b084a8f06d 100644 --- a/dotnetv3/AutoScaling/README.md +++ b/dotnetv3/AutoScaling/README.md @@ -1,4 +1,4 @@ - + # Auto Scaling code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon EC2 Auto Scaling. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -55,7 +55,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Manage groups and instances](Scenarios/AutoScalingBasics/UIWrapper.cs) +* [Manage groups and instances](Scenarios/AutoScalingBasics/UIWrapper.cs) ## Run the examples diff --git a/dotnetv3/CloudWatch/README.md b/dotnetv3/CloudWatch/README.md index a06f1610cb3..6a5c9d17cf1 100644 --- a/dotnetv3/CloudWatch/README.md +++ b/dotnetv3/CloudWatch/README.md @@ -1,4 +1,4 @@ - + # CloudWatch code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon CloudWatch. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -66,18 +66,20 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with metrics, dashboards, and alarms](Scenarios/CloudWatchScenario.cs) +* [Get started with metrics, dashboards, and alarms](Scenarios/CloudWatchScenario.cs) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -85,8 +87,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/CloudWatchLogs/README.md b/dotnetv3/CloudWatchLogs/README.md index c6106dcaedc..169546d82bb 100644 --- a/dotnetv3/CloudWatchLogs/README.md +++ b/dotnetv3/CloudWatchLogs/README.md @@ -1,4 +1,4 @@ - + # CloudWatch Logs code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon CloudWatch Logs. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -48,11 +48,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -60,8 +62,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/Comprehend/README.md b/dotnetv3/Comprehend/README.md index 8ce73b2d761..c99a12282ff 100644 --- a/dotnetv3/Comprehend/README.md +++ b/dotnetv3/Comprehend/README.md @@ -1,4 +1,4 @@ - + # Amazon Comprehend code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Comprehend. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -47,11 +47,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -59,8 +61,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/EC2/README.md b/dotnetv3/EC2/README.md index 78988c3b3e8..4f2b638eeca 100644 --- a/dotnetv3/EC2/README.md +++ b/dotnetv3/EC2/README.md @@ -1,4 +1,4 @@ - + # Amazon EC2 code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Elastic Compute Cloud ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -41,11 +41,9 @@ Code excerpts that show you how to call individual service functions. * [Allocate an Elastic IP address](Actions/EC2Wrapper.cs#L19) (`AllocateAddress`) * [Associate an Elastic IP address with an instance](Actions/EC2Wrapper.cs#L33) (`AssociateAddress`) -* [Create a VPC](Actions/EC2Wrapper.cs#L162) (`CreateVpc`) * [Create a security group](Actions/EC2Wrapper.cs#L145) (`CreateSecurityGroup`) * [Create a security key pair](Actions/EC2Wrapper.cs#L98) (`CreateKeyPair`) * [Create and run an instance](Actions/EC2Wrapper.cs#L587) (`RunInstances`) -* [Delete a VPC](Actions/EC2Wrapper.cs#L236) (`DeleteVpc`) * [Delete a security group](Actions/EC2Wrapper.cs#L223) (`DeleteSecurityGroup`) * [Delete a security key pair](Actions/EC2Wrapper.cs#L190) (`DeleteKeyPair`) * [Describe instances](Actions/EC2Wrapper.cs#L316) (`DescribeInstances`) @@ -65,18 +63,20 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with instances](Scenarios/EC2_Basics/EC2Basics.cs) +* [Get started with instances](Scenarios/EC2_Basics/EC2Basics.cs) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -84,8 +84,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/ECS/README.md b/dotnetv3/ECS/README.md index ffce5651eca..3a52b922c3e 100644 --- a/dotnetv3/ECS/README.md +++ b/dotnetv3/ECS/README.md @@ -1,4 +1,4 @@ - + # Amazon ECS code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Elastic Container Serv ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -48,7 +48,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get ARN information for clusters, services, and tasks](ECSScenario/ECSScenario.cs) +* [Get ARN information for clusters, services, and tasks](ECSScenario/ECSScenario.cs) ## Run the examples diff --git a/dotnetv3/EventBridge/README.md b/dotnetv3/EventBridge/README.md index a76c74b9ea5..80d3c637e50 100644 --- a/dotnetv3/EventBridge/README.md +++ b/dotnetv3/EventBridge/README.md @@ -1,4 +1,4 @@ - + # EventBridge code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon EventBridge. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -56,18 +56,20 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with rules and targets](Scenarios/EventBridgeScenario.cs) +* [Get started with rules and targets](Scenarios/EventBridgeScenario.cs) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -75,8 +77,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/Glue/README.md b/dotnetv3/Glue/README.md index 21f91fabaa4..5a698987b17 100644 --- a/dotnetv3/Glue/README.md +++ b/dotnetv3/Glue/README.md @@ -1,4 +1,4 @@ - + # AWS Glue code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Glue. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -59,18 +59,20 @@ Code excerpts that show you how to call individual service functions. 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](Actions/GlueWrapper.cs) +* [Get started with crawlers and jobs](Actions/GlueWrapper.cs) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -78,8 +80,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. @@ -133,6 +135,7 @@ Example: + diff --git a/dotnetv3/IAM/README.md b/dotnetv3/IAM/README.md index 9c59987176a..50cf424bd74 100644 --- a/dotnetv3/IAM/README.md +++ b/dotnetv3/IAM/README.md @@ -1,4 +1,4 @@ - + # IAM code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Identity and Access Manag ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -76,19 +76,21 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a group and add a user](Scenarios/IamScenariosCommon/UIWrapper.cs) -* [Create a user and assume a role](Scenarios/IamScenariosCommon/UIWrapper.cs) +* [Create a group and add a user](Scenarios/IamScenariosCommon/UIWrapper.cs) +* [Create a user and assume a role](Scenarios/IamScenariosCommon/UIWrapper.cs) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -96,8 +98,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. To run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. diff --git a/dotnetv3/KMS/README.md b/dotnetv3/KMS/README.md index e929335e007..7abb6e2c4e7 100644 --- a/dotnetv3/KMS/README.md +++ b/dotnetv3/KMS/README.md @@ -1,4 +1,4 @@ - + # AWS KMS code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Key Management Service (A ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -49,11 +49,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -61,8 +63,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. To run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. diff --git a/dotnetv3/Keyspaces/README.md b/dotnetv3/Keyspaces/README.md index bb6ff038e5d..6e5e0a92409 100644 --- a/dotnetv3/Keyspaces/README.md +++ b/dotnetv3/Keyspaces/README.md @@ -1,4 +1,4 @@ - + # Amazon Keyspaces code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Keyspaces (for Apache ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -55,18 +55,20 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with keyspaces and tables](Scenarios/KeyspacesBasics.cs) +* [Get started with keyspaces and tables](Scenarios/KeyspacesBasics.cs) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -74,8 +76,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/Kinesis/README.md b/dotnetv3/Kinesis/README.md index 01dc402d539..e2886020ef3 100644 --- a/dotnetv3/Kinesis/README.md +++ b/dotnetv3/Kinesis/README.md @@ -1,4 +1,4 @@ - + # Kinesis code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Kinesis. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -48,11 +48,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -60,8 +62,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. To run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. diff --git a/dotnetv3/Lambda/README.md b/dotnetv3/Lambda/README.md index 87d49ec1857..8446aa58b6b 100644 --- a/dotnetv3/Lambda/README.md +++ b/dotnetv3/Lambda/README.md @@ -1,4 +1,4 @@ - + # Lambda code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Lambda. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -52,18 +52,26 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with functions](Actions/LambdaWrapper.cs) +* [Get started with functions](Actions/LambdaWrapper.cs) + +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -71,8 +79,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/MediaConvert/README.md b/dotnetv3/MediaConvert/README.md index 2767073aeec..29854808ece 100644 --- a/dotnetv3/MediaConvert/README.md +++ b/dotnetv3/MediaConvert/README.md @@ -1,4 +1,4 @@ - + # MediaConvert code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Elemental MediaConvert. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -48,11 +48,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -60,8 +62,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/Organizations/README.md b/dotnetv3/Organizations/README.md index b83f7fdcdbc..436b48ac46a 100644 --- a/dotnetv3/Organizations/README.md +++ b/dotnetv3/Organizations/README.md @@ -1,4 +1,4 @@ - + # Organizations code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Organizations. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -52,11 +52,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -64,8 +66,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/Polly/README.md b/dotnetv3/Polly/README.md index 4ce7925522e..e16b9e1bbd1 100644 --- a/dotnetv3/Polly/README.md +++ b/dotnetv3/Polly/README.md @@ -1,4 +1,4 @@ - + # Amazon Polly code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Polly. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -46,11 +46,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -58,8 +60,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/RDS/README.md b/dotnetv3/RDS/README.md index a05b16333d7..cd5339c7c41 100644 --- a/dotnetv3/RDS/README.md +++ b/dotnetv3/RDS/README.md @@ -1,4 +1,4 @@ - + # Amazon RDS code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Relational Database Se ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -57,13 +57,13 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with DB instances](Scenarios/RDSInstanceScenario/RDSInstanceScenario.cs) +* [Get started with DB instances](Scenarios/RDSInstanceScenario/RDSInstanceScenario.cs) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create an Aurora Serverless work item tracker](../cross_service/AuroraItemTracker) +* [Create an Aurora Serverless work item tracker](../cross_service/AuroraItemTracker) ## Run the examples diff --git a/dotnetv3/Rekognition/README.md b/dotnetv3/Rekognition/README.md index ddc68a4e8d6..14ce44db6ab 100644 --- a/dotnetv3/Rekognition/README.md +++ b/dotnetv3/Rekognition/README.md @@ -1,4 +1,4 @@ - + # Amazon Rekognition code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Rekognition. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -55,18 +55,21 @@ Code excerpts that show you how to call individual service functions. Sample applications that work across multiple AWS services. -* [Detect objects in images](../cross-service/PhotoAnalyzerApp) +* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) +* [Detect objects in images](../cross-service/PhotoAnalyzerApp) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -74,8 +77,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/S3/README.md b/dotnetv3/S3/README.md index 0bd25f44bcf..7d4882fdb32 100644 --- a/dotnetv3/S3/README.md +++ b/dotnetv3/S3/README.md @@ -1,4 +1,4 @@ - + # Amazon S3 code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Simple Storage Service ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -44,7 +44,7 @@ Code excerpts that show you how to call individual service functions. * [Delete an object](non-versioned-examples/DeleteObjectExample/DeleteObject.cs#L11) (`DeleteObject`) * [Delete multiple objects](S3_Basics/S3Bucket.cs#L221) (`DeleteObjects`) * [Delete the lifecycle configuration of a bucket](LifecycleExample/Lifecycle.cs#L193) (`DeleteBucketLifecycle`) -* [Enable logging](ServerAccessLoggingExample/ServerAccessLogging.cs#L14) (`PutBucketLogging`) +* [Enable logging](ServerAccessLoggingExample/ServerAccessLogging.cs#L15) (`PutBucketLogging`) * [Enable notifications](EnableNotificationsExample/EnableNotifications.cs#L11) (`PutBucketNotificationConfiguration`) * [Enable transfer acceleration](TransferAccelerationExample/TransferAcceleration.cs#L13) (`PutBucketAccelerateConfiguration`) * [Get CORS rules for a bucket](s3CORSExample/S3CORS.cs#L126) (`GetBucketCors`) @@ -54,7 +54,7 @@ Code excerpts that show you how to call individual service functions. * [Get the website configuration for a bucket](WebsiteConfigExample/WebsiteConfig.cs#L72) (`GetBucketWebsite`) * [List buckets](ListBucketsExample/ListBuckets.cs#L4) (`ListBuckets`) * [List object versions in a bucket](versioned-examples/ListObjectVersionsExample/ListObjectVersions.cs#L11) (`ListObjectVersions`) -* [List objects in a bucket](S3_Basics/S3Bucket.cs#L171) (`ListObjects`) +* [List objects in a bucket](S3_Basics/S3Bucket.cs#L171) (`ListObjectsV2`) * [Restore an archived copy of an object](RestoreArchivedObjectExample/RestoreArchivedObject.cs#L11) (`RestoreObject`) * [Set a new ACL for a bucket](BucketACLExample/BucketACL.cs#L38) (`PutBucketAcl`) * [Set the website configuration for a bucket](WebsiteConfigExample/WebsiteConfig.cs#L58) (`PutBucketWebsite`) @@ -65,30 +65,33 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a presigned URL](GenPresignedURLExample/GenPresignedUrl.cs) -* [Get started with buckets and objects](S3_Basics/S3_Basics.cs) -* [Get started with encryption](SSEClientEncryptionExample/SSEClientEncryption.cs) -* [Get started with tags](ObjectTagExample/ObjectTag.cs) -* [Manage access control lists (ACLs)](ManageACLsExample/ManageACLs.cs) -* [Perform a multipart copy](MPUapiCopyObjExample/MPUapiCopyObj.cs) -* [Upload or download large files](scenarios/TransferUtilityBasics/TransferUtilityBasics/TransferBasics.cs) +* [Create a presigned URL](GenPresignedURLExample/GenPresignedUrl.cs) +* [Get started with buckets and objects](S3_Basics/S3_Basics.cs) +* [Get started with encryption](SSEClientEncryptionExample/SSEClientEncryption.cs) +* [Get started with tags](ObjectTagExample/ObjectTag.cs) +* [Manage access control lists (ACLs)](ManageACLsExample/ManageACLs.cs) +* [Perform a multipart copy](MPUapiCopyObjExample/MPUapiCopyObj.cs) +* [Upload or download large files](scenarios/TransferUtilityBasics/TransferUtilityBasics/TransferBasics.cs) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Detect objects in images](../cross-service/PhotoAnalyzerApp) +* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) +* [Detect objects in images](../cross-service/PhotoAnalyzerApp) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -96,8 +99,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/SES/README.md b/dotnetv3/SES/README.md index 79fa032ba09..b716e965e24 100644 --- a/dotnetv3/SES/README.md +++ b/dotnetv3/SES/README.md @@ -1,4 +1,4 @@ - + # Amazon SES code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Simple Email Service ( ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -49,20 +49,22 @@ Code excerpts that show you how to call individual service functions. Sample applications that work across multiple AWS services. -* [Create a web application to track DynamoDB data](../cross_service/DynamoDbItemTracker) -* [Create an Aurora Serverless work item tracker](../cross_service/AuroraItemTracker) -* [Detect objects in images](../cross-service/PhotoAnalyzerApp) +* [Create a web application to track DynamoDB data](../cross_service/DynamoDbItemTracker) +* [Create an Aurora Serverless work item tracker](../cross_service/AuroraItemTracker) +* [Detect objects in images](../cross-service/PhotoAnalyzerApp) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -70,8 +72,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/SNS/README.md b/dotnetv3/SNS/README.md index b0f43aa02d4..baa87407286 100644 --- a/dotnetv3/SNS/README.md +++ b/dotnetv3/SNS/README.md @@ -1,4 +1,4 @@ - + # Amazon SNS code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Simple Notification Se ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -51,21 +51,14 @@ Code excerpts that show you how to call individual service functions. * [Publish to a topic](PublishToSNSTopicExample/PublishToSNSTopicExample/PublishToSNSTopic.cs#L6) (`Publish`) * [Subscribe an SQS queue to a topic](../cross-service/TopicsAndQueues/Actions/SNSActions/SNSWrapper.cs#L67) (`Subscribe`) * [Subscribe an email address to a topic](ManageTopicSubscriptionExample/ManageTopicSubscriptionExample/ManageTopicSubscription.cs#L38) (`Subscribe`) -* [Subscribe with a filter to a topic](../cross-service/TopicsAndQueues/Actions/SNSActions/SNSWrapper.cs#L94) (`Subscribe`) - -### Scenarios - -Code examples that show you how to accomplish a specific task by calling multiple -functions within the same service. - -* [Publish messages to queues](../cross-service/TopicsAndQueues) +* [Subscribe with a filter to a topic](../cross-service/TopicsAndQueues/Actions/SNSActions/SNSWrapper.cs#L67) (`Subscribe`) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Building an Amazon SNS application](../cross_service/SubscribePublishTranslate) -* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) +* [Building an Amazon SNS application](../cross_service/SubscribePublishTranslate) +* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) ## Run the examples diff --git a/dotnetv3/SQS/README.md b/dotnetv3/SQS/README.md index e27f25041fa..15bd62f17bc 100644 --- a/dotnetv3/SQS/README.md +++ b/dotnetv3/SQS/README.md @@ -1,4 +1,4 @@ - + # Amazon SQS code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Simple Queue Service ( ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -55,8 +55,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Publish messages to queues](../cross-service/TopicsAndQueues) - +* [Publish messages to queues](../cross-service/TopicsAndQueues/Scenarios/TopicsAndQueuesScenario/TopicsAndQueues.cs) ## Run the examples @@ -89,6 +88,22 @@ This example shows you how to get started using Amazon SQS. +#### Publish messages to queues + +This example shows you how to do the following: + +* Create topic (FIFO or non-FIFO). +* Subscribe several queues to the topic with an option to apply a filter. +* Publish messages to the topic. +* Poll the queues for messages received. + + + + + + + + ### Tests ⚠ Running tests might result in charges to your AWS account. diff --git a/dotnetv3/STS/README.md b/dotnetv3/STS/README.md index c0639334c61..42368a3aa5a 100644 --- a/dotnetv3/STS/README.md +++ b/dotnetv3/STS/README.md @@ -1,4 +1,4 @@ - + # AWS STS code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Security Token Service (A ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -41,11 +41,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -53,8 +55,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/SageMaker/README.md b/dotnetv3/SageMaker/README.md index c34d2a61495..a6f776c582d 100644 --- a/dotnetv3/SageMaker/README.md +++ b/dotnetv3/SageMaker/README.md @@ -1,4 +1,4 @@ - + # SageMaker code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon SageMaker. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -49,7 +49,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with geospatial jobs and pipelines](Actions/SageMakerWrapper.cs) +* [Get started with geospatial jobs and pipelines](Actions/SageMakerWrapper.cs) ## Run the examples diff --git a/dotnetv3/SecretsManager/README.md b/dotnetv3/SecretsManager/README.md index ce17e58e1e5..7bd05afffa2 100644 --- a/dotnetv3/SecretsManager/README.md +++ b/dotnetv3/SecretsManager/README.md @@ -1,4 +1,4 @@ - + # Secrets Manager code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Secrets Manager. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -41,11 +41,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -53,8 +55,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/Support/README.md b/dotnetv3/Support/README.md index c6e94fe2ee9..98af77f8170 100644 --- a/dotnetv3/Support/README.md +++ b/dotnetv3/Support/README.md @@ -1,4 +1,4 @@ - + # Support code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with AWS Support. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -61,18 +61,20 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with cases](Scenarios/SupportCaseScenario.cs) +* [Get started with cases](Scenarios/SupportCaseScenario.cs) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -80,8 +82,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/Transcribe/README.md b/dotnetv3/Transcribe/README.md index a2f87586aa2..ac29ca3997c 100644 --- a/dotnetv3/Transcribe/README.md +++ b/dotnetv3/Transcribe/README.md @@ -1,4 +1,4 @@ - + # Amazon Transcribe code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Transcribe. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -49,11 +49,13 @@ Code excerpts that show you how to call individual service functions. ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -61,8 +63,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/Translate/README.md b/dotnetv3/Translate/README.md index 363fce9941d..046a6352deb 100644 --- a/dotnetv3/Translate/README.md +++ b/dotnetv3/Translate/README.md @@ -1,4 +1,4 @@ - + # Amazon Translate code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon Translate. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -44,18 +44,20 @@ Code excerpts that show you how to call individual service functions. Sample applications that work across multiple AWS services. -* [Building an Amazon SNS application](../cross_service/SubscribePublishTranslate) +* [Building an Amazon SNS application](../cross_service/SubscribePublishTranslate) ## Run the examples ### Instructions -For general instructions to run the examples, see the [README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. +For general instructions to run the examples, see the +[README](../README.md#building-and-running-the-code-examples) in the `dotnetv3` folder. Some projects might include a settings.json file. Before compiling the project, -you can change these values to match your own account and resources. Alternatively, add a settings.local.json file with -your local settings, which will be loaded automatically when the application runs. +you can change these values to match your own account and resources. Alternatively, +add a settings.local.json file with your local settings, which will be loaded automatically +when the application runs. After the example compiles, you can run it from the command line. To do so, navigate to the folder that contains the .csproj file and run the following command: @@ -63,8 +65,8 @@ the folder that contains the .csproj file and run the following command: ``` dotnet run ``` -Alternatively, you can run the example from within your IDE. +Alternatively, you can run the example from within your IDE. diff --git a/dotnetv3/dynamodb/README.md b/dotnetv3/dynamodb/README.md index 2b7ad367e84..6452aae9965 100644 --- a/dotnetv3/dynamodb/README.md +++ b/dotnetv3/dynamodb/README.md @@ -1,4 +1,4 @@ - + # DynamoDB code examples for the SDK for .NET ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for .NET to work with Amazon DynamoDB. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -59,18 +59,18 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with tables, items, and queries](scenarios/DynamoDB_Basics/DynamoDB_Basics_Scenario/DynamoDB_Basics.cs) -* [Query a table by using batches of PartiQL statements](scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs) -* [Query a table using PartiQL](scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLMethods.cs) -* [Use a document model](mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs) -* [Use a high-level object persistence model](high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs) +* [Get started with tables, items, and queries](scenarios/DynamoDB_Basics/DynamoDB_Basics_Scenario/DynamoDB_Basics.cs) +* [Query a table by using batches of PartiQL statements](scenarios/PartiQL_Batch_Scenario/PartiQL_Batch_Scenario/PartiQLBatchMethods.cs) +* [Query a table using PartiQL](scenarios/PartiQL_Basics_Scenario/PartiQL_Basics_Scenario/PartiQLMethods.cs) +* [Use a document model](mid-level-api/MidlevelItemCRUDExample/MidlevelItemCRUDExample/MidlevelItemCRUD.cs) +* [Use a high-level object persistence model](high-level-api/HighLevelItemCRUDExample/HighLevelItemCRUDExample/HighLevelItemCRUD.cs) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create a serverless application to manage photos](../cross-service/PhotoAssetManager) -* [Create a web application to track DynamoDB data](../cross-service/DynamoDbItemTracker) +* [Create a serverless application to manage photos](dotnetv3\cross-service\PhotoAssetManager) +* [Create a web application to track DynamoDB data](../cross_service/DynamoDbItemTracker) ## Run the examples diff --git a/gov2/aurora/README.md b/gov2/aurora/README.md index fad8c0c4a3f..e791f15edcb 100644 --- a/gov2/aurora/README.md +++ b/gov2/aurora/README.md @@ -1,4 +1,4 @@ - + # Aurora code examples for the SDK for Go V2 ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon Aurora. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -60,7 +60,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with DB clusters](scenarios/get_started_clusters.go) +* [Get started with DB clusters](scenarios/get_started_clusters.go) ## Run the examples diff --git a/gov2/cloudwatch/README.md b/gov2/cloudwatch/README.md index a6c925b2474..17aa05d38aa 100644 --- a/gov2/cloudwatch/README.md +++ b/gov2/cloudwatch/README.md @@ -1,130 +1,77 @@ -# AWS SDK for Go V2 code examples for Amazon CloudWatch + +# CloudWatch code examples for the SDK for Go V2 -## Purpose +## Overview -These examples demonstrates how to perform several Amazon CloudWatch operations -using version 2 of the AWS SDK for Go. +Shows how to use the AWS SDK for Go V2 to work with Amazon CloudWatch. -## Prerequisites + + -You must have an AWS account, and have your default credentials and AWS Region -configured as described in -[Configuring the AWS SDK for Go](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) -in the AWS SDK for Go Developer Guide. +*CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes.* -## Running the code +## ⚠ Important -### CreateCustomMetric/CreateCustomMetricv2.go +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -This example creates a new Amazon CloudWatch metric in a namespace. + + -`go run CreateCustomMetricv2.go -n NAMESPACE -m METRIC-NAME -s SECONDS -dn DIMENSION-NAME -dv DIMENSION-VALUE` +## Code examples -- _NAMESPACE_ is the namespace for the metric. -- _METRIC-NAME_ is the name of the metric. -- _SECONDS_ is the number of seconds for the metric. -- _DIMENSION-NAME_ is the name of the dimension. -- _DIMENSION-VALUE_ is the value of the dimension. +### Prerequisites -The unit test accepts similar values in _config.json_. +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. -### CreateEnableMetricAlarm/CreateEnableMetricAlarmv2.go -This example enables the specified Amazon CloudWatch alarm. + + -`go run CreateEnableMetricAlarmv2.go -n INSTANCE-NAME -i INSTANCE-ID -a ALARM-NAME` +## Run the examples -- _INSTANCE-NAME_ is the name of the Amazon Elastic Compute Cloud (Amazon EC2) instance for which the alarm is enabled. -- _INSTANCE-ID_ is the ID of the Amazon EC2 instance for which the alarm is enabled. -- _ALARM-NAME_ is the name of the alarm. +### Instructions -The unit test accepts similar values in _config.json_. -### DescribeAlarms/DescribeAlarmsv2.go + + -This example displays a list of your Amazon CloudWatch alarms. -`go run DescribeAlarmsv2.go` +#### Run a scenario -### DisableAlarm/DisableAlarmv2.go +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: -This example disables an Amazon CloudWatch alarm. - -`go run DisableAlarmv2.go -a ALARM-NAME` - -- _ALARM-NAME_ is the name of the alarm to disable. - -The unit test accepts a similar value in _config.json_. - -### ListMetrics/ListMetricsv2.go - -This example displays the name, namespace, and dimension name of your Amazon CloudWatch metrics. - -`go run ListMetricsv2.go` - -### PutEvent/PutEventv2.go - -This example sends an Amazon CloudWatch event to Amazon EventBridge. - -`go run PutEventv2.go -l LAMBDA-ARN -f EVENT-FILE` - -- _LAMBDA-ARN_ is the ARN of the AWS Lambda function of which the event is concerned. -- _EVENT-FILE_ is the local file specifying details of the event to send to Amazon EventBridge. - -The unit test accepts similar values in _config.json_. - -### GetMetricData/GetMetricDatav2.go - -This example displays the metric data points for the provided input in the given time-frame. - -`go run CreateCustomMetricv2.go -mN METRIC-NAME -n NAMESPACE -dn DIMENSION-NAME -dv DIMENSION-VALUE -id ID -dM DIFFINMINUTES -s STAT -p PERIOD` - -- _NAMESPACE_ is the namespace for the metric. -- _METRIC-NAME_ is the name of the metric. -- _DIMENSION-NAME_ is the name of the dimension. -- _DIMENSION-VALUE_ is the value of the dimension. -- _ID_ is a short name used to tie the object to the results in the response -- _DIFFINMINUTES_ is the difference in minutes for which the metrics are requested -- _STAT_ is the Statistic to return i.e. SUM, COUNT, AVERAGE etc -- _PERIOD_ is the granularity, in seconds, of the returned data points +``` +go run ./cmd -h +``` -The unit test accepts similar values in _config.json_ +### Tests -### Notes +⚠ Running tests might result in charges to your AWS account. -- We recommend that you grant this code least privilege, - or at most 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) - in the AWS Identity and Access Management User Guide. -- This code has not been tested in all AWS Regions. - Some AWS services are available only in specific - [Regions](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). -- Running this code might result in charges to your AWS account. -## Running the unit tests +To find instructions for running these tests, see the [README](../README.md#Tests) +in the `gov2` folder. -Unit tests should delete any resources they create. -However, they might result in charges to your -AWS account. -To run a unit test, enter: -`go test` + + -You should see something like the following, -where PATH is the path to the folder containing the Go files: +## Additional resources -```sh -PASS -ok PATH 6.593s -``` +* [CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) +* [CloudWatch API Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) +* [SDK for Go V2 CloudWatch reference](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/cloudwatch) -If you want to see any log messages, enter: + + -`go test -v` +--- -You should see some additional log messages. -The last two lines should be similar to the previous output shown. +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/gov2/codebuild/README.md b/gov2/codebuild/README.md new file mode 100644 index 00000000000..3c821a8f4d3 --- /dev/null +++ b/gov2/codebuild/README.md @@ -0,0 +1,77 @@ + +# CodeBuild code examples for the SDK for Go V2 + +## Overview + +Shows how to use the AWS SDK for Go V2 to work with AWS CodeBuild. + + + + +*CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `gov2` folder. + + + + + +## Run the examples + +### Instructions + + + + + + +#### Run a scenario + +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: + +``` +go run ./cmd -h +``` + +### 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 `gov2` folder. + + + + + + +## Additional resources + +* [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.html) +* [CodeBuild API Reference](https://docs.aws.amazon.com/codebuild/latest/APIReference/Welcome.html) +* [SDK for Go V2 CodeBuild reference](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/codebuild) + + + + +--- + +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/gov2/dynamodb/README.md b/gov2/dynamodb/README.md index f1f44420e60..ca4ea34282a 100644 --- a/gov2/dynamodb/README.md +++ b/gov2/dynamodb/README.md @@ -1,4 +1,4 @@ - + # DynamoDB code examples for the SDK for Go V2 ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon DynamoDB. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -21,6 +21,15 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon DynamoDB. ## Code examples + +### Prerequisites + +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. + + + + + ### Single actions Code excerpts that show you how to call individual service functions. @@ -44,22 +53,12 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with tables, items, and queries](actions/table_basics.go) -* [Query a table by using batches of PartiQL statements](actions/partiql.go) -* [Query a table using PartiQL](actions/partiql.go) +* [Get started with tables, items, and queries](actions/table_basics.go) +* [Query a table by using batches of PartiQL statements](actions/partiql.go) +* [Query a table using PartiQL](actions/partiql.go) ## Run the examples -### Prerequisites - - -For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. - - - - - - ### Instructions @@ -87,6 +86,10 @@ This example shows you how to do the following: * Scan for movies that were released in a range of years. * Delete a movie from the table, then delete the table. + + + + @@ -99,6 +102,10 @@ This example shows you how to do the following: * Update a batch of items by running multiple UPDATE statements. * Delete a batch of items by running multiple DELETE statements. + + + + @@ -111,6 +118,10 @@ This example shows you how to do the following: * Update an item by running an UPDATE statement. * Delete an item by running a DELETE statement. + + + + diff --git a/gov2/ec2/README.md b/gov2/ec2/README.md new file mode 100644 index 00000000000..c7f753e659e --- /dev/null +++ b/gov2/ec2/README.md @@ -0,0 +1,77 @@ + +# Amazon EC2 code examples for the SDK for Go V2 + +## Overview + +Shows how to use the AWS SDK for Go V2 to work with Amazon Elastic Compute Cloud (Amazon EC2). + + + + +*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 + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `gov2` folder. + + + + + +## Run the examples + +### Instructions + + + + + + +#### Run a scenario + +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: + +``` +go run ./cmd -h +``` + +### 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 `gov2` folder. + + + + + + +## Additional resources + +* [Amazon EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) +* [Amazon EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html) +* [SDK for Go V2 Amazon EC2 reference](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ec2) + + + + +--- + +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/gov2/iam/README.md b/gov2/iam/README.md index 5165cab7882..1930d9ae2bc 100644 --- a/gov2/iam/README.md +++ b/gov2/iam/README.md @@ -1,4 +1,4 @@ - + # IAM code examples for the SDK for Go V2 ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Go V2 to work with AWS Identity and Access Mana ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -22,6 +22,15 @@ Shows how to use the AWS SDK for Go V2 to work with AWS Identity and Access Mana ## Code examples +### Prerequisites + +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. + + + + + + ### Get started * [Hello IAM](hello/hello.go#L4) (`ListPolicies`) @@ -63,20 +72,10 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a user and assume a role](scenarios/scenario_assume_role.go) +* [Create a user and assume a role](scenarios/scenario_assume_role.go) ## Run the examples -### Prerequisites - - -For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. - - - - - - ### Instructions @@ -109,6 +108,10 @@ This example shows you how to create a user and assume a role. * Add a policy to let the user assume the role. * Assume the role and list S3 buckets using temporary credentials, then clean up resources. + + + + diff --git a/gov2/kinesis/README.md b/gov2/kinesis/README.md index c6a51a252fc..dae4b8110ce 100644 --- a/gov2/kinesis/README.md +++ b/gov2/kinesis/README.md @@ -1,54 +1,77 @@ -# AWS SDK for Go V2 code examples for Amazon Kinesis + +# Kinesis code examples for the SDK for Go V2 -## Purpose +## Overview -These examples demonstrates how to perform several Kinesis operations -using version 2 of the AWS SDK for Go. +Shows how to use the AWS SDK for Go V2 to work with Amazon Kinesis. -## Prerequisites + + -You must have an AWS account, and have your default credentials and AWS Region -configured as described in -[Configuring the AWS SDK for Go](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) -in the AWS SDK for Go Developer Guide. +*Kinesis makes it easy to collect, process, and analyze video and data streams in real time.* -## Running the code +## ⚠ Important -### PutRecord/PutRecordv2.go +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -This example produces a new data record in the stream. + + -`go run PutRecordv2.go -s STREAM -k PARTITION-KEY -p PAYLOAD` +## Code examples -- _STREAM_ is the Kinesis stream name. -- _PARTITION-KEY_ is the partition ID. -- _PAYLOAD_ is the content to be published. +### Prerequisites -The unit test accepts similar values in _config.json_. +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. -## Running the unit tests -Unit tests should delete any resources they create. -However, they might result in charges to your -AWS account. + + -To run a unit test, enter: +## Run the examples -`go test` +### Instructions -You should see something like the following, -where PATH is the path to the folder containing the Go files: -```sh -PASS -ok PATH 6.593s + + + + +#### Run a scenario + +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: + ``` +go run ./cmd -h +``` + +### 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 `gov2` folder. + + + + + + +## Additional resources + +* [Kinesis Developer Guide](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) +* [Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/Welcome.html) +* [SDK for Go V2 Kinesis reference](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/kinesis) -If you want to see any log messages, enter: + + -`go test -v` +--- -You should see some additional log messages. -The last two lines should be similar to the previous output shown. +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/gov2/kms/README.md b/gov2/kms/README.md index 009b484db67..fd3495f1ea0 100644 --- a/gov2/kms/README.md +++ b/gov2/kms/README.md @@ -1,4 +1,4 @@ - + # AWS KMS code examples for the SDK for Go V2 ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Go V2 to work with AWS Key Management Service ( ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -21,6 +21,15 @@ Shows how to use the AWS SDK for Go V2 to work with AWS Key Management Service ( ## Code examples + +### Prerequisites + +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. + + + + + ### Single actions Code excerpts that show you how to call individual service functions. @@ -32,16 +41,6 @@ Code excerpts that show you how to call individual service functions. ## Run the examples -### Prerequisites - - -For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. - - - - - - ### Instructions @@ -49,13 +48,13 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` fo -#### Run an action +#### Run a scenario -All actions can be run at a command prompt. To get instructions for a specific -example, pass the `-h` flag. For example: +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: ``` -go run ./EncryptData -h +go run ./cmd -h ``` ### Tests diff --git a/gov2/lambda/README.md b/gov2/lambda/README.md index 019e38a653d..a5caa09a58a 100644 --- a/gov2/lambda/README.md +++ b/gov2/lambda/README.md @@ -1,4 +1,4 @@ - + # Lambda code examples for the SDK for Go V2 ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Go V2 to work with AWS Lambda. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -52,7 +52,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with functions](scenarios/scenario_get_started_functions.go) +* [Get started with functions](scenarios/scenario_get_started_functions.go) ## Run the examples @@ -92,6 +92,7 @@ This example shows you how to do the following: + diff --git a/gov2/rds/README.md b/gov2/rds/README.md index 24f80c2fd0f..2485e8c6ce7 100644 --- a/gov2/rds/README.md +++ b/gov2/rds/README.md @@ -1,4 +1,4 @@ - + # Amazon RDS code examples for the SDK for Go V2 ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon Relational Database S ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -39,25 +39,25 @@ 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 instance](actions/instances.go#L172) (`CreateDBInstance`) -* [Create a DB parameter group](actions/instances.go#L46) (`CreateDBParameterGroup`) -* [Create a snapshot of a DB instance](actions/instances.go#L135) (`CreateDBSnapshot`) -* [Delete a DB instance](actions/instances.go#L226) (`DeleteDBInstance`) -* [Delete a DB parameter group](actions/instances.go#L70) (`DeleteDBParameterGroup`) -* [Describe DB instances](actions/instances.go#L201) (`DescribeDBInstances`) -* [Describe DB parameter groups](actions/instances.go#L21) (`DescribeDBParameterGroups`) -* [Describe database engine versions](actions/instances.go#L245) (`DescribeDBEngineVersions`) -* [Describe options for DB instances](actions/instances.go#L266) (`DescribeOrderableDBInstanceOptions`) -* [Describe parameters in a DB parameter group](actions/instances.go#L88) (`DescribeDBParameters`) -* [Describe snapshots of DB instances](actions/instances.go#L154) (`DescribeDBSnapshots`) -* [Update parameters in a DB parameter group](actions/instances.go#L116) (`ModifyDBParameterGroup`) +* [Create a DB instance](actions/instances.go#L175) (`CreateDBInstance`) +* [Create a DB parameter group](actions/instances.go#L49) (`CreateDBParameterGroup`) +* [Create a snapshot of a DB instance](actions/instances.go#L138) (`CreateDBSnapshot`) +* [Delete a DB instance](actions/instances.go#L229) (`DeleteDBInstance`) +* [Delete a DB parameter group](actions/instances.go#L73) (`DeleteDBParameterGroup`) +* [Describe DB instances](actions/instances.go#L204) (`DescribeDBInstances`) +* [Describe DB parameter groups](actions/instances.go#L24) (`DescribeDBParameterGroups`) +* [Describe database engine versions](actions/instances.go#L248) (`DescribeDBEngineVersions`) +* [Describe options for DB instances](actions/instances.go#L269) (`DescribeOrderableDBInstanceOptions`) +* [Describe parameters in a DB parameter group](actions/instances.go#L91) (`DescribeDBParameters`) +* [Describe snapshots of DB instances](actions/instances.go#L157) (`DescribeDBSnapshots`) +* [Update parameters in a DB parameter group](actions/instances.go#L119) (`ModifyDBParameterGroup`) ### Scenarios Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with DB instances](scenarios/get_started_instances.go) +* [Get started with DB instances](scenarios/get_started_instances.go) ## Run the examples diff --git a/gov2/rekognition/README.md b/gov2/rekognition/README.md index c274cf88c4d..92edab11d3e 100644 --- a/gov2/rekognition/README.md +++ b/gov2/rekognition/README.md @@ -1,89 +1,77 @@ -# AWS SDK for Go V2 code examples for Amazon Rekognition + +# Amazon Rekognition code examples for the SDK for Go V2 -## Purpose +## Overview -These examples demonstrates how to perform several Amazon Rekognition -operations using version 2 of the AWS SDK for Go. +Shows how to use the AWS SDK for Go V2 to work with Amazon Rekognition. -## Prerequisites + + -You must have an AWS account, and have your default credentials and AWS Region -configured as described in -[Configuring the AWS SDK for Go V2](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/) -in the AWS SDK for Go V2 Developer Guide. +*Amazon Rekognition makes it easy to add image and video analysis to your applications.* -## Running the code +## ⚠ Important -### DetectFaces/DetectFaces.go +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -This example reads the specified image from the bucket, -runs facial recognition on the faces in the image, -and display attributes of each face, -such as position, age, emotion, and gender. + + -`go run DetectFaces.go -b BUCKET -i IMAGE` +## Code examples -- _BUCKET_ is the name of the bucket containing the image. -- _IMAGE_ is the name of the JPEG, JPG, or PNG image as the fully-qualified path in the bucket. - Other formats are not supported. +### Prerequisites -The unit test accepts similar values in _config.json_. +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. -### DetectLabels/DetectLabels.go -This example performs three tasks: + + -1. Saves the image in an Amazon Simple Storage Service (Amazon S3) bucket with an "uploads/" prefix. -1. Gets any ELIF information from the image and saves in the Amazon DynamoDB (DynamoDB) table. -1. Detects instances of real-world entities, - such as flowers, weddings, and nature, within a JPEG or PNG image, - and saves those instances as name/confidence pairs in the DynamoDB table. -1. Creates a thumbnail version of the image, no larger than 80 pixels by 80 pixels, - and saves it in the same bucket with a "thumbs/" prefix and "thumb" suffix. +## Run the examples -`go run DetectLabels.go -b BUCKET -t TABLE -f IMAGE` +### Instructions -- _BUCKET_ is the name of the bucket where the images are saved. -- _TABLE_ is the name of the bucket to which the item is copied. -- _IMAGE_ is the name of the JPG or PNG table. -The unit test accepts similar values in _config.json_. + + -### Notes -- We recommend that you grant this code least privilege, - or at most 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) - in the AWS Identity and Access Management User Guide. -- This code has not been tested in all AWS Regions. - Some AWS services are available only in specific - [Regions](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). -- Running this code might result in charges to your AWS account. +#### Run a scenario -## Running the unit tests +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: -Unit tests should delete any resources they create. -However, they might result in charges to your -AWS account. +``` +go run ./cmd -h +``` -To run a unit test, enter: +### Tests -`go test` +⚠ Running tests might result in charges to your AWS account. -You should see something like the following, -where PATH is the path to the folder containing the Go files: -```sh -PASS -ok PATH 6.593s -``` +To find instructions for running these tests, see the [README](../README.md#Tests) +in the `gov2` folder. + + + + + + +## Additional resources + +* [Amazon Rekognition Developer Guide](https://docs.aws.amazon.com/rekognition/latest/dg/what-is.html) +* [Amazon Rekognition API Reference](https://docs.aws.amazon.com/rekognition/latest/APIReference/Welcome.html) +* [SDK for Go V2 Amazon Rekognition reference](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/rekognition) -If you want to see any log messages, enter: + + -`go test -v` +--- -You should see some additional log messages. -The last two lines should be similar to the previous output shown. +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/gov2/s3/README.md b/gov2/s3/README.md index 1a35e25e53b..8c197e002ce 100644 --- a/gov2/s3/README.md +++ b/gov2/s3/README.md @@ -1,4 +1,4 @@ - + # Amazon S3 code examples for the SDK for Go V2 ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon Simple Storage Servic ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -22,6 +22,15 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon Simple Storage Servic ## Code examples +### Prerequisites + +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. + + + + + + ### Get started * [Hello Amazon S3](hello/hello.go#L4) (`ListBuckets`) @@ -37,7 +46,7 @@ Code excerpts that show you how to call individual service functions. * [Determine the existence of a bucket](actions/bucket_basics.go#L51) (`HeadBucket`) * [Get an object from a bucket](actions/bucket_basics.go#L149) (`GetObject`) * [List buckets](actions/bucket_basics.go#L35) (`ListBuckets`) -* [List objects in a bucket](actions/bucket_basics.go#L220) (`ListObjects`) +* [List objects in a bucket](actions/bucket_basics.go#L220) (`ListObjectsV2`) * [Upload an object to a bucket](actions/bucket_basics.go#L100) (`PutObject`) ### Scenarios @@ -45,22 +54,12 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a presigned URL](actions/presigner.go) -* [Get started with buckets and objects](actions/bucket_basics.go) -* [Upload or download large files](actions/bucket_basics.go) +* [Create a presigned URL](actions/presigner.go) +* [Get started with buckets and objects](actions/bucket_basics.go) +* [Upload or download large files](actions/bucket_basics.go) ## Run the examples -### Prerequisites - - -For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. - - - - - - ### Instructions @@ -89,6 +88,10 @@ go run ./cmd -h This example shows you how to create a presigned URL for Amazon S3 and upload an object. + + + + ``` go run ./cmd -scenario presigning @@ -105,6 +108,10 @@ This example shows you how to do the following: * List the objects in a bucket. * Delete the bucket objects and the bucket. + + + + ``` go run ./cmd -scenario getstarted @@ -116,6 +123,10 @@ go run ./cmd -scenario getstarted This example shows you how to upload or download large files to and from Amazon S3. + + + + Large files are included as part of the `getstarted` scenario. diff --git a/gov2/sns/README.md b/gov2/sns/README.md index 440dcf10c05..fd9df2633ad 100644 --- a/gov2/sns/README.md +++ b/gov2/sns/README.md @@ -1,4 +1,4 @@ - + # Amazon SNS code examples for the SDK for Go V2 ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon Simple Notification S ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -21,6 +21,15 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon Simple Notification S ## Code examples + +### Prerequisites + +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. + + + + + ### Single actions Code excerpts that show you how to call individual service functions. @@ -33,16 +42,6 @@ Code excerpts that show you how to call individual service functions. ## Run the examples -### Prerequisites - - -For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. - - - - - - ### Instructions @@ -50,13 +49,13 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` fo -#### Run an action +#### Run a scenario -All actions can be run at a command prompt. To get instructions for a specific -example, pass the `-h` flag. For example: +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: ``` -go run ./CreateTopic -h +go run ./cmd -h ``` ### Tests diff --git a/gov2/sqs/README.md b/gov2/sqs/README.md index 48c86daa26d..2957e79dd2d 100644 --- a/gov2/sqs/README.md +++ b/gov2/sqs/README.md @@ -1,4 +1,4 @@ - + # Amazon SQS code examples for the SDK for Go V2 ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon Simple Queue Service ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -21,6 +21,15 @@ Shows how to use the AWS SDK for Go V2 to work with Amazon Simple Queue Service ## Code examples + +### Prerequisites + +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. + + + + + ### Single actions Code excerpts that show you how to call individual service functions. @@ -36,16 +45,6 @@ Code excerpts that show you how to call individual service functions. ## Run the examples -### Prerequisites - - -For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. - - - - - - ### Instructions @@ -53,13 +52,13 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` fo -#### Run an action +#### Run a scenario -All actions can be run at a command prompt. To get instructions for a specific -example, pass the `-h` flag. For example: +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: ``` -go run ./CreateQueue -h +go run ./cmd -h ``` ### Tests diff --git a/gov2/ssm/README.md b/gov2/ssm/README.md index 4babc988eec..29f99c261b4 100644 --- a/gov2/ssm/README.md +++ b/gov2/ssm/README.md @@ -1,83 +1,77 @@ -# AWS SDK for Go V2 code examples for AWS Systems Manager + +# Systems Manager code examples for the SDK for Go V2 -## Purpose +## Overview -These examples demonstrates how to perform several AWS Systems Manager -(Systems Manager) operations using version 2 of the AWS SDK for Go. +Shows how to use the AWS SDK for Go V2 to work with AWS Systems Manager. -## Prerequisites + + -You must have an AWS account, and have your default credentials and AWS Region -configured as described in -[Configuring the AWS SDK for Go](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) -in the AWS SDK for Go Developer Guide. +*Systems Manager organizes, monitors, and automates management tasks on your AWS resources.* -## Running the code +## ⚠ Important -### DeleteParameter/DeleteParameterv2.go +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -This example deletes a Systems Manager string parameter. + + -`go run DeleteParameterv2.go -n NAME` +## Code examples -- _NAME_ is the name of the parameter to delete. +### Prerequisites -The unit test accepts a similar value in _config.json_. +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. -### GetParameter/GetParameterv2.go -This example retrieves a Systems Manager string parameter. + + -`go run GetParameterv2.go -n NAME` +## Run the examples -- _NAME_ is the name of the parameter to retrieve. +### Instructions -### PutParameter/PutParameterv2.go -This example creates a Systems Manager string parameter. + + -`go run PutParameterv2.go -n NAME -v VALUE` -- _NAME_ is the name of the parameter to create. -- _VALUE_ is the value of the parameter to create. +#### Run a scenario -The unit test accepts similar values in _config.json_. +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: -### Notes +``` +go run ./cmd -h +``` -- We recommend that you grant this code least privilege, - or at most 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) - in the AWS Identity and Access Management User Guide. -- This code has not been tested in all AWS Regions. - Some AWS services are available only in specific - [Regions](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). -- Running this code might result in charges to your AWS account. +### Tests -## Running the unit tests +⚠ Running tests might result in charges to your AWS account. -Unit tests should delete any resources they create. -However, they might result in charges to your -AWS account. -To run a unit test, enter: +To find instructions for running these tests, see the [README](../README.md#Tests) +in the `gov2` folder. -`go test` -You should see something like the following, -where PATH is the path to the folder containing the Go files: -```sh -PASS -ok PATH 6.593s -``` + + + +## Additional resources + +* [Systems Manager User Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html) +* [Systems Manager API Reference](https://docs.aws.amazon.com/systems-manager/latest/APIReference/Welcome.html) +* [SDK for Go V2 Systems Manager reference](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ssm) -If you want to see any log messages, enter: + + -`go test -v` +--- -You should see some additional log messages. -The last two lines should be similar to the previous output shown. +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/gov2/sts/README.md b/gov2/sts/README.md index 3226c149482..5758d21d058 100644 --- a/gov2/sts/README.md +++ b/gov2/sts/README.md @@ -1,65 +1,77 @@ -# AWS SDK for Go V2 code examples for AWS STS. + +# AWS STS code examples for the SDK for Go V2 -## Purpose +## Overview -These examples demonstrates how to perform several AWS Security Token Service (AWS STS) -operations using version 2 of the AWS SDK for Go. +Shows how to use the AWS SDK for Go V2 to work with AWS Security Token Service (AWS STS). -## Prerequisites + + -You must have an AWS account, and have your default credentials and AWS Region -configured as described in -[Configuring the AWS SDK for Go](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) -in the AWS SDK for Go Developer Guide. +*AWS STS creates and provides trusted users with temporary security credentials that can control access to your AWS resources.* -## Running the code +## ⚠ Important -### AssumeRole/AssumeRolev2.go +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -This example gets temporary security credentials to access resources. + + -`go run AssumeRolev2.go -r ROLE-ARN -s SESSION-NAME` +## Code examples -- _ROLE-ARN_ is the ARN of the role to assume. -- _SESSION-NAME_ is the name of the assumed role session. +### Prerequisites -The unit test accepts similar values in _config.json_. +For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` folder. -### Notes -- We recommend that you grant this code least privilege, - or at most 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) - in the AWS Identity and Access Management User Guide. -- This code has not been tested in all AWS Regions. - Some AWS services are available only in specific - [Regions](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). -- Running this code might result in charges to your AWS account. + + -## Running the unit tests +## Run the examples -Unit tests should delete any resources they create. -However, they might result in charges to your -AWS account. +### Instructions -To run a unit test, enter: -`go test` + + -You should see something like the following, -where PATH is the path to the folder containing the Go files: -```sh -PASS -ok PATH 6.593s +#### Run a scenario + +All scenarios can be run with the `cmd` runner. To get a list of scenarios +and to get help for running a scenario, use the following command: + +``` +go run ./cmd -h ``` -If you want to see any log messages, enter: +### 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 `gov2` folder. + + + + + + +## Additional resources + +* [AWS STS User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) +* [AWS STS API Reference](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) +* [SDK for Go V2 AWS STS reference](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/sts) + + + -`go test -v` +--- -You should see some additional log messages. -The last two lines should be similar to the previous output shown. +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascript/example_code/cloudwatch-events/README.md b/javascript/example_code/cloudwatch-events/README.md index c1241e1b876..18fcdb8ad4c 100644 --- a/javascript/example_code/cloudwatch-events/README.md +++ b/javascript/example_code/cloudwatch-events/README.md @@ -1,46 +1,77 @@ -# Amazon CloudWatch Events JavaScript SDK v2 code examples -## Purpose -The code examples in this directory demonstrate how to work with Amazon CloudWatch Events -using the AWS SDK for JavaScript v2. + +# CloudWatch Events code examples for the SDK for JavaScript (v2) -Amazon CloudWatch Events delivers a near real-time stream of system events that describe changes in Amazon Web Services (AWS) resources. +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon CloudWatch Events. + + + + +*CloudWatch Events send system events from AWS resources to AWS Lambda functions, Amazon Simple Notification Service topics, streams in Amazon Kinesis, and other target types.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -### API examples -- [Put CloudWatch events](./cwe_putevents.js) -- [Put CloudWatch event rule](./cwe_putrule.js) -- [Put CloudWatch event targets](./cwe_puttargets.js) - -## Important -- As an AWS best practice, grant this code least privilege, or only the - permissions required to perform a task. For more information, see - [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) - in the *AWS Identity and Access Management User Guide*. -- This code has not been tested in all AWS Regions. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) - on the AWS website. -- Running this code might result in charges to your AWS account. - -## Running the code ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html) in the - *AWS SDK for Javascript (v2) Developer Guide*. -- The AWS SDK for JavaScript (v2). For AWS SDK for JavaScript download and installation instructions, see - [Installing the AWS SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/installing-jssdk.html) in the - *AWS SDK for JavaScript (v2) Developer Guide*. -Most of these code example files can be run with very little to no modification. For example, to use Node.js -to run the `cwe_putevents.js` file, replace the hard-coded values in the file with your own values, save the file, and then run the file. For example: +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascript` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Adding a target](cwe_puttargets.js#L28) (`PutTargets`) +* [Create a scheduled rule](cwe_putrule.js#L28) (`PutRule`) +* [Send events](cwe_putevents.js#L28) (`PutEvents`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [CloudWatch Events User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/WhatIsCloudWatchEvents.html) +* [CloudWatch Events API Reference](https://docs.aws.amazon.com/eventbridge/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) CloudWatch Events reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Cloudwatch-events.html) + + + -``` -node cwe_putevents.js -``` +--- +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -## Resources - -- [AWS SDK for JavaScript v2 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/cloudwatch-examples.html) -- [AWS SDK for JavaScript v2 API Reference Guide - Amazon Cloudwatch Events ](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudWatchEvents.html) +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascript/example_code/cloudwatch-logs/README.md b/javascript/example_code/cloudwatch-logs/README.md index ff5a38f39fd..5e22eb1c861 100644 --- a/javascript/example_code/cloudwatch-logs/README.md +++ b/javascript/example_code/cloudwatch-logs/README.md @@ -1,47 +1,80 @@ -# Amazon Cloudwatch Logs JavaScript SDK v2 code examples -## Purpose -The code examples in this directory demonstrate how to work with Amazon CloudWatch Logs -using the AWS SDK for JavaScript v2. + +# CloudWatch Logs code examples for the SDK for JavaScript (v2) -You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon Elastic Compute Cloud (Amazon EC2) instances, AWS CloudTrail, Route 53, and other sources. +## Overview -## Code examples -### API examples -- [Delete a CloudWatch log subscription filters](./cwl_deletesubscriptionfilter.js) -- [Describe CloudWatch log subscription filters](./cwl_describesubscriptionfilters.js) -- [Put a CloudWatch log subscription filter](./cwl_putsubscriptionfilter.js) +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon CloudWatch Logs. + + + +*CloudWatch Logs monitor, store, and access your log files from Amazon Elastic Compute Cloud instances, AWS CloudTrail, or other sources.* -## Important +## ⚠ Important -- As an AWS best practice, grant this code least privilege, or only the - permissions required to perform a task. For more information, see - [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) - in the *AWS Identity and Access Management User Guide*. -- This code has not been tested in all AWS Regions. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) - on the AWS website. -- Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -## Running the code + + + +## Code examples ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html) in the - *AWS SDK for Javascript (v2) Developer Guide*. -- The AWS SDK for JavaScript (v2). For AWS SDK for JavaScript download and installation instructions, see - [Installing the AWS SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/installing-jssdk.html) in the - *AWS SDK for JavaScript (v2) Developer Guide*. - -Most of these code example files can be run with very little to no modification. For example, to use Node.js to run -the `cwl_deletesubscriptionfilter.rb` file, replace the hard-coded values in the file with your own values, save the file, and then run the file. For example: - -``` -node cwl_deletesubscriptionfilter.js -``` - -## Resources - -- [AWS SDK for JavaScript v2 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/cloudwatch-examples.html) -- [AWS SDK for JavaScript v2 API Reference Guide - Amazon Cloudwatch Logs ](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudWatchLogs.html) + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascript` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a log group](None) (`CreateLogGroup`) +* [Create a subscription filter](cwl_putsubscriptionfilter.js#L28) (`PutSubscriptionFilter`) +* [Delete a log group](None) (`DeleteLogGroup`) +* [Delete a subscription filter](cwl_deletesubscriptionfilter.js#L28) (`DeleteSubscriptionFilter`) +* [Describe existing subscription filters](cwl_describesubscriptionfilters.js#L28) (`DescribeSubscriptionFilters`) +* [Describe log groups](None) (`DescribeLogGroups`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) +* [CloudWatch Logs API Reference](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) CloudWatch Logs reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Cloudwatch-logs.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/javascript/example_code/cloudwatch/README.md b/javascript/example_code/cloudwatch/README.md index a42f0b77cce..43492ef6de6 100644 --- a/javascript/example_code/cloudwatch/README.md +++ b/javascript/example_code/cloudwatch/README.md @@ -1,53 +1,81 @@ -# Amazon Cloudwatch JavaScript SDK v2 code examples + +# CloudWatch code examples for the SDK for JavaScript (v2) -## Purpose -The code examples in this directory demonstrate how to work with Amazon CloudWatch -using the AWS SDK for JavaScript v2. +## Overview -Amazon CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes. -You no longer need to set up, manage, and scale your own monitoring systems and infrastructure. +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon CloudWatch. + + + + +*CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -### API examples -- [Delete CloudWatch alarms](./cw_deletealarms.js) -- [Describe CloudWatch alarms](./cw_describealarms.js) -- [Disable CloudWatch alarm actions](./cw_disablealarmactions.js) -- [Enable CloudWatch alarm actions](./cw_enablealarmactions.js) -- [List CloudWatch metrics](./cw_listmetrics.js) -- [Put CloudWatch metric alarms](./cw_putmetricalarm.js) -- [Put CloudWatch metric data](./cw_putmetricdata.js) - -## Important - -- As an AWS best practice, grant this code least privilege, or only the - permissions required to perform a task. For more information, see - [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) - in the *AWS Identity and Access Management User Guide*. -- This code has not been tested in all AWS Regions. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) - on the AWS website. -- Running this code might result in charges to your AWS account. - -## Running the code ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html) in the - *AWS SDK for Javascript (v2) Developer Guide*. -- The AWS SDK for JavaScript (v2). For AWS SDK for JavaScript download and installation instructions, see - [Installing the AWS SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/installing-jssdk.html) in the - *AWS SDK for JavaScript (v2) Developer Guide*. -Most of these code example files can be run with very little to no modification. For example, to use Node.js -to run the `cw_deletealarms.js` file, replace the hard-coded values in the file with your own values, save the file, and then run the file. For example: +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascript` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a metric alarm](cw_putmetricalarm.js#L28) (`PutMetricAlarm`) +* [Delete alarms](cw_deletealarms.js#L28) (`DeleteAlarms`) +* [Describe alarms for a metric](cw_describealarms.js#L28) (`DescribeAlarmsForMetric`) +* [Disable alarm actions](cw_disablealarmactions.js#L28) (`DisableAlarmActions`) +* [Enable alarm actions](cw_enablealarmactions.js#L28) (`EnableAlarmActions`) +* [List metrics](cw_listmetrics.js#L28) (`ListMetrics`) +* [Put data into a metric](cw_putmetricdata.js#L28) (`PutMetricData`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) +* [CloudWatch API Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) CloudWatch reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Cloudwatch.html) + + + -``` -node cw_deletealarms.js -``` +--- +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -## Resources - -- [AWS SDK for JavaScript v2 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/cloudwatch-examples.html) -- [AWS SDK for JavaScript v2 API Reference Guide - Amazon Cloudwatch](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudWatch.html) +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascript/example_code/dynamodb/README.md b/javascript/example_code/dynamodb/README.md new file mode 100644 index 00000000000..e29d8ea32e2 --- /dev/null +++ b/javascript/example_code/dynamodb/README.md @@ -0,0 +1,97 @@ + +# DynamoDB code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon DynamoDB. + + + + +*DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + + +### Get started + +* [Hello DynamoDB](None) (`ListTables`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a table](ddb_createtable.js#L28) (`CreateTable`) +* [Delete a table](ddb_deletetable.js#L28) (`DeleteTable`) +* [Delete an item from a table](ddb_deleteitem.js#L28) (`DeleteItem`) +* [Get a batch of items](ddb_batchgetitem.js#L28) (`BatchGetItem`) +* [Get an item from a table](ddb_getitem.js#L28) (`GetItem`) +* [Get information about a table](ddb_describetable.js#L28) (`DescribeTable`) +* [List tables](ddb_listtables.js#L28) (`ListTables`) +* [Put an item in a table](ddb_putitem.js#L28) (`PutItem`) +* [Query a table](ddbdoc_query.js#L28) (`Query`) +* [Run a PartiQL statement](None) (`ExecuteStatement`) +* [Run batches of PartiQL statements](None) (`BatchExecuteStatement`) +* [Scan a table](ddb_scan.js#L28) (`Scan`) +* [Update an item in a table](None) (`UpdateItem`) +* [Write a batch of items](ddb_batchwriteitem.js#L28) (`BatchWriteItem`) + +## Run the examples + +### Instructions + + + + + +#### Hello DynamoDB + +This example shows you how to get started using DynamoDB. + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) +* [DynamoDB API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) DynamoDB reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Dynamodb.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/javascript/example_code/ec2/README.md b/javascript/example_code/ec2/README.md new file mode 100644 index 00000000000..caa6ab719c3 --- /dev/null +++ b/javascript/example_code/ec2/README.md @@ -0,0 +1,106 @@ + +# Amazon EC2 code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Elastic Compute Cloud (Amazon EC2). + + + + +*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 + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + + +### Get started + +* [Hello Amazon EC2](None) (`DescribeSecurityGroups`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Allocate an Elastic IP address](None) (`AllocateAddress`) +* [Associate an Elastic IP address with an instance](None) (`AssociateAddress`) +* [Create a security group](None) (`CreateSecurityGroup`) +* [Create a security key pair](None) (`CreateKeyPair`) +* [Create and run an instance](None) (`RunInstances`) +* [Delete a security group](None) (`DeleteSecurityGroup`) +* [Delete a security key pair](None) (`DeleteKeyPair`) +* [Describe Regions](None) (`DescribeRegions`) +* [Describe instances](None) (`DescribeInstances`) +* [Disable detailed monitoring](None) (`UnmonitorInstances`) +* [Disassociate an Elastic IP address from an instance](None) (`DisassociateAddress`) +* [Enable monitoring](None) (`MonitorInstances`) +* [Get data about Amazon Machine Images](None) (`DescribeImages`) +* [Get data about a security group](None) (`DescribeSecurityGroups`) +* [Get data about instance types](None) (`DescribeInstanceTypes`) +* [Get details about Elastic IP addresses](None) (`DescribeAddresses`) +* [List security key pairs](None) (`DescribeKeyPairs`) +* [Reboot an instance](None) (`RebootInstances`) +* [Release an Elastic IP address](None) (`ReleaseAddress`) +* [Set inbound rules for a security group](None) (`AuthorizeSecurityGroupIngress`) +* [Start an instance](None) (`StartInstances`) +* [Stop an instance](None) (`StopInstances`) +* [Terminate an instance](None) (`TerminateInstances`) + +## Run the examples + +### Instructions + + + + + +#### Hello Amazon EC2 + +This example shows you how to get started using Amazon EC2. + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Amazon EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) +* [Amazon EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) Amazon EC2 reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Ec2.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/javascript/example_code/eventbridge/README.md b/javascript/example_code/eventbridge/README.md index a6cf84371fc..8cfc630e198 100644 --- a/javascript/example_code/eventbridge/README.md +++ b/javascript/example_code/eventbridge/README.md @@ -1,45 +1,77 @@ -# Amazon EventBridge JavaScript SDK v2 code examples -## Purpose -The code examples in this directory demonstrate how to work with Amazon EventBridge -using the AWS SDK for JavaScript v2. + +# EventBridge code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon EventBridge. + + + + +*EventBridge is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). + + + -Amazon EventBridge (formerly Amazon CloudWatch Events) is a serverless event bus service that you -can use to connect your applications with data from a variety of sources. ## Code examples -### API examples -- [Put EventBridge events](./eb_putevents.js) -- [Put EventBridge event rule](./eb_putrule.js) -- [Put EventBridge event targets](./eb_puttargets.js) - -## Important -- As an AWS best practice, grant this code least privilege, or only the - permissions required to perform a task. For more information, see - [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) - in the *AWS Identity and Access Management User Guide*. -- This code has not been tested in all AWS Regions. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) - on the AWS website. -- Running this code might result in charges to your AWS account. - -## Running the code ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html) in the - *AWS SDK for Javascript (v2) Developer Guide*. -- The AWS SDK for JavaScript (v2). For AWS SDK for JavaScript download and installation instructions, see - [Installing the AWS SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/installing-jssdk.html) in the - *AWS SDK for JavaScript (v2) Developer Guide*. - -Most of these code example files can be run with very little to no modification. For example, to use Node.js -to run the `eb_putevents.js` file, replace the hard-coded values in the file with your own values, save the file, and then run the file. For example: - -``` -node eb_putevents.js -``` - -## Resources - -- [AWS SDK for JavaScript v2 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/) -- [Amazon EventBridge Documentation](https://docs.aws.amazon.com/eventbridge) + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascript` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Add a target](eb_puttargets.js#L16) (`PutTargets`) +* [Create a rule](eb_putrule.js#L15) (`PutRule`) +* [Send events](eb_putevents.js#L16) (`PutEvents`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [EventBridge User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html) +* [EventBridge API Reference](https://docs.aws.amazon.com/eventbridge/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) EventBridge reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Eventbridge.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/javascript/example_code/glacier/README.md b/javascript/example_code/glacier/README.md new file mode 100644 index 00000000000..dd35b85f964 --- /dev/null +++ b/javascript/example_code/glacier/README.md @@ -0,0 +1,77 @@ + +# S3 Glacier code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon S3 Glacier. + + + + +*S3 Glacier provides durable and extremely low-cost storage for infrequently used data with security features for data archiving and backup.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a multipart upload](initiateMultipartUpload.js#L25) (`UploadMultipartPart`) +* [Create a vault](createVault.js#L25) (`CreateVault`) +* [Upload an archive to a vault](uploadArchive.js#L25) (`UploadArchive`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [S3 Glacier Developer Guide](https://docs.aws.amazon.com/amazonglacier/latest/dev/introduction.html) +* [S3 Glacier API Reference](https://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-api.html) +* [SDK for JavaScript (v2) S3 Glacier reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Glacier.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/javascript/example_code/iam/README.md b/javascript/example_code/iam/README.md new file mode 100644 index 00000000000..407f78f079a --- /dev/null +++ b/javascript/example_code/iam/README.md @@ -0,0 +1,124 @@ + +# IAM code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with AWS Identity and Access Management (IAM). + + + + +*IAM is a web service for securely controlling access to AWS services. With IAM, you can centrally manage permissions in your AWS account.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + + +### Get started + +* [Hello IAM](None) (`ListPolicies`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Attach a policy to a role](iam_attachrolepolicy.js#L29) (`AttachRolePolicy`) +* [Attach an inline policy to a role](None) (`PutRolePolicy`) +* [Create a SAML provider](None) (`CreateSAMLProvider`) +* [Create a group](None) (`CreateGroup`) +* [Create a policy](iam_createpolicy.js#L29) (`CreatePolicy`) +* [Create a role](None) (`CreateRole`) +* [Create a service-linked role](None) (`CreateServiceLinkedRole`) +* [Create a user](iam_createuser.js#L29) (`CreateUser`) +* [Create an access key](iam_createaccesskeys.js#L29) (`CreateAccessKey`) +* [Create an alias for an account](iam_createaccountalias.js#L29) (`CreateAccountAlias`) +* [Delete SAML provider](None) (`DeleteSAMLProvider`) +* [Delete a group](None) (`DeleteGroup`) +* [Delete a policy](None) (`DeletePolicy`) +* [Delete a role](None) (`DeleteRole`) +* [Delete a role policy](None) (`DeleteRolePolicy`) +* [Delete a server certificate](iam_deleteservercert.js#L29) (`DeleteServerCertificate`) +* [Delete a service-linked role](None) (`DeleteServiceLinkedRole`) +* [Delete a user](iam_deleteuser.js#L29) (`DeleteUser`) +* [Delete an access key](iam_deleteaccesskey.js#L29) (`DeleteAccessKey`) +* [Delete an account alias](iam_deleteaccountalias.js#L29) (`DeleteAccountAlias`) +* [Detach a policy from a role](iam_detachrolepolicy.js#L29) (`DetachRolePolicy`) +* [Get a policy](iam_getpolicy.js#L29) (`GetPolicy`) +* [Get a role](None) (`GetRole`) +* [Get a server certificate](iam_getservercert.js#L29) (`GetServerCertificate`) +* [Get a service-linked role's deletion status](None) (`GetServiceLinkedRoleDeletionStatus`) +* [Get data about the last use of an access key](iam_accesskeylastused.js#L29) (`GetAccessKeyLastUsed`) +* [Get the account password policy](None) (`GetAccountPasswordPolicy`) +* [List SAML providers](None) (`ListSAMLProviders`) +* [List a user's access keys](iam_listaccesskeys.js#L29) (`ListAccessKeys`) +* [List account aliases](iam_listaccountaliases.js#L29) (`ListAccountAliases`) +* [List groups](None) (`ListGroups`) +* [List inline policies for a role](None) (`ListRolePolicies`) +* [List policies](None) (`ListPolicies`) +* [List policies attached to a role](None) (`ListAttachedRolePolicies`) +* [List roles](None) (`ListRoles`) +* [List server certificates](iam_listservercerts.js#L29) (`ListServerCertificates`) +* [List users](iam_listusers.js#L29) (`ListUsers`) +* [Update a server certificate](iam_updateservercert.js#L29) (`UpdateServerCertificate`) +* [Update a user](iam_updateuser.js#L29) (`UpdateUser`) +* [Update an access key](iam_updateaccesskey.js#L29) (`UpdateAccessKey`) +* [Upload a server certificate](None) (`UploadServerCertificate`) + +## Run the examples + +### Instructions + + + + + +#### Hello IAM + +This example shows you how to get started using IAM. + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) +* [IAM API Reference](https://docs.aws.amazon.com/IAM/latest/APIReference/welcome.html) +* [SDK for JavaScript (v2) IAM reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Iam.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/javascript/example_code/kinesis/README.md b/javascript/example_code/kinesis/README.md new file mode 100644 index 00000000000..65a139752d6 --- /dev/null +++ b/javascript/example_code/kinesis/README.md @@ -0,0 +1,69 @@ + +# Kinesis code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Kinesis. + + + + +*Kinesis makes it easy to collect, process, and analyze video and data streams in real time.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Kinesis Developer Guide](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) +* [Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) Kinesis reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Kinesis.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/javascript/example_code/lambda/README.md b/javascript/example_code/lambda/README.md new file mode 100644 index 00000000000..a7402895b22 --- /dev/null +++ b/javascript/example_code/lambda/README.md @@ -0,0 +1,90 @@ + +# Lambda code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with AWS Lambda. + + + + +*Lambda allows you to run code without provisioning or managing servers.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + + +### Get started + +* [Hello Lambda](None) (`ListFunctions`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a function](None) (`CreateFunction`) +* [Delete a function](None) (`DeleteFunction`) +* [Get a function](None) (`GetFunction`) +* [Invoke a function](None) (`Invoke`) +* [List functions](None) (`ListFunctions`) +* [Update function code](None) (`UpdateFunctionCode`) +* [Update function configuration](None) (`UpdateFunctionConfiguration`) + +## Run the examples + +### Instructions + + + + + +#### Hello Lambda + +This example shows you how to get started using Lambda. + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) +* [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) +* [SDK for JavaScript (v2) Lambda reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Lambda.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/javascript/example_code/mediaconvert/README.md b/javascript/example_code/mediaconvert/README.md new file mode 100644 index 00000000000..744946a7275 --- /dev/null +++ b/javascript/example_code/mediaconvert/README.md @@ -0,0 +1,69 @@ + +# MediaConvert code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with AWS Elemental MediaConvert. + + + + +*MediaConvert is a service that formats and compresses offline video content for delivery to televisions or connected devices.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [MediaConvert User Guide](https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html) +* [MediaConvert API Reference](https://docs.aws.amazon.com/mediaconvert/latest/apireference/custom-endpoints.html) +* [SDK for JavaScript (v2) MediaConvert reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Mediaconvert.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/javascript/example_code/pinpoint-sms-voice/README.md b/javascript/example_code/pinpoint-sms-voice/README.md index 469e51c81fe..5168e35f804 100644 --- a/javascript/example_code/pinpoint-sms-voice/README.md +++ b/javascript/example_code/pinpoint-sms-voice/README.md @@ -1,41 +1,75 @@ -# Amazon Pinpoint SMS and Voice API JavaScript SDK v2 code examples -## Purpose -This is a workspace where you can find examples for the Amazon Pinpoint SMS and Voice API using AWS SDK for JavaScript version 2 (v2). + +# Amazon Pinpoint SMS and Voice code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Pinpoint SMS and Voice. + + + + +*Amazon Pinpoint SMS and Voice helps you engage your customers by sending them email, SMS and voice messages, and push notifications.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). + + + -Amazon Pinpoint is a flexible and scalable outbound and inbound marketing communications service. You can connect with customers over channels like email, SMS, push, or voice. ## Code examples -### API examples -- [Send a voice message](./pinpoint_send_voice_message_sms_voice_api.js) - -## Important -- As an AWS best practice, grant this code least privilege, or only the - permissions required to perform a task. For more information, see - [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) - in the *AWS Identity and Access Management User Guide*. -- This code has not been tested in all AWS Regions. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) - on the AWS website. -- Running this code might result in charges to your AWS account. - -## Running the code ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html) in the - *AWS SDK for Javascript (v2) Developer Guide*. -- The AWS SDK for JavaScript (v2). For AWS SDK for JavaScript download and installation instructions, see - [Installing the AWS SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/installing-jssdk.html) in the - *AWS SDK for JavaScript (v2) Developer Guide*. - -Most of these code example files can be run with very little to no modification. For example, to use Node.js -to run the `pinpoint_send_voice_message_sms_voice_api.js` file, replace the hard-coded values in the file with your own values, save the file, and then run the file. For example: - -``` -node pinpoint_send_voice_message_sms_voice_api.js -``` - -## Resources - -- [AWS SDK for JavaScript v2 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/) -- [Amazon Pinpoint Documentation](https://docs.aws.amazon.com/pinpoint/) + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascript` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Send a voice message with Amazon Pinpoint SMS and Voice](pinpoint_send_voice_message_sms_voice_api.js#L25) (`SendVoiceMessage`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Amazon Pinpoint SMS and Voice Developer Guide](https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html) +* [Amazon Pinpoint SMS and Voice API Reference](https://docs.aws.amazon.com/pinpoint-sms-voice/latest/APIReference/welcome.html) +* [SDK for JavaScript (v2) Amazon Pinpoint SMS and Voice reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Pinpoint-sms-voice.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/javascript/example_code/pinpoint/README.md b/javascript/example_code/pinpoint/README.md index ddfd4e9d578..b44ec684898 100644 --- a/javascript/example_code/pinpoint/README.md +++ b/javascript/example_code/pinpoint/README.md @@ -1,43 +1,75 @@ -# Amazon Pinpoint JavaScript SDK v2 code examples -## Purpose -This is a workspace where you can find examples for the Amazon Pinpoint API using AWS SDK for JavaScript version 2 (v2). + +# Amazon Pinpoint code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Pinpoint. + + + + +*Amazon Pinpoint helps you engage your customers by sending them email, SMS and voice messages, and push notifications.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). + + + -Amazon Pinpoint is a flexible and scalable outbound and inbound marketing communications service. You can connect with customers over channels like email, SMS, push, or voice. ## Code examples -### API examples -- [Send an email](./pinpoint_send_email_message_api.js) -- [Send an email using the Amazon Pinpoint SMTP interface](./pinpoint_send_email_smtp.js) -- [Send a text message](./pinpoint_send_sms_message_api.js) - -## Important -- As an AWS best practice, grant this code least privilege, or only the - permissions required to perform a task. For more information, see - [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) - in the *AWS Identity and Access Management User Guide*. -- This code has not been tested in all AWS Regions. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) - on the AWS website. -- Running this code might result in charges to your AWS account. - -## Running the code ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html) in the - *AWS SDK for Javascript (v2) Developer Guide*. -- The AWS SDK for JavaScript (v2). For AWS SDK for JavaScript download and installation instructions, see - [Installing the AWS SDK for JavaScript](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/installing-jssdk.html) in the - *AWS SDK for JavaScript (v2) Developer Guide*. - -Most of these code example files can be run with very little to no modification. For example, to use Node.js -to run the `pinpoint_send_email_message_api.js` file, replace the hard-coded values in the file with your own values, save the file, and then run the file. For example: - -``` -node pinpoint_send_email_message_api.js -``` - -## Resources - -- [AWS SDK for JavaScript v2 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/) -- [Amazon Pinpoint Documentation](https://docs.aws.amazon.com/pinpoint/) + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascript` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Send email and text messages](pinpoint_send_email_message_api.js#L25) (`SendMessages`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Amazon Pinpoint Developer Guide](https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html) +* [Amazon Pinpoint API Reference](https://docs.aws.amazon.com/pinpoint/latest/apireference/welcome.html) +* [SDK for JavaScript (v2) Amazon Pinpoint reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Pinpoint.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/javascript/example_code/rekognition/README.md b/javascript/example_code/rekognition/README.md new file mode 100644 index 00000000000..0df1fdfcee7 --- /dev/null +++ b/javascript/example_code/rekognition/README.md @@ -0,0 +1,69 @@ + +# Amazon Rekognition code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Rekognition. + + + + +*Amazon Rekognition makes it easy to add image and video analysis to your applications.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Amazon Rekognition Developer Guide](https://docs.aws.amazon.com/rekognition/latest/dg/what-is.html) +* [Amazon Rekognition API Reference](https://docs.aws.amazon.com/rekognition/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) Amazon Rekognition reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Rekognition.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/javascript/example_code/s3/README.md b/javascript/example_code/s3/README.md new file mode 100644 index 00000000000..16bb74dec1c --- /dev/null +++ b/javascript/example_code/s3/README.md @@ -0,0 +1,102 @@ + +# Amazon S3 code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Simple Storage Service (Amazon S3). + + + + +*Amazon S3 is storage for the internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + + +### Get started + +* [Hello Amazon S3](None) (`ListBuckets`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Add CORS rules to a bucket](None) (`PutBucketCors`) +* [Add a policy to a bucket](None) (`PutBucketPolicy`) +* [Copy an object from one bucket to another](None) (`CopyObject`) +* [Create a bucket](None) (`CreateBucket`) +* [Delete a policy from a bucket](None) (`DeleteBucketPolicy`) +* [Delete an empty bucket](None) (`DeleteBucket`) +* [Delete an object](None) (`DeleteObject`) +* [Delete multiple objects](None) (`DeleteObjects`) +* [Delete the website configuration from a bucket](None) (`DeleteBucketWebsite`) +* [Get CORS rules for a bucket](None) (`GetBucketCors`) +* [Get an object from a bucket](None) (`GetObject`) +* [Get the ACL of a bucket](None) (`GetBucketAcl`) +* [Get the policy for a bucket](None) (`GetBucketPolicy`) +* [Get the website configuration for a bucket](None) (`GetBucketWebsite`) +* [List buckets](None) (`ListBuckets`) +* [List objects in a bucket](None) (`ListObjectsV2`) +* [Set a new ACL for a bucket](None) (`PutBucketAcl`) +* [Set the website configuration for a bucket](None) (`PutBucketWebsite`) +* [Upload an object to a bucket](None) (`PutObject`) + +## Run the examples + +### Instructions + + + + + +#### Hello Amazon S3 + +This example shows you how to get started using Amazon S3. + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) +* [Amazon S3 API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html) +* [SDK for JavaScript (v2) Amazon S3 reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.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/javascript/example_code/ses/README.md b/javascript/example_code/ses/README.md new file mode 100644 index 00000000000..2bbbc1ee7a2 --- /dev/null +++ b/javascript/example_code/ses/README.md @@ -0,0 +1,94 @@ + +# Amazon SES code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Simple Email Service (Amazon SES). + + + + +*Amazon SES is a reliable, scalable, and cost-effective email service.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a receipt filter](None) (`CreateReceiptFilter`) +* [Create a receipt rule](None) (`CreateReceiptRule`) +* [Create a receipt rule set](None) (`CreateReceiptRuleSet`) +* [Create an email template](None) (`CreateTemplate`) +* [Delete a receipt filter](None) (`DeleteReceiptFilter`) +* [Delete a receipt rule](None) (`DeleteReceiptRule`) +* [Delete a rule set](None) (`DeleteReceiptRuleSet`) +* [Delete an email template](None) (`DeleteTemplate`) +* [Delete an identity](None) (`DeleteIdentity`) +* [Get an existing email template](None) (`GetTemplate`) +* [List email templates](None) (`ListTemplates`) +* [List identities](None) (`ListIdentities`) +* [List receipt filters](None) (`ListReceiptFilters`) +* [Send bulk templated email](None) (`SendBulkTemplatedEmail`) +* [Send email](None) (`SendEmail`) +* [Send raw email](None) (`SendRawEmail`) +* [Send templated email](None) (`SendTemplatedEmail`) +* [Update an email template](None) (`UpdateTemplate`) +* [Verify a domain identity](None) (`VerifyDomainIdentity`) +* [Verify an email identity](None) (`VerifyEmailIdentity`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Amazon SES Developer Guide](https://docs.aws.amazon.com/ses/latest/dg/Welcome.html) +* [Amazon SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) Amazon SES reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Ses.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/javascript/example_code/sns/README.md b/javascript/example_code/sns/README.md new file mode 100644 index 00000000000..f6b324feff9 --- /dev/null +++ b/javascript/example_code/sns/README.md @@ -0,0 +1,100 @@ + +# Amazon SNS code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Simple Notification Service (Amazon SNS). + + + + +*Amazon SNS is a web service that enables applications, end-users, and devices to instantly send and receive notifications from the cloud.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + + +### Get started + +* [Hello Amazon SNS](None) (`ListTopics`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Check whether a phone number is opted out](None) (`CheckIfPhoneNumberIsOptedOut`) +* [Confirm an endpoint owner wants to receive messages](None) (`ConfirmSubscription`) +* [Create a topic](None) (`CreateTopic`) +* [Delete a subscription](None) (`Unsubscribe`) +* [Delete a topic](None) (`DeleteTopic`) +* [Get the properties of a topic](sns_gettopicattributes.js#L28) (`GetTopicAttributes`) +* [Get the settings for sending SMS messages](None) (`GetSMSAttributes`) +* [List the subscribers of a topic](None) (`ListSubscriptions`) +* [List topics](None) (`ListTopics`) +* [Publish to a topic](None) (`Publish`) +* [Set the default settings for sending SMS messages](None) (`SetSMSAttributes`) +* [Set topic attributes](None) (`SetTopicAttributes`) +* [Subscribe a Lambda function to a topic](None) (`Subscribe`) +* [Subscribe a mobile application to a topic](None) (`Subscribe`) +* [Subscribe an SQS queue to a topic](None) (`Subscribe`) +* [Subscribe an email address to a topic](None) (`Subscribe`) +* [Subscribe with a filter to a topic](None) (`Subscribe`) + +## Run the examples + +### Instructions + + + + + +#### Hello Amazon SNS + +This example shows you how to get started using Amazon SNS. + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Amazon SNS Developer Guide](https://docs.aws.amazon.com/sns/latest/dg/welcome.html) +* [Amazon SNS API Reference](https://docs.aws.amazon.com/sns/latest/api/welcome.html) +* [SDK for JavaScript (v2) Amazon SNS reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Sns.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/javascript/example_code/sqs/README.md b/javascript/example_code/sqs/README.md new file mode 100644 index 00000000000..0ed1b11bd3e --- /dev/null +++ b/javascript/example_code/sqs/README.md @@ -0,0 +1,95 @@ + +# Amazon SQS code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Simple Queue Service (Amazon SQS). + + + + +*Amazon SQS is a fully managed message queuing service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + + +### Get started + +* [Hello Amazon SQS](None) (`ListQueues`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Change message timeout visibility](sqs_changingvisibility.js#L28) (`ChangeMessageVisibility`) +* [Configure a dead-letter queue](None) (`SetQueueAttributes`) +* [Create a queue](sqs_createqueue.js#L28) (`CreateQueue`) +* [Delete a batch of messages from a queue](None) (`DeleteMessageBatch`) +* [Delete a message from a queue](sqs_receivemessage.js#L28) (`DeleteMessage`) +* [Delete a queue](sqs_deletequeue.js#L29) (`DeleteQueue`) +* [Get attributes for a queue](None) (`GetQueueAttributes`) +* [Get the URL of a queue](sqs_getqueueurl.js#L28) (`GetQueueUrl`) +* [List queues](sqs_listqueues.js#L28) (`ListQueues`) +* [Receive messages from a queue](sqs_longpolling_receivemessage.js#L28) (`ReceiveMessage`) +* [Send a message to a queue](sqs_sendmessage.js#L28) (`SendMessage`) +* [Set queue attributes](None) (`SetQueueAttributes`) + +## Run the examples + +### Instructions + + + + + +#### Hello Amazon SQS + +This example shows you how to get started using Amazon SQS. + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Amazon SQS Developer Guide](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html) +* [Amazon SQS API Reference](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v2) Amazon SQS reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Sqs.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/javascript/example_code/sts/README.md b/javascript/example_code/sts/README.md new file mode 100644 index 00000000000..3c56288ab0f --- /dev/null +++ b/javascript/example_code/sts/README.md @@ -0,0 +1,75 @@ + +# AWS STS code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with AWS Security Token Service (AWS STS). + + + + +*AWS STS creates and provides trusted users with temporary security credentials that can control access to your AWS resources.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Assume a role](sts_assumerole.js#L19) (`AssumeRole`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [AWS STS User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) +* [AWS STS API Reference](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) +* [SDK for JavaScript (v2) AWS STS reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Sts.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/javascript/example_code/textract/README.md b/javascript/example_code/textract/README.md new file mode 100644 index 00000000000..d08f174dfc9 --- /dev/null +++ b/javascript/example_code/textract/README.md @@ -0,0 +1,69 @@ + +# Amazon Textract code examples for the SDK for JavaScript (v2) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v2) to work with Amazon Textract. + + + + +*Amazon Textract enables you to add document text detection and analysis to your applications.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascript` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `javascript` folder. + + + + + + +## Additional resources + +* [Amazon Textract Developer Guide](https://docs.aws.amazon.com/textract/latest/dg/what-is.html) +* [Amazon Textract API Reference](https://docs.aws.amazon.com/textract/latest/dg/API_Reference.html) +* [SDK for JavaScript (v2) Amazon Textract reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Textract.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/javascriptv3/example_code/cloudwatch-events/README.md b/javascriptv3/example_code/cloudwatch-events/README.md index 73c503037e1..14b8433b528 100644 --- a/javascriptv3/example_code/cloudwatch-events/README.md +++ b/javascriptv3/example_code/cloudwatch-events/README.md @@ -1,61 +1,91 @@ -# CloudWatch Events code examples for the SDK for JavaScript in Node.js + +# CloudWatch Events code examples for the SDK for JavaScript (v3) ## Overview -The code examples in this directory demonstrate how to work with Amazon CloudWatch Events -using the AWS SDK for JavaScript (v3). +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon CloudWatch Events. -Amazon CloudWatch Events delivers a near real-time stream of system events that describe -changes in Amazon Web Services (AWS) resources. + + -## ⚠️ Important +*CloudWatch Events send system events from AWS resources to AWS Lambda functions, Amazon Simple Notification Service topics, streams in Amazon Kinesis, and other target types.* -- Running this code might result in charges to your AWS account. -- 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). +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascriptv3` folder. + + + + + ### Single actions Code excerpts that show you how to call individual service functions. -- [Add an AWS Lambda function target](actions/put-targets.js)(PutTargets) -- [Create a scheduled rule](actions/put-rule.js)(PutRule) -- [Send events](actions/put-events.js)(PutEvents) +* [Adding a target](libs/client.js#L6) (`PutTargets`) +* [Create a scheduled rule](libs/client.js#L6) (`PutRule`) +* [Send events](libs/client.js#L6) (`PutEvents`) ## Run the examples +### Instructions + **Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see [JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). -### Prerequisites +**Run a single action** -- [Set up AWS SDK for JavaScript](../README.rst) -- Run `npm i` to install dependencies. +```bash +node ./actions/ +``` -## Instructions +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ +``` -**Run a single action** + + + + + +### Tests -1. Run `node ./actions/`. - OR -1. Import `./actions/fileName` into another module. +⚠ Running tests might result in charges to your AWS account. -## Tests -⚠️ Running the tests might result in charges to your AWS account. +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `javascriptv3` folder. -### Integration tests -1. Run `npm i`. -1. Run `npm run integration-test`. + + + ## Additional resources -- [Amazon CloudWatch Events User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/WhatIsCloudWatchEvents.html) -- [Amazon CloudWatch Logs API Reference](https://docs.aws.amazon.com/eventbridge/latest/APIReference/Welcome.html) -- [CloudWatch Events Client - AWS SDK for JavaScript (v3)](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-events/index.html) +* [CloudWatch Events User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/WhatIsCloudWatchEvents.html) +* [CloudWatch Events API Reference](https://docs.aws.amazon.com/eventbridge/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v3) CloudWatch Events reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-events) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascriptv3/example_code/cloudwatch-logs/README.md b/javascriptv3/example_code/cloudwatch-logs/README.md index 7ea51e19544..c9f49409485 100644 --- a/javascriptv3/example_code/cloudwatch-logs/README.md +++ b/javascriptv3/example_code/cloudwatch-logs/README.md @@ -1,68 +1,94 @@ -# CloudWatch Logs code examples for the SDK for JavaScript in Node.js + +# CloudWatch Logs code examples for the SDK for JavaScript (v3) ## Overview -The code examples in this directory demonstrate how to work with Amazon CloudWatch Logs -using the AWS SDK for JavaScript (v3). +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon CloudWatch Logs. -You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon Elastic Compute Cloud (Amazon EC2) instances, AWS CloudTrail, Route 53, and other sources. + + -## ⚠️ Important +*CloudWatch Logs monitor, store, and access your log files from Amazon Elastic Compute Cloud instances, AWS CloudTrail, or other sources.* -- Running this code might result in charges to your AWS account. -- 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). +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascriptv3` folder. + + + + + ### Single actions Code excerpts that show you how to call individual service functions. -- [Create a log group](actions/create-log-group.js) -- [Create a subscription filter](actions/put-subscription-filter.js) -- [Delete a log group](actions/delete-log-group.js) -- [Delete a subscription filter](actions/delete-subscription-filter.js) -- [Describe log groups](actions/describe-log-groups.js) -- [Describe existing subscription filters](actions/describe-subscription-filters.js) +* [Create a log group](actions/create-log-group.js#L6) (`CreateLogGroup`) +* [Create a subscription filter](actions/put-subscription-filter.js#L6) (`PutSubscriptionFilter`) +* [Delete a log group](actions/delete-log-group.js#L6) (`DeleteLogGroup`) +* [Delete a subscription filter](actions/delete-subscription-filter.js#L6) (`DeleteSubscriptionFilter`) +* [Describe existing subscription filters](actions/describe-subscription-filters.js#L6) (`DescribeSubscriptionFilters`) +* [Describe log groups](actions/describe-log-groups.js#L8) (`DescribeLogGroups`) ## Run the examples +### Instructions + **Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see [JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). -### Prerequisites +**Run a single action** -- [Set up AWS SDK for JavaScript](../README.rst) -- Run `yarn` to install dependencies. +```bash +node ./actions/ +``` -## Instructions +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ +``` + + + -**Run a single action** -1. Run `node ./actions/`. - OR -1. Import `./actions/fileName` into another module. -## Tests +### Tests -⚠️ Running the tests might result in charges to your AWS account. +⚠ Running tests might result in charges to your AWS account. -### Unit tests -1. Run `yarn`. -1. Run `yarn test`. +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `javascriptv3` folder. -### Integration tests -1. Run `yarn`. -1. Run `yarn integration-test`. + + + ## Additional resources -- [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) -- [Amazon CloudWatch Logs API Reference](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/Welcome.html) -- [CloudWatch Logs Client - AWS SDK for JavaScript (v3)](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/index.html) +* [CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html) +* [CloudWatch Logs API Reference](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v3) CloudWatch Logs reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascriptv3/example_code/cloudwatch/README.md b/javascriptv3/example_code/cloudwatch/README.md index b8683b4d24f..23f0a658dcf 100644 --- a/javascriptv3/example_code/cloudwatch/README.md +++ b/javascriptv3/example_code/cloudwatch/README.md @@ -1,60 +1,95 @@ -# Cloudwatch examples for the AWS SDK for JavaScript (v3) + +# CloudWatch code examples for the SDK for JavaScript (v3) ## Overview -These code examples demonstrate how to work with Amazon CloudWatch -using the AWS SDK for JavaScript (v3). +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon CloudWatch. -Amazon CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes. -You no longer need to set up, manage, and scale your own monitoring systems and infrastructure. + + -## ⚠️ Important +*CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes.* -- Running this code might result in charges to your AWS account. -- 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). +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -### Single Actions +### Prerequisites -- [Create an alarm that watches a metric](actions/put-metric-alarm.js) -- [Delete alarms](actions/delete-alarms.js) -- [Describe alarms for a metric](actions/describe-alarms.js) -- [Disable alarm actions](actions/disable-alarm-actions.js) -- [Enable alarm actions](actions/enable-alarm-actions.js) -- [List metrics](actions/list-metrics.js) -- [Put data into a metric](actions/put-metric-data.js) +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). -## Run the examples + + -### Prerequisites +### Single actions -1. [Set up AWS SDK for JavaScript](../README.md). -1. Run `npm i`. +Code excerpts that show you how to call individual service functions. + +* [Create a metric alarm](libs/client.js#L6) (`PutMetricAlarm`) +* [Delete alarms](libs/client.js#L6) (`DeleteAlarms`) +* [Describe alarms for a metric](libs/client.js#L6) (`DescribeAlarmsForMetric`) +* [Disable alarm actions](libs/client.js#L6) (`DisableAlarmActions`) +* [Enable alarm actions](libs/client.js#L6) (`EnableAlarmActions`) +* [List metrics](libs/client.js#L6) (`ListMetrics`) +* [Put data into a metric](libs/client.js#L6) (`PutMetricData`) + +## Run the examples ### Instructions +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + **Run a single action** -1. Run `node ./actions/`. -OR -1. Import `./actions/fileName` into another module. -## Tests +```bash +node ./actions/ +``` -⚠️ Running the tests might result in charges to your AWS account. +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ +``` -1. Run `npm i`. -1. Run `npm run integration-test`. + + + + + +### 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 `javascriptv3` folder. + + + + + ## Additional resources -- [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) -- [Amazon CloudWatch API reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) -- [Amazon CloudWatch Client - AWS SDK for JavaScript (v3)](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch/index.html) +* [CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) +* [CloudWatch API Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v3) CloudWatch reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascriptv3/example_code/codebuild/README.md b/javascriptv3/example_code/codebuild/README.md index ebbd1e9e088..7489e899fb7 100644 --- a/javascriptv3/example_code/codebuild/README.md +++ b/javascriptv3/example_code/codebuild/README.md @@ -1,4 +1,4 @@ - + # CodeBuild code examples for the SDK for JavaScript (v3) ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with AWS CodeBuild. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javascriptv3/example_code/dynamodb/README.md b/javascriptv3/example_code/dynamodb/README.md index 8aa9ce4303c..381a9c6b557 100644 --- a/javascriptv3/example_code/dynamodb/README.md +++ b/javascriptv3/example_code/dynamodb/README.md @@ -1,4 +1,4 @@ - + # DynamoDB code examples for the SDK for JavaScript (v3) ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon DynamoDB. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -30,6 +30,11 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas + +### Get started + +* [Hello DynamoDB](hello.js#L8) (`ListTables`) + ### Single actions Code excerpts that show you how to call individual service functions. @@ -54,9 +59,9 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with tables, items, and queries](scenarios/basic.js) -* [Query a table by using batches of PartiQL statements](scenarios/partiql-batch.js) -* [Query a table using PartiQL](scenarios/partiql-single.js) +* [Get started with tables, items, and queries](scenarios/basic.js) +* [Query a table by using batches of PartiQL statements](scenarios/partiql-batch.js) +* [Query a table using PartiQL](scenarios/partiql-single.js) ## Run the examples @@ -80,6 +85,13 @@ node ./scenarios/ +#### Hello DynamoDB + +This example shows you how to get started using DynamoDB. + +```bash +node ./hello.js +``` #### Get started with tables, items, and queries @@ -96,6 +108,7 @@ This example shows you how to do the following: + @@ -111,6 +124,7 @@ This example shows you how to do the following: + @@ -126,6 +140,7 @@ This example shows you how to do the following: + diff --git a/javascriptv3/example_code/ec2/README.md b/javascriptv3/example_code/ec2/README.md index 5cfad153364..6ce4e56b547 100644 --- a/javascriptv3/example_code/ec2/README.md +++ b/javascriptv3/example_code/ec2/README.md @@ -1,9 +1,9 @@ - -# Amazon EC2 code examples for the SDK for JavaScript V3 + +# Amazon EC2 code examples for the SDK for JavaScript (v3) ## Overview -Shows how to use the AWS SDK for JavaScript V3 to work with Amazon Elastic Compute Cloud (Amazon EC2). +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Elastic Compute Cloud (Amazon EC2). @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for JavaScript V3 to work with Amazon Elastic Compu ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -22,6 +22,15 @@ Shows how to use the AWS SDK for JavaScript V3 to work with Amazon Elastic Compu ## Code examples +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. + + + + + + ### Get started * [Hello Amazon EC2](hello.js#L8) (`DescribeSecurityGroups`) @@ -59,17 +68,10 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with instances](scenarios/basic.js) +* [Get started with instances](scenarios/basic.js) ## Run the examples -### Prerequisites - -For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. - - - - ### Instructions **Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see @@ -82,7 +84,7 @@ node ./actions/ ``` **Run a scenario** - +Most scenarios can be run with the following command: ```bash node ./scenarios/ ``` @@ -92,24 +94,26 @@ node ./scenarios/ #### Hello Amazon EC2 -This example shows you how to get started using Amazon Elastic Compute Cloud (Amazon EC2). +This example shows you how to get started using Amazon EC2. ```bash node ./hello.js ``` + #### Get started with instances This example shows you how to do the following: -* Create a key pair that is used to secure SSH communication between your computer and an EC2 instance. -* Create a security group that acts as a virtual firewall for your EC2 instances to control incoming and outgoing traffic. -* Find an Amazon Machine Image (AMI) and a compatible instance type. -* Create an instance that is created from the instance type and AMI you select, and is configured to use the security group and key pair created in this example. +* Create a key pair and security group. +* Select an Amazon Machine Image (AMI) and compatible instance type, then create an instance. * Stop and restart the instance. -* Create an Elastic IP address and associate it as a consistent IP address for your instance. -* Connect to your instance with SSH, using both its public IP address and your Elastic IP address. -* Clean up all of the resources created by this example. +* Associate an Elastic IP address with your instance. +* Connect to your instance with SSH, then clean up resources. + + + + @@ -118,9 +122,12 @@ This example shows you how to do the following: ⚠ 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 `javascriptv3` folder. + + @@ -128,7 +135,7 @@ in the `javascriptv3` folder. * [Amazon EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) * [Amazon EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html) -* [SDK for JavaScript V3 Amazon EC2 reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/index.html) +* [SDK for JavaScript (v3) Amazon EC2 reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2) diff --git a/javascriptv3/example_code/eventbridge/README.md b/javascriptv3/example_code/eventbridge/README.md index 43269601b10..db3841e0d2c 100644 --- a/javascriptv3/example_code/eventbridge/README.md +++ b/javascriptv3/example_code/eventbridge/README.md @@ -1,79 +1,91 @@ -# Amazon EventBridge JavaScript SDK v3 code examples + +# EventBridge code examples for the SDK for JavaScript (v3) -## Purpose -The code examples in this directory demonstrate how to work with Amazon EventBridge -using the AWS SDK for JavaScript version 3 (v3). +## Overview -Amazon EventBridge helps you to respond to state changes in your Amazon Web Services resources. -When your resources change state, they automatically send events to an event stream. You can create -rules that match selected events in the stream and route them to targets to take action. +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon EventBridge. -## Code Examples + + -### API Examples -- [Put CloudWatch events](src/putEvents.js) -- [Put CloudWatch event rule](src/putRule.js) -- [Put CloudWatch event targets](src/putTargets.js) +*EventBridge is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources.* -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). +## ⚠ Important -## Important +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- As an AWS best practice, grant this code least privilege, or only the - permissions required to perform a task. For more information, see - [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) - in the *AWS Identity and Access Management User Guide*. -- This code has not been tested in all AWS Regions. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) - on the AWS website. -- Running this code might result in charges to your AWS account. + + -## Running the code +## Code examples ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html) in the - *AWS SDK for Javascript (v3) Developer Guide*. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. -1. Clone the [AWS Code Samples repo](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. -See [the Github documentation](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) for -instructions. -2. Install the dependencies listed in the package.json. + + -**Note**: These dependencies include the client modules for the AWS services that this example requires, -which include *@aws-sdk/client-eventbridge*. -``` -npm install node -g -cd javascriptv3/example_code/eventbridge -npm install -``` -3. In your text editor, update user variables specified in the ```Inputs``` section of the sample file. +### Single actions -4. Run sample code: -``` -cd src -node [example name].js -``` +Code excerpts that show you how to call individual service functions. + +* [Add a target](src/libs/eventBridgeClient.js#L12) (`PutTargets`) +* [Create a rule](src/libs/eventBridgeClient.js#L12) (`PutRule`) +* [Send events](src/libs/eventBridgeClient.js#L12) (`PutEvents`) -## Unit tests +## Run the examples -`Unit tests<./tests>`_ are provided for most examples, using the `Jest `_ framework. +### Instructions -For example, to run tests on the eventbridge folder, enter the following sequence of commands at the command prompt: +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + +**Run a single action** +```bash +node ./actions/ ``` -npm install node -g -cd javascriptv3/example_code/eventbridge/tests -npm install -npm test + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ ``` -## Resources -- [AWS SDK for JavaScript v3 repo](https://github.com/aws/aws-sdk-js-v3) . -- [AWS SDK for JavaScript v3 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/) -- [Amazon EventBridge Documentation](https://docs.aws.amazon.com/eventbridge) -- [AWS SDK for JavaScript v3 API Reference Guide - Amazon EventBridge client module](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/eventbridge/index.html) + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [EventBridge User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html) +* [EventBridge API Reference](https://docs.aws.amazon.com/eventbridge/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v3) EventBridge reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/eventbridge) + + + + +--- + +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/javascriptv3/example_code/glacier/README.md b/javascriptv3/example_code/glacier/README.md index d046ceb2978..bac734086ba 100644 --- a/javascriptv3/example_code/glacier/README.md +++ b/javascriptv3/example_code/glacier/README.md @@ -1,40 +1,91 @@ -# Amazon S3 Glacier JavaScript SDK v3 code examples -Amazon S3 Glacier and S3 Glacier Deep Archive are a secure, durable, and extremely low-cost Amazon S3 cloud storage classes for data archiving and long-term backup. + +# S3 Glacier code examples for the SDK for JavaScript (v3) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon S3 Glacier. + + + + +*S3 Glacier provides durable and extremely low-cost storage for infrequently used data with security features for data archiving and backup.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -This is a workspace where you can find the following AWS SDK for JavaScript version 3 (v3) Amazon S3 Glacier examples. -- [Create a vault](src/createVault.js) -- [Upload an archive](src/uploadArchive.js) -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-example-javascript-syntax.html). +### Prerequisites +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. -## Getting started -1. Clone the [AWS Code Samples repo](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. - See [the Github documentation](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) for - instructions. + + -2. Install the dependencies listed in the package.json. +### Single actions -**Note**: These include the client module for the AWS services required in these example, -which is *@aws-sdk/client-glacier*. -``` -npm install node -g -cd javascriptv3/example_code/glacier -npm install -``` -3. In your text editor, update user variables specified in the ```Inputs``` section of the sample file. +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`) + +## Run the examples + +### Instructions -4. Run sample code: +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + +**Run a single action** + +```bash +node ./actions/ ``` -cd src -node [example name].js // For example, node createVault.js + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ ``` -## Resources -- [AWS SDK for JavaScript v3](https://github.com/aws/aws-sdk-js-v3) -- [AWS SDK for JavaScript v3 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/glacier-examples.html) -- [AWS SDK for JavaScript v3 API Reference Guide](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier/index.html) + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [S3 Glacier Developer Guide](https://docs.aws.amazon.com/amazonglacier/latest/dev/introduction.html) +* [S3 Glacier API Reference](https://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-api.html) +* [SDK for JavaScript (v3) S3 Glacier reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glacier) + + + + +--- + +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/javascriptv3/example_code/glue/README.md b/javascriptv3/example_code/glue/README.md index e65b24b6ed3..4ed3dcc4ab9 100644 --- a/javascriptv3/example_code/glue/README.md +++ b/javascriptv3/example_code/glue/README.md @@ -1,112 +1,139 @@ -# AWS Glue code examples for the SDK for JavaScript in Node.js + +# AWS Glue code examples for the SDK for JavaScript (v3) ## Overview -Shows how to use the AWS SDK for JavaScript in Node.js with AWS Glue. +Shows how to use the AWS SDK for JavaScript (v3) to work with AWS Glue. -AWS Glue is a serverless data integration service that makes it easier to discover, prepare, move, and integrate data from multiple sources for analytics, machine learning (ML), and application development. + + -## ⚠️ Important +*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.* -- Running this code might result in charges to your AWS account. -- 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). +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascriptv3` folder. + + + + + + +### Get started + +* [Hello AWS Glue](hello.js#L8) (`ListJobs`) + ### Single actions Code excerpts that show you how to call individual service functions. -- [Create a crawler](./actions/create-crawler.js)(`CreateCrawler`) -- [Create a job definition](./actions/create-job.js)(`CreateJob`) -- [Delete a crawler](./actions/delete-crawler.js)(`DeleteCrawler`) -- [Delete a database from the Data Catalog](./actions/delete-database.js)(`DeleteDatabase`) -- [Delete a job definition](./actions/delete-job.js)(`DeleteJob`) -- [Delete a table from a database](./actions/delete-table.js)(`DeleteTable`) -- [Get a crawler](./actions/get-crawler.js)(`GetCrawler`) -- [Get a database from the Data Catalog](./actions/get-database.js)(`GetDatabase`) -- [Get a job run](./actions/get-job.js)(`GetJob`) -- [Get runs of a job](./actions/get-job-runs.js)(`GetJobRuns`) -- [Get tables from a database](./actions/get-tables.js)(`GetTables`) -- [List job definitions](./actions/list-jobs.js)(`ListJobs`) -- [Start a crawler](./actions/start-crawler.js)(`StartCrawler`) -- [Start a job run](./actions/start-job-run.js)(`StartJobRun`) +* [Create a crawler](actions/create-crawler.js#L9) (`CreateCrawler`) +* [Create a job definition](actions/create-job.js#L9) (`CreateJob`) +* [Delete a crawler](actions/delete-crawler.js#L9) (`DeleteCrawler`) +* [Delete a database from the Data Catalog](actions/delete-database.js#L9) (`DeleteDatabase`) +* [Delete a job definition](actions/delete-job.js#L9) (`DeleteJob`) +* [Delete a table from a database](actions/delete-table.js#L9) (`DeleteTable`) +* [Get a crawler](actions/get-crawler.js#L9) (`GetCrawler`) +* [Get a database from the Data Catalog](actions/get-database.js#L9) (`GetDatabase`) +* [Get a job run](actions/get-job-run.js#L9) (`GetJobRun`) +* [Get databases from the Data Catalog](actions/get-databases.js#L9) (`GetDatabases`) +* [Get job from the Data Catalog](actions/get-job.js#L9) (`GetJob`) +* [Get runs of a job](actions/get-job-runs.js#L9) (`GetJobRuns`) +* [Get tables from a database](actions/get-tables.js#L9) (`GetTables`) +* [List job definitions](actions/list-jobs.js#L9) (`ListJobs`) +* [Start a crawler](actions/start-crawler.js#L9) (`StartCrawler`) +* [Start a job run](actions/start-job-run.js#L9) (`StartJobRun`) ### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -- [Get started running crawlers and jobs](./scenarios/basic/index.js) +* [Get started with crawlers and jobs](scenarios/basic/steps/start-crawler.js) ## Run the examples -### Prerequisites - -1. [Set up AWS SDK for JavaScript](../README.md). -1. Run `yarn`. - ### Instructions +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + **Run a single action** -1. Create a new file in this directory and run `import { functionName } from "./actions/action-name.js"`. - Replace `action-name` with the file name of the action to run, and replace `functionName` with the name of - the exported function in that file. -1. Call the imported function with its required parameters and log the result. +```bash +node ./actions/ +``` **Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ +``` + + + + +#### Hello AWS Glue + +This example shows you how to get started using AWS Glue. -> ### Get started running crawlers and jobs -> -> --- -> -> Prerequisites: -> -> 1. [Install the AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#getting_started_install). -> 1. Run `cdk bootstrap`. -> 1. Change directories to `resources/cdk/glue_role_bucket`. -> 1. Run `cdk deploy` and save the output. -> 1. Upload `python/example_code/glue/flight_etl_job_script.py` to the S3 bucket created in the preceding step. -> 1. Create a .env file with the following values. -> Set the value of BUCKET_NAME and ROLE_NAME to the values output from -> the CDK. -> ``` -> BUCKET_NAME = -> ROLE_NAME = -> PYTHON_SCRIPT_KEY = flight_etl_job_script.py -> S3_TARGET_PATH = s3://crawler-public-us-east-1/flight/2016/csv -> DATABASE_NAME = doc-example-database -> TABLE_PREFIX = doc-example- -> TABLE_NAME = doc-example-csv -> CRAWLER_NAME = s3-flight-data-crawler -> JOB_NAME = flight_etl_job ->``` -> Running the scenario: -> -> 1. Run `node ./scenarios/basic`. -> 2. The scenario will create a crawler, create a job, run the crawler, and run the job. User input will be required -> for getting more information about job runs, and for clean up options. - -## Tests - -⚠️ Running the tests might result in charges to your AWS account. - -### Unit tests - -1. Run `yarn`. -1. Run `yarn test`. - -### Integration tests - -1. Run `yarn`. -1. Run `yarn integration-test`. +```bash +node ./hello.js +``` + + +#### 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 `javascriptv3` 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) -- [AWS Glue client - AWS SDK for JavaScript (v3)](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glue/index.html) +* [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 JavaScript (v3) AWS Glue reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/glue) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascriptv3/example_code/iam/README.md b/javascriptv3/example_code/iam/README.md index 91b9a3e62fc..96d717ad5ed 100644 --- a/javascriptv3/example_code/iam/README.md +++ b/javascriptv3/example_code/iam/README.md @@ -1,4 +1,4 @@ - + # IAM code examples for the SDK for JavaScript (v3) ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with AWS Identity and A ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -21,6 +21,20 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with AWS Identity and A ## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. + + + + + + +### Get started + +* [Hello IAM](hello.js#L8) (`ListPolicies`) + ### Single actions Code excerpts that show you how to call individual service functions. @@ -72,20 +86,10 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a user and assume a role](scenarios/basic.js) +* [Create a user and assume a role](scenarios/basic.js) ## Run the examples -### Prerequisites - - -For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. - - - - - - ### Instructions **Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see @@ -106,6 +110,14 @@ node ./scenarios/ +#### Hello IAM + +This example shows you how to get started using IAM. + +```bash +node ./hello.js +``` + #### Create a user and assume a role @@ -116,6 +128,10 @@ This example shows you how to create a user and assume a role. * Add a policy to let the user assume the role. * Assume the role and list S3 buckets using temporary credentials, then clean up resources. + + + + diff --git a/javascriptv3/example_code/kinesis/README.md b/javascriptv3/example_code/kinesis/README.md index bdcbc560a5b..8816b8c1fd0 100644 --- a/javascriptv3/example_code/kinesis/README.md +++ b/javascriptv3/example_code/kinesis/README.md @@ -1,29 +1,83 @@ -# Amazon Kinesis JavaScript SDK v3 code examples -Amazon Kinesis makes it easy to collect, process, and analyze real-time, streaming data so you can get timely insights and react quickly to new information. + +# Kinesis code examples for the SDK for JavaScript (v3) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Kinesis. + + + + +*Kinesis makes it easy to collect, process, and analyze video and data streams in real time.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -This is a workspace where you can find the following AWS SDK for JavaScript version 3 (v3) Amazon Kinesis examples: -- Tutorial demonstrating how to capture browser user event data and send it to Amazon Kenesis. See [documentation](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/kinesis-examples.html). -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-example-javascript-syntax.html). +### Prerequisites -## Getting started +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. -1. Clone the [AWS SDK Code Samples repo](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. See [the Github documentation](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) for instructions. -1. Install the dependencies listed in the package.json. + + -**Note**: These include the client module for the AWS services required in these example, -which is *@aws-sdk/client-kinesis*. +## Run the examples + +### Instructions + +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + +**Run a single action** + +```bash +node ./actions/ ``` -npm install node -g -cd javascriptv3/example_code/kinesis -npm install + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ ``` -4. To run this code, follow the instructions for this example in the [Capturing Web Page Scroll Progress with Amazon Kinesis](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/kinesis-examples-capturing-page-scrolling.html). -## Resources -- [AWS SDK for JavaScript v3](https://github.com/aws/aws-sdk-js-v3) -- [Amazon Kinesis Example](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/kinesis-examples.html) -- [AWS SDK for JavaScript v3 API Reference Guide](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kinesis/index.html) + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [Kinesis Developer Guide](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) +* [Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v3) Kinesis reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/kinesis) + + + + +--- + +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/javascriptv3/example_code/lambda/README.md b/javascriptv3/example_code/lambda/README.md index 2b91e219edb..923c7f769f7 100644 --- a/javascriptv3/example_code/lambda/README.md +++ b/javascriptv3/example_code/lambda/README.md @@ -1,63 +1,107 @@ -# Lambda code examples for the SDK for JavaScript in Node.js + +# Lambda code examples for the SDK for JavaScript (v3) ## Overview -Shows how to use the AWS SDK for JavaScript in Node.js with AWS Lambda to manage and invoke -functions. +Shows how to use the AWS SDK for JavaScript (v3) to work with AWS Lambda. -AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers. + + -## ⚠️ Important +*Lambda allows you to run code without provisioning or managing servers.* -- Running this code might result in charges to your AWS account. -- 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). +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascriptv3` folder. + + + + + + +### Get started + +* [Hello Lambda](hello.js#L8) (`ListFunctions`) + ### Single actions Code excerpts that show you how to call individual service functions. -- [Create a function](./actions/create-function.js)(`CreateFunction`) -- [Delete a function](./actions/delete-function.js)(`DeleteFunction`) -- [Get a function](./actions/get-function.js)(`GetFunction`) -- [Invoke a function](./actions/invoke.js)(`Invoke`) -- [Update function code](./actions/update-function-code.js)(`UpdateFunctionCode`) -- [Update function configuration](./actions/update-function-configuration.js)(`CreateFunction`) +* [Create a function](actions/create-function.js#L18) (`CreateFunction`) +* [Delete a function](actions/delete-function.js#L8) (`DeleteFunction`) +* [Get a function](actions/get-function.js#L8) (`GetFunction`) +* [Invoke a function](actions/invoke.js#L8) (`Invoke`) +* [List functions](actions/list-functions.js#L8) (`ListFunctions`) +* [Update function code](actions/update-function-code.js#L19) (`UpdateFunctionCode`) +* [Update function configuration](actions/update-function-configuration.js#L14) (`UpdateFunctionConfiguration`) -### Scenarios +## Run the examples -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +### Instructions -- [Get started with functions](./scenarios/basic) +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). -## Run the examples +**Run a single action** -### Prerequisites +```bash +node ./actions/ +``` + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ +``` + + + + +#### Hello Lambda + +This example shows you how to get started using Lambda. + +```bash +node ./hello.js +``` -- [Set up AWS SDK for JavaScript](../README.rst) -### Run a single action +### Tests -1. Run `npm i` -1. Create a new file in this directory and `import { functionName } from "./actions/action-name.js"` - where `action-name` is the file name of the action you want to run, and `function-name` is the name of - the exported function in that file. -1. Call the imported function with its required parameters and log the result. +⚠ Running tests might result in charges to your AWS account. -## Tests -⚠️ Running the tests might result in charges to your AWS account. +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `javascriptv3` folder. -1. Run `npm i` -1. Run `npm test` + + + + ## Additional resources -- [AWS Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) -- [AWS Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) -- [AWS Lambda client - AWS SDK for JavaScript (v3)](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda/index.html) +* [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) +* [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) +* [SDK for JavaScript (v3) Lambda reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lambda) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascriptv3/example_code/mediaconvert/README.md b/javascriptv3/example_code/mediaconvert/README.md index 4596b81167e..2d32d80f132 100644 --- a/javascriptv3/example_code/mediaconvert/README.md +++ b/javascriptv3/example_code/mediaconvert/README.md @@ -1,41 +1,83 @@ -# Amazon Elemental MediaConvert (EMC) JavaScript SDK v3 code examples -Amazon EMC is a file-based video transcoding service with broadcast-grade features. - ## Code examples -This is a workspace where you can find the following AWS SDK for JavaScript version 3 (v3) Amazon EMC examples: + +# MediaConvert code examples for the SDK for JavaScript (v3) -- [Create a job template](src/emc_create_jobtemplate.js) -- [Create a job](src/emc_createjob.js) -- [Create a job using a template](src/emc_template_createjob.js) -- [List jobs](src/emc_listjobs.js) -- [Cancel a job](src/emc_canceljob.js) -- [List templates](src/emc_listtemplates.js) -- [Delete a template](src/emc_deletetemplate.js) -- [Get an endpoint](src/emc_getendpoint.js) +## Overview -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-example-javascript-syntax.html). +Shows how to use the AWS SDK for JavaScript (v3) to work with AWS Elemental MediaConvert. -## Getting started + + -1. Clone the [AWS SDK Code Samples repo](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. See [the Github documentation](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) for instructions. +*MediaConvert is a service that formats and compresses offline video content for delivery to televisions or connected devices.* -2. Install the dependencies listed in the package.json. +## ⚠ Important -**Note**: These include the client module for the AWS services required in these example, -which is *@aws-sdk/client-mediaconvert*. -``` -npm install node -g -cd javascriptv3/example_code/mediaconvert -npm install -``` -3. In your text editor, update user variables specified in the ```Inputs``` section of the sample file. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascriptv3` folder. + + + + -4. Run sample code: +## Run the examples + +### Instructions + +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + +**Run a single action** + +```bash +node ./actions/ ``` -cd src -node [example name].js // For example, node emc_createjob.js + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ ``` - ## Resources -- [AWS SDK for JavaScript v3](https://github.com/aws/aws-sdk-js-v3) -- [AWS SDK for JavaScript v3 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/mediaconvert-examples.html) -- [AWS SDK for JavaScript v3 API Reference Guide](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mediaconvert/index.html) + + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [MediaConvert User Guide](https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html) +* [MediaConvert API Reference](https://docs.aws.amazon.com/mediaconvert/latest/apireference/custom-endpoints.html) +* [SDK for JavaScript (v3) MediaConvert reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mediaconvert) + + + + +--- + +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/javascriptv3/example_code/medical-imaging/README.md b/javascriptv3/example_code/medical-imaging/README.md index 449a03b119c..a5108c314e2 100644 --- a/javascriptv3/example_code/medical-imaging/README.md +++ b/javascriptv3/example_code/medical-imaging/README.md @@ -1,4 +1,4 @@ - + # HealthImaging code examples for the SDK for JavaScript (v3) ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with AWS HealthImaging. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -35,7 +35,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 data store](actions/create-datastore.js#L8) (`CreateDatastore`) -* [Delete a data store](actions/delete-datastore.js#L35) (`DeleteDatastore`) +* [Delete a data store](actions/delete-datastore.js#L8) (`DeleteDatastore`) * [Get data store properties](actions/get-datastore.js#L8) (`GetDatastore`) * [List data stores](actions/list-datastores.js#L8) (`ListDatastores`) diff --git a/javascriptv3/example_code/personalize/README.md b/javascriptv3/example_code/personalize/README.md index 0d6ef316001..327d4828b5c 100644 --- a/javascriptv3/example_code/personalize/README.md +++ b/javascriptv3/example_code/personalize/README.md @@ -1,75 +1,102 @@ -# Amazon Personalize code examples for SDK for JavaScript (v3) -The code examples in this directory demonstrate how to work with Amazon Personalize using the AWS SDK for JavaScript version 3 (v3). + +# Amazon Personalize code examples for the SDK for JavaScript (v3) -Amazon Personalize is a fully managed machine learning service that makes it easy for developers to deliver personalized experiences to their users. +## Overview -## Code examples -This directory contains the following SDK for JavaScript (v3) examples for Amazon Personalize: - -### Single action -- [Create a batch inference job](src/personalize_createBatchInferenceJob.js) (CreateBatchInferenceJobCommand) -- [Create a batch segment job](src/personalize_createBatchSegmentJob.js) (CreateBatchSegmentJobCommand) -- [Create a campaign](src/personalize_createCampaign.js) (CreateCampaignCommand) -- [Create a dataset](src/personalize_createDataset.js) (CreateDatasetCommand) -- [Create a dataset export job](src/personalize_createDatasetExportJob.js) (CreateDatasetExportJobCommand) -- [Create a dataset group](src/personalize_createDatasetGroup.js) (CreateDatasetGroupCommand) -- [Create a dataset import job](src/personalize_createDatasetImportJob.js) (CreateDatasetImportJobCommand) -- [Create a domain dataset group](src/personalize_createDomainDatasetGroup.js) (CreateDatasetGroupCommand) -- [Create a domain schema](src/personalize_createDomainSchema.js) (CreateSchemaCommand) -- [Create an event tracker](src/personalize_createEventTracker.js) (CreateEventTrackerCommand) -- [Create a filter](src/personalize_createFilter.js) (CreateFilterCommand) -- [Create a recommender](src/personalize_createRecommender.js) (CreateRecommenderCommand) -- [Create a schema](src/personalize_createSchema.js) (CreateSchemaCommand) -- [Create a solution](src/personalize_createSolution.js) (CreateSolutionCommand) -- [Create a solution version](src/personalize_createSolutionVersion.js) (CreateSolutionVersion) -- [Get a personalized ranking](src/personalize_getPersonalizedRanking.js) (GetPersonalizedRankingCommand) -- [Get recommendations (custom dataset group)](src/personalize_getRecommendations.js) (GetRecommendationsCommand) -- [Get recommendations from a recommender (domain dataset group)](src/personalize_getRecommendationsFromRecommender.js) (GetRecommendationsCommand) -- [Get recommendation with a filter (custom dataset group)](src/personalize_getRecommendationsWithFilter.js) (GetRecommendationsCommand) -- [Put events](src/personalize_putEvents.js) (PutEventsCommand) -- [Put items](src/personalize_putItems.js) (PutItemsCommand) -- [Put users](src/personalize_putUsers.js) (PutUsersCommand) +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Personalize. -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + + + +*Amazon Personalize enables real-time personalization and recommendations, based on the same technology used at Amazon.com.* -## Important +## ⚠ Important -- Running this code 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) - in the *AWS Identity and Access Management User Guide*. -- This code is not tested in every AWS Region. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/). +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -## Running the examples + + + +## Code examples ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html) in the *AWS SDK for JavaScript (v3) Developer Guide*. -1. Clone the [AWS SDK Code Samples repo](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. For instructions, see the [the Github documentation](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository). +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. -2. Install the dependencies listed in the package.json. -``` -cd javascriptv3/example_code/personalize/src -npm install -``` -3. In your text editor, update the user variables specified in the ```Inputs``` section of the sample file. + + + +### Single actions + +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`) + +## Run the examples + +### Instructions + +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). -4. Run the following sample code: +**Run a single action** + +```bash +node ./actions/ ``` -cd src -node [example name].js + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ ``` -## Resources -- [AWS SDK for JavaScript (v3) repo](https://github.com/aws/aws-sdk-js-v3) -- [Amazon Personalize Developer Guide ](https://docs.aws.amazon.com/personalize/latest/dg/what-is-personalize.html) -- [AWS SDK for JavaScript v3 API Reference Guide - Personalize Client](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/personalize/index.html) -- [AWS SDK for JavaScript v3 API Reference Guide - Personalize Events Client](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/personalize-events/index.html) -- [AWS SDK for JavaScript v3 API Reference Guide - Personalize Runtime Client](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/personalize-events/index.html) + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [Amazon Personalize Developer Guide](https://docs.aws.amazon.com/personalize/latest/dg/what-is-personalize.html) +* [Amazon Personalize API Reference](https://docs.aws.amazon.com/personalize/latest/dg/API_Reference.html) +* [SDK for JavaScript (v3) Amazon Personalize reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/personalize) + + + + +--- + +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/javascriptv3/example_code/pinpoint/README.md b/javascriptv3/example_code/pinpoint/README.md index 6c116dab6fc..10b588e9df1 100644 --- a/javascriptv3/example_code/pinpoint/README.md +++ b/javascriptv3/example_code/pinpoint/README.md @@ -1,57 +1,89 @@ -# Amazon Pinpoint JavaScript SDK v3 code examples -## Purpose -The code examples in this directory demonstrate how to work with Amazon Pinpoint -using the AWS SDK for JavaScript (v3). + +# Amazon Pinpoint code examples for the SDK for JavaScript (v3) -Amazon Pinpoint is a flexible and scalable outbound and inbound marketing communications service. You can connect with customers over channels like email, SMS, push, or voice. +## Overview -## Code examples -### API examples -- [Send email messages](src/pinpoint_send_email_message.js) -- [Send SMS messages](src/pinpoint_send_sms_message.js) +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Pinpoint. + + + -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-example-javascript-syntax.html). +*Amazon Pinpoint helps you engage your customers by sending them email, SMS and voice messages, and push notifications.* -## Important +## ⚠ Important -- As an AWS best practice, grant this code least privilege, or only the - permissions required to perform a task. For more information, see - [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) - in the *AWS Identity and Access Management User Guide*. -- This code has not been tested in all AWS Regions. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) - on the AWS website. -- Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -## Running the code + + + +## Code examples ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html) in the - *AWS SDK for Javascript (v3) Developer Guide*. -1. Clone the [AWS SDK Code Samples repo](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. See [the Github documentation](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) for instructions. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. -2. Install the dependencies listed in the package.json. -**Note**: These include the client module for the AWS services required in these example, -which are *@aws-sdk/client-pinpoint*, *@aws-sdk/client-pinpoint-email*, and *@aws-sdk/client-pinpoint-sms-voice*. + + -``` -npm install node -g -cd javascriptv3/example_code/pinpoint -npm install -``` -3. In your text editor, update user variables specified in the ```Inputs``` section of the sample file. +### Single actions + +Code excerpts that show you how to call individual service functions. -4. Run sample code: +* [Send email and text messages](src/libs/pinClient.js#L14) (`SendMessages`) + +## Run the examples + +### Instructions + +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + +**Run a single action** + +```bash +node ./actions/ ``` -cd src -node [example name].js // For example, node pinpoint-create-cluster.js + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ ``` -## Resources -- [AWS SDK for JavaScript v3](https://github.com/aws/aws-sdk-js-v3) -- [AWS SDK for JavaScript v3 API Reference Guide](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pinpoint/index.html) + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [Amazon Pinpoint Developer Guide](https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html) +* [Amazon Pinpoint API Reference](https://docs.aws.amazon.com/pinpoint/latest/apireference/welcome.html) +* [SDK for JavaScript (v3) Amazon Pinpoint reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pinpoint) + + + + +--- + +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/javascriptv3/example_code/polly/README.md b/javascriptv3/example_code/polly/README.md index ff2c2dc3f48..5beee4cfb10 100644 --- a/javascriptv3/example_code/polly/README.md +++ b/javascriptv3/example_code/polly/README.md @@ -1,34 +1,83 @@ -# Amazon Polly JavaScript SDK v3 code examples -Amazon Polly is a service that turns text into lifelike speech, allowing you to create applications that talk, -and build entirely new categories of speech-enabled products. + +# Amazon Polly code examples for the SDK for JavaScript (v3) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Polly. + + + + +*Amazon Polly is a Text-to-Speech (TTS) cloud service that converts text into lifelike speech.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -This is a workspace where you can find the following AWS SDK for JavaScript version 3 (v3) Amazon Polly examples. -- [Convert text to speech - Node.js](./general-examples/src/polly_synthesize_to_s3.js) -- [Convert text to speech - Browser](./src/polly.js) + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-example-javascript-syntax.html). + + -## Getting started -1. Clone the [AWS SDK Code Samples repo](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. See [the Github documentation](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) for instructions. +## Run the examples -2. Install the dependencies listed in the package.json. +### Instructions -**Note**: These include the client module for the AWS services required in these example, -which are *@aws-sdk/client-cognito-identity*, *@aws-sdk/credential-provider-cognito-identity*, -*@aws-sdk/client-polly*, and *@aws-sdk/polly-request-presigner*. +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). +**Run a single action** + +```bash +node ./actions/ ``` -npm install node -g -cd javascriptv3/example_code/polly -npm install + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ ``` -3. Follow the instructions in the [Getting Started in the browser topic of the AWS SDK for JavaScript (V3) DeveloperGuide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/getting-started-browser.html). + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [Amazon Polly Developer Guide](https://docs.aws.amazon.com/polly/latest/dg/what-is.html) +* [Amazon Polly API Reference](https://docs.aws.amazon.com/polly/latest/dg/API_Reference.html) +* [SDK for JavaScript (v3) Amazon Polly reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/polly) + + + + +--- -## Resources -- [AWS SDK for JavaScript v3](https://github.com/aws/aws-sdk-js-v3) -- [AWS SDK for JavaScript v3 API Reference Guide](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/polly/index.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/javascriptv3/example_code/redshift/README.md b/javascriptv3/example_code/redshift/README.md index 315d0700be3..1c77eabdd8d 100644 --- a/javascriptv3/example_code/redshift/README.md +++ b/javascriptv3/example_code/redshift/README.md @@ -1,44 +1,92 @@ -# Amazon Redshift JavaScript SDK v3 code examples -Amazon Redshift is a fully managed, petabyte-scale data warehouse service in the cloud. You can start with just a few hundred gigabytes of data and scale to a petabyte or more. This enables you to use your data to acquire new insights for your business and customers. + +# Amazon Redshift code examples for the SDK for JavaScript (v3) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Redshift. + + + + +*Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse service that makes it simple and cost-effective to efficiently analyze all your data using your existing business intelligence tools.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -This is a workspace where you can find the following AWS SDK for JavaScript version 3 (v3) Amazon Redshift examples. -- [Create Redshift cluster](src/redshift-create-cluster.js) -- [Delete a Redshift cluster](src/redshift-delete-cluster.js) -- [Describe Redshift clusters](src/redshift-describe-clusters.js) -- [Modify a Redshift cluster](src/redshift-modify-cluster.js) +### Prerequisites -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-example-javascript-syntax.html). +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. -# Getting started + + -1. Clone the [AWS SDK Code Samples repo](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. See [the Github documentation](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) for instructions. +### Single actions -2. Install the dependencies listed in the package.json. +Code excerpts that show you how to call individual service functions. -**Note**: These include the client module for the AWS services required in these example, -which is *@aws-sdk/client-redshift-node*. +* [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`) -``` -npm install node -g -cd javascriptv3/example_code/redshift -npm install -``` +## Run the examples + +### Instructions -3. In your text editor, update user variables specified in the ```Inputs``` section of the sample file. +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). -4. Run sample code: +**Run a single action** + +```bash +node ./actions/ ``` -cd src -node [example name].js // For example, node redshift-create-cluster.js + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ ``` -## Resources -- [AWS SDK for JavaScript v3](https://github.com/aws/aws-sdk-js-v3) -- [AWS SDK for JavaScript v3 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/redshift-examples.html) -- [AWS SDK for JavaScript v3 API Reference Guide](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift/index.html) + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [Amazon Redshift Management Guide](https://docs.aws.amazon.com/redshift/latest/mgmt/welcome.html) +* [Amazon Redshift API Reference](https://docs.aws.amazon.com/redshift/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v3) Amazon Redshift reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift) + + + + +--- + +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/javascriptv3/example_code/rekognition/README.md b/javascriptv3/example_code/rekognition/README.md new file mode 100644 index 00000000000..0dc49e320e0 --- /dev/null +++ b/javascriptv3/example_code/rekognition/README.md @@ -0,0 +1,83 @@ + +# Amazon Rekognition code examples for the SDK for JavaScript (v3) + +## Overview + +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Rekognition. + + + + +*Amazon Rekognition makes it easy to add image and video analysis to your applications.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascriptv3` folder. + + + + + +## Run the examples + +### Instructions + +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + +**Run a single action** + +```bash +node ./actions/ +``` + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ +``` + + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [Amazon Rekognition Developer Guide](https://docs.aws.amazon.com/rekognition/latest/dg/what-is.html) +* [Amazon Rekognition API Reference](https://docs.aws.amazon.com/rekognition/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v3) Amazon Rekognition reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/rekognition) + + + + +--- + +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/javascriptv3/example_code/s3/README.md b/javascriptv3/example_code/s3/README.md index 6ccbc727bbc..676771f0003 100644 --- a/javascriptv3/example_code/s3/README.md +++ b/javascriptv3/example_code/s3/README.md @@ -1,4 +1,4 @@ - + # Amazon S3 code examples for the SDK for JavaScript (v3) ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Simple Stor ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -30,6 +30,11 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas + +### Get started + +* [Hello Amazon S3](hello.js#L8) (`ListBuckets`) + ### Single actions Code excerpts that show you how to call individual service functions. @@ -49,7 +54,7 @@ Code excerpts that show you how to call individual service functions. * [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) (`ListObjects`) +* [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`) @@ -59,10 +64,10 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a presigned URL](scenarios/presigned-url-upload.js) -* [Create a web page that lists Amazon S3 objects](scenarios/web/list-objects/src/App.tsx) -* [Get started with buckets and objects](scenarios/basic.js) -* [Upload or download large files](scenarios/multipart-upload.js) +* [Create a presigned URL](scenarios/presigned-url-upload.js) +* [Create a web page that lists Amazon S3 objects](scenarios/web/list-objects/src/App.tsx) +* [Get started with buckets and objects](scenarios/basic.js) +* [Upload or download large files](scenarios/multipart-upload.js) ## Run the examples @@ -92,6 +97,13 @@ Follow these steps to run a web scenario. Some scenarios might require extra ste 1. Run `npm run dev`. +#### Hello Amazon S3 + +This example shows you how to get started using Amazon S3. + +```bash +node ./hello.js +``` #### Create a presigned URL diff --git a/javascriptv3/example_code/secrets-manager/README.md b/javascriptv3/example_code/secrets-manager/README.md index 34095639f9d..e40dc6b6e06 100644 --- a/javascriptv3/example_code/secrets-manager/README.md +++ b/javascriptv3/example_code/secrets-manager/README.md @@ -1,4 +1,4 @@ - + # Secrets Manager code examples for the SDK for JavaScript (v3) ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with AWS Secrets Manage ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javascriptv3/example_code/ses/README.md b/javascriptv3/example_code/ses/README.md index 13a65d1d078..4c471f3ec7c 100644 --- a/javascriptv3/example_code/ses/README.md +++ b/javascriptv3/example_code/ses/README.md @@ -1,65 +1,108 @@ -# Amazon SES code examples for the AWS SDK for JavaScript in Node.js + +# Amazon SES code examples for the SDK for JavaScript (v3) ## Overview -Shows how to use the SDK for JavaScript in Node.js with Amazon Simple Email Service (Amazon SES) to send emails and manage -identities, filters, rules, and templates. -Amazon Simple Email Service (Amazon SES) is a reliable, scalable, and cost-effective email service. Digital marketers and application developers can use Amazon SES to send marketing, notification, and transactional emails. +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Simple Email Service (Amazon SES). -## ⚠️ Important + + -- Running this code might result in charges to your AWS account. -- 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). +*Amazon SES is a reliable, scalable, and cost-effective email service.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascriptv3` folder. + + + + + ### Single actions Code excerpts that show you how to call individual service functions. -- [Create a receipt filter](./src/ses_createreceiptfilter.js) (`CreateReceiptFilter`) -- [Create a receipt rule](./src/ses_createreceiptrule.js) (`CreateReceiptRule`) -- [Create a receipt rule set](./src/ses_createreceiptruleset.js) (`CreateReceiptRuleSet`) -- [Create a template](./src/ses_createtemplate.js) (`CreateTemplate`) -- [Delete an identity](./src/ses_deleteidentity.js) (`DeleteIdentity`) -- [Delete a receipt filter](./src/ses_deletereceiptfilter.js) (`DeleteReceiptFilter`) -- [Delete a receipt rule](./src/ses_deletereceiptrule.js) (`DeleteReceiptRule`) -- [Delete a receipt rule set](./src/ses_deletereceiptruleset.js) (`DeleteReceiptRuleSet`) -- [Delete a template](./src/ses_deletetemplate.js) (`DeleteTemplate`) -- [Get a template](./src/ses_gettemplate.js) (`GetTemplate`) -- [List all identities](./src/ses_listidentities.js) (`ListIdentities`) -- [List all receipt filters](./src/ses_listreceiptfilters.js) (`ListReceiptFilters`) -- [List all templates](./src/ses_listtemplates.js) (`ListTemplates`) -- [Send a bulk templated email](./src/ses_sendbulktemplatedemail.js) (`SendBulkTemplatedEmail`) -- [Send an email](./src/ses_sendemail.js) (`SendEmail`) -- [Send a templated email](./src/ses_sendtemplatedemail.js) (`SendTemplatedEmail`) -- [Update a template](./src/ses_updatetemplate.js) (`UpdateTemplate`) -- [Verify a domain identity](./src/ses_verifydomainidentity.js) (`VerifyDomainIdentity`) -- [Verify an email identity](./src/ses_verifyemailidentity.js) (`VerifyEmailIdentity`) +* [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`) ## Run the examples -1. `yarn` -1. Add a call to the `run()` function at the bottom of the example you want to run. -1. Execute `node ` +### Instructions -### Prerequisites +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + +**Run a single action** + +```bash +node ./actions/ +``` -- [Set up AWS SDK for JavaScript](../README.rst) +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ +``` -## Tests + + -⚠️ Running the tests might result in charges to your AWS account. -1. `yarn` -1. `yarn integration-test` + +### 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 `javascriptv3` folder. + + + + + ## Additional resources -- [Amazon SES Developer Guide](https://docs.aws.amazon.com/ses/latest/dg/Welcome.html) -- [Amazon SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/Welcome.html) -- [Amazon SES Client - AWS SDK for JavaScript (v3)](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ses/index.html) +* [Amazon SES Developer Guide](https://docs.aws.amazon.com/ses/latest/dg/Welcome.html) +* [Amazon SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v3) Amazon SES reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ses) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascriptv3/example_code/sns/README.md b/javascriptv3/example_code/sns/README.md index aa07bd9f9fa..ac690954ded 100644 --- a/javascriptv3/example_code/sns/README.md +++ b/javascriptv3/example_code/sns/README.md @@ -1,4 +1,4 @@ - + # Amazon SNS code examples for the SDK for JavaScript (v3) ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Simple Noti ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -39,22 +39,22 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas Code excerpts that show you how to call individual service functions. -* [Check whether a phone number is opted out](actions/check-if-phone-number-is-opted-out.js#L8) (`CheckIfPhoneNumberIsOptedOut`) -* [Confirm an endpoint owner wants to receive messages](actions/confirm-subscription.js#L8) (`ConfirmSubscription`) -* [Create a topic](actions/create-topic.js#L8) (`CreateTopic`) -* [Delete a subscription](actions/unsubscribe.js#L8) (`Unsubscribe`) -* [Delete a topic](actions/delete-topic.js#L7) (`DeleteTopic`) -* [Get the properties of a topic](actions/get-topic-attributes.js#L7) (`GetTopicAttributes`) -* [Get the settings for sending SMS messages](actions/get-sms-attributes.js#L8) (`GetSMSAttributes`) -* [List the subscribers of a topic](actions/list-subscriptions-by-topic.js#L8) (`ListSubscriptions`) -* [List topics](actions/list-topics.js#L8) (`ListTopics`) -* [Publish to a topic](actions/publish-topic.js#L8) (`Publish`) -* [Set the default settings for sending SMS messages](actions/set-sms-attribute-type.js#L8) (`SetSmsAttributes`) -* [Set topic attributes](actions/set-topic-attributes.js#L8) (`SetTopicAttributes`) -* [Subscribe a Lambda function to a topic](actions/subscribe-lambda.js#L8) (`Subscribe`) -* [Subscribe a mobile application to a topic](actions/subscribe-app.js#L8) (`Subscribe`) +* [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 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](actions/subscribe-email.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`) ## Run the examples diff --git a/javascriptv3/example_code/sqs/README.md b/javascriptv3/example_code/sqs/README.md index fde2cc8445f..866b184401f 100644 --- a/javascriptv3/example_code/sqs/README.md +++ b/javascriptv3/example_code/sqs/README.md @@ -1,4 +1,4 @@ - + # Amazon SQS code examples for the SDK for JavaScript (v3) ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Simple Queu ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -52,6 +52,13 @@ Code excerpts that show you how to call individual service functions. * [Send a message to a queue](actions/send-message.js#L8) (`SendMessage`) * [Set queue attributes](actions/set-queue-attributes.js#L8) (`SetQueueAttributes`) +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Publish messages to queues](../cross-services/wkflw-topics-queues/index.js) + ## Run the examples ### Instructions @@ -83,6 +90,22 @@ node ./hello.js ``` +#### Publish messages to queues + +This example shows you how to do the following: + +* Create topic (FIFO or non-FIFO). +* Subscribe several queues to the topic with an option to apply a filter. +* Publish messages to the topic. +* Poll the queues for messages received. + + + + + + + + ### Tests ⚠ Running tests might result in charges to your AWS account. diff --git a/javascriptv3/example_code/sts/README.md b/javascriptv3/example_code/sts/README.md index 1be6d2e89d4..9ce18ed12f9 100644 --- a/javascriptv3/example_code/sts/README.md +++ b/javascriptv3/example_code/sts/README.md @@ -1,52 +1,89 @@ + # AWS STS code examples for the SDK for JavaScript (v3) ## Overview -Shows how to use the AWS SDK for JavaScript (v3) with AWS Security Token Service (AWS STS). +Shows how to use the AWS SDK for JavaScript (v3) to work with AWS Security Token Service (AWS STS). -AWS provides AWS STS as a web service that enables you to request temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or for users you authenticate (federated users). + + -## ⚠️ Important +*AWS STS creates and provides trusted users with temporary security credentials that can control access to your AWS resources.* -- Running this code might result in charges to your AWS account. -- 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). +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascriptv3` folder. + + + + + ### Single actions Code excerpts that show you how to call individual service functions. -- [Assume a role](./actions//assume-role.js)(AssumeRole) +* [Assume a role](libs/client.js#L6) (`AssumeRole`) ## Run the examples -### Prerequisites - -1. [Set up AWS SDK for JavaScript](../README.md). -1. Run `npm i`. - ### Instructions +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). + **Run a single action** -1. Run `node ./actions/`. - OR -1. Import `./actions/fileName` into another module. +```bash +node ./actions/ +``` -## Tests +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ +``` -⚠️ Running the tests might result in charges to your AWS account. + + -1. Run `npm i`. -1. Run `npm test`. + + +### 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 `javascriptv3` folder. + + + + + ## Additional resources -- [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) -- [Amazon CloudWatch API reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) -- [Amazon CloudWatch Client - AWS SDK for JavaScript (v3)](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch/index.html) +* [AWS STS User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) +* [AWS STS API Reference](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) +* [SDK for JavaScript (v3) AWS STS reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sts) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascriptv3/example_code/support/README.md b/javascriptv3/example_code/support/README.md index 23c1342ecfa..916d69c1f1a 100644 --- a/javascriptv3/example_code/support/README.md +++ b/javascriptv3/example_code/support/README.md @@ -1,79 +1,134 @@ -# Support code examples for the SDK for JavaScript in Node.js + +# Support code examples for the SDK for JavaScript (v3) ## Overview -The code examples in this directory demonstrate how to work with AWS Support -using the AWS SDK for JavaScript (v3). +Shows how to use the AWS SDK for JavaScript (v3) to work with AWS Support. -AWS Support offers a range of plans that provide access to tools and expertise that support the success and operational health of your AWS solutions. + + -## ⚠️ Important +*Support provides support for users of Amazon Web Services.* -- Running this code might result in charges to your AWS account. -- 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). +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javascriptv3` folder. + + + + + + ### Get started -- [Hello AWS Support](./hello.js) +* [Hello Support](hello.js#L8) (`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) -- [Add an attachment to a set](actions/add-attachments-to-set.js) -- [Create a case](actions/create-case.js) -- [Describe an attachment](actions/describe-attachment.js) -- [Describe cases](actions/describe-cases.js) -- [Describe communications](actions/describe-communications.js) -- [Describe services](actions/describe-services.js) -- [Describe severity levels](actions/describe-severity-levels.js) -- [Resolve case](actions/resolve-case.js) +* [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`) ### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -- [Get started with AWS Support cases](./scenarios/basic.js) +* [Get started with cases](scenarios/basic.js) ## Run the examples +### Instructions + **Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see [JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). -### Prerequisites +**Run a single action** -- [Set up AWS SDK for JavaScript](../README.rst) -- Run `npm i` to install dependencies. +```bash +node ./actions/ +``` -## Instructions +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ +``` -**Run a single action** + + + +#### Hello Support -1. Run `node ./actions/`. +This example shows you how to get started using Support. -## Tests +```bash +node ./hello.js +``` -⚠️ Running the tests might result in charges to your AWS account. -### Unit tests +#### Get started with cases -1. Run `npm i`. -1. Run `npm test`. +This example shows you how to do the following: -### Integration tests +* Get and display available services and severity levels for cases. +* Create a support case using a selected service, category, and severity level. +* Get and display a list of open cases for the current day. +* Add an attachment set and a communication to the new case. +* Describe the new attachment and communication for the case. +* Resolve the case. +* Get and display a list of resolved cases for the current day. -1. Run `npm i`. -1. Run `npm run integration-test`. + + + + + + + +### 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 `javascriptv3` folder. + + + + + ## Additional resources -- [AWS Support User Guide](https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html) -- [AWS Support API Reference](https://docs.aws.amazon.com/awssupport/latest/APIReference/Welcome.html) -- [Support Client - AWS SDK for JavaScript (v3)](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/support/index.html) +* [Support User Guide](https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html) +* [Support API Reference](https://docs.aws.amazon.com/awssupport/latest/APIReference/welcome.html) +* [SDK for JavaScript (v3) Support reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/support) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/javascriptv3/example_code/transcribe/README.md b/javascriptv3/example_code/transcribe/README.md index b513622be98..3f874a61a6c 100644 --- a/javascriptv3/example_code/transcribe/README.md +++ b/javascriptv3/example_code/transcribe/README.md @@ -1,58 +1,91 @@ -# JavaScript environment for Amazon Transcribe examples -Amazon Transcribe makes it easy for developers to add speech to text capabilities to their applications. + +# Amazon Transcribe code examples for the SDK for JavaScript (v3) -## Code examples -This is a workspace where you can find the following AWS SDK for JavaScript v3 Amazon Transcribe examples: -- [Create Transcribe job](src/transcribe_create_job.js) (StartTranscriptionJobCommand) -- [Create Transcribe medical job](src/transcribe_create_medical_job.js) (StartMedicalTranscriptionJobCommand) -- [Delete Transcribe job](src/transcribe_delete_job.js) (DeleteTranscriptionJobCommand) -- [Delete Transcribe medical job](src/transcribe_delete_medical_job.js) (DeleteMedicalTranscriptionJobCommand) -- [List Transcribe jobs](src/transcribe_list_jobs.js) (ListTranscriptionJobsCommand) -- [List Transcribe medical jobs](src/transcribe_list_medical_jobs.js) (ListMedicalTranscriptionJobsCommand) +## Overview -**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see -[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). +Shows how to use the AWS SDK for JavaScript (v3) to work with Amazon Transcribe. + + + + +*Amazon Transcribe provides transcription services for your audio files and audio streams.* -## Important +## ⚠ Important -- As an AWS best practice, grant this code least privilege, or only the - permissions required to perform a task. For more information, see - [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege) - in the *AWS Identity and Access Management User Guide*. -- This code has not been tested in all AWS Regions. Some AWS services are - available only in specific AWS Regions. For more information, see the - [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) - on the AWS website. -- Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -## Running the code + + + +## Code examples ### Prerequisites -- An AWS account. To create an account, see [How do I create and activate a new AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) on the AWS Premium Support website. -- AWS credentials. For details, see [Setting credentials in Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html) in the - *AWS SDK for Javascript (v3) Developer Guide*. -1. Clone the [AWS SDK Code Samples repo](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. See [the Github documentation](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) for instructions. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javascriptv3` folder. -2. Install the dependencies listed in the package.json. -``` -npm install node -g -cd javascriptv3/example_code/transcribe -npm install -``` -3. In your text editor, update user variables specified in the ```Inputs``` section of the sample file. + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Delete a transcription job](src/libs/transcribeClient.js#L14) (`DeleteTranscriptionJob`) +* [List transcription jobs](src/libs/transcribeClient.js#L14) (`ListTranscriptionJobs`) +* [Start a transcription job](src/libs/transcribeClient.js#L14) (`StartTranscriptionJob`) + +## Run the examples + +### Instructions + +**Note**: All code examples are written in ECMAscript 6 (ES6). For guidelines on converting to CommonJS, see +[JavaScript ES6/CommonJS syntax](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sdk-examples-javascript-syntax.html). -4. Run sample code: +**Run a single action** + +```bash +node ./actions/ ``` -cd src -node [example name].js + +**Run a scenario** +Most scenarios can be run with the following command: +```bash +node ./scenarios/ ``` -## Unit tests -For more information see, the [README](../README.rst). -## Resources -- [AWS SDK for JavaScript v3](https://github.com/aws/aws-sdk-js-v3) -- [AWS SDK for JavaScript v3 Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/sqs-examples.html) -- [AWS SDK for JavaScript v3 API Reference Guide](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/transcribe/index.html) -- [Amazon Transcribe documentation](https://docs.aws.amazon.com/transcribe/) \ No newline at end of file + + + + + +### 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 `javascriptv3` folder. + + + + + + +## Additional resources + +* [Amazon Transcribe Developer Guide](https://docs.aws.amazon.com/transcribe/latest/dg/what-is.html) +* [Amazon Transcribe API Reference](https://docs.aws.amazon.com/transcribe/latest/APIReference/Welcome.html) +* [SDK for JavaScript (v3) Amazon Transcribe reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/transcribe) + + + + +--- + +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/javav2/example_code/cloudfront/Readme.md b/javav2/example_code/cloudfront/Readme.md index 68a867b9f21..b65a79136fa 100644 --- a/javav2/example_code/cloudfront/Readme.md +++ b/javav2/example_code/cloudfront/Readme.md @@ -1,4 +1,4 @@ - + # CloudFront code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon CloudFront. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -47,7 +47,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Sign URLs and cookies](src/main/java/com/example/cloudfront/CreateCannedPolicyRequest.java) +* [Sign URLs and cookies](src/main/java/com/example/cloudfront/CreateCannedPolicyRequest.java) ## Run the examples @@ -67,6 +67,7 @@ This example shows you how to create signed URLs and cookies that allow access t + @@ -75,7 +76,7 @@ This example shows you how to create signed URLs and cookies that allow access t ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../../README.md#tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `javav2` folder. diff --git a/javav2/example_code/cloudwatch/Readme.md b/javav2/example_code/cloudwatch/Readme.md index 6dd98a852cc..314651a8059 100644 --- a/javav2/example_code/cloudwatch/Readme.md +++ b/javav2/example_code/cloudwatch/Readme.md @@ -1,4 +1,4 @@ - + # CloudWatch code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon CloudWatch. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -63,7 +63,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with metrics, dashboards, and alarms](src/main/java/com/example/cloudwatch/CloudWatchScenario.java) +* [Get started with metrics, dashboards, and alarms](src/main/java/com/example/cloudwatch/CloudWatchScenario.java) ## Run the examples @@ -94,6 +94,7 @@ This example shows you how to do the following: + @@ -102,7 +103,7 @@ This example shows you how to do the following: ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../../README.md#tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `javav2` folder. diff --git a/javav2/example_code/comprehend/Readme.md b/javav2/example_code/comprehend/Readme.md index 8a01f60cca0..d0b5eb3b6a0 100644 --- a/javav2/example_code/comprehend/Readme.md +++ b/javav2/example_code/comprehend/Readme.md @@ -1,4 +1,4 @@ - + # Amazon Comprehend code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Comprehend. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -56,7 +56,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../../README.md#tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `javav2` folder. diff --git a/javav2/example_code/dynamodb/Readme.md b/javav2/example_code/dynamodb/Readme.md index f8fc5cb011f..7789742540d 100644 --- a/javav2/example_code/dynamodb/Readme.md +++ b/javav2/example_code/dynamodb/Readme.md @@ -1,9 +1,9 @@ - + # DynamoDB code examples for the SDK for Java 2.x ## Overview -Shows how to use the AWS SDK for Java v2 to work with Amazon DynamoDB. +Shows how to use the AWS SDK for Java 2.x to work with Amazon DynamoDB. @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java v2 to work with Amazon DynamoDB. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -37,7 +37,7 @@ Code excerpts that show you how to call individual service functions. * [Create a table](src/main/java/com/example/dynamodb/CreateTable.java#L69) (`CreateTable`) * [Delete a table](src/main/java/com/example/dynamodb/DeleteTable.java#L56) (`DeleteTable`) * [Delete an item from a table](src/main/java/com/example/dynamodb/DeleteItem.java#L61) (`DeleteItem`) -* [Get an item from a table](src/main/java/com/example/dynamodb/GetItem.java#L73) (`GetItem`) +* [Get an item from a table](src/main/java/com/example/dynamodb/GetItem.java#L67) (`GetItem`) * [Get information about a table](src/main/java/com/example/dynamodb/DescribeTable.java#L58) (`DescribeTable`) * [List tables](src/main/java/com/example/dynamodb/ListTables.java#L44) (`ListTables`) * [Put an item in a table](src/main/java/com/example/dynamodb/PutItem.java#L80) (`PutItem`) @@ -51,9 +51,9 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with tables, items, and queries](src/main/java/com/example/dynamodb/Scenario.java) -* [Query a table by using batches of PartiQL statements](src/main/java/com/example/dynamodb/ScenarioPartiQLBatch.java) -* [Query a table using PartiQL](src/main/java/com/example/dynamodb/ScenarioPartiQ.java) +* [Get started with tables, items, and queries](src/main/java/com/example/dynamodb/Scenario.java) +* [Query a table by using batches of PartiQL statements](src/main/java/com/example/dynamodb/ScenarioPartiQLBatch.java) +* [Query a table using PartiQL](src/main/java/com/example/dynamodb/ScenarioPartiQ.java) ## Run the examples @@ -79,6 +79,7 @@ This example shows you how to do the following: + @@ -94,6 +95,7 @@ This example shows you how to do the following: + @@ -109,6 +111,7 @@ This example shows you how to do the following: + @@ -117,7 +120,7 @@ This example shows you how to do the following: ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../../README.md#tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `javav2` folder. diff --git a/javav2/example_code/ec2/Readme.md b/javav2/example_code/ec2/Readme.md index 71859cda52d..d99da986f15 100644 --- a/javav2/example_code/ec2/Readme.md +++ b/javav2/example_code/ec2/Readme.md @@ -1,4 +1,4 @@ - + # Amazon EC2 code examples for the SDK for Java 2.x ## Overview @@ -8,11 +8,11 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Elastic Compute Cl -Amazon EC2 is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. +*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 -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -62,7 +62,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with instances](src/main/java/com/example/ec2/EC2Scenario.java) +* [Get started with instances](src/main/java/com/example/ec2/EC2Scenario.java) ## Run the examples @@ -91,6 +91,7 @@ This example shows you how to do the following: + diff --git a/javav2/example_code/ecs/Readme.md b/javav2/example_code/ecs/Readme.md index 4fc9a8d0299..d23e6ff381f 100644 --- a/javav2/example_code/ecs/Readme.md +++ b/javav2/example_code/ecs/Readme.md @@ -1,4 +1,4 @@ - + # Amazon ECS code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Elastic Container ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/emr/README.md b/javav2/example_code/emr/README.md index 0520d04da46..660a47f90d1 100644 --- a/javav2/example_code/emr/README.md +++ b/javav2/example_code/emr/README.md @@ -1,4 +1,4 @@ - + # Amazon EMR code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon EMR. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/eventbridge/Readme.md b/javav2/example_code/eventbridge/Readme.md index 4dfc2f083cb..0e560d789ae 100644 --- a/javav2/example_code/eventbridge/Readme.md +++ b/javav2/example_code/eventbridge/Readme.md @@ -1,115 +1,117 @@ - -# EventBridge code examples for the SDK for Java 2.x - -## Overview - -Shows how to use the AWS SDK for Java 2.x to work with Amazon EventBridge. - - - - -*EventBridge is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources.* - -## ⚠ Important - -* Running this code might result in charges to your AWS account. -* 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 `javav2` folder. - - - - - - -### Get started - -* [Hello EventBridge](src/main/java/com/example/eventbridge/HelloEventBridge.java#L23) (`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#L600) (`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#L372) (`DeleteRule`) -* [Disable a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L521) (`DisableRule`) -* [Enable a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L521) (`EnableRule`) -* [List rule names for a target](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L572) (`ListRuleNamesByTarget`) -* [List rules](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L640) (`ListRules`) -* [List targets for a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L586) (`ListTargetsByRule`) -* [Remove targets from a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L383) (`RemoveTargets`) -* [Send events](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L406) (`PutEvents`) - -### Scenarios - -Code examples that show you how to accomplish a specific task by calling multiple -functions within the same service. - -* [Get started with rules and targets](src/main/java/com/example/eventbridge/EventbridgeMVP.java) - -## Run the examples - -### Instructions - - - - - -#### Hello EventBridge - -This example shows you how to get started using EventBridge. - - - -#### Get started with rules and targets - -This example shows you how to do the following: - -* Create a rule and add a target to it. -* Enable and disable rules. -* List and update rules and targets. -* Send events, then 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 `javav2` folder. - - - - - - -## Additional resources - -* [EventBridge User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html) -* [EventBridge API Reference](https://docs.aws.amazon.com/eventbridge/latest/APIReference/Welcome.html) -* [SDK for Java 2.x EventBridge reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/eventbridge/package-summary.html) - - - - ---- - -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - + +# EventBridge code examples for the SDK for Java 2.x + +## Overview + +Shows how to use the AWS SDK for Java 2.x to work with Amazon EventBridge. + + + + +*EventBridge is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javav2` folder. + + + + + + +### Get started + +* [Hello EventBridge](src/main/java/com/example/eventbridge/HelloEventBridge.java#L23) (`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#L603) (`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#L373) (`DeleteRule`) +* [Describe a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L507) (`DescribeRule`) +* [Disable a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L524) (`DisableRule`) +* [Enable a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L524) (`EnableRule`) +* [List rule names for a target](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L575) (`ListRuleNamesByTarget`) +* [List rules](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L643) (`ListRules`) +* [List targets for a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L589) (`ListTargetsByRule`) +* [Remove targets from a rule](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L384) (`RemoveTargets`) +* [Send events](src/main/java/com/example/eventbridge/EventbridgeMVP.java#L407) (`PutEvents`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with rules and targets](src/main/java/com/example/eventbridge/EventbridgeMVP.java) + +## Run the examples + +### Instructions + + + + + +#### Hello EventBridge + +This example shows you how to get started using EventBridge. + + + +#### Get started with rules and targets + +This example shows you how to do the following: + +* Create a rule and add a target to it. +* Enable and disable rules. +* List and update rules and targets. +* Send events, then 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 `javav2` folder. + + + + + + +## Additional resources + +* [EventBridge User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html) +* [EventBridge API Reference](https://docs.aws.amazon.com/eventbridge/latest/APIReference/Welcome.html) +* [SDK for Java 2.x EventBridge reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/eventbridge/package-summary.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/javav2/example_code/firehose/Readme.md b/javav2/example_code/firehose/Readme.md index 0a3808dfa23..6d8d34fbd6b 100644 --- a/javav2/example_code/firehose/Readme.md +++ b/javav2/example_code/firehose/Readme.md @@ -1,4 +1,4 @@ - + # Kinesis Data Firehose code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Kinesis Data Fireh ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/forecast/Readme.md b/javav2/example_code/forecast/Readme.md index bc5ddf2b1a5..3b906e8670d 100644 --- a/javav2/example_code/forecast/Readme.md +++ b/javav2/example_code/forecast/Readme.md @@ -1,77 +1,81 @@ -# Amazon Forecast Java code examples + +# Forecast code examples for the SDK for Java 2.x -This README discusses how to run and test the Java code examples for Amazon Forecast. +## Overview -## Running the Amazon Forecast Java files +Shows how to use the AWS SDK for Java 2.x to work with Amazon Forecast Service. -The credential provider used in all code examples is ProfileCredentialsProvider. For more information, see [Using credentials](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html). + + -**IMPORTANT** +*Forecast a fully managed service that uses statistical and machine learning algorithms to deliver highly accurate time-series forecasts.* -The Java examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +## ⚠ Important -Some of these examples perform *destructive* operations on AWS resources, such as deleting a named query example. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -To run these examples, you can setup your development environment to use Apache Maven or Gradle to configure and build AWS SDK for Java projects. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). + + +## Code examples - ## Testing the Amazon Forecast files +### Prerequisites -You can test the Amazon Forecast Java code examples by running a test file named **ForecastTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/) . +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. -You can run the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test is run, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. - Test 3 passed + + -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and may incur charges on your account._ +### Single actions - ### Properties file -Before running the Amazon Forecast JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define a forecast name used in the tests. If you do not define all values, the JUnit tests fail. +Code excerpts that show you how to call individual service functions. -Define these values to successfully run the JUnit tests: +* [Create a data set](src/main/java/com/example/forecast/CreateDataSet.java#L58) (`CreateDataset`) +* [Create a forecast](src/main/java/com/example/forecast/CreateForecast.java#L57) (`CreateForecast`) +* [Delete a data set](src/main/java/com/example/forecast/DeleteDataset.java#L54) (`DeleteDataset`) +* [Delete a forecast](src/main/java/com/example/forecast/DeleteDataset.java#L54) (`DeleteForecast`) +* [Describe a forecast](src/main/java/com/example/forecast/DescribeForecast.java#L54) (`DescribeForecast`) +* [List data set groups](src/main/java/com/example/forecast/ListDataSetGroups.java#L44) (`ListDatasetGroups`) +* [List forecasts](src/main/java/com/example/forecast/ListForecasts.java#L44) (`ListForecasts`) -- **forecastName** - The name of a forecast used in the tests. -- **predictorARN** - An Amazon Resource Name (ARN) of an existing predictor. -- **dataSet** - The name of a dataset to create. -- **forecastARNToDelete** - An ARN of an existing forecast to delete (you cannot delete the forecast that is created because there is a time delay). +## Run the examples -### Command line -To run the JUnit tests from the command line, you can use the following command. +### Instructions - mvn test -You will see output from the JUnit tests, as shown here. + + - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running ForecastTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- -### Unsuccessful tests -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. +### Tests - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project S3J2Project: There are test failures. - [ERROR]; +⚠ 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 `javav2` folder. + + + + + + +## Additional resources + +* [Forecast User Guide](https://docs.aws.amazon.com/forecast/latest/dg/getting-started.html) +* [Forecast API Reference](https://docs.aws.amazon.com/forecast/latest/dg/api-reference.html) +* [SDK for Java 2.x Forecast reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/forecast/package-summary.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/javav2/example_code/glacier/Readme.md b/javav2/example_code/glacier/Readme.md index f5543520178..20297286d5a 100644 --- a/javav2/example_code/glacier/Readme.md +++ b/javav2/example_code/glacier/Readme.md @@ -1,4 +1,4 @@ - + # S3 Glacier code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon S3 Glacier. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/glue/Readme.md b/javav2/example_code/glue/Readme.md index a1bf8f1ad6d..2aed4b40f19 100644 --- a/javav2/example_code/glue/Readme.md +++ b/javav2/example_code/glue/Readme.md @@ -1,4 +1,4 @@ - + # AWS Glue code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with AWS Glue. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -45,7 +45,7 @@ Code excerpts that show you how to call individual service functions. 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](src/main/java/com/example/glue/GlueScenario.java) +* [Get started with crawlers and jobs](src/main/java/com/example/glue/GlueScenario.java) ## Run the examples @@ -69,6 +69,7 @@ This example shows you how to do the following: + diff --git a/javav2/example_code/iam/Readme.md b/javav2/example_code/iam/Readme.md index e71bfb9a421..971eff69d8d 100644 --- a/javav2/example_code/iam/Readme.md +++ b/javav2/example_code/iam/Readme.md @@ -1,4 +1,4 @@ - + # IAM code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with AWS Identity and Access M ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -81,9 +81,24 @@ This example shows you how to create a user and assume a role. + +#### Work with the IAM Policy Builder API + +This example shows you how to do the following: + +* Create IAM policies by using the object-oriented API. +* Use the IAM Policy Builder API with the IAM service. + + + + + + + + ### Tests ⚠ Running tests might result in charges to your AWS account. diff --git a/javav2/example_code/keyspaces/Readme.md b/javav2/example_code/keyspaces/Readme.md index 6d3ce0e8405..c67c9f2a179 100644 --- a/javav2/example_code/keyspaces/Readme.md +++ b/javav2/example_code/keyspaces/Readme.md @@ -1,79 +1,117 @@ -# Amazon Keyspaces code examples for the SDK for Java + +# Amazon Keyspaces code examples for the SDK for Java 2.x ## Overview -This README discusses how to run and test the AWS SDK for Java (v2) examples for Amazon Keyspaces. -Amazon Keyspaces (for Apache Cassandra) is a scalable, highly available, and managed Apache Cassandra–compatible database service. +Shows how to use the AWS SDK for Java 2.x to work with Amazon Keyspaces (for Apache Cassandra). -## ⚠️ Important -* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/). + + + +*Amazon Keyspaces is a scalable, highly available, and managed Apache Cassandra-compatible database service.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 -The credential provider used in all code examples is ProfileCredentialsProvider. For more information, see [Using credentials](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html). +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. + + + + + ### Get started -- [Hello Amazon Keyspaces](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/HelloKeyspaces.java) (listKeyspaces command) +* [Hello Amazon Keyspaces](src/main/java/com/example/keyspace/HelloKeyspaces.java#L22) (`ListKeyspaces`) -### Single action +### Single actions Code excerpts that show you how to call individual service functions. -- [Create a keyspace](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (createKeyspace command) -- [Create a table](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (createTable command) -- [Delete a keyspace](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (deleteKeyspace command) -- [Delete a table](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (deleteTable command) -- [Get data about a keyspace](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (getKeyspace command) -- [Get data about a table](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (getTable command) -- [List keyspaces](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (listKeyspacesPaginator command) -- [List tables in a keyspace](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (listTablesPaginator command) -- [Restore a table to a point in time](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (restoreTable command) -- [Update a table](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (updateTable command) +* [Create a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L609) (`CreateKeyspace`) +* [Create a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L503) (`CreateTable`) +* [Delete a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L235) (`DeleteKeyspace`) +* [Delete a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L274) (`DeleteTable`) +* [Get data about a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L591) (`GetKeyspace`) +* [Get data about a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L468) (`GetTable`) +* [List keyspaces](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L572) (`ListKeyspaces`) +* [List tables in a keyspace](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L448) (`ListTables`) +* [Restore a table to a point in time](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L324) (`RestoreTable`) +* [Update a table](src/main/java/com/example/keyspace/ScenarioKeyspaces.java#L369) (`UpdateTable`) +### Scenarios -### Scenario +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. - -- [Get started with keyspaces and tables](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/keyspaces/src/main/java/com/example/keyspace/ScenarioKeyspaces.java) (multiple commands) +* [Get started with keyspaces and tables](src/main/java/com/example/keyspace/ScenarioKeyspaces.java) ## Run the examples -### Prerequisites +### Instructions + -To run these examples, set up your development environment. For more information, -see [Get started with the SDK for Java](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/setup.html). + + - These examples requires a **cassandra_truststore.jks** file to make a connection to Amazon Keyspaces. - For more information, see [Using a Cassandra Java client driver to access Amazon Keyspaces programmatically](https://docs.aws.amazon.com/keyspaces/latest/devguide/using_java_driver.html). +#### Hello Amazon Keyspaces -**Be very careful** when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples. +This example shows you how to get started using Amazon Keyspaces. - ## Test the examples - - ⚠️ Running the tests might result in charges to your AWS account. -You can test the Java code example for Amazon Keyspaces by running a test file named **KeyspaceTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). -To successfully run the JUnit tests, define the following values in the test: +#### Get started with keyspaces and tables -- **fileName** - The name of the JSON file that contains movie data. (Get this file from the GitHub repo at resources/sample_file.) -- **keyspaceName** - The name of the keyspace to create. +This example shows you how to do the following: -You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +* Create a keyspace and table. The table schema holds movie data and has point-in-time recovery enabled. +* Connect to the keyspace using a secure TLS connection with SigV4 authentication. +* Query the table. Add, retrieve, and update movie data. +* Update the table. Add a column to track watched movies. +* Restore the table to its previous state and clean up resources. - Test 3 passed + + -**WARNING**: _Running these JUnit tests manipulates real AWS resources and might incur charges on your account._ + + + + +### 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 `javav2` folder. + + + + + ## Additional resources -* [Developer Guide - AWS SDK for Java](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/home.html). -* [Developer Guide - Amazon Keyspaces (for Apache Cassandra)](https://docs.aws.amazon.com/keyspaces/latest/devguide/what-is-keyspaces.html). -* [Interface KeyspacesClient](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/keyspaces/KeyspacesClient.html). -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [Amazon Keyspaces Developer Guide](https://docs.aws.amazon.com/keyspaces/latest/devguide/what-is-keyspaces.html) +* [Amazon Keyspaces API Reference](https://docs.aws.amazon.com/keyspaces/latest/APIReference/Welcome.html) +* [SDK for Java 2.x Amazon Keyspaces reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/keyspaces/package-summary.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/javav2/example_code/kinesis/Readme.md b/javav2/example_code/kinesis/Readme.md index c1aef3119f2..7073e69ed08 100644 --- a/javav2/example_code/kinesis/Readme.md +++ b/javav2/example_code/kinesis/Readme.md @@ -1,4 +1,4 @@ - + # Kinesis code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Kinesis. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/kms/Readme.md b/javav2/example_code/kms/Readme.md index 87c7398a767..f14e480f439 100644 --- a/javav2/example_code/kms/Readme.md +++ b/javav2/example_code/kms/Readme.md @@ -1,4 +1,4 @@ - + # AWS KMS code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with AWS Key Management Servic ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/lambda/Readme.md b/javav2/example_code/lambda/Readme.md index c811d9f3b30..6a13e207551 100644 --- a/javav2/example_code/lambda/Readme.md +++ b/javav2/example_code/lambda/Readme.md @@ -1,110 +1,101 @@ -# Lambda code examples for the SDK for Java + +# Lambda code examples for the SDK for Java 2.x ## Overview -This README discusses how to run and test the AWS SDK for Java (v2) examples for AWS Lambda. -AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. These events may include changes in state or an update, such as a user placing an item in a shopping cart on an e-commerce website. +Shows how to use the AWS SDK for Java 2.x to work with AWS Lambda. -## ⚠️ Important -* The SDK for Java examples perform AWS operations for the account and AWS Region for which you've specified credentials. Running these examples might incur charges on your account. For details about the charges you can expect for a given service and API operation, see [AWS Pricing](https://aws.amazon.com/pricing/). + + + +*Lambda allows you to run code without provisioning or managing servers.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 -The credential provider used in all code examples is ProfileCredentialsProvider. For more information, see [Using credentials](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html). +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. + -### Single action + + -The following examples use the **LambdaClient** object: +### Single actions -- [Creating an AWS Lambda function](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/lambda/src/main/java/com/example/lambda/CreateFunction.java) (CreateFunction command) -- [Deleting an AWS Lambda function](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/lambda/src/main/java/com/example/lambda/DeleteFunction.java) (DeleteFunction command) -- [Getting information about your account](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/lambda/src/main/java/com/example/lambda/GetAccountSettings.java) (GetAccountSettings command) -- [Invoking an AWS Lambda function](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/lambda/src/main/java/com/example/lambda/LambdaInvoke.java) (Invoke command) -- [Performing various operations by using the LambdaClient object](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/lambda/src/main/java/com/example/lambda/LambdaScenario.java) (Multiple commands) -- [Listing AWS Lambda functions](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/lambda/src/main/java/com/example/lambda/ListLambdaFunctions.java) (ListFunctions command) +Code excerpts that show you how to call individual service functions. +* [Create a function](src/main/java/com/example/lambda/CreateFunction.java#L76) (`CreateFunction`) +* [Delete a function](src/main/java/com/example/lambda/DeleteFunction.java#L55) (`DeleteFunction`) +* [Invoke a function](src/main/java/com/example/lambda/LambdaInvoke.java#L62) (`Invoke`) -## Running the AWS Lambda Java files +### Scenarios -Some of these examples perform *destructive* operations on AWS resources, such as deleting an AWS Lambda function. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -To run these examples, set up your development environment. For more information, -see [Get started with the SDK for Java](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/setup.html). +* [Get started with functions](src/main/java/com/example/lambda/LambdaScenario.java) -## Testing the AWS Lambda files +## Run the examples -You can test the Java code examples for AWS Lambda by running a test file named **LambdaTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +### Instructions -You can run the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test is run, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. - Test 3 passed + + -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and may incur charges on your account._ - ### Properties file -Before running the AWS Lambda JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define an function name used for various tests. -If you do not define all values, the JUnit tests fail. -Define the following values to successfully run the JUnit tests: +#### Get started with functions -- **functionNameSc** - The name of a new function name used for the LambdaScenario test (for example, myLambdaSc). -- **functionName** – The name of a new function name (for example, myLambda). -- **bucketName** - The Amazon S3 bucket name that contains the .zip or .jar file used to update the Lambda function's code. -- **key** - The Amazon S3 key name that represents the .zip or .jar file (for example, LambdaHello-1.0-SNAPSHOT.jar). -- **filePath** - The path to the .zip or .jar file where the code is located. -- **role** - The role's Amazon Resource Name (ARN) that has Lambda permissions. -- **handler** - The fully qualifed method name (for example, example.Handler::handleRequest). +This example shows you how to do the following: -**Note**: The **CreateFunction** and **LambdaScenario** tests requires a .zip or .jar file that represents the code of the Lambda function. If you do not have a .zip or .jar file, please refer to the following document: - - https://github.com/aws-doc-sdk-examples/tree/master/javav2/usecases/creating_workflows_stepfunctions +* Create an IAM role and Lambda function, then upload handler code. +* Invoke the function with a single parameter and get results. +* Update the function code and configure with an environment variable. +* Invoke the function with new parameters and get results. Display the returned execution log. +* List the functions for your account, then clean up resources. -### Command line -To run the JUnit tests from the command line, you can use the following command. + + - mvn test -You will see output from the JUnit tests, as shown here. + + - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running LambdaTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- +### Tests -### Unsuccessful tests +⚠ Running tests might result in charges to your AWS account. -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project S3J2Project: There are test failures. - [ERROR]; +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `javav2` folder. + + + + ## Additional resources -* [Developer Guide - AWS SDK for Java](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/home.html). -* [Developer Guide - AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html). -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) +* [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) +* [SDK for Java 2.x Lambda reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/lambda/package-summary.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/javav2/example_code/lookoutvision/Readme.md b/javav2/example_code/lookoutvision/Readme.md index 7b82624b02a..41898b1b83a 100644 --- a/javav2/example_code/lookoutvision/Readme.md +++ b/javav2/example_code/lookoutvision/Readme.md @@ -1,127 +1,69 @@ -# Amazon Lookout for Vision Java code examples + +# Lookout for Vision code examples for the SDK for Java 2.x -This README discusses how to run and test the Java code examples for Amazon Lookout for Vision. +## Overview -## Running the Amazon Lookout for Vision Java files +Shows how to use the AWS SDK for Java 2.x to work with Amazon Lookout for Vision. -**IMPORTANT** + + -The Java examples perform AWS operations for the account and AWS Region for which you've specified credentials. Some examples run AWS services and might incur charge. For details about the charges you can expect for a given service and operation, see the [AWS Pricing page](https://aws.amazon.com/pricing/). +*Lookout for Vision enables you to find visual defects in industrial products, accurately and at scale.* -Some of these examples perform *destructive* operations on AWS resources. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -To run these examples, you can set up your development environment to use Apache Maven or Gradle to configure and build AWS SDK for Java projects. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -Before running the examples and unit tests, we recommend that you read the [Amazon Lookout for Vision documentation](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/what-is.html). To help you understand the Amazon Lookout for Vision API, read [Getting started with the AWS SDK](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/getting-started-sdk.html). We provide example images that you can use. For more information, see [Step 8: (Optional) Prepare example images](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/su-prepare-example-images.html). + + -## Example code structure ## +## Code examples -The following files provide utility classes for managing Amazon Lookout for Vision resources. -- **Models.java** - A class of static functions that manage Amazon Lookout for Vision models. -- **Projects.java** - A class of static functions that manage Amazon Lookout for Vision projects. -- **Datasets.java** - A class of static functions that manage Amazon Lookout for Vision datasets. -- **Hosting.java** - A class of static functions that manage the hosting of Amazon Lookout for Vision models. -- **EdgePackages.java** - A class of static functions that manage Amazon Lookout for Vision edge packaging jobs. +### Prerequisites -The following examples use the utility classes to show how to use the Amazon Lookout for Vision API. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. -- **CreateDataset.java** - Shows how to create an Amazon Lookout for Vision dataset with [CreateDataset](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_CreateDataset.html). You must have a manifest file to train the model. We provide a [script](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/ex-csv-manifest.html) that creates a manifest file from a .csv file. For more information, see [Creating a manifest file](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/manifest-files.html). -- **CreateModel.java** - Shows how to create an Amazon Lookout for Vision model with [CreateModel](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_CreateModel.html). You are charged for the amount of time it takes to successfully train a model. -- **CreateProject.java** - Shows how to create an Amazon Lookout for Vision project with [CreateProject](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_CreateProject.html). -- **DeleteDataset.java** - Shows how to delete an Amazon Lookout for Vision dataset with [DeleteDataset](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_DeleteDataset.html). -- **DeleteModel.java** - Shows how to delete an Amazon Lookout for Vision model with [DeleteModel](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_DeleteModel.html). -- **DeleteProject.java** - Shows how to delete an Amazon Lookout for Vision project with [DeleteProject](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_DeleteProject.html). -- **DescribeDataset.java** - Shows how to get information about an Amazon Lookout for Vision dataset with [DescribeDataset](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_DescribeDataset.html). -- **DescribeModel.java** - Shows how to get information about an Amazon Lookout for Vision model with [DescribeModel](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_DescribeModel.html). -- **DescribeModelPackagingJob.java** - Shows how to get information about an Amazon Lookout for Vision model packaging job with [DescribeModelPackagingJob](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_DescribeModelPackagingJob.html). -- **DescribeProject.java** - Shows how to get information about an Amazon Lookout for Vision project with [DescribeProject](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_DescribeProject.html). -- **DetectAnomalies.java** - Shows how to analyze an image for anomalies with [DetectAnomalies](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_DetectAnomalies.html). The configuration file is -is **analysis-config.json** in the **resources** folder. For more information, see [Determining if an image is anomalous](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/inference-determine-anomaly-state.html). -- **ListDatasetEntries.java** - Shows how to list the JSON lines in an Amazon Lookout for Vision dataset with [ListDatasetEntries](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_ListDatasetEntries.html). -- **ListModelPackagingJobs.java** - Shows how to list the Amazon Lookout for Vision model packaging jobs in a project with [ListModelPackagingJobs](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_ListModelPackagingJobs.html). -- **ListModelTags.java** - Shows how to list tags attached to an Amazon Lookout for Vision model with [ListTagsForResource](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_ListTagsForResource.html). -- **ListModels.java** - Shows how to list the Amazon Lookout for Vision models in a project with [ListModels](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_ListModels.html). -- **ListProjects.java** - Shows how to list the Amazon Lookout for Vision projects in the current AWS account and AWS Region with [ListProjects](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_ListProjects.html). -- **ShowAnomalies.java** - Shows how to display classification and segmentation (image masks and anomaly labels) information on an image analyzed by [DetectAnomalies](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_DetectAnomalies.html). For more information, -see [Showing classification and segmentation](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/inference-display-information.html). -- **StartModel.java** - Shows how to start hosting an Amazon Lookout for Vision model with [StartModel](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_StartModel.html). You are charged for the amount of time that your model is hosted. -- **StartModelPackagingJob.java** - Shows how to start a Amazon Lookout for Vision model packaging job with [StartModelPackagingJob](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_StartModelPackagingJob.html). You specify the model packaging job settings in a JSON format file. We provide a template JSON file for a [target device](./src/main/resources/packaging-job-request-device-template.json) (Jetson Xavier) and a template JSON file for a [target platform](./src/main/resources/packaging-job-request-hardware-template.json). For information about the package settings that you can make, see [Packaging your model (SDK)](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/package-job-sdk.html). -- **StopModel.java** - Shows how to stop a hosted Amazon Lookout for Vision model with [StopModel](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_StopModel.html). -- **TagModel.java** - Shows how to attach a tag to an Amazon Lookout for Vision model with [TagResource](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_TagResource.html). -- **UntagModel.java** - Shows how to remove a tag from an Amazon Lookout for Vision model with [UntagResource](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_UntagResource.html). -- **UpdateDatasetEntries.java** - Shows how to update Amazon Lookout for Vision dataset with a manifest file with [UpdateDatasetEntries](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/API_UpdateDatasetEntries.html). + + +## Run the examples - ## Testing the Amazon Lookout for Vision files +### Instructions -You can test the Java code examples for Amazon Lookout for Vision by running a test file named **LookoutVisionTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). -You can run the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test is run, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. + + - Test 3 passed -**WARNING**: _Running these JUnit tests manipulates real Amazon Lookout for Vision models. You are charged for the amount of time it takes to successfully train the test model and for the amount of time the test model is hosted._ - ### Properties file -Before running the Amazon Lookout for Vision JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define an instance name used for various tests. If you do not define all values, the JUnit tests fail. +### Tests -Define these values to successfully run the JUnit tests: +⚠ Running tests might result in charges to your AWS account. -- **projectName** - The name of the project to create in the tests. -- **modelDescription** - A description for the model. -- **modelTrainingOutputBucket** - The Amazon S3 bucket in which to place the training results. -- **modelTrainingOutputFolder** - The folder in modelTrainingOutputBucket in which to place the training results. -- **photo** - The location of an image to analyze with the trained model. -- **anomalousPhoto** = The location of an anomalous image to analyze with the trained model. -- **anomalyLabel** = The label for an anomaly in the project. -- **manifestFile** - The location of a local manifest file that is used to populate the training dataset. For more information, see [Creating a manifest file](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/manifest-files.html). -- **modelPackageJobJsonFile** - The location of the edge packaging Job request JSON file. We provide a template JSON file for a [target device](./src/main/resources/packaging-job-request-device-template.json) (Jetson Xavier) and a template JSON file for a [target platform](./src/main/resources/packaging-job-request-hardware-template.json). To successfully run the model packaging job test, make sure that the value of **ModelVersion** is "1". Each time you run the test, you must change the value of **ComponentVersion** and **JobName**. For information about the package settings that you can make, see [Packaging your model (SDK)](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/package-job-sdk.html). +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `javav2` folder. -If you want to use the project, dataset, and model that the testing creates, disable the following tests: -- **deleteDataset_thenNotFound()** -- **deleteModel_thenNotFound()** -- **deleteProject_thenNotFound()** -### Command line -To run the JUnit tests from the command line, you can use the following command. + + - mvn test +## Additional resources -You will see output from the JUnit tests, as shown here. +* [Lookout for Vision Developer Guide](https://docs.aws.amazon.com/lookout-for-vision/latest/developer-guide/what-is.html) +* [Lookout for Vision API Reference](https://docs.aws.amazon.com/lookout-for-vision/latest/APIReference/Welcome.html) +* [SDK for Java 2.x Lookout for Vision reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/lookoutvision/package-summary.html) - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running LookoutVisionTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- - -### Unsuccessful tests - -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. - - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project S3J2Project: There are test failures. - [ERROR]; + + + +--- + +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/javav2/example_code/mediaconvert/Readme.md b/javav2/example_code/mediaconvert/Readme.md index bff97005a61..4c434c8daad 100644 --- a/javav2/example_code/mediaconvert/Readme.md +++ b/javav2/example_code/mediaconvert/Readme.md @@ -1,4 +1,4 @@ - + # MediaConvert code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with AWS Elemental MediaConver ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/opensearch/Readme.md b/javav2/example_code/opensearch/Readme.md index 6d7cc743b93..b674240fb54 100644 --- a/javav2/example_code/opensearch/Readme.md +++ b/javav2/example_code/opensearch/Readme.md @@ -1,15 +1,78 @@ -# Amazon OpenSearch Java code examples + +# OpenSearch code examples for the SDK for Java 2.x -This README discusses how to run the Java code examples for Amazon OpenSearch. +## Overview -## Running the Amazon OpenSearch Java files +Shows how to use the AWS SDK for Java 2.x to work with Amazon OpenSearch Service. -**IMPORTANT** + + -The Java code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*OpenSearch is a distributed, community-driven, Apache 2.0-licensed, 100% open-source search and analytics suite used for a broad set of use cases like real-time application monitoring, log analytics, and website search.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting an # Amazon OpenSearch domain. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -To run these examples, you can setup your development environment. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `javav2` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a domain](src/main/java/com/example/search/CreateDomain.java#L57) (`CreateDomain`) +* [Delete a domain](src/main/java/com/example/search/DeleteDomain.java#L53) (`DeleteDomain`) +* [List domains](src/main/java/com/example/search/ListDomainNames.java#L43) (`ListDomainNames`) +* [Modify a cluster configuration](src/main/java/com/example/search/UpdateDomain.java#L55) (`UpdateDomainConfig`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `javav2` folder. + + + + + + +## Additional resources + +* [OpenSearch User Guide](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/gsg.html) +* [OpenSearch API Reference](https://docs.aws.amazon.com/opensearch-service/latest/APIReference/Welcome.html) +* [SDK for Java 2.x OpenSearch reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/opensearch/package-summary.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/javav2/example_code/personalize/Readme.md b/javav2/example_code/personalize/Readme.md index a3a39cc5237..01a504ce2bd 100644 --- a/javav2/example_code/personalize/Readme.md +++ b/javav2/example_code/personalize/Readme.md @@ -1,4 +1,4 @@ - + # Amazon Personalize code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Personalize. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/pinpoint/Readme.md b/javav2/example_code/pinpoint/Readme.md index f6dc6082efe..710e12272a0 100644 --- a/javav2/example_code/pinpoint/Readme.md +++ b/javav2/example_code/pinpoint/Readme.md @@ -1,4 +1,4 @@ - + # Amazon Pinpoint code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Pinpoint. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/polly/Readme.md b/javav2/example_code/polly/Readme.md index 8f962f5c820..af4601c95fa 100644 --- a/javav2/example_code/polly/Readme.md +++ b/javav2/example_code/polly/Readme.md @@ -1,4 +1,4 @@ - + # Amazon Polly code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Polly. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -30,6 +30,14 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Get voices available for synthesis](src/main/java/com/example/polly/DescribeVoicesSample.java#L45) (`DescribeVoices`) +* [List pronunciation lexicons](src/main/java/com/example/polly/ListLexicons.java#L43) (`ListLexicons`) +* [Synthesize speech from text](src/main/java/com/example/polly/PollyDemo.java#L56) (`SynthesizeSpeech`) + ## Run the examples ### Instructions diff --git a/javav2/example_code/rds/Readme.md b/javav2/example_code/rds/Readme.md index c42c18bc4f5..3bdce260e0f 100644 --- a/javav2/example_code/rds/Readme.md +++ b/javav2/example_code/rds/Readme.md @@ -1,4 +1,4 @@ - + # Amazon RDS code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Relational Databas ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -34,28 +34,28 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav Code excerpts that show you how to call individual service functions. -* [Create a DB instance](src/main/java/com/example/rds/CreateDBSnapshot.java#L56) (`CreateDBInstance`) -* [Create a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L519) (`CreateDBParameterGroup`) -* [Create a snapshot of a DB instance](src/main/java/com/example/rds/RDSScenario.java#L296) (`CreateDBSnapshot`) +* [Create a DB instance](src/main/java/com/example/rds/CreateDBInstance.java#L45) (`CreateDBInstance`) +* [Create a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L547) (`CreateDBParameterGroup`) +* [Create a snapshot of a DB instance](src/main/java/com/example/rds/RDSScenario.java#L325) (`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#L54) (`DeleteDBInstance`) -* [Delete a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L194) (`DeleteDBParameterGroup`) +* [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#L42) (`DescribeDBInstances`) -* [Describe DB parameter groups](src/main/java/com/example/rds/RDSScenario.java#L497) (`DescribeDBParameterGroups`) -* [Describe database engine versions](src/main/java/com/example/rds/RDSScenario.java#L539) (`DescribeDBEngineVersions`) -* [Describe options for DB instances](src/main/java/com/example/rds/RDSScenario.java#L409) (`DescribeOrderableDBInstanceOptions`) -* [Describe parameters in a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L459) (`DescribeDBParameters`) +* [Describe DB parameter groups](src/main/java/com/example/rds/RDSScenario.java#L525) (`DescribeDBParameterGroups`) +* [Describe database engine versions](src/main/java/com/example/rds/RDSScenario.java#L567) (`DescribeDBEngineVersions`) +* [Describe options for DB instances](src/main/java/com/example/rds/RDSScenario.java#L437) (`DescribeOrderableDBInstanceOptions`) +* [Describe parameters in a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L487) (`DescribeDBParameters`) * [Modify a DB instance](src/main/java/com/example/rds/ModifyDBInstance.java#L56) (`ModifyDBInstance`) * [Reboot a DB instance](src/main/java/com/example/rds/RebootDBInstance.java#L54) (`RebootDBInstance`) * [Retrieve attributes](src/main/java/com/example/rds/DescribeAccountAttributes.java#L43) (`DescribeAccountAttributes`) -* [Update parameters in a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L432) (`ModifyDBParameterGroup`) +* [Update parameters in a DB parameter group](src/main/java/com/example/rds/RDSScenario.java#L460) (`ModifyDBParameterGroup`) ### Scenarios Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with DB instances](src/main/java/com/example/rds/RDSScenario.java) +* [Get started with DB instances](src/main/java/com/example/rds/RDSScenario.java) ## Run the examples @@ -79,6 +79,7 @@ This example shows you how to do the following: + diff --git a/javav2/example_code/redshift/Readme.md b/javav2/example_code/redshift/Readme.md index c773d792d38..a3c36cd1e42 100644 --- a/javav2/example_code/redshift/Readme.md +++ b/javav2/example_code/redshift/Readme.md @@ -1,4 +1,4 @@ - + # Amazon Redshift code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Redshift. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -34,10 +34,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#L69) (`CreateCluster`) +* [Create a cluster](src/main/java/com/example/redshift/CreateAndModifyCluster.java#L96) (`CreateCluster`) * [Delete a cluster](src/main/java/com/example/redshift/DeleteCluster.java#L54) (`DeleteCluster`) * [Describe your clusters](src/main/java/com/example/redshift/DescribeClusters.java#L43) (`DescribeClusters`) -* [Modify a cluster](src/main/java/com/example/redshift/CreateAndModifyCluster.java#L129) (`ModifyCluster`) +* [Modify a cluster](src/main/java/com/example/redshift/CreateAndModifyCluster.java#L155) (`ModifyCluster`) ## Run the examples diff --git a/javav2/example_code/rekognition/Readme.md b/javav2/example_code/rekognition/Readme.md index 77256de18ed..f22da69a450 100644 --- a/javav2/example_code/rekognition/Readme.md +++ b/javav2/example_code/rekognition/Readme.md @@ -1,4 +1,4 @@ - + # Amazon Rekognition code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Rekognition. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -55,7 +55,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Detect information in videos](src/main/java/com/example/rekognition/VideoCelebrityDetection.java) +* [Detect information in videos](src/main/java/com/example/rekognition/VideoCelebrityDetection.java) ## Run the examples @@ -78,6 +78,7 @@ This example shows you how to do the following: + diff --git a/javav2/example_code/s3/README.md b/javav2/example_code/s3/README.md index 4ad4b9c1973..06f660bc583 100644 --- a/javav2/example_code/s3/README.md +++ b/javav2/example_code/s3/README.md @@ -1,4 +1,4 @@ - + # Amazon S3 code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Simple Storage Ser ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -40,16 +40,17 @@ Code excerpts that show you how to call individual service functions. * [Copy an object from one bucket to another](src/main/java/com/example/s3/CopyObject.java#L61) (`CopyObject`) * [Create a bucket](src/main/java/com/example/s3/CreateBucket.java#L61) (`CreateBucket`) * [Delete a policy from a bucket](src/main/java/com/example/s3/DeleteBucketPolicy.java#L55) (`DeleteBucketPolicy`) -* [Delete an empty bucket](src/main/java/com/example/s3/S3BucketOps.java#L91) (`DeleteBucket`) +* [Delete an empty bucket](src/main/java/com/example/s3/S3BucketDeletion.java#L12) (`DeleteBucket`) * [Delete multiple objects](src/main/java/com/example/s3/DeleteMultiObjects.java#L59) (`DeleteObjects`) * [Delete the website configuration from a bucket](src/main/java/com/example/s3/DeleteWebsiteConfiguration.java#L56) (`DeleteBucketWebsite`) * [Determine the existence and content type of an object](src/main/java/com/example/s3/GetObjectContentType.java#L59) (`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#L53) (`PutBucketNotificationConfiguration`) * [Get an object from a bucket](src/main/java/com/example/s3/GetObjectData.java#L66) (`GetObject`) * [Get the ACL of a bucket](src/main/java/com/example/s3/GetAcl.java#L61) (`GetBucketAcl`) * [Get the policy for a bucket](src/main/java/com/example/s3/GetBucketPolicy.java#L58) (`GetBucketPolicy`) * [List in-progress multipart uploads](src/main/java/com/example/s3/ListMultipartUploads.java#L56) (`ListMultipartUploads`) -* [List objects in a bucket](src/main/java/com/example/s3/ListObjects.java#L56) (`ListObjects`) +* [List objects in a bucket](src/main/java/com/example/s3/ListObjects.java#L56) (`ListObjectsV2`) * [Restore an archived copy of an object](src/main/java/com/example/s3/RestoreObject.java#L67) (`RestoreObject`) * [Set a new ACL for a bucket](src/main/java/com/example/s3/SetAcl.java#L64) (`PutBucketAcl`) * [Set the website configuration for a bucket](src/main/java/com/example/s3/SetWebsiteConfiguration.java#L59) (`PutBucketWebsite`) @@ -61,8 +62,9 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a presigned URL](src/main/java/com/example/s3/GeneratePresignedUrlAndUploadObject.java) -* [Get started with buckets and objects](src/main/java/com/example/s3/S3Scenario.java) +* [Create a presigned URL](src/main/java/com/example/s3/GeneratePresignedUrlAndUploadObject.java) +* [Get started with buckets and objects](src/main/java/com/example/s3/S3Scenario.java) +* [Upload or download large files](src/main/java/com/example/s3/transfermanager/DownloadToDirectory.java) ## Run the examples @@ -82,6 +84,7 @@ This example shows you how to create a presigned URL for Amazon S3 and upload an + @@ -98,9 +101,22 @@ This example shows you how to do the following: + +#### Upload or download large files + +This example shows you how to upload or download large files to and from Amazon S3. + + + + + + + + + ### Tests ⚠ Running tests might result in charges to your AWS account. diff --git a/javav2/example_code/sagemaker/Readme.md b/javav2/example_code/sagemaker/Readme.md index a8b9d4152e0..943bb0330b0 100644 --- a/javav2/example_code/sagemaker/Readme.md +++ b/javav2/example_code/sagemaker/Readme.md @@ -1,85 +1,112 @@ -# Amazon SageMaker Java code examples + +# SageMaker code examples for the SDK for Java 2.x -This README discusses how to run and test the Java code examples for Amazon SageMaker. +## Overview -## Running the Amazon SageMaker Java files +Shows how to use the AWS SDK for Java 2.x to work with Amazon SageMaker. -**IMPORTANT** + + -The Java examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*SageMaker is a fully managed machine learning service.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a model by running the **DeleteModel** example. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -To run these examples, you can setup your development environment to use Apache Maven or Gradle to configure and build AWS SDK for Java projects. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). + + - ## Testing the Amazon SageMaker Java files +## Code examples -You can test the Java code examples for SageMaker by running a test file named **SageMakerTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +### Prerequisites -You can run the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. - Test 3 passed -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and may incur charges on your account._ + + - ### Properties file -Before running the SageMaker JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define a model name used in the tests. If you do not define all values, the JUnit tests fail. -Define these values to successfully run the JUnit tests: +### Get started -- **image** - The registry path of the Docker image that contains the training algorithm. -- **modelDataUrl** - The Amazon S3 path where the model artifacts, which result from model training, are stored. -- **executionRoleArn** - The Amazon Resource Name (ARN) of the IAM role that SageMaker uses. -- **modelName** - The model name used in various tests. -- **s3UriData** - The Amazon S3 path where the model data is stored and used in the **CreateTrainingJob** test. -- **s3Uri** - The Amazon S3 path where you want SageMaker to store checkpoints. -- **trainingJobName** - The name of the training job. -- **roleArn** - The ARN of the IAM role that SageMaker uses. -- **s3OutputPath** - The output path located in an Amazon S3 bucket (i.e., s3://trainbucket/sagemaker). -- **channelName** - The channel name. - - **trainingImage** - The training image. +* [Hello SageMaker](src/main/java/com/example/sage/HelloSageMaker.java#L22) (`ListNotebookInstances`) +### Single actions -**Note**: To set up the model data and other requirements needed for the unit tests, follow [Build, train, and deploy a machine learning model](https://aws.amazon.com/getting-started/hands-on/build-train-deploy-machine-learning-model-sagemaker/). +Code excerpts that show you how to call individual service functions. -### Command line -To run the JUnit tests from the command line, you can use the following command. +* [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`) - mvn test +### Scenarios -You will see output from the JUnit tests, as shown here. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running SageMakerTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- +* [Get started with geospatial jobs and pipelines](../../usecases/workflow_sagemaker_pipes/src/main/java/com/example/sage/SagemakerWorkflow.java) -### Unsuccessful tests +## Run the examples -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. +### Instructions - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project SageMakerServiceIntegrationTest: There are test failures. - [ERROR]; \ No newline at end of file + + + + +#### Hello SageMaker + +This example shows you how to get started using SageMaker. + + + +#### Get started with geospatial jobs and pipelines + +This example shows you how to do the following: + +* Set up resources for a pipeline. +* Set up a pipeline that executes a geospatial job. +* Start a pipeline execution. +* Monitor the status of the execution. +* View the output of the pipeline. +* 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 `javav2` folder. + + + + + + +## Additional resources + +* [SageMaker Developer Guide](https://docs.aws.amazon.com/sagemaker/latest/dg/whatis.html) +* [SageMaker API Reference](https://docs.aws.amazon.com/sagemaker/latest/APIReference/Welcome.html) +* [SDK for Java 2.x SageMaker reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/sagemaker/package-summary.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/javav2/example_code/ses/Readme.md b/javav2/example_code/ses/Readme.md index b4dccc27f51..e95fd686e7b 100644 --- a/javav2/example_code/ses/Readme.md +++ b/javav2/example_code/ses/Readme.md @@ -1,4 +1,4 @@ - + # Amazon SES code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Simple Email Servi ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/javav2/example_code/sns/Readme.md b/javav2/example_code/sns/Readme.md index e2aedda5d1b..30ad79a34a6 100644 --- a/javav2/example_code/sns/Readme.md +++ b/javav2/example_code/sns/Readme.md @@ -1,4 +1,4 @@ - + # Amazon SNS code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Simple Notificatio ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -30,6 +30,11 @@ 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`) + ### Single actions Code excerpts that show you how to call individual service functions. @@ -49,7 +54,7 @@ Code excerpts that show you how to call individual service functions. * [Publish to a topic](src/main/java/com/example/sns/PublishTopic.java#L54) (`Publish`) * [Set a dead-letter queue for a subscription](None) (`SetSubscriptionAttributesRedrivePolicy`) * [Set a filter policy](src/main/java/com/example/sns/UseMessageFilterPolicy.java#L53) (`SetSubscriptionAttributes`) -* [Set the default settings for sending SMS messages](src/main/java/com/example/sns/SetSMSAttributes.java#L28) (`SetSmsAttributes`) +* [Set the default settings for sending SMS messages](src/main/java/com/example/sns/SetSMSAttributes.java#L28) (`SetSMSAttributes`) * [Set topic attributes](src/main/java/com/example/sns/SetTopicAttributes.java#L59) (`SetTopicAttributes`) * [Subscribe a Lambda function to a topic](src/main/java/com/example/sns/SubscribeLambda.java#L56) (`Subscribe`) * [Subscribe an HTTP endpoint to a topic](src/main/java/com/example/sns/SubscribeHTTPS.java#L55) (`Subscribe`) @@ -60,10 +65,9 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Demonstrates how to perform various Amazon Simple Notification Service (Amazon SNS) operations.](src/main/java/com/example/sns/SNSWorkflow.java) -* [Create a platform endpoint for push notifications](src/main/java/com/example/sns/RegistrationExample.java) -* [Create and publish to a FIFO topic](src/main/java/com/example/sns/CreateFIFOTopic.java) -* [Publish SMS messages to a topic](src/main/java/com/example/sns/CreateTopic.java) +* [Create a platform endpoint for push notifications](src/main/java/com/example/sns/RegistrationExample.java) +* [Create and publish to a FIFO topic](src/main/java/com/example/sns/PriceUpdateExample.java) +* [Publish SMS messages to a topic](src/main/java/com/example/sns/CreateTopic.java) ## Run the examples @@ -73,6 +77,10 @@ functions within the same service. +#### Hello Amazon SNS + +This example shows you how to get started using Amazon SNS. + #### Create a platform endpoint for push notifications @@ -83,6 +91,7 @@ This example shows you how to create a platform endpoint for Amazon SNS push not + @@ -94,6 +103,7 @@ This example shows you how to create and publish to a FIFO Amazon SNS topic. + @@ -108,6 +118,7 @@ This example shows you how to do the following: + diff --git a/javav2/example_code/sqs/Readme.md b/javav2/example_code/sqs/Readme.md index 7894626186a..85ff3d56783 100644 --- a/javav2/example_code/sqs/Readme.md +++ b/javav2/example_code/sqs/Readme.md @@ -1,4 +1,4 @@ - + # Amazon SQS code examples for the SDK for Java 2.x ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Java 2.x to work with Amazon Simple Queue Servi ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -30,18 +30,23 @@ 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`) + ### Single actions Code excerpts that show you how to call individual service functions. * [Create a queue](src/main/java/com/example/sqs/SQSExample.java#L60) (`CreateQueue`) * [Delete a message from a queue](src/main/java/com/example/sqs/SQSExample.java#L197) (`DeleteMessage`) -* [Delete a queue](src/main/java/com/example/sqs/DeleteQueue.java#L13) (`DeleteQueue`) +* [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#L76) (`GetQueueUrl`) * [List queues](src/main/java/com/example/sqs/SQSExample.java#L91) (`ListQueues`) * [Receive messages from a queue](src/main/java/com/example/sqs/SQSExample.java#L160) (`ReceiveMessage`) * [Send a batch of messages to a queue](src/main/java/com/example/sqs/SQSExample.java#L141) (`SendMessageBatch`) -* [Send a message to a queue](src/main/java/com/example/sqs/SendReceiveMessages.java#L41) (`SendMessage`) +* [Send a message to a queue](src/main/java/com/example/sqs/SendMessages.java#L55) (`SendMessage`) ## Run the examples @@ -51,6 +56,10 @@ Code excerpts that show you how to call individual service functions. +#### Hello Amazon SQS + +This example shows you how to get started using Amazon SQS. + ### Tests diff --git a/javav2/example_code/ssm/Readme.md b/javav2/example_code/ssm/Readme.md index 4a32fcf0da2..0d8711cef72 100644 --- a/javav2/example_code/ssm/Readme.md +++ b/javav2/example_code/ssm/Readme.md @@ -1,74 +1,79 @@ -# AWS Systems Manager Java code examples + +# Systems Manager code examples for the SDK for Java 2.x -This README discusses how to run and test the Java code examples for AWS Systems Manager. +## Overview -## Running the AWS Systems Manager Java files +Shows how to use the AWS SDK for Java 2.x to work with AWS Systems Manager. -**IMPORTANT** + + -The Java examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Systems Manager organizes, monitors, and automates management tasks on your AWS resources.* -To run these examples, you can setup your development environment to use Apache Maven or Gradle to configure and build AWS SDK for Java projects. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). +## ⚠ Important +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). - ## Testing the AWS Systems Manager Java files + + -You can test the Java code examples for AWS Systems Manager by running a test file named **AWSSSMIntegrationTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +## Code examples -You can run the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +### Prerequisites - Test 3 passed +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and may incur charges on your account._ - ### Properties file -Before running the AWS Systems Manager JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define a parameter name used in the tests. If you do not define all values, the JUnit tests fail. + + -Define these values to successfully run the JUnit tests: +### Single actions -- **paraName** - A parameter name used in the **GetParameter** test. -- **source** - The origin of the OpsItem, such as Amazon EC2 or Systems Manager. -- **category** - A category to assign to an OpsItem. -- **severity** - A severity value to assign to an OpsItem. -- **title** - The OpsItem title. +Code excerpts that show you how to call individual service functions. -### Command line -To run the JUnit tests from the command line, you can use the following command. +* [Add a parameter](src/main/java/com/example/ssm/PutParameter.java#L49) (`PutParameter`) +* [Create a new OpsItem](src/main/java/com/example/ssm/CreateOpsItem.java#L62) (`CreateOpsItem`) +* [Describe an OpsItem](src/main/java/com/example/ssm/DescribeOpsItems.java#L45) (`DescribeOpsItems`) +* [Get parameters information](src/main/java/com/example/ssm/GetParameter.java#L55) (`DescribeParameters`) +* [Updates an OpsItem](src/main/java/com/example/ssm/ResolveOpsItem.java#L54) (`UpdateOpsItem`) - mvn test +## Run the examples -You will see output from the JUnit tests, as shown here. +### Instructions - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running AWSSSMIntegrationTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- -### Unsuccessful tests + + -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project AWSSSMIntegrationTest: There are test failures. - [ERROR]; + +### 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 `javav2` folder. + + + + + + +## Additional resources + +* [Systems Manager User Guide](https://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html) +* [Systems Manager API Reference](https://docs.aws.amazon.com/systems-manager/latest/APIReference/Welcome.html) +* [SDK for Java 2.x Systems Manager reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/ssm/package-summary.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/javav2/example_code/sts/Readme.md b/javav2/example_code/sts/Readme.md index ee111e8ed9e..1463d1ca68f 100644 --- a/javav2/example_code/sts/Readme.md +++ b/javav2/example_code/sts/Readme.md @@ -1,73 +1,75 @@ -# AWS Security Token Service Java code examples + +# AWS STS code examples for the SDK for Java 2.x -This README discusses how to run and test the Java code examples for AWS Security Token Service. +## Overview -## Running the AWS Security Token Service Java files +Shows how to use the AWS SDK for Java 2.x to work with AWS Security Token Service (AWS STS). -**IMPORTANT** + + -The Java examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*AWS STS creates and provides trusted users with temporary security credentials that can control access to your AWS resources.* -To run these examples, you can setup your development environment to use Apache Maven or Gradle to configure and build AWS SDK for Java projects. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). +## ⚠ Important +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). - ## Testing the AWS Security Token Service files + + -You can test the Java code examples for AWS Security Token Service by running a test file named **STSServiceTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +## Code examples -You can execute the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test is ran, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +### Prerequisites - Test 3 passed +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and may incur charges on your account._ - ### Properties file -Before running the AWS Security Token Service JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to execute the JUnit tests. For example, you define a the **roleArn** value used in the tests. If you do not define all values, the JUnit tests fail. + + -Define these values to successfully run the JUnit tests: +### Single actions -- **roleArn** - The Amazon Resource Name (ARN) of the role to assume. -- **accessKeyId** – The identifier of an access key. -- **roleSessionName** – An identifier for the assumed role session. +Code excerpts that show you how to call individual service functions. -### Command line -To execute the JUnit tests from the command line, you can use the following command. +* [Assume a role](src/main/java/com/example/sts/AssumeRole.java#L82) (`AssumeRole`) - mvn test +## Run the examples -You will see output from the JUnit tests, as shown here. +### Instructions - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running STSServiceTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- -### Unsuccessful tests + + -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project S3J2Project: There are test failures. - [ERROR]; +### 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 `javav2` folder. + + + + + + +## Additional resources + +* [AWS STS User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) +* [AWS STS API Reference](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) +* [SDK for Java 2.x AWS STS reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/sts/package-summary.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/javav2/example_code/support/Readme.md b/javav2/example_code/support/Readme.md index f9175ea623a..4908ddabbe9 100644 --- a/javav2/example_code/support/Readme.md +++ b/javav2/example_code/support/Readme.md @@ -1,74 +1,118 @@ -# AWS Support code examples for the SDK for Java + +# Support code examples for the SDK for Java 2.x ## Overview -This README discusses how to run and test the AWS SDK for Java (v2) examples for AWS Support. -AWS Support is one-on-one, fast-response support from experienced technical support engineers. The service helps customers use AWS's products and features. With pay-by-the-month pricing and unlimited support cases, customers are freed from long-term commitments. +Shows how to use the AWS SDK for Java 2.x to work with AWS Support. -## ⚠️ Important -* The SDK for Java examples perform AWS operations for the account and AWS Region for which you've specified credentials. -* Running these examples might incur charges on your account. For details about the charges you can expect for a given service and API operation, see [AWS Pricing](https://aws.amazon.com/pricing/). -* 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). + + + +*Support provides support for users of Amazon Web Services.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -The credential provider used in all code examples is ProfileCredentialsProvider. For more information, see [Using credentials](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html). +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. + + + + + ### Get started -- [Hello service](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/HelloSupport.java) (describeServices command) +* [Hello Support](src/main/java/com/example/support/HelloSupport.java#L21) (`DescribeServices`) -### Single action +### Single actions Code excerpts that show you how to call individual service functions. -- [Add a communication to a case](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (addCommunicationToCase command) -- [Add an attachment to a set](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (addAttachmentsToSet command) -- [Create a case](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (createCase command) -- [Describe an attachment](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (describeAttachment command) -- [Describe services](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (describeServices command) -- [Describe severity levels](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (describeSeverityLevels command) -- [Describe cases](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (describeCases command) -- [Describe communications](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (describeCommunications command) -- [Resolve case](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (resolveCase command) +* [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 + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -### Scenario +* [Get started with cases](src/main/java/com/example/support/SupportScenario.java) -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +## Run the examples -- [Get started with cases](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/java/com/example/support/SupportScenario.java) (Multiple commands) +### Instructions -## Run the AWS Support Java file -**Be very careful** when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples. + + -To run these examples, set up your development environment. For more information, -see [Get started with the SDK for Java](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/setup.html). +#### Hello Support -In addition, you must have the AWS Business Support Plan to use the AWS Support Java API. For more information, see: https://aws.amazon.com/premiumsupport/plans/. +This example shows you how to get started using Support. - ## Test the AWS Support Java file -You can test the Java code example for AWS Support by running a test file named **SupportTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +#### Get started with cases -You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +This example shows you how to do the following: - Test 3 passed +* Get and display available services and severity levels for cases. +* Create a support case using a selected service, category, and severity level. +* Get and display a list of open cases for the current day. +* Add an attachment set and a communication to the new case. +* Describe the new attachment and communication for the case. +* Resolve the case. +* Get and display a list of resolved cases for the current day. -**WARNING**: _Running these JUnit tests manipulates real AWS resources and might incur charges on your account._ + + - ### Properties file -Before running the JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. If you do not define all values, the JUnit tests fail. -Define this value to successfully run the JUnit tests: + + -- **fileAttachment** - The file can be a simple saved .txt file to use as an email attachment. +### 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 `javav2` folder. + + + + + ## Additional resources -* [Developer Guide - AWS SDK for Java](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/home.html). -* [Developer Guide - AWS Support](https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html). -* [Interface SupportClient](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/support/SupportClient.html). -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [Support User Guide](https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html) +* [Support API Reference](https://docs.aws.amazon.com/awssupport/latest/APIReference/welcome.html) +* [SDK for Java 2.x Support reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/support/package-summary.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/javav2/example_code/textract/Readme.md b/javav2/example_code/textract/Readme.md index cb0a9e28de9..02d45b178e3 100644 --- a/javav2/example_code/textract/Readme.md +++ b/javav2/example_code/textract/Readme.md @@ -1,72 +1,77 @@ -# Amazon Textract Java code examples + +# Amazon Textract code examples for the SDK for Java 2.x -This README discusses how to run and test the Java code examples for Amazon Textract. +## Overview -## Running the Amazon Textract Java files +Shows how to use the AWS SDK for Java 2.x to work with Amazon Textract. -**IMPORTANT** + + -The Java examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Textract enables you to add document text detection and analysis to your applications.* -To run these examples, you can setup your development environment to use Apache Maven or Gradle to configure and build AWS SDK for Java projects. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). +## ⚠ Important +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). - ## Testing the Amazon Textract Java files + + -You can test the Java code examples for Amazon Textract by running a test file named **AmazonTextractServiceIntegrationTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +## Code examples -You can run the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +### Prerequisites - Test 3 passed +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and may incur charges on your account._ - ### Properties file -Before running the Amazon Textract JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define a cluster id value used in the tests. If you do not define all values, the JUnit tests fail. + + -Define these values to successfully run the JUnit tests: +### Single actions -- **sourceDoc** - The path where the document is located. -- **bucketName** - The name of the S3 bucket that contains the document. -- **docName** - A document name (must be an image, for example, book.png). +Code excerpts that show you how to call individual service functions. -### Command line -To run the JUnit tests from the command line, you can use the following command. +* [Analyze a document](src/main/java/com/example/textract/AnalyzeDocument.java#L65) (`AnalyzeDocument`) +* [Detect text in a document](src/main/java/com/example/textract/DetectDocumentText.java#L65) (`DetectDocumentText`) +* [Start asynchronous analysis of a document](src/main/java/com/example/textract/StartDocumentAnalysis.java#L66) (`StartDocumentAnalysis`) - mvn test +## Run the examples -You will see output from the JUnit tests, as shown here. +### Instructions - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running AmazonTextractServiceIntegrationTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- -### Unsuccessful tests + + -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project AmazonRedshiftServiceIntegrationTest: There are test failures. - [ERROR]; + +### 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 `javav2` folder. + + + + + + +## Additional resources + +* [Amazon Textract Developer Guide](https://docs.aws.amazon.com/textract/latest/dg/what-is.html) +* [Amazon Textract API Reference](https://docs.aws.amazon.com/textract/latest/dg/API_Reference.html) +* [SDK for Java 2.x Amazon Textract reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/textract/package-summary.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/javav2/example_code/transcribe/Readme.md b/javav2/example_code/transcribe/Readme.md index ec4fb107138..ec00c6328e9 100644 --- a/javav2/example_code/transcribe/Readme.md +++ b/javav2/example_code/transcribe/Readme.md @@ -1,28 +1,69 @@ -# Amazon Transcribe Java code examples + +# Amazon Transcribe code examples for the SDK for Java 2.x -This README discusses how to run and test the Java code examples for Amazon Transcribe. +## Overview -## Running the Amazon Transcribe Java files +Shows how to use the AWS SDK for Java 2.x to work with Amazon Transcribe. -**IMPORTANT** + + -The Java examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Transcribe provides transcription services for your audio files and audio streams.* -To run these examples, you can setup your development environment to use Apache Maven or Gradle to configure and build AWS SDK for Java projects. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). +## ⚠ Important +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). - ## Testing the Amazon Transcribe files + + -You can test the Java code examples for Amazon Transcribe by running a test file named **TranscribeTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +## Code examples -You can execute the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. +### Prerequisites -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and may incur charges on your account._ +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. - ### Command line -To execute the JUnit tests from the command line, you can use the following command. - mvn test + + -The second test remains running until you stop the test. You can talk into your microphone and see the results written out on the console. You can manually stop the test. +## Run the examples + +### Instructions + + + + + + + +### 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 `javav2` folder. + + + + + + +## Additional resources + +* [Amazon Transcribe Developer Guide](https://docs.aws.amazon.com/transcribe/latest/dg/what-is.html) +* [Amazon Transcribe API Reference](https://docs.aws.amazon.com/transcribe/latest/APIReference/Welcome.html) +* [SDK for Java 2.x Amazon Transcribe reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/transcribe/package-summary.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/javav2/example_code/translate/Readme.md b/javav2/example_code/translate/Readme.md index a431df41c8b..4b551a2375d 100644 --- a/javav2/example_code/translate/Readme.md +++ b/javav2/example_code/translate/Readme.md @@ -1,73 +1,69 @@ -# Amazon Translate Java code examples + +# Amazon Translate code examples for the SDK for Java 2.x -This README discusses how to run and test the Java code examples for Amazon Translate. +## Overview -## Running the Amazon Translate Java files +Shows how to use the AWS SDK for Java 2.x to work with Amazon Translate. -**IMPORTANT** + + -The Java examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Translate is a neural machine translation service for translating text to and from English across a breadth of supported languages.* -To run these examples, you can setup your development environment to use Apache Maven or Gradle to configure and build AWS SDK for Java projects. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). +## ⚠ Important +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). - ## Testing the Amazon Translate Java files + + -You can test the Java code examples for Amazon Translate by running a test file named **AmazonTranslateTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +## Code examples -You can run the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +### Prerequisites - Test 3 passed +For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder. -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and may incur charges on your account._ - ### Properties file -Before running the Amazon Translate JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define a cluster id value used in the tests. If you do not define all values, the JUnit tests fail. + + -Define these values to successfully run the JUnit tests: +## Run the examples -- **s3Uri** - The URI of the Amazon S3 bucket where the documents to translate are located. -- **s3UriOut** - The URI of the S3 bucket where the translated documents are saved to. -- **jobName** - The job name that translates documents. -- **dataAccessRoleArn** - The Amazon Resource Name (ARN) value of the role required for translation jobs. +### Instructions -### Command line -To run the JUnit tests from the command line, you can use the following command. - mvn test + + -You will see output from the JUnit tests, as shown here. - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running AmazonTranslateTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- -### Unsuccessful tests +### Tests -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. +⚠ Running tests might result in charges to your AWS account. - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project AmazonRedshiftServiceIntegrationTest: There are test failures. - [ERROR]; + +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `javav2` folder. + + + + + + +## Additional resources + +* [Amazon Translate Developer Guide](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) +* [Amazon Translate API Reference](https://docs.aws.amazon.com/translate/latest/APIReference/welcome.html) +* [SDK for Java 2.x Amazon Translate reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/translate/package-summary.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/kotlin/services/cloudwatch/Readme.md b/kotlin/services/cloudwatch/Readme.md index 56db9f98c42..287043b48b9 100644 --- a/kotlin/services/cloudwatch/Readme.md +++ b/kotlin/services/cloudwatch/Readme.md @@ -1,96 +1,127 @@ + # CloudWatch code examples for the SDK for Kotlin ## Overview -This README discusses how to run and test the AWS SDK for Kotlin examples for Amazon CloudWatch. -Amazon CloudWatch enables you to monitor your complete stack (applications, infrastructure, network, and services) and use alarms, logs, and events data to take automated actions. +Shows how to use the AWS SDK for Kotlin to work with Amazon CloudWatch. -## ⚠️ Important -* Running this code might result in charges to your AWS account. For more information, see [AWS Pricing](https://aws.amazon.com/pricing/). + + + +*CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 `kotlin` folder. + + + + + + ### Get started -- [Hello Amazon CloudWatch](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/HelloService.kt) (listMetricsPaginator command) +* [Hello CloudWatch](bin/main/com/kotlin/cloudwatch/HelloService.kt#L17) (`ListMetrics`) -### Single action +### Single actions Code excerpts that show you how to call individual service functions. -- [Create anomaly detector](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (putAnomalyDetector command) -- [Create a dashboard](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (putDashboard command) -- [Create a metric alarm](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (putMetricAlarm command) -- [Delete alarms](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (createKeyspace command) -- [Delete an anomaly detector](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (deleteAnomalyDetectorRequest command) -- [Delete dashboards](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (deleteDashboards command) -- [Describe alarm history](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (describeAlarmHistory command) -- [Describe alarms](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (describeAlarms command) -- [Describe alarms for a metric](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (describeAlarm command) -- [Describe anomaly detectors](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (describeAnomalyDetectors command) -- [Disable alarm actions](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (disableAlarmActions command) -- [Enable alarm actions](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (enableAlarmActions command) -- [Get metric data](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (getMetricData command) -- [Get metric statistics](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (getMetricStatistics command) -- [Get a metric data image](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (getMetricWidgetImage command) -- [List metrics](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (ListMetrics command) -- [Put data into a metric](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (putMetricData command) +* [Create a dashboard](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L680) (`PutDashboard`) +* [Create a metric alarm](bin/main/com/kotlin/cloudwatch/PutMetricAlarm.kt#L51) (`PutMetricAlarm`) +* [Create an anomaly detector](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L384) (`PutAnomalyDetector`) +* [Delete alarms](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L301) (`DeleteAlarms`) +* [Delete an anomaly detector](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L276) (`DeleteAnomalyDetector`) +* [Delete dashboards](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L314) (`DeleteDashboards`) +* [Describe alarm history](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L409) (`DescribeAlarmHistory`) +* [Describe alarms](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L566) (`DescribeAlarms`) +* [Describe alarms for a metric](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L442) (`DescribeAlarmsForMetric`) +* [Describe anomaly detectors](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L361) (`DescribeAnomalyDetectors`) +* [Disable alarm actions](bin/main/com/kotlin/cloudwatch/DisableAlarmActions.kt#L46) (`DisableAlarmActions`) +* [Enable alarm actions](bin/main/com/kotlin/cloudwatch/EnableAlarmActions.kt#L45) (`EnableAlarmActions`) +* [Get a metric data image](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L326) (`GetMetricWidgetImage`) +* [Get metric data](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L512) (`GetMetricData`) +* [Get metric statistics](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L745) (`GetMetricStatistics`) +* [List dashboards](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L667) (`ListDashboards`) +* [List metrics](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L775) (`ListMetrics`) +* [Put data into a metric](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt#L471) (`PutMetricData`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with metrics, dashboards, and alarms](bin/main/com/kotlin/cloudwatch/CloudWatchScenario.kt) + +## Run the examples +### Instructions -### Scenario -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. + + -- [Get started with billing, alarms, and metrics](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/cloudwatch/src/main/kotlin/com/kotlin/cloudwatch/CloudWatchScenario.kt) (multiple commands) +#### Hello CloudWatch -## Run the examples +This example shows you how to get started using CloudWatch. -### Prerequisites -To run these examples, set up your development environment. For more information, -see [Get started with the SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). -To run these examples, you must have the following three JSON files: jsonWidgets.json, CloudDashboard.json, and settings.json. Find these files in this GitHub repository. The CloudWatch scenario depends on these files. In addition, to enable billing metrics and statistics for the scenario example, make sure billing alerts are enabled for your account. For more information, see [Enabling billing alerts](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html#turning_on_billing_metrics). +#### Get started with metrics, dashboards, and alarms + +This example shows you how to do the following: + +* List CloudWatch namespaces and metrics. +* Get statistics for a metric and for estimated billing. +* Create and update a dashboard. +* Create and add data to a metric. +* Create and trigger an alarm, then view alarm history. +* Add an anomaly detector. +* Get a metric image, then clean up resources. + + + - **Be very careful** when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples. - ## Tests - - ⚠️ Running the tests might result in charges to your AWS account. + + -You can test the Kotlin code example for Amazon CloudWatch by running a test file named **CloudWatchTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/java** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +### Tests -To successfully run the tests, define the following values in the test: +⚠ Running tests might result in charges to your AWS account. -- **logGroup** - The name of the log group to use. For example, **testgroup**. -- **alarmName** – The name of the alarm to use. For example, **AlarmFeb**. -- **instanceId** – The ID of the instance to use. Get this value from the AWS Management Console. For example, **ami-04300000000**. -- **streamName** - The name of the stream to use. This value is used to retrieve log events. -- **ruleResource** – The Amazon Resource Name (ARN) of the user who owns the rule. Get this value from the AWS Management Console. -- **filterName** - The name of the filter to use. -- **destinationArn** - The ARN of the destination. This value is used to create subscription filters. -- **roleArn** - The ARN of the user. This value is used to create subscription filters. -- **filterPattern** - The filter pattern. For example, **Error**. -- **myDateSc** - The start date to use to get metric statistics in the scenario test. (For example, 2023-01-11T18:35:24.00Z.) -- **costDateWeekSc** - The start date to use to get AWS billing statistics. (For example, 2023-01-11T18:35:24.00Z.) -- **dashboardNameSc** - The name of the dashboard to create in the scenario test. -- **dashboardJsonSc** - The location of the jsonWidgets file to use to create a dashboard. -- **dashboardAddSc** - The location of the CloudDashboard.json file to use to update a dashboard. (See Readme file.) -- **settingsSc** - The location of the settings.json file from which various values are read. (See Readme file.) -- **metricImageSc** - The location of a BMP file that is used to create a graph. -You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `kotlin` folder. - Test 3 passed -**WARNING**: _Running these JUnit tests manipulates real AWS resources and might incur charges on your account._ + + + ## Additional resources -* [Developer Guide - AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). -* [User Guide - Amazon CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html). -* [Interface CloudWatchClient](https://sdk.amazonaws.com/kotlin/api/latest/cloudwatch/aws.sdk.kotlin.services.cloudwatch/index.html). -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) +* [CloudWatch API Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) +* [SDK for Kotlin CloudWatch reference](https://sdk.amazonaws.com/kotlin/api/latest/cloudwatch/index.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/kotlin/services/comprehend/Readme.md b/kotlin/services/comprehend/Readme.md index 7d9704b9962..9cde78231c9 100644 --- a/kotlin/services/comprehend/Readme.md +++ b/kotlin/services/comprehend/Readme.md @@ -1,23 +1,69 @@ -# Amazon Comprehend Kotlin code examples + +# Amazon Comprehend code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Comprehend. +## Overview -## Running the Amazon Comprehend Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Comprehend. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Comprehend uses natural language processing (NLP) to extract insights about the content of documents without the need of any special preprocessing.* -Some of these examples perform *destructive* operations on AWS resources. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **DetectEntities** - Demonstrates how to retrieve named entities from within specified text. -- **DetectKeyPhrases** - Demonstrates how to detect key phrases. -- **DetectLanguage** - Demonstrates how to detect the language of the text. -- **DetectSentiment** - Demonstrates how to detect sentiments in the text. -- **DetectSyntax** - Demonstrates how to detect syntax in the text. -- **DocumentClassifierDemo** - demonstrates how to train a custom classifier. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon Comprehend Developer Guide](https://docs.aws.amazon.com/comprehend/latest/dg/what-is.html) +* [Amazon Comprehend API Reference](https://docs.aws.amazon.com/comprehend/latest/APIReference/welcome.html) +* [SDK for Kotlin Amazon Comprehend reference](https://sdk.amazonaws.com/kotlin/api/latest/comprehend/index.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/kotlin/services/dynamodb/Readme.md b/kotlin/services/dynamodb/Readme.md index 5a541b37b7b..34f5f752ee1 100644 --- a/kotlin/services/dynamodb/Readme.md +++ b/kotlin/services/dynamodb/Readme.md @@ -1,28 +1,142 @@ -# Amazon DynamoDB Kotlin code examples + +# DynamoDB code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon DynamoDB. +## Overview -## Running the Amazon DynamoDB Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon DynamoDB. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a table. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CreateTable** - Demonstrates how to create an Amazon DynamoDB table. -- **DeleteItem** - Demonstrates how to delete an item from an Amazon DynamoDB table. -- **DeleteTable** - Demonstrates how to delete an Amazon DynamoDB table. -- **DescribeTable** - Demonstrates how to retrieve information about an Amazon DynamoDB table. -- **DynamoDBScanItems** - Demonstrates how to return items from an Amazon DynamoDB table. -- **DynamoDBScanItemsFilter** - Demonstrates how to return items from an Amazon DynamoDB table using a filter expression. -- **GetItem** - Demonstrates how to retrieve an item from an Amazon DynamoDB table. -- **ListTables** - Demonstrates how to list all Amazon DynamoDB tables. -- **PutItem** - Demonstrates how to place an item into an Amazon DynamoDB table. -- **QueryTable** - Demonstrates how to query an Amazon DynamoDB table. -- **UpdateItem** - Demonstrates how to update a value located in an Amazon DynamoDB table. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a table](bin/main/com/kotlin/dynamodb/CreateTable.kt#L55) (`CreateTable`) +* [Delete a table](bin/main/com/kotlin/dynamodb/DeleteTable.kt#L44) (`DeleteTable`) +* [Delete an item from a table](bin/main/com/kotlin/dynamodb/DeleteItem.kt#L49) (`DeleteItem`) +* [Get an item from a table](bin/main/com/kotlin/dynamodb/GetItem.kt#L50) (`GetItem`) +* [List tables](bin/main/com/kotlin/dynamodb/ListTables.kt#L30) (`ListTables`) +* [Put an item in a table](bin/main/com/kotlin/dynamodb/PutItem.kt#L63) (`PutItem`) +* [Query a table](bin/main/com/kotlin/dynamodb/QueryTable.kt#L54) (`Query`) +* [Scan a table](bin/main/com/kotlin/dynamodb/DynamoDBScanItems.kt#L45) (`Scan`) +* [Update an item in a table](bin/main/com/kotlin/dynamodb/UpdateItem.kt#L57) (`UpdateItem`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with tables, items, and queries](bin/main/com/kotlin/dynamodb/Scenario.kt) +* [Query a table by using batches of PartiQL statements](bin/main/com/kotlin/dynamodb/ScenarioPartiQLBatch.kt) +* [Query a table using PartiQL](bin/main/com/kotlin/dynamodb/ScenarioPartiQ.kt) + +## Run the examples + +### Instructions + + + + + + + +#### Get started with tables, items, and queries + +This example shows you how to do the following: + +* Create a table that can hold movie data. +* Put, get, and update a single movie in the table. +* Write movie data to the table from a sample JSON file. +* Query for movies that were released in a given year. +* Scan for movies that were released in a range of years. +* Delete a movie from the table, then delete the table. + + + + + + + + +#### Query a table by using batches of PartiQL statements + +This example shows you how to do the following: + +* Get a batch of items by running multiple SELECT statements. +* Add a batch of items by running multiple INSERT statements. +* Update a batch of items by running multiple UPDATE statements. +* Delete a batch of items by running multiple DELETE statements. + + + + + + + + +#### Query a table using PartiQL + +This example shows you how to do the following: + +* Get an item by running a SELECT statement. +* Add an item by running an INSERT statement. +* Update an item by running an UPDATE statement. +* Delete an item by running a DELETE statement. + + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) +* [DynamoDB API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html) +* [SDK for Kotlin DynamoDB reference](https://sdk.amazonaws.com/kotlin/api/latest/dynamodb/index.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/kotlin/services/ec2/Readme.md b/kotlin/services/ec2/Readme.md index e75b6dff9b7..c5d8b73cc06 100644 --- a/kotlin/services/ec2/Readme.md +++ b/kotlin/services/ec2/Readme.md @@ -1,130 +1,124 @@ + # Amazon EC2 code examples for the SDK for Kotlin ## Overview -This README discusses how to run and test the AWS SDK for Kotlin code examples for Amazon Elastic Compute Cloud (Amazon EC2). -Amazon EC2 provides secure, resizable compute in the cloud, offering the broadest choice of processor, storage, networking, OS, and purchase model. +Shows how to use the AWS SDK for Kotlin to work with Amazon Elastic Compute Cloud (Amazon EC2). -## ⚠️ Important -* Running this code might result in charges to your AWS account. + + + +*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 + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 -The credential provider used in all code examples is Shared credentials. For more information, see [Using credentials](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/credential-providers.html). +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + ### Get started -- [Hello Amazon EC2](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteSecurityGroup.kt) (describeSecurityGroups command) +* [Hello Amazon EC2](bin/main/com/kotlin/ec2/DescribeSecurityGroups.kt#L46) (`DescribeSecurityGroups`) ### Single actions Code excerpts that show you how to call individual service functions. -- [Allocate an Elastic IP address](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/AllocateAddress.kt) (allocateAddress command) -- [Create an Amazon EC2 instance](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateInstance.kt) (runInstances command) -- [Create an Amazon EC2 key pair](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateKeyPair.kt) (createKeyPair command) -- [Create an Amazon EC2 security group](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/CreateSecurityGroup.kt) (createSecurityGroup command) -- [Delete an Amazon EC2 key pair](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteKeyPair.kt) (deleteKeyPair command) -- [Delete an Amazon EC2 security group](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DeleteSecurityGroup.kt) (deleteSecurityGroup command) -- [Describe an Amazon EC2 account](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeAccount.kt) (describeAccountAttributes command) -- [Describe Elastic IP addresses](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeAddresses.kt) (describeAddresses command) -- [Describe Amazon EC2 instances](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstances.kt) (describeInstances command) -- [Describe Amazon EC2 instance tags](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeInstanceTags.kt) (describeTags command) -- [Describe Amazon EC2 key pairs](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeKeyPairs.kt) (describeKeyPairs command) -- [Describe Amazon EC2 Regions and zones](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeRegionsAndZones.kt) (describeRegions command) -- [Describe Amazon EC2 security groups](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeSecurityGroups.kt) (describeSecurityGroups command) -- [Describe Amazon EC2 VPCs](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/DescribeVPCs.kt) (describeVpcs command) -- [Find running EC2 instances](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/FindRunningInstances.kt) (monitorInstances command) -- [Terminate Amazon EC2 instances](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/ec2/src/main/kotlin/com/kotlin/ec2/TerminateInstance.kt) (terminateInstances command) - -### Scenario - -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. - -- [Get started with Amazon EC2 instances](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/support/src/main/javav2/example_code/ec2/src/main/java/com/example/ec2/EC2Scenario.java) (Multiple commands) - -## Run the Amazon EC2 Kotlin files - -**Be very careful** when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples. - -To run these examples, set up your development environment. For more information, -see [Get started with the SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). - - ## Test the Amazon EC2 Kotlin files - -You can test the Kotlin code examples for Amazon EC2 by running a test file named **EC2Test**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/kotlin** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). - -You can run the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test runs, you can view messages that inform you if the tests succeed or fail. For example, the following message informs you that Test 3 passed. - - Test 3 passed - -**WARNING**: _Running these JUnit tests manipulates real Amazon EC2 resources and might incur charges on your account._ - - ### Properties file -Before running the Amazon EC2 JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define an instance name used for various tests. If you do not define all values, the JUnit tests fail. - -Define these values to successfully run the JUnit tests: - -- **ami** – An Amazon Machine Image (AMI) value. -- **instanceName** – An instance name. You can get this value from the AWS Management Console. -- **keyPair** – A key pair to use. For example, **TestKeyPair**. -- **groupName** – A group name to use. For example, **TestSecGroup**. -- **groupDesc** – A description of the group. For example, **Test Group**. -- **vpcId** – A VPC ID. You can obtain this value from the AWS Management Console. -- **keyNameSc** - A key pair to use in the scenario test. -- **fileNameSc** - A file name where the key information is written to and used in the scenario test. -- **groupNameSc** - A group name that is used in the scenario test. -- **groupDescSc** - A group name description that is used in the scenario test. -- **vpcIdSc** – A VPC ID that is used in the scenario test. -- **myIpAddress** – The IP address of your development machine that is used in the scenario test. - -### Command line -To run the JUnit tests from the command line, you can use the following command. - - mvn test - -You will see output from the JUnit tests, as shown here. - - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running EC2Test - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- - -### Unsuccessful tests - -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. - - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test). There are test failures. - [ERROR]; - +* [Allocate an Elastic IP address](bin/main/com/kotlin/ec2/AllocateAddress.kt#L48) (`AllocateAddress`) +* [Associate an Elastic IP address with an instance](bin/main/com/kotlin/ec2/EC2Scenario.kt#L287) (`AssociateAddress`) +* [Create a security group](bin/main/com/kotlin/ec2/CreateSecurityGroup.kt#L52) (`CreateSecurityGroup`) +* [Create a security key pair](bin/main/com/kotlin/ec2/CreateKeyPair.kt#L45) (`CreateKeyPair`) +* [Create and run an instance](bin/main/com/kotlin/ec2/CreateInstance.kt#L50) (`RunInstances`) +* [Delete a security group](bin/main/com/kotlin/ec2/DeleteSecurityGroup.kt#L44) (`DeleteSecurityGroup`) +* [Delete a security key pair](bin/main/com/kotlin/ec2/DeleteKeyPair.kt#L45) (`DeleteKeyPair`) +* [Describe instances](bin/main/com/kotlin/ec2/DescribeInstances.kt#L29) (`DescribeInstances`) +* [Disassociate an Elastic IP address from an instance](bin/main/com/kotlin/ec2/EC2Scenario.kt#L275) (`DisassociateAddress`) +* [Get data about a security group](bin/main/com/kotlin/ec2/DescribeSecurityGroups.kt#L46) (`DescribeSecurityGroups`) +* [Get data about instance types](bin/main/com/kotlin/ec2/EC2Scenario.kt#L389) (`DescribeInstanceTypes`) +* [List security key pairs](bin/main/com/kotlin/ec2/DescribeKeyPairs.kt#L29) (`DescribeKeyPairs`) +* [Release an Elastic IP address](bin/main/com/kotlin/ec2/EC2Scenario.kt#L262) (`ReleaseAddress`) +* [Set inbound rules for a security group](bin/main/com/kotlin/ec2/EC2Scenario.kt#L471) (`AuthorizeSecurityGroupIngress`) +* [Start an instance](bin/main/com/kotlin/ec2/EC2Scenario.kt#L311) (`StartInstances`) +* [Stop an instance](bin/main/com/kotlin/ec2/EC2Scenario.kt#L328) (`StopInstances`) +* [Terminate an instance](bin/main/com/kotlin/ec2/TerminateInstance.kt#L45) (`TerminateInstances`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with instances](bin/main/com/kotlin/ec2/EC2Scenario.kt) + +## Run the examples + +### Instructions + + + + + +#### Hello Amazon EC2 + +This example shows you how to get started using Amazon EC2. + + + +#### Get started with instances + +This example shows you how to do the following: + +* Create a key pair and security group. +* Select an Amazon Machine Image (AMI) and compatible instance type, then create an instance. +* Stop and restart the instance. +* Associate an Elastic IP address with your instance. +* Connect to your instance with SSH, then 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 `kotlin` folder. + + + + + + ## Additional resources -* [Developer Guide - AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html) -* [Amazon EC2 documentation](https://docs.aws.amazon.com/ec2/index.html) -* [Ec2Client - Kotlin Reference](https://sdk.amazonaws.com/kotlin/api/latest/support/aws.sdk.kotlin.services.support/index.html) -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 - +* [Amazon EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) +* [Amazon EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html) +* [SDK for Kotlin Amazon EC2 reference](https://sdk.amazonaws.com/kotlin/api/latest/ec2/index.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/kotlin/services/ecs/Readme.md b/kotlin/services/ecs/Readme.md index 10a8889f24e..2a1df93073f 100644 --- a/kotlin/services/ecs/Readme.md +++ b/kotlin/services/ecs/Readme.md @@ -1,23 +1,69 @@ -# Amazon Elastic Container Service Kotlin code examples + +# Amazon ECS code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Elastic Container Service (Amazon ECS). +## Overview -## Running the Amazon ECS Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Elastic Container Service (Amazon ECS). -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon ECS is a highly scalable, fast, container management service that makes it easy to run, stop, and manage Docker containers on a cluster of Amazon EC2 instances.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting an Amazon ECS service. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CreateCluster** - Demonstrates how to create a cluster for the Amazon ECS service. -- **CreateService** - Demonstrates how to create a service for the Amazon ECS service. -- **DeleteService** - Demonstrates how to delete a service for the Amazon ECS service. -- **DescribeClusters** - Demonstrates how to describe a cluster for the Amazon ECS service. -- **ListClusters** - Demonstrates how to list clusters for the Amazon ECS service. -- **UpdateService** - Demonstrates how to update the task placement strategies and constraints on an Amazon ECS service. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon ECS Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html) +* [Amazon ECS API Reference](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/Welcome.html) +* [SDK for Kotlin Amazon ECS reference](https://sdk.amazonaws.com/kotlin/api/latest/ecs/index.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/kotlin/services/emr/Readme.md b/kotlin/services/emr/Readme.md index 82170b53666..43e06400735 100644 --- a/kotlin/services/emr/Readme.md +++ b/kotlin/services/emr/Readme.md @@ -1,24 +1,69 @@ -# Amazon EMR Kotlin code examples + +# Amazon EMR code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon EMR. +## Overview -## Running the Amazon EMR Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon EMR. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon EMR is a web service that makes it easy to process vast amounts of data efficiently using Apache Hadoop and services offered by Amazon Web Services.* -Some of these examples perform *destructive* operations on AWS resources. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **AddSteps** - Demonstrates how to add new steps to a running cluster. -- **CreateCluster** - Demonstrates how to create and start running a new cluster (job flow). -- **CreateEmrFleet** - Demonstrates how to create a cluster using instance fleet with spot instances. -- **CreateSparkCluster** - Demonstrates how to create and start running a new cluster (job flow). -- **DescribeCluster** - Demonstrates how to describe a given cluster. -- **ListClusters** - Demonstrates how to list clusters. -- **TerminateJobFlow** - Demonstrates how to terminate a given job flow. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon EMR Management Guide](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-what-is-emr.html) +* [Amazon EMR API Reference](https://docs.aws.amazon.com/emr/latest/APIReference/Welcome.html) +* [SDK for Kotlin Amazon EMR reference](https://sdk.amazonaws.com/kotlin/api/latest/emr/index.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/kotlin/services/eventbridge/Readme.md b/kotlin/services/eventbridge/Readme.md index 7a1aaf6e90e..7e8343d914d 100644 --- a/kotlin/services/eventbridge/Readme.md +++ b/kotlin/services/eventbridge/Readme.md @@ -1,4 +1,4 @@ - + # EventBridge code examples for the SDK for Kotlin ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Kotlin to work with Amazon EventBridge. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -33,30 +33,30 @@ 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](bin/main/com/kotlin/eventbridge/HelloEventBridge.kt#L11) (`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#L417) (`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#L331) (`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#L521) (`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#L536) (`ListTargetsByRule`) -* [Remove targets from a rule](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L343) (`RemoveTargets`) -* [Send events](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt#L369) (`PutEvents`) +* [Add a target](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L550) (`PutTargets`) +* [Create a rule](bin/main/com/kotlin/eventbridge/CreateRuleSchedule.kt#L55) (`PutRule`) +* [Delete a rule](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L329) (`DeleteRule`) +* [Describe a rule](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L463) (`DescribeRule`) +* [Disable a rule](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L476) (`DisableRule`) +* [Enable a rule](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L476) (`EnableRule`) +* [List rule names for a target](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L520) (`ListRuleNamesByTarget`) +* [List rules](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L618) (`ListRules`) +* [List targets for a rule](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L535) (`ListTargetsByRule`) +* [Remove targets from a rule](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L341) (`RemoveTargets`) +* [Send events](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt#L367) (`PutEvents`) ### Scenarios Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with rules and targets](src/main/kotlin/com/kotlin/eventbridge/EventbridgeMVP.kt) +* [Get started with rules and targets](bin/main/com/kotlin/eventbridge/EventbridgeMVP.kt) ## Run the examples @@ -84,6 +84,7 @@ This example shows you how to do the following: + diff --git a/kotlin/services/firehose/Readme.md b/kotlin/services/firehose/Readme.md index 0733b53f692..f0dc4b21832 100644 --- a/kotlin/services/firehose/Readme.md +++ b/kotlin/services/firehose/Readme.md @@ -1,22 +1,69 @@ -# Amazon Kinesis Date Firehose Kotlin code examples + +# Kinesis Data Firehose code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Kinesis Date Firehose. +## Overview -## Running the Amazon Kinesis Date Firehose Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Kinesis Data Firehose. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Kinesis Data Firehose is a fully managed service for delivering real-time streaming data to AWS destinations and third-party HTTP endpoints.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a delivery stream. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CreateDeliveryStream** - Demonstrates how to create a delivery stream. -- **DeleteStream** - Demonstrates how to delete a delivery stream. -- **ListDeliveryStreams** - Demonstrates how to list all delivery streams. -- **PutBatchRecords** - Demonstrates how to write multiple data records into a delivery stream and check each record using the response object. -- **PutRecord** - Demonstrates how to write a data record into a delivery stream. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Kinesis Data Firehose User Guide](https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html) +* [Kinesis Data Firehose API Reference](https://docs.aws.amazon.com/firehose/latest/APIReference/Welcome.html) +* [SDK for Kotlin Kinesis Data Firehose reference](https://sdk.amazonaws.com/kotlin/api/latest/firehose/index.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/kotlin/services/forecast/Readme.md b/kotlin/services/forecast/Readme.md index a42fb226de2..d526c31d78f 100644 --- a/kotlin/services/forecast/Readme.md +++ b/kotlin/services/forecast/Readme.md @@ -1,25 +1,69 @@ -# Amazon Forecast Kotlin code examples + +# Forecast code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Forecast. +## Overview -## Running the Amazon Forecast Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Forecast Service. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Forecast a fully managed service that uses statistical and machine learning algorithms to deliver highly accurate time-series forecasts.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a named query example. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CreateDataSet** - Demonstrates how to create a data set for the Amazon Forecast service. -- **CreateForecast** - Demonstrates how to create a forecast for the Amazon Forecast service. -- **DeleteDataset** Demonstrates how to delete a data set that belongs to the Amazon Forecast service. -- **DeleteForecast** Demonstrates how to delete a forecast that belongs to the Amazon Forecast service. -- **DescribeForecast** - Demonstrates how to describe a forecast for the Amazon Forecast service. -- **ListDataSetGroups** - Demonstrates how to list data set groups for the Amazon Forecast service. -- **ListDataSets** - Demonstrates how to list Amazon Forecast data sets. -- **ListForecasts** - Demonstrates how to list forecasts for the Amazon Forecast service. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Forecast User Guide](https://docs.aws.amazon.com/forecast/latest/dg/getting-started.html) +* [Forecast API Reference](https://docs.aws.amazon.com/forecast/latest/dg/api-reference.html) +* [SDK for Kotlin Forecast reference](https://sdk.amazonaws.com/kotlin/api/latest/forecast/index.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/kotlin/services/glue/Readme.md b/kotlin/services/glue/Readme.md index b985f77b229..2aa8d5f55a1 100644 --- a/kotlin/services/glue/Readme.md +++ b/kotlin/services/glue/Readme.md @@ -1,123 +1,101 @@ + # AWS Glue code examples for the SDK for Kotlin ## Overview -This README discusses how to run and test the AWS SDK for Kotlin code examples for AWS Glue. -AWS Glue is a serverless data integration service that makes it easy to discover, prepare, and combine data for analytics, machine learning, and application development. +Shows how to use the AWS SDK for Kotlin to work with AWS Glue. -## ⚠️ Important -* The SDK for Kotlin examples perform AWS operations for the account and AWS Region for which you've specified credentials. Running these examples might incur charges on your account. For details about the charges you can expect for a given service and API operation, see the [AWS Pricing page](https://aws.amazon.com/pricing/). + + + +*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. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 -### Single action +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + -The following examples use the **GlueClient** object: + + -- [Creating an AWS Glue crawler](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/CreateCrawler.kt) (CreateCrawler command) -- [Deleting an AWS Glue crawler](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/DeleteCrawler.kt) (DeleteCrawler command) -- [Getting a specific AWS Glue crawler](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/GetCrawler.kt) (GetCrawler command) -- [Getting AWS Glue crawlers](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/GetCrawlers.kt) (GetCrawlers command) -- [Getting a database](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/GetDatabases.kt) (GetDatabase command) -- [Getting a job run request](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/GetJobRun.kt) (GetJobRun command) -- [Getting all AWS Glue jobs](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/GetJobs.kt) (GetJobs command) -- [Getting all AWS Glue workflows](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/ListWorkflows.kt) (ListWorkflows command) -- [Searching AWS Glue tables based on properties](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/SearchTables.kt) (SearchTables command) -- [Starting an AWS Glue crawler](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/StartCrawler.kt) (StartCrawler command) -- [Stopping an AWS Glue crawler](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/StopCrawler.kt) (StopCrawler command) +### Single actions -### Scenario +Code excerpts that show you how to call individual service functions. -- [Performing various AWS Glue operations](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/glue/src/main/kotlin/com/kotlin/glue/GlueScenario.kt) (Multiple commands) +* [Create a crawler](bin/main/com/kotlin/glue/CreateCrawler.kt#L54) (`CreateCrawler`) +* [Get a crawler](bin/main/com/kotlin/glue/GetCrawler.kt#L44) (`GetCrawler`) +* [Get a database from the Data Catalog](bin/main/com/kotlin/glue/GetDatabase.kt#L46) (`GetDatabase`) +* [Start a crawler](bin/main/com/kotlin/glue/StartCrawler.kt#L44) (`StartCrawler`) -## Running the AWS Glue Kotlin files +### Scenarios -Some of these examples perform *destructive* operations on AWS resources, such as deleting a crawler by running the **DeleteCrawler** example. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -To run these examples, set up your development environment to use Gradle. For more information, -see [Get started with the SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). +* [Get started with crawlers and jobs](bin/main/com/kotlin/glue/GlueScenario.kt) +## Run the examples - ## Testing the AWS Glue Kotlin files +### Instructions -You can test the Kotlin code examples for AWS Glue by running a test file named **GlueTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/kotlin** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). -You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. + + - Test 3 passed -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and might incur charges on your account._ - ### Properties file -Before running the AWS Glue JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define a crawler name used in the tests. If you do not define all values, the JUnit tests fail. +#### Get started with crawlers and jobs -Define these values to successfully run the JUnit tests: +This example shows you how to do the following: -- **IAM** - The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that has AWS Glue and Amazon Simple Storage Service (Amazon S3) permissions. -- **s3Path** - The Amazon S3 target that contains data (for example, CSV data). -- **cron** - A cron expression used to specify the schedule (for example, cron(15 12 * * ? *). -- **crawlerName** - The crawler name used in various tests. -- **existingCrawlerName** - An existing crawler name that is deleted. -- **databaseName** - The name of the database used in the **CreateCrawler** test. -- **existingDatabaseName** - The name of an existing database. -- **tableName** - The name of a database table used in the **GetTable** test. -- **text** - A string used for a text search and used in the **SearchTables** test. -- **jobNameSc** - A Job name used for the Scenario test. -- **s3PathSc** - The Amazon S3 target that contains data used for the Scenario test. -- **dbNameSc** - The name of the database used for the Scenario test. -- **crawlerNameSc** - The crawler name used for the Scenario test. -- **scriptLocationSc** - The Amazon S3 path to a script that runs a job used for the Scenario test. -- **locationUri** - The location of the database used for the Scenario test. +* 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. -**Note:** To set up the CSV data and other requirements needed for the unit tests, follow [Tutorial: Adding an AWS Glue crawler](https://docs.aws.amazon.com/glue/latest/ug/tutorial-add-crawler.html). + + -### Command line -To run the JUnit tests from the command line, you can use the following command. - mvn test + + -You will see output from the JUnit tests, as shown here. +### Tests - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running GlueTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- +⚠ Running tests might result in charges to your AWS account. -### Unsuccessful tests -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `kotlin` folder. - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project GlueServiceTest: There are test failures. - [ERROR]; + + + + ## Additional resources -* [Developer Guide - AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). -* [AWS Glue Developer Guide](https://docs.aws.amazon.com/glue/latest/dg/what-is-glue.html). -* [AWS Glue Studio User Guide](https://docs.aws.amazon.com/glue/latest/ug/notebooks-chapter.html). -* [Interface GlueClient](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/glue/GlueClient.html). -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [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 Kotlin AWS Glue reference](https://sdk.amazonaws.com/kotlin/api/latest/glue/index.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/kotlin/services/iam/Readme.md b/kotlin/services/iam/Readme.md index c79ebdc573e..0e09dfa16cd 100644 --- a/kotlin/services/iam/Readme.md +++ b/kotlin/services/iam/Readme.md @@ -1,52 +1,112 @@ -# AWS Identity and Access Management Kotlin code examples - -This README discusses how to run and test the Kotlin code examples for AWS Identity and Access Management (IAM). - -## Running the AWS IAM Kotlin files - -**IMPORTANT** - -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. - -Some of these examples perform *destructive* operations on AWS resources, such as deleting a user. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. - -You will find these examples: - -- **AccessKeyLastUsed** - Demonstrates how to display the time that an access key was last used. -- **AttachRolePolicy** - Demonstrates how to attach a policy to an existing AWS IAM role. -- **CreateAccessKey** - Demonstrates how to create an access key for an AWS IAM user. -- **CreateAccountAlias** - Demonstrates how to create an alias for an AWS account. -- **CreatePolicy** - Demonstrates how to create a policy. -- **CreateUser** - Demonstrates how to create an AWS IAM user. -- **DeleteAccessKey** - Demonstrates how to delete an access key from an AWS IAM user. -- **DeleteAccountAlias** - Demonstrates how to delete an alias from an AWS account. -- **DeletePolicy** - Demonstrates how to delete a fixed policy with a provided policy name. -- **DeleteUser** - Demonstrates how to delete an AWS IAM user. -- **DetachRolePolicy** - Demonstrates how to detach a policy from an AWS IAM role. -- **GetPolicy** - Demonstrates how to get the details for an AWS IAM policy. -- **IAMScenario** - Demonstrates how to perform various AWS IAM operations. -- **ListAccessKeys** - Demonstrates how to list access keys associated with an AWS IAM user. -- **ListAccountAliases** - Demonstrates how to list all aliases associated with an AWS account. -- **ListUsers** - Demonstrates how to list all AWS IAM users. -- **UpdateUser** - Demonstrates how to update the name of an AWS IAM user. - -**JSON File** - -To successfully run the **IAMScenario**, you need a JSON file that contains the information to create a role. Included in this file is the ARN of the IAM user for the trust relationship. The following JSON shows an example. - - { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Principal": { - "AWS": "" - }, - "Action": "sts:AssumeRole", - "Condition": {} - } - ] - } - -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). + +# IAM code examples for the SDK for Kotlin + +## Overview + +Shows how to use the AWS SDK for Kotlin to work with AWS Identity and Access Management (IAM). + + + + +*IAM is a web service for securely controlling access to AWS services. With IAM, you can centrally manage permissions in your AWS account.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Attach a policy to a role](bin/main/com/kotlin/iam/AttachRolePolicy.kt#L48) (`AttachRolePolicy`) +* [Create a policy](bin/main/com/kotlin/iam/CreatePolicy.kt#L45) (`CreatePolicy`) +* [Create a user](bin/main/com/kotlin/iam/CreateUser.kt#L45) (`CreateUser`) +* [Create an access key](bin/main/com/kotlin/iam/CreateAccessKey.kt#L46) (`CreateAccessKey`) +* [Create an alias for an account](bin/main/com/kotlin/iam/CreateAccountAlias.kt#L45) (`CreateAccountAlias`) +* [Delete a policy](bin/main/com/kotlin/iam/DeletePolicy.kt#L44) (`DeletePolicy`) +* [Delete a user](bin/main/com/kotlin/iam/DeleteUser.kt#L44) (`DeleteUser`) +* [Delete an access key](bin/main/com/kotlin/iam/DeleteAccessKey.kt#L46) (`DeleteAccessKey`) +* [Delete an account alias](bin/main/com/kotlin/iam/DeleteAccountAlias.kt#L44) (`DeleteAccountAlias`) +* [Detach a policy from a role](bin/main/com/kotlin/iam/DetachRolePolicy.kt#L46) (`DetachRolePolicy`) +* [Get a policy](bin/main/com/kotlin/iam/GetPolicy.kt#L43) (`GetPolicy`) +* [List a user's access keys](bin/main/com/kotlin/iam/ListAccessKeys.kt#L43) (`ListAccessKeys`) +* [List account aliases](bin/main/com/kotlin/iam/ListAccountAliases.kt#L29) (`ListAccountAliases`) +* [List users](bin/main/com/kotlin/iam/ListUsers.kt#L29) (`ListUsers`) +* [Update a user](bin/main/com/kotlin/iam/UpdateUser.kt#L46) (`UpdateUser`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Create a user and assume a role](bin/main/com/kotlin/iam/IAMScenario.kt) + +## Run the examples + +### Instructions + + + + + + + +#### Create a user and assume a role + +This example shows you how to create a user and assume a role. + +* Create a user with no permissions. +* Create a role that grants permission to list Amazon S3 buckets for the account. +* Add a policy to let the user assume the role. +* Assume the role and list S3 buckets using temporary credentials, then 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 `kotlin` folder. + + + + + + +## Additional resources + +* [IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) +* [IAM API Reference](https://docs.aws.amazon.com/IAM/latest/APIReference/welcome.html) +* [SDK for Kotlin IAM reference](https://sdk.amazonaws.com/kotlin/api/latest/iam/index.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/kotlin/services/keyspaces/Readme.md b/kotlin/services/keyspaces/Readme.md index ea9f4801b49..8d40829c5f2 100644 --- a/kotlin/services/keyspaces/Readme.md +++ b/kotlin/services/keyspaces/Readme.md @@ -1,78 +1,117 @@ + # Amazon Keyspaces code examples for the SDK for Kotlin ## Overview -This README discusses how to run and test the AWS SDK for Kotlin examples for Amazon Keyspaces (for Apache Cassandra). -Amazon Keyspaces is a scalable, highly available, and managed Apache Cassandra–compatible database service. +Shows how to use the AWS SDK for Kotlin to work with Amazon Keyspaces (for Apache Cassandra). -## ⚠️ Important -* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/). + + + +*Amazon Keyspaces is a scalable, highly available, and managed Apache Cassandra-compatible database service.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 `kotlin` folder. + + + + + + ### Get started -- [Hello Amazon Keyspaces](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/HelloKeyspaces.kt) (listKeyspaces command) +* [Hello Amazon Keyspaces](bin/main/com/example/keyspace/HelloKeyspaces.kt#L16) (`ListKeyspaces`) ### Single actions Code excerpts that show you how to call individual service functions. -- [Create a keyspace](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (createKeyspace command) -- [Create a table](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (createTable command) -- [Delete a keyspace](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (deleteKeyspace command) -- [Delete a table](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (deleteTable command) -- [Get data about a keyspace](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (getKeyspace command) -- [Get data about a table](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (getTable command) -- [List keyspaces](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (listKeyspacesPaginator command) -- [List tables in a keyspace](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (listTablesPaginator command) -- [Restore a table to a point in time](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (restoreTable command) -- [Update a table](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (updateTable command) - +* [Create a keyspace](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L557) (`CreateKeyspace`) +* [Create a table](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L467) (`CreateTable`) +* [Delete a keyspace](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L214) (`DeleteKeyspace`) +* [Delete a table](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L250) (`DeleteTable`) +* [Get data about a keyspace](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L544) (`GetKeyspace`) +* [Get data about a table](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L436) (`GetTable`) +* [List keyspaces](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L532) (`ListKeyspaces`) +* [List tables in a keyspace](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L417) (`ListTables`) +* [Restore a table to a point in time](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L295) (`RestoreTable`) +* [Update a table](bin/main/com/example/keyspace/ScenarioKeyspaces.kt#L339) (`UpdateTable`) -### Scenarios +### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -- [Get started with keyspaces and tables](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/keyspaces/src/main/kotlin/com/example/keyspace/ScenarioKeyspaces.kt) (multiple commands) +* [Get started with keyspaces and tables](bin/main/com/example/keyspace/ScenarioKeyspaces.kt) ## Run the examples -### Prerequisites +### Instructions -To run these examples, set up your development environment to use Gradle. For more information, -see [Get started with the SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). - These examples requires a **cassandra_truststore.jks** file to make a connection to Amazon Keyspaces. - For more information, see [Using a Cassandra Java client driver to access Amazon Keyspaces programmatically](https://docs.aws.amazon.com/keyspaces/latest/devguide/using_java_driver.html). + + -**Be very careful** when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples. +#### Hello Amazon Keyspaces - ## Test the examples - - ⚠️ Running the tests might result in charges to your AWS account. +This example shows you how to get started using Amazon Keyspaces. -You can test the Kotlin code example for Amazon Keyspaces by running a test file named **KeyspaceTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/kotlin** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). -To successfully run the JUnit tests, define the following values in the test: -- **fileName** - The name of the JSON file that contains movie data. (Get this file from the GitHub repo at resources/sample_file.) -- **keyspaceName** - The name of the keyspace to create. +#### Get started with keyspaces and tables -You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +This example shows you how to do the following: - Test 3 passed +* Create a keyspace and table. The table schema holds movie data and has point-in-time recovery enabled. +* Connect to the keyspace using a secure TLS connection with SigV4 authentication. +* Query the table. Add, retrieve, and update movie data. +* Update the table. Add a column to track watched movies. +* Restore the table to its previous state and clean up resources. -**WARNING**: _Running these JUnit tests manipulates real AWS resources and might incur charges on your account._ + + + + + + + +### 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 `kotlin` folder. + + + + + ## Additional resources -* [Developer Guide - AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). -* [Developer Guide - Amazon Keyspaces (for Apache Cassandra)](https://docs.aws.amazon.com/keyspaces/latest/devguide/what-is-keyspaces.html). -* [Interface KeyspacesClient](https://sdk.amazonaws.com/kotlin/api/latest/keyspaces/aws.sdk.kotlin.services.keyspaces/-keyspaces-client/index.html). -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [Amazon Keyspaces Developer Guide](https://docs.aws.amazon.com/keyspaces/latest/devguide/what-is-keyspaces.html) +* [Amazon Keyspaces API Reference](https://docs.aws.amazon.com/keyspaces/latest/APIReference/Welcome.html) +* [SDK for Kotlin Amazon Keyspaces reference](https://sdk.amazonaws.com/kotlin/api/latest/keyspaces/index.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/kotlin/services/kinesis/Readme.md b/kotlin/services/kinesis/Readme.md index 23e5df9b0d2..503859c1f14 100644 --- a/kotlin/services/kinesis/Readme.md +++ b/kotlin/services/kinesis/Readme.md @@ -1,24 +1,69 @@ -# Amazon Kinesis Kotlin code examples + +# Kinesis code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Kinesis. +## Overview -## Running the Kinesis Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Kinesis. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Kinesis makes it easy to collect, process, and analyze video and data streams in real time.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a data stream. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **AddDataShards** - Demonstrates how to increase shard count in an Amazon Kinesis data stream. -- **CreateDataStream** - Demonstrates how to create an Amazon Kinesis data stream. -- **DeleteDataStream** - Demonstrates how to delete an Amazon Kinesis data stream. -- **DescribeLimits** - Demonstrates how to display the shard limit and usage for a given account. -- **GetRecords** - Demonstrates how to read multiple data records from an Amazon Kinesis data stream. -- **ListShards** - Demonstrates how to list the shards in an Amazon Kinesis data stream. -- **StockTradesWriter** - Demonstrates how to write multiple data records into an Amazon Kinesis data stream. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Kinesis Developer Guide](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) +* [Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/Welcome.html) +* [SDK for Kotlin Kinesis reference](https://sdk.amazonaws.com/kotlin/api/latest/kinesis/index.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/kotlin/services/kms/Readme.md b/kotlin/services/kms/Readme.md index ef09a0fe17c..e1a6cefe06e 100644 --- a/kotlin/services/kms/Readme.md +++ b/kotlin/services/kms/Readme.md @@ -1,29 +1,85 @@ -# AWS KMS Kotlin code examples + +# AWS KMS code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for AWS Key Management Service (AWS KMS). +## Overview -## Running the AWS KMS Kotlin files +Shows how to use the AWS SDK for Kotlin to work with AWS Key Management Service (AWS KMS). -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*AWS KMS is an encryption and key management service scaled for the cloud.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting an alias. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CreateAlias** - Demonstrates how to create an AWS KMS alias. -- **CreateCustomerKey** - Demonstrates how to create an AWS KMS key. -- **CreateGrant** - Demonstrates how to add a grant to an AWS KMS key. -- **DeleteAlias** - Demonstrates how to delete an AWS KMS alias. -- **DescribeKey** - Demonstrates how to obtain information about an AWS KMS key. -- **DisableCustomerKey** - Demonstrates how to disable an AWS KMS key. -- **EnableCustomerKey** - Demonstrates how to enable an AWS KMS key. -- **EncryptDataKey** - Demonstrates how to encrypt and decrypt data by using an AWS KMS key. -- **ListAliases** - Demonstrates how to get a list of AWS KMS aliases. -- **ListGrants** - Demonstrates how to get information about AWS KMS grants related to a key. -- **ListKeys** - Demonstrates how to get a list of AWS KMS keys. -- **RevokeGrant** - Demonstrates how to revoke a grant for the specified AWS KMS key. - -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). + + + +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a grant for a key](bin/main/com/kotlin/kms/CreateGrant.kt#L50) (`CreateGrant`) +* [Create a key](bin/main/com/kotlin/kms/CreateCustomerKey.kt#L34) (`CreateKey`) +* [Create an alias for a key](bin/main/com/kotlin/kms/CreateAlias.kt#L46) (`CreateAlias`) +* [Decrypt ciphertext](bin/main/com/kotlin/kms/EncryptDataKey.kt#L49) (`Decrypt`) +* [Describe a key](bin/main/com/kotlin/kms/DescribeKey.kt#L44) (`DescribeKey`) +* [Disable a key](bin/main/com/kotlin/kms/DisableCustomerKey.kt#L44) (`DisableKey`) +* [Enable a key](bin/main/com/kotlin/kms/EnableCustomerKey.kt#L44) (`EnableKey`) +* [Encrypt text using a key](bin/main/com/kotlin/kms/EncryptDataKey.kt#L49) (`Encrypt`) +* [List aliases for a key](bin/main/com/kotlin/kms/ListAliases.kt#L29) (`ListAliases`) +* [List grants for a key](bin/main/com/kotlin/kms/ListGrants.kt#L43) (`ListGrants`) +* [List keys](bin/main/com/kotlin/kms/ListKeys.kt#L28) (`ListKeys`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [AWS KMS Developer Guide](https://docs.aws.amazon.com/kms/latest/developerguide/overview.html) +* [AWS KMS API Reference](https://docs.aws.amazon.com/kms/latest/APIReference/Welcome.html) +* [SDK for Kotlin AWS KMS reference](https://sdk.amazonaws.com/kotlin/api/latest/kms/index.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/kotlin/services/lambda/Readme.md b/kotlin/services/lambda/Readme.md index 3997c26392f..1001029b2b5 100644 --- a/kotlin/services/lambda/Readme.md +++ b/kotlin/services/lambda/Readme.md @@ -1,108 +1,101 @@ + # Lambda code examples for the SDK for Kotlin ## Overview -This README discusses how to run and test the AWS SDK for Kotlin examples for AWS Lambda. -AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. These events may include changes in state or an update, such as a user placing an item in a shopping cart on an e-commerce website. +Shows how to use the AWS SDK for Kotlin to work with AWS Lambda. -## ⚠️ Important -* The SDK for Kotlin examples perform AWS operations for the account and AWS Region for which you've specified credentials. Running these examples might incur charges on your account. For details about the charges you can expect for a given service and API operation, see [AWS Pricing](https://aws.amazon.com/pricing/). + + + +*Lambda allows you to run code without provisioning or managing servers.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 -### Single action +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + -The following examples use the **LambdaClient** object: +### Single actions -- [Creating an AWS Lambda function](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/lambda/src/main/kotlin/com/kotlin/lambda/CreateFunction.kt) (CreateFunction command) -- [Deleting an AWS Lambda function](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/lambda/src/main/kotlin/com/kotlin/lambda/DeleteFunction.kt) (DeleteFunction command) -- [Getting information about your account](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/lambda/src/main/kotlin/com/kotlin/lambda/GetAccountSettings.kt) (GetAccountSettings command) -- [Invoking an AWS Lambda function](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/lambda/src/main/kotlin/com/kotlin/lambda/LambdaInvoke.kt) (Invoke command) -- [Performing various operations by using the LambdaClient object](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/lambda/src/main/kotlin/com/kotlin/lambda/LambdaScenario.kt) (Multiple commands) -- [Listing AWS Lambda functions](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/kotlin/services/lambda/src/main/kotlin/com/kotlin/lambda/ListLambda.kt) (ListFunctions command) +Code excerpts that show you how to call individual service functions. +* [Create a function](bin/main/com/kotlin/lambda/CreateFunction.kt#L57) (`CreateFunction`) +* [Delete a function](bin/main/com/kotlin/lambda/DeleteFunction.kt#L45) (`DeleteFunction`) +* [Invoke a function](bin/main/com/kotlin/lambda/LambdaInvoke.kt#L46) (`Invoke`) -## Running the AWS Lambda Kotlin files +### Scenarios -Some of these examples perform *destructive* operations on AWS resources, such as deleting a Lambda function. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -To run these examples, set up your development environment. For more information, -see [Setting up the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +* [Get started with functions](bin/main/com/kotlin/lambda/LambdaScenario.kt) -## Testing the AWS Lambda files +## Run the examples -You can test the Kotlin code examples for Lambda by running a test file named **LambdaTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/kotlin** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +### Instructions -You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line by using Maven. As each test is run, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. - Test 3 passed + + -**WARNING**: _Running these JUnit tests manipulates real Amazon resources and may incur charges on your account._ - ### Properties file -Before running the Lambda JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define an function name used for various tests. -If you do not define all values, the JUnit tests fail. -Define the following values to successfully run the JUnit tests: +#### Get started with functions -- **functionNameSc** - The name of a new function name used for the LambdaScenario test (for example, myLambdaSc). -- **functionName** – The name of a new function name (for example, myLambda). -- **bucketName** - The Amazon Simple Storage Service (Amazon S3) bucket name that contains the .zip or .jar file used to update the Lambda function's code. -- **key** - The Amazon S3 key name that represents the .zip or .jar file (for example, LambdaHello-1.0-SNAPSHOT.jar). -- **filePath** - The path to the .zip or .jar file where the code is located. -- **role** - The role Amazon Resource Name (ARN) that has Lambda permissions. -- **handler** - The fully qualifed method name (for example, example.Handler::handleRequest). +This example shows you how to do the following: -**Note**: The **CreateFunction** and **LambdaScenario** tests requires a .zip or .jar file that represents the code of the Lambda function. If you do not have a .zip or .jar file, please refer to the following document: - - https://github.com/aws-doc-sdk-examples/tree/master/javav2/usecases/creating_workflows_stepfunctions +* Create an IAM role and Lambda function, then upload handler code. +* Invoke the function with a single parameter and get results. +* Update the function code and configure with an environment variable. +* Invoke the function with new parameters and get results. Display the returned execution log. +* List the functions for your account, then clean up resources. -### Command line -To run the JUnit tests from the command line, you can use the following command. + + - mvn test -You will see output from the JUnit tests, as shown here. + + - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running LambdaTest - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- +### Tests -### Unsuccessful tests +⚠ Running tests might result in charges to your AWS account. -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project S3J2Project: There are test failures. - [ERROR]; +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `kotlin` folder. + + + + ## Additional resources -* [Developer Guide - AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). -* [Developer Guide - AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html). -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) +* [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) +* [SDK for Kotlin Lambda reference](https://sdk.amazonaws.com/kotlin/api/latest/lambda/index.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/kotlin/services/mediaconvert/Readme.md b/kotlin/services/mediaconvert/Readme.md index 192e3f269c7..ebba74d9626 100644 --- a/kotlin/services/mediaconvert/Readme.md +++ b/kotlin/services/mediaconvert/Readme.md @@ -1,18 +1,77 @@ -# AWS Elemental MediaConvert Kotlin code examples + +# MediaConvert code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for AWS Elemental MediaConvert. +## Overview -## Running the AWS Elemental MediaConvert Kotlin files +Shows how to use the AWS SDK for Kotlin to work with AWS Elemental MediaConvert. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*MediaConvert is a service that formats and compresses offline video content for delivery to televisions or connected devices.* -You will find these examples: +## ⚠ Important -- **CreateJob** - Demonstrates how to create AWS Elemental MediaConvert jobs. -- **GetJob** - Demonstrates how to get information about a specific AWS Elemental MediaConvert job. -- **ListJobs** - Demonstrates how to get information about all completed AWS Elemental MediaConvert jobs. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). + + + +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a transcoding job](bin/main/com/kotlin/mediaconvert/CreateJob.kt#L142) (`CreateJob`) +* [Get a transcoding job](bin/main/com/kotlin/mediaconvert/GetJob.kt#L47) (`GetJob`) +* [List transcoding jobs](bin/main/com/kotlin/mediaconvert/ListJobs.kt#L34) (`ListJobs`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [MediaConvert User Guide](https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html) +* [MediaConvert API Reference](https://docs.aws.amazon.com/mediaconvert/latest/apireference/custom-endpoints.html) +* [SDK for Kotlin MediaConvert reference](https://sdk.amazonaws.com/kotlin/api/latest/mediaconvert/index.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/kotlin/services/opensearch/Readme.md b/kotlin/services/opensearch/Readme.md index ba9c9eb664e..452df6a5770 100644 --- a/kotlin/services/opensearch/Readme.md +++ b/kotlin/services/opensearch/Readme.md @@ -1,22 +1,78 @@ -# Amazon OpenSearch Kotlin code examples + +# OpenSearch code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon OpenSearch. +## Overview -## Running the Amazon OpenSearch Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon OpenSearch Service. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*OpenSearch is a distributed, community-driven, Apache 2.0-licensed, 100% open-source search and analytics suite used for a broad set of use cases like real-time application monitoring, log analytics, and website search.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting an # Amazon OpenSearch domain. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CreateDomain** - Demonstrates how to create a new Amazon OpenSearch Service domain. -- **DeleteDomain** - Demonstrates how to delete an Amazon OpenSearch Service domain. -- **ListDomainNames** - Demonstrates how to list Amazon OpenSearch Service domains. -- **UpdateDomain** - Demonstrates how modify a cluster configuration of the specified domain. + + -To run these examples, you can setup your development environment. For more information, -see [Get started with the SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). +## Code examples +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a domain](bin/main/com/example/search/CreateDomain.kt#L49) (`CreateDomain`) +* [Delete a domain](bin/main/com/example/search/DeleteDomain.kt#L45) (`DeleteDomain`) +* [List domains](bin/main/com/example/search/ListDomainNames.kt#L29) (`ListDomainNames`) +* [Modify a cluster configuration](bin/main/com/example/search/UpdateDomain.kt#L42) (`UpdateDomainConfig`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [OpenSearch User Guide](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/gsg.html) +* [OpenSearch API Reference](https://docs.aws.amazon.com/opensearch-service/latest/APIReference/Welcome.html) +* [SDK for Kotlin OpenSearch reference](https://sdk.amazonaws.com/kotlin/api/latest/opensearch/index.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/kotlin/services/personalize/Readme.md b/kotlin/services/personalize/Readme.md index 5c76fa8f041..f5da4ad8ff4 100644 --- a/kotlin/services/personalize/Readme.md +++ b/kotlin/services/personalize/Readme.md @@ -1,28 +1,69 @@ -# Amazon Personalize Kotlin code examples + +# Amazon Personalize code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Personalize. +## Overview -## Running the Amazon Personalize Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Personalize. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Personalize enables real-time personalization and recommendations, based on the same technology used at Amazon.com.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a solution. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CreateCampaign** - Demonstrates how to create an Amazon Personalize campaign. -- **CreateSolution** - Demonstrates how to create an Amazon Personalize solution. -- **DeleteCampaign** - Demonstrates how to delete an Amazon Personalize campaign. -- **DeleteSolution** - Demonstrates how to delete an Amazon Personalize solution. -- **DescribeCampaign** - Demonstrates how to describe an Amazon Personalize campaign. -- **DescribeSolution** - Demonstrates how to describe an Amazon Personalize solution. -- **GetRecommendations** - Demonstrates how to return a list of recommended items. -- **ListCampaigns** - Demonstrates how to list Amazon Personalize campaigns. -- **ListDatasetGroups** - Demonstrates how to list Amazon Personalize data set groups. -- **ListRecipes** - Demonstrates how to list Amazon Personalize recipes. -- **ListSolutions** - Demonstrates how to list Amazon Personalize solutions. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon Personalize Developer Guide](https://docs.aws.amazon.com/personalize/latest/dg/what-is-personalize.html) +* [Amazon Personalize API Reference](https://docs.aws.amazon.com/personalize/latest/dg/API_Reference.html) +* [SDK for Kotlin Amazon Personalize reference](https://sdk.amazonaws.com/kotlin/api/latest/personalize/index.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/kotlin/services/pinpoint/Readme.md b/kotlin/services/pinpoint/Readme.md index 4616d1ffd74..715ac805049 100644 --- a/kotlin/services/pinpoint/Readme.md +++ b/kotlin/services/pinpoint/Readme.md @@ -1,29 +1,82 @@ -# Amazon Pinpoint Kotlin code examples + +# Amazon Pinpoint code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Pinpoint. +## Overview -## Running the Amazon Pinpoint Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Pinpoint. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Pinpoint helps you engage your customers by sending them email, SMS and voice messages, and push notifications.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting an Amazon Pinpoint application. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **AddExampleEndpoint** - Demonstrates how to update an existing endpoint. -- **CreateApp** - Demonstrates how to create an Amazon Pinpoint application. -- **CreateCampaign** - Demonstrates how to create an Amazon Pinpoint campaign. -- **CreateEndpoint** - Demonstrates how to create an endpoint for an application in Amazon Pinpoint. -- **CreateSegment** - Demonstrates how to create a segment for a campaign in Amazon Pinpoint. -- **DeleteApp** - Demonstrates how to delete an Amazon Pinpoint application. -- **DeleteEndpoint** - Demonstrates how to delete an endpoint. -- **ListEndpointIds** - Demonstrates how to retrieve information about all the endpoints that are associated with a specific user ID. -- **ListSegments** - Demonstrates how to list segments in an Amazon Pinpoint application. -- **LookUpEndpoint** - Demonstrates how to display information about an existing endpoint in Amazon Pinpoint. -- **SendEmailMessage** - Demonstrates how to send an email message. -- **SendMessage** - Demonstrates how to send an SMS message using Amazon Pinpoint. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a campaign](bin/main/com/kotlin/pinpoint/CreateCampaign.kt#L52) (`CreateCampaign`) +* [Create a segment](bin/main/com/kotlin/pinpoint/CreateSegment.kt#L55) (`CreateSegment`) +* [Create an application](bin/main/com/kotlin/pinpoint/CreateApp.kt#L46) (`CreateApp`) +* [Delete an application](bin/main/com/kotlin/pinpoint/DeleteApp.kt#L44) (`DeleteApp`) +* [Delete an endpoint](bin/main/com/kotlin/pinpoint/DeleteEndpoint.kt#L46) (`DeleteEndpoint`) +* [Get endpoints](bin/main/com/kotlin/pinpoint/LookUpEndpoint.kt#L48) (`GetEndpoint`) +* [List segments](bin/main/com/kotlin/pinpoint/ListSegments.kt#L44) (`GetSegments`) +* [Send email and text messages](bin/main/com/kotlin/pinpoint/SendEmailMessage.kt#L58) (`SendMessages`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon Pinpoint Developer Guide](https://docs.aws.amazon.com/pinpoint/latest/developerguide/welcome.html) +* [Amazon Pinpoint API Reference](https://docs.aws.amazon.com/pinpoint/latest/apireference/welcome.html) +* [SDK for Kotlin Amazon Pinpoint reference](https://sdk.amazonaws.com/kotlin/api/latest/pinpoint/index.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/kotlin/services/polly/Readme.md b/kotlin/services/polly/Readme.md index 5eb2b78e6ae..12f8047f433 100644 --- a/kotlin/services/polly/Readme.md +++ b/kotlin/services/polly/Readme.md @@ -1,18 +1,69 @@ -# Amazon Polly Kotlin code examples + +# Amazon Polly code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Polly. +## Overview -## Running the Amazon Polly Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Polly. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Polly is a Text-to-Speech (TTS) cloud service that converts text into lifelike speech.* -You will find these examples: +## ⚠ Important -- **DescribeVoices** - Demonstrates how to produce a list of voices available for use when requesting speech synthesis with Amazon Polly. -- **ListLexicons** - Demonstrates how to produce a list of pronunciation lexicons stored in an AWS Region. -- **PollyDemo** - Demonstrates how to convert text into speech. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). + + + +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon Polly Developer Guide](https://docs.aws.amazon.com/polly/latest/dg/what-is.html) +* [Amazon Polly API Reference](https://docs.aws.amazon.com/polly/latest/dg/API_Reference.html) +* [SDK for Kotlin Amazon Polly reference](https://sdk.amazonaws.com/kotlin/api/latest/polly/index.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/kotlin/services/rds/Readme.md b/kotlin/services/rds/Readme.md index 0fc40c35dbd..80c1c67c7a6 100644 --- a/kotlin/services/rds/Readme.md +++ b/kotlin/services/rds/Readme.md @@ -1,123 +1,102 @@ + # Amazon RDS code examples for the SDK for Kotlin -This README discusses how to run and test the AWS SDK for Kotlin code examples for Amazon Relational Database Service (Amazon RDS). +## Overview -Amazon RDS is a collection of managed services that makes it simple to set up, operate, and scale databases in the cloud. +Shows how to use the AWS SDK for Kotlin to work with Amazon Relational Database Service (Amazon RDS). -## ⚠️ Important -* Running this code might result in charges to your AWS account. + + + +*Amazon RDS is a web service that makes it easier to set up, operate, and scale a relational database in the cloud.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 -The credential provider used in all code examples is Shared credentials. For more information, see [Credential providers](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/credential-providers.html). +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + ### Single actions -Code excerpts that show you how to call individual service functions using the **RdsClient** object: +Code excerpts that show you how to call individual service functions. -- [Create an Amazon RDS instance and wait for it to be in an available state](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/rds/src/main/kotlin/com/kotlin/rds/CreateDBInstance.kt) (createDBInstance command) -- [Create an Amazon RDS snapshot](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/rds/src/main/kotlin/com/kotlin/rds/CreateDBSnapshot.kt) (createDBSnapshot command) -- [Delete an Amazon RDS instance](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/rds/src/main/kotlin/com/kotlin/rds/DeleteDBInstance.kt) (deleteDBInstance command) -- [Retrieve attributes that belong to an Amazon RDS account](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/rds/src/main/kotlin/com/kotlin/rds/DescribeAccountAttributes.kt) (describeAccountAttributes command) -- [Describe an Amazon RDS instance](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/rds/src/main/kotlin/com/kotlin/rds/DescribeDBInstances.kt) (describeDBInstances command) -- [Modify an Amazon RDS instance](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/rds/src/main/kotlin/com/kotlin/rdsModifyDBInstance.kt) (modifyDBInstance command) +* [Create a DB instance](bin/main/com/kotlin/rds/CreateDBInstance.kt#L53) (`CreateDBInstance`) +* [Delete a DB instance](bin/main/com/kotlin/rds/DeleteDBInstance.kt#L44) (`DeleteDBInstance`) +* [Describe DB instances](bin/main/com/kotlin/rds/DescribeDBInstances.kt#L27) (`DescribeDBInstances`) +* [Modify a DB instance](bin/main/com/kotlin/rds/ModifyDBInstance.kt#L46) (`ModifyDBInstance`) +* [Retrieve attributes](bin/main/com/kotlin/rds/DescribeAccountAttributes.kt#L28) (`DescribeAccountAttributes`) -### Scenario +### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -- [Perform various Amazon RDS operations](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/rds/src/main/kotlin/com/kotlin/rds/RDSScenario.kt) (multiple commands) +* [Get started with DB instances](bin/main/com/kotlin/rds/RDSScenario.kt) -- [Perform various Aurora DB cluster operations](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/rds/src/main/kotlin/com/kotlin/rds/AuroraScenario.kt) (multiple commands) +## Run the examples -### Cross-service examples +### Instructions -Sample applications that work across multiple AWS services. -- [Create a React and Spring REST application that queries Amazon Aurora Serverless data](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/usecases/serverless_rds) + + -## Run the examples -To run these examples, set up your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). - -Some of these examples perform *destructive* operations on AWS resources, such as deleting an Amazon RDS instance. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. - -## Test the Amazon RDS Java files - -⚠️ Running the tests might result in charges to your AWS account. - -You can test the Kotlin code examples for Amazon RDS by running a test file named **RDSTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/kotlin** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). - -You can run the JUnit tests from a Java IDE, such as IntelliJ, or from the command line by using Maven. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. - - Test 3 passed - - ### Properties file -Before running the Amazon RDS JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. For example, you define a **dbInstance** identifier value used in the tests. If you do not define all values, the JUnit tests fail. - -Define these values to successfully run the JUnit tests: - -- **dbInstanceIdentifier** - The database instance identifier. -- **dbSnapshotIdentifier** - The snapshot identifier. -- **dbName** - The database name. -- **masterUsername** - The user name. -- **masterUserPassword** - The password that corresponds to the user name. -- **newMasterUserPassword** - The updated password that corresponds to the user name. -- **dbGroupNameSc** - The database group name used in the scenario test. -- **dbParameterGroupFamilySc** - The database parameter group name used in the scenario test (such as mysql8.0). -- **dbInstanceIdentifierSc** - The database instance identifier used in the scenario test. -- **dbNameSc** - The database name used in the scenario test. -- **masterUsernameSc** - The user name used in the scenario test. -- **masterUserPasswordSc** - The password that corresponds to the user name used in the scenario test. -- **dbSnapshotIdentifierSc** - The snapshot identifier used in the scenario test. - -### Command line -To run the JUnit tests from the command line, you can use the following command. - - mvn test - -You will see output from the JUnit tests, as shown here. - - [INFO] ------------------------------------------------------- - [INFO] T E S T S - [INFO] ------------------------------------------------------- - [INFO] Running Tests - Test 1 passed - Test 2 passed - ... - Done! - [INFO] Results: - [INFO] - [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0 - [INFO] - INFO] -------------------------------------------- - [INFO] BUILD SUCCESS - [INFO]-------------------------------------------- - [INFO] Total time: 12.003 s - [INFO] Finished at: 2020-02-10T14:25:08-05:00 - [INFO] -------------------------------------------- - -### Unsuccessful tests - -If you do not define the correct values in the properties file, your JUnit tests are not successful. You will see an error message such as the following. You need to double-check the values that you set in the properties file and run the tests again. - - [INFO] - [INFO] -------------------------------------- - [INFO] BUILD FAILURE - [INFO] -------------------------------------- - [INFO] Total time: 19.038 s - [INFO] Finished at: 2020-02-10T14:41:51-05:00 - [INFO] --------------------------------------- - [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project AmazonRedshiftServiceIntegrationTest: There are test failures. - [ERROR]; - + +#### Get started with DB instances + +This example shows you how to do the following: + +* Create a custom DB parameter group and set parameter values. +* Create a DB instance that's configured to use the parameter group. The DB instance also contains a database. +* Take a snapshot of the instance. +* Delete the instance and parameter group. + + + + + + + + +### 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 `kotlin` folder. + + + + + + ## Additional resources -* [Developer Guide - AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). -* [Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html). -* [Interface RdsClient](https://d2n44ts0t4nz5v.cloudfront.net/api/latest/services/rds/aws.sdk.kotlin.services.rds/-rds-client/index.html). -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html) +* [Amazon RDS API Reference](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/Welcome.html) +* [SDK for Kotlin Amazon RDS reference](https://sdk.amazonaws.com/kotlin/api/latest/rds/index.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/kotlin/services/redshift/Readme.md b/kotlin/services/redshift/Readme.md index 248e603951f..fa22c86b364 100644 --- a/kotlin/services/redshift/Readme.md +++ b/kotlin/services/redshift/Readme.md @@ -1,22 +1,78 @@ -# Amazon Redshift Kotlin code examples + +# Amazon Redshift code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Redshift. +## Overview -## Running the Amazon Redshift Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Redshift. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse service that makes it simple and cost-effective to efficiently analyze all your data using your existing business intelligence tools.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a cluster. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CreateAndModifyCluster** - Demonstrates how to create and modify an Amazon Redshift cluster. -- **DeleteCluster** - Demonstrates how to delete an Amazon Redshift cluster. -- **DescribeClusters** - Demonstrates how to describe Amazon Redshift clusters. -- **FindReservedNodeOffer** - Demonstrates how to find additional Amazon Redshift nodes for purchase. -- **ListEvents** - Demonstrates how to list events for a given Amazon Redshift cluster. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a cluster](bin/main/com/kotlin/redshift/CreateAndModifyCluster.kt#L53) (`CreateCluster`) +* [Delete a cluster](bin/main/com/kotlin/redshift/DeleteCluster.kt#L45) (`DeleteCluster`) +* [Describe your clusters](bin/main/com/kotlin/redshift/DescribeClusters.kt#L28) (`DescribeClusters`) +* [Modify a cluster](bin/main/com/kotlin/redshift/CreateAndModifyCluster.kt#L103) (`ModifyCluster`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon Redshift Management Guide](https://docs.aws.amazon.com/redshift/latest/mgmt/welcome.html) +* [Amazon Redshift API Reference](https://docs.aws.amazon.com/redshift/latest/APIReference/Welcome.html) +* [SDK for Kotlin Amazon Redshift reference](https://sdk.amazonaws.com/kotlin/api/latest/redshift/index.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/kotlin/services/rekognition/Readme.md b/kotlin/services/rekognition/Readme.md index 26ae661153b..c829c314faf 100644 --- a/kotlin/services/rekognition/Readme.md +++ b/kotlin/services/rekognition/Readme.md @@ -1,34 +1,109 @@ -# Amazon Rekognition Kotlin code examples + +# Amazon Rekognition code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Rekognition. +## Overview -## Running the Amazon Rekognition Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Rekognition. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Rekognition makes it easy to add image and video analysis to your applications.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a collection. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **AddFacesToCollection** - Demonstrates how to add faces to an Amazon Rekognition collection. -- **CelebrityInfo** - Demonstrates how to get information about a detected celebrity. -- **CompareFaces** - Demonstrates how to compare two faces. -- **CreateCollection** - Demonstrates how to create an Amazon Rekognition collection. -- **DeleteCollection** - Demonstrates how to delete an Amazon Rekognition collection. -- **DeleteFacesFromCollection** - Demonstrates how to delete faces from an Amazon Rekognition collection. -- **DescribeCollection** - Demonstrates how to retrieve the description of an Amazon Rekognition collection. -- **DetectFaces** - Demonstrates how to detect faces in an image. -- **DetectLabels** - Demonstrates how to capture labels (like water and mountains) in a given image. -- **DetectModerationLabels** - Demonstrates how to detect unsafe content in an image. -- **DetectPPE** - Demonstrates how to detect Personal Protective Equipment (PPE) worn by people detected in an image. -- **DetectText** - Demonstrates how to display words that were detected in an image. -- **ListCollections** - Demonstrates how to list the available Amazon Rekognition collections. -- **ListFacesInCollection** - Demonstrates how to list the faces in an Amazon Rekognition collection. -- **RecognizeCelebrities** - Demonstrates how to recognize celebrities in a given image. -- **VideoDetectFaces** - Demonstrates how to detect faces in a video stored in an Amazon S3 bucket. -- **VideoDetectInappropriate** - Demonstrates how to detect inappropriate or offensive content in a video stored in an Amazon S3 bucket. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Compare faces in an image against a reference image](bin/main/com/kotlin/rekognition/CompareFaces.kt#L48) (`CompareFaces`) +* [Create a collection](bin/main/com/kotlin/rekognition/CreateCollection.kt#L44) (`CreateCollection`) +* [Delete a collection](bin/main/com/kotlin/rekognition/DeleteCollection.kt#L44) (`DeleteCollection`) +* [Delete faces from a collection](bin/main/com/kotlin/rekognition/DeleteFacesFromCollection.kt#L43) (`DeleteFaces`) +* [Describe a collection](bin/main/com/kotlin/rekognition/DescribeCollection.kt#L44) (`DescribeCollection`) +* [Detect faces in an image](bin/main/com/kotlin/rekognition/DetectFaces.kt#L46) (`DetectFaces`) +* [Detect labels in an image](bin/main/com/kotlin/rekognition/DetectLabels.kt#L45) (`DetectLabels`) +* [Detect moderation labels in an image](bin/main/com/kotlin/rekognition/DetectModerationLabels.kt#L44) (`DetectModerationLabels`) +* [Detect text in an image](bin/main/com/kotlin/rekognition/DetectText.kt#L45) (`DetectText`) +* [Index faces to a collection](bin/main/com/kotlin/rekognition/AddFacesToCollection.kt#L48) (`IndexFaces`) +* [List collections](bin/main/com/kotlin/rekognition/ListCollections.kt#L27) (`ListCollections`) +* [List faces in a collection](bin/main/com/kotlin/rekognition/ListFacesInCollection.kt#L42) (`ListFaces`) +* [Recognize celebrities in an image](bin/main/com/kotlin/rekognition/RecognizeCelebrities.kt#L45) (`RecognizeCelebrities`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Detect information in videos](bin/main/com/kotlin/rekognition/VideoDetectFaces.kt) + +## Run the examples + +### Instructions + + + + + + + +#### Detect information in videos + +This example shows you how to do the following: + +* Start Amazon Rekognition jobs to detect elements like people, objects, and text in videos. +* Check job status until jobs finish. +* Output the list of elements detected by each job. + + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon Rekognition Developer Guide](https://docs.aws.amazon.com/rekognition/latest/dg/what-is.html) +* [Amazon Rekognition API Reference](https://docs.aws.amazon.com/rekognition/latest/APIReference/Welcome.html) +* [SDK for Kotlin Amazon Rekognition reference](https://sdk.amazonaws.com/kotlin/api/latest/rekognition/index.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/kotlin/services/s3/Readme.md b/kotlin/services/s3/Readme.md index a75a8800864..8e5242ed806 100644 --- a/kotlin/services/s3/Readme.md +++ b/kotlin/services/s3/Readme.md @@ -1,29 +1,121 @@ -# Amazon S3 Kotlin code examples + +# Amazon S3 code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for the Amazon Simple Storage Service (Amazon S3). +## Overview -## Running the Amazon S3 Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Simple Storage Service (Amazon S3). -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon S3 is storage for the internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting an Amazon S3 bucket. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CopyObject** - Demonstrates how to copy an object from one Amazon S3 bucket to another. -- **CreateBucket** - Demonstrates how to create an Amazon S3 bucket. -- **DeleteBucket** - Demonstrates how to delete an Amazon S3 bucket. -- **DeleteBucketPolicy** - Demonstrates how to delete a policy from an Amazon S3 bucket. -- **DeleteObjects** - Demonstrates how to delete an object from an Amazon S3 bucket. -- **GetAcl** - Demonstrates how to get the access control list (ACL) of an object located in an Amazon S3 bucket. -- **SetBucketPolicy** - Demonstrates how to add a bucket policy to an existing Amazon S3 bucket. -- **GetObjectData** - Demonstrates how to read data from an Amazon S3 object. -- **ListObjects** - Demonstrates how to list objects located in a given Amazon S3 bucket. -- **PutObject** - Demonstrates how to upload an object to an Amazon S3 bucket. -- **SetAcl** - Demonstrates how to set a new ACL for an Amazon S3 bucket. -- **SetBucketPolicy** - Demonstrates how to add a bucket policy to an existing Amazon S3 bucket. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Copy an object from one bucket to another](bin/main/com/kotlin/s3/CopyObject.kt#L52) (`CopyObject`) +* [Create a bucket](bin/main/com/kotlin/s3/CreateBucket.kt#L43) (`CreateBucket`) +* [Delete a policy from a bucket](bin/main/com/kotlin/s3/DeleteBucketPolicy.kt#L45) (`DeleteBucketPolicy`) +* [Delete multiple objects](bin/main/com/kotlin/s3/DeleteObjects.kt#L48) (`DeleteObjects`) +* [Get an object from a bucket](bin/main/com/kotlin/s3/GetObjectData.kt#L50) (`GetObject`) +* [Get the ACL of an object](bin/main/com/kotlin/s3/GetAcl.kt#L45) (`GetObjectAcl`) +* [Get the policy for a bucket](bin/main/com/kotlin/s3/GetBucketPolicy.kt#L46) (`GetBucketPolicy`) +* [List objects in a bucket](bin/main/com/kotlin/s3/ListObjects.kt#L44) (`ListObjectsV2`) +* [Set a new ACL for a bucket](bin/main/com/kotlin/s3/SetAcl.kt#L52) (`PutBucketAcl`) +* [Upload an object to a bucket](bin/main/com/kotlin/s3/PutObject.kt#L50) (`PutObject`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Create a presigned URL](src/main/kotlin/com/kotlin/s3/PresigningExamples.kt) +* [Get started with buckets and objects](bin/main/com/kotlin/s3/S3Operations.kt) + +## Run the examples + +### Instructions + + + + + + + +#### Create a presigned URL + +This example shows you how to create a presigned URL for Amazon S3 and upload an object. + + + + + + + + + +#### Get started with buckets and objects + +This example shows you how to do the following: + +* Create a bucket and upload a file to it. +* Download an object from a bucket. +* Copy an object to a subfolder in a bucket. +* List the objects in a bucket. +* Delete the bucket objects and the bucket. + + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) +* [Amazon S3 API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html) +* [SDK for Kotlin Amazon S3 reference](https://sdk.amazonaws.com/kotlin/api/latest/s3/index.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/kotlin/services/sagemaker/Readme.md b/kotlin/services/sagemaker/Readme.md index 153d66d439f..8157b4c5f4f 100644 --- a/kotlin/services/sagemaker/Readme.md +++ b/kotlin/services/sagemaker/Readme.md @@ -1,27 +1,87 @@ -# Amazon SageMaker Kotlin code examples + +# SageMaker code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon SageMaker. +## Overview -## Running the Amazon SageMaker Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon SageMaker. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*SageMaker is a fully managed machine learning service.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a model. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **CreateModel** - Demonstrates how to create a model in Amazon SageMaker. -- **CreateModel** - Demonstrates how to create a model in Amazon SageMaker. -- **CreateTransformJob** - Demonstrates how to start a transform job that uses a trained model to get inferences on a dataset. -- **DeleteModel** - Demonstrates how to delete a model in Amazon SageMaker. -- **DescribeTrainingJob** - Demonstrates how to obtain information about a training job. -- **ListAlgorithms** - Demonstrates how to list algorithms. -- **ListModels** - Demonstrates how to retrieve a list of models. -- **ListNotebooks** - Demonstrates how to list notebooks. -- **ListTrainingJobs** - Demonstrates how to retrieve a list of training jobs. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + + +### Get started + +* [Hello SageMaker](None) (`ListNotebookInstances`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a pipeline](None) (`CreatePipeline`) +* [Delete a pipeline](None) (`DeletePipeline`) +* [Describe a pipeline execution](None) (`DescribePipelineExecution`) +* [Execute a pipeline](None) (`StartPipelineExecution`) + +## Run the examples + +### Instructions + + + + + +#### Hello SageMaker + +This example shows you how to get started using SageMaker. + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [SageMaker Developer Guide](https://docs.aws.amazon.com/sagemaker/latest/dg/whatis.html) +* [SageMaker API Reference](https://docs.aws.amazon.com/sagemaker/latest/APIReference/Welcome.html) +* [SDK for Kotlin SageMaker reference](https://sdk.amazonaws.com/kotlin/api/latest/sagemaker/index.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/kotlin/services/ses/Readme.md b/kotlin/services/ses/Readme.md index 3066b1ff678..37a2053cb92 100644 --- a/kotlin/services/ses/Readme.md +++ b/kotlin/services/ses/Readme.md @@ -1,20 +1,69 @@ -# Amazon SES Kotlin code examples + +# Amazon SES code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Simple Email Service (Amazon SES). +## Overview -## Running the Amazon SES Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Simple Email Service (Amazon SES). -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon SES is a reliable, scalable, and cost-effective email service.* -Some of these examples perform *destructive* operations on AWS resources. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **ListIdentities** - Demonstrates how to obtain a list of identities for your AWS account. -- **SendMessageEmail** - Demonstrates how to send an email message. -- **SendMessageAttachment** - Demonstrates how to send an email message with an attachment. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon SES Developer Guide](https://docs.aws.amazon.com/ses/latest/dg/Welcome.html) +* [Amazon SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/Welcome.html) +* [SDK for Kotlin Amazon SES reference](https://sdk.amazonaws.com/kotlin/api/latest/ses/index.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/kotlin/services/sns/Readme.md b/kotlin/services/sns/Readme.md index beb6c390ee0..3d44dff3c29 100644 --- a/kotlin/services/sns/Readme.md +++ b/kotlin/services/sns/Readme.md @@ -1,33 +1,95 @@ -# Amazon SNS Kotlin code examples + +# Amazon SNS code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Simple Notification Service (Amazon SNS). +## Overview -## Running the Amazon SNS Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Simple Notification Service (Amazon SNS). -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon SNS is a web service that enables applications, end-users, and devices to instantly send and receive notifications from the cloud.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting an SNS topic. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **AddTags** - Demonstrates how to add tags to an Amazon SNS topic. -- **CreateTopic** - Demonstrates how to create an Amazon SNS topic. -- **DeleteTag** - Demonstrates how to delete tags from an Amazon SNS topic. -- **DeleteTopic** - Demonstrates how to delete an Amazon SNS topic. -- **GetTopicAttributes** - Demonstrates how to retrieve the defaults for an Amazon SNS topic. -- **ListSubscriptions** - Demonstrates how to list existing Amazon SNS subscriptions. -- **ListTags** - Demonstrates how to retrieve tags from an Amazon SNS topic. -- **ListTopics** - Demonstrates how to get a list of existing Amazon SNS topics. -- **PublishTextSMS** - Demonstrates how to send an Amazon SNS text message. -- **PublishTopic** - Demonstrates how to publish an Amazon SNS topic. -- **SetTopicAttributes** - Demonstrates how to set attributes for an Amazon SNS topic. -- **SubscribeEmail** - Demonstrates how to subscribe to an Amazon SNS email endpoint. -- **SubscribeLambda** - Demonstrates how to subscribe to an Amazon SNS lambda function. -- **SubscribeTextSMS** - Demonstrates how to subscribe to an Amazon SNS text endpoint. -- **SubscribeTextSMS** - Demonstrates how to subscribe to an Amazon SNS text endpoint. -- **Unsubscribe** - Demonstrates how to remove an Amazon SNS subscription. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + + +### Get started + +* [Hello Amazon SNS](src/main/kotlin/com/kotlin/sns/HelloSNS.kt#L11) (`ListTopics`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Add tags to a topic](bin/main/com/kotlin/sns/AddTags.kt#L46) (`TagResource`) +* [Create a topic](bin/main/com/kotlin/sns/CreateTopic.kt#L46) (`CreateTopic`) +* [Delete a subscription](None) (`Unsubscribe`) +* [Delete a topic](bin/main/com/kotlin/sns/DeleteTopic.kt#L45) (`DeleteTopic`) +* [Get the properties of a topic](bin/main/com/kotlin/sns/GetTopicAttributes.kt#L45) (`GetTopicAttributes`) +* [List the subscribers of a topic](bin/main/com/kotlin/sns/ListSubscriptions.kt#L27) (`ListSubscriptions`) +* [List topics](bin/main/com/kotlin/sns/ListTopics.kt#L29) (`ListTopics`) +* [Publish an SMS text message](bin/main/com/kotlin/sns/PublishTextSMS.kt#L47) (`Publish`) +* [Publish to a topic](None) (`Publish`) +* [Set topic attributes](None) (`SetTopicAttributes`) +* [Subscribe a Lambda function to a topic](bin/main/com/kotlin/sns/SubscribeLambda.kt#L46) (`Subscribe`) +* [Subscribe an email address to a topic](None) (`Subscribe`) + +## Run the examples + +### Instructions + + + + + +#### Hello Amazon SNS + +This example shows you how to get started using Amazon SNS. + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon SNS Developer Guide](https://docs.aws.amazon.com/sns/latest/dg/welcome.html) +* [Amazon SNS API Reference](https://docs.aws.amazon.com/sns/latest/api/welcome.html) +* [SDK for Kotlin Amazon SNS reference](https://sdk.amazonaws.com/kotlin/api/latest/sns/index.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/kotlin/services/sqs/Readme.md b/kotlin/services/sqs/Readme.md index c0073a411f2..ff42574a75c 100644 --- a/kotlin/services/sqs/Readme.md +++ b/kotlin/services/sqs/Readme.md @@ -1,25 +1,89 @@ -# Amazon SQS Kotlin code examples + +# Amazon SQS code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for the Amazon Simple Queue Service (Amazon SQS). +## Overview -## Running the Amazon SQS Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Simple Queue Service (Amazon SQS). -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon SQS is a fully managed message queuing service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a message. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -- **AddQueueTags** - Demonstrates how to add tags to an Amazon SQS queue. -- **CreateQueue** - Demonstrates how to create an Amazon SQS queue. -- **DeleteMessages** - Demonstrates how to delete Amazon SQS messages and a queue. -- **ListQueues** - Demonstrates how to list Amazon SQS queues. -- **ListQueueTags** - Demonstrates how to retrieve tags from an Amazon SQS queue. -- **RetrieveMessages** - Demonstrates how to retrieve messages from an Amazon SQS queue. -- **RemoveQueueTag** - Demonstrates how to remove a tag from an Amazon SQS queue. -- **SendMessages** - Demonstrates how to send a message to an Amazon SQS queue. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + + +### Get started + +* [Hello Amazon SQS](src/main/kotlin/com/kotlin/sqs/HelloSQS.kt#L9) (`ListQueues`) + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a queue](bin/main/com/kotlin/sqs/CreateQueue.kt#L45) (`CreateQueue`) +* [Delete a message from a queue](bin/main/com/kotlin/sqs/DeleteMessages.kt#L45) (`DeleteMessage`) +* [Delete a queue](bin/main/com/kotlin/sqs/DeleteMessages.kt#L45) (`DeleteQueue`) +* [List queues](bin/main/com/kotlin/sqs/ListQueues.kt#L28) (`ListQueues`) +* [Receive messages from a queue](bin/main/com/kotlin/sqs/ReceiveMessages.kt#L44) (`ReceiveMessage`) +* [Send a message to a queue](bin/main/com/kotlin/sqs/SendMessages.kt#L50) (`SendMessage`) + +## Run the examples + +### Instructions + + + + + +#### Hello Amazon SQS + +This example shows you how to get started using Amazon SQS. + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon SQS Developer Guide](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html) +* [Amazon SQS API Reference](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/Welcome.html) +* [SDK for Kotlin Amazon SQS reference](https://sdk.amazonaws.com/kotlin/api/latest/sqs/index.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/kotlin/services/sts/Readme.md b/kotlin/services/sts/Readme.md index f37bd0d35fa..4f9db98ebce 100644 --- a/kotlin/services/sts/Readme.md +++ b/kotlin/services/sts/Readme.md @@ -1,19 +1,69 @@ -# AWS STS Kotlin code examples + +# AWS STS code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for AWS Security Token Service (AWS STS). +## Overview -## Running the AWS STS Kotlin files +Shows how to use the AWS SDK for Kotlin to work with AWS Security Token Service (AWS STS). -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*AWS STS creates and provides trusted users with temporary security credentials that can control access to your AWS resources.* -You will find these examples: +## ⚠ Important -- **AssumeRole** - Demonstrates how to obtain a set of temporary security credentials by using AWS STS. -- **GetAccessKeyInfo** - Demonstrates how to return the account identifier for the specified access key ID by using AWS STS. -- **GetCallerIdentity** - Demonstrates how to obtain details about the IAM user whose credentials are used to call the operation. -- **GetSessionToken** - Demonstrates how to return a set of temporary credentials. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). + + + +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [AWS STS User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) +* [AWS STS API Reference](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) +* [SDK for Kotlin AWS STS reference](https://sdk.amazonaws.com/kotlin/api/latest/sts/index.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/kotlin/services/support/Readme.md b/kotlin/services/support/Readme.md index 9466f1d5527..d63828b8133 100644 --- a/kotlin/services/support/Readme.md +++ b/kotlin/services/support/Readme.md @@ -1,72 +1,118 @@ + # Support code examples for the SDK for Kotlin ## Overview -This README discusses how to run and test the AWS SDK for Kotlin examples for AWS Support. -AWS Support is one-on-one, fast-response support from experienced technical support engineers. The service helps customers use AWS products and features. With pay-by-the-month pricing and unlimited support cases, customers are freed from long-term commitments. +Shows how to use the AWS SDK for Kotlin to work with AWS Support. -## ⚠️ Important -* The SDK for Kotlin examples perform AWS operations for the account and AWS Region for which you've specified credentials. -* Running these examples might incur charges on your account. For details about the charges you can expect for a given service and API operation, see [AWS Pricing](https://aws.amazon.com/pricing/). -* 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). + + + +*Support provides support for users of Amazon Web Services.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 -The credential provider used in all code examples is Shared credentials. For more information, see [Using credentials](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/credential-providers.html). +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + ### Get started -- [Hello Support](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/HelloSupport.kt) (describeServices command) +* [Hello Support](bin/main/com/example/support/HelloSupport.kt#L14) (`DescribeServices`) -### Single action +### Single actions Code excerpts that show you how to call individual service functions. -- [Add a communication to a case](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (addCommunicationToCase command) -- [Add an attachment to a set](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (addAttachmentsToSet command) -- [Create a case](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (createCase command) -- [Describe an attachment](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (describeAttachment command) -- [Describe services](https://github.com/awsdocs/aws-doc-sdk-examples/blob/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (describeServices command) -- [Describe severity levels](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (describeSeverityLevels command) -- [Describe cases](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (describeCases command) -- [Describe communications](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (describeCommunications command) -- [Resolve the case](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (resolveCase command) +* [Add a communication to a case](bin/main/com/example/support/SupportScenario.kt#L179) (`AddCommunicationToCase`) +* [Add an attachment to a set](bin/main/com/example/support/SupportScenario.kt#L198) (`AddAttachmentsToSet`) +* [Create a case](bin/main/com/example/support/SupportScenario.kt#L241) (`CreateCase`) +* [Describe an attachment](bin/main/com/example/support/SupportScenario.kt#L146) (`DescribeAttachment`) +* [Describe cases](bin/main/com/example/support/SupportScenario.kt#L218) (`DescribeCases`) +* [Describe communications](bin/main/com/example/support/SupportScenario.kt#L159) (`DescribeCommunications`) +* [Describe services](bin/main/com/example/support/SupportScenario.kt#L282) (`DescribeServices`) +* [Describe severity levels](bin/main/com/example/support/SupportScenario.kt#L262) (`DescribeSeverityLevels`) +* [Resolve case](bin/main/com/example/support/SupportScenario.kt#L134) (`ResolveCase`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with cases](bin/main/com/example/support/SupportScenario.kt) -### Scenarios +## Run the examples -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +### Instructions -- [Get started with cases](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/kotlin/services/support/src/main/kotlin/com/example/support/SupportScenario.kt) (Multiple commands) -## Run the AWS Support Kotlin file + + -**Be very careful** when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples. +#### Hello Support -To run these examples, set up your development environment. For more information, -see [Get started with the SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html). +This example shows you how to get started using Support. - ## Test the AWS Support Kotlin file -You can test the Kotlin code example for AWS Support by running a test file named **SupportTest**. This file uses JUnit 5 to run the JUnit tests and is located in the **src/test/kotlin** folder. For more information, see [https://junit.org/junit5/](https://junit.org/junit5/). +#### Get started with cases -You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed. +This example shows you how to do the following: - Test 3 passed +* Get and display available services and severity levels for cases. +* Create a support case using a selected service, category, and severity level. +* Get and display a list of open cases for the current day. +* Add an attachment set and a communication to the new case. +* Describe the new attachment and communication for the case. +* Resolve the case. +* Get and display a list of resolved cases for the current day. -**WARNING**: _Running these JUnit tests manipulates real AWS resources and might incur charges on your account._ + + - ### Properties file -Before running the JUnit tests, you must define values in the **config.properties** file located in the **resources** folder. This file contains values that are required to run the JUnit tests. If you do not define all values, the JUnit tests fail. -Define this value to successfully run the JUnit tests: + + -- **fileAttachment** - The file can be a simple saved .txt file to use as an email attachment. +### 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 `kotlin` folder. + + + + + ## Additional resources -* [Developer Guide - AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/get-started.html) -* [Developer Guide - AWS Support](https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html) -* [SupportClient - Kotlin Reference](https://sdk.amazonaws.com/kotlin/api/latest/support/aws.sdk.kotlin.services.support/index.html) -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 +* [Support User Guide](https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html) +* [Support API Reference](https://docs.aws.amazon.com/awssupport/latest/APIReference/welcome.html) +* [SDK for Kotlin Support reference](https://sdk.amazonaws.com/kotlin/api/latest/support/index.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/kotlin/services/textract/Readme.md b/kotlin/services/textract/Readme.md index 4014d8b4268..7333ec3acc2 100644 --- a/kotlin/services/textract/Readme.md +++ b/kotlin/services/textract/Readme.md @@ -1,19 +1,69 @@ -# Amazon Textract Kotlin code examples + +# Amazon Textract code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Textract. +## Overview -## Running the Amazon Textract Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Textract. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Textract enables you to add document text detection and analysis to your applications.* -You will find these examples: +## ⚠ Important -- **AnalyzeDocument** - Demonstrates how to analyze a document. -- **DetectDocumentText** - Demonstrates how to detect text in the input document. -- **DetectDocumentTextS3** - Demonstrates how to detect text in an input document located in an Amazon Simple Storage Service (Amazon S3) bucket. -- **StartDocumentAnalysis** - Demonstrates how to start the asynchronous analysis of a document. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). + + + +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon Textract Developer Guide](https://docs.aws.amazon.com/textract/latest/dg/what-is.html) +* [Amazon Textract API Reference](https://docs.aws.amazon.com/textract/latest/dg/API_Reference.html) +* [SDK for Kotlin Amazon Textract reference](https://sdk.amazonaws.com/kotlin/api/latest/textract/index.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/kotlin/services/translate/Readme.md b/kotlin/services/translate/Readme.md index f1612488995..210ccb069ca 100644 --- a/kotlin/services/translate/Readme.md +++ b/kotlin/services/translate/Readme.md @@ -1,19 +1,69 @@ -# Amazon Translate Kotlin code examples + +# Amazon Translate code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for Amazon Translate. +## Overview -## Running the Amazon Translate Kotlin files +Shows how to use the AWS SDK for Kotlin to work with Amazon Translate. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Translate is a neural machine translation service for translating text to and from English across a breadth of supported languages.* -You will find these examples: +## ⚠ Important -- **BatchTranslation** - Demonstrates how to translate multiple text documents located in an Amazon Simple Storage Service (Amazon S3) bucket. -- **DescribeTextTranslationJob** - Demonstrates how to describe a translation job. -- **ListTextTranslationJobs** - Demonstrates how to list all translation jobs. -- **TranslateText** - Demonstrates how to translate text from one language to another. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). + + + +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +* [Amazon Translate Developer Guide](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) +* [Amazon Translate API Reference](https://docs.aws.amazon.com/translate/latest/APIReference/welcome.html) +* [SDK for Kotlin Amazon Translate reference](https://sdk.amazonaws.com/kotlin/api/latest/translate/index.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/auto-scaling/Readme.md b/php/example_code/auto-scaling/Readme.md index eedafe3594b..6c49fe34a0b 100644 --- a/php/example_code/auto-scaling/Readme.md +++ b/php/example_code/auto-scaling/Readme.md @@ -1,4 +1,4 @@ - + # Auto Scaling code examples for the SDK for PHP ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for PHP to work with Amazon EC2 Auto Scaling. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,6 +24,9 @@ Shows how to use the AWS SDK for PHP to work with Amazon EC2 Auto Scaling. ### Prerequisites +For prerequisites, see the [README](../../README.md#Prerequisites) in the `php` folder. + + - You must have an AWS account, and have your default credentials and AWS Region configured as described in the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide] @@ -32,11 +35,16 @@ Shows how to use the AWS SDK for PHP to work with Amazon EC2 Auto Scaling. - Composer installed. + +### Get started + +* [Hello Auto Scaling](GettingStartedWithAutoScaling.php#L245) (`DescribeAutoScalingGroups`) + ### Single actions Code excerpts that show you how to call individual service functions. -* [Create a group](GettingStartedWithAutoScaling.php#L244) (`CreateAutoScalingGroup`) +* [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`) @@ -52,7 +60,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Manage groups and instances](GettingStartedWithAutoScaling.php) +* [Manage groups and instances](GettingStartedWithAutoScaling.php) ## Run the examples @@ -76,6 +84,10 @@ php Runner.php ``` +#### Hello Auto Scaling + +This example shows you how to get started using Auto Scaling. + #### Manage groups and instances @@ -92,6 +104,7 @@ This example shows you how to do the following: + @@ -99,7 +112,11 @@ This example shows you how to do the following: ⚠ Running tests might result in charges to your AWS account. -From the `aws-doc-sdk-examples/php/auto-scaling/` directory: + +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `php` folder. + + Install dependencies by using Composer: diff --git a/php/example_code/cloudfront/README.md b/php/example_code/cloudfront/README.md new file mode 100644 index 00000000000..1a7808f382a --- /dev/null +++ b/php/example_code/cloudfront/README.md @@ -0,0 +1,69 @@ + +# CloudFront code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon CloudFront. + + + + +*CloudFront speeds up distribution of your static and dynamic web content, such as .html, .css, .php, image, and media files.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [CloudFront Developer Guide](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) +* [CloudFront API Reference](https://docs.aws.amazon.com/cloudfront/latest/APIReference/Welcome.html) +* [SDK for PHP CloudFront reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Cloudfront.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/cloudwatch/README.md b/php/example_code/cloudwatch/README.md new file mode 100644 index 00000000000..8a16334bb17 --- /dev/null +++ b/php/example_code/cloudwatch/README.md @@ -0,0 +1,69 @@ + +# CloudWatch code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon CloudWatch. + + + + +*CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) +* [CloudWatch API Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) +* [SDK for PHP CloudWatch reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Cloudwatch.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/dynamodb/Readme.md b/php/example_code/dynamodb/Readme.md index 7b9404e382c..9c8eb7f8840 100644 --- a/php/example_code/dynamodb/Readme.md +++ b/php/example_code/dynamodb/Readme.md @@ -1,136 +1,145 @@ -# Amazon DynamoDB code examples for the SDK for PHP (v3) + +# DynamoDB code examples for the SDK for PHP -## Purpose +## Overview -Shows how to use the AWS SDK for PHP (v3) to get started using operations in Amazon DynamoDB. Learn to create tables, add -items, update data, create custom queries, and delete tables and items. +Shows how to use the AWS SDK for PHP to work with Amazon DynamoDB. -*Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless -scalability.* + + -## ⚠️ Important -* Running this code might result in charges to your AWS account. +*DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 table](dynamodb_basics/GettingStartedWithDynamoDB.php)(`create_table`) -* [Delete a table](DynamoDBService.php)(`delete_table`) -* [Delete an item from a table](dynamodb_basics/GettingStartedWithDynamoDB.php)(`delete_item`) -* [Get an item from a table](dynamodb_basics/GettingStartedWithDynamoDB.php)(`get_item`) -* [Put an item into a table](dynamodb_basics/GettingStartedWithDynamoDB.php)(`put_item`) -* [Put items loaded from a JSON file into a table](dynamodb_basics/GettingStartedWithDynamoDB.php) - (`put_item`) -* [Query items by using a key condition expression](dynamodb_basics/GettingStartedWithDynamoDB.php) - (`query`) -* [Scan a table for items](dynamodb_basics/GettingStartedWithDynamoDB.php) - (`scan`) -* [Update an item in a table](dynamodb_basics/GettingStartedWithDynamoDB.php) - (`update_item`) -* [Create an item in a table with PartiQL](partiql_basics/GettingStartedWithPartiQL.php) - (`executeStatement - INSERT`) -* [Get an item in a table with PartiQL](partiql_basics/GettingStartedWithPartiQL.php) - (`executeStatement - SELECT`) -* [Update an item in a table with PartiQL](partiql_basics/GettingStartedWithPartiQL.php) - (`executeStatement - UPDATE`) -* [Delete an item in a table with PartiQL](partiql_basics/GettingStartedWithPartiQL.php) - (`executeStatement - DELETE`) -* [Create an item in a table with PartiQL - BatchExecuteStatement](partiql_basics/GettingStartedWithPartiQLBatch.php) - (`executeStatement - INSERT`) -* [Get an item in a table with PartiQL - BatchExecuteStatement](partiql_basics/GettingStartedWithPartiQLBatch.php) - (`executeStatement - SELECT`) -* [Update an item in a table with PartiQL - BatchExecuteStatement](partiql_basics/GettingStartedWithPartiQLBatch.php) - (`executeStatement - UPDATE`) -* [Delete an item in a table with PartiQL - BatchExecuteStatement](partiql_basics/GettingStartedWithPartiQLBatch.php) - (`executeStatement - DELETE`) - -### Scenario examples - -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. - -* [Getting started with DynamoDB](dynamodb_basics/GettingStartedWithDynamoDB.php) -* [Getting started with DynamoDB and PartiQL](dynamodb_basics/GettingStartedWithPartiQL.php) -* [Getting started with PartiQL batching](dynamodb_basics/GettingStartedWithPartiQLBatch.php) - -## Running the examples -**Getting started with DynamoDB** - -This scenario shows you how to create an Amazon DynamoDB table for storing movie data. The scenario loads movies into -the table from a JSON-formatted file and walks you through an interactive demo to add, update, and delete movies one at -a time. The scenario also shows you how to query for sets of movies. - -``` -composer install -``` - -After your composer dependencies are installed, you can run the interactive getting started file directly with the -following from the `aws-doc-sdk-examples\php\dynamodb\dynamodb_basics` directory: - -``` -php Runner.php -``` - -Alternatively, you can have the choices automatically selected by running the file as part of a PHPUnit test with the -following: - -``` -..\..\vendor\bin\phpunit DynamoDBBasicsTests.php -``` - -**Getting started with DynamoDB and PartiQL** - -This scenario shows you how to create an Amazon DynamoDB table for storing movie data. The scenario loads movies into -the table from a JSON-formatted file and walks you through an interactive demo to add, update, and delete movies by -using PartiQL (both with `executeStatement` and `batchExecuteStatement`). - -Run the following from the `aws-doc-sdk-examples\php\dynamodb\partiql_basics` directory: - -``` -composer install -``` - -After your composer dependencies are installed, you can run the interactive getting started file directly with the -following: - -``` -php Runner.php -``` - -Alternatively, you can have the choices automatically selected by running the file as part of a PHPUnit test with the -following: - -``` -..\..\vendor\bin\phpunit PartiQLBasicsTests.php -``` - -*Note: `batchExecuteStatement` examples are found in `GettingStartedWithPartiQLBatch.php`. To run this example with -`Runner.php`, edit the file and change all instances of `GettingStartedWithPartiQL` to `GettingStartedWithPartiQLBatch`. +* [Create a table](dynamodb_basics/GettingStartedWithDynamoDB.php#L52) (`CreateTable`) +* [Delete a table](DynamoDBService.php#L85) (`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`) +* [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`) +* [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`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with tables, items, and queries](dynamodb_basics/GettingStartedWithDynamoDB.php) +* [Query a table by using batches of PartiQL statements](DynamoDBService.php) +* [Query a table using PartiQL](DynamoDBService.php) + +## Run the examples + +### Instructions + + + + + + + +#### Get started with tables, items, and queries + +This example shows you how to do the following: + +* Create a table that can hold movie data. +* Put, get, and update a single movie in the table. +* Write movie data to the table from a sample JSON file. +* Query for movies that were released in a given year. +* Scan for movies that were released in a range of years. +* Delete a movie from the table, then delete the table. + + + -### Prerequisites -- You must have an AWS account, and have your default credentials and AWS Region configured as described in -the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide] -(https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). -- PHP 7.1 or later. -- Composer installed. + + + +#### Query a table by using batches of PartiQL statements + +This example shows you how to do the following: + +* Get a batch of items by running multiple SELECT statements. +* Add a batch of items by running multiple INSERT statements. +* Update a batch of items by running multiple UPDATE statements. +* Delete a batch of items by running multiple DELETE statements. + + + + + + + + +#### Query a table using PartiQL + +This example shows you how to do the following: + +* Get an item by running a SELECT statement. +* Add an item by running an INSERT statement. +* Update an item by running an UPDATE statement. +* Delete an item by running a DELETE statement. + + + + + + + + +### 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 -- [Amazon DynamoDB Documentation](https://docs.aws.amazon.com/dynamodb) -- [Amazon DynamoDB API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Operations_Amazon_DynamoDB.html) -- [AWS SDK for PHP DynamoDB Namespace](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.DynamoDb.html) +* [DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) +* [DynamoDB API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html) +* [SDK for PHP DynamoDB reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Dynamodb.html) + + + --- + Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 + +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/php/example_code/ec2/README.md b/php/example_code/ec2/README.md new file mode 100644 index 00000000000..f59fff4a9ab --- /dev/null +++ b/php/example_code/ec2/README.md @@ -0,0 +1,69 @@ + +# Amazon EC2 code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon Elastic Compute Cloud (Amazon EC2). + + + + +*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 + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [Amazon EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) +* [Amazon EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html) +* [SDK for PHP Amazon EC2 reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Ec2.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/glue/Readme.md b/php/example_code/glue/Readme.md index 35fbc28d5dd..3d4c9455356 100644 --- a/php/example_code/glue/Readme.md +++ b/php/example_code/glue/Readme.md @@ -1,118 +1,111 @@ + # AWS Glue code examples for the SDK for PHP ## Overview -Shows how to use the AWS SDK for PHP to manage AWS Glue resources. +Shows how to use the AWS SDK for PHP to work with AWS Glue. -*AWS Glue is a serverless data-preparation service for extract, transform, and load -(ETL) operations.* + + -## ⚠️ Important +*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.* -* Running this code might result in charges to your AWS account. +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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 -### Single action - -* [Create a crawler](GettingStartedWithGlue.php) - (`CreateCrawler`) -* [Create a job definition](GettingStartedWithGlue.php) - (`CreateJob`) -* [Delete a crawler](GettingStartedWithGlue.php) - (`DeleteJob`) -* [Delete a database from the AWS Glue Data Catalog](GettingStartedWithGlue.php) - (`DeleteDatabase`) -* [Delete a job definition](GettingStartedWithGlue.php) - (`DeleteJob`) -* [Delete a table from a database](GettingStartedWithGlue.php) - (`DeleteTable`) -* [Get a crawler](GettingStartedWithGlue.php) - (`GetCrawler`) -* [Get a database from the AWS Glue Data Catalog](GettingStartedWithGlue.php) - (`GetDatabase`) -* [Get a job run](GettingStartedWithGlue.php) - (`GetJobRun`) -* [Get runs of a job](GettingStartedWithGlue.php) - (`GetJobRuns`) -* [Get tables from a database](GettingStartedWithGlue.php) - (`GetTables`) -* [List job definitions](GettingStartedWithGlue.php) - (`ListJobs`) -* [Start a crawler](GettingStartedWithGlue.php) - (`StartCrawler`) -* [Start a job run](GettingStartedWithGlue.php) - (`StartJobRun`) +### 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#L48) (`CreateCrawler`) +* [Create a job definition](GettingStartedWithGlue.php#L55) (`CreateJob`) +* [Delete a crawler](GettingStartedWithGlue.php#L181) (`DeleteCrawler`) +* [Delete a database from the Data Catalog](GettingStartedWithGlue.php#L174) (`DeleteDatabase`) +* [Delete a job definition](GettingStartedWithGlue.php#L160) (`DeleteJob`) +* [Delete a table from a database](GettingStartedWithGlue.php#L167) (`DeleteTable`) +* [Get a crawler](GettingStartedWithGlue.php#L70) (`GetCrawler`) +* [Get a database from the Data Catalog](GettingStartedWithGlue.php#L59) (`GetDatabase`) +* [Get a job run](GettingStartedWithGlue.php#L108) (`GetJobRun`) +* [Get runs of a job](GettingStartedWithGlue.php#L108) (`GetJobRuns`) +* [Get tables from a database](GettingStartedWithGlue.php#L59) (`GetTables`) +* [List job definitions](GettingStartedWithGlue.php#L152) (`ListJobs`) +* [Start a crawler](GettingStartedWithGlue.php#L48) (`StartCrawler`) +* [Start a job run](GettingStartedWithGlue.php#L108) (`StartJobRun`) ### Scenarios -* [Get started running crawlers and jobs](GettingStartedWithGlue.php) +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 -### Get started running crawlers and jobs scenario +### Instructions -This interactive scenario runs at a command prompt and shows you how to use -AWS Glue to do the following: -1. Create and run a crawler that crawls a public Amazon Simple Storage - Service (Amazon S3) bucket and generates a metadata database that describes the - CSV-formatted data it finds. -2. List information about databases and tables in your AWS Glue Data Catalog. -3. Create and run a job that extracts CSV data from the source S3 bucket, - transforms it by removing and renaming fields, and loads JSON-formatted output into - another S3 bucket. -4. List information about job runs and view some of the transformed data. -5. Delete all resources created by the demo. + + -This scenario requires the following scaffold resources that are defined in the -accompanying AWS CloudFormation script `setup_scenario_getting_started.yaml`. -* An S3 bucket that can contain the Python ETL job script and can receive - output data. -* An AWS Identity and Access Management (IAM) role that can be assumed by AWS Glue. - The role must grant read-write access to the S3 bucket and standard rights needed by - AWS Glue. -Install dependencies by using Composer: +#### Get started with crawlers and jobs -``` -composer install -``` +This example shows you how to do the following: -After your composer dependencies are installed, you can run the interactive getting started file directly by using the -following command from the `aws-doc-sdk-examples\php\glue\` directory: +* 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. -``` -php Runner.php -``` + + -Alternatively, you can have the choices automatically selected by running the file as part of a PHPUnit test with the -following: -``` -..\..\vendor\bin\phpunit GlueBasicsTests.php -``` + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. -### Prerequisites -- You must have an AWS account, and have your default credentials and AWS Region configured as described in - the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide] - (https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). -- PHP 7.1 or later. -- Composer installed. +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) -* [AWS SDK for PHP Glue Client](https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.Glue.GlueClient.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 +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 0e94fd57f4f..26e6a5120bb 100644 --- a/php/example_code/iam/README.md +++ b/php/example_code/iam/README.md @@ -1,4 +1,4 @@ - + # IAM code examples for the SDK for PHP ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for PHP to work with AWS Identity and Access Manage ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -34,28 +34,28 @@ 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#L45) (`AttachRolePolicy`) -* [Create a policy](GettingStartedWithIAM.php#L45) (`CreatePolicy`) -* [Create a role](GettingStartedWithIAM.php#L45) (`CreateRole`) -* [Create a service-linked role](GettingStartedWithIAM.php#L45) (`CreateServiceLinkedRole`) -* [Create a user](GettingStartedWithIAM.php#L45) (`CreateUser`) -* [Get a policy](GettingStartedWithIAM.php#L45) (`GetPolicy`) -* [Get a role](GettingStartedWithIAM.php#L45) (`GetRole`) -* [Get the account password policy](GettingStartedWithIAM.php#L45) (`GetAccountPasswordPolicy`) -* [List SAML providers](GettingStartedWithIAM.php#L45) (`ListSAMLProviders`) -* [List groups](GettingStartedWithIAM.php#L45) (`ListGroups`) -* [List inline policies for a role](GettingStartedWithIAM.php#L45) (`ListRolePolicies`) -* [List policies](GettingStartedWithIAM.php#L45) (`ListPolicies`) -* [List policies attached to a role](GettingStartedWithIAM.php#L45) (`ListAttachedRolePolicies`) -* [List roles](GettingStartedWithIAM.php#L45) (`ListRoles`) -* [List users](GettingStartedWithIAM.php#L45) (`ListUsers`) +* [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`) ### Scenarios Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a user and assume a role](GettingStartedWithIAM.php) +* [Create a user and assume a role](GettingStartedWithIAM.php) ## Run the examples @@ -111,4 +111,4 @@ in the `php` folder. Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/php/example_code/kinesis/README.md b/php/example_code/kinesis/README.md new file mode 100644 index 00000000000..33d441ff393 --- /dev/null +++ b/php/example_code/kinesis/README.md @@ -0,0 +1,69 @@ + +# Kinesis code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon Kinesis. + + + + +*Kinesis makes it easy to collect, process, and analyze video and data streams in real time.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [Kinesis Developer Guide](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) +* [Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/Welcome.html) +* [SDK for PHP Kinesis reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Kinesis.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/kms/README.md b/php/example_code/kms/README.md new file mode 100644 index 00000000000..0ac4b2fe561 --- /dev/null +++ b/php/example_code/kms/README.md @@ -0,0 +1,69 @@ + +# AWS KMS code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with AWS Key Management Service (AWS KMS). + + + + +*AWS KMS is an encryption and key management service scaled for the cloud.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 KMS Developer Guide](https://docs.aws.amazon.com/kms/latest/developerguide/overview.html) +* [AWS KMS API Reference](https://docs.aws.amazon.com/kms/latest/APIReference/Welcome.html) +* [SDK for PHP AWS KMS reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Kms.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/lambda/Readme.md b/php/example_code/lambda/Readme.md index 0e61b8a7850..479130c8075 100644 --- a/php/example_code/lambda/Readme.md +++ b/php/example_code/lambda/Readme.md @@ -1,104 +1,105 @@ + # Lambda code examples for the SDK for PHP ## Overview -Shows how to use the AWS SDK for PHP to create, deploy, and invoke -AWS Lambda functions. Learn to accomplish the following tasks +Shows how to use the AWS SDK for PHP to work with AWS Lambda. -* Create, deploy, and invoke Lambda function. -* Update function code or configuration options. -* List all existing functions. + + -*With AWS Lambda, you can run code without provisioning or managing servers. You pay only for the compute time that -you consume—there's no charge when your code isn't running.* +*Lambda allows you to run code without provisioning or managing servers.* -## ⚠️ Important +## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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 function](LambdaService.php) - (`CreateFunction`) -* [Delete a function](LambdaService.php) - (`DeleteFunction`) -* [Get a function](LambdaService.php) - (`GetFunction`) -* [Invoke a function](LambdaService.php) - (`Invoke`) -* [List functions](LambdaService.php) - (`ListFunctions`) -* [Update function code](LambdaService.php) - (`UpdateFunctionCode`) -* [Update function configuration](LambdaService.php) - (`UpdateFunctionConfiguration`) +* [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`) ### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. * [Get started with functions](GettingStartedWithLambda.php) ## Run the examples -### Get started with functions +### Instructions -This interactive scenario runs at a command prompt and shows you how to use -AWS Lambda to do the following: -1. Create an AWS Identity and Access Management (IAM) role that grants Lambda - permission to write to logs. -1. Create a Lambda function and upload handler code. -1. Invoke the function with a single parameter and get results. -1. Update the function code and configure its Lambda environment with an environment - variable. -1. Invoke the function with new parameters and get results. Display the execution - log that's returned from the invocation. -1. List the functions for your account. -1. Delete the IAM role and the Lambda function. + + -Install dependencies by using Composer: -``` -composer install -``` -After your composer dependencies are installed, you can run the interactive getting started file directly by using the -following command from the `aws-doc-sdk-examples\php\Lambda\` directory: +#### Get started with functions -``` -php Runner.php -``` +This example shows you how to do the following: -Alternatively, you can have the choices automatically selected by running the file as part of a PHPUnit test with the -following: +* Create an IAM role and Lambda function, then upload handler code. +* Invoke the function with a single parameter and get results. +* Update the function code and configure with an environment variable. +* Invoke the function with new parameters and get results. Display the returned execution log. +* List the functions for your account, then clean up resources. -``` -..\..\vendor\bin\phpunit LambdaBasicsTests.php -``` + + -### Prerequisites -- You must have an AWS account, and have your default credentials and AWS Region configured as described in - the [AWS Tools and SDKs Shared Configuration and Credentials Reference Guide](https://docs.aws.amazon.com/credref/latest/refdocs/creds-config-files.html). -- PHP 7.1 or later. -- Composer installed. + + + +### 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 Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) -* [AWS Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) -* [AWS SDK for PHP Lambda Client](https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.Lambda.LambdaClient.html) +* [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) +* [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) +* [SDK for PHP Lambda reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Lambda.html) + + + --- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/php/example_code/mediaconvert/README.md b/php/example_code/mediaconvert/README.md new file mode 100644 index 00000000000..89733542818 --- /dev/null +++ b/php/example_code/mediaconvert/README.md @@ -0,0 +1,69 @@ + +# MediaConvert code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with AWS Elemental MediaConvert. + + + + +*MediaConvert is a service that formats and compresses offline video content for delivery to televisions or connected devices.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [MediaConvert User Guide](https://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html) +* [MediaConvert API Reference](https://docs.aws.amazon.com/mediaconvert/latest/apireference/custom-endpoints.html) +* [SDK for PHP MediaConvert reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Mediaconvert.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/polly/README.md b/php/example_code/polly/README.md new file mode 100644 index 00000000000..9f06bbdfc86 --- /dev/null +++ b/php/example_code/polly/README.md @@ -0,0 +1,69 @@ + +# Amazon Polly code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon Polly. + + + + +*Amazon Polly is a Text-to-Speech (TTS) cloud service that converts text into lifelike speech.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [Amazon Polly Developer Guide](https://docs.aws.amazon.com/polly/latest/dg/what-is.html) +* [Amazon Polly API Reference](https://docs.aws.amazon.com/polly/latest/dg/API_Reference.html) +* [SDK for PHP Amazon Polly reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Polly.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/rds/README.md b/php/example_code/rds/README.md new file mode 100644 index 00000000000..31931ef01f1 --- /dev/null +++ b/php/example_code/rds/README.md @@ -0,0 +1,69 @@ + +# Amazon RDS code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon Relational Database Service (Amazon RDS). + + + + +*Amazon RDS is a web service that makes it easier to set up, operate, and scale a relational database in the cloud.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html) +* [Amazon RDS API Reference](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/Welcome.html) +* [SDK for PHP Amazon RDS reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Rds.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/s3/README.md b/php/example_code/s3/README.md new file mode 100644 index 00000000000..d5dd16e1271 --- /dev/null +++ b/php/example_code/s3/README.md @@ -0,0 +1,105 @@ + +# Amazon S3 code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon Simple Storage Service (Amazon S3). + + + + +*Amazon S3 is storage for the internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + +* [Copy an object from one bucket to another](s3_basics/GettingStartedWithS3.php#L46) (`CopyObject`) +* [Create a bucket](s3_basics/GettingStartedWithS3.php#L46) (`CreateBucket`) +* [Delete an empty bucket](s3_basics/GettingStartedWithS3.php#L46) (`DeleteBucket`) +* [Delete multiple objects](s3_basics/GettingStartedWithS3.php#L46) (`DeleteObjects`) +* [Get an object from a bucket](s3_basics/GettingStartedWithS3.php#L46) (`GetObject`) +* [List objects in a bucket](s3_basics/GettingStartedWithS3.php#L46) (`ListObjectsV2`) +* [Upload an object to a bucket](s3_basics/GettingStartedWithS3.php#L46) (`PutObject`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with buckets and objects](s3_basics/GettingStartedWithS3.php) + +## Run the examples + +### Instructions + + + + + + + +#### Get started with buckets and objects + +This example shows you how to do the following: + +* Create a bucket and upload a file to it. +* Download an object from a bucket. +* Copy an object to a subfolder in a bucket. +* List the objects in a bucket. +* Delete the bucket objects and the bucket. + + + + + + + + +### 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 + +* [Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) +* [Amazon S3 API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html) +* [SDK for PHP Amazon S3 reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.S3.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/ses/README.md b/php/example_code/ses/README.md new file mode 100644 index 00000000000..23a6a07d74f --- /dev/null +++ b/php/example_code/ses/README.md @@ -0,0 +1,69 @@ + +# Amazon SES code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon Simple Email Service (Amazon SES). + + + + +*Amazon SES is a reliable, scalable, and cost-effective email service.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [Amazon SES Developer Guide](https://docs.aws.amazon.com/ses/latest/dg/Welcome.html) +* [Amazon SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/Welcome.html) +* [SDK for PHP Amazon SES reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Ses.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/sns/README.md b/php/example_code/sns/README.md index 450534992d9..cdc22e1bdba 100644 --- a/php/example_code/sns/README.md +++ b/php/example_code/sns/README.md @@ -1,41 +1,90 @@ -# Amazon SNS AWS SDK for PHP Version 3 code examples + +# Amazon SNS code examples for the SDK for PHP -## Purpose -The code examples in this directory demonstrate how to work with the Amazon Simple Notification Service -(Amazon SNS) using the AWS SDK for PHP Version 3. +## Overview -Amazon SNS is a fully managed messaging service for both system-to-system and app-to-person (A2P) communication. +Shows how to use the AWS SDK for PHP to work with Amazon Simple Notification Service (Amazon SNS). -## Code examples -This is a workspace where you can find AWS SDK for PHP Version 3 Amazon SNS examples. - -- [Checking phone opt out](./CheckOptOut.php) -- [Confirming a subscription](./ConfirmSubscription.php) -- [Creating a topic](./CreateTopic.php) -- [Deleting a topic](./DeleteTopic.php) -- [Getting SMS attributes](./GetSMSAttributes.php) -- [Getting topic attributes](./GetTopicAttributes.php) -- [Listing opted out numbers](./ListOptOut.php) -- [Listing subscriptions](./ListSubscriptions.php) -- [Listing topics](./ListTopics.php) -- [Publishing SMS](./PublishTextSMS.php) -- [Publishing to topics](./PublishTopic.php) -- [Setting SMS type](./SetSMSAttributes.php) -- [Setting topic attributes](./SetTopicAttributes.php) -- [Subscribing to an email](./SubscribeEmail.php) -- [Subscribing to an HTTPS endpoint](./SubscribeHTTPS.php) -- [Subscribing to Lambda](./SubscribeLambda.php) -- [Subscribing to SMS](./SubscribeTextSMS.php) -- [Unsubscribing from a topic](./unsubscribe.php) + + + +*Amazon SNS is a web service that enables applications, end-users, and devices to instantly send and receive notifications from the cloud.* ## ⚠ Important -- We recommend that you grant this code least privilege, or at most 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) in the AWS Identity and Access Management User Guide. -- This code has not been tested in all AWS Regions. Some AWS services are available only in specific [Regions](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). -- Running this code might result in charges to your AWS account. -- Running the unit tests might result in charges to your AWS account. [optional] -## Resources -- [AWS SDK for PHP Version 3](https://github.com/aws/aws-sdk-php) -- [AWS SDK for PHP developer guide](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html) -- [AWS SDK for PHP 3.x API reference guide](https://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html) +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + +* [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`) + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [Amazon SNS Developer Guide](https://docs.aws.amazon.com/sns/latest/dg/welcome.html) +* [Amazon SNS API Reference](https://docs.aws.amazon.com/sns/latest/api/welcome.html) +* [SDK for PHP Amazon SNS reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Sns.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/sqs/README.md b/php/example_code/sqs/README.md new file mode 100644 index 00000000000..1a96407509b --- /dev/null +++ b/php/example_code/sqs/README.md @@ -0,0 +1,69 @@ + +# Amazon SQS code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon Simple Queue Service (Amazon SQS). + + + + +*Amazon SQS is a fully managed message queuing service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [Amazon SQS Developer Guide](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html) +* [Amazon SQS API Reference](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/Welcome.html) +* [SDK for PHP Amazon SQS reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Sqs.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/sts/README.md b/php/example_code/sts/README.md new file mode 100644 index 00000000000..75844bc15e7 --- /dev/null +++ b/php/example_code/sts/README.md @@ -0,0 +1,69 @@ + +# AWS STS code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with AWS Security Token Service (AWS STS). + + + + +*AWS STS creates and provides trusted users with temporary security credentials that can control access to your AWS resources.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 STS User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) +* [AWS STS API Reference](https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html) +* [SDK for PHP AWS STS reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Sts.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/translate/README.md b/php/example_code/translate/README.md new file mode 100644 index 00000000000..6ab7516dcb9 --- /dev/null +++ b/php/example_code/translate/README.md @@ -0,0 +1,69 @@ + +# Amazon Translate code examples for the SDK for PHP + +## Overview + +Shows how to use the AWS SDK for PHP to work with Amazon Translate. + + + + +*Amazon Translate is a neural machine translation service for translating text to and from English across a breadth of supported languages.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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. + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +* [Amazon Translate Developer Guide](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) +* [Amazon Translate API Reference](https://docs.aws.amazon.com/translate/latest/APIReference/welcome.html) +* [SDK for PHP Amazon Translate reference](https://docs.aws.amazon.com/aws-sdk-php/v3/api/namespace-Aws.Translate.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/python/example_code/acm/README.md b/python/example_code/acm/README.md index 8dbd20333ba..fd9b0e60a2f 100644 --- a/python/example_code/acm/README.md +++ b/python/example_code/acm/README.md @@ -1,4 +1,4 @@ - + # ACM code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS Certificate Man ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -55,7 +55,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Manage certificates](certificate_basics.py) +* [Manage certificates](certificate_basics.py) ## Run the examples @@ -85,6 +85,7 @@ Start the example by running the following at a command prompt: python certificate_basics.py ``` + diff --git a/python/example_code/api-gateway/README.md b/python/example_code/api-gateway/README.md index 69e850d1833..4419b853eec 100644 --- a/python/example_code/api-gateway/README.md +++ b/python/example_code/api-gateway/README.md @@ -1,4 +1,4 @@ - + # API Gateway code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon API Gateway. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -55,15 +55,15 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create and deploy a REST API](aws_service/aws_service.py) +* [Create and deploy a REST API](aws_service/aws_service.py) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create a REST API to track COVID-19 data](../../cross_service/apigateway_covid-19_tracker) -* [Create a lending library REST API](../../cross_service/aurora_rest_lending_library) -* [Create a websocket chat application](../../cross_service/apigateway_websocket_chat) +* [Create a REST API to track COVID-19 data](../../cross_service/apigateway_covid-19_tracker) +* [Create a lending library REST API](../../cross_service/aurora_rest_lending_library) +* [Create a websocket chat application](../../cross_service/apigateway_websocket_chat) ## Run the examples @@ -93,6 +93,7 @@ Start the example by running the following at a command prompt: python aws_service/aws_service.py ``` + For additional instructions on how to set up and run this example, see the [README](aws_service/README.md) in the `aws_service` folder. diff --git a/python/example_code/auditmanager/README.md b/python/example_code/auditmanager/README.md index 12267d2d652..53c7dc209b9 100644 --- a/python/example_code/auditmanager/README.md +++ b/python/example_code/auditmanager/README.md @@ -1,4 +1,4 @@ - + # Audit Manager code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS Audit Manager. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -56,9 +56,9 @@ that you want to use. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a custom framework from an AWS Config conformance pack](framework_from_conformance_pack.py) -* [Create a custom framework that contains Security Hub controls](security_hub_custom_framework.py) -* [Create an assessment report](create_assessment_report.py) +* [Create a custom framework from an AWS Config conformance pack](framework_from_conformance_pack.py) +* [Create a custom framework that contains Security Hub controls](security_hub_custom_framework.py) +* [Create an assessment report](create_assessment_report.py) ## Run the examples @@ -87,6 +87,7 @@ Start the example by running the following at a command prompt: python framework_from_conformance_pack.py ``` + @@ -106,6 +107,7 @@ Start the example by running the following at a command prompt: python security_hub_custom_framework.py ``` + @@ -123,6 +125,7 @@ Start the example by running the following at a command prompt: python create_assessment_report.py ``` + diff --git a/python/example_code/aurora/README.md b/python/example_code/aurora/README.md index 0373422c8df..1c8e44e6516 100644 --- a/python/example_code/aurora/README.md +++ b/python/example_code/aurora/README.md @@ -1,4 +1,4 @@ - + # Aurora code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Aurora. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -60,13 +60,14 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with DB clusters](scenario_get_started_aurora.py) +* [Get started with DB clusters](scenario_get_started_aurora.py) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create an Aurora Serverless work item tracker](../../cross_service/aurora_item_tracker) +* [Create a lending library REST API](../../cross_service/aurora_rest_lending_library) +* [Create an Aurora Serverless work item tracker](../../cross_service/aurora_item_tracker) ## Run the examples @@ -96,6 +97,7 @@ Start the example by running the following at a command prompt: python scenario_get_started_aurora.py ``` + diff --git a/python/example_code/auto-scaling/README.md b/python/example_code/auto-scaling/README.md index 4fc93eb63b3..b990c67c880 100644 --- a/python/example_code/auto-scaling/README.md +++ b/python/example_code/auto-scaling/README.md @@ -1,4 +1,4 @@ - + # Auto Scaling code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon EC2 Auto Sca ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -55,7 +55,13 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Manage groups and instances](scenario_groups_and_instances.py) +* [Manage groups and instances](scenario_groups_and_instances.py) + +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Build and manage a resilient service](../../cross_service/resilient_service) ## Run the examples @@ -87,6 +93,7 @@ Start the example by running the following at a command prompt: python scenario_groups_and_instances.py ``` + diff --git a/python/example_code/cloudfront/README.md b/python/example_code/cloudfront/README.md index 646b6beaaf2..23ebc56c8ac 100644 --- a/python/example_code/cloudfront/README.md +++ b/python/example_code/cloudfront/README.md @@ -1,4 +1,4 @@ - + # CloudFront code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon CloudFront. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/python/example_code/cloudwatch/README.md b/python/example_code/cloudwatch/README.md index 0dd1209cda0..46a5a1868ca 100644 --- a/python/example_code/cloudwatch/README.md +++ b/python/example_code/cloudwatch/README.md @@ -1,4 +1,4 @@ - + # CloudWatch code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon CloudWatch. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -54,7 +54,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Manage metrics and alarms](cloudwatch_basics.py) +* [Manage metrics and alarms](cloudwatch_basics.py) ## Run the examples @@ -84,6 +84,7 @@ Start the example by running the following at a command prompt: python cloudwatch_basics.py ``` + diff --git a/python/example_code/comprehend/README.md b/python/example_code/comprehend/README.md index c46363338e6..4ed9798abad 100644 --- a/python/example_code/comprehend/README.md +++ b/python/example_code/comprehend/README.md @@ -1,4 +1,4 @@ - + # Amazon Comprehend code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Comprehend. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -61,15 +61,15 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Detect document elements](comprehend_detect.py) -* [Run a topic modeling job on sample data](comprehend_topic_modeler.py) -* [Train a custom classifier and classify documents](comprehend_classifier.py) +* [Detect document elements](comprehend_detect.py) +* [Run a topic modeling job on sample data](comprehend_topic_modeler.py) +* [Train a custom classifier and classify documents](comprehend_classifier.py) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Detect entities in text extracted from an image](../../cross_service/textract_comprehend_notebook) +* [Detect entities in text extracted from an image](../../cross_service/textract_comprehend_notebook) ## Run the examples @@ -99,6 +99,7 @@ Start the example by running the following at a command prompt: python comprehend_detect.py ``` + @@ -119,6 +120,7 @@ Start the example by running the following at a command prompt: python comprehend_topic_modeler.py ``` + @@ -140,6 +142,7 @@ Start the example by running the following at a command prompt: python comprehend_classifier.py ``` + diff --git a/python/example_code/dynamodb/README.md b/python/example_code/dynamodb/README.md index 0ab107a68ab..49e6c711b39 100644 --- a/python/example_code/dynamodb/README.md +++ b/python/example_code/dynamodb/README.md @@ -1,4 +1,4 @@ - + # DynamoDB code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon DynamoDB. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -41,17 +41,17 @@ Code excerpts that show you how to call individual service functions. * [Create a table](GettingStarted/scenario_getting_started_movies.py#L73) (`CreateTable`) * [Delete a table](GettingStarted/scenario_getting_started_movies.py#L293) (`DeleteTable`) -* [Delete an item from a table](GettingStarted/update_and_query.py#L90) (`DeleteItem`) +* [Delete an item from a table](GettingStarted/scenario_getting_started_movies.py#L276) (`DeleteItem`) * [Get a batch of items](batching/dynamo_batching.py#L62) (`BatchGetItem`) * [Get an item from a table](GettingStarted/scenario_getting_started_movies.py#L175) (`GetItem`) * [Get information about a table](GettingStarted/scenario_getting_started_movies.py#L46) (`DescribeTable`) * [List tables](GettingStarted/scenario_getting_started_movies.py#L105) (`ListTables`) * [Put an item in a table](GettingStarted/scenario_getting_started_movies.py#L151) (`PutItem`) -* [Query a table](GettingStarted/update_and_query.py#L118) (`Query`) +* [Query a table](GettingStarted/scenario_getting_started_movies.py#L224) (`Query`) * [Run a PartiQL statement](partiql/scenario_partiql_single.py#L41) (`ExecuteStatement`) * [Run batches of PartiQL statements](partiql/scenario_partiql_batch.py#L42) (`BatchExecuteStatement`) * [Scan a table](GettingStarted/scenario_getting_started_movies.py#L243) (`Scan`) -* [Update an item in a table](GettingStarted/update_and_query.py#L28) (`UpdateItem`) +* [Update an item in a table](GettingStarted/scenario_getting_started_movies.py#L196) (`UpdateItem`) * [Write a batch of items](GettingStarted/scenario_getting_started_movies.py#L126) (`BatchWriteItem`) ### Scenarios @@ -59,19 +59,19 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Accelerate reads with DynamoDB Accelerator](TryDax/01-create-table.py) -* [Get started with tables, items, and queries](GettingStarted/scenario_getting_started_movies.py) -* [Query a table by using batches of PartiQL statements](partiql/scenario_partiql_batch.py) -* [Query a table using PartiQL](partiql/scenario_partiql_single.py) +* [Accelerate reads with DynamoDB Accelerator](TryDax/01-create-table.py) +* [Get started with tables, items, and queries](GettingStarted/scenario_getting_started_movies.py) +* [Query a table by using batches of PartiQL statements](partiql/scenario_partiql_batch.py) +* [Query a table using PartiQL](partiql/scenario_partiql_single.py) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create a REST API to track COVID-19 data](../../cross_service/apigateway_covid-19_tracker) -* [Create a messenger application](../../cross_service/stepfunctions_messenger) -* [Create a web application to track DynamoDB data](../../cross_service/dynamodb_item_tracker) -* [Create a websocket chat application](../../cross_service/apigateway_websocket_chat) +* [Create a REST API to track COVID-19 data](../../cross_service/apigateway_covid-19_tracker) +* [Create a messenger application](../../cross_service/stepfunctions_messenger) +* [Create a web application to track DynamoDB data](../../cross_service/dynamodb_item_tracker) +* [Create a websocket chat application](../../cross_service/apigateway_websocket_chat) ## Run the examples @@ -93,6 +93,13 @@ This example shows you how to do the following: +Start the example by running the following at a command prompt: + +``` +python TryDax/01-create-table.py +``` + + To run the scripts with the DAX client, you must run them on an Amazon Elastic Compute Cloud (Amazon EC2) instance within your virtual private cloud (VPC). This process is @@ -140,6 +147,7 @@ Start the example by running the following at a command prompt: python GettingStarted/scenario_getting_started_movies.py ``` + @@ -161,6 +169,7 @@ Start the example by running the following at a command prompt: python partiql/scenario_partiql_batch.py ``` + @@ -182,6 +191,7 @@ Start the example by running the following at a command prompt: python partiql/scenario_partiql_single.py ``` + diff --git a/python/example_code/ec2/README.md b/python/example_code/ec2/README.md index cc271e03432..5e7b4219769 100644 --- a/python/example_code/ec2/README.md +++ b/python/example_code/ec2/README.md @@ -1,4 +1,4 @@ - + # Amazon EC2 code examples for the SDK for Python ## Overview @@ -8,11 +8,11 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Elastic Comp -*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 -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -68,7 +68,13 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with instances](scenario_get_started_instances.py) +* [Get started with instances](scenario_get_started_instances.py) + +### Cross-service examples + +Sample applications that work across multiple AWS services. + +* [Build and manage a resilient service](../../cross_service/resilient_service) ## Run the examples @@ -106,6 +112,7 @@ Start the example by running the following at a command prompt: python scenario_get_started_instances.py ``` + diff --git a/python/example_code/glacier/README.md b/python/example_code/glacier/README.md index 87e4a0e9ee8..df5dafc0d83 100644 --- a/python/example_code/glacier/README.md +++ b/python/example_code/glacier/README.md @@ -1,4 +1,4 @@ - + # S3 Glacier code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon S3 Glacier. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -58,8 +58,8 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Archive a file, get notifications, and initiate a job](glacier_basics.py) -* [Get archive content and delete the archive](glacier_basics.py) +* [Archive a file, get notifications, and initiate a job](glacier_basics.py) +* [Get archive content and delete the archive](glacier_basics.py) ## Run the examples @@ -89,6 +89,7 @@ Start the example by running the following at a command prompt: python glacier_basics.py ``` + @@ -110,6 +111,7 @@ Start the example by running the following at a command prompt: python glacier_basics.py ``` + Because Amazon S3 Glacier is designed for infrequent retrieval, a typical retrieval job takes 3–5 hours to complete. diff --git a/python/example_code/glue/README.md b/python/example_code/glue/README.md index 82de4c80f43..7be5f52cdd9 100644 --- a/python/example_code/glue/README.md +++ b/python/example_code/glue/README.md @@ -1,4 +1,4 @@ - + # AWS Glue code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS Glue. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -59,7 +59,7 @@ Code excerpts that show you how to call individual service functions. 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](glue_wrapper.py) +* [Get started with crawlers and jobs](glue_wrapper.py) ## Run the examples @@ -115,6 +115,7 @@ Start the example by running the following at a command prompt: python glue_wrapper.py ``` + After the example is done, destroy scaffold resources at a command prompt. diff --git a/python/example_code/iam/README.md b/python/example_code/iam/README.md index 042e61064f5..0a8bf613d62 100644 --- a/python/example_code/iam/README.md +++ b/python/example_code/iam/README.md @@ -1,4 +1,4 @@ - + # IAM code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS Identity and Ac ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -81,13 +81,13 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a user and assume a role](scenario_create_user_assume_role.py) -* [Create read-only and read-write users](user_wrapper.py) -* [Manage access keys](access_key_wrapper.py) -* [Manage policies](policy_wrapper.py) -* [Manage roles](role_wrapper.py) -* [Manage your account](account_wrapper.py) -* [Roll back a policy version](policy_wrapper.py) +* [Create a user and assume a role](scenario_create_user_assume_role.py) +* [Create read-only and read-write users](user_wrapper.py) +* [Manage access keys](access_key_wrapper.py) +* [Manage policies](policy_wrapper.py) +* [Manage roles](role_wrapper.py) +* [Manage your account](account_wrapper.py) +* [Roll back a policy version](policy_wrapper.py) ## Run the examples @@ -117,6 +117,7 @@ Start the example by running the following at a command prompt: python scenario_create_user_assume_role.py ``` + @@ -138,6 +139,7 @@ Start the example by running the following at a command prompt: python user_wrapper.py ``` + @@ -158,6 +160,7 @@ Start the example by running the following at a command prompt: python access_key_wrapper.py ``` + @@ -179,6 +182,7 @@ Start the example by running the following at a command prompt: python policy_wrapper.py ``` + @@ -199,6 +203,7 @@ Start the example by running the following at a command prompt: python role_wrapper.py ``` + @@ -220,6 +225,7 @@ Start the example by running the following at a command prompt: python account_wrapper.py ``` + @@ -241,6 +247,7 @@ Start the example by running the following at a command prompt: python policy_wrapper.py ``` + diff --git a/python/example_code/iot/README.md b/python/example_code/iot/README.md new file mode 100644 index 00000000000..121f44f39a2 --- /dev/null +++ b/python/example_code/iot/README.md @@ -0,0 +1,74 @@ + +# AWS IoT code examples for the SDK for Python + +## Overview + +Shows how to use the AWS SDK for Python (Boto3) to work with AWS IoT. + + + + +*AWS IoT provides secure, bi-directional communication for Internet-connected devices (such as sensors, actuators, embedded devices, wireless devices, and smart appliances) to connect to the AWS Cloud over MQTT, HTTPS, and LoRaWAN.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `python` folder. + +Install the packages required by these examples by running the following in a virtual environment: + +``` +python -m pip install -r requirements.txt +``` + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `python` folder. + + + + + + +## Additional resources + +* [AWS IoT Developer Guide](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) +* [AWS IoT API Reference](https://docs.aws.amazon.com/iot/latest/apireference/Welcome.html) +* [SDK for Python AWS IoT reference](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iot.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/python/example_code/keyspaces/README.md b/python/example_code/keyspaces/README.md index a3cc915c6e0..22fc0f92600 100644 --- a/python/example_code/keyspaces/README.md +++ b/python/example_code/keyspaces/README.md @@ -1,4 +1,4 @@ - + # Amazon Keyspaces code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Keyspaces (f ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -60,7 +60,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with keyspaces and tables](scenario_get_started_keyspaces.py) +* [Get started with keyspaces and tables](scenario_get_started_keyspaces.py) ## Run the examples @@ -98,6 +98,7 @@ Start the example by running the following at a command prompt: python scenario_get_started_keyspaces.py ``` + diff --git a/python/example_code/kinesis/README.md b/python/example_code/kinesis/README.md index 17c5c9ab8fa..d5c3501b6b9 100644 --- a/python/example_code/kinesis/README.md +++ b/python/example_code/kinesis/README.md @@ -1,4 +1,4 @@ - + # Kinesis code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Kinesis. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -39,27 +39,12 @@ python -m pip install -r requirements.txt Code excerpts that show you how to call individual service functions. -#### Amazon Kinesis Data Streams actions - * [Create a stream](streams/kinesis_stream.py#L44) (`CreateStream`) * [Delete a stream](streams/kinesis_stream.py#L86) (`DeleteStream`) * [Describe a stream](streams/kinesis_stream.py#L66) (`DescribeStream`) * [Get data in batches from a stream](streams/kinesis_stream.py#L123) (`GetRecords`) * [Put data into a stream](streams/kinesis_stream.py#L100) (`PutRecord`) -#### Amazon Kinesis Data Analytics actions - -* [Add an input stream to an application](analyticsv2/analytics_application.py#L224) (`AddApplicationInput`) -* [Add an output stream to an application](analyticsv2/analytics_application.py#L259) (`AddApplicationOutput`) -* [Create an application](analyticsv2/analytics_application.py#L110) (`CreateApplication`) -* [Delete an application](analyticsv2/analytics_application.py#L136) (`DeleteApplication`) -* [Describe an application](analyticsv2/analytics_application.py#L150) (`DescribeApplication`) -* [Describe an application snapshot](analyticsv2/analytics_application.py#L171) (`DescribeApplicationSnapshot`) -* [Discover a data format for a stream](analyticsv2/analytics_application.py#L196) (`DiscoverInputSchema`) -* [Start an application](analyticsv2/analytics_application.py#L321) (`StartApplication`) -* [Stop an application](analyticsv2/analytics_application.py#L343) (`StopApplication`) -* [Update an application](analyticsv2/analytics_application.py#L291) (`UpdateApplication`) - ## Run the examples ### Instructions diff --git a/python/example_code/kms/README.md b/python/example_code/kms/README.md index e91fcfdbdf0..bc8680f50d4 100644 --- a/python/example_code/kms/README.md +++ b/python/example_code/kms/README.md @@ -1,4 +1,4 @@ - + # AWS KMS code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS Key Management ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -66,8 +66,8 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Encrypt and decrypt text](key_encryption.py) -* [Manage keys](key_management.py) +* [Encrypt and decrypt text](key_encryption.py) +* [Manage keys](key_management.py) ## Run the examples @@ -96,6 +96,7 @@ Start the example by running the following at a command prompt: python key_encryption.py ``` + @@ -118,6 +119,7 @@ Start the example by running the following at a command prompt: python key_management.py ``` + diff --git a/python/example_code/lambda/README.md b/python/example_code/lambda/README.md index b9b3f006a46..03809ae7ee2 100644 --- a/python/example_code/lambda/README.md +++ b/python/example_code/lambda/README.md @@ -1,4 +1,4 @@ - + # Lambda code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS Lambda. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -52,16 +52,16 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with functions](lambda_handler_basic.py) +* [Get started with functions](lambda_handler_basic.py) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create a REST API to track COVID-19 data](../../cross_service/apigateway_covid-19_tracker) -* [Create a lending library REST API](../../cross_service/aurora_rest_lending_library) -* [Create a messenger application](../../cross_service/stepfunctions_messenger) -* [Create a websocket chat application](../../cross_service/apigateway_websocket_chat) +* [Create a REST API to track COVID-19 data](../../cross_service/apigateway_covid-19_tracker) +* [Create a lending library REST API](../../cross_service/aurora_rest_lending_library) +* [Create a messenger application](../../cross_service/stepfunctions_messenger) +* [Create a websocket chat application](../../cross_service/apigateway_websocket_chat) ## Run the examples @@ -92,6 +92,7 @@ Start the example by running the following at a command prompt: python lambda_handler_basic.py ``` + diff --git a/python/example_code/medical-imaging/README.md b/python/example_code/medical-imaging/README.md index 44ee86176a9..636ffd11dcf 100644 --- a/python/example_code/medical-imaging/README.md +++ b/python/example_code/medical-imaging/README.md @@ -1,4 +1,4 @@ - + # HealthImaging code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS HealthImaging. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/python/example_code/organizations/README.md b/python/example_code/organizations/README.md index 0e5261e228f..1fa43e0b12d 100644 --- a/python/example_code/organizations/README.md +++ b/python/example_code/organizations/README.md @@ -1,4 +1,4 @@ - + # Organizations code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS Organizations. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/python/example_code/pinpoint-sms-voice/README.md b/python/example_code/pinpoint-sms-voice/README.md index ec4b1ade463..371fe66ad30 100644 --- a/python/example_code/pinpoint-sms-voice/README.md +++ b/python/example_code/pinpoint-sms-voice/README.md @@ -1,4 +1,4 @@ - + # Amazon Pinpoint SMS and Voice code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Pinpoint SMS ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/python/example_code/pinpoint/README.md b/python/example_code/pinpoint/README.md index 46074dc1521..bf89ab6a724 100644 --- a/python/example_code/pinpoint/README.md +++ b/python/example_code/pinpoint/README.md @@ -1,4 +1,4 @@ - + # Amazon Pinpoint code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Pinpoint. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/python/example_code/rds/README.md b/python/example_code/rds/README.md index 18bdc9310ed..853f6fd7a4b 100644 --- a/python/example_code/rds/README.md +++ b/python/example_code/rds/README.md @@ -1,4 +1,4 @@ - + # Amazon RDS code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Relational D ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -57,14 +57,13 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with DB instances](scenario_get_started_instances.py) +* [Get started with DB instances](scenario_get_started_instances.py) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create a lending library REST API](../../cross_service/aurora_rest_lending_library) -* [Create an Aurora Serverless work item tracker](../../cross_service/aurora_item_tracker) +* [Create an Aurora Serverless work item tracker](../../cross_service/aurora_item_tracker) ## Run the examples @@ -94,6 +93,7 @@ Start the example by running the following at a command prompt: python scenario_get_started_instances.py ``` + diff --git a/python/example_code/rekognition/README.md b/python/example_code/rekognition/README.md index 8127642a658..cae6475bb31 100644 --- a/python/example_code/rekognition/README.md +++ b/python/example_code/rekognition/README.md @@ -1,4 +1,4 @@ - + # Amazon Rekognition code examples for the SDK for Python ## Overview @@ -14,7 +14,7 @@ file from a CSV file. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -62,14 +62,14 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Build a collection and find faces in it](rekognition_objects.py) -* [Detect and display elements in images](rekognition_image_detection.py) +* [Build a collection and find faces in it](rekognition_objects.py) +* [Detect and display elements in images](rekognition_image_detection.py) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Detect objects in images](../../cross_service/photo_analyzer) +* [Detect objects in images](../../cross_service/photo_analyzer) ## Run the examples @@ -99,6 +99,7 @@ Start the example by running the following at a command prompt: python rekognition_objects.py ``` + @@ -118,6 +119,7 @@ Start the example by running the following at a command prompt: python rekognition_image_detection.py ``` + diff --git a/python/example_code/route53-recovery-cluster/README.md b/python/example_code/route53-recovery-cluster/README.md index 7fd31fdaca8..f30f8102818 100644 --- a/python/example_code/route53-recovery-cluster/README.md +++ b/python/example_code/route53-recovery-cluster/README.md @@ -1,4 +1,4 @@ - + # Route 53 ARC code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Route 53 App ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/python/example_code/ses/README.md b/python/example_code/ses/README.md index 4d92360728e..3efc5ff9fb6 100644 --- a/python/example_code/ses/README.md +++ b/python/example_code/ses/README.md @@ -1,4 +1,4 @@ - + # Amazon SES code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Simple Email ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -65,17 +65,17 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Copy email and domain identities across Regions](ses_replicate_identities.py) -* [Generate credentials to connect to an SMTP endpoint](ses_generate_smtp_credentials.py) -* [Verify an email identity and send messages](ses_email.py) +* [Copy email and domain identities across Regions](ses_replicate_identities.py) +* [Generate credentials to connect to an SMTP endpoint](ses_generate_smtp_credentials.py) +* [Verify an email identity and send messages](ses_email.py) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create a web application to track DynamoDB data](../../cross_service/dynamodb_item_tracker) -* [Create an Aurora Serverless work item tracker](../../cross_service/aurora_item_tracker) -* [Detect objects in images](../../cross_service/photo_analyzer) +* [Create a web application to track DynamoDB data](../../cross_service/dynamodb_item_tracker) +* [Create an Aurora Serverless work item tracker](../../cross_service/aurora_item_tracker) +* [Detect objects in images](../../cross_service/photo_analyzer) ## Run the examples @@ -101,6 +101,7 @@ Start the example by running the following at a command prompt: python ses_replicate_identities.py ``` + @@ -118,6 +119,7 @@ Start the example by running the following at a command prompt: python ses_generate_smtp_credentials.py ``` + @@ -139,6 +141,7 @@ Start the example by running the following at a command prompt: python ses_email.py ``` + diff --git a/python/example_code/sns/README.md b/python/example_code/sns/README.md index 0ccfa2ea5ed..422d27318c6 100644 --- a/python/example_code/sns/README.md +++ b/python/example_code/sns/README.md @@ -1,4 +1,4 @@ - + # Amazon SNS code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Simple Notif ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -53,7 +53,7 @@ Code excerpts that show you how to call individual service functions. Sample applications that work across multiple AWS services. -* [Create an Amazon Textract explorer application](../../cross_service/textract_explorer) +* [Create an Amazon Textract explorer application](../../cross_service/textract_explorer) ## Run the examples diff --git a/python/example_code/sqs/ReadMe.md b/python/example_code/sqs/ReadMe.md index a657a399eba..236f514ea72 100644 --- a/python/example_code/sqs/ReadMe.md +++ b/python/example_code/sqs/ReadMe.md @@ -1,4 +1,4 @@ - + # Amazon SQS code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Simple Queue ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -54,14 +54,14 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Send and receive batches of messages](message_wrapper.py) +* [Send and receive batches of messages](message_wrapper.py) ### Cross-service examples Sample applications that work across multiple AWS services. -* [Create a messenger application](../../cross_service/stepfunctions_messenger) -* [Create an Amazon Textract explorer application](../../cross_service/textract_explorer) +* [Create a messenger application](../../cross_service/stepfunctions_messenger) +* [Create an Amazon Textract explorer application](../../cross_service/textract_explorer) ## Run the examples @@ -91,6 +91,7 @@ Start the example by running the following at a command prompt: python message_wrapper.py ``` + diff --git a/python/example_code/sts/README.md b/python/example_code/sts/README.md index 68f1d88674e..fe57f9722f6 100644 --- a/python/example_code/sts/README.md +++ b/python/example_code/sts/README.md @@ -1,4 +1,4 @@ - + # AWS STS code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS Security Token ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -47,9 +47,9 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Assume an IAM role that requires an MFA token](assume_role_mfa.py) -* [Construct a URL for federated users](federated_url.py) -* [Get a session token that requires an MFA token](session_token.py) +* [Assume an IAM role that requires an MFA token](assume_role_mfa.py) +* [Construct a URL for federated users](federated_url.py) +* [Get a session token that requires an MFA token](session_token.py) ## Run the examples @@ -79,6 +79,7 @@ Start the example by running the following at a command prompt: python assume_role_mfa.py ``` + @@ -99,6 +100,7 @@ Start the example by running the following at a command prompt: python federated_url.py ``` + @@ -120,6 +122,7 @@ Start the example by running the following at a command prompt: python session_token.py ``` + diff --git a/python/example_code/support/README.md b/python/example_code/support/README.md index 09c5238a979..1fbbe6ec7ad 100644 --- a/python/example_code/support/README.md +++ b/python/example_code/support/README.md @@ -1,4 +1,4 @@ - + # Support code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with AWS Support. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -60,7 +60,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with cases](get_started_support_cases.py) +* [Get started with cases](get_started_support_cases.py) ## Run the examples @@ -100,6 +100,7 @@ Start the example by running the following at a command prompt: python get_started_support_cases.py ``` + diff --git a/python/example_code/textract/README.md b/python/example_code/textract/README.md index 539bc8f5410..410d551a906 100644 --- a/python/example_code/textract/README.md +++ b/python/example_code/textract/README.md @@ -1,4 +1,4 @@ - + # Amazon Textract code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Textract. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -49,8 +49,8 @@ Code excerpts that show you how to call individual service functions. Sample applications that work across multiple AWS services. -* [Create an Amazon Textract explorer application](../../cross_service/textract_explorer) -* [Detect entities in text extracted from an image](../../cross_service/textract_comprehend_notebook) +* [Create an Amazon Textract explorer application](../../cross_service/textract_explorer) +* [Detect entities in text extracted from an image](../../cross_service/textract_comprehend_notebook) ## Run the examples diff --git a/python/example_code/transcribe/README.md b/python/example_code/transcribe/README.md index 6e995174684..511ae3d5072 100644 --- a/python/example_code/transcribe/README.md +++ b/python/example_code/transcribe/README.md @@ -1,4 +1,4 @@ - + # Amazon Transcribe code examples for the SDK for Python ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Transcribe. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -54,8 +54,8 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create and refine a custom vocabulary](transcribe_basics.py) -* [Transcribe audio and get job data](getting_started.py) +* [Create and refine a custom vocabulary](transcribe_basics.py) +* [Transcribe audio and get job data](getting_started.py) ## Run the examples @@ -85,6 +85,7 @@ Start the example by running the following at a command prompt: python transcribe_basics.py ``` + This example uses a public domain [audio file](https://en.wikisource.org/wiki/File:Jabberwocky.ogg) downloaded from @@ -109,6 +110,7 @@ Start the example by running the following at a command prompt: python getting_started.py ``` + diff --git a/ruby/example_code/cloudwatch/README.md b/ruby/example_code/cloudwatch/README.md index ce941f4a92a..a908f089985 100644 --- a/ruby/example_code/cloudwatch/README.md +++ b/ruby/example_code/cloudwatch/README.md @@ -1,4 +1,4 @@ - + # CloudWatch code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon CloudWatch. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -71,6 +71,10 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources +* [CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) +* [CloudWatch API Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) +* [SDK for Ruby CloudWatch reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Cloudwatch.html) + * [More Ruby CloudWatch code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/cw-examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) diff --git a/ruby/example_code/codebuild/README.md b/ruby/example_code/codebuild/README.md index 7ddc4588357..f8928e71a61 100644 --- a/ruby/example_code/codebuild/README.md +++ b/ruby/example_code/codebuild/README.md @@ -1,39 +1,55 @@ + # CodeBuild code examples for the SDK for Ruby + ## Overview -These examples show how to create and manage AWS CodeBuild workflows using the SDK for Ruby. -CodeBuild is a fully managed build service that compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. +Shows how to use the AWS SDK for Ruby to work with AWS CodeBuild. + + + + +*CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy.* -## ⚠️ Important -* Running this code might result in charges to your AWS account. +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 -### Single actions -Code excerpts that show you how to call individual service functions. +### Prerequisites -* [Build a project](./aws-ruby-sdk-codebuild-example-build-project.rb) (`CreateProject`) +For prerequisites, see the [README](../../README.md#Prerequisites) in the `ruby` folder. -* [List builds](./aws-ruby-sdk-codebuild-example-list-builds.rb) (`ListBuilds`) -* [List projects](./aws-ruby-sdk-codebuild-example-list-projects.rb) (`ListProjects`) + + +## Run the examples +### Instructions -## Run the examples + + -### Prerequisites -See the [Ruby README.md](../../../ruby/README.md) for prerequisites. - -### Instructions -The easiest way to interact with this example code is by invoking [Single Actions](#single-actions) from your command line. This may require some modification to override hard-coded values, and some actions also expect runtime parameters. For example, `ruby some_action.rb ARG1 ARG2` will invoke `some_action.rb` with two arguments. ### 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 `ruby` folder. + + + The example code in this directory is not currently tested. @@ -44,6 +60,11 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources + +* [CodeBuild User Guide](https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.html) +* [CodeBuild API Reference](https://docs.aws.amazon.com/codebuild/latest/APIReference/Welcome.html) +* [SDK for Ruby CodeBuild reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Codebuild.html) + * [More Ruby CodeBuild code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/cb-examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) diff --git a/ruby/example_code/dynamodb/README.md b/ruby/example_code/dynamodb/README.md index ff7653ec9ec..a27a6537760 100644 --- a/ruby/example_code/dynamodb/README.md +++ b/ruby/example_code/dynamodb/README.md @@ -1,4 +1,4 @@ - + # DynamoDB code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon DynamoDB. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -53,9 +53,9 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with tables, items, and queries](scaffold.rb) -* [Query a table by using batches of PartiQL statements](partiql/scenario_partiql_batch.rb) -* [Query a table using PartiQL](partiql/scenario_partiql_single.rb) +* [Get started with tables, items, and queries](scaffold.rb) +* [Query a table by using batches of PartiQL statements](partiql/scenario_partiql_batch.rb) +* [Query a table using PartiQL](partiql/scenario_partiql_single.rb) ## Run the examples @@ -152,6 +152,10 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources +* [DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) +* [DynamoDB API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html) +* [SDK for Ruby DynamoDB reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Dynamodb.html) + * [More Ruby DynamoDB code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ruby_dynamodb_code_examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) diff --git a/ruby/example_code/ec2/README.md b/ruby/example_code/ec2/README.md index ae69b4b2195..09c9c548291 100644 --- a/ruby/example_code/ec2/README.md +++ b/ruby/example_code/ec2/README.md @@ -1,4 +1,4 @@ - + # Amazon EC2 code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon Elastic Compute Cloud ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -80,6 +80,10 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources +* [Amazon EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) +* [Amazon EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html) +* [SDK for Ruby Amazon EC2 reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Ec2.html) + * [More Ruby Amazon EC2 code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ec2-examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) diff --git a/ruby/example_code/eventbridge/README.md b/ruby/example_code/eventbridge/README.md index 3a3c80f00ee..3cca397b565 100644 --- a/ruby/example_code/eventbridge/README.md +++ b/ruby/example_code/eventbridge/README.md @@ -1,4 +1,4 @@ - + # EventBridge code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon EventBridge. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -30,17 +30,12 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `ruby` -### Single actions -Code excerpts that show you how to call individual service functions. - -* [Create a job](./create_job.rb) (`CreateJob`) - ### Scenarios Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create and trigger a rule](cw-ruby-example-send-events-ec2.rb) +* [Create and trigger a rule](cw-ruby-example-send-events-ec2.rb) ## Run the examples @@ -89,6 +84,11 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources + +* [EventBridge User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html) +* [EventBridge API Reference](https://docs.aws.amazon.com/eventbridge/latest/APIReference/Welcome.html) +* [SDK for Ruby EventBridge reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Eventbridge.html) + * [More Ruby AWS EventBridge code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ruby_eventbridge_code_examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) @@ -101,4 +101,4 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/ruby/example_code/glue/README.md b/ruby/example_code/glue/README.md index 4a17268256f..e945f2f61b9 100644 --- a/ruby/example_code/glue/README.md +++ b/ruby/example_code/glue/README.md @@ -1,4 +1,4 @@ - + # AWS Glue code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with AWS Glue. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -42,7 +42,7 @@ Code excerpts that show you how to call individual service functions. * [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#L189) (`GetJobRun`) +* [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`) @@ -54,7 +54,7 @@ Code excerpts that show you how to call individual service functions. 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](glue_wrapper.rb) +* [Get started with crawlers and jobs](glue_wrapper.rb) ## Run the examples @@ -78,10 +78,7 @@ This example shows you how to do the following: -Before you run the example, you will need to set up an S3 bucket linked with an IAM role. -To accomplish this, navigate to the [glue_role_bucket CDK script](../../../resources/cdk/glue_role_bucket) and follow the instructions. - -After completing setup, you can run the following at a command prompt: +Start the example by running the following at a command prompt: ``` ruby glue_wrapper.rb @@ -106,6 +103,10 @@ in the `ruby` 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 Ruby AWS Glue reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Glue.html) + * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) * [SDK for Ruby Amazon Glue Module](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Glue.html) diff --git a/ruby/example_code/iam/README.md b/ruby/example_code/iam/README.md index b2f9cceb8a3..756c32c2ec5 100644 --- a/ruby/example_code/iam/README.md +++ b/ruby/example_code/iam/README.md @@ -1,4 +1,4 @@ - + # IAM code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with AWS Identity and Access Manag ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -64,7 +64,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a user and assume a role](scenario_create_user_assume_role.rb) +* [Create a user and assume a role](scenario_create_user_assume_role.rb) ## Run the examples @@ -118,6 +118,10 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources +* [IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) +* [IAM API Reference](https://docs.aws.amazon.com/IAM/latest/APIReference/welcome.html) +* [SDK for Ruby IAM reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Iam.html) + * [More Ruby AWS IAM code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ruby_iam_code_examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) diff --git a/ruby/example_code/kms/README.md b/ruby/example_code/kms/README.md index d4abfa1e9f4..fb117c4102a 100644 --- a/ruby/example_code/kms/README.md +++ b/ruby/example_code/kms/README.md @@ -1,4 +1,4 @@ - + # AWS KMS code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with AWS Key Management Service (A ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). diff --git a/ruby/example_code/lambda/README.md b/ruby/example_code/lambda/README.md index 7eb34ef0c45..5680fe3a5c3 100644 --- a/ruby/example_code/lambda/README.md +++ b/ruby/example_code/lambda/README.md @@ -1,4 +1,4 @@ - + # Lambda code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with AWS Lambda. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -47,7 +47,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with functions](lambda_basics.rb) +* [Get started with functions](lambda_basics.rb) ## Run the examples @@ -102,6 +102,10 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources +* [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) +* [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) +* [SDK for Ruby Lambda reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Lambda.html) + * [More Ruby AWS Lambda code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ruby_lambda_code_examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) diff --git a/ruby/example_code/polly/README.md b/ruby/example_code/polly/README.md index bcafe1478ce..f11f7eabf91 100644 --- a/ruby/example_code/polly/README.md +++ b/ruby/example_code/polly/README.md @@ -1,4 +1,4 @@ - + # Amazon Polly code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon Polly. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -26,14 +26,6 @@ Shows how to use the AWS SDK for Ruby to work with Amazon Polly. For prerequisites, see the [README](../../README.md#Prerequisites) in the `ruby` folder. -### Single actions -Code excerpts that show you how to call individual service functions. - -* [Describe voices](./polly_describe_voices.rb) (`DescribeVoices`) - -* [List lexicons](./polly_list_lexicons.rb) (`ListLexicons`) - -* [Synthesize speech](./polly_synthesize_speech.rb) (`SynthesizeSpeech`) @@ -68,6 +60,11 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources + +* [Amazon Polly Developer Guide](https://docs.aws.amazon.com/polly/latest/dg/what-is.html) +* [Amazon Polly API Reference](https://docs.aws.amazon.com/polly/latest/dg/API_Reference.html) +* [SDK for Ruby Amazon Polly reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Polly.html) + * [More Ruby Amazon Polly code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/polly-examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) @@ -80,4 +77,4 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/ruby/example_code/rds/README.md b/ruby/example_code/rds/README.md index 007823e412b..49c5b326c6c 100644 --- a/ruby/example_code/rds/README.md +++ b/ruby/example_code/rds/README.md @@ -1,4 +1,4 @@ - + # Amazon RDS code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon Relational Database Se ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -44,6 +44,7 @@ Code excerpts that show you how to call individual service functions. ### Instructions + The quickest way to interact with this example code is to invoke a [Single Action](#single-actions) from your command line. For example, `ruby some_example.rb` will invoke `some_example.rb`. @@ -70,6 +71,10 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources +* [Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html) +* [Amazon RDS API Reference](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/Welcome.html) +* [SDK for Ruby Amazon RDS reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Rds.html) + * [More Ruby Amazon RDS code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ruby_rds_code_examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) @@ -82,4 +87,4 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/ruby/example_code/s3/README.md b/ruby/example_code/s3/README.md index 25ba0b39cb5..b8a2c53c59f 100644 --- a/ruby/example_code/s3/README.md +++ b/ruby/example_code/s3/README.md @@ -1,4 +1,4 @@ - + # Amazon S3 code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon Simple Storage Service ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -47,7 +47,7 @@ Code excerpts that show you how to call individual service functions. * [Get an object from a bucket](object_get.rb#L8) (`GetObject`) * [Get the policy for a bucket](bucket_policy.rb#L23) (`GetBucketPolicy`) * [List buckets](bucket_list.rb#L8) (`ListBuckets`) -* [List objects in a bucket](bucket_list_objects.rb#L8) (`ListObjects`) +* [List objects in a bucket](bucket_list_objects.rb#L8) (`ListObjectsV2`) * [Set the website configuration for a bucket](bucket_put_website.rb#L8) (`PutBucketWebsite`) * [Upload an object to a bucket](object_upload_file.rb#L8) (`PutObject`) @@ -56,8 +56,8 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a presigned URL](object_presigned_url_upload.rb) -* [Get started with buckets and objects](scenario_getting_started.rb) +* [Create a presigned URL](object_presigned_url_upload.rb) +* [Get started with buckets and objects](scenario_getting_started.rb) ## Run the examples @@ -129,6 +129,10 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources +* [Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) +* [Amazon S3 API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html) +* [SDK for Ruby Amazon S3 reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3.html) + * [More Ruby Amazon S3 code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ruby_s3_code_examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) diff --git a/ruby/example_code/ses/README.md b/ruby/example_code/ses/README.md index 7dc36d73fdc..7918fd7f780 100644 --- a/ruby/example_code/ses/README.md +++ b/ruby/example_code/ses/README.md @@ -1,4 +1,4 @@ - + # Amazon SES code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon Simple Email Service ( ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -26,18 +26,6 @@ Shows how to use the AWS SDK for Ruby to work with Amazon Simple Email Service ( For prerequisites, see the [README](../../README.md#Prerequisites) in the `ruby` folder. -### Single actions -Code excerpts that show you how to call individual service functions. - -* [Get statistics](v1/ses_get_statistics.rb) (`GetSendStatistics`) - -* [List emails](v1/ses_list_emails.rb) (`ListTemplates`) - -* [Send an email](v1/ses_send_email.rb) (`SendEmail`) - -* [Send a verification](v1/ses_send_verification.rb) (`VerifyEmailIdentity`) - -* [Send an email using SESv2](v2/send_email.rb) (`SendEmail`) @@ -72,6 +60,11 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources + +* [Amazon SES Developer Guide](https://docs.aws.amazon.com/ses/latest/dg/Welcome.html) +* [Amazon SES API Reference](https://docs.aws.amazon.com/ses/latest/APIReference/Welcome.html) +* [SDK for Ruby Amazon SES reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Ses.html) + * [More Ruby Amazon SES code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ses-examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) @@ -84,4 +77,4 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/ruby/example_code/sns/README.md b/ruby/example_code/sns/README.md index 6af8b62bb89..2439903573a 100644 --- a/ruby/example_code/sns/README.md +++ b/ruby/example_code/sns/README.md @@ -1,4 +1,4 @@ - + # Amazon SNS code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon Simple Notification Se ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -72,6 +72,10 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources +* [Amazon SNS Developer Guide](https://docs.aws.amazon.com/sns/latest/dg/welcome.html) +* [Amazon SNS API Reference](https://docs.aws.amazon.com/sns/latest/api/welcome.html) +* [SDK for Ruby Amazon SNS reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Sns.html) + * [More Ruby Amazon SNS code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ruby_sns_code_examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) diff --git a/ruby/example_code/sqs/README.md b/ruby/example_code/sqs/README.md index 8f601f21ed3..dc5664abeff 100644 --- a/ruby/example_code/sqs/README.md +++ b/ruby/example_code/sqs/README.md @@ -1,4 +1,4 @@ - + # Amazon SQS code examples for the SDK for Ruby ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Ruby to work with Amazon Simple Queue Service ( ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -73,6 +73,10 @@ To learn more about the contributing process, see [CONTRIBUTING.md](../../../CON ## Additional resources +* [Amazon SQS Developer Guide](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html) +* [Amazon SQS API Reference](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/Welcome.html) +* [SDK for Ruby Amazon SQS reference](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/Sqs.html) + * [More Ruby Amazon SQS code examples](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/ruby_sqs_code_examples.html) * [SDK for Ruby Developer Guide](https://aws.amazon.com/developer/language/ruby/) diff --git a/rust_dev_preview/examples/batch/README.md b/rust_dev_preview/examples/batch/README.md index 6032a79f9b9..384c4b52e52 100644 --- a/rust_dev_preview/examples/batch/README.md +++ b/rust_dev_preview/examples/batch/README.md @@ -1,4 +1,4 @@ - + # AWS Batch code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Batch. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Batch. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -51,7 +51,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/cloudwatch/README.md b/rust_dev_preview/examples/cloudwatch/README.md index 67c351cec32..bf464806f3e 100644 --- a/rust_dev_preview/examples/cloudwatch/README.md +++ b/rust_dev_preview/examples/cloudwatch/README.md @@ -1,4 +1,4 @@ - + # CloudWatch code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon CloudWatch. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon CloudWatch. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -45,7 +45,7 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/dynamodb/README.md b/rust_dev_preview/examples/dynamodb/README.md index 20d6f98dc84..6bde89b2683 100644 --- a/rust_dev_preview/examples/dynamodb/README.md +++ b/rust_dev_preview/examples/dynamodb/README.md @@ -1,4 +1,4 @@ - + # DynamoDB code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon DynamoDB. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon DynamoDB. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -47,7 +47,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Query a table using PartiQL](src/bin/partiql.rs) +* [Query a table using PartiQL](src/bin/partiql.rs) ## Run the examples @@ -80,7 +80,7 @@ This example shows you how to do the following: ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/ebs/README.md b/rust_dev_preview/examples/ebs/README.md index aba6cfc2e13..6c436a2f9bd 100644 --- a/rust_dev_preview/examples/ebs/README.md +++ b/rust_dev_preview/examples/ebs/README.md @@ -1,4 +1,4 @@ - + # Amazon EBS code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Block Store (A ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Block Store (A ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -53,7 +53,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/ec2/README.md b/rust_dev_preview/examples/ec2/README.md index ee56595f403..3665f67699d 100644 --- a/rust_dev_preview/examples/ec2/README.md +++ b/rust_dev_preview/examples/ec2/README.md @@ -1,4 +1,4 @@ - + # Amazon EC2 code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Compute Cloud ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Compute Cloud ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -59,7 +59,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/ecr/README.md b/rust_dev_preview/examples/ecr/README.md index 9bfd2b5d242..6848c0d08a3 100644 --- a/rust_dev_preview/examples/ecr/README.md +++ b/rust_dev_preview/examples/ecr/README.md @@ -1,4 +1,4 @@ - + # Amazon ECR code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Container Regi ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Container Regi ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -52,7 +52,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/ecs/README.md b/rust_dev_preview/examples/ecs/README.md index 669851cd915..ceada44ee18 100644 --- a/rust_dev_preview/examples/ecs/README.md +++ b/rust_dev_preview/examples/ecs/README.md @@ -1,4 +1,4 @@ - + # Amazon ECS code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Container Serv ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Container Serv ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -53,7 +53,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/eks/README.md b/rust_dev_preview/examples/eks/README.md index ebd6cf9072d..cd25b41fc9c 100644 --- a/rust_dev_preview/examples/eks/README.md +++ b/rust_dev_preview/examples/eks/README.md @@ -1,4 +1,4 @@ - + # Amazon EKS code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Kubernetes Ser ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Elastic Kubernetes Ser ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -52,7 +52,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/firehose/README.md b/rust_dev_preview/examples/firehose/README.md index 942859f4183..a7d56d5c5e5 100644 --- a/rust_dev_preview/examples/firehose/README.md +++ b/rust_dev_preview/examples/firehose/README.md @@ -1,4 +1,4 @@ - + # Kinesis Data Firehose code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Kinesis Data Firehose. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Kinesis Data Firehose. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -34,7 +34,7 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev Code excerpts that show you how to call individual service functions. -* [Write multiple data records](src/bin/put-records-batch.rs#L33) (`PutRecordBatch`) +* [Write multiple data records](src/bin/put-records-batch.rs#L32) (`PutRecordBatch`) ## Run the examples @@ -51,7 +51,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/glue/README.md b/rust_dev_preview/examples/glue/README.md index 085944bf525..15efa9c0396 100644 --- a/rust_dev_preview/examples/glue/README.md +++ b/rust_dev_preview/examples/glue/README.md @@ -1,4 +1,4 @@ - + # AWS Glue code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Glue. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,12 +24,17 @@ Shows how to use the AWS SDK for Rust to work with AWS Glue. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. + +### Get started + +* [Hello AWS Glue](src/run.rs#L16) (`ListJobs`) + ### Single actions Code excerpts that show you how to call individual service functions. @@ -53,7 +58,7 @@ Code excerpts that show you how to call individual service functions. 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](src/prepare.rs) +* [Get started with crawlers and jobs](src/prepare.rs) ## Run the examples @@ -63,6 +68,10 @@ functions within the same service. +#### Hello AWS Glue + +This example shows you how to get started using AWS Glue. + #### Get started with crawlers and jobs @@ -86,7 +95,7 @@ This example shows you how to do the following: ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/iam/README.md b/rust_dev_preview/examples/iam/README.md index c1cbb01d8a8..bb43b6fdd8d 100644 --- a/rust_dev_preview/examples/iam/README.md +++ b/rust_dev_preview/examples/iam/README.md @@ -1,4 +1,4 @@ - + # IAM code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Identity and Access Manag ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Identity and Access Manag ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -69,7 +69,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Create a user and assume a role](src/bin/iam-getting-started.rs) +* [Create a user and assume a role](src/bin/iam-getting-started.rs) ## Run the examples @@ -106,7 +106,7 @@ This example shows you how to create a user and assume a role. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/iot/README.md b/rust_dev_preview/examples/iot/README.md index 962308e53c6..d3ee016eff9 100644 --- a/rust_dev_preview/examples/iot/README.md +++ b/rust_dev_preview/examples/iot/README.md @@ -1,4 +1,4 @@ - + # AWS IoT code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS IoT. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with AWS IoT. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -52,7 +52,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/kinesis/README.md b/rust_dev_preview/examples/kinesis/README.md index 2f92e743ab5..b6739afbea9 100644 --- a/rust_dev_preview/examples/kinesis/README.md +++ b/rust_dev_preview/examples/kinesis/README.md @@ -1,4 +1,4 @@ - + # Kinesis code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Kinesis. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Kinesis. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -55,7 +55,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/kms/README.md b/rust_dev_preview/examples/kms/README.md index 4a49988675c..baeca774e16 100644 --- a/rust_dev_preview/examples/kms/README.md +++ b/rust_dev_preview/examples/kms/README.md @@ -1,4 +1,4 @@ - + # AWS KMS code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Key Management Service (A ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Key Management Service (A ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -58,7 +58,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/lambda/README.md b/rust_dev_preview/examples/lambda/README.md index 433bbb75cbf..ea567756c0e 100644 --- a/rust_dev_preview/examples/lambda/README.md +++ b/rust_dev_preview/examples/lambda/README.md @@ -1,4 +1,4 @@ - + # Lambda code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Lambda. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -50,7 +50,7 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with functions](rust_dev_preview/examples/lambda/Cargo.toml) +* [Get started with functions](rust_dev_preview/examples/lambda/Cargo.toml) ## Run the examples diff --git a/rust_dev_preview/examples/medialive/README.md b/rust_dev_preview/examples/medialive/README.md index 278bf21ad9a..a9f89248c04 100644 --- a/rust_dev_preview/examples/medialive/README.md +++ b/rust_dev_preview/examples/medialive/README.md @@ -1,4 +1,4 @@ - + # MediaLive code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Elemental MediaLive. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Elemental MediaLive. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -51,7 +51,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/mediapackage/README.md b/rust_dev_preview/examples/mediapackage/README.md index 27188f70e44..3767809a3b5 100644 --- a/rust_dev_preview/examples/mediapackage/README.md +++ b/rust_dev_preview/examples/mediapackage/README.md @@ -1,4 +1,4 @@ - + # MediaPackage code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Elemental MediaPackage. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Elemental MediaPackage. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -52,7 +52,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/polly/README.md b/rust_dev_preview/examples/polly/README.md index 8a028dc33c5..2a95d3bf5b4 100644 --- a/rust_dev_preview/examples/polly/README.md +++ b/rust_dev_preview/examples/polly/README.md @@ -1,4 +1,4 @@ - + # Amazon Polly code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Polly. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Polly. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -54,7 +54,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/qldb/README.md b/rust_dev_preview/examples/qldb/README.md index 76cdb593627..d3e75fc2ec1 100644 --- a/rust_dev_preview/examples/qldb/README.md +++ b/rust_dev_preview/examples/qldb/README.md @@ -1,4 +1,4 @@ - + # Amazon QLDB code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Quantum Ledger Databas ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Quantum Ledger Databas ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -52,7 +52,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/rds/README.md b/rust_dev_preview/examples/rds/README.md index 3c0f14caf4c..cc9a4095d35 100644 --- a/rust_dev_preview/examples/rds/README.md +++ b/rust_dev_preview/examples/rds/README.md @@ -1,4 +1,4 @@ - + # Amazon RDS code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Relational Database Se ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Relational Database Se ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -45,7 +45,7 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/s3/README.md b/rust_dev_preview/examples/s3/README.md index c74b44bb10b..629a53ccf92 100644 --- a/rust_dev_preview/examples/s3/README.md +++ b/rust_dev_preview/examples/s3/README.md @@ -1,4 +1,4 @@ - + # Amazon S3 code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Simple Storage Service ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Simple Storage Service ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -46,7 +46,7 @@ Code excerpts that show you how to call individual service functions. * [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`) -* [List objects in a bucket](src/s3-service-lib.rs#L70) (`ListObjects`) +* [List objects in a bucket](src/s3-service-lib.rs#L70) (`ListObjectsV2`) * [Upload a single part of a multipart upload](src/bin/s3-multipart-upload.rs#L114) (`UploadPart`) * [Upload an object to a bucket](src/s3-service-lib.rs#L120) (`PutObject`) @@ -55,8 +55,9 @@ Code excerpts that show you how to call individual service functions. Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with buckets and objects](src/bin/s3-getting-started.rs) -* [Upload or download large files](src/bin/s3-multipart-upload.rs) +* [Create a presigned URL](src/bin/put-object-presigned.rs) +* [Get started with buckets and objects](src/bin/s3-getting-started.rs) +* [Upload or download large files](src/bin/s3-multipart-upload.rs) ## Run the examples @@ -68,6 +69,18 @@ functions within the same service. +#### Create a presigned URL + +This example shows you how to create a presigned URL for Amazon S3 and upload an object. + + + + + + + + + #### Get started with buckets and objects This example shows you how to do the following: @@ -102,7 +115,7 @@ This example shows you how to upload or download large files to and from Amazon ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/sagemaker/README.md b/rust_dev_preview/examples/sagemaker/README.md index 51a03c8dbf1..41e594948ad 100644 --- a/rust_dev_preview/examples/sagemaker/README.md +++ b/rust_dev_preview/examples/sagemaker/README.md @@ -1,4 +1,4 @@ - + # SageMaker code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon SageMaker. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon SageMaker. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -52,7 +52,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/ses/README.md b/rust_dev_preview/examples/ses/README.md index cbc41b73b3c..4402e53b8af 100644 --- a/rust_dev_preview/examples/ses/README.md +++ b/rust_dev_preview/examples/ses/README.md @@ -1,4 +1,4 @@ - + # Amazon SES code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Simple Email Service ( ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Simple Email Service ( ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -45,7 +45,7 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/sns/README.md b/rust_dev_preview/examples/sns/README.md index c1e1bea3e62..e763d01f285 100644 --- a/rust_dev_preview/examples/sns/README.md +++ b/rust_dev_preview/examples/sns/README.md @@ -1,4 +1,4 @@ - + # Amazon SNS code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Simple Notification Se ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Simple Notification Se ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -54,7 +54,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/sqs/README.md b/rust_dev_preview/examples/sqs/README.md index 711820d664d..3ff678b954b 100644 --- a/rust_dev_preview/examples/sqs/README.md +++ b/rust_dev_preview/examples/sqs/README.md @@ -1,4 +1,4 @@ - + # Amazon SQS code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Simple Queue Service ( ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Simple Queue Service ( ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -53,7 +53,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/ssm/README.md b/rust_dev_preview/examples/ssm/README.md index 618e9a669fe..92e5515ae72 100644 --- a/rust_dev_preview/examples/ssm/README.md +++ b/rust_dev_preview/examples/ssm/README.md @@ -1,4 +1,4 @@ - + # Systems Manager code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Systems Manager. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Systems Manager. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -52,7 +52,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/sts/README.md b/rust_dev_preview/examples/sts/README.md index 4b9d62ffe51..41d3a518a8b 100644 --- a/rust_dev_preview/examples/sts/README.md +++ b/rust_dev_preview/examples/sts/README.md @@ -1,4 +1,4 @@ - + # AWS STS code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Security Token Service (A ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with AWS Security Token Service (A ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -51,7 +51,7 @@ Code excerpts that show you how to call individual service functions. ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/rust_dev_preview/examples/textract/README.md b/rust_dev_preview/examples/textract/README.md index 4851e94ee07..1ca98a70311 100644 --- a/rust_dev_preview/examples/textract/README.md +++ b/rust_dev_preview/examples/textract/README.md @@ -1,4 +1,4 @@ - + # Amazon Textract code examples for the SDK for Rust ## Overview @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Textract. ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -24,7 +24,7 @@ Shows how to use the AWS SDK for Rust to work with Amazon Textract. ### Prerequisites -For prerequisites, see the [README](../README.md#Prerequisites) in the `rust_dev_preview` folder. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `rust_dev_preview` folder. @@ -56,7 +56,7 @@ This example sends a message to and receives the message from a queue in the Reg ⚠ Running tests might result in charges to your AWS account. -To find instructions for running these tests, see the [README](../README.md#Tests) +To find instructions for running these tests, see the [README](../../README.md#Tests) in the `rust_dev_preview` folder. diff --git a/sap-abap/services/cloudwatch/README.md b/sap-abap/services/cloudwatch/README.md new file mode 100644 index 00000000000..6cc832f5025 --- /dev/null +++ b/sap-abap/services/cloudwatch/README.md @@ -0,0 +1,103 @@ + +# CloudWatch code examples for the SDK for SAP ABAP + +## Overview + +Shows how to use the AWS SDK for SAP ABAP to work with Amazon CloudWatch. + + + + +*CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `sap-abap` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a metric alarm](zcl_aws1_cwt_actions.clas.abap#L177) (`PutMetricAlarm`) +* [Delete alarms](zcl_aws1_cwt_actions.clas.abap#L63) (`DeleteAlarms`) +* [Describe alarms](zcl_aws1_cwt_actions.clas.abap#L84) (`DescribeAlarms`) +* [Disable alarm actions](zcl_aws1_cwt_actions.clas.abap#L106) (`DisableAlarmActions`) +* [Enable alarm actions](zcl_aws1_cwt_actions.clas.abap#L130) (`EnableAlarmActions`) +* [List metrics](zcl_aws1_cwt_actions.clas.abap#L154) (`ListMetrics`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with alarms](zcl_aws1_cwt_scenario.clas.abap) + +## Run the examples + +### Instructions + + + + + + + +#### Get started with alarms + +This example shows you how to do the following: + +* Create an alarm. +* Disable alarm actions. +* Describe an alarm. +* Delete an alarm. + + + + + + + + +### 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 `sap-abap` folder. + + + + + + +## Additional resources + +* [CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html) +* [CloudWatch API Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html) +* [SDK for SAP ABAP CloudWatch reference](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/cloudwatch/index.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/sap-abap/services/ec2/README.md b/sap-abap/services/ec2/README.md new file mode 100644 index 00000000000..c2e271b2e6d --- /dev/null +++ b/sap-abap/services/ec2/README.md @@ -0,0 +1,92 @@ + +# Amazon EC2 code examples for the SDK for SAP ABAP + +## Overview + +Shows how to use the AWS SDK for SAP ABAP to work with Amazon Elastic Compute Cloud (Amazon EC2). + + + + +*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 + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `sap-abap` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Allocate an Elastic IP address](zcl_aws1_ec2_actions.clas.abap#L101) (`AllocateAddress`) +* [Associate an Elastic IP address with an instance](zcl_aws1_ec2_actions.clas.abap#L119) (`AssociateAddress`) +* [Create a security group](zcl_aws1_ec2_actions.clas.abap#L196) (`CreateSecurityGroup`) +* [Create a security key pair](zcl_aws1_ec2_actions.clas.abap#L178) (`CreateKeyPair`) +* [Create and run an instance](zcl_aws1_ec2_actions.clas.abap#L140) (`RunInstances`) +* [Delete a security group](zcl_aws1_ec2_actions.clas.abap#L236) (`DeleteSecurityGroup`) +* [Delete a security key pair](zcl_aws1_ec2_actions.clas.abap#L218) (`DeleteKeyPair`) +* [Describe Availability Zones](zcl_aws1_ec2_actions.clas.abap#L273) (`DescribeAvailabilityZones`) +* [Describe Regions](zcl_aws1_ec2_actions.clas.abap#L345) (`DescribeRegions`) +* [Describe instances](zcl_aws1_ec2_actions.clas.abap#L294) (`DescribeInstances`) +* [Enable monitoring](zcl_aws1_ec2_actions.clas.abap#L386) (`MonitorInstances`) +* [Get data about a security group](zcl_aws1_ec2_actions.clas.abap#L365) (`DescribeSecurityGroups`) +* [Get details about Elastic IP addresses](zcl_aws1_ec2_actions.clas.abap#L254) (`DescribeAddresses`) +* [List security key pairs](zcl_aws1_ec2_actions.clas.abap#L326) (`DescribeKeyPairs`) +* [Reboot an instance](zcl_aws1_ec2_actions.clas.abap#L426) (`RebootInstances`) +* [Release an Elastic IP address](zcl_aws1_ec2_actions.clas.abap#L465) (`ReleaseAddress`) +* [Start an instance](zcl_aws1_ec2_actions.clas.abap#L483) (`StartInstances`) +* [Stop an instance](zcl_aws1_ec2_actions.clas.abap#L523) (`StopInstances`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `sap-abap` folder. + + + + + + +## Additional resources + +* [Amazon EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) +* [Amazon EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html) +* [SDK for SAP ABAP Amazon EC2 reference](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/ec2/index.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/sap-abap/services/kinesis/README.md b/sap-abap/services/kinesis/README.md new file mode 100644 index 00000000000..1725e9d109a --- /dev/null +++ b/sap-abap/services/kinesis/README.md @@ -0,0 +1,103 @@ + +# Kinesis code examples for the SDK for SAP ABAP + +## Overview + +Shows how to use the AWS SDK for SAP ABAP to work with Amazon Kinesis. + + + + +*Kinesis makes it easy to collect, process, and analyze video and data streams in real time.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `sap-abap` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a stream](zcl_aws1_kns_actions.clas.abap#L65) (`CreateStream`) +* [Delete a stream](zcl_aws1_kns_actions.clas.abap#L91) (`DeleteStream`) +* [Describe a stream](zcl_aws1_kns_actions.clas.abap#L114) (`DescribeStream`) +* [Get data in batches from a stream](zcl_aws1_kns_actions.clas.abap#L140) (`GetRecords`) +* [List streams](zcl_aws1_kns_actions.clas.abap#L180) (`ListStreams`) +* [Put data into a stream](zcl_aws1_kns_actions.clas.abap#L203) (`PutRecord`) +* [Register a consumer](zcl_aws1_kns_actions.clas.abap#L241) (`RegisterStreamConsumer`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with data streams](zcl_aws1_kns_scenario.clas.abap) + +## Run the examples + +### Instructions + + + + + + + +#### Get started with data streams + +This example shows you how to do the following: + +* Create a stream and put a record in it. +* Create a shard iterator. +* Read the record, then 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 `sap-abap` folder. + + + + + + +## Additional resources + +* [Kinesis Developer Guide](https://docs.aws.amazon.com/streams/latest/dev/introduction.html) +* [Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/Welcome.html) +* [SDK for SAP ABAP Kinesis reference](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/kinesis/index.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/sap-abap/services/lambda/README.md b/sap-abap/services/lambda/README.md new file mode 100644 index 00000000000..b1403317cf7 --- /dev/null +++ b/sap-abap/services/lambda/README.md @@ -0,0 +1,105 @@ + +# Lambda code examples for the SDK for SAP ABAP + +## Overview + +Shows how to use the AWS SDK for SAP ABAP to work with AWS Lambda. + + + + +*Lambda allows you to run code without provisioning or managing servers.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `sap-abap` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a function](zcl_aws1_lmd_actions.clas.abap#L65) (`CreateFunction`) +* [Delete a function](zcl_aws1_lmd_actions.clas.abap#L105) (`DeleteFunction`) +* [Get a function](zcl_aws1_lmd_actions.clas.abap#L130) (`GetFunction`) +* [Invoke a function](zcl_aws1_lmd_actions.clas.abap#L151) (`Invoke`) +* [List functions](zcl_aws1_lmd_actions.clas.abap#L193) (`ListFunctions`) +* [Update function code](zcl_aws1_lmd_actions.clas.abap#L216) (`UpdateFunctionCode`) +* [Update function configuration](zcl_aws1_lmd_actions.clas.abap#L253) (`UpdateFunctionConfiguration`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with functions](zcl_aws1_lmd_scenario.clas.abap) + +## Run the examples + +### Instructions + + + + + + + +#### Get started with functions + +This example shows you how to do the following: + +* Create an IAM role and Lambda function, then upload handler code. +* Invoke the function with a single parameter and get results. +* Update the function code and configure with an environment variable. +* Invoke the function with new parameters and get results. Display the returned execution log. +* List the functions for your account, then 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 `sap-abap` folder. + + + + + + +## Additional resources + +* [Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) +* [Lambda API Reference](https://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html) +* [SDK for SAP ABAP Lambda reference](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/lambda/index.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/sap-abap/services/s3/README.md b/sap-abap/services/s3/README.md index b023d0db45d..55d54c38f4f 100644 --- a/sap-abap/services/s3/README.md +++ b/sap-abap/services/s3/README.md @@ -1,9 +1,9 @@ - + # Amazon S3 code examples for the SDK for SAP ABAP ## Overview -Shows how to use the AWS SDK for SAP ABAP to work with Amazon Simple Storage Service. +Shows how to use the AWS SDK for SAP ABAP to work with Amazon Simple Storage Service (Amazon S3). @@ -12,7 +12,7 @@ Shows how to use the AWS SDK for SAP ABAP to work with Amazon Simple Storage Ser ## ⚠ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). @@ -21,51 +21,57 @@ Shows how to use the AWS SDK for SAP ABAP to work with Amazon Simple Storage Ser ## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `sap-abap` folder. + + + + + ### Single actions Code excerpts that show you how to call individual service functions. -* [Copy an object from one bucket to another](zcl_aws1_s3_actions.clas.abap#L60) (`CopyObject`) -* [Create a bucket](zcl_aws1_s3_actions.clas.abap#L84) (`CreateBucket`) -* [Delete an empty bucket](zcl_aws1_s3_actions.clas.abap#L106) (`DeleteBucket`) -* [Delete an object](zcl_aws1_s3_actions.clas.abap#L127) (`DeleteObject`) -* [Get an object from a bucket](zcl_aws1_s3_actions.clas.abap#L147) (`GetObject`) -* [List objects in a bucket](zcl_aws1_s3_actions.clas.abap#L171) (`ListObjects`) -* [Upload an object to a bucket](zcl_aws1_s3_actions.clas.abap#L191) (`PutObject`) +* [Copy an object from one bucket to another](zcl_aws1_s3_actions.clas.abap#L64) (`CopyObject`) +* [Create a bucket](zcl_aws1_s3_actions.clas.abap#L88) (`CreateBucket`) +* [Delete an empty bucket](zcl_aws1_s3_actions.clas.abap#L110) (`DeleteBucket`) +* [Delete an object](zcl_aws1_s3_actions.clas.abap#L131) (`DeleteObject`) +* [Get an object from a bucket](zcl_aws1_s3_actions.clas.abap#L151) (`GetObject`) +* [List objects in a bucket](zcl_aws1_s3_actions.clas.abap#L194) (`ListObjectsV2`) +* [Upload an object to a bucket](zcl_aws1_s3_actions.clas.abap#L214) (`PutObject`) ### Scenarios Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Get started with buckets and objects](zcl_aws1_s3_scenario.clas.abap) +* [Get started with buckets and objects](zcl_aws1_s3_scenario.clas.abap) ## Run the examples -### Prerequisites - -For prerequisites, see the [README](../../README.md#Prerequisites) in the `sap-abap` folder. - - - - ### Instructions + + #### Get started with buckets and objects This example shows you how to do the following: -* Create a bucket. -* Upload a file to the bucket. +* Create a bucket and upload a file to it. * Download an object from a bucket. * Copy an object to a subfolder in a bucket. * List the objects in a bucket. -* Delete the objects in a bucket. -* Delete a bucket. +* Delete the bucket objects and the bucket. + + + + @@ -74,9 +80,12 @@ This example shows you how to do the following: ⚠ 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 `sap-abap` folder. + + diff --git a/sap-abap/services/sagemaker/README.md b/sap-abap/services/sagemaker/README.md new file mode 100644 index 00000000000..fae329fbb50 --- /dev/null +++ b/sap-abap/services/sagemaker/README.md @@ -0,0 +1,107 @@ + +# SageMaker code examples for the SDK for SAP ABAP + +## Overview + +Shows how to use the AWS SDK for SAP ABAP to work with Amazon SageMaker. + + + + +*SageMaker is a fully managed machine learning service.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `sap-abap` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a model](zcl_aws1_sgm_actions.clas.abap#L173) (`CreateModel`) +* [Create an endpoint](zcl_aws1_sgm_actions.clas.abap#L123) (`CreateEndpoint`) +* [Delete a model](zcl_aws1_sgm_actions.clas.abap#L435) (`DeleteModel`) +* [Delete an endpoint](zcl_aws1_sgm_actions.clas.abap#L402) (`DeleteEndpoint`) +* [Describe a training job](zcl_aws1_sgm_actions.clas.abap#L457) (`DescribeTrainingJob`) +* [List models](zcl_aws1_sgm_actions.clas.abap#L499) (`ListModels`) +* [List notebook instances](zcl_aws1_sgm_actions.clas.abap#L520) (`ListNotebookInstances`) +* [List the machine learning algorithms](zcl_aws1_sgm_actions.clas.abap#L478) (`ListAlgorithms`) +* [List training jobs](zcl_aws1_sgm_actions.clas.abap#L540) (`ListTrainingJobs`) +* [Start a training job](zcl_aws1_sgm_actions.clas.abap#L204) (`CreateTrainingJob`) +* [Start a transform job](zcl_aws1_sgm_actions.clas.abap#L337) (`CreateTransformJob`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with models and endpoints](zcl_aws1_sgm_scenario.clas.abap) + +## Run the examples + +### Instructions + + + + + + + +#### Get started with models and endpoints + +This example shows you how to do the following: + +* Start a training job and create a SageMaker model. +* Create an endpoint configuration. +* Create an endpoint, then 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 `sap-abap` folder. + + + + + + +## Additional resources + +* [SageMaker Developer Guide](https://docs.aws.amazon.com/sagemaker/latest/dg/whatis.html) +* [SageMaker API Reference](https://docs.aws.amazon.com/sagemaker/latest/APIReference/Welcome.html) +* [SDK for SAP ABAP SageMaker reference](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/sagemaker/index.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/sap-abap/services/sns/README.md b/sap-abap/services/sns/README.md new file mode 100644 index 00000000000..6ed90d7c7b9 --- /dev/null +++ b/sap-abap/services/sns/README.md @@ -0,0 +1,102 @@ + +# Amazon SNS code examples for the SDK for SAP ABAP + +## Overview + +Shows how to use the AWS SDK for SAP ABAP to work with Amazon Simple Notification Service (Amazon SNS). + + + + +*Amazon SNS is a web service that enables applications, end-users, and devices to instantly send and receive notifications from the cloud.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `sap-abap` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a topic](zcl_aws1_sns_actions.clas.abap#L68) (`CreateTopic`) +* [Delete a subscription](zcl_aws1_sns_actions.clas.abap#L221) (`Unsubscribe`) +* [Delete a topic](zcl_aws1_sns_actions.clas.abap#L85) (`DeleteTopic`) +* [Get the properties of a topic](zcl_aws1_sns_actions.clas.abap#L102) (`GetTopicAttributes`) +* [List the subscribers of a topic](zcl_aws1_sns_actions.clas.abap#L120) (`ListSubscriptions`) +* [List topics](zcl_aws1_sns_actions.clas.abap#L138) (`ListTopics`) +* [Publish to a topic](zcl_aws1_sns_actions.clas.abap#L156) (`Publish`) +* [Set topic attributes](zcl_aws1_sns_actions.clas.abap#L176) (`SetTopicAttributes`) +* [Subscribe an email address to a topic](zcl_aws1_sns_actions.clas.abap#L197) (`Subscribe`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Create and publish to a FIFO topic](zcl_aws1_sns_scenario.clas.abap) + +## Run the examples + +### Instructions + + + + + + + +#### Create and publish to a FIFO topic + +This example shows you how to create and publish to a FIFO Amazon SNS topic. + + + + + + + + + +### 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 `sap-abap` folder. + + + + + + +## Additional resources + +* [Amazon SNS Developer Guide](https://docs.aws.amazon.com/sns/latest/dg/welcome.html) +* [Amazon SNS API Reference](https://docs.aws.amazon.com/sns/latest/api/welcome.html) +* [SDK for SAP ABAP Amazon SNS reference](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/sns/index.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/sap-abap/services/sqs/README.md b/sap-abap/services/sqs/README.md new file mode 100644 index 00000000000..6f27eb6c8b3 --- /dev/null +++ b/sap-abap/services/sqs/README.md @@ -0,0 +1,80 @@ + +# Amazon SQS code examples for the SDK for SAP ABAP + +## Overview + +Shows how to use the AWS SDK for SAP ABAP to work with Amazon Simple Queue Service (Amazon SQS). + + + + +*Amazon SQS is a fully managed message queuing service that makes it easy to decouple and scale microservices, distributed systems, and serverless applications.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `sap-abap` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Create a queue](zcl_aws1_sqs_actions.clas.abap#L68) (`CreateQueue`) +* [Delete a queue](zcl_aws1_sqs_actions.clas.abap#L87) (`DeleteQueue`) +* [Get the URL of a queue](zcl_aws1_sqs_actions.clas.abap#L102) (`GetQueueUrl`) +* [List queues](zcl_aws1_sqs_actions.clas.abap#L119) (`ListQueues`) +* [Receive messages from a queue](zcl_aws1_sqs_actions.clas.abap#L182) (`ReceiveMessage`) +* [Send a message to a queue](zcl_aws1_sqs_actions.clas.abap#L200) (`SendMessage`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `sap-abap` folder. + + + + + + +## Additional resources + +* [Amazon SQS Developer Guide](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html) +* [Amazon SQS API Reference](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/Welcome.html) +* [SDK for SAP ABAP Amazon SQS reference](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/sqs/index.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/sap-abap/services/textract/README.md b/sap-abap/services/textract/README.md new file mode 100644 index 00000000000..b1671a39016 --- /dev/null +++ b/sap-abap/services/textract/README.md @@ -0,0 +1,100 @@ + +# Amazon Textract code examples for the SDK for SAP ABAP + +## Overview + +Shows how to use the AWS SDK for SAP ABAP to work with Amazon Textract. + + + + +*Amazon Textract enables you to add document text detection and analysis to your applications.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `sap-abap` folder. + + + + + +### Single actions + +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`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with document analysis](zcl_aws1_tex_scenario.clas.abap) + +## Run the examples + +### Instructions + + + + + + + +#### Get started with document analysis + +This example shows you how to do the following: + +* Start asynchronous analysis. +* Get document analysis. + + + + + + + + +### 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 `sap-abap` folder. + + + + + + +## Additional resources + +* [Amazon Textract Developer Guide](https://docs.aws.amazon.com/textract/latest/dg/what-is.html) +* [Amazon Textract API Reference](https://docs.aws.amazon.com/textract/latest/dg/API_Reference.html) +* [SDK for SAP ABAP Amazon Textract reference](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/textract/index.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/sap-abap/services/translate/README.md b/sap-abap/services/translate/README.md new file mode 100644 index 00000000000..124a21a7771 --- /dev/null +++ b/sap-abap/services/translate/README.md @@ -0,0 +1,101 @@ + +# Amazon Translate code examples for the SDK for SAP ABAP + +## Overview + +Shows how to use the AWS SDK for SAP ABAP to work with Amazon Translate. + + + + +*Amazon Translate is a neural machine translation service for translating text to and from English across a breadth of supported languages.* + +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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 `sap-abap` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +* [Describe a translation job](zcl_aws1_xl8_actions.clas.abap#L62) (`DescribeTextTranslationJob`) +* [List translation jobs](zcl_aws1_xl8_actions.clas.abap#L89) (`ListTextTranslationJobs`) +* [Start a translation job](zcl_aws1_xl8_actions.clas.abap#L124) (`StartTextTranslationJob`) +* [Stop a translation job](zcl_aws1_xl8_actions.clas.abap#L184) (`StopTextTranslationJob`) +* [Translate text](zcl_aws1_xl8_actions.clas.abap#L210) (`TranslateText`) + +### Scenarios + +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. + +* [Get started with translate jobs](zcl_aws1_xl8_scenario.clas.abap) + +## Run the examples + +### Instructions + + + + + + + +#### Get started with translate jobs + +This example shows you how to do the following: + +* Start an asynchronous batch translation job. +* Wait for the asynchronous job to complete. +* Describe the asynchronous job. + + + + + + + + +### 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 `sap-abap` folder. + + + + + + +## Additional resources + +* [Amazon Translate Developer Guide](https://docs.aws.amazon.com/translate/latest/dg/what-is.html) +* [Amazon Translate API Reference](https://docs.aws.amazon.com/translate/latest/APIReference/welcome.html) +* [SDK for SAP ABAP Amazon Translate reference](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/translate/index.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/swift/example_code/cognito-identity/README.md b/swift/example_code/cognito-identity/README.md index 6a511aee699..5970030666b 100644 --- a/swift/example_code/cognito-identity/README.md +++ b/swift/example_code/cognito-identity/README.md @@ -1,36 +1,77 @@ -# Amazon Cognito Swift code examples + +# Amazon Cognito Identity code examples for the SDK for Swift -This README discusses how to run the Swift code examples for Amazon Cognito Identity. All examples require Swift 5.5 or later. +## Overview -## Running the Amazon Cognito Swift examples +Shows how to use the AWS SDK for Swift to work with Amazon Cognito Identity. -**IMPORTANT** + + -The Swift code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +*Amazon Cognito Identity enables you to create unique identities for your users and federate them with identity providers.* -Some of these examples perform *destructive* operations on AWS resources, such as deleting a user pool. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -To build any of these examples from a terminal window, navigate into its directory then use the command: +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. +* 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). -``` -$ swift build -``` + + -To build one of these examples in Xcode, navigate to the example's directory -(such as the `FindOrCreateIdentityPool` directory, to build that example), then -type `xed .` to open the example directory in Xcode. You can then use standard -Xcode build and run commands. +## Code examples -You will find these examples: +### Prerequisites -- **FindOrCreateIdentityPool** - Demonstrates how to search for a Cognito identity pool by name, creating it if the named pool doesn't exist yet. This example is explained in detail in the [getting started](https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/getting-started.html) page of the AWS SDK for Swift Developer Guide. +For prerequisites, see the [README](../../README.md#Prerequisites) in the `swift` folder. -To run these examples, you can setup your development environment to use the [Swift Package Manager](https://www.swift.org/package-manager/) to configure and build AWS SDK for Swift projects. For more information, -see [Getting started with the AWS SDK for Swift](https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/getting-started.html). + + -## For more information... +### Single actions -* [AWS SDK for Swift Developer Guide](https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide) -* [AWS SDK for Swift Reference](https://awslabs.github.io/aws-sdk-swift/reference/0.x/) -* [AWS SDK for Swift on GitHub](https://github.com/awslabs/aws-sdk-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`) + +## Run the examples + +### Instructions + + + + + + + +### 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 `swift` folder. + + + + + + +## Additional resources + +* [Amazon Cognito Identity Developer Guide](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html) +* [Amazon Cognito Identity API Reference](https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/Welcome.html) +* [SDK for Swift Amazon Cognito Identity reference](https://awslabs.github.io/aws-sdk-swift/reference/0.x/AWSCognito-identity/Home) + + + + +--- + +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/swift/example_code/iam/README.md b/swift/example_code/iam/README.md index 79345d40406..209544297b8 100644 --- a/swift/example_code/iam/README.md +++ b/swift/example_code/iam/README.md @@ -1,76 +1,95 @@ + # IAM code examples for the SDK for Swift + ## Overview -This folder contains code examples demonstrating how to use the AWS SDK for -Swift to use the Amazon Identity and Access Management (IAM) service. This -README discusses how to run these examples. -Amazon IAM is a web service for securely controlling access to AWS services. -With IAM, you can centrally manage users, security credentials such as access -keys, and permissions that control which AWS resources users and applications -can access. +Shows how to use the AWS SDK for Swift to work with AWS Identity and Access Management (IAM). + + + + +*IAM is a web service for securely controlling access to AWS services. With IAM, you can centrally manage permissions in your AWS account.* -## ⚠️ Important -* Running this code might result in charges to your AWS account. +## ⚠ Important + +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 `swift` folder. + + + + + ### Single actions + Code excerpts that show you how to call individual service functions. -* [Attach an IAM policy to a - role](./AttachRolePolicy/Sources/ServiceHandler/ServiceHandler.swift) - (`AttachRolePolicy`) -* [Create a new IAM user](./CreateUser/Sources/ServiceHandler/ServiceHandler.swift) (`CreateUser`) -* [Create an IAM role](./CreateRole/Sources/ServiceHandler/ServiceHandler.swift) (`CreateRole`) -* [Create an IAM role linked to a specific service](./CreateServiceLinkedRole/Sources/ServiceHandler/ServiceHandler.swift) (`CreateServiceLinkedRole`) -* [Get information about an IAM policy](./GetPolicy/Sources/ServiceHandler/ServiceHandler.swift) (`GetPolicy`) -* [Get information about an IAM role](./GetRole/Sources/ServiceHandler/ServiceHandler.swift) (`GetRole`) -* [List all AWS policies](./ListPolicies/Sources/ServiceHandler/ServiceHandler.swift) (`ListPolicies`) -* [List all groups on an AWS account](./ListGroups/Sources/ServiceHandler/ServiceHandler.swift) (`ListGroups`) -* [List all users on an AWS account](./ListUsers/Sources/ServiceHandler/ServiceHandler.swift) (`ListUsers`) -* [List the managed policies attached to a role](./ListAttachedRolePolicies/Sources/ServiceHandler/ServiceHandler.swift). (`ListAttachedRolePolicies`) -* [List the policies embedded in a role](./ListRolePolicies/Sources/ServiceHandler/ServiceHandler.swift). This does _not_ include managed policies attached to the role. (`ListRolePolicies`) - -### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. - -* [IAM Basics](./basics/Sources/Basics/Basics.swift). Demonstrates a common series of - actions to create a user, create access keys, create roles and policies, - assume the role, and use the role's permissions to perform calls to Amazon - Simple Storage Service (S3) actions. (`Basics`) - - + +* [Attach a policy to a role](AttachRolePolicy/Sources/ServiceHandler/ServiceHandler.swift#L51) (`AttachRolePolicy`) +* [Create a policy](basics/Sources/ServiceHandler/ServiceHandlerIAM.swift#L204) (`CreatePolicy`) +* [Create a role](CreateRole/Sources/ServiceHandler/ServiceHandler.swift#L51) (`CreateRole`) +* [Create a service-linked role](CreateServiceLinkedRole/Sources/ServiceHandler/ServiceHandler.swift#L59) (`CreateServiceLinkedRole`) +* [Create a user](CreateUser/Sources/ServiceHandler/ServiceHandler.swift#L50) (`CreateUser`) +* [Create an access key](basics/Sources/ServiceHandler/ServiceHandlerIAM.swift#L179) (`CreateAccessKey`) +* [Create an inline policy for a user](basics/Sources/ServiceHandler/ServiceHandlerIAM.swift#L231) (`PutUserPolicy`) +* [Delete a policy](basics/Sources/ServiceHandler/ServiceHandlerIAM.swift#L312) (`DeletePolicy`) +* [Delete a role](basics/Sources/ServiceHandler/ServiceHandlerIAM.swift#L376) (`DeleteRole`) +* [Delete a user](basics/Sources/ServiceHandler/ServiceHandlerIAM.swift#L330) (`DeleteUser`) +* [Delete an access key](basics/Sources/ServiceHandler/ServiceHandlerIAM.swift#L350) (`DeleteAccessKey`) +* [Delete an inline policy from a user](basics/Sources/ServiceHandler/ServiceHandlerIAM.swift#L253) (`DeleteUserPolicy`) +* [Detach a policy from a role](basics/Sources/ServiceHandler/ServiceHandlerIAM.swift#L293) (`DetachRolePolicy`) +* [Get a policy](GetPolicy/Sources/ServiceHandler/ServiceHandler.swift#L50) (`GetPolicy`) +* [Get a role](GetRole/Sources/ServiceHandler/ServiceHandler.swift#L51) (`GetRole`) +* [List groups](ListGroups/Sources/ServiceHandler/ServiceHandler.swift#L41) (`ListGroups`) +* [List inline policies for a role](ListRolePolicies/Sources/ServiceHandler/ServiceHandler.swift#L49) (`ListRolePolicies`) +* [List policies](ListPolicies/Sources/ServiceHandler/ServiceHandler.swift#L49) (`ListPolicies`) +* [List policies attached to a role](ListAttachedRolePolicies/Sources/ServiceHandler/ServiceHandler.swift#L45) (`ListAttachedRolePolicies`) +* [List roles](ListRoles/Sources/ServiceHandler/ServiceHandler.swift#L48) (`ListRoles`) +* [List users](ListUsers/Sources/ServiceHandler/ServiceHandler.swift#L41) (`ListUsers`) ## Run the examples -To build any of these examples from a terminal window, navigate into its -directory, then use the following command: -``` -$ swift build -``` +### Instructions -To build one of these examples in Xcode, navigate to the example's directory -(such as the `ListUsers` directory, to build that example). Then type `xed.` -to open the example directory in Xcode. You can then use standard Xcode build -and run commands. -### Prerequisites -See the [Prerequisites](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/swift#Prerequisites) section in the README for the AWS SDK for Swift examples repository. + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + -## Tests -⚠️ Running the tests might result in charges to your AWS account. +To find instructions for running these tests, see the [README](../../README.md#Tests) +in the `swift` folder. -To run the tests for an example, use the command `swift test` in the example's directory. + + + + ## Additional resources -* [IAM user guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/) -* [IAM API reference](https://docs.aws.amazon.com/IAM/latest/APIReference/) -* [IAM Developer Guide for Swift](https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/examples-iam.html) -* [IAM API reference for Swift](https://awslabs.github.io/aws-sdk-swift/reference/0.x/AWSIAM/Home) -* [Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) -_Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0_ \ No newline at end of file +* [IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) +* [IAM API Reference](https://docs.aws.amazon.com/IAM/latest/APIReference/welcome.html) +* [SDK for Swift IAM reference](https://awslabs.github.io/aws-sdk-swift/reference/0.x/AWSIam/Home) + + + + +--- + +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/swift/example_code/s3/README.md b/swift/example_code/s3/README.md index 8cbb7be319f..49ed983ac45 100644 --- a/swift/example_code/s3/README.md +++ b/swift/example_code/s3/README.md @@ -1,64 +1,107 @@ + # Amazon S3 code examples for the SDK for Swift + ## Overview -This folder contains code examples demonstrating how to use the AWS SDK for -Swift to use the Amazon Simple Storage Service (`S3`). This README discusses how -to run these examples. -Amazon Simple Storage Service (`Amazon S3`) is storage for the internet. You can -use Amazon S3 to store and retrieve any amount of data at any time, from -anywhere on the web. +Shows how to use the AWS SDK for Swift to work with Amazon Simple Storage Service (Amazon S3). + + + + +*Amazon S3 is storage for the internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.* + +## ⚠ Important -## ⚠️ Important -* Running this code might result in charges to your AWS account. +* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details. * 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). +* 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 `swift` folder. + + + + + ### Single actions + Code excerpts that show you how to call individual service functions. -* [Copy an object](./basics/Sources/ServiceHandler/ServiceHandler.swift) (`CopyObject`) -* [Create a bucket](./basics/Sources/ServiceHandler/ServiceHandler.swift) (`CreateBucket`) -* [Delete a bucket](./basics/Sources/ServiceHandler/ServiceHandler.swift) (`DeleteBucket`) -* [Delete an object](./basics/Sources/ServiceHandler/ServiceHandler.swift) (`DeleteObject`) -* [Delete multiple objects](./DeleteObjects/Sources/ServiceHandler/ServiceHandler.swift) -* [Get an object from a bucket](./basics/Sources/ServiceHandler/ServiceHandler.swift) (`GetObject`) -* [List objects in a bucket](./basics/Sources/ServiceHandler/ServiceHandler.swift) (`ListObjectsV2`) -* [Upload an object to a bucket](./basics/Sources/ServiceHandler/ServiceHandler.swift) (`PutObject`) + +* [Copy an object from one bucket to another](basics/Sources/ServiceHandler/ServiceHandler.swift#L164) (`CopyObject`) +* [Create a bucket](basics/Sources/ServiceHandler/ServiceHandler.swift#L41) (`CreateBucket`) +* [Delete an empty bucket](basics/Sources/ServiceHandler/ServiceHandler.swift#L56) (`DeleteBucket`) +* [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 objects in a bucket](basics/Sources/ServiceHandler/ServiceHandler.swift#L204) (`ListObjectsV2`) +* [Upload an object to a bucket](basics/Sources/ServiceHandler/ServiceHandler.swift#L70) (`PutObject`) ### Scenarios -Code examples that show you how to accomplish a specific task by calling multiple functions within the same service. -* [Amazon S3 basics](./basics/Sources/ServiceHandler/ServiceHandler.swift) - +Code examples that show you how to accomplish a specific task by calling multiple +functions within the same service. -## Running the examples -To build any of these examples from a terminal window, navigate into its directory then use the command: +* [Get started with buckets and objects](basics/Sources/ServiceHandler/ServiceHandler.swift) -``` -$ swift build -``` +## Run the examples + +### Instructions + + + + -To build one of these examples in Xcode, navigate to the example's directory -(such as the `DeleteObjects` directory, to build that example), then type -`xed .` to open the example directory in Xcode. You can then use standard Xcode -build and run commands. -### Prerequisites -See the [Prerequisites](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/swift#Prerequisites) section in the README for the AWS SDK for Swift examples repository. -## Tests -⚠️ Running the tests might result in charges to your AWS account. +#### Get started with buckets and objects -To run the tests for an example, use the command `swift test` in the example's directory. +This example shows you how to do the following: + +* Create a bucket and upload a file to it. +* Download an object from a bucket. +* Copy an object to a subfolder in a bucket. +* List the objects in a bucket. +* Delete the bucket objects and the bucket. + + + + + + + + +### 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 `swift` folder. + + + + + ## Additional resources -* [Amazon S3 user guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide) -* [Amazon S3 API reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Type_API_Reference.html) -* [S3 developer guide for Swift](https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide) -* [S3 API reference for Swift](https://awslabs.github.io/aws-sdk-swift/reference/0.x/AWSS3/Home) -_Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0_ +* [Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) +* [Amazon S3 API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html) +* [SDK for Swift Amazon S3 reference](https://awslabs.github.io/aws-sdk-swift/reference/0.x/AWSS3/Home) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file