From de63345771f4a1e3339cf1ce1e0ec6cf41012283 Mon Sep 17 00:00:00 2001 From: Jami Schwarzwalder Date: Wed, 2 Jan 2019 11:29:52 -0800 Subject: [PATCH] Updating copyright to 2019 --- README.rst | 8 +- cpp/README.rst | 118 ++++----- cpp/example_code/cloudtrail/CMakeLists.txt | 2 +- cpp/example_code/cloudwatch/CMakeLists.txt | 2 +- cpp/example_code/codebuild/CMakeLists.txt | 2 +- cpp/example_code/codecommit/CMakeLists.txt | 2 +- cpp/example_code/dynamodb/CMakeLists.txt | 2 +- cpp/example_code/ebs/CMakeLists.txt | 2 +- cpp/example_code/ec2/CMakeLists.txt | 2 +- cpp/example_code/efs/CMakeLists.txt | 2 +- cpp/example_code/elasticache/CMakeLists.txt | 2 +- cpp/example_code/glacier/CMakeLists.txt | 2 +- cpp/example_code/guardduty/CMakeLists.txt | 2 +- cpp/example_code/iam/CMakeLists.txt | 2 +- cpp/example_code/kinesis/CMakeLists.txt | 2 +- cpp/example_code/lambda/CMakeLists.txt | 2 +- cpp/example_code/neptune/CMakeLists.txt | 2 +- cpp/example_code/redshift/CMakeLists.txt | 2 +- cpp/example_code/s3/CMakeLists.txt | 2 +- dotnet/README.rst | 76 +++--- go/Readme.rst | 30 +-- .../cloudformation/CfnCreateStack.go | 2 +- .../cloudformation/CfnDeleteStack.go | 2 +- .../cloudformation/CfnListStacks.go | 2 +- go/example_code/cloudtrail/create_trail.go | 2 +- go/example_code/cloudtrail/delete_trail.go | 2 +- go/example_code/cloudtrail/describe_trails.go | 2 +- go/example_code/cloudtrail/lookup_events.go | 2 +- .../cloudwatch/create_enable_alarms.go | 2 +- go/example_code/cloudwatch/custom_metrics.go | 2 +- go/example_code/cloudwatch/delete_alarms.go | 2 +- .../cloudwatch/describe_alarm_history.go | 2 +- go/example_code/cloudwatch/describe_alarms.go | 2 +- .../cloudwatch/describe_alarms_for_metric.go | 2 +- go/example_code/cloudwatch/disable_alarm.go | 2 +- .../cloudwatch/events_put_events.go | 2 +- .../cloudwatch/events_put_targets.go | 2 +- .../cloudwatch/events_schedule_rule.go | 2 +- go/example_code/cloudwatch/listing_metrics.go | 2 +- go/example_code/codebuild/cb_build_project.go | 2 +- go/example_code/codebuild/cb_list_builds.go | 2 +- go/example_code/codebuild/cb_list_projects.go | 2 +- go/example_code/dynamodb/create_item.go | 2 +- go/example_code/dynamodb/create_table.go | 2 +- go/example_code/dynamodb/delete_item.go | 2 +- go/example_code/dynamodb/list_tables.go | 2 +- go/example_code/dynamodb/load_items.go | 2 +- go/example_code/dynamodb/read_item.go | 2 +- go/example_code/dynamodb/scan_items.go | 2 +- go/example_code/dynamodb/update_item.go | 2 +- .../ec2/create_image_no_block_device.go | 138 +++++------ go/example_code/ec2/create_instance.go | 150 ++++++------ go/example_code/ec2/describing_instances.go | 2 +- go/example_code/ec2/ec2_allocate_address.go | 2 +- go/example_code/ec2/ec2_create_keypair.go | 2 +- .../ec2/ec2_create_security_group.go | 2 +- go/example_code/ec2/ec2_delete_keypair.go | 150 ++++++------ .../ec2/ec2_delete_security_group.go | 158 ++++++------ go/example_code/ec2/ec2_describe_addresses.go | 2 +- go/example_code/ec2/ec2_describe_keypairs.go | 128 +++++----- .../ec2/ec2_describe_security_groups.go | 2 +- go/example_code/ec2/ec2_release_address.go | 152 ++++++------ go/example_code/ec2/get_console_output.go | 122 +++++----- go/example_code/ec2/monitoring_instances.go | 2 +- go/example_code/ec2/reboot_instances.go | 2 +- .../ec2/regions_and_availability.go | 2 +- go/example_code/ec2/start_stop_instances.go | 2 +- go/example_code/extending_sdk/addHeader.go | 2 +- go/example_code/extending_sdk/addTags.go | 2 +- .../ecs/update_deployment_with_setters.go | 2 +- .../extending_sdk/handleServiceErrorCodes.go | 2 +- .../extending_sdk/request_context.go | 2 +- go/example_code/glacier/create_vault.go | 2 +- go/example_code/glacier/upload_archive.go | 2 +- go/example_code/iam/IamListAdmins.go | 2 +- go/example_code/iam/iam_accesskeylastused.go | 2 +- go/example_code/iam/iam_attachuserpolicy.go | 2 +- go/example_code/iam/iam_createaccesskey.go | 2 +- go/example_code/iam/iam_createaccountalias.go | 2 +- go/example_code/iam/iam_createpolicy.go | 2 +- go/example_code/iam/iam_createuser.go | 2 +- go/example_code/iam/iam_deleteaccesskey.go | 2 +- go/example_code/iam/iam_deleteaccountalias.go | 2 +- go/example_code/iam/iam_deleteservercert.go | 2 +- go/example_code/iam/iam_deleteuser.go | 2 +- go/example_code/iam/iam_detachuserpolicy.go | 2 +- go/example_code/iam/iam_getpolicy.go | 2 +- go/example_code/iam/iam_getpublickeys.go | 2 +- go/example_code/iam/iam_getservercert.go | 2 +- go/example_code/iam/iam_listaccesskeys.go | 2 +- go/example_code/iam/iam_listaccountaliases.go | 2 +- go/example_code/iam/iam_listservercerts.go | 2 +- go/example_code/iam/iam_listusers.go | 2 +- go/example_code/iam/iam_updateaccesskey.go | 2 +- go/example_code/iam/iam_updateservercert.go | 2 +- go/example_code/iam/iam_updateuser.go | 2 +- go/example_code/kms/kms_create_key.go | 2 +- go/example_code/kms/kms_decrypt_data.go | 2 +- go/example_code/kms/kms_encrypt_data.go | 2 +- go/example_code/kms/kms_re_encrypt_data.go | 2 +- ...ple-configure-function-for-notification.go | 2 +- ...s-go-sdk-lambda-example-create-function.go | 2 +- .../aws-go-sdk-lambda-example-run-function.go | 2 +- ...ws-go-sdk-lambda-example-show-functions.go | 2 +- go/example_code/polly/pollyDescribeVoices.go | 2 +- go/example_code/polly/pollyListLexicons.go | 2 +- .../polly/pollySynthesizeSpeech.go | 2 +- .../s3/create_new_bucket_and_object.go | 2 +- go/example_code/s3/enforce_content_md5.go | 2 +- go/example_code/s3/generate_presigned_url.go | 2 +- ...generate_presigned_url_specific_payload.go | 2 +- go/example_code/s3/list_all_buckets.go | 2 +- go/example_code/s3/put_object_with_setters.go | 2 +- go/example_code/s3/s3_copy_object.go | 2 +- go/example_code/s3/s3_create_bucket.go | 2 +- go/example_code/s3/s3_delete_bucket.go | 2 +- go/example_code/s3/s3_delete_bucket_policy.go | 2 +- .../s3/s3_delete_bucket_website.go | 2 +- go/example_code/s3/s3_delete_object.go | 2 +- go/example_code/s3/s3_delete_objects.go | 2 +- go/example_code/s3/s3_download_object.go | 2 +- .../s3/s3_encrypt_on_server_with_kms.go | 2 +- go/example_code/s3/s3_get_bucket_acl.go | 2 +- .../s3/s3_get_bucket_object_acl.go | 2 +- go/example_code/s3/s3_get_bucket_policy.go | 2 +- go/example_code/s3/s3_get_bucket_website.go | 2 +- go/example_code/s3/s3_list_buckets.go | 2 +- go/example_code/s3/s3_list_objects.go | 2 +- go/example_code/s3/s3_make_bucket_public.go | 2 +- go/example_code/s3/s3_put_bucket_acl.go | 2 +- .../s3/s3_put_bucket_object_acl.go | 2 +- .../s3/s3_require_server_encryption.go | 2 +- go/example_code/s3/s3_restore_object.go | 2 +- go/example_code/s3/s3_set_bucket_policy.go | 2 +- go/example_code/s3/s3_set_bucket_website.go | 2 +- go/example_code/s3/s3_set_cors.go | 2 +- .../s3/s3_set_default_encryption.go | 2 +- go/example_code/s3/s3_upload_directory.go | 214 ++++++++-------- go/example_code/s3/s3_upload_object.go | 2 +- .../s3/upload_arbitrary_sized_stream.go | 2 +- go/example_code/ses/ses_delete_address.go | 2 +- go/example_code/ses/ses_get_statistics.go | 2 +- go/example_code/ses/ses_list_emails.go | 2 +- go/example_code/ses/ses_send_email.go | 2 +- go/example_code/ses/ses_send_verification.go | 2 +- go/example_code/sqs/sqs_changingvisibility.go | 2 +- go/example_code/sqs/sqs_createqueues.go | 2 +- go/example_code/sqs/sqs_deadletterqueue.go | 2 +- go/example_code/sqs/sqs_deletemessage.go | 2 +- go/example_code/sqs/sqs_deletequeue.go | 2 +- go/example_code/sqs/sqs_getqueueurl.go | 2 +- go/example_code/sqs/sqs_listqueues.go | 2 +- .../sqs/sqs_longpolling_create_queue.go | 2 +- .../sqs/sqs_longpolling_existing_queue.go | 2 +- .../sqs/sqs_longpolling_receive_message.go | 2 +- go/example_code/sqs/sqs_sendmessage.go | 2 +- go/example_code/workdocs/wd_list_user_docs.go | 2 +- go/example_code/workdocs/wd_list_users.go | 2 +- java/README.rst | 228 +++++++++--------- javascript/README.rst | 100 ++++---- javav2/README.rst | 216 ++++++++--------- php/example_code/README.rst | 2 +- ruby/example_code/README.rst | 30 +-- 163 files changed, 1156 insertions(+), 1156 deletions(-) diff --git a/README.rst b/README.rst index 1e176bc4a6b..49b63b09042 100644 --- a/README.rst +++ b/README.rst @@ -71,10 +71,10 @@ please read this section carefully so that we can work together more effectively * **All code must be submitted under the Apache 2.0 license**, as noted in the following **Copyright and License** section. -Copyright and License -===================== - -All content in this repository, unless otherwise stated, is +Copyright and License +===================== + +All content in this repository, unless otherwise stated, is Copyright © 2010-2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Except where otherwise noted, all examples in this collection are licensed under the `Apache diff --git a/cpp/README.rst b/cpp/README.rst index 83146453304..938935f305a 100644 --- a/cpp/README.rst +++ b/cpp/README.rst @@ -1,59 +1,59 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 - International License (the "License"). You may not use this file except in compliance with the - License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions and - limitations under the License. - -###################################### -AWS SDK for C++ Documentation Examples -###################################### - -This is a collection of examples for the AWS SDK for C++ public documentation. - - -Prerequisites -============= - -To build and run these examples, you'll need: - -* CMake (version 3.2+) -* AWS SDK for C++ (downloaded, extracted, built and installed on your machine) -* AWS credentials, either configured in a local AWS credentials file or by setting the - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables - - -Building the examples -===================== - -To build the examples, create a build directory:: - - mkdir s3_build - -Go into the directory and run ``cmake``, providing it with the path to where you install the SDK if the path is not CMake awareness, and -the path to the examples directory that you want to build. For example:: - - cd s3_build - cmake -DCMAKE_PREFIX_PATH=/path/to/aws_sdk_installed/ ../example_code/s3 - -Finally, run ``make`` in the build directory: - - make - - -Running the examples -==================== - -The examples are built right into the build directory, so you can run them by name. On Unix, Linux -and OS X, make sure you specify the full path to the file (since you unlikely added the current -directory to your ``PATH``):: - - ./list_buckets - -On **Windows**, you would run the same example as:: - - list_buckets.exe - +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +###################################### +AWS SDK for C++ Documentation Examples +###################################### + +This is a collection of examples for the AWS SDK for C++ public documentation. + + +Prerequisites +============= + +To build and run these examples, you'll need: + +* CMake (version 3.2+) +* AWS SDK for C++ (downloaded, extracted, built and installed on your machine) +* AWS credentials, either configured in a local AWS credentials file or by setting the + AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables + + +Building the examples +===================== + +To build the examples, create a build directory:: + + mkdir s3_build + +Go into the directory and run ``cmake``, providing it with the path to where you install the SDK if the path is not CMake awareness, and +the path to the examples directory that you want to build. For example:: + + cd s3_build + cmake -DCMAKE_PREFIX_PATH=/path/to/aws_sdk_installed/ ../example_code/s3 + +Finally, run ``make`` in the build directory: + + make + + +Running the examples +==================== + +The examples are built right into the build directory, so you can run them by name. On Unix, Linux +and OS X, make sure you specify the full path to the file (since you unlikely added the current +directory to your ``PATH``):: + + ./list_buckets + +On **Windows**, you would run the same example as:: + + list_buckets.exe + diff --git a/cpp/example_code/cloudtrail/CMakeLists.txt b/cpp/example_code/cloudtrail/CMakeLists.txt index e7bf62c57b3..d4d42f38af1 100644 --- a/cpp/example_code/cloudtrail/CMakeLists.txt +++ b/cpp/example_code/cloudtrail/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/cloudwatch/CMakeLists.txt b/cpp/example_code/cloudwatch/CMakeLists.txt index 0d4267de970..6e0b638657f 100644 --- a/cpp/example_code/cloudwatch/CMakeLists.txt +++ b/cpp/example_code/cloudwatch/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/codebuild/CMakeLists.txt b/cpp/example_code/codebuild/CMakeLists.txt index eca4704bc8b..d93aaf930e0 100644 --- a/cpp/example_code/codebuild/CMakeLists.txt +++ b/cpp/example_code/codebuild/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/codecommit/CMakeLists.txt b/cpp/example_code/codecommit/CMakeLists.txt index 4a33d39ce49..3773b9f4d7f 100644 --- a/cpp/example_code/codecommit/CMakeLists.txt +++ b/cpp/example_code/codecommit/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/dynamodb/CMakeLists.txt b/cpp/example_code/dynamodb/CMakeLists.txt index 90b478be59d..8df52163f5f 100644 --- a/cpp/example_code/dynamodb/CMakeLists.txt +++ b/cpp/example_code/dynamodb/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/ebs/CMakeLists.txt b/cpp/example_code/ebs/CMakeLists.txt index c93b7eeaa5f..58dd18372db 100644 --- a/cpp/example_code/ebs/CMakeLists.txt +++ b/cpp/example_code/ebs/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/ec2/CMakeLists.txt b/cpp/example_code/ec2/CMakeLists.txt index 67b569a8325..cccd2518c8b 100644 --- a/cpp/example_code/ec2/CMakeLists.txt +++ b/cpp/example_code/ec2/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/efs/CMakeLists.txt b/cpp/example_code/efs/CMakeLists.txt index d2e019977a5..60dd25c35ee 100644 --- a/cpp/example_code/efs/CMakeLists.txt +++ b/cpp/example_code/efs/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/elasticache/CMakeLists.txt b/cpp/example_code/elasticache/CMakeLists.txt index 90a0261f7cc..a80abaebf77 100644 --- a/cpp/example_code/elasticache/CMakeLists.txt +++ b/cpp/example_code/elasticache/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/glacier/CMakeLists.txt b/cpp/example_code/glacier/CMakeLists.txt index 25ef1fbee3e..5506d2fce6c 100644 --- a/cpp/example_code/glacier/CMakeLists.txt +++ b/cpp/example_code/glacier/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/guardduty/CMakeLists.txt b/cpp/example_code/guardduty/CMakeLists.txt index 2242ad5f6b8..c658ffc25a9 100644 --- a/cpp/example_code/guardduty/CMakeLists.txt +++ b/cpp/example_code/guardduty/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/iam/CMakeLists.txt b/cpp/example_code/iam/CMakeLists.txt index c96fcd3ab9a..8f84bf0ad50 100644 --- a/cpp/example_code/iam/CMakeLists.txt +++ b/cpp/example_code/iam/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/kinesis/CMakeLists.txt b/cpp/example_code/kinesis/CMakeLists.txt index 8877311fd08..d93e0e14d51 100644 --- a/cpp/example_code/kinesis/CMakeLists.txt +++ b/cpp/example_code/kinesis/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/lambda/CMakeLists.txt b/cpp/example_code/lambda/CMakeLists.txt index 8317c616ea6..d515ebfbc28 100644 --- a/cpp/example_code/lambda/CMakeLists.txt +++ b/cpp/example_code/lambda/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of diff --git a/cpp/example_code/neptune/CMakeLists.txt b/cpp/example_code/neptune/CMakeLists.txt index 5dd91f9b366..28e9b40edbf 100644 --- a/cpp/example_code/neptune/CMakeLists.txt +++ b/cpp/example_code/neptune/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/redshift/CMakeLists.txt b/cpp/example_code/redshift/CMakeLists.txt index a1d4ecd2c3e..19a63b4b95b 100644 --- a/cpp/example_code/redshift/CMakeLists.txt +++ b/cpp/example_code/redshift/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/cpp/example_code/s3/CMakeLists.txt b/cpp/example_code/s3/CMakeLists.txt index 8a0a39fbe68..afd318406c0 100644 --- a/cpp/example_code/s3/CMakeLists.txt +++ b/cpp/example_code/s3/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of # the License is located at diff --git a/dotnet/README.rst b/dotnet/README.rst index e1b3bfa3722..fad34fb6675 100644 --- a/dotnet/README.rst +++ b/dotnet/README.rst @@ -1,38 +1,38 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 - International License (the "License"). You may not use this file except in compliance with the - License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions and - limitations under the License. - -###################################### -AWS SDK for .NET Documentation Examples -###################################### - -This is a collection of examples for the AWS SDK for .NET public documentation. - - -Prerequisites -============= - -To build and run these examples, you'll need: - -* AWS SDK for .NET -* AWS credentials, either configured in a local AWS credentials file or by setting the - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables - - -Building the examples -===================== - -Open the solution corresponding to the service for which you wish to run examples in Visual Studio. - -Compile and run the solution. - - - - - +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +###################################### +AWS SDK for .NET Documentation Examples +###################################### + +This is a collection of examples for the AWS SDK for .NET public documentation. + + +Prerequisites +============= + +To build and run these examples, you'll need: + +* AWS SDK for .NET +* AWS credentials, either configured in a local AWS credentials file or by setting the + AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables + + +Building the examples +===================== + +Open the solution corresponding to the service for which you wish to run examples in Visual Studio. + +Compile and run the solution. + + + + + diff --git a/go/Readme.rst b/go/Readme.rst index 00b163bb0e4..fadb1d1fe27 100644 --- a/go/Readme.rst +++ b/go/Readme.rst @@ -1,15 +1,15 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 - International License (the "License"). You may not use this file except in compliance with the - License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions and - limitations under the License. - -###################################### -AWS SDK for Go Documentation Examples -###################################### - -This is a collection of examples for the AWS SDK for Go public documentation. +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +###################################### +AWS SDK for Go Documentation Examples +###################################### + +This is a collection of examples for the AWS SDK for Go public documentation. diff --git a/go/example_code/cloudformation/CfnCreateStack.go b/go/example_code/cloudformation/CfnCreateStack.go index 592d74fce53..6eb739e175f 100644 --- a/go/example_code/cloudformation/CfnCreateStack.go +++ b/go/example_code/cloudformation/CfnCreateStack.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudformation/CfnDeleteStack.go b/go/example_code/cloudformation/CfnDeleteStack.go index aa55488171f..387d41ed20f 100644 --- a/go/example_code/cloudformation/CfnDeleteStack.go +++ b/go/example_code/cloudformation/CfnDeleteStack.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudformation/CfnListStacks.go b/go/example_code/cloudformation/CfnListStacks.go index 89b3f52920e..d7c068cc30e 100644 --- a/go/example_code/cloudformation/CfnListStacks.go +++ b/go/example_code/cloudformation/CfnListStacks.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudtrail/create_trail.go b/go/example_code/cloudtrail/create_trail.go index 15c210443d5..6811877c260 100644 --- a/go/example_code/cloudtrail/create_trail.go +++ b/go/example_code/cloudtrail/create_trail.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudtrail/delete_trail.go b/go/example_code/cloudtrail/delete_trail.go index cc4845a42c7..0d134606994 100644 --- a/go/example_code/cloudtrail/delete_trail.go +++ b/go/example_code/cloudtrail/delete_trail.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudtrail/describe_trails.go b/go/example_code/cloudtrail/describe_trails.go index 235f3edab9b..24b08cb82a3 100644 --- a/go/example_code/cloudtrail/describe_trails.go +++ b/go/example_code/cloudtrail/describe_trails.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudtrail/lookup_events.go b/go/example_code/cloudtrail/lookup_events.go index 794e7d304c0..494fe60ff66 100644 --- a/go/example_code/cloudtrail/lookup_events.go +++ b/go/example_code/cloudtrail/lookup_events.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/create_enable_alarms.go b/go/example_code/cloudwatch/create_enable_alarms.go index d680f5084ce..bf6e20fc0e9 100644 --- a/go/example_code/cloudwatch/create_enable_alarms.go +++ b/go/example_code/cloudwatch/create_enable_alarms.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/custom_metrics.go b/go/example_code/cloudwatch/custom_metrics.go index 9481b5f47c2..b2f9e06c3cb 100644 --- a/go/example_code/cloudwatch/custom_metrics.go +++ b/go/example_code/cloudwatch/custom_metrics.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/delete_alarms.go b/go/example_code/cloudwatch/delete_alarms.go index bbcda8960d1..4a10e04c77f 100644 --- a/go/example_code/cloudwatch/delete_alarms.go +++ b/go/example_code/cloudwatch/delete_alarms.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/describe_alarm_history.go b/go/example_code/cloudwatch/describe_alarm_history.go index 5e75e62b434..e8e6c1c53b6 100644 --- a/go/example_code/cloudwatch/describe_alarm_history.go +++ b/go/example_code/cloudwatch/describe_alarm_history.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/describe_alarms.go b/go/example_code/cloudwatch/describe_alarms.go index d4098a96b87..af660bd6256 100644 --- a/go/example_code/cloudwatch/describe_alarms.go +++ b/go/example_code/cloudwatch/describe_alarms.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/describe_alarms_for_metric.go b/go/example_code/cloudwatch/describe_alarms_for_metric.go index 3f4d6c31995..e471d1b6134 100644 --- a/go/example_code/cloudwatch/describe_alarms_for_metric.go +++ b/go/example_code/cloudwatch/describe_alarms_for_metric.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/disable_alarm.go b/go/example_code/cloudwatch/disable_alarm.go index 653b0d1356e..b01ee012869 100644 --- a/go/example_code/cloudwatch/disable_alarm.go +++ b/go/example_code/cloudwatch/disable_alarm.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/events_put_events.go b/go/example_code/cloudwatch/events_put_events.go index 78e36fccfde..45232137d59 100644 --- a/go/example_code/cloudwatch/events_put_events.go +++ b/go/example_code/cloudwatch/events_put_events.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/events_put_targets.go b/go/example_code/cloudwatch/events_put_targets.go index c0baeb7b3f2..13e088411c0 100644 --- a/go/example_code/cloudwatch/events_put_targets.go +++ b/go/example_code/cloudwatch/events_put_targets.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/events_schedule_rule.go b/go/example_code/cloudwatch/events_schedule_rule.go index e67a5d45f2a..0071a3585fb 100644 --- a/go/example_code/cloudwatch/events_schedule_rule.go +++ b/go/example_code/cloudwatch/events_schedule_rule.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/cloudwatch/listing_metrics.go b/go/example_code/cloudwatch/listing_metrics.go index 94ecbd92376..d3e807f3cd3 100644 --- a/go/example_code/cloudwatch/listing_metrics.go +++ b/go/example_code/cloudwatch/listing_metrics.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/codebuild/cb_build_project.go b/go/example_code/codebuild/cb_build_project.go index c3c0f441413..92e9e0d3c2f 100644 --- a/go/example_code/codebuild/cb_build_project.go +++ b/go/example_code/codebuild/cb_build_project.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/codebuild/cb_list_builds.go b/go/example_code/codebuild/cb_list_builds.go index 1a2aa9a0e44..503f2f9c9ec 100644 --- a/go/example_code/codebuild/cb_list_builds.go +++ b/go/example_code/codebuild/cb_list_builds.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/codebuild/cb_list_projects.go b/go/example_code/codebuild/cb_list_projects.go index e39932b1655..2eaf47a450e 100644 --- a/go/example_code/codebuild/cb_list_projects.go +++ b/go/example_code/codebuild/cb_list_projects.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/dynamodb/create_item.go b/go/example_code/dynamodb/create_item.go index b13bb1f32b1..6ca15757d1e 100644 --- a/go/example_code/dynamodb/create_item.go +++ b/go/example_code/dynamodb/create_item.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/dynamodb/create_table.go b/go/example_code/dynamodb/create_table.go index 3e8e3831dff..87c31f33141 100644 --- a/go/example_code/dynamodb/create_table.go +++ b/go/example_code/dynamodb/create_table.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/dynamodb/delete_item.go b/go/example_code/dynamodb/delete_item.go index fb3b069fad9..eb877a62205 100644 --- a/go/example_code/dynamodb/delete_item.go +++ b/go/example_code/dynamodb/delete_item.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/dynamodb/list_tables.go b/go/example_code/dynamodb/list_tables.go index d6b6c49e9b5..04ecb59e060 100644 --- a/go/example_code/dynamodb/list_tables.go +++ b/go/example_code/dynamodb/list_tables.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/dynamodb/load_items.go b/go/example_code/dynamodb/load_items.go index 05193906146..ad25992cf61 100644 --- a/go/example_code/dynamodb/load_items.go +++ b/go/example_code/dynamodb/load_items.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/dynamodb/read_item.go b/go/example_code/dynamodb/read_item.go index 1c5322ff656..7b350743ba0 100644 --- a/go/example_code/dynamodb/read_item.go +++ b/go/example_code/dynamodb/read_item.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/dynamodb/scan_items.go b/go/example_code/dynamodb/scan_items.go index c543163fa69..92acc6d322e 100644 --- a/go/example_code/dynamodb/scan_items.go +++ b/go/example_code/dynamodb/scan_items.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/dynamodb/update_item.go b/go/example_code/dynamodb/update_item.go index aa2b6aee1d9..4cc2275014c 100644 --- a/go/example_code/dynamodb/update_item.go +++ b/go/example_code/dynamodb/update_item.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/create_image_no_block_device.go b/go/example_code/ec2/create_image_no_block_device.go index a1ed4cfbb42..0ce58614aa2 100644 --- a/go/example_code/ec2/create_image_no_block_device.go +++ b/go/example_code/ec2/create_image_no_block_device.go @@ -1,69 +1,69 @@ -//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] -//snippet-sourceauthor:[Doug-AWS] -//snippet-sourcedescription:[Creates an Amazon EC2 instance without a block device.] -//snippet-keyword:[Amazon Elastic Compute Cloud] -//snippet-keyword:[CreateImage function] -//snippet-keyword:[Go] -//snippet-service:[ec2] -//snippet-sourcetype:[full-example] -//snippet-sourcedate:[2018-11-08] -/* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This file is licensed under the Apache License, Version 2.0 (the "License"). - You may not use this file except in compliance with the License. A copy of - the License is located at - - http://aws.amazon.com/apache2.0/ - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. See the License for the - specific language governing permissions and limitations under the License. -*/ - -package main - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/ec2" - - "fmt" -) - -func main() { - // Load session from shared config - sess := session.Must(session.NewSessionWithOptions(session.Options{ - SharedConfigState: session.SharedConfigEnable, - })) - - // Create EC2 service client - svc := ec2.New(sess) - - opts := &ec2.CreateImageInput{ - Description: aws.String("image description"), - InstanceId: aws.String("i-abcdef12"), - Name: aws.String("image name"), - BlockDeviceMappings: []*ec2.BlockDeviceMapping{ - { - DeviceName: aws.String("/dev/sda1"), - NoDevice: aws.String(""), - }, - { - DeviceName: aws.String("/dev/sdb"), - NoDevice: aws.String(""), - }, - { - DeviceName: aws.String("/dev/sdc"), - NoDevice: aws.String(""), - }, - }, - } - resp, err := svc.CreateImage(opts) - if err != nil { - fmt.Println(err) - return - } - - fmt.Println("ID: ", resp.ImageId) -} +//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] +//snippet-sourceauthor:[Doug-AWS] +//snippet-sourcedescription:[Creates an Amazon EC2 instance without a block device.] +//snippet-keyword:[Amazon Elastic Compute Cloud] +//snippet-keyword:[CreateImage function] +//snippet-keyword:[Go] +//snippet-service:[ec2] +//snippet-sourcetype:[full-example] +//snippet-sourcedate:[2018-11-08] +/* + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This file is licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. A copy of + the License is located at + + http://aws.amazon.com/apache2.0/ + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. +*/ + +package main + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" + + "fmt" +) + +func main() { + // Load session from shared config + sess := session.Must(session.NewSessionWithOptions(session.Options{ + SharedConfigState: session.SharedConfigEnable, + })) + + // Create EC2 service client + svc := ec2.New(sess) + + opts := &ec2.CreateImageInput{ + Description: aws.String("image description"), + InstanceId: aws.String("i-abcdef12"), + Name: aws.String("image name"), + BlockDeviceMappings: []*ec2.BlockDeviceMapping{ + { + DeviceName: aws.String("/dev/sda1"), + NoDevice: aws.String(""), + }, + { + DeviceName: aws.String("/dev/sdb"), + NoDevice: aws.String(""), + }, + { + DeviceName: aws.String("/dev/sdc"), + NoDevice: aws.String(""), + }, + }, + } + resp, err := svc.CreateImage(opts) + if err != nil { + fmt.Println(err) + return + } + + fmt.Println("ID: ", resp.ImageId) +} diff --git a/go/example_code/ec2/create_instance.go b/go/example_code/ec2/create_instance.go index b1ca56e8eea..e8bee9802c6 100644 --- a/go/example_code/ec2/create_instance.go +++ b/go/example_code/ec2/create_instance.go @@ -1,76 +1,76 @@ -//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] -//snippet-sourceauthor:[Doug-AWS] -//snippet-sourcedescription:[Creates an Amazon EC2 instance with tags.] -//snippet-keyword:[Amazon Elastic Compute Cloud] -//snippet-keyword:[CreateTags function] -//snippet-keyword:[RunInstances function] -//snippet-keyword:[Go] -//snippet-service:[ec2] -//snippet-sourcetype:[full-example] -//snippet-sourcedate:[2018-11-08] -/* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This file is licensed under the Apache License, Version 2.0 (the "License"). - You may not use this file except in compliance with the License. A copy of - the License is located at - - http://aws.amazon.com/apache2.0/ - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. See the License for the - specific language governing permissions and limitations under the License. -*/ - -package main - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/ec2" - - "fmt" - "log" -) - -func main() { - sess, err := session.NewSession(&aws.Config{ - Region: aws.String("us-west-2")}, - ) - - // Create EC2 service client - svc := ec2.New(sess) - - // Specify the details of the instance that you want to create. - runResult, err := svc.RunInstances(&ec2.RunInstancesInput{ - // An Amazon Linux AMI ID for t2.micro instances in the us-west-2 region - ImageId: aws.String("ami-e7527ed7"), - InstanceType: aws.String("t2.micro"), - MinCount: aws.Int64(1), - MaxCount: aws.Int64(1), - }) - - if err != nil { - fmt.Println("Could not create instance", err) - return - } - - fmt.Println("Created instance", *runResult.Instances[0].InstanceId) - - // Add tags to the created instance - _, errtag := svc.CreateTags(&ec2.CreateTagsInput{ - Resources: []*string{runResult.Instances[0].InstanceId}, - Tags: []*ec2.Tag{ - { - Key: aws.String("Name"), - Value: aws.String("MyFirstInstance"), - }, - }, - }) - if errtag != nil { - log.Println("Could not create tags for instance", runResult.Instances[0].InstanceId, errtag) - return - } - - fmt.Println("Successfully tagged instance") +//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] +//snippet-sourceauthor:[Doug-AWS] +//snippet-sourcedescription:[Creates an Amazon EC2 instance with tags.] +//snippet-keyword:[Amazon Elastic Compute Cloud] +//snippet-keyword:[CreateTags function] +//snippet-keyword:[RunInstances function] +//snippet-keyword:[Go] +//snippet-service:[ec2] +//snippet-sourcetype:[full-example] +//snippet-sourcedate:[2018-11-08] +/* + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This file is licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. A copy of + the License is located at + + http://aws.amazon.com/apache2.0/ + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. +*/ + +package main + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" + + "fmt" + "log" +) + +func main() { + sess, err := session.NewSession(&aws.Config{ + Region: aws.String("us-west-2")}, + ) + + // Create EC2 service client + svc := ec2.New(sess) + + // Specify the details of the instance that you want to create. + runResult, err := svc.RunInstances(&ec2.RunInstancesInput{ + // An Amazon Linux AMI ID for t2.micro instances in the us-west-2 region + ImageId: aws.String("ami-e7527ed7"), + InstanceType: aws.String("t2.micro"), + MinCount: aws.Int64(1), + MaxCount: aws.Int64(1), + }) + + if err != nil { + fmt.Println("Could not create instance", err) + return + } + + fmt.Println("Created instance", *runResult.Instances[0].InstanceId) + + // Add tags to the created instance + _, errtag := svc.CreateTags(&ec2.CreateTagsInput{ + Resources: []*string{runResult.Instances[0].InstanceId}, + Tags: []*ec2.Tag{ + { + Key: aws.String("Name"), + Value: aws.String("MyFirstInstance"), + }, + }, + }) + if errtag != nil { + log.Println("Could not create tags for instance", runResult.Instances[0].InstanceId, errtag) + return + } + + fmt.Println("Successfully tagged instance") } \ No newline at end of file diff --git a/go/example_code/ec2/describing_instances.go b/go/example_code/ec2/describing_instances.go index 1bdde12c700..0e6b44a2aaf 100644 --- a/go/example_code/ec2/describing_instances.go +++ b/go/example_code/ec2/describing_instances.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/ec2_allocate_address.go b/go/example_code/ec2/ec2_allocate_address.go index 42ca4cea063..230644a9b84 100644 --- a/go/example_code/ec2/ec2_allocate_address.go +++ b/go/example_code/ec2/ec2_allocate_address.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/ec2_create_keypair.go b/go/example_code/ec2/ec2_create_keypair.go index 88bbcfe8172..61b43f38615 100644 --- a/go/example_code/ec2/ec2_create_keypair.go +++ b/go/example_code/ec2/ec2_create_keypair.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/ec2_create_security_group.go b/go/example_code/ec2/ec2_create_security_group.go index d9addc332eb..3dc83629fda 100644 --- a/go/example_code/ec2/ec2_create_security_group.go +++ b/go/example_code/ec2/ec2_create_security_group.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/ec2_delete_keypair.go b/go/example_code/ec2/ec2_delete_keypair.go index d64bc183703..2072284887a 100644 --- a/go/example_code/ec2/ec2_delete_keypair.go +++ b/go/example_code/ec2/ec2_delete_keypair.go @@ -1,75 +1,75 @@ -//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] -//snippet-sourceauthor:[Doug-AWS] -//snippet-sourcedescription:[Deletes an Amazon EC2 key pair.] -//snippet-keyword:[Amazon Elastic Compute Cloud] -//snippet-keyword:[DeleteKeyPair function] -//snippet-keyword:[Go] -//snippet-service:[ec2] -//snippet-sourcetype:[full-example] -//snippet-sourcedate:[2018-03-16] -/* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This file is licensed under the Apache License, Version 2.0 (the "License"). - You may not use this file except in compliance with the License. A copy of - the License is located at - - http://aws.amazon.com/apache2.0/ - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. See the License for the - specific language governing permissions and limitations under the License. -*/ - -package main - -import ( - "fmt" - "os" - "path/filepath" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/ec2" -) - -// Deletes a EC2 key pair for the name provided. No error will be returned -// if the key pair does not exist. -// -// Usage: -// go run ec2_delete_keypair.go KEY_PAIR_NAME -func main() { - if len(os.Args) != 2 { - exitErrorf("pair name required\nUsage: %s key_pair_name", - filepath.Base(os.Args[0])) - } - pairName := os.Args[1] - - // Initialize a session in us-west-2 that the SDK will use to load - // credentials from the shared credentials file ~/.aws/credentials. - sess, err := session.NewSession(&aws.Config{ - Region: aws.String("us-west-2")}, - ) - - // Create an EC2 service client. - svc := ec2.New(sess) - - // Delete the key pair by name - _, err = svc.DeleteKeyPair(&ec2.DeleteKeyPairInput{ - KeyName: aws.String(pairName), - }) - if err != nil { - if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "InvalidKeyPair.Duplicate" { - exitErrorf("Key pair %q does not exist.", pairName) - } - exitErrorf("Unable to delete key pair: %s, %v.", pairName, err) - } - - fmt.Printf("Successfully deleted %q key pair\n", pairName) -} - -func exitErrorf(msg string, args ...interface{}) { - fmt.Fprintf(os.Stderr, msg+"\n", args...) - os.Exit(1) -} +//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] +//snippet-sourceauthor:[Doug-AWS] +//snippet-sourcedescription:[Deletes an Amazon EC2 key pair.] +//snippet-keyword:[Amazon Elastic Compute Cloud] +//snippet-keyword:[DeleteKeyPair function] +//snippet-keyword:[Go] +//snippet-service:[ec2] +//snippet-sourcetype:[full-example] +//snippet-sourcedate:[2018-03-16] +/* + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This file is licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. A copy of + the License is located at + + http://aws.amazon.com/apache2.0/ + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. +*/ + +package main + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" +) + +// Deletes a EC2 key pair for the name provided. No error will be returned +// if the key pair does not exist. +// +// Usage: +// go run ec2_delete_keypair.go KEY_PAIR_NAME +func main() { + if len(os.Args) != 2 { + exitErrorf("pair name required\nUsage: %s key_pair_name", + filepath.Base(os.Args[0])) + } + pairName := os.Args[1] + + // Initialize a session in us-west-2 that the SDK will use to load + // credentials from the shared credentials file ~/.aws/credentials. + sess, err := session.NewSession(&aws.Config{ + Region: aws.String("us-west-2")}, + ) + + // Create an EC2 service client. + svc := ec2.New(sess) + + // Delete the key pair by name + _, err = svc.DeleteKeyPair(&ec2.DeleteKeyPairInput{ + KeyName: aws.String(pairName), + }) + if err != nil { + if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "InvalidKeyPair.Duplicate" { + exitErrorf("Key pair %q does not exist.", pairName) + } + exitErrorf("Unable to delete key pair: %s, %v.", pairName, err) + } + + fmt.Printf("Successfully deleted %q key pair\n", pairName) +} + +func exitErrorf(msg string, args ...interface{}) { + fmt.Fprintf(os.Stderr, msg+"\n", args...) + os.Exit(1) +} diff --git a/go/example_code/ec2/ec2_delete_security_group.go b/go/example_code/ec2/ec2_delete_security_group.go index 35038740d54..caed3c71d0d 100644 --- a/go/example_code/ec2/ec2_delete_security_group.go +++ b/go/example_code/ec2/ec2_delete_security_group.go @@ -1,79 +1,79 @@ -//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] -//snippet-sourceauthor:[Doug-AWS] -//snippet-sourcedescription:[Deletes an EC2 security group.] -//snippet-keyword:[Amazon Elastic Compute Cloud] -//snippet-keyword:[DeleteSecurityGroup function] -//snippet-keyword:[Go] -//snippet-service:[ec2] -//snippet-sourcetype:[full-example] -//snippet-sourcedate:[2018-03-16] -/* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This file is licensed under the Apache License, Version 2.0 (the "License"). - You may not use this file except in compliance with the License. A copy of - the License is located at - - http://aws.amazon.com/apache2.0/ - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. See the License for the - specific language governing permissions and limitations under the License. -*/ - -package main - -import ( - "fmt" - "os" - "path/filepath" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/ec2" -) - -// Deletes a security group by the ID passed in. -// -// Usage: -// go run ec2_delete_security_group.go group_id -func main() { - if len(os.Args) != 2 { - exitErrorf("Security Group ID required\nUsage: %s group_id", - filepath.Base(os.Args[0])) - } - groupID := os.Args[1] - - // Initialize a session in us-west-2 that the SDK will use to load - // credentials from the shared credentials file ~/.aws/credentials. - sess, err := session.NewSession(&aws.Config{ - Region: aws.String("us-west-2")}, - ) - - // Create an EC2 service client. - svc := ec2.New(sess) - - // Delete the security group. - _, err = svc.DeleteSecurityGroup(&ec2.DeleteSecurityGroupInput{ - GroupId: aws.String(groupID), - }) - if err != nil { - if aerr, ok := err.(awserr.Error); ok { - switch aerr.Code() { - case "InvalidGroupId.Malformed": - fallthrough - case "InvalidGroup.NotFound": - exitErrorf("%s.", aerr.Message()) - } - } - exitErrorf("Unable to get descriptions for security groups, %v.", err) - } - - fmt.Printf("Successfully delete security group %q.\n", groupID) -} - -func exitErrorf(msg string, args ...interface{}) { - fmt.Fprintf(os.Stderr, msg+"\n", args...) - os.Exit(1) -} +//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] +//snippet-sourceauthor:[Doug-AWS] +//snippet-sourcedescription:[Deletes an EC2 security group.] +//snippet-keyword:[Amazon Elastic Compute Cloud] +//snippet-keyword:[DeleteSecurityGroup function] +//snippet-keyword:[Go] +//snippet-service:[ec2] +//snippet-sourcetype:[full-example] +//snippet-sourcedate:[2018-03-16] +/* + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This file is licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. A copy of + the License is located at + + http://aws.amazon.com/apache2.0/ + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. +*/ + +package main + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" +) + +// Deletes a security group by the ID passed in. +// +// Usage: +// go run ec2_delete_security_group.go group_id +func main() { + if len(os.Args) != 2 { + exitErrorf("Security Group ID required\nUsage: %s group_id", + filepath.Base(os.Args[0])) + } + groupID := os.Args[1] + + // Initialize a session in us-west-2 that the SDK will use to load + // credentials from the shared credentials file ~/.aws/credentials. + sess, err := session.NewSession(&aws.Config{ + Region: aws.String("us-west-2")}, + ) + + // Create an EC2 service client. + svc := ec2.New(sess) + + // Delete the security group. + _, err = svc.DeleteSecurityGroup(&ec2.DeleteSecurityGroupInput{ + GroupId: aws.String(groupID), + }) + if err != nil { + if aerr, ok := err.(awserr.Error); ok { + switch aerr.Code() { + case "InvalidGroupId.Malformed": + fallthrough + case "InvalidGroup.NotFound": + exitErrorf("%s.", aerr.Message()) + } + } + exitErrorf("Unable to get descriptions for security groups, %v.", err) + } + + fmt.Printf("Successfully delete security group %q.\n", groupID) +} + +func exitErrorf(msg string, args ...interface{}) { + fmt.Fprintf(os.Stderr, msg+"\n", args...) + os.Exit(1) +} diff --git a/go/example_code/ec2/ec2_describe_addresses.go b/go/example_code/ec2/ec2_describe_addresses.go index 8c358545904..38602095111 100644 --- a/go/example_code/ec2/ec2_describe_addresses.go +++ b/go/example_code/ec2/ec2_describe_addresses.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/ec2_describe_keypairs.go b/go/example_code/ec2/ec2_describe_keypairs.go index e4ee51ec965..4df1a54b774 100644 --- a/go/example_code/ec2/ec2_describe_keypairs.go +++ b/go/example_code/ec2/ec2_describe_keypairs.go @@ -1,64 +1,64 @@ -//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] -//snippet-sourceauthor:[Doug-AWS] -//snippet-sourcedescription:[Describes your Amazon EC2 key pairs.] -//snippet-keyword:[Amazon Elastic Compute Cloud] -//snippet-keyword:[DescribeKeyPairs function] -//snippet-keyword:[Go] -//snippet-service:[ec2] -//snippet-sourcetype:[full-example] -//snippet-sourcedate:[2018-03-16] -/* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This file is licensed under the Apache License, Version 2.0 (the "License"). - You may not use this file except in compliance with the License. A copy of - the License is located at - - http://aws.amazon.com/apache2.0/ - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. See the License for the - specific language governing permissions and limitations under the License. -*/ - -package main - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/ec2" - - "fmt" - "os" -) - -// Returns a list of Key Pairs stored in EC2.. -// -// Usage: -// go run ec2_describe_keypairs.go -func main() { - // Initialize a session in us-west-2 that the SDK will use to load - // credentials from the shared credentials file ~/.aws/credentials. - sess, err := session.NewSession(&aws.Config{ - Region: aws.String("us-west-2")}, - ) - - // Create an EC2 service client. - svc := ec2.New(sess) - - // Returns a list of key pairs - result, err := svc.DescribeKeyPairs(nil) - if err != nil { - exitErrorf("Unable to get key pairs, %v", err) - } - - fmt.Println("Key Pairs:") - for _, pair := range result.KeyPairs { - fmt.Printf("%s: %s\n", *pair.KeyName, *pair.KeyFingerprint) - } -} - -func exitErrorf(msg string, args ...interface{}) { - fmt.Fprintf(os.Stderr, msg+"\n", args...) - os.Exit(1) -} +//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] +//snippet-sourceauthor:[Doug-AWS] +//snippet-sourcedescription:[Describes your Amazon EC2 key pairs.] +//snippet-keyword:[Amazon Elastic Compute Cloud] +//snippet-keyword:[DescribeKeyPairs function] +//snippet-keyword:[Go] +//snippet-service:[ec2] +//snippet-sourcetype:[full-example] +//snippet-sourcedate:[2018-03-16] +/* + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This file is licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. A copy of + the License is located at + + http://aws.amazon.com/apache2.0/ + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. +*/ + +package main + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" + + "fmt" + "os" +) + +// Returns a list of Key Pairs stored in EC2.. +// +// Usage: +// go run ec2_describe_keypairs.go +func main() { + // Initialize a session in us-west-2 that the SDK will use to load + // credentials from the shared credentials file ~/.aws/credentials. + sess, err := session.NewSession(&aws.Config{ + Region: aws.String("us-west-2")}, + ) + + // Create an EC2 service client. + svc := ec2.New(sess) + + // Returns a list of key pairs + result, err := svc.DescribeKeyPairs(nil) + if err != nil { + exitErrorf("Unable to get key pairs, %v", err) + } + + fmt.Println("Key Pairs:") + for _, pair := range result.KeyPairs { + fmt.Printf("%s: %s\n", *pair.KeyName, *pair.KeyFingerprint) + } +} + +func exitErrorf(msg string, args ...interface{}) { + fmt.Fprintf(os.Stderr, msg+"\n", args...) + os.Exit(1) +} diff --git a/go/example_code/ec2/ec2_describe_security_groups.go b/go/example_code/ec2/ec2_describe_security_groups.go index 851231e97a4..65bef10d0ca 100644 --- a/go/example_code/ec2/ec2_describe_security_groups.go +++ b/go/example_code/ec2/ec2_describe_security_groups.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/ec2_release_address.go b/go/example_code/ec2/ec2_release_address.go index 41dbb7724e2..d7b5d218def 100644 --- a/go/example_code/ec2/ec2_release_address.go +++ b/go/example_code/ec2/ec2_release_address.go @@ -1,76 +1,76 @@ -//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] -//snippet-sourceauthor:[Doug-AWS] -//snippet-sourcedescription:[Releases an Amazon EC2 instance IP address.] -//snippet-keyword:[Amazon Elastic Compute Cloud] -//snippet-keyword:[ReleaseAddress function] -//snippet-keyword:[Go] -//snippet-service:[ec2] -//snippet-sourcetype:[full-example] -//snippet-sourcedate:[2018-03-16] -/* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This file is licensed under the Apache License, Version 2.0 (the "License"). - You may not use this file except in compliance with the License. A copy of - the License is located at - - http://aws.amazon.com/apache2.0/ - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. See the License for the - specific language governing permissions and limitations under the License. -*/ - -package main - -import ( - "fmt" - "os" - "path/filepath" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/ec2" -) - -// Releases an Elastic IP address allocation ID. If the address is associated -// with a EC2 instance the association will be removed. -// -// Usage: -// go run ec2_release_address.go ALLOCATION_ID -func main() { - if len(os.Args) != 2 { - exitErrorf("allocation ID required\nUsage: %s allocation_id", - filepath.Base(os.Args[0])) - } - allocationID := os.Args[1] - - // Initialize a session in us-west-2 that the SDK will use to load - // credentials from the shared credentials file ~/.aws/credentials. - sess, err := session.NewSession(&aws.Config{ - Region: aws.String("us-west-2")}, - ) - - // Create an EC2 service client. - svc := ec2.New(sess) - - // Attempt to release the Elastic IP address. - _, err = svc.ReleaseAddress(&ec2.ReleaseAddressInput{ - AllocationId: aws.String(allocationID), - }) - if err != nil { - if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "InvalidAllocationID.NotFound" { - exitErrorf("Allocation ID %s does not exist", allocationID) - } - exitErrorf("Unable to release IP address for allocation %s, %v", - allocationID, err) - } - - fmt.Printf("Successfully released allocation ID %s\n", allocationID) -} - -func exitErrorf(msg string, args ...interface{}) { - fmt.Fprintf(os.Stderr, msg+"\n", args...) - os.Exit(1) -} +//snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] +//snippet-sourceauthor:[Doug-AWS] +//snippet-sourcedescription:[Releases an Amazon EC2 instance IP address.] +//snippet-keyword:[Amazon Elastic Compute Cloud] +//snippet-keyword:[ReleaseAddress function] +//snippet-keyword:[Go] +//snippet-service:[ec2] +//snippet-sourcetype:[full-example] +//snippet-sourcedate:[2018-03-16] +/* + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This file is licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. A copy of + the License is located at + + http://aws.amazon.com/apache2.0/ + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. +*/ + +package main + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" +) + +// Releases an Elastic IP address allocation ID. If the address is associated +// with a EC2 instance the association will be removed. +// +// Usage: +// go run ec2_release_address.go ALLOCATION_ID +func main() { + if len(os.Args) != 2 { + exitErrorf("allocation ID required\nUsage: %s allocation_id", + filepath.Base(os.Args[0])) + } + allocationID := os.Args[1] + + // Initialize a session in us-west-2 that the SDK will use to load + // credentials from the shared credentials file ~/.aws/credentials. + sess, err := session.NewSession(&aws.Config{ + Region: aws.String("us-west-2")}, + ) + + // Create an EC2 service client. + svc := ec2.New(sess) + + // Attempt to release the Elastic IP address. + _, err = svc.ReleaseAddress(&ec2.ReleaseAddressInput{ + AllocationId: aws.String(allocationID), + }) + if err != nil { + if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "InvalidAllocationID.NotFound" { + exitErrorf("Allocation ID %s does not exist", allocationID) + } + exitErrorf("Unable to release IP address for allocation %s, %v", + allocationID, err) + } + + fmt.Printf("Successfully released allocation ID %s\n", allocationID) +} + +func exitErrorf(msg string, args ...interface{}) { + fmt.Fprintf(os.Stderr, msg+"\n", args...) + os.Exit(1) +} diff --git a/go/example_code/ec2/get_console_output.go b/go/example_code/ec2/get_console_output.go index 8e1480e8398..8cbf074cd6b 100644 --- a/go/example_code/ec2/get_console_output.go +++ b/go/example_code/ec2/get_console_output.go @@ -1,61 +1,61 @@ -/* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This file is licensed under the Apache License, Version 2.0 (the "License"). - You may not use this file except in compliance with the License. A copy of - the License is located at - - http://aws.amazon.com/apache2.0/ - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - CONDITIONS OF ANY KIND, either express or implied. See the License for the - specific language governing permissions and limitations under the License. -*/ - -package main - -import ( - "encoding/base64" - "fmt" - "os" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/endpoints" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/ec2" -) - -func decodeOutputb64(encoded string) string { - decoded, err := base64.StdEncoding.DecodeString(encoded) - if err != nil { - fmt.Println("Error", err) - return "" - } - - return string(decoded) -} - -func main() { - // Create new EC2 service - ec2Svc := ec2.New(session.Must(session.NewSession(&aws.Config{ - Region: aws.String(endpoints.UsWest2RegionID), - }))) - - if len(os.Args) == 1 { - fmt.Printf("Usage %s \n", os.Args[0]) - os.Exit(1) - } - - instanceId := os.Args[1] - - // Call EC2 GetConsoleOutput API on the given instance according - // https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#EC2.GetConsoleOutput - - input := ec2.GetConsoleOutputInput{InstanceId: aws.String(instanceId)} - json, err := ec2Svc.GetConsoleOutput(&input) - if err != nil { - fmt.Println("Error", err) - } else { - fmt.Println(decodeOutputb64(*json.Output)) - } -} +/* + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This file is licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. A copy of + the License is located at + + http://aws.amazon.com/apache2.0/ + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. +*/ + +package main + +import ( + "encoding/base64" + "fmt" + "os" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/endpoints" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" +) + +func decodeOutputb64(encoded string) string { + decoded, err := base64.StdEncoding.DecodeString(encoded) + if err != nil { + fmt.Println("Error", err) + return "" + } + + return string(decoded) +} + +func main() { + // Create new EC2 service + ec2Svc := ec2.New(session.Must(session.NewSession(&aws.Config{ + Region: aws.String(endpoints.UsWest2RegionID), + }))) + + if len(os.Args) == 1 { + fmt.Printf("Usage %s \n", os.Args[0]) + os.Exit(1) + } + + instanceId := os.Args[1] + + // Call EC2 GetConsoleOutput API on the given instance according + // https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#EC2.GetConsoleOutput + + input := ec2.GetConsoleOutputInput{InstanceId: aws.String(instanceId)} + json, err := ec2Svc.GetConsoleOutput(&input) + if err != nil { + fmt.Println("Error", err) + } else { + fmt.Println(decodeOutputb64(*json.Output)) + } +} diff --git a/go/example_code/ec2/monitoring_instances.go b/go/example_code/ec2/monitoring_instances.go index 17d26e4abb1..9153b3dbe7c 100644 --- a/go/example_code/ec2/monitoring_instances.go +++ b/go/example_code/ec2/monitoring_instances.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/reboot_instances.go b/go/example_code/ec2/reboot_instances.go index b7d6f283aac..25969dc0d01 100644 --- a/go/example_code/ec2/reboot_instances.go +++ b/go/example_code/ec2/reboot_instances.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/regions_and_availability.go b/go/example_code/ec2/regions_and_availability.go index d72bff24e55..b54978977ee 100644 --- a/go/example_code/ec2/regions_and_availability.go +++ b/go/example_code/ec2/regions_and_availability.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ec2/start_stop_instances.go b/go/example_code/ec2/start_stop_instances.go index 7a6961b0875..8f55776c67d 100644 --- a/go/example_code/ec2/start_stop_instances.go +++ b/go/example_code/ec2/start_stop_instances.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/extending_sdk/addHeader.go b/go/example_code/extending_sdk/addHeader.go index 0d5ec4698dd..e5d8b0d9752 100644 --- a/go/example_code/extending_sdk/addHeader.go +++ b/go/example_code/extending_sdk/addHeader.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/extending_sdk/addTags.go b/go/example_code/extending_sdk/addTags.go index 071ad6bf86a..a1409c41257 100644 --- a/go/example_code/extending_sdk/addTags.go +++ b/go/example_code/extending_sdk/addTags.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/extending_sdk/ecs/update_deployment_with_setters.go b/go/example_code/extending_sdk/ecs/update_deployment_with_setters.go index a5fa6398c81..7ffea9d5384 100644 --- a/go/example_code/extending_sdk/ecs/update_deployment_with_setters.go +++ b/go/example_code/extending_sdk/ecs/update_deployment_with_setters.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[snippet] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/extending_sdk/handleServiceErrorCodes.go b/go/example_code/extending_sdk/handleServiceErrorCodes.go index cc48e968ca7..ceb007588b3 100644 --- a/go/example_code/extending_sdk/handleServiceErrorCodes.go +++ b/go/example_code/extending_sdk/handleServiceErrorCodes.go @@ -7,7 +7,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/extending_sdk/request_context.go b/go/example_code/extending_sdk/request_context.go index 34584b58dcf..1c0c835e383 100644 --- a/go/example_code/extending_sdk/request_context.go +++ b/go/example_code/extending_sdk/request_context.go @@ -7,7 +7,7 @@ //snippet-sourcetype:[snippet] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/glacier/create_vault.go b/go/example_code/glacier/create_vault.go index e3411a8b140..6442d307f78 100644 --- a/go/example_code/glacier/create_vault.go +++ b/go/example_code/glacier/create_vault.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/glacier/upload_archive.go b/go/example_code/glacier/upload_archive.go index ff8d362338f..670f350797b 100644 --- a/go/example_code/glacier/upload_archive.go +++ b/go/example_code/glacier/upload_archive.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/IamListAdmins.go b/go/example_code/iam/IamListAdmins.go index b18015b458f..cef3928e12a 100644 --- a/go/example_code/iam/IamListAdmins.go +++ b/go/example_code/iam/IamListAdmins.go @@ -11,7 +11,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_accesskeylastused.go b/go/example_code/iam/iam_accesskeylastused.go index 260a9d748ee..302c6cb2ea5 100644 --- a/go/example_code/iam/iam_accesskeylastused.go +++ b/go/example_code/iam/iam_accesskeylastused.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_attachuserpolicy.go b/go/example_code/iam/iam_attachuserpolicy.go index 1424c44ef5e..09b4a9283e7 100644 --- a/go/example_code/iam/iam_attachuserpolicy.go +++ b/go/example_code/iam/iam_attachuserpolicy.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_createaccesskey.go b/go/example_code/iam/iam_createaccesskey.go index 5f082670e52..7e76c9f7760 100644 --- a/go/example_code/iam/iam_createaccesskey.go +++ b/go/example_code/iam/iam_createaccesskey.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_createaccountalias.go b/go/example_code/iam/iam_createaccountalias.go index ce27bfb90b0..ca0c51f971c 100644 --- a/go/example_code/iam/iam_createaccountalias.go +++ b/go/example_code/iam/iam_createaccountalias.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_createpolicy.go b/go/example_code/iam/iam_createpolicy.go index 9d25ad8b98d..c6ef2f390f6 100644 --- a/go/example_code/iam/iam_createpolicy.go +++ b/go/example_code/iam/iam_createpolicy.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_createuser.go b/go/example_code/iam/iam_createuser.go index e3d1ffa78a0..b5569e27190 100644 --- a/go/example_code/iam/iam_createuser.go +++ b/go/example_code/iam/iam_createuser.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_deleteaccesskey.go b/go/example_code/iam/iam_deleteaccesskey.go index 494ddc91031..7383f20a683 100644 --- a/go/example_code/iam/iam_deleteaccesskey.go +++ b/go/example_code/iam/iam_deleteaccesskey.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_deleteaccountalias.go b/go/example_code/iam/iam_deleteaccountalias.go index 303f71fe461..53bfa3b8907 100644 --- a/go/example_code/iam/iam_deleteaccountalias.go +++ b/go/example_code/iam/iam_deleteaccountalias.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_deleteservercert.go b/go/example_code/iam/iam_deleteservercert.go index 1301762a3ff..b74a67ef59c 100644 --- a/go/example_code/iam/iam_deleteservercert.go +++ b/go/example_code/iam/iam_deleteservercert.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_deleteuser.go b/go/example_code/iam/iam_deleteuser.go index c57f2b05b0e..b6763acc072 100644 --- a/go/example_code/iam/iam_deleteuser.go +++ b/go/example_code/iam/iam_deleteuser.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_detachuserpolicy.go b/go/example_code/iam/iam_detachuserpolicy.go index 575765839e1..183469f052a 100644 --- a/go/example_code/iam/iam_detachuserpolicy.go +++ b/go/example_code/iam/iam_detachuserpolicy.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_getpolicy.go b/go/example_code/iam/iam_getpolicy.go index 8b7c1e0b61e..a59f04ad12e 100644 --- a/go/example_code/iam/iam_getpolicy.go +++ b/go/example_code/iam/iam_getpolicy.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_getpublickeys.go b/go/example_code/iam/iam_getpublickeys.go index 636a4a05c94..388193eb717 100644 --- a/go/example_code/iam/iam_getpublickeys.go +++ b/go/example_code/iam/iam_getpublickeys.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_getservercert.go b/go/example_code/iam/iam_getservercert.go index 1ba9bed2604..91d5ca78571 100644 --- a/go/example_code/iam/iam_getservercert.go +++ b/go/example_code/iam/iam_getservercert.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_listaccesskeys.go b/go/example_code/iam/iam_listaccesskeys.go index 54c43f83475..8ec63e8529c 100644 --- a/go/example_code/iam/iam_listaccesskeys.go +++ b/go/example_code/iam/iam_listaccesskeys.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_listaccountaliases.go b/go/example_code/iam/iam_listaccountaliases.go index 9e4c7d4c204..1f5b3955284 100644 --- a/go/example_code/iam/iam_listaccountaliases.go +++ b/go/example_code/iam/iam_listaccountaliases.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_listservercerts.go b/go/example_code/iam/iam_listservercerts.go index 017f976a9d7..8266c4237a5 100644 --- a/go/example_code/iam/iam_listservercerts.go +++ b/go/example_code/iam/iam_listservercerts.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_listusers.go b/go/example_code/iam/iam_listusers.go index f6feec40da0..d244fd2e56a 100644 --- a/go/example_code/iam/iam_listusers.go +++ b/go/example_code/iam/iam_listusers.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_updateaccesskey.go b/go/example_code/iam/iam_updateaccesskey.go index 35f5ccf667f..f88407be384 100644 --- a/go/example_code/iam/iam_updateaccesskey.go +++ b/go/example_code/iam/iam_updateaccesskey.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_updateservercert.go b/go/example_code/iam/iam_updateservercert.go index 23214c0f314..b5ea39e22ed 100644 --- a/go/example_code/iam/iam_updateservercert.go +++ b/go/example_code/iam/iam_updateservercert.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/iam/iam_updateuser.go b/go/example_code/iam/iam_updateuser.go index fc630ff9974..2281e9996fd 100644 --- a/go/example_code/iam/iam_updateuser.go +++ b/go/example_code/iam/iam_updateuser.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/kms/kms_create_key.go b/go/example_code/kms/kms_create_key.go index 7569df35a2b..3082f3a7eeb 100644 --- a/go/example_code/kms/kms_create_key.go +++ b/go/example_code/kms/kms_create_key.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/kms/kms_decrypt_data.go b/go/example_code/kms/kms_decrypt_data.go index 452d4199b36..803b6a4895e 100644 --- a/go/example_code/kms/kms_decrypt_data.go +++ b/go/example_code/kms/kms_decrypt_data.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/kms/kms_encrypt_data.go b/go/example_code/kms/kms_encrypt_data.go index 00faec37506..e5b3a5ddd93 100644 --- a/go/example_code/kms/kms_encrypt_data.go +++ b/go/example_code/kms/kms_encrypt_data.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/kms/kms_re_encrypt_data.go b/go/example_code/kms/kms_re_encrypt_data.go index 76fad2b0597..e737e710630 100644 --- a/go/example_code/kms/kms_re_encrypt_data.go +++ b/go/example_code/kms/kms_re_encrypt_data.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/lambda/aws-go-sdk-lambda-example-configure-function-for-notification.go b/go/example_code/lambda/aws-go-sdk-lambda-example-configure-function-for-notification.go index e9146d64a02..823f2c05604 100644 --- a/go/example_code/lambda/aws-go-sdk-lambda-example-configure-function-for-notification.go +++ b/go/example_code/lambda/aws-go-sdk-lambda-example-configure-function-for-notification.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/lambda/aws-go-sdk-lambda-example-create-function.go b/go/example_code/lambda/aws-go-sdk-lambda-example-create-function.go index 1246eff445c..22e08e55514 100644 --- a/go/example_code/lambda/aws-go-sdk-lambda-example-create-function.go +++ b/go/example_code/lambda/aws-go-sdk-lambda-example-create-function.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/lambda/aws-go-sdk-lambda-example-run-function.go b/go/example_code/lambda/aws-go-sdk-lambda-example-run-function.go index 05517232fb0..4e788a51b11 100644 --- a/go/example_code/lambda/aws-go-sdk-lambda-example-run-function.go +++ b/go/example_code/lambda/aws-go-sdk-lambda-example-run-function.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the diff --git a/go/example_code/lambda/aws-go-sdk-lambda-example-show-functions.go b/go/example_code/lambda/aws-go-sdk-lambda-example-show-functions.go index 67d9942b173..12a654da507 100644 --- a/go/example_code/lambda/aws-go-sdk-lambda-example-show-functions.go +++ b/go/example_code/lambda/aws-go-sdk-lambda-example-show-functions.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the diff --git a/go/example_code/polly/pollyDescribeVoices.go b/go/example_code/polly/pollyDescribeVoices.go index 2fe95cbbab7..440b6a453bf 100644 --- a/go/example_code/polly/pollyDescribeVoices.go +++ b/go/example_code/polly/pollyDescribeVoices.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/polly/pollyListLexicons.go b/go/example_code/polly/pollyListLexicons.go index 2da833cfb4b..8c23c867ffb 100644 --- a/go/example_code/polly/pollyListLexicons.go +++ b/go/example_code/polly/pollyListLexicons.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/polly/pollySynthesizeSpeech.go b/go/example_code/polly/pollySynthesizeSpeech.go index 643695966f6..135376f0b18 100644 --- a/go/example_code/polly/pollySynthesizeSpeech.go +++ b/go/example_code/polly/pollySynthesizeSpeech.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/create_new_bucket_and_object.go b/go/example_code/s3/create_new_bucket_and_object.go index 7ea14e6d725..e6e9e6191a4 100644 --- a/go/example_code/s3/create_new_bucket_and_object.go +++ b/go/example_code/s3/create_new_bucket_and_object.go @@ -11,7 +11,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/enforce_content_md5.go b/go/example_code/s3/enforce_content_md5.go index 6e03c8a966f..865bbd1049b 100644 --- a/go/example_code/s3/enforce_content_md5.go +++ b/go/example_code/s3/enforce_content_md5.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/generate_presigned_url.go b/go/example_code/s3/generate_presigned_url.go index e0cfff3dc14..146b8277ace 100644 --- a/go/example_code/s3/generate_presigned_url.go +++ b/go/example_code/s3/generate_presigned_url.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/generate_presigned_url_specific_payload.go b/go/example_code/s3/generate_presigned_url_specific_payload.go index 253b7a1107f..b216b180cd6 100644 --- a/go/example_code/s3/generate_presigned_url_specific_payload.go +++ b/go/example_code/s3/generate_presigned_url_specific_payload.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/list_all_buckets.go b/go/example_code/s3/list_all_buckets.go index 2589feebde1..35cf821d44a 100644 --- a/go/example_code/s3/list_all_buckets.go +++ b/go/example_code/s3/list_all_buckets.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/put_object_with_setters.go b/go/example_code/s3/put_object_with_setters.go index 84f4fde9b94..67755e6db6f 100644 --- a/go/example_code/s3/put_object_with_setters.go +++ b/go/example_code/s3/put_object_with_setters.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_copy_object.go b/go/example_code/s3/s3_copy_object.go index b98aa37aff2..333929c028b 100644 --- a/go/example_code/s3/s3_copy_object.go +++ b/go/example_code/s3/s3_copy_object.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_create_bucket.go b/go/example_code/s3/s3_create_bucket.go index 4bd77de14ee..37bd69175a3 100644 --- a/go/example_code/s3/s3_create_bucket.go +++ b/go/example_code/s3/s3_create_bucket.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_delete_bucket.go b/go/example_code/s3/s3_delete_bucket.go index 4721b2f613f..25968f850d1 100644 --- a/go/example_code/s3/s3_delete_bucket.go +++ b/go/example_code/s3/s3_delete_bucket.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_delete_bucket_policy.go b/go/example_code/s3/s3_delete_bucket_policy.go index da37fd3e2d1..2a7047ea4b5 100644 --- a/go/example_code/s3/s3_delete_bucket_policy.go +++ b/go/example_code/s3/s3_delete_bucket_policy.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_delete_bucket_website.go b/go/example_code/s3/s3_delete_bucket_website.go index b94d159c05f..209e72807af 100644 --- a/go/example_code/s3/s3_delete_bucket_website.go +++ b/go/example_code/s3/s3_delete_bucket_website.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_delete_object.go b/go/example_code/s3/s3_delete_object.go index 3f1ec5ebd86..6f550927221 100644 --- a/go/example_code/s3/s3_delete_object.go +++ b/go/example_code/s3/s3_delete_object.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_delete_objects.go b/go/example_code/s3/s3_delete_objects.go index e13838ce527..df536f384cc 100644 --- a/go/example_code/s3/s3_delete_objects.go +++ b/go/example_code/s3/s3_delete_objects.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_download_object.go b/go/example_code/s3/s3_download_object.go index 5dc932d8390..eb27451dd9b 100644 --- a/go/example_code/s3/s3_download_object.go +++ b/go/example_code/s3/s3_download_object.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_encrypt_on_server_with_kms.go b/go/example_code/s3/s3_encrypt_on_server_with_kms.go index ef6709dc825..fdb4a13bbfe 100644 --- a/go/example_code/s3/s3_encrypt_on_server_with_kms.go +++ b/go/example_code/s3/s3_encrypt_on_server_with_kms.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_get_bucket_acl.go b/go/example_code/s3/s3_get_bucket_acl.go index b293ab245a6..fadcdcd9a44 100644 --- a/go/example_code/s3/s3_get_bucket_acl.go +++ b/go/example_code/s3/s3_get_bucket_acl.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_get_bucket_object_acl.go b/go/example_code/s3/s3_get_bucket_object_acl.go index a8c5461fd0f..a5634a99ebf 100644 --- a/go/example_code/s3/s3_get_bucket_object_acl.go +++ b/go/example_code/s3/s3_get_bucket_object_acl.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_get_bucket_policy.go b/go/example_code/s3/s3_get_bucket_policy.go index ea7c3a75d9a..953094617b0 100644 --- a/go/example_code/s3/s3_get_bucket_policy.go +++ b/go/example_code/s3/s3_get_bucket_policy.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_get_bucket_website.go b/go/example_code/s3/s3_get_bucket_website.go index de88ecb8510..c8b207917d3 100644 --- a/go/example_code/s3/s3_get_bucket_website.go +++ b/go/example_code/s3/s3_get_bucket_website.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_list_buckets.go b/go/example_code/s3/s3_list_buckets.go index 5bfa4139450..487c1df03b7 100644 --- a/go/example_code/s3/s3_list_buckets.go +++ b/go/example_code/s3/s3_list_buckets.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_list_objects.go b/go/example_code/s3/s3_list_objects.go index f0409cd042b..f0d05679c5b 100644 --- a/go/example_code/s3/s3_list_objects.go +++ b/go/example_code/s3/s3_list_objects.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_make_bucket_public.go b/go/example_code/s3/s3_make_bucket_public.go index 6d76c3a6e29..64aad77fb6d 100644 --- a/go/example_code/s3/s3_make_bucket_public.go +++ b/go/example_code/s3/s3_make_bucket_public.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_put_bucket_acl.go b/go/example_code/s3/s3_put_bucket_acl.go index 4fc46517d4a..0ac400d792a 100644 --- a/go/example_code/s3/s3_put_bucket_acl.go +++ b/go/example_code/s3/s3_put_bucket_acl.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_put_bucket_object_acl.go b/go/example_code/s3/s3_put_bucket_object_acl.go index d7553f384c2..1006a8ba844 100644 --- a/go/example_code/s3/s3_put_bucket_object_acl.go +++ b/go/example_code/s3/s3_put_bucket_object_acl.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_require_server_encryption.go b/go/example_code/s3/s3_require_server_encryption.go index 6b42f013d67..deaf9ec6263 100644 --- a/go/example_code/s3/s3_require_server_encryption.go +++ b/go/example_code/s3/s3_require_server_encryption.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_restore_object.go b/go/example_code/s3/s3_restore_object.go index b552f534326..91d896efb9d 100644 --- a/go/example_code/s3/s3_restore_object.go +++ b/go/example_code/s3/s3_restore_object.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_set_bucket_policy.go b/go/example_code/s3/s3_set_bucket_policy.go index bce0516b688..2df84196923 100644 --- a/go/example_code/s3/s3_set_bucket_policy.go +++ b/go/example_code/s3/s3_set_bucket_policy.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_set_bucket_website.go b/go/example_code/s3/s3_set_bucket_website.go index f4130cac878..e760a84cadf 100644 --- a/go/example_code/s3/s3_set_bucket_website.go +++ b/go/example_code/s3/s3_set_bucket_website.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_set_cors.go b/go/example_code/s3/s3_set_cors.go index 7744143b4ae..0b2a460405f 100644 --- a/go/example_code/s3/s3_set_cors.go +++ b/go/example_code/s3/s3_set_cors.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_set_default_encryption.go b/go/example_code/s3/s3_set_default_encryption.go index 11b8f520c73..0559b457c0a 100644 --- a/go/example_code/s3/s3_set_default_encryption.go +++ b/go/example_code/s3/s3_set_default_encryption.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/s3_upload_directory.go b/go/example_code/s3/s3_upload_directory.go index eb84031ca12..897ccf273a0 100644 --- a/go/example_code/s3/s3_upload_directory.go +++ b/go/example_code/s3/s3_upload_directory.go @@ -1,107 +1,107 @@ -package main - -import ( - "fmt" - "os" - "path/filepath" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3/s3manager" -) - -const exitError = 1 - -func main() { - if len(os.Args) != 4 { - exitErrorf("region, bucket and directory path required\nUsage: %s region bucket_name path", - os.Args[0]) - } - - region := os.Args[1] - bucket := os.Args[2] - path := os.Args[3] - di := NewDirectoryIterator(bucket, path) - - sess, err := session.NewSession(&aws.Config{ - Region: aws.String(region)}, - ) - if err != nil { - exitErrorf("failed to create a session %q, %v", err) - } - - uploader := s3manager.NewUploader(sess) - - if err := uploader.UploadWithIterator(aws.BackgroundContext(), di); err != nil { - exitErrorf("failed to upload %q, %v", err) - } - fmt.Printf("successfully uploaded %q to %q", path, bucket) -} - -// DirectoryIterator represents an iterator of a specified directory -type DirectoryIterator struct { - filePaths []string - bucket string - next struct { - path string - f *os.File - } - err error -} - -// NewDirectoryIterator builds a new DirectoryIterator -func NewDirectoryIterator(bucket, dir string) s3manager.BatchUploadIterator { - var paths []string - filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - if !info.IsDir() { - paths = append(paths, path) - } - return nil - }) - - return &DirectoryIterator{ - filePaths: paths, - bucket: bucket, - } -} - -// Next returns whether next file exists or not -func (di *DirectoryIterator) Next() bool { - if len(di.filePaths) == 0 { - di.next.f = nil - return false - } - - f, err := os.Open(di.filePaths[0]) - di.err = err - di.next.f = f - di.next.path = di.filePaths[0] - di.filePaths = di.filePaths[1:] - - return true && di.Err() == nil -} - -// Err returns error of DirectoryIterator -func (di *DirectoryIterator) Err() error { - return di.err -} - -// UploadObject uploads a file -func (di *DirectoryIterator) UploadObject() s3manager.BatchUploadObject { - f := di.next.f - return s3manager.BatchUploadObject{ - Object: &s3manager.UploadInput{ - Bucket: &di.bucket, - Key: &di.next.path, - Body: f, - }, - After: func() error { - return f.Close() - }, - } -} - -func exitErrorf(msg string, args ...interface{}) { - fmt.Fprintf(os.Stderr, msg+"\n", args...) - os.Exit(exitError) -} +package main + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/s3/s3manager" +) + +const exitError = 1 + +func main() { + if len(os.Args) != 4 { + exitErrorf("region, bucket and directory path required\nUsage: %s region bucket_name path", + os.Args[0]) + } + + region := os.Args[1] + bucket := os.Args[2] + path := os.Args[3] + di := NewDirectoryIterator(bucket, path) + + sess, err := session.NewSession(&aws.Config{ + Region: aws.String(region)}, + ) + if err != nil { + exitErrorf("failed to create a session %q, %v", err) + } + + uploader := s3manager.NewUploader(sess) + + if err := uploader.UploadWithIterator(aws.BackgroundContext(), di); err != nil { + exitErrorf("failed to upload %q, %v", err) + } + fmt.Printf("successfully uploaded %q to %q", path, bucket) +} + +// DirectoryIterator represents an iterator of a specified directory +type DirectoryIterator struct { + filePaths []string + bucket string + next struct { + path string + f *os.File + } + err error +} + +// NewDirectoryIterator builds a new DirectoryIterator +func NewDirectoryIterator(bucket, dir string) s3manager.BatchUploadIterator { + var paths []string + filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { + if !info.IsDir() { + paths = append(paths, path) + } + return nil + }) + + return &DirectoryIterator{ + filePaths: paths, + bucket: bucket, + } +} + +// Next returns whether next file exists or not +func (di *DirectoryIterator) Next() bool { + if len(di.filePaths) == 0 { + di.next.f = nil + return false + } + + f, err := os.Open(di.filePaths[0]) + di.err = err + di.next.f = f + di.next.path = di.filePaths[0] + di.filePaths = di.filePaths[1:] + + return true && di.Err() == nil +} + +// Err returns error of DirectoryIterator +func (di *DirectoryIterator) Err() error { + return di.err +} + +// UploadObject uploads a file +func (di *DirectoryIterator) UploadObject() s3manager.BatchUploadObject { + f := di.next.f + return s3manager.BatchUploadObject{ + Object: &s3manager.UploadInput{ + Bucket: &di.bucket, + Key: &di.next.path, + Body: f, + }, + After: func() error { + return f.Close() + }, + } +} + +func exitErrorf(msg string, args ...interface{}) { + fmt.Fprintf(os.Stderr, msg+"\n", args...) + os.Exit(exitError) +} diff --git a/go/example_code/s3/s3_upload_object.go b/go/example_code/s3/s3_upload_object.go index ac1ae0de008..fc89640cac2 100644 --- a/go/example_code/s3/s3_upload_object.go +++ b/go/example_code/s3/s3_upload_object.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/s3/upload_arbitrary_sized_stream.go b/go/example_code/s3/upload_arbitrary_sized_stream.go index c5c1048144a..e83de891671 100644 --- a/go/example_code/s3/upload_arbitrary_sized_stream.go +++ b/go/example_code/s3/upload_arbitrary_sized_stream.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ses/ses_delete_address.go b/go/example_code/ses/ses_delete_address.go index 7d1568d0c12..5604640f98d 100644 --- a/go/example_code/ses/ses_delete_address.go +++ b/go/example_code/ses/ses_delete_address.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ses/ses_get_statistics.go b/go/example_code/ses/ses_get_statistics.go index 819945de16e..9bf655c1721 100644 --- a/go/example_code/ses/ses_get_statistics.go +++ b/go/example_code/ses/ses_get_statistics.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ses/ses_list_emails.go b/go/example_code/ses/ses_list_emails.go index 9d49a351426..87a23411ca1 100644 --- a/go/example_code/ses/ses_list_emails.go +++ b/go/example_code/ses/ses_list_emails.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ses/ses_send_email.go b/go/example_code/ses/ses_send_email.go index 1366ad30f09..41265adff01 100644 --- a/go/example_code/ses/ses_send_email.go +++ b/go/example_code/ses/ses_send_email.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/ses/ses_send_verification.go b/go/example_code/ses/ses_send_verification.go index 371fd8e88c6..ddeaa14223b 100644 --- a/go/example_code/ses/ses_send_verification.go +++ b/go/example_code/ses/ses_send_verification.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_changingvisibility.go b/go/example_code/sqs/sqs_changingvisibility.go index f5d50f04e12..99c58bd4e33 100644 --- a/go/example_code/sqs/sqs_changingvisibility.go +++ b/go/example_code/sqs/sqs_changingvisibility.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_createqueues.go b/go/example_code/sqs/sqs_createqueues.go index 631836210db..08685f65539 100644 --- a/go/example_code/sqs/sqs_createqueues.go +++ b/go/example_code/sqs/sqs_createqueues.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_deadletterqueue.go b/go/example_code/sqs/sqs_deadletterqueue.go index de5808b2e60..d4cf78d00e1 100644 --- a/go/example_code/sqs/sqs_deadletterqueue.go +++ b/go/example_code/sqs/sqs_deadletterqueue.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_deletemessage.go b/go/example_code/sqs/sqs_deletemessage.go index 7e37f809c06..313d531c7b1 100644 --- a/go/example_code/sqs/sqs_deletemessage.go +++ b/go/example_code/sqs/sqs_deletemessage.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_deletequeue.go b/go/example_code/sqs/sqs_deletequeue.go index a41bb9b9d0a..16f67abceac 100644 --- a/go/example_code/sqs/sqs_deletequeue.go +++ b/go/example_code/sqs/sqs_deletequeue.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_getqueueurl.go b/go/example_code/sqs/sqs_getqueueurl.go index c006eede0b1..a79acb899a8 100644 --- a/go/example_code/sqs/sqs_getqueueurl.go +++ b/go/example_code/sqs/sqs_getqueueurl.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_listqueues.go b/go/example_code/sqs/sqs_listqueues.go index 216649b858f..a6f5b785e4b 100644 --- a/go/example_code/sqs/sqs_listqueues.go +++ b/go/example_code/sqs/sqs_listqueues.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_longpolling_create_queue.go b/go/example_code/sqs/sqs_longpolling_create_queue.go index 65ab4f767a5..ea3a98d8103 100644 --- a/go/example_code/sqs/sqs_longpolling_create_queue.go +++ b/go/example_code/sqs/sqs_longpolling_create_queue.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_longpolling_existing_queue.go b/go/example_code/sqs/sqs_longpolling_existing_queue.go index 489c0f99aed..effe13fbbdb 100644 --- a/go/example_code/sqs/sqs_longpolling_existing_queue.go +++ b/go/example_code/sqs/sqs_longpolling_existing_queue.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_longpolling_receive_message.go b/go/example_code/sqs/sqs_longpolling_receive_message.go index df5ffcd46b0..5da440fa9fb 100644 --- a/go/example_code/sqs/sqs_longpolling_receive_message.go +++ b/go/example_code/sqs/sqs_longpolling_receive_message.go @@ -10,7 +10,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/sqs/sqs_sendmessage.go b/go/example_code/sqs/sqs_sendmessage.go index 4822a574812..943953e80ef 100644 --- a/go/example_code/sqs/sqs_sendmessage.go +++ b/go/example_code/sqs/sqs_sendmessage.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/workdocs/wd_list_user_docs.go b/go/example_code/workdocs/wd_list_user_docs.go index 67ab5523de9..c38f92f1ab7 100644 --- a/go/example_code/workdocs/wd_list_user_docs.go +++ b/go/example_code/workdocs/wd_list_user_docs.go @@ -9,7 +9,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/go/example_code/workdocs/wd_list_users.go b/go/example_code/workdocs/wd_list_users.go index 354a7b8804f..ed5443fc7e1 100644 --- a/go/example_code/workdocs/wd_list_users.go +++ b/go/example_code/workdocs/wd_list_users.go @@ -8,7 +8,7 @@ //snippet-sourcetype:[full-example] //snippet-sourcedate:[2018-03-16] /* - Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of diff --git a/java/README.rst b/java/README.rst index 265eccbd7f0..666d5be283c 100644 --- a/java/README.rst +++ b/java/README.rst @@ -1,114 +1,114 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 - International License (the "License"). You may not use this file except in compliance with the - License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions and - limitations under the License. - -####################################### -AWS SDK for Java Documentation Examples -####################################### - -These are examples for the `AWS SDK for Java public documentation `_. - -Prerequisites -============= - -To build and run these examples, you'll need: - -* `Apache Maven `_ (>3.0) -* `AWS SDK for Java `_ (downloaded and extracted somewhere on - your machine) -* AWS credentials, either configured in a local AWS credentials file or by setting the - ``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY`` environment variables. -* You should also set the *AWS region* within which the operations will be performed. If a region is - not set, the default region used will be ``us-east-1``. - -For information about how to set AWS credentials and the region for use with the AWS SDK for Java, -see `Set up AWS Credentials and Region for Development -`_ in the *AWS -Java Developer Guide*. - -Building the examples -===================== - -The examples are divided into directories by AWS service (``s3``, ``dynamodb``, and so on). Within -each, you'll find a ``pom.xml`` file used for building the examples with Maven, and a ``Makefile`` -that wraps the Maven commands for those of you who also have ``make`` installed. - -To build, open a command-line (terminal) window and change to the directory containing the examples -you want to build/run. Then type:: - - mvn package - -or, if you have ``make``, you can simply type:: - - make - -to begin the build process. Maven will download any dependencies (such as components of the AWS SDK -for Java) that it needs for building. - -Once the examples have been built, you can run them to see them in action. - -.. note:: If you are running on a platform with ``make``, you can also use the provided Makefiles to - build the examples, by running ``make`` in any directory with a ``Makefile`` present. You must - still have Maven installed, however (the Makefile wraps Maven commands). - - -Running the examples -==================== - -**IMPORTANT** - - The examples perform AWS operations for the account and region for which you've specified - credentials, and you may incur AWS service charges by running them. Please visit the `AWS Pricing - `_ page 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 an - Amazon S3 bucket or an Amazon DynamoDB table. **Be very careful** when running an operation that - may delete or modify AWS resources in your account. It's best to create separate test-only - resources when experimenting with these examples. - -To run these examples, you'll need the AWS SDK for Java libraries in your ``CLASSPATH``:: - - On Unix, run open the command line and execute: - export CLASSPATH="/path/to/aws-java-sdk/lib/*:/path/to/aws-java-sdk/third-party/lib/*:$CLASSPATH" - - On Windows, open cmd and execute: - set CLASSPATH="path/to/aws-java-sdk/lib/*;path/to/aws-java-sdk/third-party/lib/*;%CLASSPATH%" - -Where ``/path/to/aws-java-sdk`` is the path to where you extracted the AWS Java SDK download (it -contains the ``lib`` and ``third-party/lib`` directories). For example, the path can be -``/tmp/aws-java-sdk``, or ``C:\aws-java-sdk``. - -Once you set the ``CLASSPATH``, you can run a particular example like this:: - - java aws.example.s3.ListBuckets -cp target/s3examples-1.0.jar:$CLASSPATH - -For systems with bash support ------------------------------ - -As an alternative to setting the ``CLASSPATH`` and specifying the full namespace of the class to -run, we've included a ``bash`` script, ``run_example.sh``, that you can use on Linux, Unix or OS X -(or on Windows by using `Cygwin `_, `MingW `_, or -`Bash on Ubuntu on Windows `_). - -To use the script, set the path to the Java SDK directory in the ``JAVA_SDK_HOME`` environment -variable. For example:: - - export JAVA_SDK_HOME=/path/to/aws-java-sdk - -Once you've set the variable, you can execute ``run_example.sh`` as shown:: - - ./run_example.sh ListBuckets - -This will run the `ListBuckets `_ -example (assuming that you've built the examples first!). - -.. _maven: https://maven.apache.org/ -.. _javasdk: https://aws.amazon.com/sdk-for-java/ -.. _javasdk-docs: http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/ +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +####################################### +AWS SDK for Java Documentation Examples +####################################### + +These are examples for the `AWS SDK for Java public documentation `_. + +Prerequisites +============= + +To build and run these examples, you'll need: + +* `Apache Maven `_ (>3.0) +* `AWS SDK for Java `_ (downloaded and extracted somewhere on + your machine) +* AWS credentials, either configured in a local AWS credentials file or by setting the + ``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY`` environment variables. +* You should also set the *AWS region* within which the operations will be performed. If a region is + not set, the default region used will be ``us-east-1``. + +For information about how to set AWS credentials and the region for use with the AWS SDK for Java, +see `Set up AWS Credentials and Region for Development +`_ in the *AWS +Java Developer Guide*. + +Building the examples +===================== + +The examples are divided into directories by AWS service (``s3``, ``dynamodb``, and so on). Within +each, you'll find a ``pom.xml`` file used for building the examples with Maven, and a ``Makefile`` +that wraps the Maven commands for those of you who also have ``make`` installed. + +To build, open a command-line (terminal) window and change to the directory containing the examples +you want to build/run. Then type:: + + mvn package + +or, if you have ``make``, you can simply type:: + + make + +to begin the build process. Maven will download any dependencies (such as components of the AWS SDK +for Java) that it needs for building. + +Once the examples have been built, you can run them to see them in action. + +.. note:: If you are running on a platform with ``make``, you can also use the provided Makefiles to + build the examples, by running ``make`` in any directory with a ``Makefile`` present. You must + still have Maven installed, however (the Makefile wraps Maven commands). + + +Running the examples +==================== + +**IMPORTANT** + + The examples perform AWS operations for the account and region for which you've specified + credentials, and you may incur AWS service charges by running them. Please visit the `AWS Pricing + `_ page 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 an + Amazon S3 bucket or an Amazon DynamoDB table. **Be very careful** when running an operation that + may delete or modify AWS resources in your account. It's best to create separate test-only + resources when experimenting with these examples. + +To run these examples, you'll need the AWS SDK for Java libraries in your ``CLASSPATH``:: + + On Unix, run open the command line and execute: + export CLASSPATH="/path/to/aws-java-sdk/lib/*:/path/to/aws-java-sdk/third-party/lib/*:$CLASSPATH" + + On Windows, open cmd and execute: + set CLASSPATH="path/to/aws-java-sdk/lib/*;path/to/aws-java-sdk/third-party/lib/*;%CLASSPATH%" + +Where ``/path/to/aws-java-sdk`` is the path to where you extracted the AWS Java SDK download (it +contains the ``lib`` and ``third-party/lib`` directories). For example, the path can be +``/tmp/aws-java-sdk``, or ``C:\aws-java-sdk``. + +Once you set the ``CLASSPATH``, you can run a particular example like this:: + + java aws.example.s3.ListBuckets -cp target/s3examples-1.0.jar:$CLASSPATH + +For systems with bash support +----------------------------- + +As an alternative to setting the ``CLASSPATH`` and specifying the full namespace of the class to +run, we've included a ``bash`` script, ``run_example.sh``, that you can use on Linux, Unix or OS X +(or on Windows by using `Cygwin `_, `MingW `_, or +`Bash on Ubuntu on Windows `_). + +To use the script, set the path to the Java SDK directory in the ``JAVA_SDK_HOME`` environment +variable. For example:: + + export JAVA_SDK_HOME=/path/to/aws-java-sdk + +Once you've set the variable, you can execute ``run_example.sh`` as shown:: + + ./run_example.sh ListBuckets + +This will run the `ListBuckets `_ +example (assuming that you've built the examples first!). + +.. _maven: https://maven.apache.org/ +.. _javasdk: https://aws.amazon.com/sdk-for-java/ +.. _javasdk-docs: http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/ diff --git a/javascript/README.rst b/javascript/README.rst index 29739de0290..8f8c798221e 100644 --- a/javascript/README.rst +++ b/javascript/README.rst @@ -1,50 +1,50 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 - International License (the "License"). You may not use this file except in compliance with the - License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions and - limitations under the License. - -############################### -AWS SDK for JavaScript examples -############################### - -These are examples for the AWS SDK for JavaScript public documentation. - -Prerequisites -============= - -To build and run these examples, you'll need: - -- Node.js -- AWS SDK for JavaScript downloaded and extracted somewhere on your machine -- AWS credentials in a shared credentials file - -Running the examples -==================== - -Examples are written for either execution in a browser script or in Node.js, usually depending on the use case for each. The two scenarios typically differ in how you supply credentials to the code. These differences are described in the Developer Guide at `https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials.html `_ - -To run the examples, you'll need to create a shared credentials file. For more information about how to set up a shared credentials file, -see `Loading Credentials in Node.js from the Shared Credentials File `_ -in the *AWS SDK for JavaScript Developer Guide*. - -The Node.js examples are all run from the command line. - -SDK Downloads -============= - -You can download minified and non-minified distributable versions of the current AWS SDK for JavaScript at: - -`https://github.com/aws/aws-sdk-js/tree/master/dist `_ - -Documentation -============= - -You can find detailed documentation for the AWS SDK for JavaScript at: - -- `AWS SDK for JavaScript Developer Guide `_ -- `AWS SDK for JavaScript API Reference `_ +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +############################### +AWS SDK for JavaScript examples +############################### + +These are examples for the AWS SDK for JavaScript public documentation. + +Prerequisites +============= + +To build and run these examples, you'll need: + +- Node.js +- AWS SDK for JavaScript downloaded and extracted somewhere on your machine +- AWS credentials in a shared credentials file + +Running the examples +==================== + +Examples are written for either execution in a browser script or in Node.js, usually depending on the use case for each. The two scenarios typically differ in how you supply credentials to the code. These differences are described in the Developer Guide at `https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials.html `_ + +To run the examples, you'll need to create a shared credentials file. For more information about how to set up a shared credentials file, +see `Loading Credentials in Node.js from the Shared Credentials File `_ +in the *AWS SDK for JavaScript Developer Guide*. + +The Node.js examples are all run from the command line. + +SDK Downloads +============= + +You can download minified and non-minified distributable versions of the current AWS SDK for JavaScript at: + +`https://github.com/aws/aws-sdk-js/tree/master/dist `_ + +Documentation +============= + +You can find detailed documentation for the AWS SDK for JavaScript at: + +- `AWS SDK for JavaScript Developer Guide `_ +- `AWS SDK for JavaScript API Reference `_ diff --git a/javav2/README.rst b/javav2/README.rst index adbefc3b688..c31b2a0c35d 100644 --- a/javav2/README.rst +++ b/javav2/README.rst @@ -1,108 +1,108 @@ -.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 - International License (the "License"). You may not use this file except in compliance with the - License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions and - limitations under the License. - -########################################### -AWS SDK for Java 2.0 Documentation Examples -########################################### - -These are examples for the `AWS SDK for Java public documentation `_. - -Prerequisites -============= - -To build and run these examples, you'll need: - -* `Apache Maven `_ (>3.0) -* `AWS SDK for Java `_ (downloaded and extracted somewhere on - your machine) -* AWS credentials, either configured in a local AWS credentials file or by setting the - ``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY`` environment variables. -* You should also set the *AWS region* within which the operations will be performed. If a region is - not set, the default region used will be ``us-east-1``. - -For information about how to set AWS credentials and the region for use with the AWS SDK for Java, -see `Set up AWS Credentials and Region for Development -`_ in the *AWS -Java Developer Guide*. - -Building the examples -===================== - -The examples are divided into directories by AWS service (``s3``, ``sqs``, and so on). Within -each, you'll find a ``pom.xml`` file used for building the examples with Maven, and a ``Makefile`` -that wraps the Maven commands for those of you who also have ``make`` installed. - -To build, open a command-line (terminal) window and change to the directory containing the examples -you want to build/run. Then type:: - - mvn package - -or, if you have ``make``, you can simply type:: - - make - -to begin the build process. Maven will download any dependencies (such as components of the AWS SDK -for Java) that it needs for building. - -Once the examples have been built, you can run them to see them in action. - -.. note:: If you are running on a platform with ``make``, you can also use the provided Makefiles to - build the examples, by running ``make`` in any directory with a ``Makefile`` present. You must - still have Maven installed, however (the Makefile wraps Maven commands). - - -Running the examples -==================== - -**IMPORTANT** - - The examples perform AWS operations for the account and region for which you've specified - credentials, and you may incur AWS service charges by running them. Please visit the `AWS Pricing - `_ page 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 an - Amazon S3 bucket or an Amazon DynamoDB table. **Be very careful** when running an operation that - may delete or modify AWS resources in your account. It's best to create separate test-only - resources when experimenting with these examples. - -To run these examples, you'll need the AWS SDK for Java libraries in your ``CLASSPATH``:: - - export CLASSPATH=target/sdk-s3-examples-1.0.jar:/path/to/aws-java-sdk/.jar - -Where ``/path/to/aws-java-sdk/.jar`` is the path to where you extracted -or built the AWS Java SDK jar. - -Once you set the ``CLASSPATH``, you can run a particular example like this:: - - java com.example.s3.S3BucketOps - -For systems with bash support ------------------------------ - -As an alternative to setting the ``CLASSPATH`` and specifying the full namespace of the class to -run, we've included a ``bash`` script, ``run_example.sh``, that you can use on Linux, Unix or OS X -(or on Windows by using `Cygwin `_, `MingW `_, or -`Bash on Ubuntu on Windows `_). - -You can execute ``run_example.sh`` as shown:: - - ./run_example.sh S3BucketOps - -This will run the `S3BucketOps `_ -example (assuming that you've built the examples first!). - -If the example requires arguments, pass the argument list in quotes:: - - ./run_example.sh S3BucketOps " " - -.. _maven: https://maven.apache.org/ -.. _javasdk: https://aws.amazon.com/sdk-for-java/ -.. _javasdk-docs: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/ +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +########################################### +AWS SDK for Java 2.0 Documentation Examples +########################################### + +These are examples for the `AWS SDK for Java public documentation `_. + +Prerequisites +============= + +To build and run these examples, you'll need: + +* `Apache Maven `_ (>3.0) +* `AWS SDK for Java `_ (downloaded and extracted somewhere on + your machine) +* AWS credentials, either configured in a local AWS credentials file or by setting the + ``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY`` environment variables. +* You should also set the *AWS region* within which the operations will be performed. If a region is + not set, the default region used will be ``us-east-1``. + +For information about how to set AWS credentials and the region for use with the AWS SDK for Java, +see `Set up AWS Credentials and Region for Development +`_ in the *AWS +Java Developer Guide*. + +Building the examples +===================== + +The examples are divided into directories by AWS service (``s3``, ``sqs``, and so on). Within +each, you'll find a ``pom.xml`` file used for building the examples with Maven, and a ``Makefile`` +that wraps the Maven commands for those of you who also have ``make`` installed. + +To build, open a command-line (terminal) window and change to the directory containing the examples +you want to build/run. Then type:: + + mvn package + +or, if you have ``make``, you can simply type:: + + make + +to begin the build process. Maven will download any dependencies (such as components of the AWS SDK +for Java) that it needs for building. + +Once the examples have been built, you can run them to see them in action. + +.. note:: If you are running on a platform with ``make``, you can also use the provided Makefiles to + build the examples, by running ``make`` in any directory with a ``Makefile`` present. You must + still have Maven installed, however (the Makefile wraps Maven commands). + + +Running the examples +==================== + +**IMPORTANT** + + The examples perform AWS operations for the account and region for which you've specified + credentials, and you may incur AWS service charges by running them. Please visit the `AWS Pricing + `_ page 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 an + Amazon S3 bucket or an Amazon DynamoDB table. **Be very careful** when running an operation that + may delete or modify AWS resources in your account. It's best to create separate test-only + resources when experimenting with these examples. + +To run these examples, you'll need the AWS SDK for Java libraries in your ``CLASSPATH``:: + + export CLASSPATH=target/sdk-s3-examples-1.0.jar:/path/to/aws-java-sdk/.jar + +Where ``/path/to/aws-java-sdk/.jar`` is the path to where you extracted +or built the AWS Java SDK jar. + +Once you set the ``CLASSPATH``, you can run a particular example like this:: + + java com.example.s3.S3BucketOps + +For systems with bash support +----------------------------- + +As an alternative to setting the ``CLASSPATH`` and specifying the full namespace of the class to +run, we've included a ``bash`` script, ``run_example.sh``, that you can use on Linux, Unix or OS X +(or on Windows by using `Cygwin `_, `MingW `_, or +`Bash on Ubuntu on Windows `_). + +You can execute ``run_example.sh`` as shown:: + + ./run_example.sh S3BucketOps + +This will run the `S3BucketOps `_ +example (assuming that you've built the examples first!). + +If the example requires arguments, pass the argument list in quotes:: + + ./run_example.sh S3BucketOps " " + +.. _maven: https://maven.apache.org/ +.. _javasdk: https://aws.amazon.com/sdk-for-java/ +.. _javasdk-docs: http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/ diff --git a/php/example_code/README.rst b/php/example_code/README.rst index da46599a453..1468a001ff7 100644 --- a/php/example_code/README.rst +++ b/php/example_code/README.rst @@ -48,4 +48,4 @@ You can find detailed documentation for the AWS SDK for PHP at: - `AWS SDK for PHP Developer Guide `_ - `AWS SDK for PHP API Reference `_ - + diff --git a/ruby/example_code/README.rst b/ruby/example_code/README.rst index 72c941a6744..92e44d91e57 100644 --- a/ruby/example_code/README.rst +++ b/ruby/example_code/README.rst @@ -1,15 +1,15 @@ -.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. - - This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 - International License (the "License"). You may not use this file except in compliance with the - License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. - - This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions and - limitations under the License. - -####################################### -AWS SDK for Ruby Documentation Examples -####################################### - -This is a collection of examples for the AWS SDK for Ruby public documentation. +.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 + International License (the "License"). You may not use this file except in compliance with the + License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. + + This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific language governing permissions and + limitations under the License. + +####################################### +AWS SDK for Ruby Documentation Examples +####################################### + +This is a collection of examples for the AWS SDK for Ruby public documentation.