From 7a66f5b55e55879c237b87f659a2307ff29a3040 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Fri, 19 May 2017 23:09:42 -0400 Subject: Updating aws-sdk-go dep to 1.8.26 Signed-off-by: Dave Henderson --- vendor/github.com/aws/aws-sdk-go/CHANGELOG.md | 102 + vendor/github.com/aws/aws-sdk-go/Makefile | 4 +- vendor/github.com/aws/aws-sdk-go/README.md | 473 ++- .../github.com/aws/aws-sdk-go/aws/client/client.go | 59 - .../github.com/aws/aws-sdk-go/aws/client/logger.go | 108 + .../aws/aws-sdk-go/aws/client/logger_test.go | 57 + .../aws/aws-sdk-go/aws/corehandlers/handlers.go | 16 + .../aws/corehandlers/handlers_1_8_test.go | 64 + .../aws-sdk-go/aws/credentials/chain_provider.go | 14 +- .../aws/aws-sdk-go/aws/credentials/credentials.go | 10 +- .../aws/aws-sdk-go/aws/credentials/env_provider.go | 1 + vendor/github.com/aws/aws-sdk-go/aws/doc.go | 56 + .../aws/aws-sdk-go/aws/endpoints/defaults.go | 25 + .../aws/aws-sdk-go/aws/endpoints/endpoints.go | 4 +- vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go | 3 +- .../aws/request/connection_reset_error.go | 2 +- .../request/connection_reset_error_appengine.go | 11 - .../connection_reset_error_appengine_test.go | 9 - .../aws/request/connection_reset_error_other.go | 11 + .../request/connection_reset_error_other_test.go | 9 + .../aws/request/connection_reset_error_test.go | 2 +- .../aws/aws-sdk-go/aws/request/handlers.go | 31 + .../aws/aws-sdk-go/aws/request/handlers_test.go | 127 +- .../aws/aws-sdk-go/aws/request/request.go | 13 +- .../aws/aws-sdk-go/aws/request/request_1_7.go | 4 +- .../aws/aws-sdk-go/aws/request/request_1_8.go | 8 +- .../aws/request/request_resetbody_test.go | 2 +- .../aws/aws-sdk-go/aws/request/request_test.go | 38 +- .../aws/aws-sdk-go/aws/request/retryer.go | 1 - .../aws/aws-sdk-go/aws/request/waiter.go | 4 +- .../aws/session/custom_ca_bundle_test.go | 300 +- .../github.com/aws/aws-sdk-go/aws/session/doc.go | 5 +- .../aws/aws-sdk-go/aws/session/session.go | 23 +- .../aws/aws-sdk-go/aws/session/session_test.go | 23 + vendor/github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/awstesting/custom_ca_bundle.go | 191 ++ .../doc-src/aws-godoc/templates/godoc.html | 9 +- .../aws-godoc/templates/package_service.html | 182 +- .../doc-src/aws-godoc/templates/style.css | 14 - vendor/github.com/aws/aws-sdk-go/doc.go | 405 +++ .../example/service/dynamodb/scanItems/README.md | 2 +- .../service/rds/rdsutils/authentication/README.md | 15 + .../rdsutils/authentication/iam_authentication.go | 47 + .../example/service/s3/presignURL/README.md | 124 + .../example/service/s3/presignURL/client/client.go | 266 ++ .../example/service/s3/presignURL/server/server.go | 186 ++ .../models/apis/athena/2017-05-18/api-2.json | 615 ++++ .../models/apis/athena/2017-05-18/docs-2.json | 467 +++ .../models/apis/athena/2017-05-18/examples-1.json | 5 + .../apis/athena/2017-05-18/paginators-1.json | 19 + .../models/apis/autoscaling/2011-01-01/docs-2.json | 204 +- .../apis/autoscaling/2011-01-01/examples-1.json | 3 +- .../apis/autoscaling/2011-01-01/paginators-1.json | 18 +- .../apis/cloudformation/2010-05-15/api-2.json | 60 +- .../apis/cloudformation/2010-05-15/docs-2.json | 31 +- .../apis/cloudformation/2010-05-15/examples-1.json | 153 - .../models/apis/codedeploy/2014-10-06/api-2.json | 33 +- .../models/apis/codedeploy/2014-10-06/docs-2.json | 66 +- .../models/apis/codestar/2017-04-19/docs-2.json | 20 +- .../models/apis/ecs/2014-11-13/api-2.json | 3 +- .../models/apis/ecs/2014-11-13/docs-2.json | 41 +- .../models/apis/ecs/2014-11-13/paginators-1.json | 78 +- .../elasticloadbalancing/2012-06-01/api-2.json | 41 +- .../elasticloadbalancing/2012-06-01/docs-2.json | 100 +- .../2012-06-01/paginators-1.json | 2 +- .../elasticloadbalancingv2/2015-12-01/api-2.json | 39 + .../elasticloadbalancingv2/2015-12-01/docs-2.json | 38 + .../entitlement.marketplace/2017-01-11/api-2.json | 128 + .../entitlement.marketplace/2017-01-11/docs-2.json | 131 + .../2017-01-11/examples-1.json | 5 + .../2017-01-11/paginators-1.json | 4 + .../models/apis/events/2015-10-07/docs-2.json | 22 +- .../models/apis/gamelift/2015-10-01/api-2.json | 39 +- .../models/apis/gamelift/2015-10-01/docs-2.json | 34 +- .../models/apis/inspector/2016-02-16/api-2.json | 92 +- .../models/apis/inspector/2016-02-16/docs-2.json | 64 +- .../apis/inspector/2016-02-16/examples-1.json | 7 + .../apis/inspector/2016-02-16/paginators-1.json | 4 + .../models/apis/kms/2014-11-01/docs-2.json | 2 +- .../models/apis/lambda/2015-03-31/api-2.json | 4 +- .../models/apis/lambda/2015-03-31/docs-2.json | 5 +- .../models/apis/lex-models/2017-04-19/api-2.json | 117 +- .../models/apis/lex-models/2017-04-19/docs-2.json | 64 +- .../models/apis/lightsail/2016-11-28/api-2.json | 60 +- .../models/apis/lightsail/2016-11-28/docs-2.json | 55 +- .../apis/lightsail/2016-11-28/paginators-1.json | 4 + .../models/apis/logs/2014-03-28/docs-2.json | 28 +- .../models/apis/logs/2014-03-28/paginators-1.json | 16 +- .../apis/organizations/2016-11-28/api-2.json | 8 +- .../apis/organizations/2016-11-28/docs-2.json | 13 +- .../apis/organizations/2016-11-28/examples-1.json | 15 +- .../organizations/2016-11-28/paginators-1.json | 60 + .../models/apis/polly/2016-06-10/api-2.json | 3 +- .../models/apis/rds/2014-10-31/api-2.json | 1 + .../models/apis/rds/2014-10-31/docs-2.json | 1 + .../models/apis/rds/2014-10-31/examples-1.json | 390 ++- .../models/apis/rekognition/2016-06-27/api-2.json | 3 +- .../models/apis/snowball/2016-06-30/api-2.json | 51 +- .../models/apis/snowball/2016-06-30/docs-2.json | 33 +- .../apis/snowball/2016-06-30/paginators-1.json | 12 +- .../models/apis/sqs/2012-11-05/api-2.json | 4 +- .../models/apis/sqs/2012-11-05/docs-2.json | 60 +- .../models/apis/sqs/2012-11-05/paginators-1.json | 2 +- .../models/apis/ssm/2014-11-06/api-2.json | 19 +- .../models/apis/ssm/2014-11-06/docs-2.json | 155 +- .../models/apis/workspaces/2015-04-08/api-2.json | 4 +- .../models/apis/workspaces/2015-04-08/docs-2.json | 12 +- .../apis/workspaces/2015-04-08/paginators-1.json | 4 +- .../aws/aws-sdk-go/models/endpoints/endpoints.json | 22 + .../aws/aws-sdk-go/private/model/api/api.go | 119 +- .../private/model/api/customization_passes.go | 29 - .../aws/aws-sdk-go/private/model/api/docstring.go | 49 +- .../aws/aws-sdk-go/private/model/api/shape.go | 27 +- .../aws-sdk-go/private/model/cli/gen-api/main.go | 28 +- .../private/protocol/ec2query/build_test.go | 72 +- .../private/protocol/ec2query/unmarshal_test.go | 72 +- .../private/protocol/jsonrpc/build_test.go | 56 +- .../private/protocol/jsonrpc/unmarshal_test.go | 48 +- .../private/protocol/query/build_test.go | 104 +- .../private/protocol/query/unmarshal_test.go | 120 +- .../private/protocol/restjson/build_test.go | 168 +- .../private/protocol/restjson/unmarshal_test.go | 96 +- .../private/protocol/restxml/build_test.go | 192 +- .../private/protocol/restxml/unmarshal_test.go | 96 +- vendor/github.com/aws/aws-sdk-go/sdk.go | 7 - .../github.com/aws/aws-sdk-go/service/acm/api.go | 1 - .../github.com/aws/aws-sdk-go/service/acm/doc.go | 84 + .../aws/aws-sdk-go/service/acm/service.go | 12 +- .../aws/aws-sdk-go/service/apigateway/api.go | 1 - .../aws/aws-sdk-go/service/apigateway/doc.go | 82 + .../aws/aws-sdk-go/service/apigateway/service.go | 13 +- .../service/applicationautoscaling/api.go | 1 - .../service/applicationautoscaling/doc.go | 110 + .../service/applicationautoscaling/service.go | 38 +- .../service/applicationdiscoveryservice/api.go | 1 - .../service/applicationdiscoveryservice/doc.go | 139 + .../service/applicationdiscoveryservice/service.go | 67 +- .../aws/aws-sdk-go/service/appstream/api.go | 1 - .../aws/aws-sdk-go/service/appstream/doc.go | 80 + .../aws/aws-sdk-go/service/appstream/service.go | 10 +- .../aws/aws-sdk-go/service/athena/api.go | 2749 +++++++++++++++++ .../service/athena/athenaiface/interface.go | 117 + .../aws/aws-sdk-go/service/athena/doc.go | 91 + .../aws/aws-sdk-go/service/athena/errors.go | 26 + .../aws/aws-sdk-go/service/athena/examples_test.go | 272 ++ .../aws/aws-sdk-go/service/athena/service.go | 95 + .../aws/aws-sdk-go/service/autoscaling/api.go | 181 +- .../aws/aws-sdk-go/service/autoscaling/doc.go | 82 + .../aws/aws-sdk-go/service/autoscaling/service.go | 12 +- .../github.com/aws/aws-sdk-go/service/batch/api.go | 1 - .../github.com/aws/aws-sdk-go/service/batch/doc.go | 96 + .../aws/aws-sdk-go/service/batch/service.go | 24 +- .../aws/aws-sdk-go/service/budgets/api.go | 1 - .../aws/aws-sdk-go/service/budgets/doc.go | 78 + .../aws/aws-sdk-go/service/budgets/service.go | 9 +- .../aws/aws-sdk-go/service/clouddirectory/api.go | 1 - .../aws/aws-sdk-go/service/clouddirectory/doc.go | 85 + .../aws-sdk-go/service/clouddirectory/service.go | 15 +- .../aws/aws-sdk-go/service/cloudformation/api.go | 185 +- .../aws/aws-sdk-go/service/cloudformation/doc.go | 98 + .../aws-sdk-go/service/cloudformation/errors.go | 6 + .../service/cloudformation/examples_test.go | 18 +- .../aws-sdk-go/service/cloudformation/service.go | 26 +- .../aws/aws-sdk-go/service/cloudfront/api.go | 1 - .../aws/aws-sdk-go/service/cloudfront/doc.go | 83 + .../aws/aws-sdk-go/service/cloudfront/service.go | 13 +- .../service/cloudfront/sign/sign_cookie.go | 6 +- .../aws/aws-sdk-go/service/cloudhsm/api.go | 1 - .../aws/aws-sdk-go/service/cloudhsm/doc.go | 80 + .../aws/aws-sdk-go/service/cloudhsm/service.go | 9 +- .../aws/aws-sdk-go/service/cloudsearch/api.go | 1 - .../aws/aws-sdk-go/service/cloudsearch/doc.go | 85 + .../aws/aws-sdk-go/service/cloudsearch/service.go | 14 +- .../aws-sdk-go/service/cloudsearchdomain/api.go | 2 - .../aws-sdk-go/service/cloudsearchdomain/doc.go | 87 + .../service/cloudsearchdomain/service.go | 16 +- .../aws/aws-sdk-go/service/cloudtrail/api.go | 1 - .../aws/aws-sdk-go/service/cloudtrail/doc.go | 100 + .../aws/aws-sdk-go/service/cloudtrail/service.go | 28 +- .../aws/aws-sdk-go/service/cloudwatch/api.go | 1 - .../aws/aws-sdk-go/service/cloudwatch/doc.go | 94 + .../aws/aws-sdk-go/service/cloudwatch/service.go | 22 +- .../aws/aws-sdk-go/service/cloudwatchevents/api.go | 47 +- .../aws/aws-sdk-go/service/cloudwatchevents/doc.go | 97 + .../aws-sdk-go/service/cloudwatchevents/service.go | 25 +- .../aws/aws-sdk-go/service/cloudwatchlogs/api.go | 54 +- .../aws/aws-sdk-go/service/cloudwatchlogs/doc.go | 109 + .../aws-sdk-go/service/cloudwatchlogs/service.go | 37 +- .../aws/aws-sdk-go/service/codebuild/api.go | 1 - .../aws/aws-sdk-go/service/codebuild/doc.go | 123 + .../aws/aws-sdk-go/service/codebuild/service.go | 51 +- .../aws/aws-sdk-go/service/codecommit/api.go | 1 - .../aws/aws-sdk-go/service/codecommit/doc.go | 141 + .../aws/aws-sdk-go/service/codecommit/service.go | 69 +- .../aws/aws-sdk-go/service/codedeploy/api.go | 140 +- .../aws/aws-sdk-go/service/codedeploy/doc.go | 133 + .../aws/aws-sdk-go/service/codedeploy/errors.go | 20 +- .../aws-sdk-go/service/codedeploy/examples_test.go | 1 + .../aws/aws-sdk-go/service/codedeploy/service.go | 60 +- .../aws/aws-sdk-go/service/codepipeline/api.go | 1 - .../aws/aws-sdk-go/service/codepipeline/doc.go | 188 ++ .../aws/aws-sdk-go/service/codepipeline/service.go | 116 +- .../aws/aws-sdk-go/service/codestar/api.go | 31 +- .../aws/aws-sdk-go/service/codestar/doc.go | 123 + .../aws/aws-sdk-go/service/codestar/service.go | 55 +- .../aws/aws-sdk-go/service/cognitoidentity/api.go | 1 - .../aws/aws-sdk-go/service/cognitoidentity/doc.go | 111 + .../aws-sdk-go/service/cognitoidentity/service.go | 39 +- .../service/cognitoidentityprovider/api.go | 1 - .../service/cognitoidentityprovider/doc.go | 87 + .../service/cognitoidentityprovider/service.go | 15 +- .../aws/aws-sdk-go/service/cognitosync/api.go | 1 - .../aws/aws-sdk-go/service/cognitosync/doc.go | 97 + .../aws/aws-sdk-go/service/cognitosync/service.go | 25 +- .../aws/aws-sdk-go/service/configservice/api.go | 1 - .../aws/aws-sdk-go/service/configservice/doc.go | 103 + .../aws-sdk-go/service/configservice/service.go | 31 +- .../service/costandusagereportservice/api.go | 1 - .../service/costandusagereportservice/doc.go | 80 + .../service/costandusagereportservice/service.go | 10 +- .../service/databasemigrationservice/api.go | 1 - .../service/databasemigrationservice/doc.go | 86 + .../service/databasemigrationservice/service.go | 16 +- .../aws/aws-sdk-go/service/datapipeline/api.go | 1 - .../aws/aws-sdk-go/service/datapipeline/doc.go | 101 + .../aws/aws-sdk-go/service/datapipeline/service.go | 29 +- .../aws/aws-sdk-go/service/devicefarm/api.go | 1 - .../aws/aws-sdk-go/service/devicefarm/doc.go | 82 + .../aws/aws-sdk-go/service/devicefarm/service.go | 12 +- .../aws/aws-sdk-go/service/directconnect/api.go | 1 - .../aws/aws-sdk-go/service/directconnect/doc.go | 91 + .../aws-sdk-go/service/directconnect/service.go | 21 +- .../aws/aws-sdk-go/service/directoryservice/api.go | 1 - .../aws/aws-sdk-go/service/directoryservice/doc.go | 92 + .../aws-sdk-go/service/directoryservice/service.go | 20 +- .../aws/aws-sdk-go/service/dynamodb/api.go | 2 +- .../aws/aws-sdk-go/service/dynamodb/doc.go | 97 + .../aws/aws-sdk-go/service/dynamodb/doc_custom.go | 84 + .../service/dynamodb/dynamodbattribute/doc.go | 88 +- .../service/dynamodb/dynamodbattribute/encode.go | 7 +- .../aws/aws-sdk-go/service/dynamodb/service.go | 25 +- .../aws/aws-sdk-go/service/dynamodbstreams/api.go | 1 - .../aws/aws-sdk-go/service/dynamodbstreams/doc.go | 83 + .../aws-sdk-go/service/dynamodbstreams/service.go | 13 +- .../github.com/aws/aws-sdk-go/service/ec2/api.go | 1 - .../github.com/aws/aws-sdk-go/service/ec2/doc.go | 83 + .../aws/aws-sdk-go/service/ec2/service.go | 13 +- .../github.com/aws/aws-sdk-go/service/ecr/api.go | 1 - .../github.com/aws/aws-sdk-go/service/ecr/doc.go | 85 + .../aws/aws-sdk-go/service/ecr/service.go | 15 +- .../github.com/aws/aws-sdk-go/service/ecs/api.go | 116 +- .../github.com/aws/aws-sdk-go/service/ecs/doc.go | 91 + .../aws/aws-sdk-go/service/ecs/service.go | 19 +- .../github.com/aws/aws-sdk-go/service/efs/api.go | 1 - .../github.com/aws/aws-sdk-go/service/efs/doc.go | 84 + .../aws/aws-sdk-go/service/efs/service.go | 14 +- .../aws/aws-sdk-go/service/elasticache/api.go | 1 - .../aws/aws-sdk-go/service/elasticache/doc.go | 90 + .../aws/aws-sdk-go/service/elasticache/service.go | 18 +- .../aws/aws-sdk-go/service/elasticbeanstalk/api.go | 1 - .../aws/aws-sdk-go/service/elasticbeanstalk/doc.go | 96 + .../aws-sdk-go/service/elasticbeanstalk/service.go | 24 +- .../aws-sdk-go/service/elasticsearchservice/api.go | 1 - .../aws-sdk-go/service/elasticsearchservice/doc.go | 85 + .../service/elasticsearchservice/service.go | 13 +- .../aws-sdk-go/service/elastictranscoder/api.go | 1 - .../aws-sdk-go/service/elastictranscoder/doc.go | 78 + .../service/elastictranscoder/service.go | 9 +- .../github.com/aws/aws-sdk-go/service/elb/api.go | 264 +- .../github.com/aws/aws-sdk-go/service/elb/doc.go | 107 + .../aws-sdk-go/service/elb/elbiface/interface.go | 4 + .../aws/aws-sdk-go/service/elb/errors.go | 2 + .../aws/aws-sdk-go/service/elb/examples_test.go | 22 + .../aws/aws-sdk-go/service/elb/service.go | 34 +- .../github.com/aws/aws-sdk-go/service/elbv2/api.go | 205 +- .../github.com/aws/aws-sdk-go/service/elbv2/doc.go | 125 + .../service/elbv2/elbv2iface/interface.go | 4 + .../aws/aws-sdk-go/service/elbv2/examples_test.go | 22 + .../aws/aws-sdk-go/service/elbv2/service.go | 53 +- .../github.com/aws/aws-sdk-go/service/emr/api.go | 1 - .../github.com/aws/aws-sdk-go/service/emr/doc.go | 83 + .../aws/aws-sdk-go/service/emr/service.go | 13 +- .../aws/aws-sdk-go/service/firehose/api.go | 1 - .../aws/aws-sdk-go/service/firehose/doc.go | 82 + .../aws/aws-sdk-go/service/firehose/service.go | 12 +- .../aws/aws-sdk-go/service/gamelift/api.go | 157 +- .../aws/aws-sdk-go/service/gamelift/doc.go | 291 ++ .../aws-sdk-go/service/gamelift/examples_test.go | 14 +- .../aws/aws-sdk-go/service/gamelift/service.go | 219 +- .../aws/aws-sdk-go/service/glacier/api.go | 1 - .../aws/aws-sdk-go/service/glacier/doc.go | 108 + .../aws/aws-sdk-go/service/glacier/service.go | 37 +- .../aws/aws-sdk-go/service/health/api.go | 1 - .../aws/aws-sdk-go/service/health/doc.go | 117 + .../aws/aws-sdk-go/service/health/service.go | 45 +- .../github.com/aws/aws-sdk-go/service/iam/api.go | 1 - .../github.com/aws/aws-sdk-go/service/iam/doc.go | 132 + .../aws/aws-sdk-go/service/iam/service.go | 60 +- .../aws/aws-sdk-go/service/inspector/api.go | 259 +- .../aws/aws-sdk-go/service/inspector/doc.go | 82 + .../aws/aws-sdk-go/service/inspector/errors.go | 10 + .../aws-sdk-go/service/inspector/examples_test.go | 23 + .../service/inspector/inspectoriface/interface.go | 4 + .../aws/aws-sdk-go/service/inspector/service.go | 12 +- .../github.com/aws/aws-sdk-go/service/iot/api.go | 1 - .../github.com/aws/aws-sdk-go/service/iot/doc.go | 85 + .../aws/aws-sdk-go/service/iot/service.go | 14 +- .../aws/aws-sdk-go/service/iotdataplane/api.go | 1 - .../aws/aws-sdk-go/service/iotdataplane/doc.go | 85 + .../aws/aws-sdk-go/service/iotdataplane/service.go | 15 +- .../aws/aws-sdk-go/service/kinesis/api.go | 1 - .../aws/aws-sdk-go/service/kinesis/doc.go | 81 + .../aws/aws-sdk-go/service/kinesis/service.go | 11 +- .../aws/aws-sdk-go/service/kinesisanalytics/api.go | 1 - .../aws/aws-sdk-go/service/kinesisanalytics/doc.go | 78 + .../aws-sdk-go/service/kinesisanalytics/service.go | 10 +- .../github.com/aws/aws-sdk-go/service/kms/api.go | 7 +- .../github.com/aws/aws-sdk-go/service/kms/doc.go | 150 + .../aws/aws-sdk-go/service/kms/service.go | 78 +- .../aws/aws-sdk-go/service/lambda/api.go | 16 +- .../aws/aws-sdk-go/service/lambda/doc.go | 84 + .../aws/aws-sdk-go/service/lambda/examples_test.go | 1 + .../aws/aws-sdk-go/service/lambda/service.go | 13 +- .../service/lexmodelbuildingservice/api.go | 665 +++- .../service/lexmodelbuildingservice/doc.go | 82 + .../lexmodelbuildingservice/examples_test.go | 75 +- .../lexmodelbuildingserviceiface/interface.go | 12 + .../service/lexmodelbuildingservice/service.go | 12 +- .../aws-sdk-go/service/lexruntimeservice/api.go | 1 - .../aws-sdk-go/service/lexruntimeservice/doc.go | 90 + .../service/lexruntimeservice/service.go | 20 +- .../aws/aws-sdk-go/service/lightsail/api.go | 486 ++- .../aws/aws-sdk-go/service/lightsail/doc.go | 92 + .../aws/aws-sdk-go/service/lightsail/errors.go | 4 + .../aws-sdk-go/service/lightsail/examples_test.go | 29 + .../service/lightsail/lightsailiface/interface.go | 4 + .../aws/aws-sdk-go/service/lightsail/service.go | 20 +- .../aws/aws-sdk-go/service/machinelearning/api.go | 1 - .../aws/aws-sdk-go/service/machinelearning/doc.go | 78 + .../aws-sdk-go/service/machinelearning/service.go | 9 +- .../service/marketplacecommerceanalytics/api.go | 1 - .../service/marketplacecommerceanalytics/doc.go | 80 + .../marketplacecommerceanalytics/service.go | 10 +- .../service/marketplaceentitlementservice/api.go | 352 +++ .../service/marketplaceentitlementservice/doc.go | 91 + .../marketplaceentitlementservice/errors.go | 25 + .../marketplaceentitlementservice/examples_test.go | 46 + .../interface.go | 68 + .../marketplaceentitlementservice/service.go | 98 + .../aws-sdk-go/service/marketplacemetering/api.go | 1 - .../aws-sdk-go/service/marketplacemetering/doc.go | 100 + .../service/marketplacemetering/service.go | 28 +- .../aws/aws-sdk-go/service/mobileanalytics/api.go | 1 - .../aws/aws-sdk-go/service/mobileanalytics/doc.go | 79 + .../aws-sdk-go/service/mobileanalytics/service.go | 10 +- .../github.com/aws/aws-sdk-go/service/mturk/api.go | 1 - .../github.com/aws/aws-sdk-go/service/mturk/doc.go | 80 + .../aws/aws-sdk-go/service/mturk/service.go | 9 +- .../aws/aws-sdk-go/service/opsworks/api.go | 2 +- .../aws/aws-sdk-go/service/opsworks/doc.go | 149 + .../aws/aws-sdk-go/service/opsworks/service.go | 77 +- .../aws/aws-sdk-go/service/opsworkscm/api.go | 3 - .../aws/aws-sdk-go/service/opsworkscm/doc.go | 127 + .../aws/aws-sdk-go/service/opsworkscm/service.go | 55 +- .../aws/aws-sdk-go/service/organizations/api.go | 3248 +++++++++++++++++++- .../aws/aws-sdk-go/service/organizations/doc.go | 191 ++ .../aws/aws-sdk-go/service/organizations/errors.go | 128 +- .../organizations/organizationsiface/interface.go | 36 + .../aws-sdk-go/service/organizations/service.go | 119 +- .../aws/aws-sdk-go/service/pinpoint/api.go | 1 - .../aws/aws-sdk-go/service/pinpoint/doc.go | 76 + .../aws/aws-sdk-go/service/pinpoint/service.go | 9 +- .../github.com/aws/aws-sdk-go/service/polly/api.go | 4 +- .../github.com/aws/aws-sdk-go/service/polly/doc.go | 86 + .../aws/aws-sdk-go/service/polly/service.go | 14 +- .../github.com/aws/aws-sdk-go/service/rds/api.go | 12 +- .../github.com/aws/aws-sdk-go/service/rds/doc.go | 121 + .../aws/aws-sdk-go/service/rds/doc_custom.go | 25 + .../aws/aws-sdk-go/service/rds/rdsutils/connect.go | 37 +- .../service/rds/rdsutils/connect_test.go | 32 +- .../aws/aws-sdk-go/service/rds/service.go | 50 +- .../aws/aws-sdk-go/service/redshift/api.go | 1 - .../aws/aws-sdk-go/service/redshift/doc.go | 103 + .../aws/aws-sdk-go/service/redshift/service.go | 31 +- .../aws/aws-sdk-go/service/rekognition/api.go | 4 +- .../aws/aws-sdk-go/service/rekognition/doc.go | 78 + .../aws/aws-sdk-go/service/rekognition/service.go | 9 +- .../service/resourcegroupstaggingapi/api.go | 1 - .../service/resourcegroupstaggingapi/doc.go | 116 + .../service/resourcegroupstaggingapi/service.go | 44 +- .../aws/aws-sdk-go/service/route53/api.go | 1 - .../aws/aws-sdk-go/service/route53/doc.go | 78 + .../aws/aws-sdk-go/service/route53/service.go | 10 +- .../aws/aws-sdk-go/service/route53domains/api.go | 1 - .../aws/aws-sdk-go/service/route53domains/doc.go | 81 + .../aws-sdk-go/service/route53domains/service.go | 11 +- vendor/github.com/aws/aws-sdk-go/service/s3/api.go | 1 - .../aws/aws-sdk-go/service/s3/bucket_location.go | 2 +- vendor/github.com/aws/aws-sdk-go/service/s3/doc.go | 78 + .../aws/aws-sdk-go/service/s3/doc_custom.go | 109 + .../service/s3/s3crypto/cipher_builder.go | 2 +- .../aws-sdk-go/service/s3/s3manager/download.go | 12 +- .../service/s3/s3manager/download_test.go | 58 + .../aws/aws-sdk-go/service/s3/s3manager/upload.go | 2 +- .../aws/aws-sdk-go/service/s3/service.go | 10 +- .../aws/aws-sdk-go/service/servicecatalog/api.go | 1 - .../aws/aws-sdk-go/service/servicecatalog/doc.go | 92 + .../aws-sdk-go/service/servicecatalog/service.go | 20 +- .../github.com/aws/aws-sdk-go/service/ses/api.go | 1 - .../github.com/aws/aws-sdk-go/service/ses/doc.go | 86 + .../aws/aws-sdk-go/service/ses/service.go | 14 +- .../github.com/aws/aws-sdk-go/service/sfn/api.go | 1 - .../github.com/aws/aws-sdk-go/service/sfn/doc.go | 95 + .../aws/aws-sdk-go/service/sfn/service.go | 23 +- .../aws/aws-sdk-go/service/shield/api.go | 1 - .../aws/aws-sdk-go/service/shield/doc.go | 84 + .../aws/aws-sdk-go/service/shield/service.go | 14 +- .../aws/aws-sdk-go/service/simpledb/api.go | 1 - .../aws/aws-sdk-go/service/simpledb/doc.go | 92 + .../aws/aws-sdk-go/service/simpledb/service.go | 21 +- .../github.com/aws/aws-sdk-go/service/sms/api.go | 1 - .../github.com/aws/aws-sdk-go/service/sms/doc.go | 81 + .../aws/aws-sdk-go/service/sms/service.go | 11 +- .../aws/aws-sdk-go/service/snowball/api.go | 132 +- .../aws/aws-sdk-go/service/snowball/doc.go | 87 + .../aws/aws-sdk-go/service/snowball/errors.go | 7 + .../aws-sdk-go/service/snowball/examples_test.go | 35 +- .../aws/aws-sdk-go/service/snowball/service.go | 17 +- .../github.com/aws/aws-sdk-go/service/sns/api.go | 1 - .../github.com/aws/aws-sdk-go/service/sns/doc.go | 92 + .../aws/aws-sdk-go/service/sns/service.go | 20 +- .../github.com/aws/aws-sdk-go/service/sqs/api.go | 236 +- .../github.com/aws/aws-sdk-go/service/sqs/doc.go | 115 + .../aws/aws-sdk-go/service/sqs/service.go | 43 +- .../github.com/aws/aws-sdk-go/service/ssm/api.go | 355 ++- .../github.com/aws/aws-sdk-go/service/ssm/doc.go | 92 + .../aws/aws-sdk-go/service/ssm/errors.go | 4 +- .../aws/aws-sdk-go/service/ssm/examples_test.go | 11 + .../aws/aws-sdk-go/service/ssm/service.go | 20 +- .../aws/aws-sdk-go/service/storagegateway/api.go | 1 - .../aws/aws-sdk-go/service/storagegateway/doc.go | 131 + .../aws-sdk-go/service/storagegateway/service.go | 59 +- .../github.com/aws/aws-sdk-go/service/sts/api.go | 1 - .../github.com/aws/aws-sdk-go/service/sts/doc.go | 124 + .../aws/aws-sdk-go/service/sts/service.go | 52 +- .../aws/aws-sdk-go/service/support/api.go | 1 - .../aws/aws-sdk-go/service/support/doc.go | 129 + .../aws/aws-sdk-go/service/support/service.go | 57 +- .../github.com/aws/aws-sdk-go/service/swf/api.go | 2 - .../github.com/aws/aws-sdk-go/service/swf/doc.go | 90 + .../aws/aws-sdk-go/service/swf/service.go | 19 +- .../github.com/aws/aws-sdk-go/service/waf/api.go | 1 - .../github.com/aws/aws-sdk-go/service/waf/doc.go | 86 + .../aws/aws-sdk-go/service/waf/service.go | 16 +- .../aws/aws-sdk-go/service/wafregional/api.go | 1 - .../aws/aws-sdk-go/service/wafregional/doc.go | 88 + .../aws/aws-sdk-go/service/wafregional/service.go | 18 +- .../aws/aws-sdk-go/service/workdocs/api.go | 1 - .../aws/aws-sdk-go/service/workdocs/doc.go | 110 + .../aws/aws-sdk-go/service/workdocs/service.go | 38 +- .../aws/aws-sdk-go/service/workspaces/api.go | 19 +- .../aws/aws-sdk-go/service/workspaces/doc.go | 81 + .../aws/aws-sdk-go/service/workspaces/errors.go | 8 +- .../aws/aws-sdk-go/service/workspaces/service.go | 11 +- .../github.com/aws/aws-sdk-go/service/xray/api.go | 1 - .../github.com/aws/aws-sdk-go/service/xray/doc.go | 81 + .../aws/aws-sdk-go/service/xray/service.go | 11 +- 467 files changed, 27619 insertions(+), 4879 deletions(-) create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/client/logger.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_1_8_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go delete mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/awstesting/custom_ca_bundle.go create mode 100644 vendor/github.com/aws/aws-sdk-go/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/example/service/rds/rdsutils/authentication/README.md create mode 100644 vendor/github.com/aws/aws-sdk-go/example/service/rds/rdsutils/authentication/iam_authentication.go create mode 100644 vendor/github.com/aws/aws-sdk-go/example/service/s3/presignURL/README.md create mode 100644 vendor/github.com/aws/aws-sdk-go/example/service/s3/presignURL/client/client.go create mode 100644 vendor/github.com/aws/aws-sdk-go/example/service/s3/presignURL/server/server.go create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/athena/2017-05-18/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/athena/2017-05-18/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/athena/2017-05-18/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/athena/2017-05-18/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/entitlement.marketplace/2017-01-11/api-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/entitlement.marketplace/2017-01-11/docs-2.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/entitlement.marketplace/2017-01-11/examples-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/entitlement.marketplace/2017-01-11/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/inspector/2016-02-16/paginators-1.json create mode 100644 vendor/github.com/aws/aws-sdk-go/models/apis/lightsail/2016-11-28/paginators-1.json delete mode 100644 vendor/github.com/aws/aws-sdk-go/sdk.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acm/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/appstream/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/athenaiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/examples_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/athena/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/batch/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/clouddirectory/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudhsm/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatch/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/codepipeline/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/codestar/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cognitosync/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/configservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/datapipeline/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/devicefarm/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/directoryservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/dynamodb/doc_custom.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/dynamodbstreams/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecr/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ecs/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/efs/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticache/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/elb/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/emr/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/firehose/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/gamelift/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/glacier/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/health/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/iam/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/inspector/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/iot/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/iotdataplane/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesis/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kms/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/lambda/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/lexruntimeservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/lightsail/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/machinelearning/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/marketplacecommerceanalytics/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/marketplaceentitlementservice/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/marketplaceentitlementservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/marketplaceentitlementservice/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/marketplaceentitlementservice/examples_test.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/marketplaceentitlementservice/marketplaceentitlementserviceiface/interface.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/marketplaceentitlementservice/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/marketplacemetering/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mobileanalytics/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mturk/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/opsworks/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/opsworkscm/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/polly/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/rds/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/rds/doc_custom.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/redshift/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/rekognition/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53domains/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/servicecatalog/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ses/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sfn/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/shield/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/simpledb/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sms/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/snowball/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sns/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ssm/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/storagegateway/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sts/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/support/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/swf/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/waf/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/wafregional/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/workdocs/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/xray/doc.go (limited to 'vendor/github.com') diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md index f3f434ea..950ffd17 100644 --- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md @@ -1,3 +1,105 @@ +Release v1.8.26 (2017-05-18) +=== + +### Service Client Updates +* `service/athena`: Adds new service + * This release adds support for Amazon Athena. Amazon Athena is an interactive query service that makes it easy to analyze data in Amazon S3 using standard SQL. Athena is serverless, so there is no infrastructure to manage, and you pay only for the queries that you run. +* `service/lightsail`: Updates service API, documentation, and paginators + * This release adds new APIs that make it easier to set network port configurations on Lightsail instances. Developers can now make a single request to both open and close public ports on an instance using the PutInstancePublicPorts operation. + +### SDK Bugs +* `aws/request`: Fix logging from reporting wrong retry request errors #1281 + * Fixes the SDK's retry request logging to report the the actual error that occurred, not a stubbed Unknown error message. + * Fixes the SDK's response logger to not output the response log multiple times per retry. +Release v1.8.25 (2017-05-17) +=== + +### Service Client Updates +* `service/autoscaling`: Updates service documentation, paginators, and examples + * Various Auto Scaling documentation updates +* `service/cloudwatchevents`: Updates service documentation + * Various CloudWatch Events documentation updates. +* `service/cloudwatchlogs`: Updates service documentation and paginators + * Various CloudWatch Logs documentation updates. +* `service/polly`: Updates service API + * Amazon Polly adds new German voice "Vicki" + +Release v1.8.24 (2017-05-16) +=== + +### Service Client Updates +* `service/codedeploy`: Updates service API and documentation + * This release introduces the previousRevision field in the responses to the GetDeployment and BatchGetDeployments actions. previousRevision provides information about the application revision that was deployed to the deployment group before the most recent successful deployment. Also, the fileExistsBehavior parameter has been added for CreateDeployment action requests. In the past, if the AWS CodeDeploy agent detected files in a target location that weren't part of the application revision from the most recent successful deployment, it would fail the current deployment by default. This new parameter provides options for how the agent handles these files: fail the deployment, retain the content, or overwrite the content. +* `service/gamelift`: Updates service API and documentation + * Allow developers to specify how metrics are grouped in CloudWatch for their GameLift fleets. Developers can also specify how many concurrent game sessions activate on a per-instance basis. +* `service/inspector`: Updates service API, documentation, paginators, and examples + * Adds ability to produce an assessment report that includes detailed and comprehensive results of a specified assessment run. +* `service/kms`: Updates service documentation + * Update documentation for KMS. + +Release v1.8.23 (2017-05-15) +=== + +### Service Client Updates +* `service/ssm`: Updates service API and documentation + * UpdateAssociation API now supports updating document name and targets of an association. GetAutomationExecution API can return FailureDetails as an optional field to the StepExecution Object, which contains failure type, failure stage as well as other failure related information for a failed step. + +### SDK Enhancements +* `aws/session`: SDK should be able to load multiple custom shared config files. [#1258](https://github.com/aws/aws-sdk-go/issues/1258) + * This change adds a `SharedConfigFiles` field to the `session.Options` type that allows you to specify the files, and their order, the SDK will use for loading shared configuration and credentials from when the `Session` is created. Use the `NewSessionWithOptions` Session constructor to specify these options. You'll also most likely want to enable support for the shared configuration file's additional attributes by setting `session.Option`'s `SharedConfigState` to `session.SharedConfigEnabled`. + +Release v1.8.22 (2017-05-11) +=== + +### Service Client Updates +* `service/elb`: Updates service API, documentation, and paginators +* `service/elbv2`: Updates service API and documentation +* `service/lexmodelbuildingservice`: Updates service API and documentation +* `service/organizations`: Updates service API, documentation, paginators, and examples + * AWS Organizations APIs that return an Account object now include the email address associated with the account’s root user. + +Release v1.8.21 (2017-05-09) +=== + +### Service Client Updates +* `service/codestar`: Updates service documentation + * Updated documentation for AWS CodeStar. +* `service/workspaces`: Updates service API, documentation, and paginators + * Doc-only Update for WorkSpaces + +Release v1.8.20 (2017-05-04) +=== + +### Service Client Updates +* `service/ecs`: Updates service API, documentation, and paginators + * Exposes container instance registration time in ECS:DescribeContainerInstances. +* `aws/endpoints`: Updated Regions and Endpoints metadata. +* `service/marketplaceentitlementservice`: Adds new service +* `service/lambda`: Updates service API and documentation + * Support for UpdateFunctionCode DryRun option + +Release v1.8.19 (2017-04-28) +=== + +### Service Client Updates +* `service/cloudformation`: Updates service waiters and paginators + * Adding back the removed waiters and paginators. + +Release v1.8.18 (2017-04-28) +=== + +### Service Client Updates +* `service/cloudformation`: Updates service API, documentation, waiters, paginators, and examples + * API update for CloudFormation: New optional parameter ClientRequestToken which can be used as an idempotency token to safely retry certain operations as well as tagging StackEvents. +* `service/rds`: Updates service API, documentation, and examples + * The DescribeDBClusterSnapshots API now returns a SourceDBClusterSnapshotArn field which identifies the source DB cluster snapshot of a copied snapshot. +* `service/rekognition`: Updates service API + * Fix for missing file type check +* `service/snowball`: Updates service API, documentation, and paginators + * The Snowball API has a new exception that can be thrown for list operation requests. +* `service/sqs`: Updates service API, documentation, and paginators + * Adding server-side encryption (SSE) support to SQS by integrating with AWS KMS; adding new queue attributes to SQS CreateQueue, SetQueueAttributes and GetQueueAttributes APIs to support SSE. + Release v1.8.17 (2017-04-26) === diff --git a/vendor/github.com/aws/aws-sdk-go/Makefile b/vendor/github.com/aws/aws-sdk-go/Makefile index b1611d2e..931bfd69 100644 --- a/vendor/github.com/aws/aws-sdk-go/Makefile +++ b/vendor/github.com/aws/aws-sdk-go/Makefile @@ -5,6 +5,7 @@ LINTIGNORESTUTTER='service/[^/]+/(api|service)\.go:.+(and that stutters)' LINTIGNOREINFLECT='service/[^/]+/(api|errors|service)\.go:.+(method|const) .+ should be ' LINTIGNOREINFLECTS3UPLOAD='service/s3/s3manager/upload\.go:.+struct field SSEKMSKeyId should be ' LINTIGNOREDEPS='vendor/.+\.go' +LINTIGNOREPKGCOMMENT='service/[^/]+/doc_custom.go:.+package comment should be of the form' UNIT_TEST_TAGS="example codegen" SDK_WITH_VENDOR_PKGS=$(shell go list -tags ${UNIT_TEST_TAGS} ./... | grep -v "/vendor/src") @@ -126,7 +127,7 @@ verify: get-deps-verify lint vet lint: @echo "go lint SDK and vendor packages" @lint=`if [ \( -z "${SDK_GO_1_4}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then golint ./...; else echo "skipping golint"; fi`; \ - lint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOT} -e ${LINTIGNOREDOC} -e ${LINTIGNORECONST} -e ${LINTIGNORESTUTTER} -e ${LINTIGNOREINFLECT} -e ${LINTIGNOREDEPS} -e ${LINTIGNOREINFLECTS3UPLOAD}`; \ + lint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOT} -e ${LINTIGNOREDOC} -e ${LINTIGNORECONST} -e ${LINTIGNORESTUTTER} -e ${LINTIGNOREINFLECT} -e ${LINTIGNOREDEPS} -e ${LINTIGNOREINFLECTS3UPLOAD} -e ${LINTIGNOREPKGCOMMENT}`; \ echo "$$lint"; \ if [ "$$lint" != "" ] && [ "$$lint" != "skipping golint" ]; then exit 1; fi @@ -152,6 +153,7 @@ get-deps-tests: go get github.com/stretchr/testify go get github.com/smartystreets/goconvey go get golang.org/x/net/html + go get golang.org/x/net/http2 get-deps-verify: @echo "go get SDK verification utilities" diff --git a/vendor/github.com/aws/aws-sdk-go/README.md b/vendor/github.com/aws/aws-sdk-go/README.md index fefe453f..9c871847 100644 --- a/vendor/github.com/aws/aws-sdk-go/README.md +++ b/vendor/github.com/aws/aws-sdk-go/README.md @@ -1,4 +1,6 @@ -# AWS SDK for Go [![API Reference](http://img.shields.io/badge/api-reference-blue.svg)](http://docs.aws.amazon.com/sdk-for-go/api) [![Join the chat at https://gitter.im/aws/aws-sdk-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-go.svg)](https://travis-ci.org/aws/aws-sdk-go) [![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt) +[![API Reference](http://img.shields.io/badge/api-reference-blue.svg)](http://docs.aws.amazon.com/sdk-for-go/api) [![Join the chat at https://gitter.im/aws/aws-sdk-go](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aws/aws-sdk-go?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://img.shields.io/travis/aws/aws-sdk-go.svg)](https://travis-ci.org/aws/aws-sdk-go) [![Apache V2 License](http://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt) + +# AWS SDK for Go aws-sdk-go is the official AWS SDK for the Go programming language. @@ -26,6 +28,7 @@ These two processes will still include the `vendor` folder and it should be dele ## Getting Help Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests. + * Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with the [`aws-sdk-go`](http://stackoverflow.com/questions/tagged/aws-sdk-go) tag. * Come join the AWS SDK for Go community chat on [gitter](https://gitter.im/aws/aws-sdk-go). * Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html). @@ -33,9 +36,9 @@ Please use these community resources for getting help. We use the GitHub issues ## Opening Issues -If you encounter a bug with the AWS SDK for Go we would like to hear about it. Search the [existing issues]( https://github.com/aws/aws-sdk-go/issues) and see if others are also experiencing the issue before opening a new issue. Please include the version of AWS SDK for Go, Go language, and OS you’re using. Please also include repro case when appropriate. +If you encounter a bug with the AWS SDK for Go we would like to hear about it. Search the [existing issues](https://github.com/aws/aws-sdk-go/issues) and see if others are also experiencing the issue before opening a new issue. Please include the version of AWS SDK for Go, Go language, and OS you’re using. Please also include repro case when appropriate. -The GitHub issues are intended for bug reports and feature requests. For help and questions with using AWS SDK for GO please make use of the resources listed in the [Getting Help]( https://github.com/aws/aws-sdk-go#getting-help) section. Keeping the list of open issues lean will help us respond in a timely manner. +The GitHub issues are intended for bug reports and feature requests. For help and questions with using AWS SDK for GO please make use of the resources listed in the [Getting Help](https://github.com/aws/aws-sdk-go#getting-help) section. Keeping the list of open issues lean will help us respond in a timely manner. ## Reference Documentation @@ -47,113 +50,397 @@ The GitHub issues are intended for bug reports and feature requests. For help an [`SDK Examples`](https://github.com/aws/aws-sdk-go/tree/master/example) - Included in the SDK's repo are a several hand crafted examples using the SDK features and AWS services. -## Configuring Credentials +## Overview of SDK's Packages + +The SDK is composed of two main components, SDK core, and service clients. +The SDK core packages are all available under the aws package at the root of +the SDK. Each client for a supported AWS service is available within its own +package under the service folder at the root of the SDK. + + * aws - SDK core, provides common shared types such as Config, Logger, + and utilities to make working with API parameters easier. + + * awserr - Provides the error interface that the SDK will use for all + errors that occur in the SDK's processing. This includes service API + response errors as well. The Error type is made up of a code and message. + Cast the SDK's returned error type to awserr.Error and call the Code + method to compare returned error to specific error codes. See the package's + documentation for additional values that can be extracted such as RequestID. + + * credentials - Provides the types and built in credentials providers + the SDK will use to retrieve AWS credentials to make API requests with. + Nested under this folder are also additional credentials providers such as + stscreds for assuming IAM roles, and ec2rolecreds for EC2 Instance roles. + + * endpoints - Provides the AWS Regions and Endpoints metadata for the SDK. + Use this to lookup AWS service endpoint information such as which services + are in a region, and what regions a service is in. Constants are also provided + for all region identifiers, e.g UsWest2RegionID for "us-west-2". + + * session - Provides initial default configuration, and load + configuration from external sources such as environment and shared + credentials file. + + * request - Provides the API request sending, and retry logic for the SDK. + This package also includes utilities for defining your own request + retryer, and configuring how the SDK processes the request. + + * service - Clients for AWS services. All services supported by the SDK are + available under this folder. + +## How to Use the SDK's AWS Service Clients + +The SDK includes the Go types and utilities you can use to make requests to +AWS service APIs. Within the service folder at the root of the SDK you'll find +a package for each AWS service the SDK supports. All service clients follows +a common pattern of creation and usage. + +When creating a client for an AWS service you'll first need to have a Session +value constructed. The Session provides shared configuration that can be shared +between your service clients. When service clients are created you can pass +in additional configuration via the aws.Config type to override configuration +provided by in the Session to create service client instances with custom +configuration. + +Once the service's client is created you can use it to make API requests the +AWS service. These clients are safe to use concurrently. + +## Configuring the SDK + +In the AWS SDK for Go, you can configure settings for service clients, such +as the log level and maximum number of retries. Most settings are optional; +however, for each service client, you must specify a region and your credentials. +The SDK uses these values to send requests to the correct AWS region and sign +requests with the correct credentials. You can specify these values as part +of a session or as environment variables. -Before using the SDK, ensure that you've configured credentials. The best -way to configure credentials on a development machine is to use the -`~/.aws/credentials` file, which might look like: +See the SDK's [configuration guide][config_guide] for more information. +See the [session][session_pkg] package documentation for more information on how to use Session +with the SDK. + +See the [Config][config_typ] type in the [aws][aws_pkg] package for more information on configuration +options. + +[config_guide]: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html +[session_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/session/ +[config_typ]: https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +[aws_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/ + +### Configuring Credentials + +When using the SDK you'll generally need your AWS credentials to authenticate +with AWS services. The SDK supports multiple methods of supporting these +credentials. By default the SDK will source credentials automatically from +its default credential chain. See the session package for more information +on this chain, and how to configure it. The common items in the credential +chain are the following: + + * Environment Credentials - Set of environment variables that are useful + when sub processes are created for specific roles. + + * Shared Credentials file (~/.aws/credentials) - This file stores your + credentials based on a profile name and is useful for local development. + + * EC2 Instance Role Credentials - Use EC2 Instance Role to assign credentials + to application running on an EC2 instance. This removes the need to manage + credential files in production. + +Credentials can be configured in code as well by setting the Config's Credentials +value to a custom provider or using one of the providers included with the +SDK to bypass the default credential chain and use a custom one. This is +helpful when you want to instruct the SDK to only use a specific set of +credentials or providers. + +This example creates a credential provider for assuming an IAM role, "myRoleARN" +and configures the S3 service client to use that role for API requests. + +```go + // Initial credentials loaded from SDK's default credential chain. Such as + // the environment, shared credentials (~/.aws/credentials), or EC2 Instance + // Role. These credentials will be used to to make the STS Assume Role API. + sess := session.Must(session.NewSession()) + + // Create the credentials from AssumeRoleProvider to assume the role + // referenced by the "myRoleARN" ARN. + creds := stscreds.NewCredentials(sess, "myRoleArn") + + // Create service client value configured for credentials + // from assumed role. + svc := s3.New(sess, &aws.Config{Credentials: creds})/ +``` + +See the [credentials][credentials_pkg] package documentation for more information on credential +providers included with the SDK, and how to customize the SDK's usage of +credentials. + +The SDK has support for the shared configuration file (~/.aws/config). This +support can be enabled by setting the environment variable, "AWS_SDK_LOAD_CONFIG=1", +or enabling the feature in code when creating a Session via the +Option's SharedConfigState parameter. + +```go + sess := session.Must(session.NewSessionWithOptions(session.Options{ + SharedConfigState: session.SharedConfigEnable, + })) ``` -[default] -aws_access_key_id = AKID1234567890 -aws_secret_access_key = MY-SECRET-KEY + +[credentials_pkg]: ttps://docs.aws.amazon.com/sdk-for-go/api/aws/credentials + +### Configuring AWS Region + +In addition to the credentials you'll need to specify the region the SDK +will use to make AWS API requests to. In the SDK you can specify the region +either with an environment variable, or directly in code when a Session or +service client is created. The last value specified in code wins if the region +is specified multiple ways. + +To set the region via the environment variable set the "AWS_REGION" to the +region you want to the SDK to use. Using this method to set the region will +allow you to run your application in multiple regions without needing additional +code in the application to select the region. + + AWS_REGION=us-west-2 + +The endpoints package includes constants for all regions the SDK knows. The +values are all suffixed with RegionID. These values are helpful, because they +reduce the need to type the region string manually. + +To set the region on a Session use the aws package's Config struct parameter +Region to the AWS region you want the service clients created from the session to +use. This is helpful when you want to create multiple service clients, and +all of the clients make API requests to the same region. + +```go + sess := session.Must(session.NewSession(&aws.Config{ + Region: aws.String(endpoints.UsWest2RegionID), + })) ``` -You can learn more about the credentials file from this -[blog post](http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs). +See the [endpoints][endpoints_pkg] package for the AWS Regions and Endpoints metadata. -Alternatively, you can set the following environment variables: +In addition to setting the region when creating a Session you can also set +the region on a per service client bases. This overrides the region of a +Session. This is helpful when you want to create service clients in specific +regions different from the Session's region. +```go + svc := s3.New(sess, &aws.Config{ + Region: aws.String(endpoints.UsWest2RegionID), + }) ``` -AWS_ACCESS_KEY_ID=AKID1234567890 -AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY + +See the [Config][config_typ] type in the [aws][aws_pkg] package for more information and additional +options such as setting the Endpoint, and other service client configuration options. + +[endpoints_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/ + +## Making API Requests + +Once the client is created you can make an API request to the service. +Each API method takes a input parameter, and returns the service response +and an error. The SDK provides methods for making the API call in multiple ways. + +In this list we'll use the S3 ListObjects API as an example for the different +ways of making API requests. + + * ListObjects - Base API operation that will make the API request to the service. + + * ListObjectsRequest - API methods suffixed with Request will construct the + API request, but not send it. This is also helpful when you want to get a + presigned URL for a request, and share the presigned URL instead of your + application making the request directly. + + * ListObjectsPages - Same as the base API operation, but uses a callback to + automatically handle pagination of the API's response. + + * ListObjectsWithContext - Same as base API operation, but adds support for + the Context pattern. This is helpful for controlling the canceling of in + flight requests. See the Go standard library context package for more + information. This method also takes request package's Option functional + options as the variadic argument for modifying how the request will be + made, or extracting information from the raw HTTP response. + + * ListObjectsPagesWithContext - same as ListObjectsPages, but adds support for + the Context pattern. Similar to ListObjectsWithContext this method also + takes the request package's Option function option types as the variadic + argument. + +In addition to the API operations the SDK also includes several higher level +methods that abstract checking for and waiting for an AWS resource to be in +a desired state. In this list we'll use WaitUntilBucketExists to demonstrate +the different forms of waiters. + + * WaitUntilBucketExists. - Method to make API request to query an AWS service for + a resource's state. Will return successfully when that state is accomplished. + + * WaitUntilBucketExistsWithContext - Same as WaitUntilBucketExists, but adds + support for the Context pattern. In addition these methods take request + package's WaiterOptions to configure the waiter, and how underlying request + will be made by the SDK. + +The API method will document which error codes the service might return for +the operation. These errors will also be available as const strings prefixed +with "ErrCode" in the service client's package. If there are no errors listed +in the API's SDK documentation you'll need to consult the AWS service's API +documentation for the errors that could be returned. + +```go + ctx := context.Background() + + result, err := svc.GetObjectWithContext(ctx, &s3.GetObjectInput{ + Bucket: aws.String("my-bucket"), + Key: aws.String("my-key"), + }) + if err != nil { + // Cast err to awserr.Error to handle specific error codes. + aerr, ok := err.(awserr.Error) + if ok && aerr.Code() == s3.ErrCodeNoSuchKey { + // Specific error code handling + } + return err + } + + // Make sure to close the body when done with it for S3 GetObject APIs or + // will leak connections. + defer result.Body.Close() + + fmt.Println("Object Size:", aws.StringValue(result.ContentLength)) ``` -### AWS shared config file (`~/.aws/config`) -The AWS SDK for Go added support the shared config file in release [v1.3.0](https://github.com/aws/aws-sdk-go/releases/tag/v1.3.0). You can opt into enabling support for the shared config by setting the environment variable `AWS_SDK_LOAD_CONFIG` to a truthy value. See the [Session](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/sessions.html) docs for more information about this feature. +### API Request Pagination and Resource Waiters -## Using the Go SDK +Pagination helper methods are suffixed with "Pages", and provide the +functionality needed to round trip API page requests. Pagination methods +take a callback function that will be called for each page of the API's response. -To use a service in the SDK, create a service variable by calling the `New()` -function. Once you have a service client, you can call API operations which each -return response data and a possible error. +```go + objects := []string{} + err := svc.ListObjectsPagesWithContext(ctx, &s3.ListObjectsInput{ + Bucket: aws.String(myBucket), + }, func(p *s3.ListObjectsOutput, lastPage bool) bool { + for _, o := range p.Contents { + objects = append(objects, aws.StringValue(o.Key)) + } + return true // continue paging + }) + if err != nil { + panic(fmt.Sprintf("failed to list objects for bucket, %s, %v", myBucket, err)) + } + + fmt.Println("Objects in bucket:", objects) +``` -For example the following code shows how to upload an object to Amazon S3 with a Context timeout. +Waiter helper methods provide the functionality to wait for an AWS resource +state. These methods abstract the logic needed to to check the state of an +AWS resource, and wait until that resource is in a desired state. The waiter +will block until the resource is in the state that is desired, an error occurs, +or the waiter times out. If a resource times out the error code returned will +be request.WaiterResourceNotReadyErrorCode. ```go -package main - -import ( - "context" - "flag" - "fmt" - "os" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/aws/aws-sdk-go/service/s3" -) - -// Uploads a file to S3 given a bucket and object key. Also takes a duration -// value to terminate the update if it doesn't complete within that time. -// -// The AWS Region needs to be provided in the AWS shared config or on the -// environment variable as `AWS_REGION`. Credentials also must be provided -// Will default to shared config file, but can load from environment if provided. -// -// Usage: -// # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail -// go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt -func main() { - var bucket, key string - var timeout time.Duration - - flag.StringVar(&bucket, "b", "", "Bucket name.") - flag.StringVar(&key, "k", "", "Object key name.") - flag.DurationVar(&timeout, "d", 0, "Upload timeout.") - flag.Parse() - - sess := session.Must(session.NewSession()) - svc := s3.New(sess) - - // Create a context with a timeout that will abort the upload if it takes - // more than the passed in timeout. - ctx := context.Background() - var cancelFn func() - if timeout > 0 { - ctx, cancelFn = context.WithTimeout(ctx, timeout) - } - // Ensure the context is canceled to prevent leaking. - // See context package for more information, https://golang.org/pkg/context/ - defer cancelFn() - - // Uploads the object to S3. The Context will interrupt the request if the - // timeout expires. - _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - Body: os.Stdin, - }) - if err != nil { - if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode { - // If the SDK can determine the request or retry delay was canceled - // by a context the CanceledErrorCode error code will be returned. - fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err) - } else { - fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err) - } - os.Exit(1) - } - - fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key) -} + err := svc.WaitUntilBucketExistsWithContext(ctx, &s3.HeadBucketInput{ + Bucket: aws.String(myBucket), + }) + if err != nil { + aerr, ok := err.(awserr.Error) + if ok && aerr.Code() == request.WaiterResourceNotReadyErrorCode { + fmt.Fprintf(os.Stderr, "timed out while waiting for bucket to exist") + } + panic(fmt.Errorf("failed to wait for bucket to exist, %v", err)) + } + fmt.Println("Bucket", myBucket, "exists") ``` -You can find more information and operations in our -[API documentation](http://docs.aws.amazon.com/sdk-for-go/api/). +## Complete SDK Example + +This example shows a complete working Go file which will upload a file to S3 +and use the Context pattern to implement timeout logic that will cancel the +request if it takes too long. This example highlights how to use sessions, +create a service client, make a request, handle the error, and process the +response. + +```go + package main + + import ( + "context" + "flag" + "fmt" + "os" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/s3" + ) + + // Uploads a file to S3 given a bucket and object key. Also takes a duration + // value to terminate the update if it doesn't complete within that time. + // + // The AWS Region needs to be provided in the AWS shared config or on the + // environment variable as `AWS_REGION`. Credentials also must be provided + // Will default to shared config file, but can load from environment if provided. + // + // Usage: + // # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail + // go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt + func main() { + var bucket, key string + var timeout time.Duration + + flag.StringVar(&bucket, "b", "", "Bucket name.") + flag.StringVar(&key, "k", "", "Object key name.") + flag.DurationVar(&timeout, "d", 0, "Upload timeout.") + flag.Parse() + + // All clients require a Session. The Session provides the client with + // shared configuration such as region, endpoint, and credentials. A + // Session should be shared where possible to take advantage of + // configuration and credential caching. See the session package for + // more information. + sess := session.Must(session.NewSession()) + + // Create a new instance of the service's client with a Session. + // Optional aws.Config values can also be provided as variadic arguments + // to the New function. This option allows you to provide service + // specific configuration. + svc := s3.New(sess) + + // Create a context with a timeout that will abort the upload if it takes + // more than the passed in timeout. + ctx := context.Background() + var cancelFn func() + if timeout > 0 { + ctx, cancelFn = context.WithTimeout(ctx, timeout) + } + // Ensure the context is canceled to prevent leaking. + // See context package for more information, https://golang.org/pkg/context/ + defer cancelFn() + + // Uploads the object to S3. The Context will interrupt the request if the + // timeout expires. + _, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{ + Bucket: aws.String(bucket), + Key: aws.String(key), + Body: os.Stdin, + }) + if err != nil { + if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode { + // If the SDK can determine the request or retry delay was canceled + // by a context the CanceledErrorCode error code will be returned. + fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err) + } else { + fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err) + } + os.Exit(1) + } + + fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key) + } +``` ## License diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go index 48b0fbd9..788fe6e2 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go @@ -2,10 +2,8 @@ package client import ( "fmt" - "net/http/httputil" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/client/metadata" "github.com/aws/aws-sdk-go/aws/request" ) @@ -90,60 +88,3 @@ func (c *Client) AddDebugHandlers() { c.Handlers.Send.PushFrontNamed(request.NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest}) c.Handlers.Send.PushBackNamed(request.NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse}) } - -const logReqMsg = `DEBUG: Request %s/%s Details: ----[ REQUEST POST-SIGN ]----------------------------- -%s ------------------------------------------------------` - -const logReqErrMsg = `DEBUG ERROR: Request %s/%s: ----[ REQUEST DUMP ERROR ]----------------------------- -%s ------------------------------------------------------` - -func logRequest(r *request.Request) { - logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) - dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) - if err != nil { - r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) - r.Error = awserr.New(request.ErrCodeRead, "an error occurred during request body reading", err) - return - } - - if logBody { - // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's - // Body as a NoOpCloser and will not be reset after read by the HTTP - // client reader. - r.ResetBody() - } - - r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody))) -} - -const logRespMsg = `DEBUG: Response %s/%s Details: ----[ RESPONSE ]-------------------------------------- -%s ------------------------------------------------------` - -const logRespErrMsg = `DEBUG ERROR: Response %s/%s: ----[ RESPONSE DUMP ERROR ]----------------------------- -%s ------------------------------------------------------` - -func logResponse(r *request.Request) { - var msg = "no response data" - if r.HTTPResponse != nil { - logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) - dumpedBody, err := httputil.DumpResponse(r.HTTPResponse, logBody) - if err != nil { - r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) - r.Error = awserr.New(request.ErrCodeRead, "an error occurred during response body reading", err) - return - } - - msg = string(dumpedBody) - } else if r.Error != nil { - msg = r.Error.Error() - } - r.Config.Logger.Log(fmt.Sprintf(logRespMsg, r.ClientInfo.ServiceName, r.Operation.Name, msg)) -} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go new file mode 100644 index 00000000..1f39c91f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go @@ -0,0 +1,108 @@ +package client + +import ( + "bytes" + "fmt" + "io" + "io/ioutil" + "net/http/httputil" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +const logReqMsg = `DEBUG: Request %s/%s Details: +---[ REQUEST POST-SIGN ]----------------------------- +%s +-----------------------------------------------------` + +const logReqErrMsg = `DEBUG ERROR: Request %s/%s: +---[ REQUEST DUMP ERROR ]----------------------------- +%s +------------------------------------------------------` + +type logWriter struct { + // Logger is what we will use to log the payload of a response. + Logger aws.Logger + // buf stores the contents of what has been read + buf *bytes.Buffer +} + +func (logger *logWriter) Write(b []byte) (int, error) { + return logger.buf.Write(b) +} + +type teeReaderCloser struct { + // io.Reader will be a tee reader that is used during logging. + // This structure will read from a body and write the contents to a logger. + io.Reader + // Source is used just to close when we are done reading. + Source io.ReadCloser +} + +func (reader *teeReaderCloser) Close() error { + return reader.Source.Close() +} + +func logRequest(r *request.Request) { + logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) + dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody) + if err != nil { + r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err)) + return + } + + if logBody { + // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's + // Body as a NoOpCloser and will not be reset after read by the HTTP + // client reader. + r.ResetBody() + } + + r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody))) +} + +const logRespMsg = `DEBUG: Response %s/%s Details: +---[ RESPONSE ]-------------------------------------- +%s +-----------------------------------------------------` + +const logRespErrMsg = `DEBUG ERROR: Response %s/%s: +---[ RESPONSE DUMP ERROR ]----------------------------- +%s +-----------------------------------------------------` + +func logResponse(r *request.Request) { + lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)} + r.HTTPResponse.Body = &teeReaderCloser{ + Reader: io.TeeReader(r.HTTPResponse.Body, lw), + Source: r.HTTPResponse.Body, + } + + handlerFn := func(req *request.Request) { + body, err := httputil.DumpResponse(req.HTTPResponse, false) + if err != nil { + lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) + return + } + + b, err := ioutil.ReadAll(lw.buf) + if err != nil { + lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err)) + return + } + lw.Logger.Log(fmt.Sprintf(logRespMsg, req.ClientInfo.ServiceName, req.Operation.Name, string(body))) + if req.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) { + lw.Logger.Log(string(b)) + } + } + + const handlerName = "awsdk.client.LogResponse.ResponseBody" + + r.Handlers.Unmarshal.SetBackNamed(request.NamedHandler{ + Name: handlerName, Fn: handlerFn, + }) + r.Handlers.UnmarshalError.SetBackNamed(request.NamedHandler{ + Name: handlerName, Fn: handlerFn, + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go new file mode 100644 index 00000000..b8d600c9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go @@ -0,0 +1,57 @@ +package client + +import ( + "bytes" + "io" + "testing" +) + +type mockCloser struct { + closed bool +} + +func (closer *mockCloser) Read(b []byte) (int, error) { + return 0, io.EOF +} + +func (closer *mockCloser) Close() error { + closer.closed = true + return nil +} + +func TestTeeReaderCloser(t *testing.T) { + expected := "FOO" + buf := bytes.NewBuffer([]byte(expected)) + lw := bytes.NewBuffer(nil) + c := &mockCloser{} + closer := teeReaderCloser{ + io.TeeReader(buf, lw), + c, + } + + b := make([]byte, len(expected)) + _, err := closer.Read(b) + closer.Close() + + if expected != lw.String() { + t.Errorf("Expected %q, but received %q", expected, lw.String()) + } + + if err != nil { + t.Errorf("Expected 'nil', but received %v", err) + } + + if !c.closed { + t.Error("Expected 'true', but received 'false'") + } +} + +func TestLogWriter(t *testing.T) { + expected := "FOO" + lw := &logWriter{nil, bytes.NewBuffer(nil)} + lw.Write([]byte(expected)) + + if expected != lw.buf.String() { + t.Errorf("Expected %q, but received %q", expected, lw.buf.String()) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go index 25b461c3..495e3ef6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go @@ -106,6 +106,22 @@ var SendHandler = request.NamedHandler{ sender = sendWithoutFollowRedirects } + if request.NoBody == r.HTTPRequest.Body { + // Strip off the request body if the NoBody reader was used as a + // place holder for a request body. This prevents the SDK from + // making requests with a request body when it would be invalid + // to do so. + // + // Use a shallow copy of the http.Request to ensure the race condition + // of transport on Body will not trigger + reqOrig, reqCopy := r.HTTPRequest, *r.HTTPRequest + reqCopy.Body = nil + r.HTTPRequest = &reqCopy + defer func() { + r.HTTPRequest = reqOrig + }() + } + var err error r.HTTPResponse, err = sender(r) if err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_1_8_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_1_8_test.go new file mode 100644 index 00000000..b47afc24 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_1_8_test.go @@ -0,0 +1,64 @@ +// +build go1.8 + +package corehandlers_test + +import ( + "crypto/tls" + "net/http" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/awstesting" + "github.com/aws/aws-sdk-go/service/s3" + "golang.org/x/net/http2" +) + +func TestSendHandler_HEADNoBody(t *testing.T) { + TLSBundleCertFile, TLSBundleKeyFile, TLSBundleCAFile, err := awstesting.CreateTLSBundleFiles() + if err != nil { + panic(err) + } + defer awstesting.CleanupTLSBundleFiles(TLSBundleCertFile, TLSBundleKeyFile, TLSBundleCAFile) + + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + transport := http.DefaultTransport.(*http.Transport) + // test server's certificate is self-signed certificate + transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} + http2.ConfigureTransport(transport) + + sess, err := session.NewSessionWithOptions(session.Options{ + Config: aws.Config{ + HTTPClient: &http.Client{}, + Endpoint: aws.String(endpoint), + Region: aws.String("mock-region"), + Credentials: credentials.AnonymousCredentials, + S3ForcePathStyle: aws.Bool(true), + }, + }) + + svc := s3.New(sess) + + req, _ := svc.HeadObjectRequest(&s3.HeadObjectInput{ + Bucket: aws.String("bucketname"), + Key: aws.String("keyname"), + }) + + if e, a := request.NoBody, req.HTTPRequest.Body; e != a { + t.Fatalf("expect %T request body, got %T", e, a) + } + + err = req.Send() + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, req.HTTPResponse.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go index 6efc77bf..f298d659 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go @@ -13,7 +13,7 @@ var ( // // @readonly ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders", - `no valid providers in chain. Deprecated. + `no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors`, nil) ) @@ -39,16 +39,18 @@ var ( // does not return any credentials ChainProvider will return the error // ErrNoValidProvidersFoundInChain // -// creds := NewChainCredentials( -// []Provider{ -// &EnvProvider{}, -// &EC2RoleProvider{ +// creds := credentials.NewChainCredentials( +// []credentials.Provider{ +// &credentials.EnvProvider{}, +// &ec2rolecreds.EC2RoleProvider{ // Client: ec2metadata.New(sess), // }, // }) // // // Usage of ChainCredentials with aws.Config -// svc := ec2.New(&aws.Config{Credentials: creds}) +// svc := ec2.New(session.Must(session.NewSession(&aws.Config{ +// Credentials: creds, +// }))) // type ChainProvider struct { Providers []Provider diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go index 03630cf0..42416fc2 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go @@ -14,7 +14,7 @@ // // Example of using the environment variable credentials. // -// creds := NewEnvCredentials() +// creds := credentials.NewEnvCredentials() // // // Retrieve the credentials value // credValue, err := creds.Get() @@ -26,7 +26,7 @@ // This may be helpful to proactively expire credentials and refresh them sooner // than they would naturally expire on their own. // -// creds := NewCredentials(&EC2RoleProvider{}) +// creds := credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{}) // creds.Expire() // credsValue, err := creds.Get() // // New credentials will be retrieved instead of from cache. @@ -43,7 +43,7 @@ // func (m *MyProvider) Retrieve() (Value, error) {...} // func (m *MyProvider) IsExpired() bool {...} // -// creds := NewCredentials(&MyProvider{}) +// creds := credentials.NewCredentials(&MyProvider{}) // credValue, err := creds.Get() // package credentials @@ -60,7 +60,9 @@ import ( // when making service API calls. For example, when accessing public // s3 buckets. // -// svc := s3.New(&aws.Config{Credentials: AnonymousCredentials}) +// svc := s3.New(session.Must(session.NewSession(&aws.Config{ +// Credentials: credentials.AnonymousCredentials, +// }))) // // Access public S3 buckets. // // @readonly diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go index 96655bc4..c14231a1 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go @@ -29,6 +29,7 @@ var ( // Environment variables used: // // * Access Key ID: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY +// // * Secret Access Key: AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY type EnvProvider struct { retrieved bool diff --git a/vendor/github.com/aws/aws-sdk-go/aws/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/doc.go new file mode 100644 index 00000000..4fcb6161 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/doc.go @@ -0,0 +1,56 @@ +// Package aws provides the core SDK's utilities and shared types. Use this package's +// utilities to simplify setting and reading API operations parameters. +// +// Value and Pointer Conversion Utilities +// +// This package includes a helper conversion utility for each scalar type the SDK's +// API use. These utilities make getting a pointer of the scalar, and dereferencing +// a pointer easier. +// +// Each conversion utility comes in two forms. Value to Pointer and Pointer to Value. +// The Pointer to value will safely dereference the pointer and return its value. +// If the pointer was nil, the scalar's zero value will be returned. +// +// The value to pointer functions will be named after the scalar type. So get a +// *string from a string value use the "String" function. This makes it easy to +// to get pointer of a literal string value, because getting the address of a +// literal requires assigning the value to a variable first. +// +// var strPtr *string +// +// // Without the SDK's conversion functions +// str := "my string" +// strPtr = &str +// +// // With the SDK's conversion functions +// strPtr = aws.String("my string") +// +// // Convert *string to string value +// str = aws.StringValue(strPtr) +// +// In addition to scalars the aws package also includes conversion utilities for +// map and slice for commonly types used in API parameters. The map and slice +// conversion functions use similar naming pattern as the scalar conversion +// functions. +// +// var strPtrs []*string +// var strs []string = []string{"Go", "Gophers", "Go"} +// +// // Convert []string to []*string +// strPtrs = aws.StringSlice(strs) +// +// // Convert []*string to []string +// strs = aws.StringValueSlice(strPtrs) +// +// SDK Default HTTP Client +// +// The SDK will use the http.DefaultClient if a HTTP client is not provided to +// the SDK's Session, or service client constructor. This means that if the +// http.DefaultClient is modified by other components of your application the +// modifications will be picked up by the SDK as well. +// +// In some cases this might be intended, but it is a better practice to create +// a custom HTTP Client to share explicitly through your application. You can +// configure the SDK to use the custom HTTP Client by setting the HTTPClient +// value of the SDK's Config type when creating a Session or service client. +package aws diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 90558c44..e6d7ede6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -60,6 +60,7 @@ const ( CodecommitServiceID = "codecommit" // Codecommit. CodedeployServiceID = "codedeploy" // Codedeploy. CodepipelineServiceID = "codepipeline" // Codepipeline. + CodestarServiceID = "codestar" // Codestar. CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity. CognitoIdpServiceID = "cognito-idp" // CognitoIdp. CognitoSyncServiceID = "cognito-sync" // CognitoSync. @@ -83,6 +84,7 @@ const ( ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce. ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder. EmailServiceID = "email" // Email. + EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace. EsServiceID = "es" // Es. EventsServiceID = "events" // Events. FirehoseServiceID = "firehose" // Firehose. @@ -494,11 +496,21 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "codestar": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "cognito-identity": service{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -513,6 +525,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -527,6 +540,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, @@ -841,6 +855,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "entitlement.marketplace": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "aws-marketplace", + }, + }, + Endpoints: endpoints{ + "us-east-1": endpoint{}, + }, + }, "es": service{ Endpoints: endpoints{ @@ -1491,6 +1515,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index 64dccea4..9c3eedb4 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -129,10 +129,10 @@ type EnumPartitions interface { // as the second parameter. // // This example shows how to get the regions for DynamoDB in the AWS partition. -// rs := RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamoDBServiceID) +// rs, exists := endpoints.RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamodbServiceID) // // This is equivalent to using the partition directly. -// rs := endpoints.AwsPartition().Services()[endpoints.DynamoDBServiceID].Regions() +// rs := endpoints.AwsPartition().Services()[endpoints.DynamodbServiceID].Regions() func RegionsForService(ps []Partition, partitionID, serviceID string) (map[string]Region, bool) { for _, p := range ps { if p.ID() != partitionID { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go b/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go index a94f0410..91a6f277 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go @@ -4,7 +4,8 @@ package aws // into a json string. This type can be used just like any other map. // // Example: -// values := JSONValue{ +// +// values := aws.JSONValue{ // "Foo": "Bar", // } // values["Baz"] = "Qux" diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go index 10fc8cb2..271da432 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go @@ -1,4 +1,4 @@ -// +build !appengine +// +build !appengine,!plan9 package request diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go deleted file mode 100644 index 996196e7..00000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build appengine - -package request - -import ( - "strings" -) - -func isErrConnectionReset(err error) bool { - return strings.Contains(err.Error(), "connection reset") -} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine_test.go deleted file mode 100644 index 29660da2..00000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine_test.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build appengine - -package request_test - -import ( - "errors" -) - -var stubConnectionResetError = errors.New("connection reset") diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go new file mode 100644 index 00000000..daf9eca4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go @@ -0,0 +1,11 @@ +// +build appengine plan9 + +package request + +import ( + "strings" +) + +func isErrConnectionReset(err error) bool { + return strings.Contains(err.Error(), "connection reset") +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other_test.go new file mode 100644 index 00000000..aba8eb4e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other_test.go @@ -0,0 +1,9 @@ +// +build appengine plan9 + +package request_test + +import ( + "errors" +) + +var stubConnectionResetError = errors.New("connection reset") diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_test.go index f02c507d..bb5f6bdd 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_test.go @@ -1,4 +1,4 @@ -// +build !appengine +// +build !appengine,!plan9 package request_test diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go index 6c14336f..802ac88a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go @@ -158,6 +158,37 @@ func (l *HandlerList) RemoveByName(name string) { } } +// SwapNamed will swap out any existing handlers with the same name as the +// passed in NamedHandler returning true if handlers were swapped. False is +// returned otherwise. +func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) { + for i := 0; i < len(l.list); i++ { + if l.list[i].Name == n.Name { + l.list[i].Fn = n.Fn + swapped = true + } + } + + return swapped +} + +// SetBackNamed will replace the named handler if it exists in the handler list. +// If the handler does not exist the handler will be added to the end of the list. +func (l *HandlerList) SetBackNamed(n NamedHandler) { + if !l.SwapNamed(n) { + l.PushBackNamed(n) + } +} + +// SetFrontNamed will replace the named handler if it exists in the handler list. +// If the handler does not exist the handler will be added to the beginning of +// the list. +func (l *HandlerList) SetFrontNamed(n NamedHandler) { + if !l.SwapNamed(n) { + l.PushFrontNamed(n) + } +} + // Run executes all handlers in the list with a given request object. func (l *HandlerList) Run(r *Request) { for i, h := range l.list { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers_test.go index e375a998..b2da558d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers_test.go @@ -1,10 +1,9 @@ package request_test import ( + "reflect" "testing" - "github.com/stretchr/testify/assert" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/awstesting/unit" @@ -20,8 +19,12 @@ func TestHandlerList(t *testing.T) { r.Data = s }) l.Run(r) - assert.Equal(t, "a", s) - assert.Equal(t, "a", r.Data) + if e, a := "a", s; e != a { + t.Errorf("expect %q update got %q", e, a) + } + if e, a := "a", r.Data.(string); e != a { + t.Errorf("expect %q data update got %q", e, a) + } } func TestMultipleHandlers(t *testing.T) { @@ -43,9 +46,110 @@ func TestNamedHandlers(t *testing.T) { l.PushBackNamed(named) l.PushBackNamed(named2) l.PushBack(func(r *request.Request) {}) - assert.Equal(t, 4, l.Len()) + if e, a := 4, l.Len(); e != a { + t.Errorf("expect %d list length, got %d", e, a) + } l.Remove(named) - assert.Equal(t, 2, l.Len()) + if e, a := 2, l.Len(); e != a { + t.Errorf("expect %d list length, got %d", e, a) + } +} + +func TestSwapHandlers(t *testing.T) { + firstHandlerCalled := 0 + swappedOutHandlerCalled := 0 + swappedInHandlerCalled := 0 + + l := request.HandlerList{} + named := request.NamedHandler{Name: "Name", Fn: func(r *request.Request) { + firstHandlerCalled++ + }} + named2 := request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedOutHandlerCalled++ + }} + l.PushBackNamed(named) + l.PushBackNamed(named2) + l.PushBackNamed(named) + + l.SwapNamed(request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedInHandlerCalled++ + }}) + + l.Run(&request.Request{}) + + if e, a := 2, firstHandlerCalled; e != a { + t.Errorf("expect first handler to be called %d, was called %d times", e, a) + } + if n := swappedOutHandlerCalled; n != 0 { + t.Errorf("expect swapped out handler to not be called, was called %d times", n) + } + if e, a := 1, swappedInHandlerCalled; e != a { + t.Errorf("expect swapped in handler to be called %d, was called %d times", e, a) + } +} + +func TestSetBackNamed_Exists(t *testing.T) { + firstHandlerCalled := 0 + swappedOutHandlerCalled := 0 + swappedInHandlerCalled := 0 + + l := request.HandlerList{} + named := request.NamedHandler{Name: "Name", Fn: func(r *request.Request) { + firstHandlerCalled++ + }} + named2 := request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedOutHandlerCalled++ + }} + l.PushBackNamed(named) + l.PushBackNamed(named2) + + l.SetBackNamed(request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedInHandlerCalled++ + }}) + + l.Run(&request.Request{}) + + if e, a := 1, firstHandlerCalled; e != a { + t.Errorf("expect first handler to be called %d, was called %d times", e, a) + } + if n := swappedOutHandlerCalled; n != 0 { + t.Errorf("expect swapped out handler to not be called, was called %d times", n) + } + if e, a := 1, swappedInHandlerCalled; e != a { + t.Errorf("expect swapped in handler to be called %d, was called %d times", e, a) + } +} + +func TestSetBackNamed_NotExists(t *testing.T) { + firstHandlerCalled := 0 + secondHandlerCalled := 0 + swappedInHandlerCalled := 0 + + l := request.HandlerList{} + named := request.NamedHandler{Name: "Name", Fn: func(r *request.Request) { + firstHandlerCalled++ + }} + named2 := request.NamedHandler{Name: "OtherName", Fn: func(r *request.Request) { + secondHandlerCalled++ + }} + l.PushBackNamed(named) + l.PushBackNamed(named2) + + l.SetBackNamed(request.NamedHandler{Name: "SwapOutName", Fn: func(r *request.Request) { + swappedInHandlerCalled++ + }}) + + l.Run(&request.Request{}) + + if e, a := 1, firstHandlerCalled; e != a { + t.Errorf("expect first handler to be called %d, was called %d times", e, a) + } + if e, a := 1, secondHandlerCalled; e != a { + t.Errorf("expect second handler to be called %d, was called %d times", e, a) + } + if e, a := 1, swappedInHandlerCalled; e != a { + t.Errorf("expect swapped in handler to be called %d, was called %d times", e, a) + } } func TestLoggedHandlers(t *testing.T) { @@ -63,7 +167,10 @@ func TestLoggedHandlers(t *testing.T) { l.PushBackNamed(named2) l.Run(&request.Request{Config: cfg}) - assert.Equal(t, expectedHandlers, loggedHandlers) + if !reflect.DeepEqual(expectedHandlers, loggedHandlers) { + t.Errorf("expect handlers executed %v to match logged handlers, %v", + expectedHandlers, loggedHandlers) + } } func TestStopHandlers(t *testing.T) { @@ -81,11 +188,13 @@ func TestStopHandlers(t *testing.T) { called++ }}) l.PushBackNamed(request.NamedHandler{Name: "name3", Fn: func(r *request.Request) { - assert.Fail(t, "third handler should not be called") + t.Fatalf("third handler should not be called") }}) l.Run(&request.Request{}) - assert.Equal(t, 2, called, "Expect only two handlers to be called") + if e, a := 2, called; e != a { + t.Errorf("expect %d handlers called, got %d", e, a) + } } func BenchmarkNewRequest(b *testing.B) { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index 4f4f1123..1d462550 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -368,7 +368,7 @@ func (r *Request) ResetBody() { } if l == 0 { - r.HTTPRequest.Body = noBodyReader + r.HTTPRequest.Body = NoBody } else if l > 0 { r.HTTPRequest.Body = r.safeBody } else { @@ -382,7 +382,7 @@ func (r *Request) ResetBody() { // a io.Reader that was not also an io.Seeker. switch r.Operation.HTTPMethod { case "GET", "HEAD", "DELETE": - r.HTTPRequest.Body = noBodyReader + r.HTTPRequest.Body = NoBody default: r.HTTPRequest.Body = r.safeBody } @@ -488,7 +488,7 @@ func (r *Request) Send() error { r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil { - debugLogReqError(r, "Send Request", false, r.Error) + debugLogReqError(r, "Send Request", false, err) return r.Error } debugLogReqError(r, "Send Request", true, err) @@ -497,12 +497,13 @@ func (r *Request) Send() error { r.Handlers.UnmarshalMeta.Run(r) r.Handlers.ValidateResponse.Run(r) if r.Error != nil { - err := r.Error r.Handlers.UnmarshalError.Run(r) + err := r.Error + r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil { - debugLogReqError(r, "Validate Response", false, r.Error) + debugLogReqError(r, "Validate Response", false, err) return r.Error } debugLogReqError(r, "Validate Response", true, err) @@ -515,7 +516,7 @@ func (r *Request) Send() error { r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) if r.Error != nil { - debugLogReqError(r, "Unmarshal Response", false, r.Error) + debugLogReqError(r, "Unmarshal Response", false, err) return r.Error } debugLogReqError(r, "Unmarshal Response", true, err) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go index 1323af90..2665e818 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go @@ -16,6 +16,6 @@ func (noBody) Read([]byte) (int, error) { return 0, io.EOF } func (noBody) Close() error { return nil } func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil } -// Is an empty reader that will trigger the Go HTTP client to not include +// NoBody is an empty reader that will trigger the Go HTTP client to not include // and body in the HTTP request. -var noBodyReader = noBody{} +var NoBody = noBody{} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go index 8b963f4d..8ac66b78 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go @@ -2,8 +2,10 @@ package request -import "net/http" +import ( + "net/http" +) -// Is a http.NoBody reader instructing Go HTTP client to not include +// NoBody is a http.NoBody reader instructing Go HTTP client to not include // and body in the HTTP request. -var noBodyReader = http.NoBody +var NoBody = http.NoBody diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go index 4efc5057..4a917248 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_resetbody_test.go @@ -50,7 +50,7 @@ func TestResetBody_ExcludeUnseekableBodyByMethod(t *testing.T) { r.SetReaderBody(reader) - if a, e := r.HTTPRequest.Body == noBodyReader, c.IsNoBody; a != e { + if a, e := r.HTTPRequest.Body == NoBody, c.IsNoBody; a != e { t.Errorf("%d, expect body to be set to noBody(%t), but was %t", i, e, a) } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go index c741b5ee..eec650b6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_test.go @@ -3,7 +3,6 @@ package request_test import ( "bytes" "encoding/json" - "errors" "fmt" "io" "io/ioutil" @@ -762,31 +761,20 @@ func (reader *errReader) Close() error { return nil } -func TestLoggerNotIgnoringErrors(t *testing.T) { - s := awstesting.NewClient(&aws.Config{ - Region: aws.String("mock-region"), - MaxRetries: aws.Int(0), - DisableSSL: aws.Bool(true), - LogLevel: aws.LogLevel(aws.LogDebugWithHTTPBody), - }) - - s.Handlers.Validate.Clear() - s.Handlers.Send.Clear() - s.Handlers.Send.PushBack(func(r *request.Request) { - r.HTTPResponse = &http.Response{StatusCode: 200, Body: &errReader{errors.New("Foo error")}} - }) - s.AddDebugHandlers() - - out := &testData{} - r := s.NewRequest(&request.Operation{Name: "Operation"}, nil, out) - err := r.Send() - if err == nil { - t.Error("expected error, but got nil") +func TestIsNoBodyReader(t *testing.T) { + cases := []struct { + reader io.ReadCloser + expect bool + }{ + {ioutil.NopCloser(bytes.NewReader([]byte("abc"))), false}, + {ioutil.NopCloser(bytes.NewReader(nil)), false}, + {nil, false}, + {request.NoBody, true}, } - if aerr, ok := err.(awserr.Error); !ok { - t.Errorf("expected awserr.Error, but got different error, %v", err) - } else if aerr.Code() != request.ErrCodeRead { - t.Errorf("expected %q, but received %q", request.ErrCodeRead, aerr.Code()) + for i, c := range cases { + if e, a := c.expect, request.NoBody == c.reader; e != a { + t.Errorf("%d, expect %t match, but was %t", i, e, a) + } } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go index 7af81de2..e36aa382 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go @@ -38,7 +38,6 @@ var throttleCodes = map[string]struct{}{ "ThrottlingException": {}, "RequestLimitExceeded": {}, "RequestThrottled": {}, - "LimitExceededException": {}, // Deleting 10+ DynamoDb tables at once "TooManyRequestsException": {}, // Lambda functions "PriorRequestNotComplete": {}, // Route53 } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go index 854b0854..22d2f809 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go @@ -66,8 +66,8 @@ func WithWaiterRequestOptions(opts ...Option) WaiterOption { } } -// A Waiter provides the functionality to performing blocking call which will -// wait for an resource state to be satisfied a service. +// A Waiter provides the functionality to perform a blocking call which will +// wait for a resource state to be satisfied by a service. // // This type should not be used directly. The API operations provided in the // service packages prefixed with "WaitUntil" should be used instead. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_ca_bundle_test.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_ca_bundle_test.go index 8a5a3a04..52e59d99 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_ca_bundle_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_ca_bundle_test.go @@ -2,90 +2,76 @@ package session import ( "bytes" - "crypto/tls" - "io/ioutil" + "fmt" "net" "net/http" - "net/http/httptest" "os" + "strings" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/stretchr/testify/assert" + "github.com/aws/aws-sdk-go/awstesting" ) -func createTLSServer(cert, key []byte, done <-chan struct{}) (*httptest.Server, error) { - c, err := tls.X509KeyPair(cert, key) - if err != nil { - return nil, err - } - - s := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - })) - s.TLS = &tls.Config{ - Certificates: []tls.Certificate{c}, - } - s.TLS.BuildNameToCertificate() - s.StartTLS() +var TLSBundleCertFile string +var TLSBundleKeyFile string +var TLSBundleCAFile string - go func() { - <-done - s.Close() - }() +func TestMain(m *testing.M) { + var err error - return s, nil -} - -func setupTestCAFile(b []byte) (string, error) { - bundleFile, err := ioutil.TempFile(os.TempDir(), "aws-sdk-go-session-test") + TLSBundleCertFile, TLSBundleKeyFile, TLSBundleCAFile, err = awstesting.CreateTLSBundleFiles() if err != nil { - return "", err + panic(err) } - _, err = bundleFile.Write(b) + fmt.Println("TestMain", TLSBundleCertFile, TLSBundleKeyFile) + + code := m.Run() + + err = awstesting.CleanupTLSBundleFiles(TLSBundleCertFile, TLSBundleKeyFile, TLSBundleCAFile) if err != nil { - return "", err + panic(err) } - defer bundleFile.Close() - return bundleFile.Name(), nil + os.Exit(code) } func TestNewSession_WithCustomCABundle_Env(t *testing.T) { oldEnv := initSessionTestEnv() defer popEnv(oldEnv) - done := make(chan struct{}) - server, err := createTLSServer(testTLSBundleCert, testTLSBundleKey, done) - assert.NoError(t, err) - - // Write bundle to file - caFilename, err := setupTestCAFile(testTLSBundleCA) - defer func() { - os.Remove(caFilename) - }() - assert.NoError(t, err) + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } - os.Setenv("AWS_CA_BUNDLE", caFilename) + os.Setenv("AWS_CA_BUNDLE", TLSBundleCAFile) s, err := NewSession(&aws.Config{ HTTPClient: &http.Client{}, - Endpoint: aws.String(server.URL), + Endpoint: aws.String(endpoint), Region: aws.String("mock-region"), Credentials: credentials.AnonymousCredentials, }) - assert.NoError(t, err) - assert.NotNil(t, s) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if s == nil { + t.Fatalf("expect session to be created, got none") + } req, _ := http.NewRequest("GET", *s.Config.Endpoint, nil) resp, err := s.Config.HTTPClient.Do(req) - assert.NoError(t, err) - - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } } func TestNewSession_WithCustomCABundle_EnvNotExists(t *testing.T) { @@ -95,65 +81,87 @@ func TestNewSession_WithCustomCABundle_EnvNotExists(t *testing.T) { os.Setenv("AWS_CA_BUNDLE", "file-not-exists") s, err := NewSession() - assert.Error(t, err) - assert.Equal(t, "LoadCustomCABundleError", err.(awserr.Error).Code()) - assert.Nil(t, s) + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "LoadCustomCABundleError", err.(awserr.Error).Code(); e != a { + t.Errorf("expect %s error code, got %s", e, a) + } + if s != nil { + t.Errorf("expect nil session, got %v", s) + } } func TestNewSession_WithCustomCABundle_Option(t *testing.T) { oldEnv := initSessionTestEnv() defer popEnv(oldEnv) - done := make(chan struct{}) - server, err := createTLSServer(testTLSBundleCert, testTLSBundleKey, done) - assert.NoError(t, err) + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } s, err := NewSessionWithOptions(Options{ Config: aws.Config{ HTTPClient: &http.Client{}, - Endpoint: aws.String(server.URL), + Endpoint: aws.String(endpoint), Region: aws.String("mock-region"), Credentials: credentials.AnonymousCredentials, }, - CustomCABundle: bytes.NewReader(testTLSBundleCA), + CustomCABundle: bytes.NewReader(awstesting.TLSBundleCA), }) - assert.NoError(t, err) - assert.NotNil(t, s) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if s == nil { + t.Fatalf("expect session to be created, got none") + } req, _ := http.NewRequest("GET", *s.Config.Endpoint, nil) resp, err := s.Config.HTTPClient.Do(req) - assert.NoError(t, err) - - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } } func TestNewSession_WithCustomCABundle_OptionPriority(t *testing.T) { oldEnv := initSessionTestEnv() defer popEnv(oldEnv) - done := make(chan struct{}) - server, err := createTLSServer(testTLSBundleCert, testTLSBundleKey, done) - assert.NoError(t, err) + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } os.Setenv("AWS_CA_BUNDLE", "file-not-exists") s, err := NewSessionWithOptions(Options{ Config: aws.Config{ HTTPClient: &http.Client{}, - Endpoint: aws.String(server.URL), + Endpoint: aws.String(endpoint), Region: aws.String("mock-region"), Credentials: credentials.AnonymousCredentials, }, - CustomCABundle: bytes.NewReader(testTLSBundleCA), + CustomCABundle: bytes.NewReader(awstesting.TLSBundleCA), }) - assert.NoError(t, err) - assert.NotNil(t, s) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if s == nil { + t.Fatalf("expect session to be created, got none") + } req, _ := http.NewRequest("GET", *s.Config.Endpoint, nil) resp, err := s.Config.HTTPClient.Do(req) - assert.NoError(t, err) - - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } } type mockRoundTripper struct{} @@ -172,25 +180,35 @@ func TestNewSession_WithCustomCABundle_UnsupportedTransport(t *testing.T) { Transport: &mockRoundTripper{}, }, }, - CustomCABundle: bytes.NewReader(testTLSBundleCA), + CustomCABundle: bytes.NewReader(awstesting.TLSBundleCA), }) - assert.Error(t, err) - assert.Equal(t, "LoadCustomCABundleError", err.(awserr.Error).Code()) - assert.Contains(t, err.(awserr.Error).Message(), "transport unsupported type") - assert.Nil(t, s) + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "LoadCustomCABundleError", err.(awserr.Error).Code(); e != a { + t.Errorf("expect %s error code, got %s", e, a) + } + if s != nil { + t.Errorf("expect nil session, got %v", s) + } + aerrMsg := err.(awserr.Error).Message() + if e, a := "transport unsupported type", aerrMsg; !strings.Contains(a, e) { + t.Errorf("expect %s to be in %s", e, a) + } } func TestNewSession_WithCustomCABundle_TransportSet(t *testing.T) { oldEnv := initSessionTestEnv() defer popEnv(oldEnv) - done := make(chan struct{}) - server, err := createTLSServer(testTLSBundleCert, testTLSBundleKey, done) - assert.NoError(t, err) + endpoint, err := awstesting.CreateTLSServer(TLSBundleCertFile, TLSBundleKeyFile, nil) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } s, err := NewSessionWithOptions(Options{ Config: aws.Config{ - Endpoint: aws.String(server.URL), + Endpoint: aws.String(endpoint), Region: aws.String("mock-region"), Credentials: credentials.AnonymousCredentials, HTTPClient: &http.Client{ @@ -205,115 +223,21 @@ func TestNewSession_WithCustomCABundle_TransportSet(t *testing.T) { }, }, }, - CustomCABundle: bytes.NewReader(testTLSBundleCA), + CustomCABundle: bytes.NewReader(awstesting.TLSBundleCA), }) - assert.NoError(t, err) - assert.NotNil(t, s) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if s == nil { + t.Fatalf("expect session to be created, got none") + } req, _ := http.NewRequest("GET", *s.Config.Endpoint, nil) resp, err := s.Config.HTTPClient.Do(req) - assert.NoError(t, err) - - assert.Equal(t, http.StatusOK, resp.StatusCode) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if e, a := http.StatusOK, resp.StatusCode; e != a { + t.Errorf("expect %d status code, got %d", e, a) + } } - -/* Cert generation steps -# Create the CA key -openssl genrsa -des3 -out ca.key 1024 - -# Create the CA Cert -openssl req -new -sha256 -x509 -days 3650 \ - -subj "/C=GO/ST=Gopher/O=Testing ROOT CA" \ - -key ca.key -out ca.crt - -# Create config -cat > csr_details.txt <<-EOF - -[req] -default_bits = 1024 -prompt = no -default_md = sha256 -req_extensions = SAN -distinguished_name = dn - -[ dn ] -C=GO -ST=Gopher -O=Testing Certificate -OU=Testing IP - -[SAN] -subjectAltName = IP:127.0.0.1 -EOF - -# Create certificate signing request -openssl req -new -sha256 -nodes -newkey rsa:1024 \ - -config <( cat csr_details.txt ) \ - -keyout ia.key -out ia.csr - -# Create a signed certificate -openssl x509 -req -days 3650 \ - -CAcreateserial \ - -extfile <( cat csr_details.txt ) \ - -extensions SAN \ - -CA ca.crt -CAkey ca.key -in ia.csr -out ia.crt - -# Verify -openssl req -noout -text -in ia.csr -openssl x509 -noout -text -in ia.crt -*/ -var ( - // ca.crt - testTLSBundleCA = []byte(`-----BEGIN CERTIFICATE----- -MIICiTCCAfKgAwIBAgIJAJ5X1olt05XjMA0GCSqGSIb3DQEBCwUAMDgxCzAJBgNV -BAYTAkdPMQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBD -QTAeFw0xNzAzMDkwMDAyMDZaFw0yNzAzMDcwMDAyMDZaMDgxCzAJBgNVBAYTAkdP -MQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBDQTCBnzAN -BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAw/8DN+t9XQR60jx42rsQ2WE2Dx85rb3n -GQxnKZZLNddsT8rDyxJNP18aFalbRbFlyln5fxWxZIblu9Xkm/HRhOpbSimSqo1y -uDx21NVZ1YsOvXpHby71jx3gPrrhSc/t/zikhi++6D/C6m1CiIGuiJ0GBiJxtrub -UBMXT0QtI2ECAwEAAaOBmjCBlzAdBgNVHQ4EFgQU8XG3X/YHBA6T04kdEkq6+4GV -YykwaAYDVR0jBGEwX4AU8XG3X/YHBA6T04kdEkq6+4GVYymhPKQ6MDgxCzAJBgNV -BAYTAkdPMQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBD -QYIJAJ5X1olt05XjMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADgYEAeILv -z49+uxmPcfOZzonuOloRcpdvyjiXblYxbzz6ch8GsE7Q886FTZbvwbgLhzdwSVgG -G8WHkodDUsymVepdqAamS3f8PdCUk8xIk9mop8LgaB9Ns0/TssxDvMr3sOD2Grb3 -xyWymTWMcj6uCiEBKtnUp4rPiefcvCRYZ17/hLE= ------END CERTIFICATE----- -`) - - // ai.crt - testTLSBundleCert = []byte(`-----BEGIN CERTIFICATE----- -MIICGjCCAYOgAwIBAgIJAIIu+NOoxxM0MA0GCSqGSIb3DQEBBQUAMDgxCzAJBgNV -BAYTAkdPMQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBD -QTAeFw0xNzAzMDkwMDAzMTRaFw0yNzAzMDcwMDAzMTRaMFExCzAJBgNVBAYTAkdP -MQ8wDQYDVQQIDAZHb3BoZXIxHDAaBgNVBAoME1Rlc3RpbmcgQ2VydGlmaWNhdGUx -EzARBgNVBAsMClRlc3RpbmcgSVAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB -AN1hWHeioo/nASvbrjwCQzXCiWiEzGkw353NxsAB54/NqDL3LXNATtiSJu8kJBrm -Ah12IFLtWLGXjGjjYlHbQWnOR6awveeXnQZukJyRWh7m/Qlt9Ho0CgZE1U+832ac -5GWVldNxW1Lz4I+W9/ehzqe8I80RS6eLEKfUFXGiW+9RAgMBAAGjEzARMA8GA1Ud -EQQIMAaHBH8AAAEwDQYJKoZIhvcNAQEFBQADgYEAdF4WQHfVdPCbgv9sxgJjcR1H -Hgw9rZ47gO1IiIhzglnLXQ6QuemRiHeYFg4kjcYBk1DJguxzDTGnUwhUXOibAB+S -zssmrkdYYvn9aUhjc3XK3tjAoDpsPpeBeTBamuUKDHoH/dNRXxerZ8vu6uPR3Pgs -5v/KCV6IAEcvNyOXMPo= ------END CERTIFICATE----- -`) - - // ai.key - testTLSBundleKey = []byte(`-----BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQDdYVh3oqKP5wEr2648AkM1wolohMxpMN+dzcbAAeePzagy9y1z -QE7YkibvJCQa5gIddiBS7Vixl4xo42JR20FpzkemsL3nl50GbpCckVoe5v0JbfR6 -NAoGRNVPvN9mnORllZXTcVtS8+CPlvf3oc6nvCPNEUunixCn1BVxolvvUQIDAQAB -AoGBAMISrcirddGrlLZLLrKC1ULS2T0cdkqdQtwHYn4+7S5+/z42vMx1iumHLsSk -rVY7X41OWkX4trFxhvEIrc/O48bo2zw78P7flTxHy14uxXnllU8cLThE29SlUU7j -AVBNxJZMsXMlS/DowwD4CjFe+x4Pu9wZcReF2Z9ntzMpySABAkEA+iWoJCPE2JpS -y78q3HYYgpNY3gF3JqQ0SI/zTNkb3YyEIUffEYq0Y9pK13HjKtdsSuX4osTIhQkS -+UgRp6tCAQJBAOKPYTfQ2FX8ijgUpHZRuEAVaxASAS0UATiLgzXxLvOh/VC2at5x -wjOX6sD65pPz/0D8Qj52Cq6Q1TQ+377SDVECQAIy0od+yPweXxvrUjUd1JlRMjbB -TIrKZqs8mKbUQapw0bh5KTy+O1elU4MRPS3jNtBxtP25PQnuSnxmZcFTgAECQFzg -DiiFcsn9FuRagfkHExMiNJuH5feGxeFaP9WzI144v9GAllrOI6Bm3JNzx2ZLlg4b -20Qju8lIEj6yr6JYFaECQHM1VSojGRKpOl9Ox/R4yYSA9RV5Gyn00/aJNxVYyPD5 -i3acL2joQm2kLD/LO8paJ4+iQdRXCOMMIpjxSNjGQjQ= ------END RSA PRIVATE KEY----- -`) -) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go index 2fe35e74..ea7b886f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go @@ -124,9 +124,8 @@ file (~/.aws/config) and shared credentials file (~/.aws/credentials). Both files have the same format. If both config files are present the configuration from both files will be -read. The Session will be created from configuration values from the shared -credentials file (~/.aws/credentials) over those in the shared credentials -file (~/.aws/config). +read. The Session will be created from configuration values from the shared +credentials file (~/.aws/credentials) over those in the shared config file (~/.aws/config). Credentials are the values the SDK should use for authenticating requests with AWS Services. They arfrom a configuration file will need to include both diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index 96c740d0..34a29208 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -155,6 +155,10 @@ type Options struct { // and enable or disable the shared config functionality. SharedConfigState SharedConfigState + // Ordered list of files the session will load configuration from. + // It will override environment variable AWS_SHARED_CREDENTIALS_FILE, AWS_CONFIG_FILE. + SharedConfigFiles []string + // When the SDK's shared config is configured to assume a role with MFA // this option is required in order to provide the mechanism that will // retrieve the MFA token. There is no default value for this field. If @@ -218,7 +222,7 @@ type Options struct { // // // Force enable Shared Config support // sess := session.Must(session.NewSessionWithOptions(session.Options{ -// SharedConfigState: SharedConfigEnable, +// SharedConfigState: session.SharedConfigEnable, // })) func NewSessionWithOptions(opts Options) (*Session, error) { var envCfg envConfig @@ -304,13 +308,18 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, userCfg := &aws.Config{} userCfg.MergeIn(cfgs...) - // Order config files will be loaded in with later files overwriting + // Ordered config files will be loaded in with later files overwriting // previous config file values. - cfgFiles := []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile} - if !envCfg.EnableSharedConfig { - // The shared config file (~/.aws/config) is only loaded if instructed - // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG). - cfgFiles = cfgFiles[1:] + var cfgFiles []string + if opts.SharedConfigFiles != nil { + cfgFiles = opts.SharedConfigFiles + } else { + cfgFiles = []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile} + if !envCfg.EnableSharedConfig { + // The shared config file (~/.aws/config) is only loaded if instructed + // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG). + cfgFiles = cfgFiles[1:] + } } // Load additional config from file(s) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go index 877af02e..25aed689 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session_test.go @@ -178,6 +178,29 @@ func TestNewSessionWithOptions_OverrideSharedConfigDisable(t *testing.T) { assert.Contains(t, creds.ProviderName, "SharedConfigCredentials") } +func TestNewSessionWithOptions_OverrideSharedConfigFiles(t *testing.T) { + oldEnv := initSessionTestEnv() + defer popEnv(oldEnv) + + os.Setenv("AWS_SDK_LOAD_CONFIG", "1") + os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename) + os.Setenv("AWS_PROFILE", "config_file_load_order") + + s, err := NewSessionWithOptions(Options{ + SharedConfigFiles: []string{testConfigOtherFilename}, + }) + assert.NoError(t, err) + + assert.Equal(t, "shared_config_other_region", *s.Config.Region) + + creds, err := s.Config.Credentials.Get() + assert.NoError(t, err) + assert.Equal(t, "shared_config_other_akid", creds.AccessKeyID) + assert.Equal(t, "shared_config_other_secret", creds.SecretAccessKey) + assert.Empty(t, creds.SessionToken) + assert.Contains(t, creds.ProviderName, "SharedConfigCredentials") +} + func TestNewSessionWithOptions_Overrides(t *testing.T) { cases := []struct { InEnvs map[string]string diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index ffec984e..74b99830 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.8.17" +const SDKVersion = "1.8.26" diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/custom_ca_bundle.go b/vendor/github.com/aws/aws-sdk-go/awstesting/custom_ca_bundle.go new file mode 100644 index 00000000..33d17553 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/awstesting/custom_ca_bundle.go @@ -0,0 +1,191 @@ +package awstesting + +import ( + "io/ioutil" + "net" + "net/http" + "os" + "time" +) + +func availableLocalAddr(ip string) (string, error) { + l, err := net.Listen("tcp", ip+":0") + if err != nil { + return "", err + } + defer l.Close() + + return l.Addr().String(), nil +} + +// CreateTLSServer will create the TLS server on an open port using the +// certificate and key. The address will be returned that the server is running on. +func CreateTLSServer(cert, key string, mux *http.ServeMux) (string, error) { + addr, err := availableLocalAddr("127.0.0.1") + if err != nil { + return "", err + } + + if mux == nil { + mux = http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {}) + } + + go func() { + if err := http.ListenAndServeTLS(addr, cert, key, mux); err != nil { + panic(err) + } + }() + time.Sleep(1 * time.Second) + + return "https://" + addr, nil +} + +// CreateTLSBundleFiles returns the temporary filenames for the certificate +// key, and CA PEM content. These files should be deleted when no longer +// needed. CleanupTLSBundleFiles can be used for this cleanup. +func CreateTLSBundleFiles() (cert, key, ca string, err error) { + cert, err = createTmpFile(TLSBundleCert) + if err != nil { + return "", "", "", err + } + + key, err = createTmpFile(TLSBundleKey) + if err != nil { + return "", "", "", err + } + + ca, err = createTmpFile(TLSBundleCA) + if err != nil { + return "", "", "", err + } + + return cert, key, ca, nil +} + +// CleanupTLSBundleFiles takes variadic list of files to be deleted. +func CleanupTLSBundleFiles(files ...string) error { + for _, file := range files { + if err := os.Remove(file); err != nil { + return err + } + } + + return nil +} + +func createTmpFile(b []byte) (string, error) { + bundleFile, err := ioutil.TempFile(os.TempDir(), "aws-sdk-go-session-test") + if err != nil { + return "", err + } + + _, err = bundleFile.Write(b) + if err != nil { + return "", err + } + + defer bundleFile.Close() + return bundleFile.Name(), nil +} + +/* Cert generation steps +# Create the CA key +openssl genrsa -des3 -out ca.key 1024 + +# Create the CA Cert +openssl req -new -sha256 -x509 -days 3650 \ + -subj "/C=GO/ST=Gopher/O=Testing ROOT CA" \ + -key ca.key -out ca.crt + +# Create config +cat > csr_details.txt <<-EOF + +[req] +default_bits = 1024 +prompt = no +default_md = sha256 +req_extensions = SAN +distinguished_name = dn + +[ dn ] +C=GO +ST=Gopher +O=Testing Certificate +OU=Testing IP + +[SAN] +subjectAltName = IP:127.0.0.1 +EOF + +# Create certificate signing request +openssl req -new -sha256 -nodes -newkey rsa:1024 \ + -config <( cat csr_details.txt ) \ + -keyout ia.key -out ia.csr + +# Create a signed certificate +openssl x509 -req -days 3650 \ + -CAcreateserial \ + -extfile <( cat csr_details.txt ) \ + -extensions SAN \ + -CA ca.crt -CAkey ca.key -in ia.csr -out ia.crt + +# Verify +openssl req -noout -text -in ia.csr +openssl x509 -noout -text -in ia.crt +*/ +var ( + // TLSBundleCA ca.crt + TLSBundleCA = []byte(`-----BEGIN CERTIFICATE----- +MIICiTCCAfKgAwIBAgIJAJ5X1olt05XjMA0GCSqGSIb3DQEBCwUAMDgxCzAJBgNV +BAYTAkdPMQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBD +QTAeFw0xNzAzMDkwMDAyMDZaFw0yNzAzMDcwMDAyMDZaMDgxCzAJBgNVBAYTAkdP +MQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBDQTCBnzAN +BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAw/8DN+t9XQR60jx42rsQ2WE2Dx85rb3n +GQxnKZZLNddsT8rDyxJNP18aFalbRbFlyln5fxWxZIblu9Xkm/HRhOpbSimSqo1y +uDx21NVZ1YsOvXpHby71jx3gPrrhSc/t/zikhi++6D/C6m1CiIGuiJ0GBiJxtrub +UBMXT0QtI2ECAwEAAaOBmjCBlzAdBgNVHQ4EFgQU8XG3X/YHBA6T04kdEkq6+4GV +YykwaAYDVR0jBGEwX4AU8XG3X/YHBA6T04kdEkq6+4GVYymhPKQ6MDgxCzAJBgNV +BAYTAkdPMQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBD +QYIJAJ5X1olt05XjMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADgYEAeILv +z49+uxmPcfOZzonuOloRcpdvyjiXblYxbzz6ch8GsE7Q886FTZbvwbgLhzdwSVgG +G8WHkodDUsymVepdqAamS3f8PdCUk8xIk9mop8LgaB9Ns0/TssxDvMr3sOD2Grb3 +xyWymTWMcj6uCiEBKtnUp4rPiefcvCRYZ17/hLE= +-----END CERTIFICATE----- +`) + + // TLSBundleCert ai.crt + TLSBundleCert = []byte(`-----BEGIN CERTIFICATE----- +MIICGjCCAYOgAwIBAgIJAIIu+NOoxxM0MA0GCSqGSIb3DQEBBQUAMDgxCzAJBgNV +BAYTAkdPMQ8wDQYDVQQIEwZHb3BoZXIxGDAWBgNVBAoTD1Rlc3RpbmcgUk9PVCBD +QTAeFw0xNzAzMDkwMDAzMTRaFw0yNzAzMDcwMDAzMTRaMFExCzAJBgNVBAYTAkdP +MQ8wDQYDVQQIDAZHb3BoZXIxHDAaBgNVBAoME1Rlc3RpbmcgQ2VydGlmaWNhdGUx +EzARBgNVBAsMClRlc3RpbmcgSVAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB +AN1hWHeioo/nASvbrjwCQzXCiWiEzGkw353NxsAB54/NqDL3LXNATtiSJu8kJBrm +Ah12IFLtWLGXjGjjYlHbQWnOR6awveeXnQZukJyRWh7m/Qlt9Ho0CgZE1U+832ac +5GWVldNxW1Lz4I+W9/ehzqe8I80RS6eLEKfUFXGiW+9RAgMBAAGjEzARMA8GA1Ud +EQQIMAaHBH8AAAEwDQYJKoZIhvcNAQEFBQADgYEAdF4WQHfVdPCbgv9sxgJjcR1H +Hgw9rZ47gO1IiIhzglnLXQ6QuemRiHeYFg4kjcYBk1DJguxzDTGnUwhUXOibAB+S +zssmrkdYYvn9aUhjc3XK3tjAoDpsPpeBeTBamuUKDHoH/dNRXxerZ8vu6uPR3Pgs +5v/KCV6IAEcvNyOXMPo= +-----END CERTIFICATE----- +`) + + // TLSBundleKey ai.key + TLSBundleKey = []byte(`-----BEGIN RSA PRIVATE KEY----- +MIICXAIBAAKBgQDdYVh3oqKP5wEr2648AkM1wolohMxpMN+dzcbAAeePzagy9y1z +QE7YkibvJCQa5gIddiBS7Vixl4xo42JR20FpzkemsL3nl50GbpCckVoe5v0JbfR6 +NAoGRNVPvN9mnORllZXTcVtS8+CPlvf3oc6nvCPNEUunixCn1BVxolvvUQIDAQAB +AoGBAMISrcirddGrlLZLLrKC1ULS2T0cdkqdQtwHYn4+7S5+/z42vMx1iumHLsSk +rVY7X41OWkX4trFxhvEIrc/O48bo2zw78P7flTxHy14uxXnllU8cLThE29SlUU7j +AVBNxJZMsXMlS/DowwD4CjFe+x4Pu9wZcReF2Z9ntzMpySABAkEA+iWoJCPE2JpS +y78q3HYYgpNY3gF3JqQ0SI/zTNkb3YyEIUffEYq0Y9pK13HjKtdsSuX4osTIhQkS ++UgRp6tCAQJBAOKPYTfQ2FX8ijgUpHZRuEAVaxASAS0UATiLgzXxLvOh/VC2at5x +wjOX6sD65pPz/0D8Qj52Cq6Q1TQ+377SDVECQAIy0od+yPweXxvrUjUd1JlRMjbB +TIrKZqs8mKbUQapw0bh5KTy+O1elU4MRPS3jNtBxtP25PQnuSnxmZcFTgAECQFzg +DiiFcsn9FuRagfkHExMiNJuH5feGxeFaP9WzI144v9GAllrOI6Bm3JNzx2ZLlg4b +20Qju8lIEj6yr6JYFaECQHM1VSojGRKpOl9Ox/R4yYSA9RV5Gyn00/aJNxVYyPD5 +i3acL2joQm2kLD/LO8paJ4+iQdRXCOMMIpjxSNjGQjQ= +-----END RSA PRIVATE KEY----- +`) +) diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html index 7d81f71d..bbbe82ad 100644 --- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html +++ b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/godoc.html @@ -27,7 +27,12 @@ var s_code = s.t(); if (s_code) document.write(s_code); - +