diff --git a/.travis.yml b/.travis.yml
index 16994ad..a0e3fd9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,14 @@
language: go
go:
+ - 1.x
- 1.9.x
- - 1.8.x
install:
- - pwd #just for using vendored dependencies
+ - go get -u golang.org/x/lint/golint
script:
- - go test -race -v $(go list ./... | grep -v /vendor/)
+ - make
after_success:
- curl --request POST "https://goreportcard.com/checks" --data "repo=github.com/artemnikitin/devicefarm-ci-tool"
diff --git a/Gopkg.lock b/Gopkg.lock
new file mode 100644
index 0000000..1c37f66
--- /dev/null
+++ b/Gopkg.lock
@@ -0,0 +1,32 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+ name = "github.com/aws/aws-sdk-go"
+ packages = ["aws","aws/awserr","aws/awsutil","aws/client","aws/client/metadata","aws/corehandlers","aws/credentials","aws/credentials/ec2rolecreds","aws/credentials/endpointcreds","aws/credentials/stscreds","aws/csm","aws/defaults","aws/ec2metadata","aws/endpoints","aws/request","aws/session","aws/signer/v4","internal/sdkio","internal/sdkrand","internal/shareddefaults","private/protocol","private/protocol/json/jsonutil","private/protocol/jsonrpc","private/protocol/query","private/protocol/query/queryutil","private/protocol/rest","private/protocol/xml/xmlutil","service/devicefarm","service/devicefarm/devicefarmiface","service/sts"]
+ revision = "c9af76f2478f81c6566d0f7f4d522254ec7c0b52"
+ version = "v1.14.3"
+
+[[projects]]
+ name = "github.com/fatih/structs"
+ packages = ["."]
+ revision = "a720dfa8df582c51dee1b36feabb906bde1588bd"
+ version = "v1.0"
+
+[[projects]]
+ name = "github.com/go-ini/ini"
+ packages = ["."]
+ revision = "06f5f3d67269ccec1fe5fe4134ba6e982984f7f5"
+ version = "v1.37.0"
+
+[[projects]]
+ name = "github.com/jmespath/go-jmespath"
+ packages = ["."]
+ revision = "0b12d6b5"
+
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ inputs-digest = "779ddb6908733c1e90bb2b87a5d0eb6d3bb9d66f401007d108e6c07da67ab3c7"
+ solver-name = "gps-cdcl"
+ solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
new file mode 100644
index 0000000..de6fc6c
--- /dev/null
+++ b/Gopkg.toml
@@ -0,0 +1,30 @@
+
+# Gopkg.toml example
+#
+# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
+# for detailed Gopkg.toml documentation.
+#
+# required = ["github.com/user/thing/cmd/thing"]
+# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
+#
+# [[constraint]]
+# name = "github.com/user/project"
+# version = "1.0.0"
+#
+# [[constraint]]
+# name = "github.com/user/project2"
+# branch = "dev"
+# source = "github.com/myfork/project2"
+#
+# [[override]]
+# name = "github.com/x/y"
+# version = "2.4.0"
+
+
+[[constraint]]
+ name = "github.com/aws/aws-sdk-go"
+ version = "1.14.3"
+
+[[constraint]]
+ name = "github.com/fatih/structs"
+ version = "1.0.0"
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a9f1f4e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+.PHONY: all clean lint test build
+
+all: clean lint test
+
+clean:
+ @echo "Cleanup..."
+ rm -f devicefarm-ci-tool_windows_amd64.exe
+ rm -f devicefarm-ci-tool_darwin_amd64
+ rm -f devicefarm-ci-tool_linux_arm
+ rm -f devicefarm-ci-tool_linux_amd64
+
+lint:
+ @echo "Run checks..."
+ go fmt $$(go list ./... | grep -v /vendor/)
+ go vet $$(go list ./... | grep -v /vendor/)
+ golint $$(go list ./... | grep -v /vendor/)
+
+test:
+ @echo "Run tests..."
+ go test -v -race $$(go list ./... | grep -v /vendor/)
+
+build:
+ @echo "Building binaries..."
+ GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_windows_amd64.exe
+ GOOS=darwin GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_darwin_amd64
+ GOOS=linux GOARCH=arm go build -ldflags "-w -s" -o devicefarm-ci-tool_linux_arm
+ GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_linux_amd64
diff --git a/README.md b/README.md
index fffba82..c28ff1f 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ Example: `-testType INSTRUMENTATION`
#### Configuration file
All parameters in the configuration file are optional. Configuration file is based on a syntax of [ScheduleRun](http://docs.aws.amazon.com/devicefarm/latest/APIReference/API_ScheduleRun.html) request.
-Example of config (for current master):
+Config example:
```json
{
"name": "string",
@@ -98,50 +98,6 @@ Example of config (for current master):
}
}
```
-Example of old config (for release 1.2.1):
-```json
-{
- "runName":"name",
- "devicePoolArn":"ARN",
- "devicePoolName":"Top Devices",
- "test":{
- "type":"BUILTIN_FUZZ|BUILTIN_EXPLORER|APPIUM_JAVA_JUNIT|APPIUM_JAVA_TESTNG|APPIUM_PYTHON|APPIUM_WEB_JAVA_JUNIT|APPIUM_WEB_JAVA_TESTNG|APPIUM_WEB_PYTHON|CALABASH|INSTRUMENTATION|UIAUTOMATION|UIAUTOMATOR|XCTEST",
- "testPackageArn":"string",
- "testPackagePath":"string",
- "filter":"string",
- "parameters":{
- "key":"value",
- "key":"value"
- }
- },
- "additionalData":{
- "extraDataPackageArn":"string",
- "extraDataPackagePath":"string",
- "networkProfileArn":"string",
- "locale":"string",
- "location":{
- "latitude":1.222,
- "longitude":1.222
- },
- "radios":{
- "wifi":"true|false",
- "bluetooth":"true|false",
- "nfc":"true|false",
- "gps":"true|false"
- },
- "auxiliaryApps":[
- "string1",
- "string2"
- ],
- "billingMethod":"METERED|UNMETERED"
- },
- "executionConfiguration":{
- "jobTimeoutMinutes":111,
- "accountsCleanup":false,
- "appPackagesCleanup":false
- }
-}
-```
## License
diff --git a/build_artifacts.sh b/build_artifacts.sh
deleted file mode 100755
index a915d33..0000000
--- a/build_artifacts.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-env GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_windows_amd64.exe
-env GOOS=darwin GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_darwin_amd64
-env GOOS=linux GOARCH=arm go build -ldflags "-w -s" -o devicefarm-ci-tool_linux_arm
-env GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o devicefarm-ci-tool_linux_amd64
\ No newline at end of file
diff --git a/glide.lock b/glide.lock
deleted file mode 100644
index c3e084e..0000000
--- a/glide.lock
+++ /dev/null
@@ -1,44 +0,0 @@
-hash: 870f82277d043c4455c5b21eb54e422d0666a8354f9d05486236775d85470fab
-updated: 2017-05-05T22:57:34.819084692+02:00
-imports:
-- name: github.com/aws/aws-sdk-go
- version: 0dbc446aca87aebb6e0a24509b59bafc0e3ec0ae
- repo: https://github.com/aws/aws-sdk-go
- subpackages:
- - aws
- - aws/awserr
- - aws/awsutil
- - aws/client
- - aws/client/metadata
- - aws/corehandlers
- - aws/credentials
- - aws/credentials/ec2rolecreds
- - aws/credentials/endpointcreds
- - aws/credentials/stscreds
- - aws/defaults
- - aws/ec2metadata
- - aws/endpoints
- - aws/request
- - aws/session
- - aws/signer/v4
- - private/endpoints
- - private/protocol
- - private/protocol/json/jsonutil
- - private/protocol/jsonrpc
- - private/protocol/query
- - private/protocol/query/queryutil
- - private/protocol/rest
- - private/protocol/xml/xmlutil
- - private/signer/v4
- - service/devicefarm
- - service/devicefarm/devicefarmiface
- - service/sts
-- name: github.com/fatih/structs
- version: a720dfa8df582c51dee1b36feabb906bde1588bd
-- name: github.com/go-ini/ini
- version: afbd495e5aaea13597b5e14fe514ddeaa4d76fc3
- repo: https://github.com/go-ini/ini
-- name: github.com/jmespath/go-jmespath
- version: 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74
- repo: https://github.com/jmespath/go-jmespath
-testImports: []
diff --git a/glide.yaml b/glide.yaml
deleted file mode 100644
index 295b325..0000000
--- a/glide.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-package: github.com/artemnikitin/devicefarm-ci-tool
-import:
-- package: github.com/aws/aws-sdk-go
- version: v1.8.19
- repo: https://github.com/aws/aws-sdk-go
- subpackages:
- - aws
- - aws/session
- - private/endpoints
- - private/protocol
- - private/signer/v4
- - service/devicefarm
- - service/sts
- - aws/request
- - service/devicefarm/devicefarmiface
-- package: github.com/go-ini/ini
- version: v1.8.6
- repo: https://github.com/go-ini/ini
-- package: github.com/jmespath/go-jmespath
- version: 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74
- repo: https://github.com/jmespath/go-jmespath
-- package: github.com/fatih/structs
- version: v1.0
diff --git a/main.go b/main.go
index 9ec494a..1c09620 100644
--- a/main.go
+++ b/main.go
@@ -6,6 +6,7 @@ import (
"io/ioutil"
"log"
"os"
+ "strings"
"github.com/artemnikitin/devicefarm-ci-tool/errors"
"github.com/artemnikitin/devicefarm-ci-tool/model"
@@ -24,6 +25,7 @@ var (
appPath = flag.String("app", "", "Path to an app")
testPath = flag.String("test", "", "Path to test app")
devicePool = flag.String("devices", "Top Devices", "Specify list of devices for tests")
+ randomDevicePool = flag.String("randomDevices", "", "List of device pools for random choice")
configJSON = flag.String("config", "", "Path to JSON config")
wait = flag.Bool("wait", false, "Wait for run end")
checkEvery = flag.Int("checkEvery", 5, "Specified time slice for checking status of run")
@@ -92,7 +94,7 @@ func runJob(client devicefarmiface.DeviceFarmAPI, config *model.RunConfig) ([]*m
}
}
- if *ignoreUnavailableDevices {
+ if *ignoreUnavailableDevices && *wait {
pass = svc.IsTestRunPassIgnoringUnavailableDevices(runArn)
}
@@ -110,7 +112,13 @@ func getConfig() *model.RunConfig {
configFile = model.Transform(bytes)
}
if configFile.DevicePoolArn == "" && configFile.DevicePoolName == "" {
- configFile.DevicePoolName = *devicePool
+ if *randomDevicePool != "" {
+ pools := strings.Split(*randomDevicePool, ",")
+ i := tools.Random(0, len(pools)-1)
+ configFile.DevicePoolName = pools[i]
+ } else {
+ configFile.DevicePoolName = *devicePool
+ }
}
if *runName != "" {
configFile.Name = *runName
diff --git a/service/mock.go b/service/mock.go
index ada411b..197ee41 100644
--- a/service/mock.go
+++ b/service/mock.go
@@ -10,6 +10,7 @@ import (
"github.com/aws/aws-sdk-go/service/devicefarm"
)
+// UploadARN using for tests
const UploadARN = "wefere3f3f33gv3fre3f3f3f3f3v34v3v43v433v34v43v34"
// CreateFakeServer creates a fake server for tests
@@ -30,6 +31,162 @@ type MockClient struct {
FakeServer *httptest.Server
}
+func (c *MockClient) CreateInstanceProfile(*devicefarm.CreateInstanceProfileInput) (*devicefarm.CreateInstanceProfileOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) CreateInstanceProfileWithContext(aws.Context, *devicefarm.CreateInstanceProfileInput, ...request.Option) (*devicefarm.CreateInstanceProfileOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) CreateInstanceProfileRequest(*devicefarm.CreateInstanceProfileInput) (*request.Request, *devicefarm.CreateInstanceProfileOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) CreateVPCEConfiguration(*devicefarm.CreateVPCEConfigurationInput) (*devicefarm.CreateVPCEConfigurationOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) CreateVPCEConfigurationWithContext(aws.Context, *devicefarm.CreateVPCEConfigurationInput, ...request.Option) (*devicefarm.CreateVPCEConfigurationOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) CreateVPCEConfigurationRequest(*devicefarm.CreateVPCEConfigurationInput) (*request.Request, *devicefarm.CreateVPCEConfigurationOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) DeleteInstanceProfile(*devicefarm.DeleteInstanceProfileInput) (*devicefarm.DeleteInstanceProfileOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) DeleteInstanceProfileWithContext(aws.Context, *devicefarm.DeleteInstanceProfileInput, ...request.Option) (*devicefarm.DeleteInstanceProfileOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) DeleteInstanceProfileRequest(*devicefarm.DeleteInstanceProfileInput) (*request.Request, *devicefarm.DeleteInstanceProfileOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) DeleteVPCEConfiguration(*devicefarm.DeleteVPCEConfigurationInput) (*devicefarm.DeleteVPCEConfigurationOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) DeleteVPCEConfigurationWithContext(aws.Context, *devicefarm.DeleteVPCEConfigurationInput, ...request.Option) (*devicefarm.DeleteVPCEConfigurationOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) DeleteVPCEConfigurationRequest(*devicefarm.DeleteVPCEConfigurationInput) (*request.Request, *devicefarm.DeleteVPCEConfigurationOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) GetDeviceInstance(*devicefarm.GetDeviceInstanceInput) (*devicefarm.GetDeviceInstanceOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) GetDeviceInstanceWithContext(aws.Context, *devicefarm.GetDeviceInstanceInput, ...request.Option) (*devicefarm.GetDeviceInstanceOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) GetDeviceInstanceRequest(*devicefarm.GetDeviceInstanceInput) (*request.Request, *devicefarm.GetDeviceInstanceOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) GetInstanceProfile(*devicefarm.GetInstanceProfileInput) (*devicefarm.GetInstanceProfileOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) GetInstanceProfileWithContext(aws.Context, *devicefarm.GetInstanceProfileInput, ...request.Option) (*devicefarm.GetInstanceProfileOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) GetInstanceProfileRequest(*devicefarm.GetInstanceProfileInput) (*request.Request, *devicefarm.GetInstanceProfileOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) GetVPCEConfiguration(*devicefarm.GetVPCEConfigurationInput) (*devicefarm.GetVPCEConfigurationOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) GetVPCEConfigurationWithContext(aws.Context, *devicefarm.GetVPCEConfigurationInput, ...request.Option) (*devicefarm.GetVPCEConfigurationOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) GetVPCEConfigurationRequest(*devicefarm.GetVPCEConfigurationInput) (*request.Request, *devicefarm.GetVPCEConfigurationOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) ListDeviceInstances(*devicefarm.ListDeviceInstancesInput) (*devicefarm.ListDeviceInstancesOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) ListDeviceInstancesWithContext(aws.Context, *devicefarm.ListDeviceInstancesInput, ...request.Option) (*devicefarm.ListDeviceInstancesOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) ListDeviceInstancesRequest(*devicefarm.ListDeviceInstancesInput) (*request.Request, *devicefarm.ListDeviceInstancesOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) ListInstanceProfiles(*devicefarm.ListInstanceProfilesInput) (*devicefarm.ListInstanceProfilesOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) ListInstanceProfilesWithContext(aws.Context, *devicefarm.ListInstanceProfilesInput, ...request.Option) (*devicefarm.ListInstanceProfilesOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) ListInstanceProfilesRequest(*devicefarm.ListInstanceProfilesInput) (*request.Request, *devicefarm.ListInstanceProfilesOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) ListVPCEConfigurations(*devicefarm.ListVPCEConfigurationsInput) (*devicefarm.ListVPCEConfigurationsOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) ListVPCEConfigurationsWithContext(aws.Context, *devicefarm.ListVPCEConfigurationsInput, ...request.Option) (*devicefarm.ListVPCEConfigurationsOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) ListVPCEConfigurationsRequest(*devicefarm.ListVPCEConfigurationsInput) (*request.Request, *devicefarm.ListVPCEConfigurationsOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) UpdateDeviceInstance(*devicefarm.UpdateDeviceInstanceInput) (*devicefarm.UpdateDeviceInstanceOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) UpdateDeviceInstanceWithContext(aws.Context, *devicefarm.UpdateDeviceInstanceInput, ...request.Option) (*devicefarm.UpdateDeviceInstanceOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) UpdateDeviceInstanceRequest(*devicefarm.UpdateDeviceInstanceInput) (*request.Request, *devicefarm.UpdateDeviceInstanceOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) UpdateInstanceProfile(*devicefarm.UpdateInstanceProfileInput) (*devicefarm.UpdateInstanceProfileOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) UpdateInstanceProfileWithContext(aws.Context, *devicefarm.UpdateInstanceProfileInput, ...request.Option) (*devicefarm.UpdateInstanceProfileOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) UpdateInstanceProfileRequest(*devicefarm.UpdateInstanceProfileInput) (*request.Request, *devicefarm.UpdateInstanceProfileOutput) {
+ panic("implement me")
+}
+
+func (c *MockClient) UpdateVPCEConfiguration(*devicefarm.UpdateVPCEConfigurationInput) (*devicefarm.UpdateVPCEConfigurationOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) UpdateVPCEConfigurationWithContext(aws.Context, *devicefarm.UpdateVPCEConfigurationInput, ...request.Option) (*devicefarm.UpdateVPCEConfigurationOutput, error) {
+ panic("implement me")
+}
+
+func (c *MockClient) UpdateVPCEConfigurationRequest(*devicefarm.UpdateVPCEConfigurationInput) (*request.Request, *devicefarm.UpdateVPCEConfigurationOutput) {
+ panic("implement me")
+}
+
func (c *MockClient) CreateDevicePool(*devicefarm.CreateDevicePoolInput) (*devicefarm.CreateDevicePoolOutput, error) {
return nil, nil
}
diff --git a/tools/tools.go b/tools/tools.go
index b5cacaf..02d0635 100644
--- a/tools/tools.go
+++ b/tools/tools.go
@@ -3,7 +3,9 @@ package tools
import (
"fmt"
"log"
+ "math/rand"
"strings"
+ "time"
)
// UploadFile used to upload file by S3 pre-signed URL
@@ -37,3 +39,9 @@ func GenerateReportURL(arn string) string {
run := str[index+1:]
return fmt.Sprintf(URL, project, run)
}
+
+// Random generates random integer in given range
+func Random(min, max int) int {
+ rand.Seed(time.Now().Unix())
+ return rand.Intn(max-min) + min
+}
diff --git a/tools/tools_test.go b/tools/tools_test.go
index 504814c..491950f 100644
--- a/tools/tools_test.go
+++ b/tools/tools_test.go
@@ -51,3 +51,10 @@ func TestGenerateReportURL(t *testing.T) {
}
}
}
+
+func TestRandom(t *testing.T) {
+ i := Random(1, 10)
+ if i < 1 || i > 10 {
+ t.Error("Random int should be in given range")
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md b/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index 1ecb636..0000000
--- a/vendor/github.com/aws/aws-sdk-go/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,14 +0,0 @@
-Please fill out the sections below to help us address your issue.
-
-### Version of AWS SDK for Go?
-
-
-### Version of Go (`go version`)?
-
-
-### What issue did you see?
-
-### Steps to reproduce
-
-If you have have an runnable example, please include it.
-
diff --git a/vendor/github.com/aws/aws-sdk-go/.github/PULL_REQUEST_TEMPLATE.md b/vendor/github.com/aws/aws-sdk-go/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index a9aaa9a..0000000
--- a/vendor/github.com/aws/aws-sdk-go/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,3 +0,0 @@
-For changes to files under the `/model/` folder, and manual edits to autogenerated code (e.g. `/service/s3/api.go`) please create an Issue instead of a PR for those type of changes.
-
-If there is an existing bug or feature this PR is answers please reference it here.
diff --git a/vendor/github.com/aws/aws-sdk-go/.travis.yml b/vendor/github.com/aws/aws-sdk-go/.travis.yml
index 02c9321..0b34640 100644
--- a/vendor/github.com/aws/aws-sdk-go/.travis.yml
+++ b/vendor/github.com/aws/aws-sdk-go/.travis.yml
@@ -1,24 +1,48 @@
language: go
-sudo: false
-
-go:
- - 1.5
- - 1.6
- - 1.7
- - 1.8
- - tip
-
-# Use Go 1.5's vendoring experiment for 1.5 tests.
-env:
- - GO15VENDOREXPERIMENT=1
-
-install:
- - make get-deps
+matrix:
+ allow_failures:
+ - go: tip
+ - go: 1.6.x
+ os: linux
+ include:
+ - os: linux
+ sudo: required
+ go: 1.5.x
+ # Use Go 1.5's vendoring experiment for 1.5 tests.
+ env: GO15VENDOREXPERIMENT=1
+ - os: linux
+ sudo: required
+ go: 1.6.x
+ - os: linux
+ sudo: required
+ go: 1.7.x
+ - os: linux
+ sudo: required
+ go: 1.8.x
+ - os: linux
+ sudo: required
+ go: 1.9.x
+ - os: linux
+ sudo: required
+ go: 1.10.x
+ - os: linux
+ sudo: required
+ go: tip
+ - os: osx
+ go: 1.7.x
+ - os: osx
+ go: 1.8.x
+ - os: osx
+ go: 1.9.x
+ - os: osx
+ go: 1.10.x
+ - os: osx
+ go: tip
script:
- - make unit-with-race-cover
+ - make ci-test
-matrix:
- allow_failures:
- - go: tip
+branches:
+ only:
+ - master
diff --git a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
index f5a8b9d..4d0ac57 100644
--- a/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
+++ b/vendor/github.com/aws/aws-sdk-go/CHANGELOG.md
@@ -1,3 +1,2436 @@
+Release v1.14.3 (2018-06-08)
+===
+
+### Service Client Updates
+* `service/mediatailor`: Updates service API
+
+Release v1.14.2 (2018-06-07)
+===
+
+### Service Client Updates
+* `service/medialive`: Updates service API, documentation, and paginators
+ * AWS Elemental MediaLive now makes channel log information available through Amazon CloudWatch Logs. You can set up each MediaLive channel with a logging level; when the channel is run, logs will automatically be published to your account on Amazon CloudWatch Logs
+
+Release v1.14.1 (2018-06-05)
+===
+
+### Service Client Updates
+* `service/ce`: Updates service API and documentation
+* `service/polly`: Updates service API and documentation
+ * Amazon Polly adds new French voice - "Lea"
+* `service/rds`: Updates service API and documentation
+ * This release adds customizable processor features for RDS instances.
+* `service/secretsmanager`: Updates service documentation
+ * Documentation updates for secretsmanager
+* `service/shield`: Updates service API and documentation
+ * DDoS Response Team access management for AWS Shield
+
+Release v1.14.0 (2018-06-04)
+===
+
+### Service Client Updates
+* `service/AWSMigrationHub`: Updates service documentation
+* `service/appstream`: Updates service API and documentation
+ * Amazon AppStream 2.0 adds support for Google Drive for G Suite. With this feature, customers will be able to connect their G Suite accounts with AppStream 2.0 and enable Google Drive access for an AppStream 2.0 stack. Users of the stack can then link their Google Drive using their G Suite login credentials and use their existing files stored in Drive with their AppStream 2.0 applications. File changes will be synced automatically to Google cloud.
+* `service/ec2`: Updates service API and documentation
+ * You are now able to use instance storage (up to 3600 GB of NVMe based SSD) on M5 instances, the next generation of EC2's General Purpose instances in us-east-1, us-west-2, us-east-2, eu-west-1 and ca-central-1. M5 instances offer up to 96 vCPUs, 384 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes and provide a balance of compute, memory and network resources for many applications.
+* `service/eks`: Adds new service
+* `service/mediaconvert`: Updates service API and documentation
+ * This release adds the support for Common Media Application Format (CMAF) fragmented outputs, RF64 WAV audio output format, and HEV1 or HEVC1 MP4 packaging types when using HEVC in DASH or CMAF outputs.
+* `service/sagemaker`: Updates service API, documentation, and paginators
+ * Amazon SageMaker has added the ability to run hyperparameter tuning jobs. A hyperparameter tuning job will create and evaluate multiple training jobs while tuning algorithm hyperparameters, to optimize a customer specified objective metric.
+
+### SDK Features
+* Add support for EventStream based APIs (S3 SelectObjectContent) ([#1941](https://github.com/aws/aws-sdk-go/pull/1941))
+ * Adds support for EventStream asynchronous APIs such as S3 SelectObjectContents API. This API allows your application to receiving multiple events asynchronously from the API response. Your application recieves these events from a channel on the API response.
+ * See PR [#1941](https://github.com/aws/aws-sdk-go/pull/1941) for example.
+ * Fixes [#1895](https://github.com/aws/aws-sdk-go/issues/1895)
+
+Release v1.13.60 (2018-06-01)
+===
+
+### Service Client Updates
+* `service/ds`: Updates service API and documentation
+ * Added ResetUserPassword API. Customers can now reset their users' passwords without providing the old passwords in Simple AD and Microsoft AD.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/iot`: Updates service API and documentation
+ * We are releasing force CancelJob and CancelJobExecution functionalities to customers.
+* `service/mediatailor`: Adds new service
+* `service/redshift`: Updates service documentation
+ * Documentation updates for redshift
+* `service/sns`: Updates service API, documentation, and paginators
+ * The SNS Subscribe API has been updated with two new optional parameters: Attributes and ReturnSubscriptionArn. Attributes is a map of subscription attributes which can be one or more of: FilterPolicy, DeliveryPolicy, and RawMessageDelivery. ReturnSubscriptionArn is a boolean parameter that overrides the default behavior of returning "pending confirmation" for subscriptions that require confirmation instead of returning the subscription ARN.
+
+### SDK Bugs
+* `private/mode/api`: Fix error code constants being generated incorrectly.([#1958](https://github.com/aws/aws-sdk-go/issues/1958))
+ * Fixes the SDK's code generation to not modify the error code text value when generating error code constants. This prevents generating error code values which are invalid and will never be sent by the service. This change does not change the error code constant variable name generated by the SDK, only the value of the error code.
+ * Fixes [#1856](https://github.com/aws/aws-sdk-go/issues/1856)
+Release v1.13.59 (2018-05-31)
+===
+
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+Release v1.13.58 (2018-05-30)
+===
+
+### Service Client Updates
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/neptune`: Adds new service
+ * Amazon Neptune is a fast, reliable graph database service that makes it easy to build and run applications that work with highly connected datasets. Neptune supports popular graph models Property Graph and W3C's Resource Description Frame (RDF), and their respective query languages Apache TinkerPop Gremlin 3.3.2 and SPARQL 1.1.
+
+Release v1.13.57 (2018-05-29)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/pi`: Adds new service
+
+Release v1.13.56 (2018-05-25)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * This API update enables customers to control whether users can transfer data between their local devices and their streaming applications through file uploads and downloads, clipboard operations, or printing to local devices
+* `service/config`: Updates service API and documentation
+* `service/glue`: Updates service API and documentation
+ * AWS Glue now sends a delay notification to Amazon CloudWatch Events when an ETL job runs longer than the specified delay notification threshold.
+* `service/iot`: Updates service API
+ * We are exposing DELETION_IN_PROGRESS as a new job status in regards to the release of DeleteJob API.
+
+Release v1.13.55 (2018-05-24)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API
+ * AWS CodeBuild Adds Support for Windows Builds.
+* `service/elasticloadbalancingv2`: Updates service documentation
+* `service/rds`: Updates service API and documentation
+ * This release adds CloudWatch Logs integration capabilities to RDS Aurora MySQL clusters
+* `service/secretsmanager`: Updates service documentation
+ * Documentation updates for secretsmanager
+
+Release v1.13.54 (2018-05-22)
+===
+
+### Service Client Updates
+* `service/ecs`: Updates service API and documentation
+ * Amazon Elastic Container Service (ECS) adds service discovery for services that use host or bridged network mode. ECS can now also register instance IPs for active tasks using bridged and host networking with Route 53, making them available via DNS.
+* `service/inspector`: Updates service API
+ * We are launching the ability to target all EC2 instances. With this launch, resourceGroupArn is now optional for CreateAssessmentTarget and UpdateAssessmentTarget. If resourceGroupArn is not specified, all EC2 instances in the account in the AWS region are included in the assessment target.
+
+Release v1.13.53 (2018-05-21)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service API and documentation
+ * 1) Filtered Update for StackSet based on Accounts and Regions: This feature will allow flexibility for the customers to roll out updates on a StackSet based on specific Accounts and Regions. 2) Support for customized ExecutionRoleName: This feature will allow customers to attach ExecutionRoleName to the StackSet thus ensuring more security and controlling the behavior of any AWS resources in the target accounts.
+
+Release v1.13.52 (2018-05-18)
+===
+
+### Service Client Updates
+* `service/email`: Updates service documentation
+ * Fixed a broken link in the documentation for S3Action.
+* `service/iot`: Updates service API and documentation
+ * We are releasing DeleteJob and DeleteJobExecution APIs to allow customer to delete resources created using AWS IoT Jobs.
+
+Release v1.13.51 (2018-05-17)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service documentation
+ * Documentation updates for codedeploy
+* `service/cognito-idp`: Updates service API and documentation
+* `service/ec2`: Updates service API and documentation
+ * You are now able to use instance storage (up to 1800 GB of NVMe based SSD) on C5 instances, the next generation of EC2's compute optimized instances in us-east-1, us-west-2, us-east-2, eu-west-1 and ca-central-1. C5 instances offer up to 72 vCPUs, 144 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes to deliver improved performance for compute-intensive workloads.You can now run bare metal workloads on EC2 with i3.metal instances. As a new instance size belonging to the I3 instance family, i3.metal instances have the same characteristics as other instances in the family, including NVMe SSD-backed instance storage optimized for low latency, very high random I/O performance, and high sequential read throughput. I3.metal instances are powered by 2.3 GHz Intel Xeon processors, offering 36 hyper-threaded cores (72 logical processors), 512 GiB of memory, and 15.2 TB of NVMe SSD-backed instance storage. These instances deliver high networking throughput and lower latency with up to 25 Gbps of aggregate network bandwidth using Elastic Network Adapter (ENA)-based Enhanced Networking.
+
+Release v1.13.50 (2018-05-16)
+===
+
+### Service Client Updates
+* `service/secretsmanager`: Updates service documentation
+ * Documentation updates for secretsmanager
+* `service/servicecatalog`: Updates service API and documentation
+ * Users can now pass a new option to ListAcceptedPortfolioShares called portfolio-share-type with a value of AWS_SERVICECATALOG in order to access Getting Started Portfolios that contain selected products representing common customer use cases.
+
+Release v1.13.49 (2018-05-15)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API
+
+Release v1.13.48 (2018-05-14)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API and documentation
+ * Adding support for more override fields for StartBuild API, add support for idempotency token field for StartBuild API in AWS CodeBuild.
+* `service/iot1click-devices`: Adds new service
+* `service/iot1click-projects`: Adds new service
+* `service/organizations`: Updates service documentation
+ * Documentation updates for organizations
+
+Release v1.13.47 (2018-05-10)
+===
+
+### Service Client Updates
+* `service/firehose`: Updates service API and documentation
+ * With this release, Amazon Kinesis Data Firehose can convert the format of your input data from JSON to Apache Parquet or Apache ORC before storing the data in Amazon S3. Parquet and ORC are columnar data formats that save space and enable faster queries compared to row-oriented formats like JSON.
+
+Release v1.13.46 (2018-05-10)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/gamelift`: Updates service API and documentation
+ * AutoScaling Target Tracking scaling simplification along with StartFleetActions and StopFleetActions APIs to suspend and resume automatic scaling at will.
+
+Release v1.13.45 (2018-05-10)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Updating the regex for the NumericValue fields.
+* `service/ec2`: Updates service API and documentation
+ * Enable support for latest flag with Get Console Output
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * Changes to support the Aurora MySQL Backtrack feature.
+
+Release v1.13.44 (2018-05-08)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Enable support for specifying CPU options during instance launch.
+* `service/rds`: Updates service documentation
+ * Correction to the documentation about copying unencrypted snapshots.
+
+Release v1.13.43 (2018-05-07)
+===
+
+### Service Client Updates
+* `service/alexaforbusiness`: Updates service API
+* `service/budgets`: Updates service API and documentation
+ * "With this release, customers can use AWS Budgets to monitor how much of their Amazon EC2, Amazon RDS, Amazon Redshift, and Amazon ElastiCache instance usage is covered by reservations, and receive alerts when their coverage falls below the threshold they define."
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/es`: Updates service API, documentation, and paginators
+ * This change brings support for Reserved Instances to AWS Elasticsearch.
+* `service/s3`: Updates service API and documentation
+ * Added BytesReturned details for Progress and Stats Events for Amazon S3 Select .
+
+Release v1.13.42 (2018-05-04)
+===
+
+### Service Client Updates
+* `service/guardduty`: Updates service API, documentation, and paginators
+ * Amazon GuardDuty is adding five new API operations for creating and managing filters. For each filter, you can specify a criteria and an action. The action you specify is applied to findings that match the specified criteria.
+
+Release v1.13.41 (2018-05-03)
+===
+
+### Service Client Updates
+* `service/appsync`: Updates service API and documentation
+* `service/config`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/secretsmanager`: Updates service documentation
+ * Documentation updates for secretsmanager
+
+Release v1.13.40 (2018-05-02)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service documentation
+ * Documentation updates for acm
+* `service/codepipeline`: Updates service API and documentation
+ * Added support for webhooks with accompanying definitions as needed in the AWS CodePipeline API Guide.
+* `service/ec2`: Updates service API and documentation
+ * Amazon EC2 Fleet is a new feature that simplifies the provisioning of Amazon EC2 capacity across different EC2 instance types, Availability Zones, and the On-Demand, Reserved Instance, and Spot Instance purchase models. With a single API call, you can now provision capacity to achieve desired scale, performance, and cost.
+* `service/ssm`: Updates service API and documentation
+ * Added support for new parameter, DocumentVersion, for SendCommand API. Users can now specify version of SSM document to be executed on the target(s).
+
+Release v1.13.39 (2018-04-30)
+===
+
+### Service Client Updates
+* `service/alexaforbusiness`: Updates service API, documentation, and paginators
+* `service/dynamodb`: Updates service API and documentation
+ * Adds two new APIs UpdateGlobalTableSettings and DescribeGlobalTableSettings. This update introduces new constraints in the CreateGlobalTable and UpdateGlobalTable APIs . Tables must have the same write capacity units. If Global Secondary Indexes exist then they must have the same write capacity units and key schema.
+* `service/guardduty`: Updates service API and documentation
+ * You can disable the email notification when inviting GuardDuty members using the disableEmailNotification parameter in the InviteMembers operation.
+* `service/route53domains`: Updates service API and documentation
+ * This release adds a SubmittedSince attribute to the ListOperations API, so you can list operations that were submitted after a specified date and time.
+* `service/sagemaker`: Updates service API and documentation
+ * SageMaker has added support for VPC configuration for both Endpoints and Training Jobs. This allows you to connect from the instances running the Endpoint or Training Job to your VPC and any resources reachable in the VPC rather than being restricted to resources that were internet accessible.
+* `service/workspaces`: Updates service API and documentation
+ * Added new IP Access Control APIs, an API to change the state of a Workspace, and the ADMIN_MAINTENANCE WorkSpace state. With the new IP Access Control APIs, you can now create/delete IP Access Control Groups, add/delete/update rules for IP Access Control Groups, Associate/Disassociate IP Access Control Groups to/from a WorkSpaces Directory, and Describe IP Based Access Control Groups.
+
+Release v1.13.38 (2018-04-26)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/glacier`: Updates service documentation
+ * Documentation updates for Glacier to fix a broken link
+* `service/secretsmanager`: Updates service documentation
+ * Documentation updates for secretsmanager
+
+Release v1.13.37 (2018-04-25)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * AWS CodeDeploy has a new exception that indicates when a GitHub token is not valid.
+* `service/rekognition`: Updates service documentation
+ * Documentation updates for Amazon Rekognition.
+* `service/xray`: Updates service API and documentation
+ * Added PutEncryptionConfig and GetEncryptionConfig APIs for managing data encryption settings. Use PutEncryptionConfig to configure X-Ray to use an AWS Key Management Service customer master key to encrypt trace data at rest.
+
+Release v1.13.36 (2018-04-24)
+===
+
+### Service Client Updates
+* `service/elasticbeanstalk`: Updates service API and documentation
+ * Support tracking Elastic Beanstalk resources in AWS Config.
+* `service/secretsmanager`: Updates service documentation
+ * Documentation updates for secretsmanager
+
+Release v1.13.35 (2018-04-23)
+===
+
+### Service Client Updates
+* `service/autoscaling-plans`: Updates service API and documentation
+* `service/iot`: Updates service API and documentation
+ * Add IotAnalyticsAction which sends message data to an AWS IoT Analytics channel
+* `service/iotanalytics`: Adds new service
+
+### SDK Enhancements
+* `aws/endpoints`: Add Get Region description to endpoints package ([#1909](https://github.com/aws/aws-sdk-go/pull/1909))
+ * Adds exposing the description field of the endpoints Region struct.
+ * Fixes [#1194](https://github.com/aws/aws-sdk-go/issues/1194)
+
+### SDK Bugs
+* Fix XML unmarshaler not correctly unmarshaling list of timestamp values ([#1894](https://github.com/aws/aws-sdk-go/pull/1894))
+ * Fixes a bug in the XML unmarshaler that would incorrectly try to unmarshal "time.Time" parameters that did not have the struct tag type on them. This would occur for nested lists like CloudWatch's GetMetricDataResponse MetricDataResults timestamp parameters.
+ * Fixes [#1892](https://github.com/aws/aws-sdk-go/issues/1892)
+Release v1.13.34 (2018-04-20)
+===
+
+### Service Client Updates
+* `service/firehose`: Updates service API and documentation
+ * With this release, Amazon Kinesis Data Firehose allows you to tag your delivery streams. Tags are metadata that you can create and use to manage your delivery streams. For more information about tagging, see AWS Tagging Strategies. For technical documentation, look for the tagging operations in the Amazon Kinesis Firehose API reference.
+* `service/medialive`: Updates service API and documentation
+ * With AWS Elemental MediaLive you can now output live channels as RTMP (Real-Time Messaging Protocol) and RTMPS as the encrypted version of the protocol (Secure, over SSL/TLS). RTMP is the preferred protocol for sending live streams to popular social platforms which means you can send live channel content to social and sharing platforms in a secure and reliable way while continuing to stream to your own website, app or network.
+
+Release v1.13.33 (2018-04-19)
+===
+
+### Service Client Updates
+* `service/ce`: Updates service API and documentation
+* `service/codepipeline`: Updates service API and documentation
+ * Added new SourceRevision structure to Execution Summary with accompanying definitions as needed in the AWS CodePipeline API Guide.
+* `service/devicefarm`: Updates service API and documentation
+ * Adding support for VPCEndpoint feature. Allows customers to be able to access their private endpoints/services running in their VPC during test automation.
+* `service/ec2`: Updates service API and documentation
+ * Added support for customers to see the time at which a Dedicated Host was allocated or released.
+* `service/rds`: Updates service API and documentation
+ * The ModifyDBCluster operation now includes an EngineVersion parameter. You can use this to upgrade the engine for a clustered database.
+* `service/secretsmanager`: Updates service documentation and examples
+ * Documentation updates
+* `service/ssm`: Updates service API and documentation
+ * Added new APIs DeleteInventory and DescribeInventoryDeletions, for customers to delete their custom inventory data.
+
+Release v1.13.32 (2018-04-10)
+===
+
+### Service Client Updates
+* `service/dms`: Updates service API and documentation
+ * Native Change Data Capture start point and task recovery support in Database Migration Service.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/glue`: Updates service API and documentation
+ * "AWS Glue now supports timeout values for ETL jobs. With this release, all new ETL jobs have a default timeout value of 48 hours. AWS Glue also now supports the ability to start a schedule or job events trigger when it is created."
+* `service/mediapackage`: Updates service API and documentation
+ * Adds a new OriginEndpoint package type CmafPackage in MediaPackage. Origin endpoints can now be configured to use the Common Media Application Format (CMAF) media streaming format. This version of CmafPackage only supports HTTP Live Streaming (HLS) manifests with fragmented MP4.
+* `service/ssm`: Updates service API and documentation
+ * Added TooManyUpdates exception for AddTagsToResource and RemoveTagsFromResource API
+* `service/workmail`: Updates service API, documentation, and paginators
+ * Amazon WorkMail adds the ability to grant users and groups with "Full Access", "Send As" and "Send on Behalf" permissions on a given mailbox.
+
+Release v1.13.31 (2018-04-09)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Cloud Directory customers can fetch attributes within a facet on an object with the new GetObjectAttributes API and can fetch attributes from multiple facets or objects with the BatchGetObjectAttributes operation.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.13.30 (2018-04-06)
+===
+
+### Service Client Updates
+* `service/batch`: Updates service API and documentation
+ * Support for Timeout in SubmitJob and RegisterJobDefinition
+
+Release v1.13.29 (2018-04-05)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/ssm`: Updates service documentation
+
+Release v1.13.28 (2018-04-04)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service API and documentation
+ * AWS Certificate Manager has added support for AWS Certificate Manager Private Certificate Authority (CA). Customers can now request private certificates with the RequestCertificate API, and also export private certificates with the ExportCertificate API.
+* `service/acm-pca`: Adds new service
+* `service/config`: Updates service API and documentation
+* `service/fms`: Adds new service
+* `service/monitoring`: Updates service API and documentation
+ * The new GetMetricData API enables you to collect batch amounts of metric data and optionally perform math expressions on the data. With one GetMetricData call you can retrieve as many as 100 different metrics and a total of 100,800 data points.
+* `service/s3`: Updates service API and documentation
+ * ONEZONE_IA storage class stores object data in only one Availability Zone at a lower price than STANDARD_IA. This SDK release provides API support for this new storage class.
+* `service/sagemaker`: Updates service API and documentation
+ * SageMaker is now supporting many additional instance types in previously supported families for Notebooks, Training Jobs, and Endpoints. Training Jobs and Endpoints now support instances in the m5 family in addition to the previously supported instance families. For specific instance types supported please see the documentation for the SageMaker API.
+* `service/secretsmanager`: Adds new service
+ * AWS Secrets Manager enables you to easily create and manage the secrets that you use in your customer-facing apps. Instead of embedding credentials into your source code, you can dynamically query Secrets Manager from your app whenever you need credentials. You can automatically and frequently rotate your secrets without having to deploy updates to your apps. All secret values are encrypted when they're at rest with AWS KMS, and while they're in transit with HTTPS and TLS.
+* `service/transcribe`: Updates service API, documentation, and paginators
+
+Release v1.13.27 (2018-04-03)
+===
+
+### Service Client Updates
+* `service/devicefarm`: Updates service API and documentation
+ * Added Private Device Management feature. Customers can now manage their private devices efficiently - view their status, set labels and apply profiles on them. Customers can also schedule automated tests and remote access sessions on individual instances in their private device fleet.
+* `service/lambda`: Updates service API and documentation
+ * added nodejs8.10 as a valid runtime
+* `service/translate`: Updates service API and documentation
+
+Release v1.13.26 (2018-04-02)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Amazon API Gateway now supports resource policies for APIs making it easier to set access controls for invoking APIs.
+* `service/cloudfront`: Adds new service
+ * You can now use a new Amazon CloudFront capability called Field-Level Encryption to further enhance the security of sensitive data, such as credit card numbers or personally identifiable information (PII) like social security numbers. CloudFront's field-level encryption further encrypts sensitive data in an HTTPS form using field-specific encryption keys (which you supply) before a POST request is forwarded to your origin. This ensures that sensitive data can only be decrypted and viewed by certain components or services in your application stack. Field-level encryption is easy to setup. Simply configure the fields that have to be further encrypted by CloudFront using the public keys you specify and you can reduce attack surface for your sensitive data.
+* `service/es`: Updates service API and documentation
+ * This adds Amazon Cognito authentication support to Kibana.
+
+Release v1.13.25 (2018-03-30)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service API and documentation
+ * Documentation updates for acm
+* `service/connect`: Adds new service
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.13.24 (2018-03-29)
+===
+
+### Service Client Updates
+* `service/alexaforbusiness`: Updates service API, documentation, and paginators
+* `service/cloudformation`: Updates service API and documentation
+ * Enabling resource level permission control for StackSets APIs. Adding support for customers to use customized AdministrationRole to create security boundaries between different users.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/greengrass`: Updates service API and documentation
+ * Greengrass APIs now support creating Machine Learning resource types and configuring binary data as the input payload for Greengrass Lambda functions.
+* `service/ssm`: Updates service API
+ * This Patch Manager release supports creating patch baselines for CentOS.
+
+Release v1.13.23 (2018-03-28)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/iam`: Updates service API and documentation
+ * Add support for Longer Role Sessions. Four APIs manage max session duration: GetRole, ListRoles, CreateRole, and the new API UpdateRole. The max session duration integer attribute is measured in seconds.
+* `service/mturk-requester`: Updates service API and documentation
+* `service/sts`: Updates service API and documentation
+ * Change utilizes the Max Session Duration attribute introduced for IAM Roles and allows STS customers to request session duration up to the Max Session Duration of 12 hours from AssumeRole based APIs.
+
+Release v1.13.22 (2018-03-27)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service API and documentation
+ * AWS Certificate Manager has added support for customers to disable Certificate Transparency logging on a per-certificate basis.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.13.21 (2018-03-26)
+===
+
+### Service Client Updates
+* `service/dynamodb`: Updates service API and documentation
+ * Point-in-time recovery (PITR) provides continuous backups of your DynamoDB table data. With PITR, you do not have to worry about creating, maintaining, or scheduling backups. You enable PITR on your table and your backup is available for restore at any point in time from the moment you enable it, up to a maximum of the 35 preceding days. PITR provides continuous backups until you explicitly disable it. For more information, see the Amazon DynamoDB Developer Guide.
+
+Release v1.13.20 (2018-03-23)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service documentation
+ * Documentation updates for RDS
+
+Release v1.13.19 (2018-03-22)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * Feedback URL allows admins to provide a feedback link or a survey link for collecting user feedback while streaming sessions. When a feedback link is provided, streaming users will see a "Send Feedback" choice in their streaming session toolbar. On selecting this choice, user will be redirected to the link provided in a new browser tab. If a feedback link is not provided, users will not see the "Send Feedback" option.
+* `service/codebuild`: Updates service API and documentation
+ * Adding support for branch filtering when using webhooks with AWS CodeBuild.
+* `service/ecs`: Updates service API and documentation
+ * Amazon Elastic Container Service (ECS) now includes integrated Service Discovery using Route 53 Auto Naming. Customers can now specify a Route 53 Auto Naming service as part of an ECS service. ECS will register task IPs with Route 53, making them available via DNS in your VPC.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+### SDK Bugs
+* `aws/endpoints`: Use service metadata for fallback signing name ([#1854](https://github.com/aws/aws-sdk-go/pull/1854))
+ * Updates the SDK's endpoint resolution to fallback deriving the service's signing name from the service's modeled metadata in addition the endpoints modeled data.
+ * Fixes [#1850](https://github.com/aws/aws-sdk-go/issues/1850)
+Release v1.13.18 (2018-03-21)
+===
+
+### Service Client Updates
+* `service/serverlessrepo`: Updates service documentation
+
+Release v1.13.17 (2018-03-20)
+===
+
+### Service Client Updates
+* `service/ce`: Updates service API and documentation
+* `service/config`: Updates service API and documentation
+* `service/ecs`: Updates service API and documentation
+ * Amazon ECS users can now mount a temporary volume in memory in containers and specify the shared memory that a container can use through the use of docker's 'tmpfs' and 'shm-size' features respectively. These fields can be specified under linuxParameters in ContainerDefinition in the Task Definition Template.
+* `service/elasticbeanstalk`: Updates service documentation
+ * Documentation updates for the new Elastic Beanstalk API DescribeAccountAttributes.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/events`: Updates service API and documentation
+ * Added SQS FIFO queue target support
+* `service/glue`: Updates service API and documentation
+ * API Updates for DevEndpoint: PublicKey is now optional for CreateDevEndpoint. The new DevEndpoint field PrivateAddress will be populated for DevEndpoints associated with a VPC.
+* `service/medialive`: Updates service API and documentation
+ * AWS Elemental MediaLive has added support for updating Inputs and Input Security Groups. You can update Input Security Groups at any time and it will update all channels using that Input Security Group. Inputs can be updated as long as they are not attached to a currently running channel.
+
+Release v1.13.16 (2018-03-16)
+===
+
+### Service Client Updates
+* `service/elasticbeanstalk`: Updates service API and documentation
+ * AWS Elastic Beanstalk is launching a new public API named DescribeAccountAttributes which allows customers to access account level attributes. In this release, the API will support quotas for resources such as applications, application versions, and environments.
+
+Release v1.13.15 (2018-03-15)
+===
+
+### Service Client Updates
+* `service/organizations`: Updates service API and documentation
+ * This release adds additional reason codes to improve clarity to exceptions that can occur.
+* `service/pinpoint`: Updates service API and documentation
+ * With this release, you can delete endpoints from your Amazon Pinpoint projects. Customers can now specify one of their leased dedicated long or short codes to send text messages.
+* `service/sagemaker`: Updates service API, documentation, and paginators
+ * This release provides support for ml.p3.xlarge instance types for notebook instances. Lifecycle configuration is now available to customize your notebook instances on start; the configuration can be reused between multiple notebooks. If a notebook instance is attached to a VPC you can now opt out of internet access that by default is provided by SageMaker.
+
+Release v1.13.14 (2018-03-14)
+===
+
+### Service Client Updates
+* `service/lightsail`: Updates service API and documentation
+ * Updates to existing Lightsail documentation
+
+Release v1.13.13 (2018-03-13)
+===
+
+### Service Client Updates
+* `service/servicediscovery`: Updates service API and documentation
+ * This release adds support for custom health checks, which let you check the health of resources that aren't accessible over the internet. For example, you can use a custom health check when the instance is in an Amazon VPC.
+
+Release v1.13.12 (2018-03-12)
+===
+
+### Service Client Updates
+* `service/cloudhsmv2`: Updates service API
+ * CreateCluster can now take both 8 and 17 character Subnet IDs. DeleteHsm can now take both 8 and 17 character ENI IDs.
+* `service/discovery`: Updates service API and documentation
+ * Documentation updates for discovery
+* `service/iot`: Updates service API and documentation
+ * We added new fields to the response of the following APIs. (1) describe-certificate: added new generationId, customerVersion fields (2) describe-ca-certificate: added new generationId, customerVersion and lastModifiedDate fields (3) get-policy: added generationId, creationDate and lastModifiedDate fields
+* `service/redshift`: Updates service API and documentation
+ * DescribeClusterSnapshotsMessage with ClusterExists flag returns snapshots of existing clusters. Else both existing and deleted cluster snapshots are returned
+
+Release v1.13.11 (2018-03-08)
+===
+
+### Service Client Updates
+* `service/AWSMigrationHub`: Updates service API and documentation
+* `service/ecs`: Updates service API and documentation
+ * Amazon Elastic Container Service (ECS) now supports container health checks. Customers can now specify a docker container health check command and parameters in their task definition. ECS will monitor, report and take scheduling action based on the health status.
+* `service/pinpoint`: Updates service API and documentation
+ * With this release, you can export endpoints from your Amazon Pinpoint projects. You can export a) all of the endpoints assigned to a project or b) the subset of endpoints assigned to a segment.
+* `service/rds`: Updates service documentation
+ * Documentation updates for RDS
+
+Release v1.13.10 (2018-03-07)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/medialive`: Updates service API and documentation
+ * Updates API to model required traits and minimum/maximum constraints.
+
+Release v1.13.9 (2018-03-06)
+===
+
+### Service Client Updates
+* `service/ecs`: Updates service documentation
+ * Documentation updates for Amazon ECS
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.13.8 (2018-03-01)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Added support for modifying Placement Group association of instances via ModifyInstancePlacement API.
+* `service/events`: Updates service API and documentation
+ * Added BatchParameters to the PutTargets API
+* `service/servicecatalog`: Updates service API and documentation
+ * This release of ServiceCatalog adds the DeleteTagOption API.
+* `service/ssm`: Updates service API and documentation
+ * This Inventory release supports the status message details reported by the last sync for the resource data sync API.
+* `service/storagegateway`: Updates service API and documentation
+ * AWS Storage Gateway (File) support for two new file share attributes are added. 1. Users can specify the S3 Canned ACL to use for new objects created in the file share. 2. Users can create file shares for requester-pays buckets.
+
+Release v1.13.7 (2018-02-28)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.13.6 (2018-02-27)
+===
+
+### Service Client Updates
+* `service/ecr`: Updates service documentation
+ * Documentation updates for Amazon ECR.
+
+Release v1.13.5 (2018-02-26)
+===
+
+### Service Client Updates
+* `service/route53`: Updates service API
+ * Added support for creating LBR rules using ap-northeast-3 region.
+* `service/sts`: Updates service API and documentation
+ * Increased SAMLAssertion parameter size from 50000 to 100000 for AWS Security Token Service AssumeRoleWithSAML API to allow customers to pass bigger SAML assertions
+
+Release v1.13.4 (2018-02-23)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * This API update is to enable customers to copy their Amazon AppStream 2.0 images within and between AWS Regions
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.13.3 (2018-02-22)
+===
+
+### Service Client Updates
+* `service/ce`: Updates service API and documentation
+* `service/elasticloadbalancingv2`: Updates service documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.13.2 (2018-02-21)
+===
+
+### Service Client Updates
+* `service/codecommit`: Updates service API and documentation
+ * This release adds an API for adding a file directly to an AWS CodeCommit repository without requiring a Git client.
+* `service/ec2`: Updates service API and documentation
+ * Adds support for tagging an EBS snapshot as part of the API call that creates the EBS snapshot
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/serverlessrepo`: Updates service API, documentation, and paginators
+
+Release v1.13.1 (2018-02-20)
+===
+
+### Service Client Updates
+* `service/autoscaling`: Updates service API and documentation
+ * Amazon EC2 Auto Scaling support for service-linked roles
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/waf`: Updates service API and documentation
+ * The new PermissionPolicy APIs in AWS WAF Regional allow customers to attach resource-based policies to their entities.
+* `service/waf-regional`: Updates service API and documentation
+
+Release v1.13.0 (2018-02-19)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API
+ * With this release, AWS Config updated the ConfigurationItemStatus enum values. The values prior to this update did not represent appropriate values returned by GetResourceConfigHistory. You must update your code to enumerate the new enum values so this is a breaking change. To map old properties to new properties, use the following descriptions: New discovered resource - Old property: Discovered, New property: ResourceDiscovered. Updated resource - Old property: Ok, New property: OK. Deleted resource - Old property: Deleted, New property: ResourceDeleted or ResourceDeletedNotRecorded. Not-recorded resource - Old property: N/A, New property: ResourceNotRecorded or ResourceDeletedNotRecorded.
+
+Release v1.12.79 (2018-02-16)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service API and documentation
+ * Updates RDS API to indicate whether a DBEngine supports read replicas.
+
+Release v1.12.78 (2018-02-15)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/gamelift`: Updates service API and documentation
+ * Updates to allow Fleets to run on On-Demand or Spot instances.
+* `service/mediaconvert`: Updates service API and documentation
+ * Nielsen ID3 tags can now be inserted into transport stream (TS) and HLS outputs. For more information on Nielsen configuration you can go to https://docs.aws.amazon.com/mediaconvert/latest/apireference/jobs.html#jobs-nielsenconfiguration
+
+Release v1.12.77 (2018-02-14)
+===
+
+### Service Client Updates
+* `service/appsync`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lex-models`: Updates service API and documentation
+
+Release v1.12.76 (2018-02-13)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/glacier`: Updates service documentation
+ * Documentation updates for glacier
+* `service/route53`: Updates service API
+ * Added support for creating Private Hosted Zones and metric-based healthchecks in the ap-northeast-3 region for whitelisted customers.
+
+Release v1.12.75 (2018-02-12)
+===
+
+### Service Client Updates
+* `service/cognito-idp`: Updates service API and documentation
+* `service/ec2`: Updates service API and documentation
+ * Network interfaces now supply the following additional status of "associated" to better distinguish the current status.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/guardduty`: Updates service API and documentation
+ * Added PortProbeAction information to the Action section of the port probe-type finding.
+* `service/kms`: Updates service API
+ * This release of AWS Key Management Service includes support for InvalidArnException in the RetireGrant API.
+* `service/rds`: Updates service documentation
+ * Aurora MySQL now supports MySQL 5.7.
+
+Release v1.12.74 (2018-02-09)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Users can now better understand the longer ID opt-in status of their account using the two new APIs DescribeAggregateIdFormat and DescribePrincipalIdFormat
+* `service/lex-models`: Updates service API and documentation
+* `service/runtime.lex`: Updates service API and documentation
+
+Release v1.12.73 (2018-02-08)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * Adds support for allowing customers to provide a redirect URL for a stack. Users will be redirected to the link provided by the admin at the end of their streaming session.
+* `service/budgets`: Updates service API and documentation
+ * Making budgetLimit and timePeriod optional, and updating budgets docs.
+* `service/dms`: Updates service API, documentation, and paginators
+ * This release includes the addition of two new APIs: describe replication instance task logs and reboot instance. The first allows user to see how much storage each log for a task on a given instance is occupying. The second gives users the option to reboot the application software on the instance and force a fail over for MAZ instances to test robustness of their integration with our service.
+* `service/ds`: Updates service API
+ * Updated the regex of some input parameters to support longer EC2 identifiers.
+* `service/dynamodb`: Updates service API and documentation
+ * Amazon DynamoDB now supports server-side encryption using a default service key (alias/aws/dynamodb) from the AWS Key Management Service (KMS). AWS KMS is a service that combines secure, highly available hardware and software to provide a key management system scaled for the cloud. AWS KMS is used via the AWS Management Console or APIs to centrally create encryption keys, define the policies that control how keys can be used, and audit key usage to prove they are being used correctly. For more information, see the Amazon DynamoDB Developer Guide.
+* `service/gamelift`: Updates service API and documentation
+ * Amazon GameLift FlexMatch added the StartMatchBackfill API. This API allows developers to add new players to an existing game session using the same matchmaking rules and player data that were used to initially create the session.
+* `service/medialive`: Updates service API and documentation
+ * AWS Elemental MediaLive has added support for updating channel settings for idle channels. You can now update channel name, channel outputs and output destinations, encoder settings, user role ARN, and input specifications. Channel settings can be updated in the console or with API calls. Please note that running channels need to be stopped before they can be updated. We've also deprecated the 'Reserved' field.
+* `service/mediastore`: Updates service API and documentation
+ * AWS Elemental MediaStore now supports per-container CORS configuration.
+
+Release v1.12.72 (2018-02-07)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/glue`: Updates service API and documentation
+ * This new feature will now allow customers to add a customized json classifier. They can specify a json path to indicate the object, array or field of the json documents they'd like crawlers to inspect when they crawl json files.
+* `service/servicecatalog`: Updates service API, documentation, and paginators
+ * This release of Service Catalog adds SearchProvisionedProducts API and ProvisionedProductPlan APIs.
+* `service/servicediscovery`: Updates service API and documentation
+ * This release adds support for registering CNAME record types and creating Route 53 alias records that route traffic to Amazon Elastic Load Balancers using Amazon Route 53 Auto Naming APIs.
+* `service/ssm`: Updates service API and documentation
+ * This Patch Manager release supports configuring Linux repos as part of patch baselines, controlling updates of non-OS security packages and also creating patch baselines for SUSE12
+
+### SDK Enhancements
+* `private/model/api`: Add validation to ensure there is no duplication of services in models/apis ([#1758](https://github.com/aws/aws-sdk-go/pull/1758))
+ * Prevents the SDK from mistakenly generating code a single service multiple times with different model versions.
+* `example/service/ec2/instancesbyRegion`: Fix typos in example ([#1762](https://github.com/aws/aws-sdk-go/pull/1762))
+* `private/model/api`: removing SDK API reference crosslinks from input/output shapes. (#1765)
+
+### SDK Bugs
+* `aws/session`: Fix bug in session.New not supporting AWS_SDK_LOAD_CONFIG ([#1770](https://github.com/aws/aws-sdk-go/pull/1770))
+ * Fixes a bug in the session.New function that was not correctly sourcing the shared configuration files' path.
+ * Fixes [#1771](https://github.com/aws/aws-sdk-go/pull/1771)
+Release v1.12.71 (2018-02-05)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service documentation
+ * Documentation updates for acm
+* `service/cloud9`: Updates service documentation and examples
+ * API usage examples for AWS Cloud9.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/kinesis`: Updates service API and documentation
+ * Using ListShards a Kinesis Data Streams customer or client can get information about shards in a data stream (including meta-data for each shard) without obtaining data stream level information.
+* `service/opsworks`: Updates service API, documentation, and waiters
+ * AWS OpsWorks Stacks supports EBS encryption and HDD volume types. Also, a new DescribeOperatingSystems API is available, which lists all operating systems supported by OpsWorks Stacks.
+
+Release v1.12.70 (2018-01-26)
+===
+
+### Service Client Updates
+* `service/devicefarm`: Updates service API and documentation
+ * Add InteractionMode in CreateRemoteAccessSession for DirectDeviceAccess feature.
+* `service/medialive`: Updates service API and documentation
+ * Add InputSpecification to CreateChannel (specification of input attributes is used for channel sizing and affects pricing); add NotFoundException to DeleteInputSecurityGroups.
+* `service/mturk-requester`: Updates service documentation
+
+Release v1.12.69 (2018-01-26)
+===
+
+### SDK Bugs
+* `models/api`: Fix colliding names [#1754](https://github.com/aws/aws-sdk-go/pull/1754) [#1756](https://github.com/aws/aws-sdk-go/pull/1756)
+ * SDK had duplicate folders that were causing errors in some builds.
+ * Fixes [#1753](https://github.com/aws/aws-sdk-go/issues/1753)
+Release v1.12.68 (2018-01-25)
+===
+
+### Service Client Updates
+* `service/alexaforbusiness`: Updates service API and documentation
+* `service/codebuild`: Updates service API and documentation
+ * Adding support for Shallow Clone and GitHub Enterprise in AWS CodeBuild.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/guardduty`: Adds new service
+ * Added the missing AccessKeyDetails object to the resource shape.
+* `service/lambda`: Updates service API and documentation
+ * AWS Lambda now supports Revision ID on your function versions and aliases, to track and apply conditional updates when you are updating your function version or alias resources.
+
+### SDK Bugs
+* `service/s3/s3manager`: Fix check for nil OrigErr in Error() [#1749](https://github.com/aws/aws-sdk-go/issues/1749)
+ * S3 Manager's `Error` type did not check for nil of `OrigErr` when calling `Error()`
+ * Fixes [#1748](https://github.com/aws/aws-sdk-go/issues/1748)
+Release v1.12.67 (2018-01-22)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Add additional costTypes: IncludeDiscount, UseAmortized, to support finer control for different charges included in a cost budget.
+
+Release v1.12.66 (2018-01-19)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/glue`: Updates service API and documentation
+ * New AWS Glue DataCatalog APIs to manage table versions and a new feature to skip archiving of the old table version when updating table.
+* `service/transcribe`: Adds new service
+
+Release v1.12.65 (2018-01-18)
+===
+
+### Service Client Updates
+* `service/sagemaker`: Updates service API and documentation
+ * CreateTrainingJob and CreateEndpointConfig now supports KMS Key for volume encryption.
+
+Release v1.12.64 (2018-01-17)
+===
+
+### Service Client Updates
+* `service/autoscaling-plans`: Updates service documentation
+* `service/ec2`: Updates service documentation
+ * Documentation updates for EC2
+
+Release v1.12.63 (2018-01-17)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/autoscaling-plans`: Adds new service
+* `service/rds`: Updates service API and documentation
+ * With this release you can now integrate RDS DB instances with CloudWatch Logs. We have added parameters to the operations for creating and modifying DB instances (for example CreateDBInstance) to allow you to take advantage of this capability through the CLI and API. Once you enable this feature, a stream of log events will publish to CloudWatch Logs for each log type you enable.
+
+Release v1.12.62 (2018-01-15)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lambda`: Updates service API and documentation
+ * Support for creating Lambda Functions using 'dotnetcore2.0' and 'go1.x'.
+
+Release v1.12.61 (2018-01-12)
+===
+
+### Service Client Updates
+* `service/glue`: Updates service API and documentation
+ * Support is added to generate ETL scripts in Scala which can now be run by AWS Glue ETL jobs. In addition, the trigger API now supports firing when any conditions are met (in addition to all conditions). Also, jobs can be triggered based on a "failed" or "stopped" job run (in addition to a "succeeded" job run).
+
+Release v1.12.60 (2018-01-11)
+===
+
+### Service Client Updates
+* `service/elasticloadbalancing`: Updates service API and documentation
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `service/rds`: Updates service API and documentation
+ * Read Replicas for Amazon RDS for MySQL, MariaDB, and PostgreSQL now support Multi-AZ deployments.Amazon RDS Read Replicas enable you to create one or more read-only copies of your database instance within the same AWS Region or in a different AWS Region. Updates made to the source database are asynchronously copied to the Read Replicas. In addition to providing scalability for read-heavy workloads, you can choose to promote a Read Replica to become standalone a DB instance when needed.Amazon RDS Multi-AZ Deployments provide enhanced availability for database instances within a single AWS Region. With Multi-AZ, your data is synchronously replicated to a standby in a different Availability Zone (AZ). In case of an infrastructure failure, Amazon RDS performs an automatic failover to the standby, minimizing disruption to your applications.You can now combine Read Replicas with Multi-AZ as part of a disaster recovery strategy for your production databases. A well-designed and tested plan is critical for maintaining business continuity after a disaster. Since Read Replicas can also be created in different regions than the source database, your Read Replica can be promoted to become the new production database in case of a regional disruption.You can also combine Read Replicas with Multi-AZ for your database engine upgrade process. You can create a Read Replica of your production database instance and upgrade it to a new database engine version. When the upgrade is complete, you can stop applications, promote the Read Replica to a standalone database instance and switch over your applications. Since the database instance is already a Multi-AZ deployment, no additional steps are needed.For more information, see the Amazon RDS User Guide.
+* `service/ssm`: Updates service documentation
+ * Updates documentation for the HierarchyLevelLimitExceededException error.
+
+Release v1.12.59 (2018-01-09)
+===
+
+### Service Client Updates
+* `service/kms`: Updates service documentation
+ * Documentation updates for AWS KMS
+
+Release v1.12.58 (2018-01-09)
+===
+
+### Service Client Updates
+* `service/ds`: Updates service API and documentation
+ * On October 24 we introduced AWS Directory Service for Microsoft Active Directory (Standard Edition), also known as AWS Microsoft AD (Standard Edition), which is a managed Microsoft Active Directory (AD) that is optimized for small and midsize businesses (SMBs). With this SDK release, you can now create an AWS Microsoft AD directory using API. This enables you to run typical SMB workloads using a cost-effective, highly available, and managed Microsoft AD in the AWS Cloud.
+
+Release v1.12.57 (2018-01-08)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * The AWS CodeDeploy API was updated to support DeleteGitHubAccountToken, a new method that deletes a GitHub account connection.
+* `service/discovery`: Updates service API and documentation
+ * Documentation updates for AWS Application Discovery Service.
+* `service/route53`: Updates service API and documentation
+ * This release adds an exception to the CreateTrafficPolicyVersion API operation.
+
+Release v1.12.56 (2018-01-05)
+===
+
+### Service Client Updates
+* `service/inspector`: Updates service API, documentation, and examples
+ * Added 2 new attributes to the DescribeAssessmentTemplate response, indicating the total number of assessment runs and last assessment run ARN (if present.)
+* `service/snowball`: Updates service documentation
+ * Documentation updates for snowball
+* `service/ssm`: Updates service documentation
+ * Documentation updates for ssm
+
+Release v1.12.55 (2018-01-02)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service documentation
+ * Documentation updates for rds
+
+Release v1.12.54 (2017-12-29)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/workspaces`: Updates service API and documentation
+ * Modify WorkSpaces have been updated with flexible storage and switching of hardware bundles feature. The following configurations have been added to ModifyWorkSpacesProperties: storage and compute. This update provides the capability to configure the storage of a WorkSpace. It also adds the capability of switching hardware bundle of a WorkSpace by specifying an eligible compute (Value, Standard, Performance, Power).
+
+Release v1.12.53 (2017-12-22)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API
+ * This release fixes an issue with tags not showing in DescribeAddresses responses.
+* `service/ecs`: Updates service API and documentation
+ * Amazon ECS users can now set a health check initialization wait period of their ECS services, the services that are associated with an Elastic Load Balancer (ELB) will wait for a period of time before the ELB become healthy. You can now configure this in Create and Update Service.
+* `service/inspector`: Updates service API and documentation
+ * PreviewAgents API now returns additional fields within the AgentPreview data type. The API now shows the agent health and availability status for all instances included in the assessment target. This allows users to check the health status of Inspector Agents before running an assessment. In addition, it shows the instance ID, hostname, and IP address of the targeted instances.
+* `service/sagemaker`: Updates service API and documentation
+ * SageMaker Models no longer support SupplementalContainers. API's that have been affected are CreateModel and DescribeModel.
+
+Release v1.12.52 (2017-12-21)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API and documentation
+ * Adding support allowing AWS CodeBuild customers to select specific curated image versions.
+* `service/ec2`: Updates service API and documentation
+ * Elastic IP tagging enables you to add key and value metadata to your Elastic IPs so that you can search, filter, and organize them according to your organization's needs.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/kinesisanalytics`: Updates service API and documentation
+ * Kinesis Analytics now supports AWS Lambda functions as output.
+
+Release v1.12.51 (2017-12-21)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/iot`: Updates service API and documentation
+ * This release adds support for code signed Over-the-air update functionality for Amazon FreeRTOS. Users can now create and schedule Over-the-air updates to their Amazon FreeRTOS devices using these new APIs.
+
+Release v1.12.50 (2017-12-19)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * API Gateway now adds support for calling API with compressed payloads using one of the supported content codings, tagging an API stage for cost allocation, and returning API keys from a custom authorizer for use with a usage plan.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/mediastore-data`: Updates service documentation
+* `service/route53`: Updates service API and documentation
+ * Route 53 added support for a new China (Ningxia) region, cn-northwest-1. You can now specify cn-northwest-1 as the region for latency-based or geoproximity routing. Route 53 also added support for a new EU (Paris) region, eu-west-3. You can now associate VPCs in eu-west-3 with private hosted zones and create alias records that route traffic to resources in eu-west-3.
+
+Release v1.12.49 (2017-12-19)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/monitoring`: Updates service documentation
+ * Documentation updates for monitoring
+
+Release v1.12.48 (2017-12-15)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * This API update is to enable customers to add tags to their Amazon AppStream 2.0 resources
+
+Release v1.12.47 (2017-12-14)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Adds support for Cognito Authorizer scopes at the API method level.
+* `service/email`: Updates service documentation
+ * Added information about the maximum number of transactions per second for the SendCustomVerificationEmail operation.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.46 (2017-12-12)
+===
+
+### Service Client Updates
+* `service/workmail`: Adds new service
+ * Today, Amazon WorkMail released an administrative SDK and enabled AWS CloudTrail integration. With the administrative SDK, you can natively integrate WorkMail with your existing services. The SDK enables programmatic user, resource, and group management through API calls. This means your existing IT tools and workflows can now automate WorkMail management, and third party applications can streamline WorkMail migrations and account actions.
+
+Release v1.12.45 (2017-12-11)
+===
+
+### Service Client Updates
+* `service/cognito-idp`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lex-models`: Updates service API and documentation
+* `service/sagemaker`: Updates service API
+ * CreateModel API Update: The request parameter 'ExecutionRoleArn' has changed from optional to required.
+
+Release v1.12.44 (2017-12-08)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * This API update is to support the feature that allows customers to automatically consume the latest Amazon AppStream 2.0 agent as and when published by AWS.
+* `service/ecs`: Updates service documentation
+ * Documentation updates for Windows containers.
+* `service/monitoring`: Updates service API and documentation
+ * With this launch, you can now create a CloudWatch alarm that alerts you when M out of N datapoints of a metric are breaching your predefined threshold, such as three out of five times in any given five minutes interval or two out of six times in a thirty minutes interval. When M out of N datapoints are not breaching your threshold in an interval, the alarm will be in OK state. Please note that the M datapoints out of N datapoints in an interval can be of any order and does not need to be consecutive. Consequently, you can now get alerted even when the spikes in your metrics are intermittent over an interval.
+
+Release v1.12.43 (2017-12-07)
+===
+
+### Service Client Updates
+* `service/email`: Updates service API, documentation, and paginators
+ * Customers can customize the emails that Amazon SES sends when verifying new identities. This feature is helpful for developers whose applications send email through Amazon SES on behalf of their customers.
+* `service/es`: Updates service API and documentation
+ * Added support for encryption of data at rest on Amazon Elasticsearch Service using AWS KMS
+
+### SDK Bugs
+* `models/apis` Fixes removes colliding sagemaker models folders ([#1686](https://github.com/aws/aws-sdk-go/pull/1686))
+ * Fixes Release v1.12.42's SageMaker vs sagemaker model folders.
+Release v1.12.42 (2017-12-06)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Amazon Cloud Directory makes it easier for you to apply schema changes across your directories with in-place schema upgrades. Your directories now remain available while backward-compatible schema changes are being applied, such as the addition of new fields. You also can view the history of your schema changes in Cloud Directory by using both major and minor version identifiers, which can help you track and audit schema versions across directories.
+* `service/elasticbeanstalk`: Updates service documentation
+ * Documentation updates for AWS Elastic Beanstalk.
+* `service/sagemaker`: Adds new service
+ * Initial waiters for common SageMaker workflows.
+
+Release v1.12.41 (2017-12-05)
+===
+
+### Service Client Updates
+* `service/iot`: Updates service API and documentation
+ * Add error action API for RulesEngine.
+* `service/servicecatalog`: Updates service API and documentation
+ * ServiceCatalog has two distinct personas for its use, an "admin" persona (who creates sets of products with different versions and prescribes who has access to them) and an "end-user" persona (who can launch cloud resources based on the configuration data their admins have given them access to). This API update will allow admin users to deactivate/activate product versions, end-user will only be able to access and launch active product versions.
+* `service/servicediscovery`: Adds new service
+ * Amazon Route 53 Auto Naming lets you configure public or private namespaces that your microservice applications run in. When instances of the service become available, you can call the Auto Naming API to register the instance, and Amazon Route 53 automatically creates up to five DNS records and an optional health check. Clients that submit DNS queries for the service receive an answer that contains up to eight healthy records.
+
+Release v1.12.40 (2017-12-04)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Add additional costTypes to support finer control for different charges included in a cost budget.
+* `service/ecs`: Updates service documentation
+ * Documentation updates for ecs
+
+Release v1.12.39 (2017-12-01)
+===
+
+### Service Client Updates
+* `service/SageMaker`: Updates service waiters
+
+Release v1.12.38 (2017-11-30)
+===
+
+### Service Client Updates
+* `service/AWSMoneypenny`: Adds new service
+* `service/Cloud9`: Adds new service
+* `service/Serverless Registry`: Adds new service
+* `service/apigateway`: Updates service API, documentation, and paginators
+ * Added support Private Integration and VPC Link features in API Gateway. This allows to create an API with the API Gateway private integration, thus providing clients access to HTTP/HTTPS resources in an Amazon VPC from outside of the VPC through a VpcLink resource.
+* `service/ec2`: Updates service API and documentation
+ * Adds the following updates: 1. Spread Placement ensures that instances are placed on distinct hardware in order to reduce correlated failures. 2. Inter-region VPC Peering allows customers to peer VPCs across different AWS regions without requiring additional gateways, VPN connections or physical hardware
+* `service/lambda`: Updates service API and documentation
+ * AWS Lambda now supports the ability to set the concurrency limits for individual functions, and increasing memory to 3008 MB.
+
+Release v1.12.37 (2017-11-30)
+===
+
+### Service Client Updates
+* `service/Ardi`: Adds new service
+* `service/autoscaling`: Updates service API and documentation
+ * You can now use Auto Scaling with EC2 Launch Templates via the CreateAutoScalingGroup and UpdateAutoScalingGroup APIs.
+* `service/ec2`: Updates service API and documentation
+ * Adds the following updates: 1. T2 Unlimited enables high CPU performance for any period of time whenever required 2. You are now able to create and launch EC2 m5 and h1 instances
+* `service/lightsail`: Updates service API and documentation
+ * This release adds support for load balancer and TLS/SSL certificate management. This set of APIs allows customers to create, manage, and scale secure load balanced applications on Lightsail infrastructure. To provide support for customers who manage their DNS on Lightsail, we've added the ability create an Alias A type record which can point to a load balancer DNS name via the CreateDomainEntry API http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_CreateDomainEntry.html.
+* `service/ssm`: Updates service API and documentation
+ * This release updates AWS Systems Manager APIs to enable executing automations at controlled rate, target resources in a resource groups and execute entire automation at once or single step at a time. It is now also possible to use YAML, in addition to JSON, when creating Systems Manager documents.
+* `service/waf`: Updates service API and documentation
+ * This release adds support for rule group and managed rule group. Rule group is a container of rules that customers can create, put rules in it and associate the rule group to a WebACL. All rules in a rule group will function identically as they would if each rule was individually associated to the WebACL. Managed rule group is a pre-configured rule group composed by our security partners and made available via the AWS Marketplace. Customers can subscribe to these managed rule groups, associate the managed rule group to their WebACL and start using them immediately to protect their resources.
+* `service/waf-regional`: Updates service API and documentation
+
+Release v1.12.36 (2017-11-29)
+===
+
+### Service Client Updates
+* `service/DeepInsight`: Adds new service
+* `service/IronmanRuntime`: Adds new service
+* `service/Orchestra - Laser`: Adds new service
+* `service/SageMaker`: Adds new service
+* `service/Shine`: Adds new service
+* `service/archived.kinesisvideo`: Adds new service
+* `service/data.kinesisvideo`: Adds new service
+* `service/dynamodb`: Updates service API and documentation
+ * Amazon DynamoDB now supports the following features: Global Table and On-Demand Backup. Global Table is a fully-managed, multi-region, multi-master database. DynamoDB customers can now write anywhere and read anywhere with single-digit millisecond latency by performing database operations closest to where end users reside. Global Table also enables customers to disaster-proof their applications, keeping them running and data accessible even in the face of natural disasters or region disruptions. Customers can set up Global Table with just a few clicks in the AWS Management Console-no application rewrites required. On-Demand Backup capability is to protect data from loss due to application errors, and meet customers' archival needs for compliance and regulatory reasons. Customers can backup and restore their DynamoDB table data anytime, with a single-click in the AWS management console or a single API call. Backup and restore actions execute with zero impact on table performance or availability. For more information, see the Amazon DynamoDB Developer Guide.
+* `service/ecs`: Updates service API and documentation
+ * Amazon Elastic Container Service (Amazon ECS) released a new launch type for running containers on a serverless infrastructure. The Fargate launch type allows you to run your containerized applications without the need to provision and manage the backend infrastructure. Just register your task definition and Fargate launches the container for you.
+* `service/glacier`: Updates service API and documentation
+ * This release includes support for Glacier Select, a new feature that allows you to filter and analyze your Glacier archives and store the results in a user-specified S3 location.
+* `service/greengrass`: Updates service API and documentation
+ * Greengrass OTA feature allows updating Greengrass Core and Greengrass OTA Agent. Local Resource Access feature allows Greengrass Lambdas to access local resources such as peripheral devices and volumes.
+* `service/iot`: Updates service API and documentation
+ * This release adds support for a number of new IoT features, including AWS IoT Device Management (Jobs, Fleet Index and Thing Registration), Thing Groups, Policies on Thing Groups, Registry & Job Events, JSON Logs, Fine-Grained Logging Controls, Custom Authorization and AWS Service Authentication Using X.509 Certificates.
+* `service/kinesisvideo`: Adds new service
+ * Announcing Amazon Kinesis Video Streams, a fully managed video ingestion and storage service. Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for machine learning, analytics, and processing. You can also stream other time-encoded data like RADAR and LIDAR signals using Kinesis Video Streams.
+* `service/rekognition`: Updates service API, documentation, and paginators
+ * This release introduces Amazon Rekognition support for video analysis.
+* `service/s3`: Updates service API and documentation
+ * This release includes support for Glacier Select, a new feature that allows you to filter and analyze your Glacier storage class objects and store the results in a user-specified S3 location.
+
+Release v1.12.35 (2017-11-29)
+===
+
+### Service Client Updates
+* `service/AmazonMQ`: Adds new service
+* `service/GuardDuty`: Adds new service
+* `service/apigateway`: Updates service API and documentation
+ * Changes related to CanaryReleaseDeployment feature. Enables API developer to create a deployment as canary deployment and test API changes with percentage of customers before promoting changes to all customers.
+* `service/batch`: Updates service API and documentation
+ * Add support for Array Jobs which allow users to easily submit many copies of a job with a single API call. This change also enhances the job dependency model to support N_TO_N and sequential dependency chains. The ListJobs and DescribeJobs APIs now have the ability to list or describe the status of entire Array Jobs or individual elements within the array.
+* `service/cognito-idp`: Updates service API and documentation
+* `service/deepdish`: Adds new service
+ * AWS AppSync is an enterprise-level, fully managed GraphQL service with real-time data synchronization and offline programming features.
+* `service/ec2`: Updates service API and documentation
+ * Adds the following updates: 1. You are now able to host a service powered by AWS PrivateLink to provide private connectivity to other VPCs. You are now also able to create endpoints to other services powered by PrivateLink including AWS services, Marketplace Seller services or custom services created by yourself or other AWS VPC customers. 2. You are now able to save launch parameters in a single template that can be used with Auto Scaling, Spot Fleet, Spot, and On Demand instances. 3. You are now able to launch Spot instances via the RunInstances API, using a single additional parameter. RunInstances will response synchronously with an instance ID should capacity be available for your Spot request. 4. A simplified Spot pricing model which delivers low, predictable prices that adjust gradually, based on long-term trends in supply and demand. 5. Amazon EC2 Spot can now hibernate Amazon EBS-backed instances in the event of an interruption, so your workloads pick up from where they left off. Spot can fulfill your request by resuming instances from a hibernated state when capacity is available.
+* `service/lambda`: Updates service API and documentation
+ * Lambda aliases can now shift traffic between two function versions, based on preassigned weights.
+
+Release v1.12.34 (2017-11-27)
+===
+
+### Service Client Updates
+* `service/data.mediastore`: Adds new service
+* `service/mediaconvert`: Adds new service
+ * AWS Elemental MediaConvert is a file-based video conversion service that transforms media into formats required for traditional broadcast and for internet streaming to multi-screen devices.
+* `service/medialive`: Adds new service
+ * AWS Elemental MediaLive is a video service that lets you easily create live outputs for broadcast and streaming delivery.
+* `service/mediapackage`: Adds new service
+ * AWS Elemental MediaPackage is a just-in-time video packaging and origination service that lets you format highly secure and reliable live outputs for a variety of devices.
+* `service/mediastore`: Adds new service
+ * AWS Elemental MediaStore is an AWS storage service optimized for media. It gives you the performance, consistency, and low latency required to deliver live and on-demand video content. AWS Elemental MediaStore acts as the origin store in your video workflow.
+
+Release v1.12.33 (2017-11-22)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service API and documentation
+ * AWS Certificate Manager now supports the ability to import domainless certs and additional Key Types as well as an additional validation method for DNS.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.32 (2017-11-22)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Add support for Access logs and customizable integration timeouts
+* `service/cloudformation`: Updates service API and documentation
+ * 1) Instance-level parameter overrides (CloudFormation-StackSet feature): This feature will allow the customers to override the template parameters on specific stackInstances. Customers will also have ability to update their existing instances with/without parameter-overrides using a new API "UpdateStackInstances" 2) Add support for SSM parameters in CloudFormation - This feature will allow the customers to use Systems Manager parameters in CloudFormation templates. They will be able to see values for these parameters in Describe APIs.
+* `service/codebuild`: Updates service API and documentation
+ * Adding support for accessing Amazon VPC resources from AWS CodeBuild, dependency caching and build badges.
+* `service/elasticmapreduce`: Updates service API and documentation
+ * Enable Kerberos on Amazon EMR.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rekognition`: Updates service API and documentation
+ * This release includes updates to Amazon Rekognition for the following APIs. The new DetectText API allows you to recognize and extract textual content from images. Face Model Versioning has been added to operations that deal with face detection.
+* `service/shield`: Updates service API, documentation, and paginators
+ * The AWS Shield SDK has been updated in order to support Elastic IP address protections, the addition of AttackProperties objects in DescribeAttack responses, and a new GetSubscriptionState operation.
+* `service/storagegateway`: Updates service API and documentation
+ * AWS Storage Gateway now enables you to get notification when all your files written to your NFS file share have been uploaded to Amazon S3. Storage Gateway also enables guessing of the MIME type for uploaded objects based on file extensions.
+* `service/xray`: Updates service API, documentation, and paginators
+ * Added automatic pagination support for AWS X-Ray APIs in the SDKs that support this feature.
+
+Release v1.12.31 (2017-11-20)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service documentation
+ * Documentation updates for Apigateway
+* `service/codecommit`: Updates service API, documentation, and paginators
+ * AWS CodeCommit now supports pull requests. You can use pull requests to collaboratively review code changes for minor changes or fixes, major feature additions, or new versions of your released software.
+* `service/firehose`: Updates service API and documentation
+ * This release includes a new Kinesis Firehose feature that supports Splunk as Kinesis Firehose delivery destination. You can now use Kinesis Firehose to ingest real-time data to Splunk in a serverless, reliable, and salable manner. This release also includes a new feature that allows you to configure Lambda buffer size in Kinesis Firehose data transformation feature. You can now customize the data buffer size before invoking Lambda function in Kinesis Firehose for data transformation. This feature allows you to flexibly trade-off processing and delivery latency with cost and efficiency based on your specific use cases and requirements.
+* `service/iis`: Adds new service
+ * The AWS Cost Explorer API gives customers programmatic access to AWS cost and usage information, allowing them to perform adhoc queries and build interactive cost management applications that leverage this dataset.
+* `service/kinesis`: Updates service API and documentation
+ * Customers can now obtain the important characteristics of their stream with DescribeStreamSummary. The response will not include the shard list for the stream but will have the number of open shards, and all the other fields included in the DescribeStream response.
+* `service/workdocs`: Updates service API and documentation
+ * DescribeGroups API and miscellaneous enhancements
+
+### SDK Bugs
+* `aws/client`: Retry delays for throttled exception were not limited to 5 minutes [#1654](https://github.com/aws/aws-sdk-go/pull/1654)
+ * Fixes [#1653](https://github.com/aws/aws-sdk-go/issues/1653)
+Release v1.12.30 (2017-11-17)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/dms`: Updates service API, documentation, and paginators
+ * Support for migration task assessment. Support for data validation after the migration.
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * Amazon RDS now supports importing MySQL databases by using backup files from Amazon S3.
+* `service/s3`: Updates service API
+ * Added ORC to the supported S3 Inventory formats.
+
+### SDK Bugs
+* `private/protocol/restjson`: Define JSONValue marshaling for body and querystring ([#1640](https://github.com/aws/aws-sdk-go/pull/1640))
+ * Adds support for APIs which use JSONValue for body and querystring targets.
+ * Fixes [#1636](https://github.com/aws/aws-sdk-go/issues/1636)
+Release v1.12.29 (2017-11-16)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/ec2`: Updates service API
+ * You are now able to create and launch EC2 x1e smaller instance sizes
+* `service/glue`: Updates service API and documentation
+ * API update for AWS Glue. New crawler configuration attribute enables customers to specify crawler behavior. New XML classifier enables classification of XML data.
+* `service/opsworkscm`: Updates service API, documentation, and waiters
+ * Documentation updates for OpsWorks-cm: a new feature, OpsWorks for Puppet Enterprise, that allows users to create and manage OpsWorks-hosted Puppet Enterprise servers.
+* `service/organizations`: Updates service API, documentation, and paginators
+ * This release adds APIs that you can use to enable and disable integration with AWS services designed to work with AWS Organizations. This integration allows the AWS service to perform operations on your behalf on all of the accounts in your organization. Although you can use these APIs yourself, we recommend that you instead use the commands provided in the other AWS service to enable integration with AWS Organizations.
+* `service/route53`: Updates service API and documentation
+ * You can use Route 53's GetAccountLimit/GetHostedZoneLimit/GetReusableDelegationSetLimit APIs to view your current limits (including custom set limits) on Route 53 resources such as hosted zones and health checks. These APIs also return the number of each resource you're currently using to enable comparison against your current limits.
+
+Release v1.12.28 (2017-11-15)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * 1. Extended GetDocumentationParts operation to support retrieving documentation parts resources without contents. 2. Added hosted zone ID in the custom domain response.
+* `service/email`: Updates service API, documentation, and examples
+ * SES launches Configuration Set Reputation Metrics and Email Pausing Today, two features that build upon the capabilities of the reputation dashboard. The first is the ability to export reputation metrics for individual configuration sets. The second is the ability to temporarily pause email sending, either at the configuration set level, or across your entire Amazon SES account.
+* `service/polly`: Updates service API
+ * Amazon Polly adds Korean language support with new female voice - "Seoyeon" and new Indian English female voice - "Aditi"
+* `service/states`: Updates service API and documentation
+ * You can now use the UpdateStateMachine API to update your state machine definition and role ARN. Existing executions will continue to use the previous definition and role ARN. You can use the DescribeStateMachineForExecution API to determine which state machine definition and role ARN is associated with an execution
+
+Release v1.12.27 (2017-11-14)
+===
+
+### Service Client Updates
+* `service/ecs`: Updates service API and documentation
+ * Added new mode for Task Networking in ECS, called awsvpc mode. Mode configuration parameters to be passed in via awsvpcConfiguration. Updated APIs now use/show this new mode - RegisterTaskDefinition, CreateService, UpdateService, RunTask, StartTask.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lightsail`: Updates service API and documentation
+ * Lightsail now supports attached block storage, which allows you to scale your applications and protect application data with additional SSD-backed storage disks. This feature allows Lightsail customers to attach secure storage disks to their Lightsail instances and manage their attached disks, including creating and deleting disks, attaching and detaching disks from instances, and backing up disks via snapshot.
+* `service/route53`: Updates service API and documentation
+ * When a Route 53 health check or hosted zone is created by a linked AWS service, the object now includes information about the service that created it. Hosted zones or health checks that are created by a linked service can't be updated or deleted using Route 53.
+* `service/ssm`: Updates service API and documentation
+ * EC2 Systems Manager GetInventory API adds support for aggregation.
+
+### SDK Enhancements
+* `aws/request`: Remove default port from HTTP host header ([#1618](https://github.com/aws/aws-sdk-go/pull/1618))
+ * Updates the SDK to automatically remove default ports based on the URL's scheme when setting the HTTP Host header's value.
+ * Fixes [#1537](https://github.com/aws/aws-sdk-go/issues/1537)
+
+Release v1.12.26 (2017-11-09)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Introduces the following features: 1. Create a default subnet in an Availability Zone if no default subnet exists. 2. Spot Fleet integrates with Elastic Load Balancing to enable you to attach one or more load balancers to a Spot Fleet request. When you attach the load balancer, it automatically registers the instance in the Spot Fleet to the load balancers which distributes incoming traffic across the instances.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.25 (2017-11-08)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/batch`: Updates service documentation
+ * Documentation updates for AWS Batch.
+* `service/ec2`: Updates service API and documentation
+ * AWS PrivateLink for Amazon Services - Customers can now privately access Amazon services from their Amazon Virtual Private Cloud (VPC), without using public IPs, and without requiring the traffic to traverse across the Internet.
+* `service/elasticache`: Updates service API and documentation
+ * This release adds online resharding for ElastiCache for Redis offering, providing the ability to add and remove shards from a running cluster. Developers can now dynamically scale-out or scale-in their Redis cluster workloads to adapt to changes in demand. ElastiCache will resize the cluster by adding or removing shards and redistribute hash slots uniformly across the new shard configuration, all while the cluster continues to stay online and serves requests.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.24 (2017-11-07)
+===
+
+### Service Client Updates
+* `service/elasticloadbalancingv2`: Updates service documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * DescribeOrderableDBInstanceOptions now returns the minimum and maximum allowed values for storage size, total provisioned IOPS, and provisioned IOPS per GiB for a DB instance.
+* `service/s3`: Updates service API, documentation, and examples
+ * This releases adds support for 4 features: 1. Default encryption for S3 Bucket, 2. Encryption status in inventory and Encryption support for inventory. 3. Cross region replication of KMS-encrypted objects, and 4. ownership overwrite for CRR.
+
+Release v1.12.23 (2017-11-07)
+===
+
+### Service Client Updates
+* `service/api.pricing`: Adds new service
+* `service/ec2`: Updates service API
+ * You are now able to create and launch EC2 C5 instances, the next generation of EC2's compute-optimized instances, in us-east-1, us-west-2 and eu-west-1. C5 instances offer up to 72 vCPUs, 144 GiB of DDR4 instance memory, 25 Gbps in Network bandwidth and improved EBS and Networking bandwidth on smaller instance sizes to deliver improved performance for compute-intensive workloads.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/kms`: Updates service API, documentation, and examples
+ * Documentation updates for AWS KMS.
+* `service/organizations`: Updates service documentation
+ * This release updates permission statements for several API operations, and corrects some other minor errors.
+* `service/states`: Updates service API, documentation, and paginators
+ * Documentation update.
+
+Release v1.12.22 (2017-11-03)
+===
+
+### Service Client Updates
+* `service/ecs`: Updates service API and documentation
+ * Amazon ECS users can now add devices to their containers and enable init process in containers through the use of docker's 'devices' and 'init' features. These fields can be specified under linuxParameters in ContainerDefinition in the Task Definition Template.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.21 (2017-11-02)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * This release supports creating and managing Regional and Edge-Optimized API endpoints.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+### SDK Bugs
+* `aws/request`: Fix bug in request presign creating invalid URL ([#1624](https://github.com/aws/aws-sdk-go/pull/1624))
+ * Fixes a bug the Request Presign and PresignRequest methods that would allow a invalid expire duration as input. A expire time of 0 would be interpreted by the SDK to generate a normal request signature, not a presigned URL. This caused the returned URL unusable.
+ * Fixes [#1617](https://github.com/aws/aws-sdk-go/issues/1617)
+Release v1.12.20 (2017-11-01)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service documentation
+ * Documentation updates for ACM
+* `service/cloudhsmv2`: Updates service documentation
+ * Minor documentation update for AWS CloudHSM (cloudhsmv2).
+* `service/directconnect`: Updates service API and documentation
+ * AWS DirectConnect now provides support for Global Access for Virtual Private Cloud (VPC) via a new feature called Direct Connect Gateway. A Direct Connect Gateway will allow you to group multiple Direct Connect Private Virtual Interfaces (DX-VIF) and Private Virtual Gateways (VGW) from different AWS regions (but belonging to the same AWS Account) and pass traffic from any DX-VIF to any VPC in the grouping.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+### SDK Enhancements
+* `aws/client`: Adding status code 429 to throttlable status codes in default retryer (#1621)
+
+Release v1.12.19 (2017-10-26)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.18 (2017-10-26)
+===
+
+### Service Client Updates
+* `service/cloudfront`: Updates service API and documentation
+ * You can now specify additional options for MinimumProtocolVersion, which controls the SSL/TLS protocol that CloudFront uses to communicate with viewers. The minimum protocol version that you choose also determines the ciphers that CloudFront uses to encrypt the content that it returns to viewers.
+* `service/ec2`: Updates service API
+ * You are now able to create and launch EC2 P3 instance, next generation GPU instances, optimized for machine learning and high performance computing applications. With up to eight NVIDIA Tesla V100 GPUs, P3 instances provide up to one petaflop of mixed-precision, 125 teraflops of single-precision, and 62 teraflops of double-precision floating point performance, as well as a 300 GB/s second-generation NVLink interconnect that enables high-speed, low-latency GPU-to-GPU communication. P3 instances also feature up to 64 vCPUs based on custom Intel Xeon E5 (Broadwell) processors, 488 GB of DRAM, and 25 Gbps of dedicated aggregate network bandwidth using the Elastic Network Adapter (ENA).
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.17 (2017-10-24)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API
+* `service/elasticache`: Updates service API, documentation, and examples
+ * Amazon ElastiCache for Redis today announced support for data encryption both for data in-transit and data at-rest. The new encryption in-transit functionality enables ElastiCache for Redis customers to encrypt data for all communication between clients and Redis engine, and all intra-cluster Redis communication. The encryption at-rest functionality allows customers to encrypt their S3 based backups. Customers can begin using the new functionality by simply enabling this functionality via AWS console, and a small configuration change in their Redis clients. The ElastiCache for Redis service automatically manages life cycle of the certificates required for encryption, including the issuance, renewal and expiration of certificates. Additionally, as part of this launch, customers will gain the ability to start using the Redis AUTH command that provides an added level of authentication.
+* `service/glue`: Adds new service
+ * AWS Glue: Adding a new API, BatchStopJobRun, to stop one or more job runs for a specified Job.
+* `service/pinpoint`: Updates service API and documentation
+ * Added support for APNs VoIP messages. Added support for collapsible IDs, message priority, and TTL for APNs and FCM/GCM.
+
+Release v1.12.16 (2017-10-23)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/organizations`: Updates service API and documentation
+ * This release supports integrating other AWS services with AWS Organizations through the use of an IAM service-linked role called AWSServiceRoleForOrganizations. Certain operations automatically create that role if it does not already exist.
+
+Release v1.12.15 (2017-10-20)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Adding pagination support for DescribeSecurityGroups for EC2 Classic and VPC Security Groups
+
+Release v1.12.14 (2017-10-19)
+===
+
+### Service Client Updates
+* `service/sqs`: Updates service API and documentation
+ * Added support for tracking cost allocation by adding, updating, removing, and listing the metadata tags of Amazon SQS queues.
+* `service/ssm`: Updates service API and documentation
+ * EC2 Systems Manager versioning support for Parameter Store. Also support for referencing parameter versions in SSM Documents.
+
+Release v1.12.13 (2017-10-18)
+===
+
+### Service Client Updates
+* `service/lightsail`: Updates service API and documentation
+ * This release adds support for Windows Server-based Lightsail instances. The GetInstanceAccessDetails API now returns the password of your Windows Server-based instance when using the default key pair. GetInstanceAccessDetails also returns a PasswordData object for Windows Server instances containing the ciphertext and keyPairName. The Blueprint data type now includes a list of platform values (LINUX_UNIX or WINDOWS). The Bundle data type now includes a list of SupportedPlatforms values (LINUX_UNIX or WINDOWS).
+
+Release v1.12.12 (2017-10-17)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/es`: Updates service API and documentation
+ * This release adds support for VPC access to Amazon Elasticsearch Service.
+ * This release adds support for VPC access to Amazon Elasticsearch Service.
+
+Release v1.12.11 (2017-10-16)
+===
+
+### Service Client Updates
+* `service/cloudhsm`: Updates service API and documentation
+ * Documentation updates for AWS CloudHSM Classic.
+* `service/ec2`: Updates service API and documentation
+ * You can now change the tenancy of your VPC from dedicated to default with a single API operation. For more details refer to the documentation for changing VPC tenancy.
+* `service/es`: Updates service API and documentation
+ * AWS Elasticsearch adds support for enabling slow log publishing. Using slow log publishing options customers can configure and enable index/query slow log publishing of their domain to preferred AWS Cloudwatch log group.
+* `service/rds`: Updates service API and waiters
+ * Adds waiters for DBSnapshotAvailable and DBSnapshotDeleted.
+* `service/waf`: Updates service API and documentation
+ * This release adds support for regular expressions as match conditions in rules, and support for geographical location by country of request IP address as a match condition in rules.
+* `service/waf-regional`: Updates service API and documentation
+
+Release v1.12.10 (2017-10-12)
+===
+
+### Service Client Updates
+* `service/codecommit`: Updates service API and documentation
+ * This release includes the DeleteBranch API and a change to the contents of a Commit object.
+* `service/dms`: Updates service API and documentation
+ * This change includes addition of new optional parameter to an existing API
+* `service/elasticbeanstalk`: Updates service API and documentation
+ * Added the ability to add, delete or update Tags
+* `service/polly`: Updates service API
+ * Amazon Polly exposes two new voices: "Matthew" (US English) and "Takumi" (Japanese)
+* `service/rds`: Updates service API and documentation
+ * You can now call DescribeValidDBInstanceModifications to learn what modifications you can make to your DB instance. You can use this information when you call ModifyDBInstance.
+
+Release v1.12.9 (2017-10-11)
+===
+
+### Service Client Updates
+* `service/ecr`: Updates service API, documentation, and paginators
+ * Adds support for new API set used to manage Amazon ECR repository lifecycle policies. Amazon ECR lifecycle policies enable you to specify the lifecycle management of images in a repository. The configuration is a set of one or more rules, where each rule defines an action for Amazon ECR to apply to an image. This allows the automation of cleaning up unused images, for example expiring images based on age or status. A lifecycle policy preview API is provided as well, which allows you to see the impact of a lifecycle policy on an image repository before you execute it
+* `service/email`: Updates service API and documentation
+ * Added content related to email template management and templated email sending operations.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.12.8 (2017-10-10)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * This release includes updates to AWS Virtual Private Gateway.
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `service/opsworkscm`: Updates service API and documentation
+ * Provide engine specific information for node associations.
+
+Release v1.12.7 (2017-10-06)
+===
+
+### Service Client Updates
+* `service/sqs`: Updates service documentation
+ * Documentation updates regarding availability of FIFO queues and miscellaneous corrections.
+
+Release v1.12.6 (2017-10-05)
+===
+
+### Service Client Updates
+* `service/redshift`: Updates service API and documentation
+ * DescribeEventSubscriptions API supports tag keys and tag values as request parameters.
+
+Release v1.12.5 (2017-10-04)
+===
+
+### Service Client Updates
+* `service/kinesisanalytics`: Updates service API and documentation
+ * Kinesis Analytics now supports schema discovery on objects in S3. Additionally, Kinesis Analytics now supports input data preprocessing through Lambda.
+* `service/route53domains`: Updates service API and documentation
+ * Added a new API that checks whether a domain name can be transferred to Amazon Route 53.
+
+### SDK Bugs
+* `service/s3/s3crypto`: Correct PutObjectRequest documentation ([#1568](https://github.com/aws/aws-sdk-go/pull/1568))
+ * s3Crypto's PutObjectRequest docstring example was using an incorrect value. Corrected the type used in the example.
+Release v1.12.4 (2017-10-03)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API, documentation, and waiters
+ * This release includes service updates to AWS VPN.
+* `service/ssm`: Updates service API and documentation
+ * EC2 Systems Manager support for tagging SSM Documents. Also support for tag-based permissions to restrict access to SSM Documents based on these tags.
+
+Release v1.12.3 (2017-10-02)
+===
+
+### Service Client Updates
+* `service/cloudhsm`: Updates service documentation and paginators
+ * Documentation updates for CloudHSM
+
+Release v1.12.2 (2017-09-29)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * Includes APIs for managing and accessing image builders, and deleting images.
+* `service/codebuild`: Updates service API and documentation
+ * Adding support for Building GitHub Pull Requests in AWS CodeBuild
+* `service/mturk-requester`: Updates service API and documentation
+* `service/organizations`: Updates service API and documentation
+ * This release flags the HandshakeParty structure's Type and Id fields as 'required'. They effectively were required in the past, as you received an error if you did not include them. This is now reflected at the API definition level.
+* `service/route53`: Updates service API and documentation
+ * This change allows customers to reset elements of health check.
+
+### SDK Bugs
+* `private/protocol/query`: Fix query protocol handling of nested byte slices ([#1557](https://github.com/aws/aws-sdk-go/issues/1557))
+ * Fixes the query protocol to correctly marshal nested []byte values of API operations.
+* `service/s3`: Fix PutObject and UploadPart API to include ContentMD5 field ([#1559](https://github.com/aws/aws-sdk-go/pull/1559))
+ * Fixes the SDK's S3 PutObject and UploadPart API code generation to correctly render the ContentMD5 field into the associated input types for these two API operations.
+ * Fixes [#1553](https://github.com/aws/aws-sdk-go/pull/1553)
+Release v1.12.1 (2017-09-27)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/pinpoint`: Updates service API and documentation
+ * Added two new push notification channels: Amazon Device Messaging (ADM) and, for push notification support in China, Baidu Cloud Push. Added support for APNs auth via .p8 key file. Added operation for direct message deliveries to user IDs, enabling you to message an individual user on multiple endpoints.
+
+Release v1.12.0 (2017-09-26)
+===
+
+### SDK Bugs
+* `API Marshaler`: Revert REST JSON and XML protocol marshaler improvements
+ * Bug [#1550](https://github.com/aws/aws-sdk-go/issues/1550) identified a missed condition in the Amazon Route 53 RESTXML protocol marshaling causing requests to that service to fail. Reverting the marshaler improvements until the bug can be fixed.
+
+Release v1.11.0 (2017-09-26)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service API and documentation
+ * You can now prevent a stack from being accidentally deleted by enabling termination protection on the stack. If you attempt to delete a stack with termination protection enabled, the deletion fails and the stack, including its status, remains unchanged. You can enable termination protection on a stack when you create it. Termination protection on stacks is disabled by default. After creation, you can set termination protection on a stack whose status is CREATE_COMPLETE, UPDATE_COMPLETE, or UPDATE_ROLLBACK_COMPLETE.
+
+### SDK Features
+* Add dep Go dependency management metadata files (#1544)
+ * Adds the Go `dep` dependency management metadata files to the SDK.
+ * Fixes [#1451](https://github.com/aws/aws-sdk-go/issues/1451)
+ * Fixes [#634](https://github.com/aws/aws-sdk-go/issues/634)
+* `service/dynamodb/expression`: Add expression building utility for DynamoDB ([#1527](https://github.com/aws/aws-sdk-go/pull/1527))
+ * Adds a new package, expression, to the SDK providing builder utilities to create DynamoDB expressions safely taking advantage of type safety.
+* `API Marshaler`: Add generated marshalers for RESTXML protocol ([#1409](https://github.com/aws/aws-sdk-go/pull/1409))
+ * Updates the RESTXML protocol marshaler to use generated code instead of reflection for REST XML based services.
+* `API Marshaler`: Add generated marshalers for RESTJSON protocol ([#1547](https://github.com/aws/aws-sdk-go/pull/1547))
+ * Updates the RESTJSON protocol marshaler to use generated code instead of reflection for REST JSON based services.
+
+### SDK Enhancements
+* `private/protocol`: Update format of REST JSON and XMl benchmarks ([#1546](https://github.com/aws/aws-sdk-go/pull/1546))
+ * Updates the format of the REST JSON and XML benchmarks to be readable. RESTJSON benchmarks were updated to more accurately bench building of the protocol.
+
+Release v1.10.51 (2017-09-22)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API and documentation
+* `service/ecs`: Updates service API and documentation
+ * Amazon ECS users can now add and drop Linux capabilities to their containers through the use of docker's cap-add and cap-drop features. Customers can specify the capabilities they wish to add or drop for each container in their task definition.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service documentation
+ * Documentation updates for rds
+
+Release v1.10.50 (2017-09-21)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API
+ * Including "DuplicateRecordException" in UpdateNotification and UpdateSubscriber.
+* `service/ec2`: Updates service API and documentation
+ * Add EC2 APIs to copy Amazon FPGA Images (AFIs) within the same region and across multiple regions, delete AFIs, and modify AFI attributes. AFI attributes include name, description and granting/denying other AWS accounts to load the AFI.
+* `service/logs`: Updates service API and documentation
+ * Adds support for associating LogGroups with KMS Keys.
+
+### SDK Bugs
+* Fix greengrass service model being duplicated with different casing. ([#1541](https://github.com/aws/aws-sdk-go/pull/1541))
+ * Fixes [#1540](https://github.com/aws/aws-sdk-go/issues/1540)
+ * Fixes [#1539](https://github.com/aws/aws-sdk-go/issues/1539)
+Release v1.10.49 (2017-09-20)
+===
+
+### Service Client Updates
+* `service/Greengrass`: Adds new service
+* `service/appstream`: Updates service API and documentation
+ * API updates for supporting On-Demand fleets.
+* `service/codepipeline`: Updates service API and documentation
+ * This change includes a PipelineMetadata object that is part of the output from the GetPipeline API that includes the Pipeline ARN, created, and updated timestamp.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/rds`: Updates service API and documentation
+ * Introduces the --option-group-name parameter to the ModifyDBSnapshot CLI command. You can specify this parameter when you upgrade an Oracle DB snapshot. The same option group considerations apply when upgrading a DB snapshot as when upgrading a DB instance. For more information, see http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Oracle.html#USER_UpgradeDBInstance.Oracle.OGPG.OG
+* `service/runtime.lex`: Updates service API and documentation
+
+Release v1.10.48 (2017-09-19)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API
+ * Fixed bug in EC2 clients preventing ElasticGpuSet from being set.
+
+### SDK Enhancements
+* `aws/credentials`: Add EnvProviderName constant. ([#1531](https://github.com/aws/aws-sdk-go/issues/1531))
+ * Adds the "EnvConfigCredentials" string literal as EnvProviderName constant.
+ * Fixes [#1444](https://github.com/aws/aws-sdk-go/issues/1444)
+
+Release v1.10.47 (2017-09-18)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Amazon EC2 now lets you opt for Spot instances to be stopped in the event of an interruption instead of being terminated. Your Spot request can be fulfilled again by restarting instances from a previously stopped state, subject to availability of capacity at or below your preferred price. When you submit a persistent Spot request, you can choose from "terminate" or "stop" as the instance interruption behavior. Choosing "stop" will shutdown your Spot instances so you can continue from this stopped state later on. This feature is only available for instances with Amazon EBS volume as their root device.
+* `service/email`: Updates service API and documentation
+ * Amazon Simple Email Service (Amazon SES) now lets you customize the domains used for tracking open and click events. Previously, open and click tracking links referred to destinations hosted on domains operated by Amazon SES. With this feature, you can use your own branded domains for capturing open and click events.
+* `service/iam`: Updates service API and documentation
+ * A new API, DeleteServiceLinkedRole, submits a service-linked role deletion request and returns a DeletionTaskId, which you can use to check the status of the deletion.
+
+Release v1.10.46 (2017-09-15)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Add a new enum "REQUEST" to '--type ' field in the current create-authorizer API, and make "identitySource" optional.
+
+Release v1.10.45 (2017-09-14)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API and documentation
+ * Supporting Parameter Store in environment variables for AWS CodeBuild
+* `service/organizations`: Updates service documentation
+ * Documentation updates for AWS Organizations
+* `service/servicecatalog`: Updates service API, documentation, and paginators
+ * This release of Service Catalog adds API support to copy products.
+
+Release v1.10.44 (2017-09-13)
+===
+
+### Service Client Updates
+* `service/autoscaling`: Updates service API and documentation
+ * Customers can create Life Cycle Hooks at the time of creating Auto Scaling Groups through the CreateAutoScalingGroup API
+* `service/batch`: Updates service documentation and examples
+ * Documentation updates for batch
+* `service/ec2`: Updates service API
+ * You are now able to create and launch EC2 x1e.32xlarge instance, a new EC2 instance in the X1 family, in us-east-1, us-west-2, eu-west-1, and ap-northeast-1. x1e.32xlarge offers 128 vCPUs, 3,904 GiB of DDR4 instance memory, high memory bandwidth, large L3 caches, and leading reliability capabilities to boost the performance and reliability of in-memory applications.
+* `service/events`: Updates service API and documentation
+ * Exposes ConcurrentModificationException as one of the valid exceptions for PutPermission and RemovePermission operation.
+
+### SDK Enhancements
+* `service/autoscaling`: Fix documentation for PutScalingPolicy.AutoScalingGroupName [#1522](https://github.com/aws/aws-sdk-go/pull/1522)
+* `service/s3/s3manager`: Clarify S3 Upload manager Concurrency config [#1521](https://github.com/aws/aws-sdk-go/pull/1521)
+ * Fixes [#1458](https://github.com/aws/aws-sdk-go/issues/1458)
+* `service/dynamodb/dynamodbattribute`: Add support for time alias. [#1520](https://github.com/aws/aws-sdk-go/pull/1520)
+ * Related to [#1505](https://github.com/aws/aws-sdk-go/pull/1505)
+
+Release v1.10.43 (2017-09-12)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API
+ * Fixed bug in EC2 clients preventing HostOfferingSet from being set
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.42 (2017-09-12)
+===
+
+### Service Client Updates
+* `service/devicefarm`: Updates service API and documentation
+ * DeviceFarm has added support for two features - RemoteDebugging and Customer Artifacts. Customers can now do remote Debugging on their Private Devices and can now retrieve custom files generated by their tests on the device and the device host (execution environment) on both public and private devices.
+
+Release v1.10.41 (2017-09-08)
+===
+
+### Service Client Updates
+* `service/logs`: Updates service API and documentation
+ * Adds support for the PutResourcePolicy, DescribeResourcePolicy and DeleteResourcePolicy APIs.
+
+Release v1.10.40 (2017-09-07)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service documentation
+* `service/ec2`: Updates service API and documentation
+ * With Tagging support, you can add Key and Value metadata to search, filter and organize your NAT Gateways according to your organization's needs.
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lex-models`: Updates service API and documentation
+* `service/route53`: Updates service API and documentation
+ * You can configure Amazon Route 53 to log information about the DNS queries that Amazon Route 53 receives for your domains and subdomains. When you configure query logging, Amazon Route 53 starts to send logs to CloudWatch Logs. You can use various tools, including the AWS console, to access the query logs.
+
+Release v1.10.39 (2017-09-06)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Add an optional "thresholdType" to notifications to support percentage or absolute value thresholds.
+
+Release v1.10.38 (2017-09-05)
+===
+
+### Service Client Updates
+* `service/codestar`: Updates service API and documentation
+ * Added support to tag CodeStar projects. Tags can be used to organize and find CodeStar projects on key-value pairs that you can choose. For example, you could add a tag with a key of "Release" and a value of "Beta" to projects your organization is working on for an upcoming beta release.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.37 (2017-09-01)
+===
+
+### Service Client Updates
+* `service/MobileHub`: Adds new service
+* `service/gamelift`: Updates service API and documentation
+ * GameLift VPC resources can be peered with any other AWS VPC. R4 memory-optimized instances now available to deploy.
+* `service/ssm`: Updates service API and documentation
+ * Adding KMS encryption support to SSM Inventory Resource Data Sync. Exposes the ClientToken parameter on SSM StartAutomationExecution to provide idempotent execution requests.
+
+Release v1.10.36 (2017-08-31)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API, documentation, and examples
+ * The AWS CodeBuild HTTP API now provides the BatchDeleteBuilds operation, which enables you to delete existing builds.
+* `service/ec2`: Updates service API and documentation
+ * Descriptions for Security Group Rules enables customers to be able to define a description for ingress and egress security group rules . The Descriptions for Security Group Rules feature supports one description field per Security Group rule for both ingress and egress rules . Descriptions for Security Group Rules provides a simple way to describe the purpose or function of a Security Group Rule allowing for easier customer identification of configuration elements . Prior to the release of Descriptions for Security Group Rules , customers had to maintain a separate system outside of AWS if they wanted to track Security Group Rule mapping and their purpose for being implemented. If a security group rule has already been created and you would like to update or change your description for that security group rule you can use the UpdateSecurityGroupRuleDescription API.
+* `service/elasticloadbalancingv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lex-models`: Updates service API and documentation
+
+### SDK Bugs
+* `aws/signer/v4`: Revert [#1491](https://github.com/aws/aws-sdk-go/issues/1491) as change conflicts with an undocumented AWS v4 signature test case.
+ * Related to: [#1495](https://github.com/aws/aws-sdk-go/issues/1495).
+Release v1.10.35 (2017-08-30)
+===
+
+### Service Client Updates
+* `service/application-autoscaling`: Updates service API and documentation
+* `service/organizations`: Updates service API and documentation
+ * The exception ConstraintViolationException now contains a new reason subcode MASTERACCOUNT_MISSING_CONTACT_INFO to make it easier to understand why attempting to remove an account from an Organization can fail. We also improved several other of the text descriptions and examples.
+
+Release v1.10.34 (2017-08-29)
+===
+
+### Service Client Updates
+* `service/config`: Updates service API and documentation
+* `service/ec2`: Updates service API and documentation
+ * Provides capability to add secondary CIDR blocks to a VPC.
+
+### SDK Bugs
+* `aws/signer/v4`: Fix Signing Unordered Multi Value Query Parameters ([#1491](https://github.com/aws/aws-sdk-go/pull/1491))
+ * Removes sorting of query string values when calculating v4 signing as this is not part of the spec. The spec only requires the keys, not values, to be sorted which is achieved by Query.Encode().
+Release v1.10.33 (2017-08-25)
+===
+
+### Service Client Updates
+* `service/cloudformation`: Updates service API and documentation
+ * Rollback triggers enable you to have AWS CloudFormation monitor the state of your application during stack creation and updating, and to roll back that operation if the application breaches the threshold of any of the alarms you've specified.
+* `service/gamelift`: Updates service API
+ * Update spelling of MatchmakingTicket status values for internal consistency.
+* `service/rds`: Updates service API and documentation
+ * Option group options now contain additional properties that identify requirements for certain options. Check these properties to determine if your DB instance must be in a VPC or have auto minor upgrade turned on before you can use an option. Check to see if you can downgrade the version of an option after you have installed it.
+
+### SDK Enhancements
+* `example/service/ec2`: Add EC2 list instances example ([#1492](https://github.com/aws/aws-sdk-go/pull/1492))
+
+Release v1.10.32 (2017-08-25)
+===
+
+### Service Client Updates
+* `service/rekognition`: Updates service API, documentation, and examples
+ * Update the enum value of LandmarkType and GenderType to be consistent with service response
+
+Release v1.10.31 (2017-08-23)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service documentation
+ * Documentation updates for appstream
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.30 (2017-08-22)
+===
+
+### Service Client Updates
+* `service/ssm`: Updates service API and documentation
+ * Changes to associations in Systems Manager State Manager can now be recorded. Previously, when you edited associations, you could not go back and review older association settings. Now, associations are versioned, and can be named using human-readable strings, allowing you to see a trail of association changes. You can also perform rate-based scheduling, which allows you to schedule associations more granularly.
+
+Release v1.10.29 (2017-08-21)
+===
+
+### Service Client Updates
+* `service/firehose`: Updates service API, documentation, and paginators
+ * This change will allow customers to attach a Firehose delivery stream to an existing Kinesis stream directly. You no longer need a forwarder to move data from a Kinesis stream to a Firehose delivery stream. You can now run your streaming applications on your Kinesis stream and easily attach a Firehose delivery stream to it for data delivery to S3, Redshift, or Elasticsearch concurrently.
+* `service/route53`: Updates service API and documentation
+ * Amazon Route 53 now supports CAA resource record type. A CAA record controls which certificate authorities are allowed to issue certificates for the domain or subdomain.
+
+Release v1.10.28 (2017-08-18)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.27 (2017-08-16)
+===
+
+### Service Client Updates
+* `service/gamelift`: Updates service API and documentation
+ * The Matchmaking Grouping Service is a new feature that groups player match requests for a given game together into game sessions based on developer configured rules.
+
+### SDK Enhancements
+* `aws/arn`: aws/arn: Package for parsing and producing ARNs ([#1463](https://github.com/aws/aws-sdk-go/pull/1463))
+ * Adds the `arn` package for AWS ARN parsing and building. Use this package to build AWS ARNs for services such as outlined in the [documentation](http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
+
+### SDK Bugs
+* `aws/signer/v4`: Correct V4 presign signature to include content sha25 in URL ([#1469](https://github.com/aws/aws-sdk-go/pull/1469))
+ * Updates the V4 signer so that when a Presign is generated the `X-Amz-Content-Sha256` header is added to the query string instead of being required to be in the header. This allows you to generate presigned URLs for GET requests, e.g S3.GetObject that do not require additional headers to be set by the downstream users of the presigned URL.
+ * Related To: [#1467](https://github.com/aws/aws-sdk-go/issues/1467)
+
+Release v1.10.26 (2017-08-15)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API
+ * Fixed bug in EC2 clients preventing HostReservation from being set
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+
+Release v1.10.25 (2017-08-14)
+===
+
+### Service Client Updates
+* `service/AWS Glue`: Adds new service
+* `service/batch`: Updates service API and documentation
+ * This release enhances the DescribeJobs API to include the CloudWatch logStreamName attribute in ContainerDetail and ContainerDetailAttempt
+* `service/cloudhsmv2`: Adds new service
+ * CloudHSM provides hardware security modules for protecting sensitive data and cryptographic keys within an EC2 VPC, and enable the customer to maintain control over key access and use. This is a second-generation of the service that will improve security, lower cost and provide better customer usability.
+* `service/elasticfilesystem`: Updates service API, documentation, and paginators
+ * Customers can create encrypted EFS file systems and specify a KMS master key to encrypt it with.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/mgh`: Adds new service
+ * AWS Migration Hub provides a single location to track migrations across multiple AWS and partner solutions. Using Migration Hub allows you to choose the AWS and partner migration tools that best fit your needs, while providing visibility into the status of your entire migration portfolio. Migration Hub also provides key metrics and progress for individual applications, regardless of which tools are being used to migrate them. For example, you might use AWS Database Migration Service, AWS Server Migration Service, and partner migration tools to migrate an application comprised of a database, virtualized web servers, and a bare metal server. Using Migration Hub will provide you with a single screen that shows the migration progress of all the resources in the application. This allows you to quickly get progress updates across all of your migrations, easily identify and troubleshoot any issues, and reduce the overall time and effort spent on your migration projects. Migration Hub is available to all AWS customers at no additional charge. You only pay for the cost of the migration tools you use, and any resources being consumed on AWS.
+* `service/ssm`: Updates service API and documentation
+ * Systems Manager Maintenance Windows include the following changes or enhancements: New task options using Systems Manager Automation, AWS Lambda, and AWS Step Functions; enhanced ability to edit the targets of a Maintenance Window, including specifying a target name and description, and ability to edit the owner field; enhanced ability to edits tasks; enhanced support for Run Command parameters; and you can now use a --safe flag when attempting to deregister a target. If this flag is enabled when you attempt to deregister a target, the system returns an error if the target is referenced by any task. Also, Systems Manager now includes Configuration Compliance to scan your fleet of managed instances for patch compliance and configuration inconsistencies. You can collect and aggregate data from multiple AWS accounts and Regions, and then drill down into specific resources that aren't compliant.
+* `service/storagegateway`: Updates service API and documentation
+ * Add optional field ForceDelete to DeleteFileShare api.
+
+Release v1.10.24 (2017-08-11)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * Adds support for specifying Application Load Balancers in deployment groups, for both in-place and blue/green deployments.
+* `service/cognito-idp`: Updates service API and documentation
+* `service/ec2`: Updates service API and documentation
+ * Provides customers an opportunity to recover an EIP that was released
+
+Release v1.10.23 (2017-08-10)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Enable BatchDetachPolicy
+* `service/codebuild`: Updates service API
+ * Supporting Bitbucket as source type in AWS CodeBuild.
+
+Release v1.10.22 (2017-08-09)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service documentation
+ * Documentation updates for RDS.
+
+Release v1.10.21 (2017-08-09)
+===
+
+### Service Client Updates
+* `service/elasticbeanstalk`: Updates service API and documentation
+ * Add support for paginating the result of DescribeEnvironments Include the ARN of described environments in DescribeEnvironments output
+
+### SDK Enhancements
+* `aws`: Add pointer conversion utilities to transform int64 to time.Time [#1433](https://github.com/aws/aws-sdk-go/pull/1433)
+ * Adds `SecondsTimeValue` and `MillisecondsTimeValue` utilities.
+
+Release v1.10.20 (2017-08-01)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * AWS CodeDeploy now supports the use of multiple tag groups in a single deployment group (an intersection of tags) to identify the instances for a deployment. When you create or update a deployment group, use the new ec2TagSet and onPremisesTagSet structures to specify up to three groups of tags. Only instances that are identified by at least one tag in each of the tag groups are included in the deployment group.
+* `service/config`: Updates service API and documentation
+* `service/ec2`: Updates service waiters
+ * Ec2 SpotInstanceRequestFulfilled waiter update
+* `service/elasticloadbalancingv2`: Updates service waiters
+* `service/email`: Updates service API, documentation, paginators, and examples
+ * This update adds information about publishing email open and click events. This update also adds information about publishing email events to Amazon Simple Notification Service (Amazon SNS).
+* `service/pinpoint`: Updates service API and documentation
+ * This release of the Pinpoint SDK enables App management - create, delete, update operations, Raw Content delivery for APNs and GCM campaign messages and From Address override.
+
+Release v1.10.19 (2017-08-01)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/inspector`: Updates service API, documentation, and paginators
+ * Inspector's StopAssessmentRun API has been updated with a new input option - stopAction. This request parameter can be set to either START_EVALUATION or SKIP_EVALUATION. START_EVALUATION (the default value, and the previous behavior) stops the AWS agent data collection and begins the results evaluation for findings generation based on the data collected so far. SKIP_EVALUATION cancels the assessment run immediately, after which no findings are generated.
+* `service/ssm`: Updates service API and documentation
+ * Adds a SendAutomationSignal API to SSM Service. This API is used to send a signal to an automation execution to change the current behavior or status of the execution.
+
+Release v1.10.18 (2017-07-27)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * The CreateDefaultVPC API enables you to create a new default VPC . You no longer need to contact AWS support, if your default VPC has been deleted.
+* `service/kinesisanalytics`: Updates service API and documentation
+ * Added additional exception types and clarified documentation.
+
+Release v1.10.17 (2017-07-27)
+===
+
+### Service Client Updates
+* `service/dynamodb`: Updates service documentation and examples
+ * Corrected a typo.
+* `service/ec2`: Updates service API and documentation
+ * Amazon EC2 Elastic GPUs allow you to easily attach low-cost graphics acceleration to current generation EC2 instances. With Amazon EC2 Elastic GPUs, you can configure the right amount of graphics acceleration to your particular workload without being constrained by fixed hardware configurations and limited GPU selection.
+* `service/monitoring`: Updates service documentation
+ * This release adds high resolution features to CloudWatch, with support for Custom Metrics down to 1 second and Alarms down to 10 seconds.
+
+Release v1.10.16 (2017-07-26)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API and documentation
+ * Cloud Directory adds support for additional batch operations.
+* `service/cloudformation`: Updates service API and documentation
+ * AWS CloudFormation StackSets enables you to manage stacks across multiple accounts and regions.
+
+### SDK Enhancements
+* `aws/signer/v4`: Optimize V4 signer's header duplicate space stripping. [#1417](https://github.com/aws/aws-sdk-go/pull/1417)
+
+Release v1.10.15 (2017-07-24)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API, documentation, and waiters
+ * Amazon AppStream 2.0 image builders and fleets can now access applications and network resources that rely on Microsoft Active Directory (AD) for authentication and permissions. This new feature allows you to join your streaming instances to your AD, so you can use your existing AD user management tools.
+* `service/ec2`: Updates service API and documentation
+ * Spot Fleet tagging capability allows customers to automatically tag instances launched by Spot Fleet. You can use this feature to label or distinguish instances created by distinct Spot Fleets. Tagging your EC2 instances also enables you to see instance cost allocation by tag in your AWS bill.
+
+### SDK Bugs
+* `aws/signer/v4`: Fix out of bounds panic in stripExcessSpaces [#1412](https://github.com/aws/aws-sdk-go/pull/1412)
+ * Fixes the out of bands panic in stripExcessSpaces caused by an incorrect calculation of the stripToIdx value. Simplified to code also.
+ * Fixes [#1411](https://github.com/aws/aws-sdk-go/issues/1411)
+Release v1.10.14 (2017-07-20)
+===
+
+### Service Client Updates
+* `service/elasticmapreduce`: Updates service API and documentation
+ * Amazon EMR now includes the ability to use a custom Amazon Linux AMI and adjustable root volume size when launching a cluster.
+
+Release v1.10.13 (2017-07-19)
+===
+
+### Service Client Updates
+* `service/budgets`: Updates service API and documentation
+ * Update budget Management API's to list/create/update RI_UTILIZATION type budget. Update budget Management API's to support DAILY timeUnit for RI_UTILIZATION type budget.
+
+### SDK Enhancements
+* `service/s3`: Use interfaces assertions instead of ValuesAtPath for S3 field lookups. [#1401](https://github.com/aws/aws-sdk-go/pull/1401)
+ * Improves the performance across the board for all S3 API calls by removing the usage of `ValuesAtPath` being used for every S3 API call.
+
+### SDK Bugs
+* `aws/request`: waiter test bug
+ * waiters_test.go file would sometimes fail due to travis hiccups. This occurs because a test would sometimes fail the cancel check and succeed the timeout. However, the timeout check should never occur in that test. This fix introduces a new field that dictates how waiters will sleep.
+Release v1.10.12 (2017-07-17)
+===
+
+### Service Client Updates
+* `service/cognito-idp`: Updates service API and documentation
+* `service/lambda`: Updates service API and documentation
+ * Lambda@Edge lets you run code closer to your end users without provisioning or managing servers. With Lambda@Edge, your code runs in AWS edge locations, allowing you to respond to your end users at the lowest latency. Your code is triggered by Amazon CloudFront events, such as requests to and from origin servers and viewers, and it is ready to execute at every AWS edge location whenever a request for content is received. You just upload your Node.js code to AWS Lambda and Lambda takes care of everything required to run and scale your code with high availability. You only pay for the compute time you consume - there is no charge when your code is not running.
+
+Release v1.10.11 (2017-07-14)
+===
+
+### Service Client Updates
+* `service/discovery`: Updates service API and documentation
+ * Adding feature to the Export API for Discovery Service to allow filters for the export task to allow export based on per agent id.
+* `service/ec2`: Updates service API
+ * New EC2 GPU Graphics instance
+* `service/marketplacecommerceanalytics`: Updates service documentation
+ * Update to Documentation Model For New Report Cadence / Reformat of Docs
+
+Release v1.10.10 (2017-07-13)
+===
+
+### Service Client Updates
+* `service/apigateway`: Updates service API and documentation
+ * Adds support for management of gateway responses.
+* `service/ec2`: Updates service API and documentation
+ * X-ENI (or Cross-Account ENI) is a new feature that allows the attachment or association of Elastic Network Interfaces (ENI) between VPCs in different AWS accounts located in the same availability zone. With this new capability, service providers and partners can deliver managed solutions in a variety of new architectural patterns where the provider and consumer of the service are in different AWS accounts.
+* `service/lex-models`: Updates service documentation
+
+Release v1.10.9 (2017-07-12)
+===
+
+### Service Client Updates
+* `service/autoscaling`: Updates service API and documentation
+ * Auto Scaling now supports a new type of scaling policy called target tracking scaling policies that you can use to set up dynamic scaling for your application.
+* `service/swf`: Updates service API, documentation, paginators, and examples
+ * Added support for attaching control data to Lambda tasks. Control data lets you attach arbitrary strings to your decisions and history events.
+
+Release v1.10.8 (2017-07-06)
+===
+
+### Service Client Updates
+* `service/ds`: Updates service API, documentation, and paginators
+ * You can now improve the resilience and performance of your Microsoft AD directory by deploying additional domain controllers. Added UpdateNumberofDomainControllers API that allows you to update the number of domain controllers you want for your directory, and DescribeDomainControllers API that allows you to describe the detailed information of each domain controller of your directory. Also added the 'DesiredNumberOfDomainControllers' field to the DescribeDirectories API output for Microsoft AD.
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/kinesis`: Updates service API and documentation
+ * You can now encrypt your data at rest within an Amazon Kinesis Stream using server-side encryption. Server-side encryption via AWS KMS makes it easy for customers to meet strict data management requirements by encrypting their data at rest within the Amazon Kinesis Streams, a fully managed real-time data processing service.
+* `service/kms`: Updates service API and documentation
+ * This release of AWS Key Management Service introduces the ability to determine whether a key is AWS managed or customer managed.
+* `service/ssm`: Updates service API and documentation
+ * Amazon EC2 Systems Manager now expands Patching support to Amazon Linux, Red Hat and Ubuntu in addition to the already supported Windows Server.
+
+Release v1.10.7 (2017-07-05)
+===
+
+### Service Client Updates
+* `service/monitoring`: Updates service API and documentation
+ * We are excited to announce the availability of APIs and CloudFormation support for CloudWatch Dashboards. You can use the new dashboard APIs or CloudFormation templates to dynamically build and maintain dashboards to monitor your infrastructure and applications. There are four new dashboard APIs - PutDashboard, GetDashboard, DeleteDashboards, and ListDashboards APIs. PutDashboard is used to create a new dashboard or modify an existing one whereas GetDashboard is the API to get the details of a specific dashboard. ListDashboards and DeleteDashboards are used to get the names or delete multiple dashboards respectively. Getting started with dashboard APIs is similar to any other AWS APIs. The APIs can be accessed through AWS SDK or through CLI tools.
+* `service/route53`: Updates service API and documentation
+ * Bug fix for InvalidChangeBatch exception.
+
+### SDK Enhancements
+* `service/s3/s3manager`: adding cleanup function to batch objects [#1375](https://github.com/aws/aws-sdk-go/issues/1375)
+ * This enhancement will add an After field that will be called after each iteration of the batch operation.
+
+Release v1.10.6 (2017-06-30)
+===
+
+### Service Client Updates
+* `service/marketplacecommerceanalytics`: Updates service documentation
+ * Documentation updates for AWS Marketplace Commerce Analytics.
+* `service/s3`: Updates service API and documentation
+ * API Update for S3: Adding Object Tagging Header to MultipartUpload Initialization
+
+Release v1.10.5 (2017-06-29)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/events`: Updates service API and documentation
+ * CloudWatch Events now allows different AWS accounts to share events with each other through a new resource called event bus. Event buses accept events from AWS services, other AWS accounts and PutEvents API calls. Currently all AWS accounts have one default event bus. To send events to another account, customers simply write rules to match the events of interest and attach an event bus in the receiving account as the target to the rule. The PutTargets API has been updated to allow adding cross account event buses as targets. In addition, we have released two new APIs - PutPermission and RemovePermission - that enables customers to add/remove permissions to their default event bus.
+* `service/gamelift`: Updates service API and documentation
+ * Allow developers to download GameLift fleet creation logs to assist with debugging.
+* `service/ssm`: Updates service API and documentation
+ * Adding Resource Data Sync support to SSM Inventory. New APIs: * CreateResourceDataSync - creates a new resource data sync configuration, * ListResourceDataSync - lists existing resource data sync configurations, * DeleteResourceDataSync - deletes an existing resource data sync configuration.
+
+Release v1.10.4 (2017-06-27)
+===
+
+### Service Client Updates
+* `service/servicecatalog`: Updates service API, documentation, and paginators
+ * Proper tagging of resources is critical to post-launch operations such as billing, cost allocation, and resource management. By using Service Catalog's TagOption Library, administrators can define a library of re-usable TagOptions that conform to company standards, and associate these with Service Catalog portfolios and products. Learn how to move your current tags to the new library, create new TagOptions, and view and associate your library items with portfolios and products. Understand how to ensure that the right tags are created on products launched through Service Catalog and how to provide users with defined selectable tags.
+
+### SDK Bugs
+* `aws/signer/v4`: checking length on `stripExcessSpaces` [#1372](https://github.com/aws/aws-sdk-go/issues/1372)
+ * Fixes a bug where `stripExcessSpaces` did not check length against the slice.
+ * Fixes: [#1371](https://github.com/aws/aws-sdk-go/issues/1371)
+Release v1.10.3 (2017-06-23)
+===
+
+### Service Client Updates
+* `service/lambda`: Updates service API and documentation
+ * The Lambda Invoke API will now throw new exception InvalidRuntimeException (status code 502) for invokes with deprecated runtimes.
+
+Release v1.10.2 (2017-06-22)
+===
+
+### Service Client Updates
+* `service/codepipeline`: Updates service API, documentation, and paginators
+ * A new API, ListPipelineExecutions, enables you to retrieve summary information about the most recent executions in a pipeline, including pipeline execution ID, status, start time, and last updated time. You can request information for a maximum of 100 executions. Pipeline execution data is available for the most recent 12 months of activity.
+* `service/dms`: Updates service API and documentation
+ * Added tagging for DMS certificates.
+* `service/elasticloadbalancing`: Updates service waiters
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lightsail`: Updates service API and documentation
+ * This release adds a new nextPageToken property to the result of the GetOperationsForResource API. Developers can now get the next set of items in a list by making subsequent calls to GetOperationsForResource API with the token from the previous call. This release also deprecates the nextPageCount property, which previously returned null (use the nextPageToken property instead). This release also deprecates the customImageName property on the CreateInstancesRequest class, which was previously ignored by the API.
+* `service/route53`: Updates service API and documentation
+ * This release reintroduces the HealthCheckInUse exception.
+
+Release v1.10.1 (2017-06-21)
+===
+
+### Service Client Updates
+* `service/dax`: Adds new service
+ * Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to a 10x performance improvement - from milliseconds to microseconds - even at millions of requests per second. DAX does all the heavy lifting required to add in-memory acceleration to your DynamoDB tables, without requiring developers to manage cache invalidation, data population, or cluster management.
+* `service/route53`: Updates service API and documentation
+ * Amazon Route 53 now supports multivalue answers in response to DNS queries, which lets you route traffic approximately randomly to multiple resources, such as web servers. Create one multivalue answer record for each resource and, optionally, associate an Amazon Route 53 health check with each record, and Amazon Route 53 responds to DNS queries with up to eight healthy records.
+* `service/ssm`: Updates service API, documentation, and paginators
+ * Adding hierarchy support to the SSM Parameter Store API. Added support tor tagging. New APIs: GetParameter - retrieves one parameter, DeleteParameters - deletes multiple parameters (max number 10), GetParametersByPath - retrieves parameters located in the hierarchy. Updated APIs: PutParameter - added ability to enforce parameter value by applying regex (AllowedPattern), DescribeParameters - modified to support Tag filtering.
+* `service/waf`: Updates service API and documentation
+ * You can now create, edit, update, and delete a new type of WAF rule with a rate tracking component.
+* `service/waf-regional`: Updates service API and documentation
+
+Release v1.10.0 (2017-06-20)
+===
+
+### Service Client Updates
+* `service/workdocs`: Updates service API and documentation
+ * This release provides a new API to retrieve the activities performed by WorkDocs users.
+
+### SDK Features
+* `aws/credentials/plugincreds`: Add support for Go plugin for credentials [#1320](https://github.com/aws/aws-sdk-go/pull/1320)
+ * Adds support for using plugins to retrieve credentials for API requests. This change adds a new package plugincreds under aws/credentials. See the `example/aws/credentials/plugincreds` folder in the SDK for example usage.
+
+Release v1.9.00 (2017-06-19)
+===
+
+### Service Client Updates
+* `service/organizations`: Updates service API and documentation
+ * Improvements to Exception Modeling
+
+### SDK Features
+* `service/s3/s3manager`: Adds batch operations to s3manager [#1333](https://github.com/aws/aws-sdk-go/pull/1333)
+ * Allows for batch upload, download, and delete of objects. Also adds the interface pattern to allow for easy traversal of objects. E.G `DownloadWithIterator`, `UploadWithIterator`, and `BatchDelete`. `BatchDelete` also contains a utility iterator using the `ListObjects` API to easily delete a list of objects.
+
+Release v1.8.44 (2017-06-16)
+===
+
+### Service Client Updates
+* `service/xray`: Updates service API, documentation, and paginators
+ * Add a response time histogram to the services in response of GetServiceGraph API.
+
+Release v1.8.43 (2017-06-15)
+===
+
+### Service Client Updates
+* `service/ec2`: Updates service API and documentation
+ * Adds API to describe Amazon FPGA Images (AFIs) available to customers, which includes public AFIs, private AFIs that you own, and AFIs owned by other AWS accounts for which you have load permissions.
+* `service/ecs`: Updates service API and documentation
+ * Added support for cpu, memory, and memory reservation container overrides on the RunTask and StartTask APIs.
+* `service/iot`: Updates service API and documentation
+ * Revert the last release: remove CertificatePem from DescribeCertificate API.
+* `service/servicecatalog`: Updates service API, documentation, and paginators
+ * Added ProvisioningArtifactSummaries to DescribeProductAsAdmin's output to show the provisioning artifacts belong to the product. Allow filtering by SourceProductId in SearchProductsAsAdmin for AWS Marketplace products. Added a verbose option to DescribeProvisioningArtifact to display the CloudFormation template used to create the provisioning artifact.Added DescribeProvisionedProduct API. Changed the type of ProvisionedProduct's Status to be distinct from Record's Status. New ProvisionedProduct's Status are AVAILABLE, UNDER_CHANGE, TAINTED, ERROR. Changed Record's Status set of values to CREATED, IN_PROGRESS, IN_PROGRESS_IN_ERROR, SUCCEEDED, FAILED.
+
+### SDK Bugs
+* `private/model/api`: Fix RESTXML support for XML Namespace [#1343](https://github.com/aws/aws-sdk-go/pull/1343)
+ * Fixes a bug with the SDK's generation of services using the REST XML protocol not annotating shape references with the XML Namespace attribute.
+ * Fixes [#1334](https://github.com/aws/aws-sdk-go/pull/1334)
+Release v1.8.42 (2017-06-14)
+===
+
+### Service Client Updates
+* `service/applicationautoscaling`: Updates service API and documentation
+* `service/clouddirectory`: Updates service documentation
+ * Documentation update for Cloud Directory
+
+Release v1.8.41 (2017-06-13)
+===
+
+### Service Client Updates
+* `service/configservice`: Updates service API
+
+Release v1.8.40 (2017-06-13)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service API and documentation
+ * API Update for RDS: this update enables copy-on-write, a new Aurora MySQL Compatible Edition feature that allows users to restore their database, and support copy of TDE enabled snapshot cross region.
+
+### SDK Bugs
+* `aws/request`: Fix NewErrParamMinLen to use correct ParamMinLenErrCode [#1336](https://github.com/aws/aws-sdk-go/issues/1336)
+ * Fixes the `NewErrParamMinLen` function returning the wrong error code. `ParamMinLenErrCode` should be returned not `ParamMinValueErrCode`.
+ * Fixes [#1335](https://github.com/aws/aws-sdk-go/issues/1335)
+Release v1.8.39 (2017-06-09)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/opsworks`: Updates service API and documentation
+ * Tagging Support for AWS OpsWorks Stacks
+
+Release v1.8.38 (2017-06-08)
+===
+
+### Service Client Updates
+* `service/iot`: Updates service API and documentation
+ * In addition to using certificate ID, AWS IoT customers can now obtain the description of a certificate with the certificate PEM.
+* `service/pinpoint`: Updates service API and documentation
+ * Starting today Amazon Pinpoint adds SMS Text and Email Messaging support in addition to Mobile Push Notifications, providing developers, product managers and marketers with multi-channel messaging capabilities to drive user engagement in their applications. Pinpoint also enables backend services and applications to message users directly and provides advanced user and app analytics to understand user behavior and messaging performance.
+* `service/rekognition`: Updates service API and documentation
+ * API Update for AmazonRekognition: Adding RecognizeCelebrities API
+
+Release v1.8.37 (2017-06-07)
+===
+
+### Service Client Updates
+* `service/codebuild`: Updates service API and documentation
+ * Add support to APIs for privileged containers. This change would allow performing privileged operations like starting the Docker daemon inside builds possible in custom docker images.
+* `service/greengrass`: Adds new service
+ * AWS Greengrass is software that lets you run local compute, messaging, and device state synchronization for connected devices in a secure way. With AWS Greengrass, connected devices can run AWS Lambda functions, keep device data in sync, and communicate with other devices securely even when not connected to the Internet. Using AWS Lambda, Greengrass ensures your IoT devices can respond quickly to local events, operate with intermittent connections, and minimize the cost of transmitting IoT data to the cloud.
+
+Release v1.8.36 (2017-06-06)
+===
+
+### Service Client Updates
+* `service/acm`: Updates service documentation
+ * Documentation update for AWS Certificate Manager.
+* `service/cloudfront`: Updates service documentation
+ * Doc update to fix incorrect prefix in S3OriginConfig
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/iot`: Updates service API
+ * Update client side validation for SalesForce action.
+
+Release v1.8.35 (2017-06-05)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * AppStream 2.0 Custom Security Groups allows you to easily control what network resources your streaming instances and images have access to. You can assign up to 5 security groups per Fleet to control the inbound and outbound network access to your streaming instances to specific IP ranges, network protocols, or ports.
+* `service/iot`: Updates service API, documentation, paginators, and examples
+ * Added Salesforce action to IoT Rules Engine.
+
+Release v1.8.34 (2017-06-02)
+===
+
+### Service Client Updates
+* `service/kinesisanalytics`: Updates service API, documentation, and paginators
+ * Kinesis Analytics publishes error messages CloudWatch logs in case of application misconfigurations
+* `service/workdocs`: Updates service API and documentation
+ * This release includes new APIs to manage tags and custom metadata on resources and also new APIs to add and retrieve comments at the document level.
+
+Release v1.8.33 (2017-06-01)
+===
+
+### Service Client Updates
+* `service/codedeploy`: Updates service API and documentation
+ * AWS CodeDeploy has improved how it manages connections to GitHub accounts and repositories. You can now create and store up to 25 connections to GitHub accounts in order to associate AWS CodeDeploy applications with GitHub repositories. Each connection can support multiple repositories. You can create connections to up to 25 different GitHub accounts, or create more than one connection to a single account. The ListGitHubAccountTokenNames command has been introduced to retrieve the names of stored connections to GitHub accounts that you have created. The name of the connection to GitHub used for an AWS CodeDeploy application is also included in the ApplicationInfo structure. Two new fields, lastAttemptedDeployment and lastSuccessfulDeployment, have been added to DeploymentGroupInfo to improve the handling of deployment group information in the AWS CodeDeploy console. Information about these latest deployments can also be retrieved using the GetDeploymentGroup and BatchGetDeployment group requests. Also includes a region update (us-gov-west-1).
+* `service/cognitoidentityprovider`: Updates service API, documentation, and paginators
+* `service/elbv2`: Updates service API and documentation
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/lexmodelbuildingservice`: Updates service documentation and examples
+
+### SDK Enhancements
+* `aws/defaults`: Exports shared credentials and config default filenames used by the SDK. [#1308](https://github.com/aws/aws-sdk-go/pull/1308)
+ * Adds SharedCredentialsFilename and SharedConfigFilename functions to defaults package.
+
+### SDK Bugs
+* `aws/credentials`: Fixes shared credential provider's default filename on Windows. [#1308](https://github.com/aws/aws-sdk-go/pull/1308)
+ * The shared credentials provider would attempt to use the wrong filename on Windows if the `HOME` environment variable was defined.
+* `service/s3/s3manager`: service/s3/s3manager: Fix Downloader ignoring Range get parameter [#1311](https://github.com/aws/aws-sdk-go/pull/1311)
+ * Fixes the S3 Download Manager ignoring the GetObjectInput's Range parameter. If this parameter is provided it will force the downloader to fallback to a single GetObject request disabling concurrency and automatic part size gets.
+ * Fixes [#1296](https://github.com/aws/aws-sdk-go/issues/1296)
+Release v1.8.32 (2017-05-31)
+===
+
+### Service Client Updates
+* `service/rds`: Updates service API and documentation
+ * Amazon RDS customers can now easily and quickly stop and start their DB instances.
+
+Release v1.8.31 (2017-05-30)
+===
+
+### Service Client Updates
+* `service/clouddirectory`: Updates service API, documentation, and paginators
+ * Cloud Directory has launched support for Typed Links, enabling customers to create object-to-object relationships that are not hierarchical in nature. Typed Links enable customers to quickly query for data along these relationships. Customers can also enforce referential integrity using Typed Links, ensuring data in use is not inadvertently deleted.
+* `service/s3`: Updates service paginators and examples
+ * New example snippets for Amazon S3.
+
+Release v1.8.30 (2017-05-25)
+===
+
+### Service Client Updates
+* `service/appstream`: Updates service API and documentation
+ * Support added for persistent user storage, backed by S3.
+* `service/rekognition`: Updates service API and documentation
+ * Updated the CompareFaces API response to include orientation information, unmatched faces, landmarks, pose, and quality of the compared faces.
+
+Release v1.8.29 (2017-05-24)
+===
+
+### Service Client Updates
+* `service/iam`: Updates service API
+ * The unique ID and access key lengths were extended from 32 to 128
+* `service/storagegateway`: Updates service API and documentation
+ * Two Storage Gateway data types, Tape and TapeArchive, each have a new response element, TapeUsedInBytes. This element helps you manage your virtual tapes. By using TapeUsedInBytes, you can see the amount of data written to each virtual tape.
+* `service/sts`: Updates service API, documentation, and paginators
+ * The unique ID and access key lengths were extended from 32 to 128.
+
+Release v1.8.28 (2017-05-23)
+===
+
+### Service Client Updates
+* `service/databasemigrationservice`: Updates service API, documentation, paginators, and examples
+ * This release adds support for using Amazon S3 and Amazon DynamoDB as targets for database migration, and using MongoDB as a source for database migration. For more information, see the AWS Database Migration Service documentation.
+
+Release v1.8.27 (2017-05-22)
+===
+
+### Service Client Updates
+* `aws/endpoints`: Updated Regions and Endpoints metadata.
+* `service/resourcegroupstaggingapi`: Updates service API, documentation, and paginators
+ * You can now specify the number of resources returned per page in GetResources operation, as an optional parameter, to easily manage the list of resources returned by your queries.
+
+### SDK Bugs
+* `aws/request`: Add support for PUT temporary redirects (307) [#1283](https://github.com/aws/aws-sdk-go/issues/1283)
+ * Adds support for Go 1.8's GetBody function allowing the SDK's http request using PUT and POST methods to be redirected with temporary redirects with 307 status code.
+ * Fixes: [#1267](https://github.com/aws/aws-sdk-go/issues/1267)
+* `aws/request`: Add handling for retrying temporary errors during unmarshal [#1289](https://github.com/aws/aws-sdk-go/issues/1289)
+ * Adds support for retrying temporary errors that occur during unmarshaling of a request's response body.
+ * Fixes: [#1275](https://github.com/aws/aws-sdk-go/issues/1275)
+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)
===
diff --git a/vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md b/vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..3b64466
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/CODE_OF_CONDUCT.md
@@ -0,0 +1,4 @@
+## Code of Conduct
+This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
+For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
+opensource-codeofconduct@amazon.com with any additional questions or comments.
diff --git a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
index 7c0186f..9f4a0c1 100644
--- a/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
+++ b/vendor/github.com/aws/aws-sdk-go/CONTRIBUTING.md
@@ -67,7 +67,7 @@ Please be aware of the following notes prior to opening a pull request:
5. The JSON files under the SDK's `models` folder are sourced from outside the SDK.
Such as `models/apis/ec2/2016-11-15/api.json`. We will not accept pull requests
directly on these models. If you discover an issue with the models please
- create a Github [issue](issues) describing the issue.
+ create a [GitHub issue][issues] describing the issue.
### Testing
@@ -89,7 +89,7 @@ go test -tags codegen ./private/...
See the `Makefile` for additional testing tags that can be used in testing.
To test on multiple platform the SDK includes several DockerFiles under the
-`awstesting/sandbox` folder, and associated make recipes to to execute
+`awstesting/sandbox` folder, and associated make recipes to execute
unit testing within environments configured for specific Go versions.
```
diff --git a/vendor/github.com/aws/aws-sdk-go/Gopkg.lock b/vendor/github.com/aws/aws-sdk-go/Gopkg.lock
new file mode 100644
index 0000000..854c94f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/Gopkg.lock
@@ -0,0 +1,20 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+ name = "github.com/go-ini/ini"
+ packages = ["."]
+ revision = "300e940a926eb277d3901b20bdfcc54928ad3642"
+ version = "v1.25.4"
+
+[[projects]]
+ name = "github.com/jmespath/go-jmespath"
+ packages = ["."]
+ revision = "0b12d6b5"
+
+[solve-meta]
+ analyzer-name = "dep"
+ analyzer-version = 1
+ inputs-digest = "51a86a867df617990082dec6b868e4efe2fdb2ed0e02a3daa93cd30f962b5085"
+ solver-name = "gps-cdcl"
+ solver-version = 1
diff --git a/vendor/github.com/aws/aws-sdk-go/Gopkg.toml b/vendor/github.com/aws/aws-sdk-go/Gopkg.toml
new file mode 100644
index 0000000..664fc59
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/Gopkg.toml
@@ -0,0 +1,48 @@
+
+# Gopkg.toml example
+#
+# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
+# for detailed Gopkg.toml documentation.
+#
+# required = ["github.com/user/thing/cmd/thing"]
+# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
+#
+# [[constraint]]
+# name = "github.com/user/project"
+# version = "1.0.0"
+#
+# [[constraint]]
+# name = "github.com/user/project2"
+# branch = "dev"
+# source = "github.com/myfork/project2"
+#
+# [[override]]
+# name = "github.com/x/y"
+# version = "2.4.0"
+
+ignored = [
+ # Testing/Example/Codegen dependencies
+ "github.com/stretchr/testify",
+ "github.com/stretchr/testify/assert",
+ "github.com/stretchr/testify/require",
+ "github.com/go-sql-driver/mysql",
+ "github.com/gucumber/gucumber",
+ "github.com/pkg/errors",
+ "golang.org/x/net",
+ "golang.org/x/net/html",
+ "golang.org/x/net/http2",
+ "golang.org/x/text",
+ "golang.org/x/text/html",
+ "golang.org/x/tools",
+ "golang.org/x/tools/go/loader",
+]
+
+
+[[constraint]]
+ name = "github.com/go-ini/ini"
+ version = "1.25.4"
+
+[[constraint]]
+ name = "github.com/jmespath/go-jmespath"
+ revision = "0b12d6b5"
+ #version = "0.2.2"
diff --git a/vendor/github.com/aws/aws-sdk-go/Makefile b/vendor/github.com/aws/aws-sdk-go/Makefile
index b1611d2..bab31d2 100644
--- a/vendor/github.com/aws/aws-sdk-go/Makefile
+++ b/vendor/github.com/aws/aws-sdk-go/Makefile
@@ -5,13 +5,15 @@ 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'
-UNIT_TEST_TAGS="example codegen"
+LINTIGNOREPKGCOMMENT='service/[^/]+/doc_custom.go:.+package comment should be of the form'
+UNIT_TEST_TAGS="example codegen awsinclude"
SDK_WITH_VENDOR_PKGS=$(shell go list -tags ${UNIT_TEST_TAGS} ./... | grep -v "/vendor/src")
SDK_ONLY_PKGS=$(shell go list ./... | grep -v "/vendor/")
SDK_UNIT_TEST_ONLY_PKGS=$(shell go list -tags ${UNIT_TEST_TAGS} ./... | grep -v "/vendor/")
SDK_GO_1_4=$(shell go version | grep "go1.4")
SDK_GO_1_5=$(shell go version | grep "go1.5")
+SDK_GO_1_6=$(shell go version | grep "go1.6")
SDK_GO_VERSION=$(shell go version | awk '''{print $$3}''' | tr -d '''\n''')
all: get-deps generate unit
@@ -59,6 +61,18 @@ unit-with-race-cover: get-deps-tests build verify
@echo "go test SDK and vendor packages"
@go test -tags ${UNIT_TEST_TAGS} -race -cpu=1,2,4 $(SDK_UNIT_TEST_ONLY_PKGS)
+ci-test: ci-test-generate unit-with-race-cover ci-test-generate-validate
+
+ci-test-generate: get-deps
+ @echo "CI test generated code"
+ @if [ \( -z "${SDK_GO_1_6}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then make generate; else echo "skipping generate"; fi
+
+ci-test-generate-validate:
+ @echo "CI test validate no generated code changes"
+ @gitstatus=`if [ \( -z "${SDK_GO_1_6}" \) -a \( -z "${SDK_GO_1_5}" \) ]; then git status --porcelain; else echo "skipping validation"; fi`; \
+ echo "$$gitstatus"; \
+ if [ "$$gitstatus" != "" ] && [ "$$gitstatus" != "skipping validation" ]; then git diff; exit 1; fi
+
integration: get-deps-tests integ-custom smoke-tests performance
integ-custom:
@@ -73,7 +87,7 @@ smoke-tests: get-deps-tests
performance: get-deps-tests
AWS_TESTING_LOG_RESULTS=${log-detailed} AWS_TESTING_REGION=$(region) AWS_TESTING_DB_TABLE=$(table) gucumber -go-tags "integration" ./awstesting/performance
-sandbox-tests: sandbox-test-go15 sandbox-test-go15-novendorexp sandbox-test-go16 sandbox-test-go17 sandbox-test-go18 sandbox-test-gotip
+sandbox-tests: sandbox-test-go15 sandbox-test-go15-novendorexp sandbox-test-go16 sandbox-test-go17 sandbox-test-go18 sandbox-test-go19 sandbox-test-gotip
sandbox-build-go15:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.5 -t "aws-sdk-go-1.5" .
@@ -110,6 +124,13 @@ sandbox-go18: sandbox-build-go18
sandbox-test-go18: sandbox-build-go18
docker run -t aws-sdk-go-1.8
+sandbox-build-go19:
+ docker build -f ./awstesting/sandbox/Dockerfile.test.go1.8 -t "aws-sdk-go-1.9" .
+sandbox-go19: sandbox-build-go19
+ docker run -i -t aws-sdk-go-1.9 bash
+sandbox-test-go19: sandbox-build-go19
+ docker run -t aws-sdk-go-1.9
+
sandbox-build-gotip:
@echo "Run make update-aws-golang-tip, if this test fails because missing aws-golang:tip container"
docker build -f ./awstesting/sandbox/Dockerfile.test.gotip -t "aws-sdk-go-tip" .
@@ -126,7 +147,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 +173,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 4f2925d..3200765 100644
--- a/vendor/github.com/aws/aws-sdk-go/README.md
+++ b/vendor/github.com/aws/aws-sdk-go/README.md
@@ -1,9 +1,13 @@
-# AWS SDK for Go [![API Reference](https://img.shields.io/badge/api-reference-blue.svg)](https://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](https://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.
Checkout our [release notes](https://github.com/aws/aws-sdk-go/releases) for information about the latest bug fixes, updates, and features added to the SDK.
+We [announced](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-2-0-developer-preview/) the Developer Preview for the [v2 AWS SDK for Go](https://github.com/aws/aws-sdk-go-v2). The v2 SDK is available at https://github.com/aws/aws-sdk-go-v2, and `go get github.com/aws/aws-sdk-go-v2` via `go get`. Check out the v2 SDK's [changes and updates](https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md), and let us know what you think. We want your feedback.
+
## Installing
If you are using Go 1.5 with the `GO15VENDOREXPERIMENT=1` vendoring flag, or 1.6 and higher you can use the following command to retrieve the SDK. The SDK's non-testing dependencies will be included and are vendored in the `vendor` folder.
@@ -26,10 +30,11 @@ 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).
-* If you think you may of found a bug, please open an [issue](https://github.com/aws/aws-sdk-go/issues/new).
+* If you think you may have found a bug, please open an [issue](https://github.com/aws/aws-sdk-go/issues/new).
## Opening Issues
@@ -47,113 +52,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})
```
-[default]
-aws_access_key_id = AKID1234567890
-aws_secret_access_key = MY-SECRET-KEY
+
+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,
+ }))
```
-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).
+[credentials_pkg]: https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials
+
+### Configuring AWS Region
-Alternatively, you can set the following environment variables:
+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),
+ }))
+```
+
+See the [endpoints][endpoints_pkg] package for the AWS Regions and Endpoints metadata.
+
+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.Int64Value(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 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](https://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/awsutil/copy_test.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go
index 0e75c5e..007b37b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy_test.go
@@ -5,11 +5,11 @@ import (
"fmt"
"io"
"io/ioutil"
+ "reflect"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/stretchr/testify/assert"
)
func ExampleCopy() {
@@ -81,12 +81,24 @@ func TestCopy1(t *testing.T) {
awsutil.Copy(&f2, f1)
// Values are equal
- assert.Equal(t, f2.A, f1.A)
- assert.Equal(t, f2.B, f1.B)
- assert.Equal(t, f2.C, f1.C)
- assert.Equal(t, f2.D, f1.D)
- assert.Equal(t, f2.E.B, f1.E.B)
- assert.Equal(t, f2.E.D, f1.E.D)
+ if v1, v2 := f2.A, f1.A; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := f2.B, f1.B; !reflect.DeepEqual(v1, v2) {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := f2.C, f1.C; !reflect.DeepEqual(v1, v2) {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := f2.D, f1.D; !v1.Equal(*v2) {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := f2.E.B, f1.E.B; !reflect.DeepEqual(v1, v2) {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := f2.E.D, f1.E.D; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
// But pointers are not!
str3 := "nothello"
@@ -99,14 +111,30 @@ func TestCopy1(t *testing.T) {
*f2.E.B = int3
f2.E.c = 5
f2.E.D = 5
- assert.NotEqual(t, f2.A, f1.A)
- assert.NotEqual(t, f2.B, f1.B)
- assert.NotEqual(t, f2.C, f1.C)
- assert.NotEqual(t, f2.D, f1.D)
- assert.NotEqual(t, f2.E.a, f1.E.a)
- assert.NotEqual(t, f2.E.B, f1.E.B)
- assert.NotEqual(t, f2.E.c, f1.E.c)
- assert.NotEqual(t, f2.E.D, f1.E.D)
+ if v1, v2 := f2.A, f1.A; v1 == v2 {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
+ if v1, v2 := f2.B, f1.B; reflect.DeepEqual(v1, v2) {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
+ if v1, v2 := f2.C, f1.C; reflect.DeepEqual(v1, v2) {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
+ if v1, v2 := f2.D, f1.D; v1 == v2 {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
+ if v1, v2 := f2.E.a, f1.E.a; v1 == v2 {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
+ if v1, v2 := f2.E.B, f1.E.B; v1 == v2 {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
+ if v1, v2 := f2.E.c, f1.E.c; v1 == v2 {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
+ if v1, v2 := f2.E.D, f1.E.D; v1 == v2 {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
}
func TestCopyNestedWithUnexported(t *testing.T) {
@@ -125,10 +153,18 @@ func TestCopyNestedWithUnexported(t *testing.T) {
awsutil.Copy(&f2, f1)
// Values match
- assert.Equal(t, f2.A, f1.A)
- assert.NotEqual(t, f2.B, f1.B)
- assert.NotEqual(t, f2.B.a, f1.B.a)
- assert.Equal(t, f2.B.B, f2.B.B)
+ if v1, v2 := f2.A, f1.A; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := f2.B, f1.B; v1 == v2 {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
+ if v1, v2 := f2.B.a, f1.B.a; v1 == v2 {
+ t.Errorf("expected values to be not equivalent, but received %v", v1)
+ }
+ if v1, v2 := f2.B.B, f2.B.B; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
}
func TestCopyIgnoreNilMembers(t *testing.T) {
@@ -139,34 +175,56 @@ func TestCopyIgnoreNilMembers(t *testing.T) {
}
f := &Foo{}
- assert.Nil(t, f.A)
- assert.Nil(t, f.B)
- assert.Nil(t, f.C)
+ if v1 := f.A; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
+ if v1 := f.B; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
+ if v1 := f.C; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
var f2 Foo
awsutil.Copy(&f2, f)
- assert.Nil(t, f2.A)
- assert.Nil(t, f2.B)
- assert.Nil(t, f2.C)
+ if v1 := f2.A; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
+ if v1 := f2.B; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
+ if v1 := f2.C; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
fcopy := awsutil.CopyOf(f)
f3 := fcopy.(*Foo)
- assert.Nil(t, f3.A)
- assert.Nil(t, f3.B)
- assert.Nil(t, f3.C)
+ if v1 := f3.A; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
+ if v1 := f3.B; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
+ if v1 := f3.C; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
}
func TestCopyPrimitive(t *testing.T) {
str := "hello"
var s string
awsutil.Copy(&s, &str)
- assert.Equal(t, "hello", s)
+ if v1, v2 := "hello", s; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
}
func TestCopyNil(t *testing.T) {
var s string
awsutil.Copy(&s, nil)
- assert.Equal(t, "", s)
+ if v1, v2 := "", s; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
}
func TestCopyReader(t *testing.T) {
@@ -174,13 +232,21 @@ func TestCopyReader(t *testing.T) {
var r io.Reader
awsutil.Copy(&r, buf)
b, err := ioutil.ReadAll(r)
- assert.NoError(t, err)
- assert.Equal(t, []byte("hello world"), b)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
+ if v1, v2 := []byte("hello world"), b; !bytes.Equal(v1, v2) {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
// empty bytes because this is not a deep copy
b, err = ioutil.ReadAll(buf)
- assert.NoError(t, err)
- assert.Equal(t, []byte(""), b)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
+ if v1, v2 := []byte(""), b; !bytes.Equal(v1, v2) {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
}
func TestCopyDifferentStructs(t *testing.T) {
@@ -226,17 +292,39 @@ func TestCopyDifferentStructs(t *testing.T) {
awsutil.Copy(&f2, f1)
// Values are equal
- assert.Equal(t, f2.A, f1.A)
- assert.Equal(t, f2.B, f1.B)
- assert.Equal(t, f2.C, f1.C)
- assert.Equal(t, "unique", f1.SrcUnique)
- assert.Equal(t, 1, f1.SameNameDiffType)
- assert.Equal(t, 0, f2.DstUnique)
- assert.Equal(t, "", f2.SameNameDiffType)
- assert.Equal(t, int1, *f1.unexportedPtr)
- assert.Nil(t, f2.unexportedPtr)
- assert.Equal(t, int2, *f1.ExportedPtr)
- assert.Equal(t, int2, *f2.ExportedPtr)
+ if v1, v2 := f2.A, f1.A; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := f2.B, f1.B; !reflect.DeepEqual(v1, v2) {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := f2.C, f1.C; !reflect.DeepEqual(v1, v2) {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := "unique", f1.SrcUnique; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := 1, f1.SameNameDiffType; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := 0, f2.DstUnique; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := "", f2.SameNameDiffType; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := int1, *f1.unexportedPtr; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1 := f2.unexportedPtr; v1 != nil {
+ t.Errorf("expected nil, but received %v", v1)
+ }
+ if v1, v2 := int2, *f1.ExportedPtr; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
+ if v1, v2 := int2, *f2.ExportedPtr; v1 != v2 {
+ t.Errorf("expected values to be equivalent but received %v and %v", v1, v2)
+ }
}
func ExampleCopyOf() {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go
index 7a5db6e..18d3c5b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go
@@ -5,7 +5,6 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/stretchr/testify/assert"
)
func TestDeepEqual(t *testing.T) {
@@ -24,6 +23,8 @@ func TestDeepEqual(t *testing.T) {
}
for i, c := range cases {
- assert.Equal(t, c.equal, awsutil.DeepEqual(c.a, c.b), "%d, a:%v b:%v, %t", i, c.a, c.b, c.equal)
+ if awsutil.DeepEqual(c.a, c.b) != c.equal {
+ t.Errorf("%d, a:%v b:%v, %t", i, c.a, c.b, c.equal)
+ }
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go
index b222556..58a05d6 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value_test.go
@@ -1,10 +1,10 @@
package awsutil_test
import (
+ "strings"
"testing"
"github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/stretchr/testify/assert"
)
type Struct struct {
@@ -50,8 +50,12 @@ func TestValueAtPathSuccess(t *testing.T) {
}
for i, c := range testCases {
v, err := awsutil.ValuesAtPath(c.data, c.path)
- assert.NoError(t, err, "case %d, expected no error, %s", i, c.path)
- assert.Equal(t, c.expect, v, "case %d, %s", i, c.path)
+ if err != nil {
+ t.Errorf("case %v, expected no error, %v", i, c.path)
+ }
+ if e, a := c.expect, v; !awsutil.DeepEqual(e, a) {
+ t.Errorf("case %v, %v", i, c.path)
+ }
}
}
@@ -78,12 +82,18 @@ func TestValueAtPathFailure(t *testing.T) {
for i, c := range testCases {
v, err := awsutil.ValuesAtPath(c.data, c.path)
if c.errContains != "" {
- assert.Contains(t, err.Error(), c.errContains, "case %d, expected error, %s", i, c.path)
+ if !strings.Contains(err.Error(), c.errContains) {
+ t.Errorf("case %v, expected error, %v", i, c.path)
+ }
continue
} else {
- assert.NoError(t, err, "case %d, expected no error, %s", i, c.path)
+ if err != nil {
+ t.Errorf("case %v, expected no error, %v", i, c.path)
+ }
+ }
+ if e, a := c.expect, v; !awsutil.DeepEqual(e, a) {
+ t.Errorf("case %v, %v", i, c.path)
}
- assert.Equal(t, c.expect, v, "case %d, %s", i, c.path)
}
}
@@ -92,51 +102,81 @@ func TestSetValueAtPathSuccess(t *testing.T) {
awsutil.SetValueAtPath(&s, "C", "test1")
awsutil.SetValueAtPath(&s, "B.B.C", "test2")
awsutil.SetValueAtPath(&s, "B.D.C", "test3")
- assert.Equal(t, "test1", s.C)
- assert.Equal(t, "test2", s.B.B.C)
- assert.Equal(t, "test3", s.B.D.C)
+ if e, a := "test1", s.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
+ if e, a := "test2", s.B.B.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
+ if e, a := "test3", s.B.D.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
awsutil.SetValueAtPath(&s, "B.*.C", "test0")
- assert.Equal(t, "test0", s.B.B.C)
- assert.Equal(t, "test0", s.B.D.C)
+ if e, a := "test0", s.B.B.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
+ if e, a := "test0", s.B.D.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
var s2 Struct
awsutil.SetValueAtPath(&s2, "b.b.c", "test0")
- assert.Equal(t, "test0", s2.B.B.C)
+ if e, a := "test0", s2.B.B.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
awsutil.SetValueAtPath(&s2, "A", []Struct{{}})
- assert.Equal(t, []Struct{{}}, s2.A)
+ if e, a := []Struct{{}}, s2.A; !awsutil.DeepEqual(e, a) {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
str := "foo"
s3 := Struct{}
awsutil.SetValueAtPath(&s3, "b.b.c", str)
- assert.Equal(t, "foo", s3.B.B.C)
+ if e, a := "foo", s3.B.B.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
s3 = Struct{B: &Struct{B: &Struct{C: str}}}
awsutil.SetValueAtPath(&s3, "b.b.c", nil)
- assert.Equal(t, "", s3.B.B.C)
+ if e, a := "", s3.B.B.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
s3 = Struct{}
awsutil.SetValueAtPath(&s3, "b.b.c", nil)
- assert.Equal(t, "", s3.B.B.C)
+ if e, a := "", s3.B.B.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
s3 = Struct{}
awsutil.SetValueAtPath(&s3, "b.b.c", &str)
- assert.Equal(t, "foo", s3.B.B.C)
+ if e, a := "foo", s3.B.B.C; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
var s4 struct{ Name *string }
awsutil.SetValueAtPath(&s4, "Name", str)
- assert.Equal(t, str, *s4.Name)
+ if e, a := str, *s4.Name; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
s4 = struct{ Name *string }{}
awsutil.SetValueAtPath(&s4, "Name", nil)
- assert.Equal(t, (*string)(nil), s4.Name)
+ if e, a := (*string)(nil), s4.Name; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
s4 = struct{ Name *string }{Name: &str}
awsutil.SetValueAtPath(&s4, "Name", nil)
- assert.Equal(t, (*string)(nil), s4.Name)
+ if e, a := (*string)(nil), s4.Name; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
s4 = struct{ Name *string }{}
awsutil.SetValueAtPath(&s4, "Name", &str)
- assert.Equal(t, str, *s4.Name)
+ if e, a := str, *s4.Name; e != a {
+ t.Errorf("expected %v, but received %v", e, a)
+ }
}
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 48b0fbd..3271a18 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"
)
@@ -17,6 +15,12 @@ type Config struct {
Endpoint string
SigningRegion string
SigningName string
+
+ // States that the signing name did not come from a modeled source but
+ // was derived based on other data. Used by service client constructors
+ // to determine if the signin name can be overriden based on metadata the
+ // service has.
+ SigningNameDerived bool
}
// ConfigProvider provides a generic way for a service client to receive
@@ -90,60 +94,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/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
index 1313478..a397b0d 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
@@ -1,11 +1,11 @@
package client
import (
- "math/rand"
- "sync"
+ "strconv"
"time"
"github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/internal/sdkrand"
)
// DefaultRetryer implements basic retry logic using exponential backoff for
@@ -15,11 +15,11 @@ import (
// the MaxRetries method:
//
// type retryer struct {
-// service.DefaultRetryer
+// client.DefaultRetryer
// }
//
// // This implementation always has 100 max retries
-// func (d retryer) MaxRetries() uint { return 100 }
+// func (d retryer) MaxRetries() int { return 100 }
type DefaultRetryer struct {
NumMaxRetries int
}
@@ -30,25 +30,27 @@ func (d DefaultRetryer) MaxRetries() int {
return d.NumMaxRetries
}
-var seededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())})
-
// RetryRules returns the delay duration before retrying this request again
func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
// Set the upper limit of delay in retrying at ~five minutes
minTime := 30
throttle := d.shouldThrottle(r)
if throttle {
+ if delay, ok := getRetryDelay(r); ok {
+ return delay
+ }
+
minTime = 500
}
retryCount := r.RetryCount
- if retryCount > 13 {
- retryCount = 13
- } else if throttle && retryCount > 8 {
+ if throttle && retryCount > 8 {
retryCount = 8
+ } else if retryCount > 13 {
+ retryCount = 13
}
- delay := (1 << uint(retryCount)) * (seededRand.Intn(minTime) + minTime)
+ delay := (1 << uint(retryCount)) * (sdkrand.SeededRand.Intn(minTime) + minTime)
return time.Duration(delay) * time.Millisecond
}
@@ -60,7 +62,7 @@ func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
return *r.Retryable
}
- if r.HTTPResponse.StatusCode >= 500 {
+ if r.HTTPResponse.StatusCode >= 500 && r.HTTPResponse.StatusCode != 501 {
return true
}
return r.IsErrorRetryable() || d.shouldThrottle(r)
@@ -68,29 +70,47 @@ func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
// ShouldThrottle returns true if the request should be throttled.
func (d DefaultRetryer) shouldThrottle(r *request.Request) bool {
- if r.HTTPResponse.StatusCode == 502 ||
- r.HTTPResponse.StatusCode == 503 ||
- r.HTTPResponse.StatusCode == 504 {
- return true
+ switch r.HTTPResponse.StatusCode {
+ case 429:
+ case 502:
+ case 503:
+ case 504:
+ default:
+ return r.IsErrorThrottle()
}
- return r.IsErrorThrottle()
-}
-// lockedSource is a thread-safe implementation of rand.Source
-type lockedSource struct {
- lk sync.Mutex
- src rand.Source
+ return true
}
-func (r *lockedSource) Int63() (n int64) {
- r.lk.Lock()
- n = r.src.Int63()
- r.lk.Unlock()
- return
+// This will look in the Retry-After header, RFC 7231, for how long
+// it will wait before attempting another request
+func getRetryDelay(r *request.Request) (time.Duration, bool) {
+ if !canUseRetryAfterHeader(r) {
+ return 0, false
+ }
+
+ delayStr := r.HTTPResponse.Header.Get("Retry-After")
+ if len(delayStr) == 0 {
+ return 0, false
+ }
+
+ delay, err := strconv.Atoi(delayStr)
+ if err != nil {
+ return 0, false
+ }
+
+ return time.Duration(delay) * time.Second, true
}
-func (r *lockedSource) Seed(seed int64) {
- r.lk.Lock()
- r.src.Seed(seed)
- r.lk.Unlock()
+// Will look at the status code to see if the retry header pertains to
+// the status code.
+func canUseRetryAfterHeader(r *request.Request) bool {
+ switch r.HTTPResponse.StatusCode {
+ case 429:
+ case 503:
+ default:
+ return false
+ }
+
+ return true
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go
new file mode 100644
index 0000000..fddba4e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer_test.go
@@ -0,0 +1,189 @@
+package client
+
+import (
+ "net/http"
+ "testing"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws/request"
+)
+
+func TestRetryThrottleStatusCodes(t *testing.T) {
+ cases := []struct {
+ expectThrottle bool
+ expectRetry bool
+ r request.Request
+ }{
+ {
+ false,
+ false,
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 200},
+ },
+ },
+ {
+ true,
+ true,
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 429},
+ },
+ },
+ {
+ true,
+ true,
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 502},
+ },
+ },
+ {
+ true,
+ true,
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 503},
+ },
+ },
+ {
+ true,
+ true,
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 504},
+ },
+ },
+ {
+ false,
+ true,
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 500},
+ },
+ },
+ }
+
+ d := DefaultRetryer{NumMaxRetries: 10}
+ for i, c := range cases {
+ throttle := d.shouldThrottle(&c.r)
+ retry := d.ShouldRetry(&c.r)
+
+ if e, a := c.expectThrottle, throttle; e != a {
+ t.Errorf("%d: expected %v, but received %v", i, e, a)
+ }
+
+ if e, a := c.expectRetry, retry; e != a {
+ t.Errorf("%d: expected %v, but received %v", i, e, a)
+ }
+ }
+}
+
+func TestCanUseRetryAfter(t *testing.T) {
+ cases := []struct {
+ r request.Request
+ e bool
+ }{
+ {
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 200},
+ },
+ false,
+ },
+ {
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 500},
+ },
+ false,
+ },
+ {
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 429},
+ },
+ true,
+ },
+ {
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 503},
+ },
+ true,
+ },
+ }
+
+ for i, c := range cases {
+ a := canUseRetryAfterHeader(&c.r)
+ if c.e != a {
+ t.Errorf("%d: expected %v, but received %v", i, c.e, a)
+ }
+ }
+}
+
+func TestGetRetryDelay(t *testing.T) {
+ cases := []struct {
+ r request.Request
+ e time.Duration
+ equal bool
+ ok bool
+ }{
+ {
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 429, Header: http.Header{"Retry-After": []string{"3600"}}},
+ },
+ 3600 * time.Second,
+ true,
+ true,
+ },
+ {
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{"120"}}},
+ },
+ 120 * time.Second,
+ true,
+ true,
+ },
+ {
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{"120"}}},
+ },
+ 1 * time.Second,
+ false,
+ true,
+ },
+ {
+ request.Request{
+ HTTPResponse: &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{""}}},
+ },
+ 0 * time.Second,
+ true,
+ false,
+ },
+ }
+
+ for i, c := range cases {
+ a, ok := getRetryDelay(&c.r)
+ if c.ok != ok {
+ t.Errorf("%d: expected %v, but received %v", i, c.ok, ok)
+ }
+
+ if (c.e != a) == c.equal {
+ t.Errorf("%d: expected %v, but received %v", i, c.e, a)
+ }
+ }
+}
+
+func TestRetryDelay(t *testing.T) {
+ r := request.Request{}
+ for i := 0; i < 100; i++ {
+ rTemp := r
+ rTemp.HTTPResponse = &http.Response{StatusCode: 500, Header: http.Header{"Retry-After": []string{""}}}
+ rTemp.RetryCount = i
+ a, _ := getRetryDelay(&rTemp)
+ if a > 5*time.Minute {
+ t.Errorf("retry delay should never be greater than five minutes, received %d", a)
+ }
+ }
+
+ for i := 0; i < 100; i++ {
+ rTemp := r
+ rTemp.RetryCount = i
+ rTemp.HTTPResponse = &http.Response{StatusCode: 503, Header: http.Header{"Retry-After": []string{""}}}
+ a, _ := getRetryDelay(&rTemp)
+ if a > 5*time.Minute {
+ t.Errorf("retry delay should never be greater than five minutes, received %d", a)
+ }
+ }
+}
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 0000000..e223c54
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
@@ -0,0 +1,112 @@
+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)
+ bodySeekable := aws.IsReaderSeekable(r.Body)
+ 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 {
+ if !bodySeekable {
+ r.SetReaderBody(aws.ReadSeekCloser(r.HTTPRequest.Body))
+ }
+ // 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 0000000..f0e06b8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger_test.go
@@ -0,0 +1,144 @@
+package client
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "reflect"
+ "testing"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/client/metadata"
+ "github.com/aws/aws-sdk-go/aws/corehandlers"
+ "github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/request"
+)
+
+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())
+ }
+}
+
+func TestLogRequest(t *testing.T) {
+ cases := []struct {
+ Body io.ReadSeeker
+ ExpectBody []byte
+ LogLevel aws.LogLevelType
+ }{
+ {
+ Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("body content"))),
+ ExpectBody: []byte("body content"),
+ },
+ {
+ Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("body content"))),
+ LogLevel: aws.LogDebugWithHTTPBody,
+ ExpectBody: []byte("body content"),
+ },
+ {
+ Body: bytes.NewReader([]byte("body content")),
+ ExpectBody: []byte("body content"),
+ },
+ {
+ Body: bytes.NewReader([]byte("body content")),
+ LogLevel: aws.LogDebugWithHTTPBody,
+ ExpectBody: []byte("body content"),
+ },
+ }
+
+ for i, c := range cases {
+ logW := bytes.NewBuffer(nil)
+ req := request.New(
+ aws.Config{
+ Credentials: credentials.AnonymousCredentials,
+ Logger: &bufLogger{w: logW},
+ LogLevel: aws.LogLevel(c.LogLevel),
+ },
+ metadata.ClientInfo{
+ Endpoint: "https://mock-service.mock-region.amazonaws.com",
+ },
+ testHandlers(),
+ nil,
+ &request.Operation{
+ Name: "APIName",
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ },
+ struct{}{}, nil,
+ )
+ req.SetReaderBody(c.Body)
+ req.Build()
+
+ logRequest(req)
+
+ b, err := ioutil.ReadAll(req.HTTPRequest.Body)
+ if err != nil {
+ t.Fatalf("%d, expect to read SDK request Body", i)
+ }
+
+ if e, a := c.ExpectBody, b; !reflect.DeepEqual(e, a) {
+ t.Errorf("%d, expect %v body, got %v", i, e, a)
+ }
+ }
+}
+
+type bufLogger struct {
+ w *bytes.Buffer
+}
+
+func (l *bufLogger) Log(args ...interface{}) {
+ fmt.Fprintln(l.w, args...)
+}
+
+func testHandlers() request.Handlers {
+ var handlers request.Handlers
+
+ handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler)
+
+ return handlers
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
index 4778056..920e9fd 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
@@ -3,6 +3,7 @@ package metadata
// ClientInfo wraps immutable data from the client.Client structure.
type ClientInfo struct {
ServiceName string
+ ServiceID string
APIVersion string
Endpoint string
SigningName string
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go
index d1f31f1..5421b5d 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go
@@ -95,7 +95,7 @@ type Config struct {
// recoverable failures.
//
// When nil or the value does not implement the request.Retryer interface,
- // the request.DefaultRetryer will be used.
+ // the client.DefaultRetryer will be used.
//
// When both Retryer and MaxRetries are non-nil, the former is used and
// the latter ignored.
@@ -151,6 +151,15 @@ type Config struct {
// with accelerate.
S3UseAccelerate *bool
+ // S3DisableContentMD5Validation config option is temporarily disabled,
+ // For S3 GetObject API calls, #1837.
+ //
+ // Set this to `true` to disable the S3 service client from automatically
+ // adding the ContentMD5 to S3 Object Put and Upload API calls. This option
+ // will also disable the SDK from performing object ContentMD5 validation
+ // on GetObject API calls.
+ S3DisableContentMD5Validation *bool
+
// Set this to `true` to disable the EC2Metadata client from overriding the
// default http.Client's Timeout. This is helpful if you do not want the
// EC2Metadata client to create a new http.Client. This options is only
@@ -168,7 +177,7 @@ type Config struct {
//
EC2MetadataDisableTimeoutOverride *bool
- // Instructs the endpiont to be generated for a service client to
+ // Instructs the endpoint to be generated for a service client to
// be the dual stack endpoint. The dual stack endpoint will support
// both IPv4 and IPv6 addressing.
//
@@ -336,6 +345,15 @@ func (c *Config) WithS3Disable100Continue(disable bool) *Config {
func (c *Config) WithS3UseAccelerate(enable bool) *Config {
c.S3UseAccelerate = &enable
return c
+
+}
+
+// WithS3DisableContentMD5Validation sets a config
+// S3DisableContentMD5Validation value returning a Config pointer for chaining.
+func (c *Config) WithS3DisableContentMD5Validation(enable bool) *Config {
+ c.S3DisableContentMD5Validation = &enable
+ return c
+
}
// WithUseDualStack sets a config UseDualStack value returning a Config
@@ -435,6 +453,10 @@ func mergeInConfig(dst *Config, other *Config) {
dst.S3UseAccelerate = other.S3UseAccelerate
}
+ if other.S3DisableContentMD5Validation != nil {
+ dst.S3DisableContentMD5Validation = other.S3DisableContentMD5Validation
+ }
+
if other.UseDualStack != nil {
dst.UseDualStack = other.UseDualStack
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
index e8cf93d..8fdda53 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
@@ -4,9 +4,9 @@ package aws
import "time"
-// An emptyCtx is a copy of the the Go 1.7 context.emptyCtx type. This
-// is copied to provide a 1.6 and 1.5 safe version of context that is compatible
-// with Go 1.7's Context.
+// An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to
+// provide a 1.6 and 1.5 safe version of context that is compatible with Go
+// 1.7's Context.
//
// An emptyCtx is never canceled, has no values, and has no deadline. It is not
// struct{}, since vars of this type must have distinct addresses.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
index 3b73a7d..ff5d58e 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
@@ -311,6 +311,24 @@ func TimeValue(v *time.Time) time.Time {
return time.Time{}
}
+// SecondsTimeValue converts an int64 pointer to a time.Time value
+// representing seconds since Epoch or time.Time{} if the pointer is nil.
+func SecondsTimeValue(v *int64) time.Time {
+ if v != nil {
+ return time.Unix((*v / 1000), 0)
+ }
+ return time.Time{}
+}
+
+// MillisecondsTimeValue converts an int64 pointer to a time.Time value
+// representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.
+func MillisecondsTimeValue(v *int64) time.Time {
+ if v != nil {
+ return time.Unix(0, (*v * 1000000))
+ }
+ return time.Time{}
+}
+
// TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC".
// The result is undefined if the Unix time cannot be represented by an int64.
// Which includes calling TimeUnixMilli on a zero Time is undefined.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go
index df7a3e5..1a9461e 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/convert_types_test.go
@@ -1,10 +1,9 @@
package aws
import (
+ "reflect"
"testing"
"time"
-
- "github.com/stretchr/testify/assert"
)
var testCasesStringSlice = [][]string{
@@ -18,14 +17,22 @@ func TestStringSlice(t *testing.T) {
continue
}
out := StringSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := StringValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -39,22 +46,34 @@ func TestStringValueSlice(t *testing.T) {
continue
}
out := StringValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
+ if out[i] != "" {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
+ if e, a := *(in[i]), out[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
out2 := StringSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out2 {
if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
+ if *(out2[i]) != "" {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
+ if e, a := *in[i], *out2[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
}
@@ -70,14 +89,22 @@ func TestStringMap(t *testing.T) {
continue
}
out := StringMap(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := StringValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -91,14 +118,22 @@ func TestBoolSlice(t *testing.T) {
continue
}
out := BoolSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := BoolValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -110,22 +145,34 @@ func TestBoolValueSlice(t *testing.T) {
continue
}
out := BoolValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
+ if out[i] {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
+ if e, a := *(in[i]), out[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
out2 := BoolSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out2 {
if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
+ if *(out2[i]) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
+ if e, a := in[i], out2[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
}
@@ -141,14 +188,22 @@ func TestBoolMap(t *testing.T) {
continue
}
out := BoolMap(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := BoolValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -162,14 +217,22 @@ func TestIntSlice(t *testing.T) {
continue
}
out := IntSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := IntValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -181,22 +244,34 @@ func TestIntValueSlice(t *testing.T) {
continue
}
out := IntValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
+ if out[i] != 0 {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
+ if e, a := *(in[i]), out[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
out2 := IntSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out2 {
if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
+ if *(out2[i]) != 0 {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
+ if e, a := in[i], out2[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
}
@@ -212,14 +287,22 @@ func TestIntMap(t *testing.T) {
continue
}
out := IntMap(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := IntValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -233,14 +316,22 @@ func TestInt64Slice(t *testing.T) {
continue
}
out := Int64Slice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := Int64ValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -252,22 +343,34 @@ func TestInt64ValueSlice(t *testing.T) {
continue
}
out := Int64ValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
+ if out[i] != 0 {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
+ if e, a := *(in[i]), out[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
out2 := Int64Slice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out2 {
if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
+ if *(out2[i]) != 0 {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
+ if e, a := in[i], out2[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
}
@@ -283,14 +386,22 @@ func TestInt64Map(t *testing.T) {
continue
}
out := Int64Map(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := Int64ValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -304,14 +415,22 @@ func TestFloat64Slice(t *testing.T) {
continue
}
out := Float64Slice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := Float64ValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -323,22 +442,34 @@ func TestFloat64ValueSlice(t *testing.T) {
continue
}
out := Float64ValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
+ if out[i] != 0 {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
+ if e, a := *(in[i]), out[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
out2 := Float64Slice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out2 {
if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
+ if *(out2[i]) != 0 {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
+ if e, a := in[i], out2[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
}
@@ -354,14 +485,22 @@ func TestFloat64Map(t *testing.T) {
continue
}
out := Float64Map(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := Float64ValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -375,14 +514,22 @@ func TestTimeSlice(t *testing.T) {
continue
}
out := TimeSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := TimeValueSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
@@ -394,22 +541,34 @@ func TestTimeValueSlice(t *testing.T) {
continue
}
out := TimeValueSlice(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
if in[i] == nil {
- assert.Empty(t, out[i], "Unexpected value at idx %d", idx)
+ if !out[i].IsZero() {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, *(in[i]), out[i], "Unexpected value at idx %d", idx)
+ if e, a := *(in[i]), out[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
out2 := TimeSlice(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out2 {
if in[i] == nil {
- assert.Empty(t, *(out2[i]), "Unexpected value at idx %d", idx)
+ if !(*(out2[i])).IsZero() {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
} else {
- assert.Equal(t, in[i], out2[i], "Unexpected value at idx %d", idx)
+ if e, a := in[i], out2[i]; e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
}
}
@@ -425,13 +584,58 @@ func TestTimeMap(t *testing.T) {
continue
}
out := TimeMap(in)
- assert.Len(t, out, len(in), "Unexpected len at idx %d", idx)
+ if e, a := len(out), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
for i := range out {
- assert.Equal(t, in[i], *(out[i]), "Unexpected value at idx %d", idx)
+ if e, a := in[i], *(out[i]); e != a {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
}
out2 := TimeValueMap(out)
- assert.Len(t, out2, len(in), "Unexpected len at idx %d", idx)
- assert.Equal(t, in, out2, "Unexpected value at idx %d", idx)
+ if e, a := len(out2), len(in); e != a {
+ t.Errorf("Unexpected len at idx %d", idx)
+ }
+ if e, a := in, out2; !reflect.DeepEqual(e, a) {
+ t.Errorf("Unexpected value at idx %d", idx)
+ }
+ }
+}
+
+type TimeValueTestCase struct {
+ in int64
+ outSecs time.Time
+ outMillis time.Time
+}
+
+var testCasesTimeValue = []TimeValueTestCase{
+ {
+ in: int64(1501558289000),
+ outSecs: time.Unix(1501558289, 0),
+ outMillis: time.Unix(1501558289, 0),
+ },
+ {
+ in: int64(1501558289001),
+ outSecs: time.Unix(1501558289, 0),
+ outMillis: time.Unix(1501558289, 1*1000000),
+ },
+}
+
+func TestSecondsTimeValue(t *testing.T) {
+ for idx, testCase := range testCasesTimeValue {
+ out := SecondsTimeValue(&testCase.in)
+ if e, a := testCase.outSecs, out; e != a {
+ t.Errorf("Unexpected value for time value at %d", idx)
+ }
+ }
+}
+
+func TestMillisecondsTimeValue(t *testing.T) {
+ for idx, testCase := range testCasesTimeValue {
+ out := MillisecondsTimeValue(&testCase.in)
+ if e, a := testCase.outMillis, out; e != a {
+ t.Errorf("Unexpected value for time value at %d", idx)
+ }
}
}
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 25b461c..cfcddf3 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
@@ -3,12 +3,10 @@ package corehandlers
import (
"bytes"
"fmt"
- "io"
"io/ioutil"
"net/http"
"net/url"
"regexp"
- "runtime"
"strconv"
"time"
@@ -36,18 +34,13 @@ var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLen
if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" {
length, _ = strconv.ParseInt(slength, 10, 64)
} else {
- switch body := r.Body.(type) {
- case nil:
- length = 0
- case lener:
- length = int64(body.Len())
- case io.Seeker:
- r.BodyStart, _ = body.Seek(0, 1)
- end, _ := body.Seek(0, 2)
- body.Seek(r.BodyStart, 0) // make sure to seek back to original location
- length = end - r.BodyStart
- default:
- panic("Cannot get length of body, must provide `ContentLength`")
+ if r.Body != nil {
+ var err error
+ length, err = aws.SeekerLen(r.Body)
+ if err != nil {
+ r.Error = awserr.New(request.ErrCodeSerialization, "failed to get request body's length", err)
+ return
+ }
}
}
@@ -60,13 +53,6 @@ var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLen
}
}}
-// SDKVersionUserAgentHandler is a request handler for adding the SDK Version to the user agent.
-var SDKVersionUserAgentHandler = request.NamedHandler{
- Name: "core.SDKVersionUserAgentHandler",
- Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion,
- runtime.Version(), runtime.GOOS, runtime.GOARCH),
-}
-
var reStatusCode = regexp.MustCompile(`^(\d{3})`)
// ValidateReqSigHandler is a request handler to ensure that the request's
@@ -106,6 +92,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 0000000..b47afc2
--- /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/corehandlers/handlers_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go
index fe7d3c9..1d715c9 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers_test.go
@@ -7,11 +7,10 @@ import (
"net/http"
"net/http/httptest"
"os"
+ "strings"
"testing"
"time"
- "github.com/stretchr/testify/assert"
-
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/corehandlers"
@@ -32,7 +31,9 @@ func TestValidateEndpointHandler(t *testing.T) {
req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
err := req.Build()
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
}
func TestValidateEndpointHandlerErrorRegion(t *testing.T) {
@@ -45,8 +46,12 @@ func TestValidateEndpointHandlerErrorRegion(t *testing.T) {
req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
err := req.Build()
- assert.Error(t, err)
- assert.Equal(t, aws.ErrMissingRegion, err)
+ if err == nil {
+ t.Errorf("expect error, got none")
+ }
+ if e, a := aws.ErrMissingRegion, err; e != a {
+ t.Errorf("expect %v to be %v", e, a)
+ }
}
type mockCredsProvider struct {
@@ -82,18 +87,30 @@ func TestAfterRetryRefreshCreds(t *testing.T) {
})
svc.Handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler)
- assert.True(t, svc.Config.Credentials.IsExpired(), "Expect to start out expired")
- assert.False(t, credProvider.retrieveCalled)
+ if !svc.Config.Credentials.IsExpired() {
+ t.Errorf("Expect to start out expired")
+ }
+ if credProvider.retrieveCalled {
+ t.Errorf("expect not called")
+ }
req := svc.NewRequest(&request.Operation{Name: "Operation"}, nil, nil)
req.Send()
- assert.True(t, svc.Config.Credentials.IsExpired())
- assert.False(t, credProvider.retrieveCalled)
+ if !svc.Config.Credentials.IsExpired() {
+ t.Errorf("Expect to start out expired")
+ }
+ if credProvider.retrieveCalled {
+ t.Errorf("expect not called")
+ }
_, err := svc.Config.Credentials.Get()
- assert.NoError(t, err)
- assert.True(t, credProvider.retrieveCalled)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
+ if !credProvider.retrieveCalled {
+ t.Errorf("expect not called")
+ }
}
func TestAfterRetryWithContextCanceled(t *testing.T) {
@@ -202,8 +219,12 @@ func TestSendHandlerError(t *testing.T) {
r.Send()
- assert.Error(t, r.Error)
- assert.NotNil(t, r.HTTPResponse)
+ if r.Error == nil {
+ t.Errorf("expect error, got none")
+ }
+ if r.HTTPResponse == nil {
+ t.Errorf("expect response, got none")
+ }
}
func TestSendWithoutFollowRedirects(t *testing.T) {
@@ -273,31 +294,47 @@ func TestValidateReqSigHandler(t *testing.T) {
corehandlers.ValidateReqSigHandler.Fn(c.Req)
- assert.NoError(t, c.Req.Error, "%d, expect no error", i)
- assert.Equal(t, c.Resign, resigned, "%d, expected resigning to match", i)
+ if c.Req.Error != nil {
+ t.Errorf("expect no error, got %v", c.Req.Error)
+ }
+ if e, a := c.Resign, resigned; e != a {
+ t.Errorf("%d, expect %v to be %v", i, e, a)
+ }
}
}
func setupContentLengthTestServer(t *testing.T, hasContentLength bool, contentLength int64) *httptest.Server {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
_, ok := r.Header["Content-Length"]
- assert.Equal(t, hasContentLength, ok, "expect content length to be set, %t", hasContentLength)
+ if e, a := hasContentLength, ok; e != a {
+ t.Errorf("expect %v to be %v", e, a)
+ }
if hasContentLength {
- assert.Equal(t, contentLength, r.ContentLength)
+ if e, a := contentLength, r.ContentLength; e != a {
+ t.Errorf("expect %v to be %v", e, a)
+ }
}
b, err := ioutil.ReadAll(r.Body)
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
r.Body.Close()
authHeader := r.Header.Get("Authorization")
if hasContentLength {
- assert.Contains(t, authHeader, "content-length")
+ if e, a := "content-length", authHeader; !strings.Contains(a, e) {
+ t.Errorf("expect %v to be in %v", e, a)
+ }
} else {
- assert.NotContains(t, authHeader, "content-length")
+ if e, a := "content-length", authHeader; strings.Contains(a, e) {
+ t.Errorf("expect %v to not be in %v", e, a)
+ }
}
- assert.Equal(t, contentLength, int64(len(b)))
+ if e, a := contentLength, int64(len(b)); e != a {
+ t.Errorf("expect %v to be %v", e, a)
+ }
}))
return server
@@ -316,7 +353,9 @@ func TestBuildContentLength_ZeroBody(t *testing.T) {
Key: aws.String("keyname"),
})
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
}
func TestBuildContentLength_NegativeBody(t *testing.T) {
@@ -334,7 +373,9 @@ func TestBuildContentLength_NegativeBody(t *testing.T) {
req.HTTPRequest.Header.Set("Content-Length", "-1")
- assert.NoError(t, req.Send())
+ if req.Error != nil {
+ t.Errorf("expect no error, got %v", req.Error)
+ }
}
func TestBuildContentLength_WithBody(t *testing.T) {
@@ -351,5 +392,7 @@ func TestBuildContentLength_WithBody(t *testing.T) {
Body: bytes.NewReader(make([]byte, 1024)),
})
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go
index 66973ca..e1d8a08 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator_test.go
@@ -3,8 +3,7 @@ package corehandlers_test
import (
"fmt"
"testing"
-
- "github.com/stretchr/testify/assert"
+ "reflect"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
@@ -14,7 +13,6 @@ import (
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/kinesis"
- "github.com/stretchr/testify/require"
)
var testSvc = func() *client.Client {
@@ -113,7 +111,9 @@ func TestNoErrors(t *testing.T) {
req := testSvc.NewRequest(&request.Operation{}, input, nil)
corehandlers.ValidateParametersHandler.Fn(req)
- require.NoError(t, req.Error)
+ if req.Error != nil {
+ t.Fatalf("expect no error, got %v", req.Error)
+ }
}
func TestMissingRequiredParameters(t *testing.T) {
@@ -121,17 +121,33 @@ func TestMissingRequiredParameters(t *testing.T) {
req := testSvc.NewRequest(&request.Operation{}, input, nil)
corehandlers.ValidateParametersHandler.Fn(req)
- require.Error(t, req.Error)
- assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code())
- assert.Equal(t, "3 validation error(s) found.", req.Error.(awserr.Error).Message())
+ if req.Error == nil {
+ t.Fatalf("expect error")
+ }
+ if e, a := "InvalidParameter", req.Error.(awserr.Error).Code(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "3 validation error(s) found.", req.Error.(awserr.Error).Message(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
errs := req.Error.(awserr.BatchedErrors).OrigErrs()
- assert.Len(t, errs, 3)
- assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredList.", errs[0].Error())
- assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredMap.", errs[1].Error())
- assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredBool.", errs[2].Error())
+ if e, a := 3, len(errs); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "ParamRequiredError: missing required field, StructShape.RequiredList.", errs[0].Error(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "ParamRequiredError: missing required field, StructShape.RequiredMap.", errs[1].Error(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "ParamRequiredError: missing required field, StructShape.RequiredBool.", errs[2].Error(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
- assert.Equal(t, "InvalidParameter: 3 validation error(s) found.\n- missing required field, StructShape.RequiredList.\n- missing required field, StructShape.RequiredMap.\n- missing required field, StructShape.RequiredBool.\n", req.Error.Error())
+ if e, a := "InvalidParameter: 3 validation error(s) found.\n- missing required field, StructShape.RequiredList.\n- missing required field, StructShape.RequiredMap.\n- missing required field, StructShape.RequiredBool.\n", req.Error.Error(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestNestedMissingRequiredParameters(t *testing.T) {
@@ -148,15 +164,29 @@ func TestNestedMissingRequiredParameters(t *testing.T) {
req := testSvc.NewRequest(&request.Operation{}, input, nil)
corehandlers.ValidateParametersHandler.Fn(req)
- require.Error(t, req.Error)
- assert.Equal(t, "InvalidParameter", req.Error.(awserr.Error).Code())
- assert.Equal(t, "3 validation error(s) found.", req.Error.(awserr.Error).Message())
+ if req.Error == nil {
+ t.Fatalf("expect error")
+ }
+ if e, a := "InvalidParameter", req.Error.(awserr.Error).Code(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "3 validation error(s) found.", req.Error.(awserr.Error).Message(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
errs := req.Error.(awserr.BatchedErrors).OrigErrs()
- assert.Len(t, errs, 3)
- assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredList[0].Name.", errs[0].Error())
- assert.Equal(t, "ParamRequiredError: missing required field, StructShape.RequiredMap[key2].Name.", errs[1].Error())
- assert.Equal(t, "ParamRequiredError: missing required field, StructShape.OptionalStruct.Name.", errs[2].Error())
+ if e, a := 3, len(errs); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "ParamRequiredError: missing required field, StructShape.RequiredList[0].Name.", errs[0].Error(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "ParamRequiredError: missing required field, StructShape.RequiredMap[key2].Name.", errs[1].Error(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "ParamRequiredError: missing required field, StructShape.OptionalStruct.Name.", errs[2].Error(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
type testInput struct {
@@ -226,7 +256,9 @@ func TestValidateFieldMinParameter(t *testing.T) {
req := testSvc.NewRequest(&request.Operation{}, &c.in, nil)
corehandlers.ValidateParametersHandler.Fn(req)
- assert.Equal(t, c.err, req.Error, "%d case failed", i)
+ if e, a := c.err, req.Error; !reflect.DeepEqual(e,a) {
+ t.Errorf("%d, expect %v, got %v", i, e, a)
+ }
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go
new file mode 100644
index 0000000..a15f496
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go
@@ -0,0 +1,37 @@
+package corehandlers
+
+import (
+ "os"
+ "runtime"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/request"
+)
+
+// SDKVersionUserAgentHandler is a request handler for adding the SDK Version
+// to the user agent.
+var SDKVersionUserAgentHandler = request.NamedHandler{
+ Name: "core.SDKVersionUserAgentHandler",
+ Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion,
+ runtime.Version(), runtime.GOOS, runtime.GOARCH),
+}
+
+const execEnvVar = `AWS_EXECUTION_ENV`
+const execEnvUAKey = `exec_env`
+
+// AddHostExecEnvUserAgentHander is a request handler appending the SDK's
+// execution environment to the user agent.
+//
+// If the environment variable AWS_EXECUTION_ENV is set, its value will be
+// appended to the user agent string.
+var AddHostExecEnvUserAgentHander = request.NamedHandler{
+ Name: "core.AddHostExecEnvUserAgentHander",
+ Fn: func(r *request.Request) {
+ v := os.Getenv(execEnvVar)
+ if len(v) == 0 {
+ return
+ }
+
+ request.AddToUserAgent(r, execEnvUAKey+"/"+v)
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go
new file mode 100644
index 0000000..4f61835
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent_test.go
@@ -0,0 +1,40 @@
+package corehandlers
+
+import (
+ "net/http"
+ "os"
+ "testing"
+
+ "github.com/aws/aws-sdk-go/aws/request"
+)
+
+func TestAddHostExecEnvUserAgentHander(t *testing.T) {
+ cases := []struct {
+ ExecEnv string
+ Expect string
+ }{
+ {ExecEnv: "Lambda", Expect: "exec_env/Lambda"},
+ {ExecEnv: "", Expect: ""},
+ {ExecEnv: "someThingCool", Expect: "exec_env/someThingCool"},
+ }
+
+ for i, c := range cases {
+ os.Clearenv()
+ os.Setenv(execEnvVar, c.ExecEnv)
+
+ req := &request.Request{
+ HTTPRequest: &http.Request{
+ Header: http.Header{},
+ },
+ }
+ AddHostExecEnvUserAgentHander.Fn(req)
+
+ if err := req.Error; err != nil {
+ t.Fatalf("%d, expect no error, got %v", i, err)
+ }
+
+ if e, a := c.Expect, req.HTTPRequest.Header.Get("User-Agent"); e != a {
+ t.Errorf("%d, expect %v user agent, got %v", i, e, a)
+ }
+ }
+}
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 42416fc..ed08699 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
@@ -178,7 +178,8 @@ func (e *Expiry) IsExpired() bool {
type Credentials struct {
creds Value
forceRefresh bool
- m sync.Mutex
+
+ m sync.RWMutex
provider Provider
}
@@ -201,6 +202,17 @@ func NewCredentials(provider Provider) *Credentials {
// If Credentials.Expire() was called the credentials Value will be force
// expired, and the next call to Get() will cause them to be refreshed.
func (c *Credentials) Get() (Value, error) {
+ // Check the cached credentials first with just the read lock.
+ c.m.RLock()
+ if !c.isExpired() {
+ creds := c.creds
+ c.m.RUnlock()
+ return creds, nil
+ }
+ c.m.RUnlock()
+
+ // Credentials are expired need to retrieve the credentials taking the full
+ // lock.
c.m.Lock()
defer c.m.Unlock()
@@ -234,8 +246,8 @@ func (c *Credentials) Expire() {
// If the Credentials were forced to be expired with Expire() this will
// reflect that override.
func (c *Credentials) IsExpired() bool {
- c.m.Lock()
- defer c.m.Unlock()
+ c.m.RLock()
+ defer c.m.RUnlock()
return c.isExpired()
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials_bench_test.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials_bench_test.go
new file mode 100644
index 0000000..01a5d63
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials_bench_test.go
@@ -0,0 +1,90 @@
+// +build go1.9
+
+package credentials
+
+import (
+ "fmt"
+ "strconv"
+ "sync"
+ "testing"
+ "time"
+)
+
+func BenchmarkCredentials_Get(b *testing.B) {
+ stub := &stubProvider{}
+
+ cases := []int{1, 10, 100, 500, 1000, 10000}
+
+ for _, c := range cases {
+ b.Run(strconv.Itoa(c), func(b *testing.B) {
+ creds := NewCredentials(stub)
+ var wg sync.WaitGroup
+ wg.Add(c)
+ for i := 0; i < c; i++ {
+ go func() {
+ for j := 0; j < b.N; j++ {
+ v, err := creds.Get()
+ if err != nil {
+ b.Fatalf("expect no error %v, %v", v, err)
+ }
+ }
+ wg.Done()
+ }()
+ }
+ b.ResetTimer()
+
+ wg.Wait()
+ })
+ }
+}
+
+func BenchmarkCredentials_Get_Expire(b *testing.B) {
+ p := &blockProvider{}
+
+ expRates := []int{10000, 1000, 100}
+ cases := []int{1, 10, 100, 500, 1000, 10000}
+
+ for _, expRate := range expRates {
+ for _, c := range cases {
+ b.Run(fmt.Sprintf("%d-%d", expRate, c), func(b *testing.B) {
+ creds := NewCredentials(p)
+ var wg sync.WaitGroup
+ wg.Add(c)
+ for i := 0; i < c; i++ {
+ go func(id int) {
+ for j := 0; j < b.N; j++ {
+ v, err := creds.Get()
+ if err != nil {
+ b.Fatalf("expect no error %v, %v", v, err)
+ }
+ // periodically expire creds to cause rwlock
+ if id == 0 && j%expRate == 0 {
+ creds.Expire()
+ }
+ }
+ wg.Done()
+ }(i)
+ }
+ b.ResetTimer()
+
+ wg.Wait()
+ })
+ }
+ }
+}
+
+type blockProvider struct {
+ creds Value
+ expired bool
+ err error
+}
+
+func (s *blockProvider) Retrieve() (Value, error) {
+ s.expired = false
+ s.creds.ProviderName = "blockProvider"
+ time.Sleep(time.Millisecond)
+ return s.creds, s.err
+}
+func (s *blockProvider) IsExpired() bool {
+ return s.expired
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
index 7fb7cbf..51e21e0 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
@@ -3,11 +3,11 @@ package credentials
import (
"fmt"
"os"
- "path/filepath"
"github.com/go-ini/ini"
"github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/internal/shareddefaults"
)
// SharedCredsProviderName provides a name of SharedCreds provider
@@ -15,8 +15,6 @@ const SharedCredsProviderName = "SharedCredentialsProvider"
var (
// ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found.
- //
- // @readonly
ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil)
)
@@ -117,22 +115,23 @@ func loadProfile(filename, profile string) (Value, error) {
//
// Will return an error if the user's home directory path cannot be found.
func (p *SharedCredentialsProvider) filename() (string, error) {
- if p.Filename == "" {
- if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); p.Filename != "" {
- return p.Filename, nil
- }
-
- homeDir := os.Getenv("HOME") // *nix
- if homeDir == "" { // Windows
- homeDir = os.Getenv("USERPROFILE")
- }
- if homeDir == "" {
- return "", ErrSharedCredentialsHomeNotFound
- }
-
- p.Filename = filepath.Join(homeDir, ".aws", "credentials")
+ if len(p.Filename) != 0 {
+ return p.Filename, nil
+ }
+
+ if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(p.Filename) != 0 {
+ return p.Filename, nil
}
+ if home := shareddefaults.UserHomeDir(); len(home) == 0 {
+ // Backwards compatibility of home directly not found error being returned.
+ // This error is too verbose, failure when opening the file would of been
+ // a better error to return.
+ return "", ErrSharedCredentialsHomeNotFound
+ }
+
+ p.Filename = shareddefaults.SharedCredentialsFilename()
+
return p.Filename, nil
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go
index 6b4093a..1eb45f2 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider_test.go
@@ -5,6 +5,7 @@ import (
"path/filepath"
"testing"
+ "github.com/aws/aws-sdk-go/internal/shareddefaults"
"github.com/stretchr/testify/assert"
)
@@ -97,6 +98,25 @@ func TestSharedCredentialsProviderColonInCredFile(t *testing.T) {
assert.Empty(t, creds.SessionToken, "Expect no token")
}
+func TestSharedCredentialsProvider_DefaultFilename(t *testing.T) {
+ os.Clearenv()
+ os.Setenv("USERPROFILE", "profile_dir")
+ os.Setenv("HOME", "home_dir")
+
+ // default filename and profile
+ p := SharedCredentialsProvider{}
+
+ filename, err := p.filename()
+
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+
+ if e, a := shareddefaults.SharedCredentialsFilename(), filename; e != a {
+ t.Errorf("expect %q filename, got %q", e, a)
+ }
+}
+
func BenchmarkSharedCredentialsProvider(b *testing.B) {
os.Clearenv()
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go
new file mode 100644
index 0000000..152d785
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go
@@ -0,0 +1,46 @@
+// Package csm provides Client Side Monitoring (CSM) which enables sending metrics
+// via UDP connection. Using the Start function will enable the reporting of
+// metrics on a given port. If Start is called, with different parameters, again,
+// a panic will occur.
+//
+// Pause can be called to pause any metrics publishing on a given port. Sessions
+// that have had their handlers modified via InjectHandlers may still be used.
+// However, the handlers will act as a no-op meaning no metrics will be published.
+//
+// Example:
+// r, err := csm.Start("clientID", ":31000")
+// if err != nil {
+// panic(fmt.Errorf("failed starting CSM: %v", err))
+// }
+//
+// sess, err := session.NewSession(&aws.Config{})
+// if err != nil {
+// panic(fmt.Errorf("failed loading session: %v", err))
+// }
+//
+// r.InjectHandlers(&sess.Handlers)
+//
+// client := s3.New(sess)
+// resp, err := client.GetObject(&s3.GetObjectInput{
+// Bucket: aws.String("bucket"),
+// Key: aws.String("key"),
+// })
+//
+// // Will pause monitoring
+// r.Pause()
+// resp, err = client.GetObject(&s3.GetObjectInput{
+// Bucket: aws.String("bucket"),
+// Key: aws.String("key"),
+// })
+//
+// // Resume monitoring
+// r.Continue()
+//
+// Start returns a Reporter that is used to enable or disable monitoring. If
+// access to the Reporter is required later, calling Get will return the Reporter
+// singleton.
+//
+// Example:
+// r := csm.Get()
+// r.Continue()
+package csm
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go
new file mode 100644
index 0000000..2f0c6ea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go
@@ -0,0 +1,67 @@
+package csm
+
+import (
+ "fmt"
+ "sync"
+)
+
+var (
+ lock sync.Mutex
+)
+
+// Client side metric handler names
+const (
+ APICallMetricHandlerName = "awscsm.SendAPICallMetric"
+ APICallAttemptMetricHandlerName = "awscsm.SendAPICallAttemptMetric"
+)
+
+// Start will start the a long running go routine to capture
+// client side metrics. Calling start multiple time will only
+// start the metric listener once and will panic if a different
+// client ID or port is passed in.
+//
+// Example:
+// r, err := csm.Start("clientID", "127.0.0.1:8094")
+// if err != nil {
+// panic(fmt.Errorf("expected no error, but received %v", err))
+// }
+// sess := session.NewSession()
+// r.InjectHandlers(sess.Handlers)
+//
+// svc := s3.New(sess)
+// out, err := svc.GetObject(&s3.GetObjectInput{
+// Bucket: aws.String("bucket"),
+// Key: aws.String("key"),
+// })
+func Start(clientID string, url string) (*Reporter, error) {
+ lock.Lock()
+ defer lock.Unlock()
+
+ if sender == nil {
+ sender = newReporter(clientID, url)
+ } else {
+ if sender.clientID != clientID {
+ panic(fmt.Errorf("inconsistent client IDs. %q was expected, but received %q", sender.clientID, clientID))
+ }
+
+ if sender.url != url {
+ panic(fmt.Errorf("inconsistent URLs. %q was expected, but received %q", sender.url, url))
+ }
+ }
+
+ if err := connect(url); err != nil {
+ sender = nil
+ return nil, err
+ }
+
+ return sender, nil
+}
+
+// Get will return a reporter if one exists, if one does not exist, nil will
+// be returned.
+func Get() *Reporter {
+ lock.Lock()
+ defer lock.Unlock()
+
+ return sender
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable_test.go
new file mode 100644
index 0000000..a7504d3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable_test.go
@@ -0,0 +1,74 @@
+package csm
+
+import (
+ "encoding/json"
+ "fmt"
+ "net"
+ "testing"
+)
+
+func startUDPServer(done chan struct{}, fn func([]byte)) (string, error) {
+ addr, err := net.ResolveUDPAddr("udp", "127.0.0.1:0")
+ if err != nil {
+ return "", err
+ }
+
+ conn, err := net.ListenUDP("udp", addr)
+ if err != nil {
+ return "", err
+ }
+
+ buf := make([]byte, 1024)
+ go func() {
+ defer conn.Close()
+
+ for {
+ select {
+ case <-done:
+ return
+ default:
+ }
+
+ n, _, err := conn.ReadFromUDP(buf)
+ fn(buf[:n])
+
+ if err != nil {
+ panic(err)
+ }
+ }
+ }()
+
+ return conn.LocalAddr().String(), nil
+}
+
+func TestDifferentParams(t *testing.T) {
+ defer func() {
+ if r := recover(); r == nil {
+ t.Errorf("expected panic with different parameters")
+ }
+ }()
+ Start("clientID2", ":0")
+}
+
+var MetricsCh = make(chan map[string]interface{}, 1)
+var Done = make(chan struct{})
+
+func init() {
+ url, err := startUDPServer(Done, func(b []byte) {
+ m := map[string]interface{}{}
+ if err := json.Unmarshal(b, &m); err != nil {
+ panic(fmt.Sprintf("expected no error, but received %v", err))
+ }
+
+ MetricsCh <- m
+ })
+
+ if err != nil {
+ panic(err)
+ }
+
+ _, err = Start("clientID", url)
+ if err != nil {
+ panic(err)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/example_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/example_test.go
new file mode 100644
index 0000000..3da43dc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/example_test.go
@@ -0,0 +1,40 @@
+package csm_test
+
+import (
+ "fmt"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/csm"
+ "github.com/aws/aws-sdk-go/aws/session"
+ "github.com/aws/aws-sdk-go/service/s3"
+)
+
+func ExampleStart() {
+ r, err := csm.Start("clientID", ":31000")
+ if err != nil {
+ panic(fmt.Errorf("failed starting CSM: %v", err))
+ }
+
+ sess, err := session.NewSession(&aws.Config{})
+ if err != nil {
+ panic(fmt.Errorf("failed loading session: %v", err))
+ }
+
+ r.InjectHandlers(&sess.Handlers)
+
+ client := s3.New(sess)
+ client.GetObject(&s3.GetObjectInput{
+ Bucket: aws.String("bucket"),
+ Key: aws.String("key"),
+ })
+
+ // Pauses monitoring
+ r.Pause()
+ client.GetObject(&s3.GetObjectInput{
+ Bucket: aws.String("bucket"),
+ Key: aws.String("key"),
+ })
+
+ // Resume monitoring
+ r.Continue()
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go
new file mode 100644
index 0000000..4b0d630
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go
@@ -0,0 +1,51 @@
+package csm
+
+import (
+ "strconv"
+ "time"
+)
+
+type metricTime time.Time
+
+func (t metricTime) MarshalJSON() ([]byte, error) {
+ ns := time.Duration(time.Time(t).UnixNano())
+ return []byte(strconv.FormatInt(int64(ns/time.Millisecond), 10)), nil
+}
+
+type metric struct {
+ ClientID *string `json:"ClientId,omitempty"`
+ API *string `json:"Api,omitempty"`
+ Service *string `json:"Service,omitempty"`
+ Timestamp *metricTime `json:"Timestamp,omitempty"`
+ Type *string `json:"Type,omitempty"`
+ Version *int `json:"Version,omitempty"`
+
+ AttemptCount *int `json:"AttemptCount,omitempty"`
+ Latency *int `json:"Latency,omitempty"`
+
+ Fqdn *string `json:"Fqdn,omitempty"`
+ UserAgent *string `json:"UserAgent,omitempty"`
+ AttemptLatency *int `json:"AttemptLatency,omitempty"`
+
+ SessionToken *string `json:"SessionToken,omitempty"`
+ Region *string `json:"Region,omitempty"`
+ AccessKey *string `json:"AccessKey,omitempty"`
+ HTTPStatusCode *int `json:"HttpStatusCode,omitempty"`
+ XAmzID2 *string `json:"XAmzId2,omitempty"`
+ XAmzRequestID *string `json:"XAmznRequestId,omitempty"`
+
+ AWSException *string `json:"AwsException,omitempty"`
+ AWSExceptionMessage *string `json:"AwsExceptionMessage,omitempty"`
+ SDKException *string `json:"SdkException,omitempty"`
+ SDKExceptionMessage *string `json:"SdkExceptionMessage,omitempty"`
+
+ DestinationIP *string `json:"DestinationIp,omitempty"`
+ ConnectionReused *int `json:"ConnectionReused,omitempty"`
+
+ AcquireConnectionLatency *int `json:"AcquireConnectionLatency,omitempty"`
+ ConnectLatency *int `json:"ConnectLatency,omitempty"`
+ RequestLatency *int `json:"RequestLatency,omitempty"`
+ DNSLatency *int `json:"DnsLatency,omitempty"`
+ TCPLatency *int `json:"TcpLatency,omitempty"`
+ SSLLatency *int `json:"SslLatency,omitempty"`
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go
new file mode 100644
index 0000000..514fc37
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan.go
@@ -0,0 +1,54 @@
+package csm
+
+import (
+ "sync/atomic"
+)
+
+const (
+ runningEnum = iota
+ pausedEnum
+)
+
+var (
+ // MetricsChannelSize of metrics to hold in the channel
+ MetricsChannelSize = 100
+)
+
+type metricChan struct {
+ ch chan metric
+ paused int64
+}
+
+func newMetricChan(size int) metricChan {
+ return metricChan{
+ ch: make(chan metric, size),
+ }
+}
+
+func (ch *metricChan) Pause() {
+ atomic.StoreInt64(&ch.paused, pausedEnum)
+}
+
+func (ch *metricChan) Continue() {
+ atomic.StoreInt64(&ch.paused, runningEnum)
+}
+
+func (ch *metricChan) IsPaused() bool {
+ v := atomic.LoadInt64(&ch.paused)
+ return v == pausedEnum
+}
+
+// Push will push metrics to the metric channel if the channel
+// is not paused
+func (ch *metricChan) Push(m metric) bool {
+ if ch.IsPaused() {
+ return false
+ }
+
+ select {
+ case ch.ch <- m:
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan_test.go
new file mode 100644
index 0000000..81bdb25
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metricChan_test.go
@@ -0,0 +1,72 @@
+package csm
+
+import (
+ "testing"
+)
+
+func TestMetricChanPush(t *testing.T) {
+ ch := newMetricChan(5)
+ defer close(ch.ch)
+
+ pushed := ch.Push(metric{})
+ if !pushed {
+ t.Errorf("expected metrics to be pushed")
+ }
+
+ if e, a := 1, len(ch.ch); e != a {
+ t.Errorf("expected %d, but received %d", e, a)
+ }
+}
+
+func TestMetricChanPauseContinue(t *testing.T) {
+ ch := newMetricChan(5)
+ defer close(ch.ch)
+ ch.Pause()
+
+ if !ch.IsPaused() {
+ t.Errorf("expected to be paused, but did not pause properly")
+ }
+
+ ch.Continue()
+ if ch.IsPaused() {
+ t.Errorf("expected to be not paused, but did not continue properly")
+ }
+
+ pushed := ch.Push(metric{})
+ if !pushed {
+ t.Errorf("expected metrics to be pushed")
+ }
+
+ if e, a := 1, len(ch.ch); e != a {
+ t.Errorf("expected %d, but received %d", e, a)
+ }
+}
+
+func TestMetricChanPushWhenPaused(t *testing.T) {
+ ch := newMetricChan(5)
+ defer close(ch.ch)
+ ch.Pause()
+
+ pushed := ch.Push(metric{})
+ if pushed {
+ t.Errorf("expected metrics to not be pushed")
+ }
+
+ if e, a := 0, len(ch.ch); e != a {
+ t.Errorf("expected %d, but received %d", e, a)
+ }
+}
+
+func TestMetricChanNonBlocking(t *testing.T) {
+ ch := newMetricChan(0)
+ defer close(ch.ch)
+
+ pushed := ch.Push(metric{})
+ if pushed {
+ t.Errorf("expected metrics to be not pushed")
+ }
+
+ if e, a := 0, len(ch.ch); e != a {
+ t.Errorf("expected %d, but received %d", e, a)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
new file mode 100644
index 0000000..1484c8f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
@@ -0,0 +1,230 @@
+package csm
+
+import (
+ "encoding/json"
+ "net"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/aws/request"
+)
+
+const (
+ // DefaultPort is used when no port is specified
+ DefaultPort = "31000"
+)
+
+// Reporter will gather metrics of API requests made and
+// send those metrics to the CSM endpoint.
+type Reporter struct {
+ clientID string
+ url string
+ conn net.Conn
+ metricsCh metricChan
+ done chan struct{}
+}
+
+var (
+ sender *Reporter
+)
+
+func connect(url string) error {
+ const network = "udp"
+ if err := sender.connect(network, url); err != nil {
+ return err
+ }
+
+ if sender.done == nil {
+ sender.done = make(chan struct{})
+ go sender.start()
+ }
+
+ return nil
+}
+
+func newReporter(clientID, url string) *Reporter {
+ return &Reporter{
+ clientID: clientID,
+ url: url,
+ metricsCh: newMetricChan(MetricsChannelSize),
+ }
+}
+
+func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) {
+ if rep == nil {
+ return
+ }
+
+ now := time.Now()
+ creds, _ := r.Config.Credentials.Get()
+
+ m := metric{
+ ClientID: aws.String(rep.clientID),
+ API: aws.String(r.Operation.Name),
+ Service: aws.String(r.ClientInfo.ServiceID),
+ Timestamp: (*metricTime)(&now),
+ UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")),
+ Region: r.Config.Region,
+ Type: aws.String("ApiCallAttempt"),
+ Version: aws.Int(1),
+
+ XAmzRequestID: aws.String(r.RequestID),
+
+ AttemptCount: aws.Int(r.RetryCount + 1),
+ AttemptLatency: aws.Int(int(now.Sub(r.AttemptTime).Nanoseconds() / int64(time.Millisecond))),
+ AccessKey: aws.String(creds.AccessKeyID),
+ }
+
+ if r.HTTPResponse != nil {
+ m.HTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode)
+ }
+
+ if r.Error != nil {
+ if awserr, ok := r.Error.(awserr.Error); ok {
+ setError(&m, awserr)
+ }
+ }
+
+ rep.metricsCh.Push(m)
+}
+
+func setError(m *metric, err awserr.Error) {
+ msg := err.Message()
+ code := err.Code()
+
+ switch code {
+ case "RequestError",
+ "SerializationError",
+ request.CanceledErrorCode:
+
+ m.SDKException = &code
+ m.SDKExceptionMessage = &msg
+ default:
+ m.AWSException = &code
+ m.AWSExceptionMessage = &msg
+ }
+}
+
+func (rep *Reporter) sendAPICallMetric(r *request.Request) {
+ if rep == nil {
+ return
+ }
+
+ now := time.Now()
+ m := metric{
+ ClientID: aws.String(rep.clientID),
+ API: aws.String(r.Operation.Name),
+ Service: aws.String(r.ClientInfo.ServiceID),
+ Timestamp: (*metricTime)(&now),
+ Type: aws.String("ApiCall"),
+ AttemptCount: aws.Int(r.RetryCount + 1),
+ Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)),
+ XAmzRequestID: aws.String(r.RequestID),
+ }
+
+ // TODO: Probably want to figure something out for logging dropped
+ // metrics
+ rep.metricsCh.Push(m)
+}
+
+func (rep *Reporter) connect(network, url string) error {
+ if rep.conn != nil {
+ rep.conn.Close()
+ }
+
+ conn, err := net.Dial(network, url)
+ if err != nil {
+ return awserr.New("UDPError", "Could not connect", err)
+ }
+
+ rep.conn = conn
+
+ return nil
+}
+
+func (rep *Reporter) close() {
+ if rep.done != nil {
+ close(rep.done)
+ }
+
+ rep.metricsCh.Pause()
+}
+
+func (rep *Reporter) start() {
+ defer func() {
+ rep.metricsCh.Pause()
+ }()
+
+ for {
+ select {
+ case <-rep.done:
+ rep.done = nil
+ return
+ case m := <-rep.metricsCh.ch:
+ // TODO: What to do with this error? Probably should just log
+ b, err := json.Marshal(m)
+ if err != nil {
+ continue
+ }
+
+ rep.conn.Write(b)
+ }
+ }
+}
+
+// Pause will pause the metric channel preventing any new metrics from
+// being added.
+func (rep *Reporter) Pause() {
+ lock.Lock()
+ defer lock.Unlock()
+
+ if rep == nil {
+ return
+ }
+
+ rep.close()
+}
+
+// Continue will reopen the metric channel and allow for monitoring
+// to be resumed.
+func (rep *Reporter) Continue() {
+ lock.Lock()
+ defer lock.Unlock()
+ if rep == nil {
+ return
+ }
+
+ if !rep.metricsCh.IsPaused() {
+ return
+ }
+
+ rep.metricsCh.Continue()
+}
+
+// InjectHandlers will will enable client side metrics and inject the proper
+// handlers to handle how metrics are sent.
+//
+// Example:
+// // Start must be called in order to inject the correct handlers
+// r, err := csm.Start("clientID", "127.0.0.1:8094")
+// if err != nil {
+// panic(fmt.Errorf("expected no error, but received %v", err))
+// }
+//
+// sess := session.NewSession()
+// r.InjectHandlers(&sess.Handlers)
+//
+// // create a new service client with our client side metric session
+// svc := s3.New(sess)
+func (rep *Reporter) InjectHandlers(handlers *request.Handlers) {
+ if rep == nil {
+ return
+ }
+
+ apiCallHandler := request.NamedHandler{Name: APICallMetricHandlerName, Fn: rep.sendAPICallMetric}
+ handlers.Complete.PushFrontNamed(apiCallHandler)
+
+ apiCallAttemptHandler := request.NamedHandler{Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric}
+ handlers.AfterRetry.PushFrontNamed(apiCallAttemptHandler)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter_test.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter_test.go
new file mode 100644
index 0000000..7e93479
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter_test.go
@@ -0,0 +1,233 @@
+package csm_test
+
+import (
+ "fmt"
+ "net"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/client"
+ "github.com/aws/aws-sdk-go/aws/client/metadata"
+ "github.com/aws/aws-sdk-go/aws/csm"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/aws/session"
+ "github.com/aws/aws-sdk-go/aws/signer/v4"
+ "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
+)
+
+func startUDPServer(done chan struct{}, fn func([]byte)) (string, error) {
+ addr, err := net.ResolveUDPAddr("udp", "127.0.0.1:0")
+ if err != nil {
+ return "", err
+ }
+
+ conn, err := net.ListenUDP("udp", addr)
+ if err != nil {
+ return "", err
+ }
+
+ buf := make([]byte, 1024)
+ i := 0
+ go func() {
+ defer conn.Close()
+ for {
+ i++
+ select {
+ case <-done:
+ return
+ default:
+ }
+
+ n, _, err := conn.ReadFromUDP(buf)
+ fn(buf[:n])
+
+ if err != nil {
+ panic(err)
+ }
+ }
+ }()
+
+ return conn.LocalAddr().String(), nil
+}
+
+func TestReportingMetrics(t *testing.T) {
+ reporter := csm.Get()
+ if reporter == nil {
+ t.Errorf("expected non-nil reporter")
+ }
+
+ sess := session.New()
+ sess.Handlers.Clear()
+ reporter.InjectHandlers(&sess.Handlers)
+
+ md := metadata.ClientInfo{}
+ op := &request.Operation{}
+ r := request.New(*sess.Config, md, sess.Handlers, client.DefaultRetryer{NumMaxRetries: 0}, op, nil, nil)
+ sess.Handlers.Complete.Run(r)
+ m := <-csm.MetricsCh
+
+ for k, v := range m {
+ switch k {
+ case "Timestamp":
+ if _, ok := v.(float64); !ok {
+ t.Errorf("expected a float value, but received %T", v)
+ }
+ case "Type":
+ if e, a := "ApiCall", v.(string); e != a {
+ t.Errorf("expected %q, but received %q", e, a)
+ }
+ }
+ }
+}
+
+type mockService struct {
+ *client.Client
+}
+
+type input struct{}
+type output struct{}
+
+func (s *mockService) Request(i input) *request.Request {
+ op := &request.Operation{
+ Name: "foo",
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ o := output{}
+ req := s.NewRequest(op, &i, &o)
+ return req
+}
+
+func BenchmarkWithCSM(b *testing.B) {
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte(fmt.Sprintf("{}")))
+ }))
+
+ cfg := aws.Config{
+ Endpoint: aws.String(server.URL),
+ }
+
+ sess := session.New(&cfg)
+ r := csm.Get()
+
+ r.InjectHandlers(&sess.Handlers)
+
+ c := sess.ClientConfig("id", &cfg)
+
+ svc := mockService{
+ client.New(
+ *c.Config,
+ metadata.ClientInfo{
+ ServiceName: "service",
+ ServiceID: "id",
+ SigningName: "signing",
+ SigningRegion: "region",
+ Endpoint: server.URL,
+ APIVersion: "0",
+ JSONVersion: "1.1",
+ TargetPrefix: "prefix",
+ },
+ c.Handlers,
+ ),
+ }
+
+ svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
+ svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
+ svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
+ svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
+ svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
+
+ for i := 0; i < b.N; i++ {
+ req := svc.Request(input{})
+ req.Send()
+ }
+}
+
+func BenchmarkWithCSMNoUDPConnection(b *testing.B) {
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte(fmt.Sprintf("{}")))
+ }))
+
+ cfg := aws.Config{
+ Endpoint: aws.String(server.URL),
+ }
+
+ sess := session.New(&cfg)
+ r := csm.Get()
+ r.Pause()
+ r.InjectHandlers(&sess.Handlers)
+ defer r.Pause()
+
+ c := sess.ClientConfig("id", &cfg)
+
+ svc := mockService{
+ client.New(
+ *c.Config,
+ metadata.ClientInfo{
+ ServiceName: "service",
+ ServiceID: "id",
+ SigningName: "signing",
+ SigningRegion: "region",
+ Endpoint: server.URL,
+ APIVersion: "0",
+ JSONVersion: "1.1",
+ TargetPrefix: "prefix",
+ },
+ c.Handlers,
+ ),
+ }
+
+ svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
+ svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
+ svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
+ svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
+ svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
+
+ for i := 0; i < b.N; i++ {
+ req := svc.Request(input{})
+ req.Send()
+ }
+}
+
+func BenchmarkWithoutCSM(b *testing.B) {
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte(fmt.Sprintf("{}")))
+ }))
+
+ cfg := aws.Config{
+ Endpoint: aws.String(server.URL),
+ }
+ sess := session.New(&cfg)
+ c := sess.ClientConfig("id", &cfg)
+
+ svc := mockService{
+ client.New(
+ *c.Config,
+ metadata.ClientInfo{
+ ServiceName: "service",
+ ServiceID: "id",
+ SigningName: "signing",
+ SigningRegion: "region",
+ Endpoint: server.URL,
+ APIVersion: "0",
+ JSONVersion: "1.1",
+ TargetPrefix: "prefix",
+ },
+ c.Handlers,
+ ),
+ }
+
+ svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
+ svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
+ svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
+ svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
+ svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
+
+ for i := 0; i < b.N; i++ {
+ req := svc.Request(input{})
+ req.Send()
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
index 07afe3b..3cf1036 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
@@ -9,6 +9,7 @@ package defaults
import (
"fmt"
+ "net"
"net/http"
"net/url"
"os"
@@ -72,6 +73,7 @@ func Handlers() request.Handlers {
handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
handlers.Validate.AfterEachFn = request.HandlerListStopOnError
handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler)
+ handlers.Build.PushBackNamed(corehandlers.AddHostExecEnvUserAgentHander)
handlers.Build.AfterEachFn = request.HandlerListStopOnError
handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler)
handlers.Send.PushBackNamed(corehandlers.ValidateReqSigHandler)
@@ -118,14 +120,43 @@ func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.P
return ec2RoleProvider(cfg, handlers)
}
+var lookupHostFn = net.LookupHost
+
+func isLoopbackHost(host string) (bool, error) {
+ ip := net.ParseIP(host)
+ if ip != nil {
+ return ip.IsLoopback(), nil
+ }
+
+ // Host is not an ip, perform lookup
+ addrs, err := lookupHostFn(host)
+ if err != nil {
+ return false, err
+ }
+ for _, addr := range addrs {
+ if !net.ParseIP(addr).IsLoopback() {
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
var errMsg string
parsed, err := url.Parse(u)
if err != nil {
errMsg = fmt.Sprintf("invalid URL, %v", err)
- } else if host := aws.URLHostname(parsed); !(host == "localhost" || host == "127.0.0.1") {
- errMsg = fmt.Sprintf("invalid host address, %q, only localhost and 127.0.0.1 are valid.", host)
+ } else {
+ host := aws.URLHostname(parsed)
+ if len(host) == 0 {
+ errMsg = "unable to parse host from local HTTP cred provider URL"
+ } else if isLoopback, loopbackErr := isLoopbackHost(host); loopbackErr != nil {
+ errMsg = fmt.Sprintf("failed to resolve host %q, %v", host, loopbackErr)
+ } else if !isLoopback {
+ errMsg = fmt.Sprintf("invalid endpoint host, %q, only loopback hosts are allowed.", host)
+ }
}
if len(errMsg) > 0 {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go
index d3e4a86..cb06468 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults_test.go
@@ -13,12 +13,40 @@ import (
)
func TestHTTPCredProvider(t *testing.T) {
+ origFn := lookupHostFn
+ defer func() { lookupHostFn = origFn }()
+
+ lookupHostFn = func(host string) ([]string, error) {
+ m := map[string]struct {
+ Addrs []string
+ Err error
+ }{
+ "localhost": {Addrs: []string{"::1", "127.0.0.1"}},
+ "actuallylocal": {Addrs: []string{"127.0.0.2"}},
+ "notlocal": {Addrs: []string{"::1", "127.0.0.1", "192.168.1.10"}},
+ "www.example.com": {Addrs: []string{"10.10.10.10"}},
+ }
+
+ h, ok := m[host]
+ if !ok {
+ t.Fatalf("unknown host in test, %v", host)
+ return nil, fmt.Errorf("unknown host")
+ }
+
+ return h.Addrs, h.Err
+ }
+
cases := []struct {
Host string
Fail bool
}{
- {"localhost", false}, {"127.0.0.1", false},
- {"www.example.com", true}, {"169.254.170.2", true},
+ {"localhost", false},
+ {"actuallylocal", false},
+ {"127.0.0.1", false},
+ {"127.1.1.1", false},
+ {"[::1]", false},
+ {"www.example.com", true},
+ {"169.254.170.2", true},
}
defer os.Clearenv()
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
new file mode 100644
index 0000000..ca0ee1d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
@@ -0,0 +1,27 @@
+package defaults
+
+import (
+ "github.com/aws/aws-sdk-go/internal/shareddefaults"
+)
+
+// SharedCredentialsFilename returns the SDK's default file path
+// for the shared credentials file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/credentials
+// - Windows: %USERPROFILE%\.aws\credentials
+func SharedCredentialsFilename() string {
+ return shareddefaults.SharedCredentialsFilename()
+}
+
+// SharedConfigFilename returns the SDK's default file path for
+// the shared config file.
+//
+// Builds the shared config file path based on the OS's platform.
+//
+// - Linux/Unix: $HOME/.aws/config
+// - Windows: %USERPROFILE%\.aws\config
+func SharedConfigFilename() string {
+ return shareddefaults.SharedConfigFilename()
+}
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 0000000..4fcb616
--- /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/ec2metadata/api_test.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go
index 35e7578..7dde1fb 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api_test.go
@@ -11,8 +11,6 @@ import (
"strings"
"testing"
- "github.com/stretchr/testify/assert"
-
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
@@ -71,8 +69,12 @@ func TestEndpoint(t *testing.T) {
}
req := c.NewRequest(op, nil, nil)
- assert.Equal(t, "http://169.254.169.254/latest", req.ClientInfo.Endpoint)
- assert.Equal(t, "http://169.254.169.254/latest/meta-data/testpath", req.HTTPRequest.URL.String())
+ if e, a := "http://169.254.169.254/latest", req.ClientInfo.Endpoint; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "http://169.254.169.254/latest/meta-data/testpath", req.HTTPRequest.URL.String(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestGetMetadata(t *testing.T) {
@@ -85,8 +87,12 @@ func TestGetMetadata(t *testing.T) {
resp, err := c.GetMetadata("some/path")
- assert.NoError(t, err)
- assert.Equal(t, "success", resp)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
+ if e, a := "success", resp; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestGetUserData(t *testing.T) {
@@ -99,8 +105,12 @@ func TestGetUserData(t *testing.T) {
resp, err := c.GetUserData()
- assert.NoError(t, err)
- assert.Equal(t, "success", resp)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
+ if e, a := "success", resp; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestGetUserData_Error(t *testing.T) {
@@ -126,12 +136,17 @@ func TestGetUserData_Error(t *testing.T) {
c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
resp, err := c.GetUserData()
- assert.Error(t, err)
- assert.Empty(t, resp)
+ if err == nil {
+ t.Errorf("expect error")
+ }
+ if len(resp) != 0 {
+ t.Errorf("expect empty, got %v", resp)
+ }
- aerr, ok := err.(awserr.Error)
- assert.True(t, ok)
- assert.Equal(t, "NotFoundError", aerr.Code())
+ aerr := err.(awserr.Error)
+ if e, a := "NotFoundError", aerr.Code(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestGetRegion(t *testing.T) {
@@ -144,8 +159,12 @@ func TestGetRegion(t *testing.T) {
region, err := c.Region()
- assert.NoError(t, err)
- assert.Equal(t, "us-west-2", region)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
+ if e, a := "us-west-2", region; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestMetadataAvailable(t *testing.T) {
@@ -156,9 +175,9 @@ func TestMetadataAvailable(t *testing.T) {
defer server.Close()
c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
- available := c.Available()
-
- assert.True(t, available)
+ if !c.Available() {
+ t.Errorf("expect available")
+ }
}
func TestMetadataIAMInfo_success(t *testing.T) {
@@ -170,10 +189,18 @@ func TestMetadataIAMInfo_success(t *testing.T) {
c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
iamInfo, err := c.IAMInfo()
- assert.NoError(t, err)
- assert.Equal(t, "Success", iamInfo.Code)
- assert.Equal(t, "arn:aws:iam::123456789012:instance-profile/my-instance-profile", iamInfo.InstanceProfileArn)
- assert.Equal(t, "AIPAABCDEFGHIJKLMN123", iamInfo.InstanceProfileID)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
+ if e, a := "Success", iamInfo.Code; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "arn:aws:iam::123456789012:instance-profile/my-instance-profile", iamInfo.InstanceProfileArn; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "AIPAABCDEFGHIJKLMN123", iamInfo.InstanceProfileID; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestMetadataIAMInfo_failure(t *testing.T) {
@@ -185,10 +212,18 @@ func TestMetadataIAMInfo_failure(t *testing.T) {
c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
iamInfo, err := c.IAMInfo()
- assert.NotNil(t, err)
- assert.Equal(t, "", iamInfo.Code)
- assert.Equal(t, "", iamInfo.InstanceProfileArn)
- assert.Equal(t, "", iamInfo.InstanceProfileID)
+ if err == nil {
+ t.Errorf("expect error")
+ }
+ if e, a := "", iamInfo.Code; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "", iamInfo.InstanceProfileArn; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "", iamInfo.InstanceProfileID; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestMetadataNotAvailable(t *testing.T) {
@@ -204,9 +239,9 @@ func TestMetadataNotAvailable(t *testing.T) {
r.Retryable = aws.Bool(true) // network errors are retryable
})
- available := c.Available()
-
- assert.False(t, available)
+ if c.Available() {
+ t.Errorf("expect not available")
+ }
}
func TestMetadataErrorResponse(t *testing.T) {
@@ -222,8 +257,12 @@ func TestMetadataErrorResponse(t *testing.T) {
})
data, err := c.GetMetadata("uri/path")
- assert.Empty(t, data)
- assert.Contains(t, err.Error(), "error message text")
+ if len(data) != 0 {
+ t.Errorf("expect empty, got %v", data)
+ }
+ if e, a := "error message text", err.Error(); !strings.Contains(a, e) {
+ t.Errorf("expect %v to be in %v", e, a)
+ }
}
func TestEC2RoleProviderInstanceIdentity(t *testing.T) {
@@ -235,8 +274,16 @@ func TestEC2RoleProviderInstanceIdentity(t *testing.T) {
c := ec2metadata.New(unit.Session, &aws.Config{Endpoint: aws.String(server.URL + "/latest")})
doc, err := c.GetInstanceIdentityDocument()
- assert.Nil(t, err, "Expect no error, %v", err)
- assert.Equal(t, doc.AccountID, "123456789012")
- assert.Equal(t, doc.AvailabilityZone, "us-east-1d")
- assert.Equal(t, doc.Region, "us-east-1")
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
+ if e, a := doc.AccountID, "123456789012"; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := doc.AvailabilityZone, "us-east-1d"; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := doc.Region, "us-east-1"; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
index 5b4379d..ef5f732 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
@@ -1,5 +1,10 @@
// Package ec2metadata provides the client for making API calls to the
// EC2 Metadata service.
+//
+// This package's client can be disabled completely by setting the environment
+// variable "AWS_EC2_METADATA_DISABLED=true". This environment variable set to
+// true instructs the SDK to disable the EC2 Metadata client. The client cannot
+// be used while the environemnt variable is set to true, (case insensitive).
package ec2metadata
import (
@@ -7,17 +12,21 @@ import (
"errors"
"io"
"net/http"
+ "os"
+ "strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
+ "github.com/aws/aws-sdk-go/aws/corehandlers"
"github.com/aws/aws-sdk-go/aws/request"
)
// ServiceName is the name of the service.
const ServiceName = "ec2metadata"
+const disableServiceEnvVar = "AWS_EC2_METADATA_DISABLED"
// A EC2Metadata is an EC2 Metadata service Client.
type EC2Metadata struct {
@@ -75,6 +84,21 @@ func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
svc.Handlers.Validate.Clear()
svc.Handlers.Validate.PushBack(validateEndpointHandler)
+ // Disable the EC2 Metadata service if the environment variable is set.
+ // This shortcirctes the service's functionality to always fail to send
+ // requests.
+ if strings.ToLower(os.Getenv(disableServiceEnvVar)) == "true" {
+ svc.Handlers.Send.SwapNamed(request.NamedHandler{
+ Name: corehandlers.SendHandler.Name,
+ Fn: func(r *request.Request) {
+ r.Error = awserr.New(
+ request.CanceledErrorCode,
+ "EC2 IMDS access disabled via "+disableServiceEnvVar+" env var",
+ nil)
+ },
+ })
+ }
+
// Add additional options to the service config
for _, option := range opts {
option(svc.Client)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go
index c2bc215..6902e0b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service_test.go
@@ -3,21 +3,30 @@ package ec2metadata_test
import (
"net/http"
"net/http/httptest"
+ "os"
+ "strings"
"sync"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/awstesting"
"github.com/aws/aws-sdk-go/awstesting/unit"
- "github.com/stretchr/testify/assert"
)
func TestClientOverrideDefaultHTTPClientTimeout(t *testing.T) {
svc := ec2metadata.New(unit.Session)
- assert.NotEqual(t, http.DefaultClient, svc.Config.HTTPClient)
- assert.Equal(t, 5*time.Second, svc.Config.HTTPClient.Timeout)
+ if e, a := http.DefaultClient, svc.Config.HTTPClient; e == a {
+ t.Errorf("expect %v, not to equal %v", e, a)
+ }
+
+ if e, a := 5*time.Second, svc.Config.HTTPClient.Timeout; e != a {
+ t.Errorf("expect %v to be %v", e, a)
+ }
}
func TestClientNotOverrideDefaultHTTPClientTimeout(t *testing.T) {
@@ -28,18 +37,25 @@ func TestClientNotOverrideDefaultHTTPClientTimeout(t *testing.T) {
svc := ec2metadata.New(unit.Session)
- assert.Equal(t, http.DefaultClient, svc.Config.HTTPClient)
+ if e, a := http.DefaultClient, svc.Config.HTTPClient; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
- tr, ok := svc.Config.HTTPClient.Transport.(*http.Transport)
- assert.True(t, ok)
- assert.NotNil(t, tr)
- assert.Nil(t, tr.Dial)
+ tr := svc.Config.HTTPClient.Transport.(*http.Transport)
+ if tr == nil {
+ t.Fatalf("expect transport not to be nil")
+ }
+ if tr.Dial != nil {
+ t.Errorf("expect dial to be nil, was not")
+ }
}
func TestClientDisableOverrideDefaultHTTPClientTimeout(t *testing.T) {
svc := ec2metadata.New(unit.Session, aws.NewConfig().WithEC2MetadataDisableTimeoutOverride(true))
- assert.Equal(t, http.DefaultClient, svc.Config.HTTPClient)
+ if e, a := http.DefaultClient, svc.Config.HTTPClient; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestClientOverrideDefaultHTTPClientTimeoutRace(t *testing.T) {
@@ -63,6 +79,30 @@ func TestClientOverrideDefaultHTTPClientTimeoutRaceWithTransport(t *testing.T) {
runEC2MetadataClients(t, cfg, 100)
}
+func TestClientDisableIMDS(t *testing.T) {
+ env := awstesting.StashEnv()
+ defer awstesting.PopEnv(env)
+
+ os.Setenv("AWS_EC2_METADATA_DISABLED", "true")
+
+ svc := ec2metadata.New(unit.Session)
+ resp, err := svc.Region()
+ if err == nil {
+ t.Fatalf("expect error, got none")
+ }
+ if len(resp) != 0 {
+ t.Errorf("expect no response, got %v", resp)
+ }
+
+ aerr := err.(awserr.Error)
+ if e, a := request.CanceledErrorCode, aerr.Code(); e != a {
+ t.Errorf("expect %v error code, got %v", e, a)
+ }
+ if e, a := "AWS_EC2_METADATA_DISABLED", aerr.Message(); !strings.Contains(a, e) {
+ t.Errorf("expect %v in error message, got %v", e, a)
+ }
+}
+
func runEC2MetadataClients(t *testing.T, cfg *aws.Config, atOnce int) {
var wg sync.WaitGroup
wg.Add(atOnce)
@@ -70,7 +110,9 @@ func runEC2MetadataClients(t *testing.T, cfg *aws.Config, atOnce int) {
go func() {
svc := ec2metadata.New(unit.Session, cfg)
_, err := svc.Region()
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
wg.Done()
}()
}
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 90558c4..c304327 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
@@ -24,6 +24,7 @@ const (
EuCentral1RegionID = "eu-central-1" // EU (Frankfurt).
EuWest1RegionID = "eu-west-1" // EU (Ireland).
EuWest2RegionID = "eu-west-2" // EU (London).
+ EuWest3RegionID = "eu-west-3" // EU (Paris).
SaEast1RegionID = "sa-east-1" // South America (Sao Paulo).
UsEast1RegionID = "us-east-1" // US East (N. Virginia).
UsEast2RegionID = "us-east-2" // US East (Ohio).
@@ -33,7 +34,8 @@ const (
// AWS China partition's regions.
const (
- CnNorth1RegionID = "cn-north-1" // China (Beijing).
+ CnNorth1RegionID = "cn-north-1" // China (Beijing).
+ CnNorthwest1RegionID = "cn-northwest-1" // China (Ningxia).
)
// AWS GovCloud (US) partition's regions.
@@ -43,29 +45,41 @@ const (
// Service identifiers
const (
+ A4bServiceID = "a4b" // A4b.
AcmServiceID = "acm" // Acm.
+ AcmPcaServiceID = "acm-pca" // AcmPca.
+ ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor.
+ ApiPricingServiceID = "api.pricing" // ApiPricing.
ApigatewayServiceID = "apigateway" // Apigateway.
ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling.
Appstream2ServiceID = "appstream2" // Appstream2.
+ AthenaServiceID = "athena" // Athena.
AutoscalingServiceID = "autoscaling" // Autoscaling.
+ AutoscalingPlansServiceID = "autoscaling-plans" // AutoscalingPlans.
BatchServiceID = "batch" // Batch.
BudgetsServiceID = "budgets" // Budgets.
+ CeServiceID = "ce" // Ce.
+ Cloud9ServiceID = "cloud9" // Cloud9.
ClouddirectoryServiceID = "clouddirectory" // Clouddirectory.
CloudformationServiceID = "cloudformation" // Cloudformation.
CloudfrontServiceID = "cloudfront" // Cloudfront.
CloudhsmServiceID = "cloudhsm" // Cloudhsm.
+ Cloudhsmv2ServiceID = "cloudhsmv2" // Cloudhsmv2.
CloudsearchServiceID = "cloudsearch" // Cloudsearch.
CloudtrailServiceID = "cloudtrail" // Cloudtrail.
CodebuildServiceID = "codebuild" // Codebuild.
CodecommitServiceID = "codecommit" // Codecommit.
CodedeployServiceID = "codedeploy" // Codedeploy.
CodepipelineServiceID = "codepipeline" // Codepipeline.
+ CodestarServiceID = "codestar" // Codestar.
CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity.
CognitoIdpServiceID = "cognito-idp" // CognitoIdp.
CognitoSyncServiceID = "cognito-sync" // CognitoSync.
+ ComprehendServiceID = "comprehend" // Comprehend.
ConfigServiceID = "config" // Config.
CurServiceID = "cur" // Cur.
DatapipelineServiceID = "datapipeline" // Datapipeline.
+ DaxServiceID = "dax" // Dax.
DevicefarmServiceID = "devicefarm" // Devicefarm.
DirectconnectServiceID = "directconnect" // Directconnect.
DiscoveryServiceID = "discovery" // Discovery.
@@ -83,11 +97,16 @@ const (
ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce.
ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder.
EmailServiceID = "email" // Email.
+ EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace.
EsServiceID = "es" // Es.
EventsServiceID = "events" // Events.
FirehoseServiceID = "firehose" // Firehose.
+ FmsServiceID = "fms" // Fms.
GameliftServiceID = "gamelift" // Gamelift.
GlacierServiceID = "glacier" // Glacier.
+ GlueServiceID = "glue" // Glue.
+ GreengrassServiceID = "greengrass" // Greengrass.
+ GuarddutyServiceID = "guardduty" // Guardduty.
HealthServiceID = "health" // Health.
IamServiceID = "iam" // Iam.
ImportexportServiceID = "importexport" // Importexport.
@@ -95,17 +114,24 @@ const (
IotServiceID = "iot" // Iot.
KinesisServiceID = "kinesis" // Kinesis.
KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics.
+ KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo.
KmsServiceID = "kms" // Kms.
LambdaServiceID = "lambda" // Lambda.
LightsailServiceID = "lightsail" // Lightsail.
LogsServiceID = "logs" // Logs.
MachinelearningServiceID = "machinelearning" // Machinelearning.
MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics.
+ MediaconvertServiceID = "mediaconvert" // Mediaconvert.
+ MedialiveServiceID = "medialive" // Medialive.
+ MediapackageServiceID = "mediapackage" // Mediapackage.
+ MediastoreServiceID = "mediastore" // Mediastore.
MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace.
+ MghServiceID = "mgh" // Mgh.
MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics.
ModelsLexServiceID = "models.lex" // ModelsLex.
MonitoringServiceID = "monitoring" // Monitoring.
MturkRequesterServiceID = "mturk-requester" // MturkRequester.
+ NeptuneServiceID = "neptune" // Neptune.
OpsworksServiceID = "opsworks" // Opsworks.
OpsworksCmServiceID = "opsworks-cm" // OpsworksCm.
OrganizationsServiceID = "organizations" // Organizations.
@@ -114,12 +140,18 @@ const (
RdsServiceID = "rds" // Rds.
RedshiftServiceID = "redshift" // Redshift.
RekognitionServiceID = "rekognition" // Rekognition.
+ ResourceGroupsServiceID = "resource-groups" // ResourceGroups.
Route53ServiceID = "route53" // Route53.
Route53domainsServiceID = "route53domains" // Route53domains.
RuntimeLexServiceID = "runtime.lex" // RuntimeLex.
+ RuntimeSagemakerServiceID = "runtime.sagemaker" // RuntimeSagemaker.
S3ServiceID = "s3" // S3.
+ SagemakerServiceID = "sagemaker" // Sagemaker.
SdbServiceID = "sdb" // Sdb.
+ SecretsmanagerServiceID = "secretsmanager" // Secretsmanager.
+ ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo.
ServicecatalogServiceID = "servicecatalog" // Servicecatalog.
+ ServicediscoveryServiceID = "servicediscovery" // Servicediscovery.
ShieldServiceID = "shield" // Shield.
SmsServiceID = "sms" // Sms.
SnowballServiceID = "snowball" // Snowball.
@@ -133,9 +165,11 @@ const (
SupportServiceID = "support" // Support.
SwfServiceID = "swf" // Swf.
TaggingServiceID = "tagging" // Tagging.
+ TranslateServiceID = "translate" // Translate.
WafServiceID = "waf" // Waf.
WafRegionalServiceID = "waf-regional" // WafRegional.
WorkdocsServiceID = "workdocs" // Workdocs.
+ WorkmailServiceID = "workmail" // Workmail.
WorkspacesServiceID = "workspaces" // Workspaces.
XrayServiceID = "xray" // Xray.
)
@@ -213,6 +247,9 @@ var awsPartition = partition{
"eu-west-2": region{
Description: "EU (London)",
},
+ "eu-west-3": region{
+ Description: "EU (Paris)",
+ },
"sa-east-1": region{
Description: "South America (Sao Paulo)",
},
@@ -230,6 +267,12 @@ var awsPartition = partition{
},
},
Services: services{
+ "a4b": service{
+
+ Endpoints: endpoints{
+ "us-east-1": endpoint{},
+ },
+ },
"acm": service{
Endpoints: endpoints{
@@ -242,6 +285,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -249,6 +293,43 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "acm-pca": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "api.mediatailor": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ },
+ },
+ "api.pricing": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "pricing",
+ },
+ },
+ Endpoints: endpoints{
+ "ap-south-1": endpoint{},
+ "us-east-1": endpoint{},
+ },
+ },
"apigateway": service{
Endpoints: endpoints{
@@ -257,9 +338,12 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -284,6 +368,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -305,6 +390,19 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "athena": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"autoscaling": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
@@ -319,6 +417,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -326,10 +425,38 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "autoscaling-plans": service{
+ Defaults: endpoint{
+ Hostname: "autoscaling.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Service: "autoscaling-plans",
+ },
+ },
+ Endpoints: endpoints{
+ "ap-southeast-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"batch": service{
Endpoints: endpoints{
- "us-east-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"budgets": service{
@@ -345,11 +472,35 @@ var awsPartition = partition{
},
},
},
+ "ce": service{
+ PartitionEndpoint: "aws-global",
+ IsRegionalized: boxedFalse,
+
+ Endpoints: endpoints{
+ "aws-global": endpoint{
+ Hostname: "ce.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ },
+ },
+ "cloud9": service{
+
+ Endpoints: endpoints{
+ "ap-southeast-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"clouddirectory": service{
Endpoints: endpoints{
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
"us-east-1": endpoint{},
@@ -369,6 +520,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -405,6 +557,26 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "cloudhsmv2": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "cloudhsm",
+ },
+ },
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"cloudsearch": service{
Endpoints: endpoints{
@@ -432,6 +604,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -443,22 +616,64 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "us-east-1-fips": endpoint{
+ Hostname: "codebuild-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{},
+ "us-east-2-fips": endpoint{
+ Hostname: "codebuild-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-1": endpoint{},
+ "us-west-1-fips": endpoint{
+ Hostname: "codebuild-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "us-west-2": endpoint{},
+ "us-west-2-fips": endpoint{
+ Hostname: "codebuild-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
},
},
"codecommit": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"codedeploy": service{
@@ -473,6 +688,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -484,13 +700,36 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "codestar": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -499,6 +738,8 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
@@ -513,6 +754,8 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
@@ -527,6 +770,8 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
@@ -536,6 +781,17 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "comprehend": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"config": service{
Endpoints: endpoints{
@@ -548,6 +804,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -571,6 +828,21 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "dax": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"devicefarm": service{
Endpoints: endpoints{
@@ -589,6 +861,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -614,6 +887,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -625,11 +899,18 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -647,6 +928,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"local": endpoint{
Hostname: "localhost:8000",
Protocols: []string{"http"},
@@ -675,6 +957,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -697,12 +980,16 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -713,12 +1000,16 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -737,6 +1028,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -756,6 +1048,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -766,16 +1059,19 @@ var awsPartition = partition{
"elasticfilesystem": service{
Endpoints: endpoints{
+ "ap-northeast-2": endpoint{},
"ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
"elasticloadbalancing": service{
Defaults: endpoint{
- Protocols: []string{"http", "https"},
+ Protocols: []string{"https"},
},
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
@@ -787,6 +1083,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -811,6 +1108,7 @@ var awsPartition = partition{
},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{
SSLCommonName: "{service}.{region}.{dnsSuffix}",
@@ -841,6 +1139,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{
@@ -853,6 +1161,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -872,6 +1181,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -882,7 +1192,22 @@ var awsPartition = partition{
"firehose": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "fms": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
"us-east-1": endpoint{},
"us-west-2": endpoint{},
},
@@ -894,10 +1219,15 @@ var awsPartition = partition{
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -909,11 +1239,65 @@ var awsPartition = partition{
"ap-northeast-1": endpoint{},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "glue": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "greengrass": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "guardduty": service{
+ IsRegionalized: boxedTrue,
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -961,8 +1345,11 @@ var awsPartition = partition{
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -975,6 +1362,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{},
"eu-central-1": endpoint{},
@@ -997,6 +1385,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1012,6 +1401,16 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "kinesisvideo": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"kms": service{
Endpoints: endpoints{
@@ -1024,6 +1423,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1039,9 +1439,12 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -1051,7 +1454,19 @@ var awsPartition = partition{
"lightsail": service{
Endpoints: endpoints{
- "us-east-1": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"logs": service{
@@ -1066,6 +1481,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1086,6 +1502,63 @@ var awsPartition = partition{
"us-east-1": endpoint{},
},
},
+ "mediaconvert": service{
+
+ 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{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "medialive": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "mediapackage": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "mediastore": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"metering.marketplace": service{
Defaults: endpoint{
CredentialScope: credentialScope{
@@ -1102,6 +1575,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1109,6 +1583,12 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "mgh": service{
+
+ Endpoints: endpoints{
+ "us-west-2": endpoint{},
+ },
+ },
"mobileanalytics": service{
Endpoints: endpoints{
@@ -1122,7 +1602,9 @@ var awsPartition = partition{
},
},
Endpoints: endpoints{
+ "eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"monitoring": service{
@@ -1139,6 +1621,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1156,6 +1639,35 @@ var awsPartition = partition{
"us-east-1": endpoint{},
},
},
+ "neptune": service{
+
+ Endpoints: endpoints{
+ "eu-west-1": endpoint{
+ Hostname: "rds.eu-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "eu-west-1",
+ },
+ },
+ "us-east-1": endpoint{
+ Hostname: "rds.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{
+ Hostname: "rds.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-2": endpoint{
+ Hostname: "rds.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
+ },
+ },
"opsworks": service{
Endpoints: endpoints{
@@ -1164,9 +1676,11 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1177,9 +1691,15 @@ var awsPartition = partition{
"opsworks-cm": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"organizations": service{
@@ -1208,10 +1728,21 @@ var awsPartition = partition{
"polly": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"rds": service{
@@ -1226,6 +1757,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{
SSLCommonName: "{service}.{dnsSuffix}",
@@ -1247,6 +1779,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1257,9 +1790,31 @@ var awsPartition = partition{
"rekognition": service{
Endpoints: endpoints{
- "eu-west-1": endpoint{},
- "us-east-1": endpoint{},
- "us-west-2": endpoint{},
+ "ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "resource-groups": service{
+
+ 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{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"route53": service{
@@ -1288,7 +1843,19 @@ var awsPartition = partition{
},
},
Endpoints: endpoints{
+ "eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "runtime.sagemaker": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
},
},
"s3": service{
@@ -1303,26 +1870,27 @@ var awsPartition = partition{
},
Endpoints: endpoints{
"ap-northeast-1": endpoint{
- Hostname: "s3-ap-northeast-1.amazonaws.com",
+ Hostname: "s3.ap-northeast-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"ap-northeast-2": endpoint{},
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{
- Hostname: "s3-ap-southeast-1.amazonaws.com",
+ Hostname: "s3.ap-southeast-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"ap-southeast-2": endpoint{
- Hostname: "s3-ap-southeast-2.amazonaws.com",
+ Hostname: "s3.ap-southeast-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{
- Hostname: "s3-eu-west-1.amazonaws.com",
+ Hostname: "s3.eu-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"s3-external-1": endpoint{
Hostname: "s3-external-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
@@ -1331,7 +1899,7 @@ var awsPartition = partition{
},
},
"sa-east-1": endpoint{
- Hostname: "s3-sa-east-1.amazonaws.com",
+ Hostname: "s3.sa-east-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"us-east-1": endpoint{
@@ -1340,15 +1908,25 @@ var awsPartition = partition{
},
"us-east-2": endpoint{},
"us-west-1": endpoint{
- Hostname: "s3-us-west-1.amazonaws.com",
+ Hostname: "s3.us-west-1.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
"us-west-2": endpoint{
- Hostname: "s3-us-west-2.amazonaws.com",
+ Hostname: "s3.us-west-2.amazonaws.com",
SignatureVersions: []string{"s3", "s3v4"},
},
},
},
+ "sagemaker": service{
+
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"sdb": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
@@ -1367,21 +1945,103 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "secretsmanager": service{
+
+ 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{},
+ "eu-central-1": endpoint{},
+ "eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
+ "serverlessrepo": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "ap-northeast-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "ap-northeast-2": endpoint{
+ Protocols: []string{"https"},
+ },
+ "ap-south-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "ap-southeast-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "ap-southeast-2": endpoint{
+ Protocols: []string{"https"},
+ },
+ "ca-central-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "eu-central-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "eu-west-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "eu-west-2": endpoint{
+ Protocols: []string{"https"},
+ },
+ "sa-east-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "us-east-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "us-east-2": endpoint{
+ Protocols: []string{"https"},
+ },
+ "us-west-1": endpoint{
+ Protocols: []string{"https"},
+ },
+ "us-west-2": endpoint{
+ Protocols: []string{"https"},
+ },
+ },
+ },
"servicecatalog": service{
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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
+ "servicediscovery": service{
+
+ Endpoints: endpoints{
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"shield": service{
IsRegionalized: boxedFalse,
Defaults: endpoint{
@@ -1395,19 +2055,36 @@ var awsPartition = partition{
"sms": service{
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{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
+ "us-west-2": endpoint{},
},
},
"snowball": service{
Endpoints: endpoints{
+ "ap-northeast-1": endpoint{},
"ap-south-1": endpoint{},
+ "ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
"us-west-1": endpoint{},
@@ -1428,6 +2105,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1450,6 +2128,11 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
+ "fips-us-east-1": endpoint{},
+ "fips-us-east-2": endpoint{},
+ "fips-us-west-1": endpoint{},
+ "fips-us-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{
SSLCommonName: "queue.{dnsSuffix}",
@@ -1464,10 +2147,14 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1479,10 +2166,16 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
+ "ap-southeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -1491,12 +2184,14 @@ 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{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1506,7 +2201,7 @@ var awsPartition = partition{
},
"streams.dynamodb": service{
Defaults: endpoint{
- Protocols: []string{"http", "http", "https", "https"},
+ Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "dynamodb",
},
@@ -1521,6 +2216,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"local": endpoint{
Hostname: "localhost:8000",
Protocols: []string{"http"},
@@ -1559,11 +2255,36 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
- "us-east-2": endpoint{},
- "us-west-1": endpoint{},
- "us-west-2": endpoint{},
+ "us-east-1-fips": endpoint{
+ Hostname: "sts-fips.us-east-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-1",
+ },
+ },
+ "us-east-2": endpoint{},
+ "us-east-2-fips": endpoint{
+ Hostname: "sts-fips.us-east-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-east-2",
+ },
+ },
+ "us-west-1": endpoint{},
+ "us-west-1-fips": endpoint{
+ Hostname: "sts-fips.us-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-1",
+ },
+ },
+ "us-west-2": endpoint{},
+ "us-west-2-fips": endpoint{
+ Hostname: "sts-fips.us-west-2.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-west-2",
+ },
+ },
},
},
"support": service{
@@ -1584,6 +2305,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1603,6 +2325,7 @@ var awsPartition = partition{
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"eu-west-2": endpoint{},
+ "eu-west-3": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1610,6 +2333,17 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "translate": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"waf": service{
PartitionEndpoint: "aws-global",
IsRegionalized: boxedFalse,
@@ -1627,8 +2361,12 @@ var awsPartition = partition{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-southeast-2": endpoint{},
+ "eu-central-1": endpoint{},
"eu-west-1": endpoint{},
"us-east-1": endpoint{},
+ "us-east-2": endpoint{},
+ "us-west-1": endpoint{},
"us-west-2": endpoint{},
},
},
@@ -1643,14 +2381,28 @@ var awsPartition = partition{
"us-west-2": endpoint{},
},
},
+ "workmail": service{
+ Defaults: endpoint{
+ Protocols: []string{"https"},
+ },
+ Endpoints: endpoints{
+ "eu-west-1": endpoint{},
+ "us-east-1": endpoint{},
+ "us-west-2": endpoint{},
+ },
+ },
"workspaces": service{
Endpoints: endpoints{
"ap-northeast-1": endpoint{},
+ "ap-northeast-2": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
+ "sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-west-2": endpoint{},
},
@@ -1663,8 +2415,10 @@ var awsPartition = partition{
"ap-south-1": endpoint{},
"ap-southeast-1": endpoint{},
"ap-southeast-2": endpoint{},
+ "ca-central-1": endpoint{},
"eu-central-1": endpoint{},
"eu-west-1": endpoint{},
+ "eu-west-2": endpoint{},
"sa-east-1": endpoint{},
"us-east-1": endpoint{},
"us-east-2": endpoint{},
@@ -1699,30 +2453,62 @@ var awscnPartition = partition{
"cn-north-1": region{
Description: "China (Beijing)",
},
+ "cn-northwest-1": region{
+ Description: "China (Ningxia)",
+ },
},
Services: services{
+ "apigateway": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
+ "application-autoscaling": service{
+ Defaults: endpoint{
+ Hostname: "autoscaling.{region}.amazonaws.com",
+ Protocols: []string{"http", "https"},
+ CredentialScope: credentialScope{
+ Service: "application-autoscaling",
+ },
+ },
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"autoscaling": service{
Defaults: endpoint{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"cloudformation": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"cloudtrail": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"codedeploy": service{
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "cognito-identity": service{
+
Endpoints: endpoints{
"cn-north-1": endpoint{},
},
@@ -1730,13 +2516,15 @@ var awscnPartition = partition{
"config": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"directconnect": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"dynamodb": service{
@@ -1744,7 +2532,8 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"ec2": service{
@@ -1752,7 +2541,8 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"ec2metadata": service{
@@ -1766,24 +2556,41 @@ var awscnPartition = partition{
},
},
},
+ "ecr": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "ecs": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
"elasticache": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"elasticbeanstalk": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"elasticloadbalancing": service{
Defaults: endpoint{
- Protocols: []string{"http", "https"},
+ Protocols: []string{"https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"elasticmapreduce": service{
@@ -1791,13 +2598,21 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "es": service{
+
+ Endpoints: endpoints{
+ "cn-northwest-1": endpoint{},
},
},
"events": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"glacier": service{
@@ -1805,7 +2620,8 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"iam": service{
@@ -1821,8 +2637,25 @@ var awscnPartition = partition{
},
},
},
+ "iot": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "execute-api",
+ },
+ },
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ },
+ },
"kinesis": service{
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "lambda": service{
+
Endpoints: endpoints{
"cn-north-1": endpoint{},
},
@@ -1830,7 +2663,8 @@ var awscnPartition = partition{
"logs": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"monitoring": service{
@@ -1838,19 +2672,22 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"rds": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"redshift": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"s3": service{
@@ -1858,6 +2695,20 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
SignatureVersions: []string{"s3v4"},
},
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "sms": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "snowball": service{
+
Endpoints: endpoints{
"cn-north-1": endpoint{},
},
@@ -1867,7 +2718,8 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"sqs": service{
@@ -1876,7 +2728,15 @@ var awscnPartition = partition{
Protocols: []string{"http", "https"},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
+ },
+ },
+ "ssm": service{
+
+ Endpoints: endpoints{
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"storagegateway": service{
@@ -1887,31 +2747,35 @@ var awscnPartition = partition{
},
"streams.dynamodb": service{
Defaults: endpoint{
- Protocols: []string{"http", "http", "https", "https"},
+ Protocols: []string{"http", "https"},
CredentialScope: credentialScope{
Service: "dynamodb",
},
},
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"sts": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"swf": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
"tagging": service{
Endpoints: endpoints{
- "cn-north-1": endpoint{},
+ "cn-north-1": endpoint{},
+ "cn-northwest-1": endpoint{},
},
},
},
@@ -1943,6 +2807,18 @@ var awsusgovPartition = partition{
},
},
Services: services{
+ "acm": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "apigateway": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"autoscaling": service{
Endpoints: endpoints{
@@ -1963,12 +2839,28 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "cloudhsmv2": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "cloudhsm",
+ },
+ },
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"cloudtrail": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
},
+ "codedeploy": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"config": service{
Endpoints: endpoints{
@@ -1981,10 +2873,22 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "dms": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"dynamodb": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
+ "us-gov-west-1-fips": endpoint{
+ Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"ec2": service{
@@ -2004,12 +2908,30 @@ var awsusgovPartition = partition{
},
},
},
+ "ecr": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "ecs": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"elasticache": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
},
+ "elasticbeanstalk": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"elasticloadbalancing": service{
Endpoints: endpoints{
@@ -2026,6 +2948,18 @@ var awsusgovPartition = partition{
},
},
},
+ "es": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "events": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"glacier": service{
Endpoints: endpoints{
@@ -2059,18 +2993,40 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "lambda": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"logs": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
},
+ "metering.marketplace": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "aws-marketplace",
+ },
+ },
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"monitoring": service{
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
},
+ "polly": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"rds": service{
Endpoints: endpoints{
@@ -2083,6 +3039,12 @@ var awsusgovPartition = partition{
"us-gov-west-1": endpoint{},
},
},
+ "rekognition": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"s3": service{
Defaults: endpoint{
SignatureVersions: []string{"s3", "s3v4"},
@@ -2095,11 +3057,17 @@ var awsusgovPartition = partition{
},
},
"us-gov-west-1": endpoint{
- Hostname: "s3-us-gov-west-1.amazonaws.com",
+ Hostname: "s3.us-gov-west-1.amazonaws.com",
Protocols: []string{"http", "https"},
},
},
},
+ "sms": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"snowball": service{
Endpoints: endpoints{
@@ -2123,6 +3091,18 @@ var awsusgovPartition = partition{
},
},
},
+ "ssm": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "storagegateway": service{
+
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
"streams.dynamodb": service{
Defaults: endpoint{
CredentialScope: credentialScope{
@@ -2131,6 +3111,12 @@ var awsusgovPartition = partition{
},
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
+ "us-gov-west-1-fips": endpoint{
+ Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
+ CredentialScope: credentialScope{
+ Region: "us-gov-west-1",
+ },
+ },
},
},
"sts": service{
@@ -2141,6 +3127,12 @@ var awsusgovPartition = partition{
},
"swf": service{
+ Endpoints: endpoints{
+ "us-gov-west-1": endpoint{},
+ },
+ },
+ "tagging": service{
+
Endpoints: endpoints{
"us-gov-west-1": endpoint{},
},
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
index a0e9bc4..84316b9 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
@@ -21,12 +21,12 @@
// partitions := resolver.(endpoints.EnumPartitions).Partitions()
//
// for _, p := range partitions {
-// fmt.Println("Regions for", p.Name)
+// fmt.Println("Regions for", p.ID())
// for id, _ := range p.Regions() {
// fmt.Println("*", id)
// }
//
-// fmt.Println("Services for", p.Name)
+// fmt.Println("Services for", p.ID())
// for id, _ := range p.Services() {
// fmt.Println("*", id)
// }
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 9c3eedb..e29c095 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
@@ -206,10 +206,11 @@ func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (
// enumerating over the regions in a partition.
func (p Partition) Regions() map[string]Region {
rs := map[string]Region{}
- for id := range p.p.Regions {
+ for id, r := range p.p.Regions {
rs[id] = Region{
- id: id,
- p: p.p,
+ id: id,
+ desc: r.Description,
+ p: p.p,
}
}
@@ -240,6 +241,10 @@ type Region struct {
// ID returns the region's identifier.
func (r Region) ID() string { return r.id }
+// Description returns the region's description. The region description
+// is free text, it can be empty, and it may change between SDK releases.
+func (r Region) Description() string { return r.desc }
+
// ResolveEndpoint resolves an endpoint from the context of the region given
// a service. See Partition.EndpointFor for usage and errors that can be returned.
func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) {
@@ -284,10 +289,11 @@ func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (Resolve
func (s Service) Regions() map[string]Region {
rs := map[string]Region{}
for id := range s.p.Services[s.id].Endpoints {
- if _, ok := s.p.Regions[id]; ok {
+ if r, ok := s.p.Regions[id]; ok {
rs[id] = Region{
- id: id,
- p: s.p,
+ id: id,
+ desc: r.Description,
+ p: s.p,
}
}
}
@@ -347,6 +353,10 @@ type ResolvedEndpoint struct {
// The service name that should be used for signing requests.
SigningName string
+ // States that the signing name for this endpoint was derived from metadata
+ // passed in, but was not explicitly modeled.
+ SigningNameDerived bool
+
// The signing method that should be used for signing requests.
SigningMethod string
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints_test.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints_test.go
index 9c0e09d..de0e530 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints_test.go
@@ -65,6 +65,10 @@ func TestEnumRegionServices(t *testing.T) {
t.Errorf("expect %q region ID, got %q", e, a)
}
+ if a, e := r.Description(), "region description"; a != e {
+ t.Errorf("expect %q region Description, got %q", e, a)
+ }
+
ss := r.Services()
if a, e := len(ss), 1; a != e {
t.Errorf("expect %d services for us-east-1, got %d", e, a)
@@ -291,6 +295,9 @@ func TestRegionsForService(t *testing.T) {
if _, ok := expect[id]; !ok {
t.Errorf("expect %s region to be found", id)
}
+ if a, e := r.Description(), expect[id].desc; a != e {
+ t.Errorf("expect %q region Description, got %q", e, a)
+ }
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
index 13d968a..ff6f76d 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
@@ -226,16 +226,20 @@ func (e endpoint) resolve(service, region, dnsSuffix string, defs []endpoint, op
if len(signingRegion) == 0 {
signingRegion = region
}
+
signingName := e.CredentialScope.Service
+ var signingNameDerived bool
if len(signingName) == 0 {
signingName = service
+ signingNameDerived = true
}
return ResolvedEndpoint{
- URL: u,
- SigningRegion: signingRegion,
- SigningName: signingName,
- SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner),
+ URL: u,
+ SigningRegion: signingRegion,
+ SigningName: signingName,
+ SigningNameDerived: signingNameDerived,
+ SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner),
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go
index 1385cb4..0b8b006 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_test.go
@@ -2,10 +2,9 @@ package endpoints
import (
"encoding/json"
+ "reflect"
"regexp"
"testing"
-
- "github.com/stretchr/testify/assert"
)
func TestUnmarshalRegionRegex(t *testing.T) {
@@ -16,12 +15,18 @@ func TestUnmarshalRegionRegex(t *testing.T) {
p := partition{}
err := json.Unmarshal(input, &p)
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
expectRegexp, err := regexp.Compile(`^(us|eu|ap|sa|ca)\-\w+\-\d+$`)
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
- assert.Equal(t, expectRegexp.String(), p.RegionRegex.Regexp.String())
+ if e, a := expectRegexp.String(), p.RegionRegex.Regexp.String(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestUnmarshalRegion(t *testing.T) {
@@ -37,16 +42,28 @@ func TestUnmarshalRegion(t *testing.T) {
rs := regions{}
err := json.Unmarshal(input, &rs)
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
- assert.Len(t, rs, 2)
+ if e, a := 2, len(rs); e != a {
+ t.Errorf("expect %v len, got %v", e, a)
+ }
r, ok := rs["aws-global"]
- assert.True(t, ok)
- assert.Equal(t, "AWS partition-global endpoint", r.Description)
+ if !ok {
+ t.Errorf("expect found, was not")
+ }
+ if e, a := "AWS partition-global endpoint", r.Description; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
r, ok = rs["us-east-1"]
- assert.True(t, ok)
- assert.Equal(t, "US East (N. Virginia)", r.Description)
+ if !ok {
+ t.Errorf("expect found, was not")
+ }
+ if e, a := "US East (N. Virginia)", r.Description; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestUnmarshalServices(t *testing.T) {
@@ -75,23 +92,45 @@ func TestUnmarshalServices(t *testing.T) {
ss := services{}
err := json.Unmarshal(input, &ss)
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
- assert.Len(t, ss, 3)
+ if e, a := 3, len(ss); e != a {
+ t.Errorf("expect %v len, got %v", e, a)
+ }
s, ok := ss["acm"]
- assert.True(t, ok)
- assert.Len(t, s.Endpoints, 1)
- assert.Equal(t, boxedBoolUnset, s.IsRegionalized)
+ if !ok {
+ t.Errorf("expect found, was not")
+ }
+ if e, a := 1, len(s.Endpoints); e != a {
+ t.Errorf("expect %v len, got %v", e, a)
+ }
+ if e, a := boxedBoolUnset, s.IsRegionalized; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
s, ok = ss["apigateway"]
- assert.True(t, ok)
- assert.Len(t, s.Endpoints, 2)
- assert.Equal(t, boxedTrue, s.IsRegionalized)
+ if !ok {
+ t.Errorf("expect found, was not")
+ }
+ if e, a := 2, len(s.Endpoints); e != a {
+ t.Errorf("expect %v len, got %v", e, a)
+ }
+ if e, a := boxedTrue, s.IsRegionalized; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
s, ok = ss["notRegionalized"]
- assert.True(t, ok)
- assert.Len(t, s.Endpoints, 2)
- assert.Equal(t, boxedFalse, s.IsRegionalized)
+ if !ok {
+ t.Errorf("expect found, was not")
+ }
+ if e, a := 2, len(s.Endpoints); e != a {
+ t.Errorf("expect %v len, got %v", e, a)
+ }
+ if e, a := boxedFalse, s.IsRegionalized; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestUnmarshalEndpoints(t *testing.T) {
@@ -115,16 +154,32 @@ func TestUnmarshalEndpoints(t *testing.T) {
es := endpoints{}
err := json.Unmarshal(inputs, &es)
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
- assert.Len(t, es, 2)
+ if e, a := 2, len(es); e != a {
+ t.Errorf("expect %v len, got %v", e, a)
+ }
s, ok := es["aws-global"]
- assert.True(t, ok)
- assert.Equal(t, "cloudfront.amazonaws.com", s.Hostname)
- assert.Equal(t, []string{"http", "https"}, s.Protocols)
- assert.Equal(t, []string{"v4"}, s.SignatureVersions)
- assert.Equal(t, credentialScope{"us-east-1", "serviceName"}, s.CredentialScope)
- assert.Equal(t, "commonName", s.SSLCommonName)
+ if !ok {
+ t.Errorf("expect found, was not")
+ }
+ if e, a := "cloudfront.amazonaws.com", s.Hostname; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := []string{"http", "https"}, s.Protocols; !reflect.DeepEqual(e, a) {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := []string{"v4"}, s.SignatureVersions; !reflect.DeepEqual(e, a) {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := (credentialScope{"us-east-1", "serviceName"}), s.CredentialScope; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "commonName", s.SSLCommonName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestEndpointResolve(t *testing.T) {
@@ -155,10 +210,18 @@ func TestEndpointResolve(t *testing.T) {
defs, Options{},
)
- assert.Equal(t, "https://service.region.dnsSuffix", resolved.URL)
- assert.Equal(t, "signing_service", resolved.SigningName)
- assert.Equal(t, "signing_region", resolved.SigningRegion)
- assert.Equal(t, "v4", resolved.SigningMethod)
+ if e, a := "https://service.region.dnsSuffix", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "signing_service", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "signing_region", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "v4", resolved.SigningMethod; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestEndpointMergeIn(t *testing.T) {
@@ -185,7 +248,9 @@ func TestEndpointMergeIn(t *testing.T) {
},
})
- assert.Equal(t, expected, actual)
+ if e, a := expected, actual; !reflect.DeepEqual(e, a) {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
var testPartitions = partitions{
@@ -213,6 +278,11 @@ var testPartitions = partitions{
Services: services{
"s3": service{},
"service1": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "service1",
+ },
+ },
Endpoints: endpoints{
"us-east-1": {},
"us-west-2": {
@@ -221,7 +291,13 @@ var testPartitions = partitions{
},
},
},
- "service2": service{},
+ "service2": service{
+ Defaults: endpoint{
+ CredentialScope: credentialScope{
+ Service: "service2",
+ },
+ },
+ },
"httpService": service{
Defaults: endpoint{
Protocols: []string{"http"},
@@ -246,109 +322,220 @@ var testPartitions = partitions{
func TestResolveEndpoint(t *testing.T) {
resolved, err := testPartitions.EndpointFor("service2", "us-west-2")
- assert.NoError(t, err)
- assert.Equal(t, "https://service2.us-west-2.amazonaws.com", resolved.URL)
- assert.Equal(t, "us-west-2", resolved.SigningRegion)
- assert.Equal(t, "service2", resolved.SigningName)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ if e, a := "https://service2.us-west-2.amazonaws.com", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "us-west-2", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "service2", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if resolved.SigningNameDerived {
+ t.Errorf("expect the signing name not to be derived, but was")
+ }
}
func TestResolveEndpoint_DisableSSL(t *testing.T) {
resolved, err := testPartitions.EndpointFor("service2", "us-west-2", DisableSSLOption)
- assert.NoError(t, err)
- assert.Equal(t, "http://service2.us-west-2.amazonaws.com", resolved.URL)
- assert.Equal(t, "us-west-2", resolved.SigningRegion)
- assert.Equal(t, "service2", resolved.SigningName)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ if e, a := "http://service2.us-west-2.amazonaws.com", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "us-west-2", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "service2", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if resolved.SigningNameDerived {
+ t.Errorf("expect the signing name not to be derived, but was")
+ }
}
func TestResolveEndpoint_UseDualStack(t *testing.T) {
resolved, err := testPartitions.EndpointFor("service1", "us-west-2", UseDualStackOption)
- assert.NoError(t, err)
- assert.Equal(t, "https://service1.dualstack.us-west-2.amazonaws.com", resolved.URL)
- assert.Equal(t, "us-west-2", resolved.SigningRegion)
- assert.Equal(t, "service1", resolved.SigningName)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ if e, a := "https://service1.dualstack.us-west-2.amazonaws.com", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "us-west-2", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "service1", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if resolved.SigningNameDerived {
+ t.Errorf("expect the signing name not to be derived, but was")
+ }
}
func TestResolveEndpoint_HTTPProtocol(t *testing.T) {
resolved, err := testPartitions.EndpointFor("httpService", "us-west-2")
- assert.NoError(t, err)
- assert.Equal(t, "http://httpService.us-west-2.amazonaws.com", resolved.URL)
- assert.Equal(t, "us-west-2", resolved.SigningRegion)
- assert.Equal(t, "httpService", resolved.SigningName)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ if e, a := "http://httpService.us-west-2.amazonaws.com", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "us-west-2", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "httpService", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if !resolved.SigningNameDerived {
+ t.Errorf("expect the signing name to be derived")
+ }
}
func TestResolveEndpoint_UnknownService(t *testing.T) {
_, err := testPartitions.EndpointFor("unknownservice", "us-west-2")
- assert.Error(t, err)
+ if err == nil {
+ t.Errorf("expect error, got none")
+ }
_, ok := err.(UnknownServiceError)
- assert.True(t, ok, "expect error to be UnknownServiceError")
+ if !ok {
+ t.Errorf("expect error to be UnknownServiceError")
+ }
}
func TestResolveEndpoint_ResolveUnknownService(t *testing.T) {
resolved, err := testPartitions.EndpointFor("unknown-service", "us-region-1",
ResolveUnknownServiceOption)
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
- assert.Equal(t, "https://unknown-service.us-region-1.amazonaws.com", resolved.URL)
- assert.Equal(t, "us-region-1", resolved.SigningRegion)
- assert.Equal(t, "unknown-service", resolved.SigningName)
+ if e, a := "https://unknown-service.us-region-1.amazonaws.com", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "us-region-1", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "unknown-service", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if !resolved.SigningNameDerived {
+ t.Errorf("expect the signing name to be derived")
+ }
}
func TestResolveEndpoint_UnknownMatchedRegion(t *testing.T) {
resolved, err := testPartitions.EndpointFor("service2", "us-region-1")
- assert.NoError(t, err)
- assert.Equal(t, "https://service2.us-region-1.amazonaws.com", resolved.URL)
- assert.Equal(t, "us-region-1", resolved.SigningRegion)
- assert.Equal(t, "service2", resolved.SigningName)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ if e, a := "https://service2.us-region-1.amazonaws.com", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "us-region-1", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "service2", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if resolved.SigningNameDerived {
+ t.Errorf("expect the signing name not to be derived, but was")
+ }
}
func TestResolveEndpoint_UnknownRegion(t *testing.T) {
resolved, err := testPartitions.EndpointFor("service2", "unknownregion")
- assert.NoError(t, err)
- assert.Equal(t, "https://service2.unknownregion.amazonaws.com", resolved.URL)
- assert.Equal(t, "unknownregion", resolved.SigningRegion)
- assert.Equal(t, "service2", resolved.SigningName)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ if e, a := "https://service2.unknownregion.amazonaws.com", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "unknownregion", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "service2", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if resolved.SigningNameDerived {
+ t.Errorf("expect the signing name not to be derived, but was")
+ }
}
func TestResolveEndpoint_StrictPartitionUnknownEndpoint(t *testing.T) {
_, err := testPartitions[0].EndpointFor("service2", "unknownregion", StrictMatchingOption)
- assert.Error(t, err)
+ if err == nil {
+ t.Errorf("expect error, got none")
+ }
_, ok := err.(UnknownEndpointError)
- assert.True(t, ok, "expect error to be UnknownEndpointError")
+ if !ok {
+ t.Errorf("expect error to be UnknownEndpointError")
+ }
}
func TestResolveEndpoint_StrictPartitionsUnknownEndpoint(t *testing.T) {
_, err := testPartitions.EndpointFor("service2", "us-region-1", StrictMatchingOption)
- assert.Error(t, err)
+ if err == nil {
+ t.Errorf("expect error, got none")
+ }
_, ok := err.(UnknownEndpointError)
- assert.True(t, ok, "expect error to be UnknownEndpointError")
+ if !ok {
+ t.Errorf("expect error to be UnknownEndpointError")
+ }
}
func TestResolveEndpoint_NotRegionalized(t *testing.T) {
resolved, err := testPartitions.EndpointFor("globalService", "us-west-2")
- assert.NoError(t, err)
- assert.Equal(t, "https://globalService.amazonaws.com", resolved.URL)
- assert.Equal(t, "us-east-1", resolved.SigningRegion)
- assert.Equal(t, "globalService", resolved.SigningName)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ if e, a := "https://globalService.amazonaws.com", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "us-east-1", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "globalService", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if !resolved.SigningNameDerived {
+ t.Errorf("expect the signing name to be derived")
+ }
}
func TestResolveEndpoint_AwsGlobal(t *testing.T) {
resolved, err := testPartitions.EndpointFor("globalService", "aws-global")
- assert.NoError(t, err)
- assert.Equal(t, "https://globalService.amazonaws.com", resolved.URL)
- assert.Equal(t, "us-east-1", resolved.SigningRegion)
- assert.Equal(t, "globalService", resolved.SigningName)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+ if e, a := "https://globalService.amazonaws.com", resolved.URL; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "us-east-1", resolved.SigningRegion; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "globalService", resolved.SigningName; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if !resolved.SigningNameDerived {
+ t.Errorf("expect the signing name to be derived")
+ }
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
index db87188..6ed15b2 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/logger.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
@@ -26,14 +26,14 @@ func (l *LogLevelType) Value() LogLevelType {
// Matches returns true if the v LogLevel is enabled by this LogLevel. Should be
// used with logging sub levels. Is safe to use on nil value LogLevelTypes. If
-// LogLevel is nill, will default to LogOff comparison.
+// LogLevel is nil, will default to LogOff comparison.
func (l *LogLevelType) Matches(v LogLevelType) bool {
c := l.Value()
return c&v == v
}
// AtLeast returns true if this LogLevel is at least high enough to satisfies v.
-// Is safe to use on nil value LogLevelTypes. If LogLevel is nill, will default
+// Is safe to use on nil value LogLevelTypes. If LogLevel is nil, will default
// to LogOff comparison.
func (l *LogLevelType) AtLeast(v LogLevelType) bool {
c := l.Value()
@@ -71,6 +71,12 @@ const (
// LogDebugWithRequestErrors states the SDK should log when service requests fail
// to build, send, validate, or unmarshal.
LogDebugWithRequestErrors
+
+ // LogDebugWithEventStreamBody states the SDK should log EventStream
+ // request and response bodys. This should be used to log the EventStream
+ // wire unmarshaled message content of requests and responses made while
+ // using the SDK Will also enable LogDebug.
+ LogDebugWithEventStreamBody
)
// A Logger is a minimalistic interface for the SDK to log messages to. Should
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 10fc8cb..271da43 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_other.go
similarity index 84%
rename from vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go
rename to vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go
index 996196e..daf9eca 100644
--- 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_other.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_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other_test.go
similarity index 80%
rename from vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine_test.go
rename to vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other_test.go
index 29660da..aba8eb4 100644
--- 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_other_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/connection_reset_error_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_test.go
index f02c507..bb5f6bd 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 6c14336..605a72d 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
@@ -14,6 +14,7 @@ type Handlers struct {
Send HandlerList
ValidateResponse HandlerList
Unmarshal HandlerList
+ UnmarshalStream HandlerList
UnmarshalMeta HandlerList
UnmarshalError HandlerList
Retry HandlerList
@@ -30,6 +31,7 @@ func (h *Handlers) Copy() Handlers {
Send: h.Send.copy(),
ValidateResponse: h.ValidateResponse.copy(),
Unmarshal: h.Unmarshal.copy(),
+ UnmarshalStream: h.UnmarshalStream.copy(),
UnmarshalError: h.UnmarshalError.copy(),
UnmarshalMeta: h.UnmarshalMeta.copy(),
Retry: h.Retry.copy(),
@@ -45,6 +47,7 @@ func (h *Handlers) Clear() {
h.Send.Clear()
h.Sign.Clear()
h.Unmarshal.Clear()
+ h.UnmarshalStream.Clear()
h.UnmarshalMeta.Clear()
h.UnmarshalError.Clear()
h.ValidateResponse.Clear()
@@ -158,6 +161,52 @@ 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
+}
+
+// Swap will swap out all handlers matching the name passed in. The matched
+// handlers will be swapped in. True is returned if the handlers were swapped.
+func (l *HandlerList) Swap(name string, replace NamedHandler) bool {
+ var swapped bool
+
+ for i := 0; i < len(l.list); i++ {
+ if l.list[i].Name == name {
+ l.list[i] = replace
+ 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 e375a99..b2da558 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/offset_reader.go b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go
index 02f07f4..b0c2ef4 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go
@@ -3,6 +3,8 @@ package request
import (
"io"
"sync"
+
+ "github.com/aws/aws-sdk-go/internal/sdkio"
)
// offsetReader is a thread-safe io.ReadCloser to prevent racing
@@ -15,7 +17,7 @@ type offsetReader struct {
func newOffsetReader(buf io.ReadSeeker, offset int64) *offsetReader {
reader := &offsetReader{}
- buf.Seek(offset, 0)
+ buf.Seek(offset, sdkio.SeekStart)
reader.buf = buf
return reader
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go
index 01856e3..e5ec043 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader_test.go
@@ -8,6 +8,7 @@ import (
"testing"
"time"
+ "github.com/aws/aws-sdk-go/internal/sdkio"
"github.com/stretchr/testify/assert"
)
@@ -28,15 +29,15 @@ func TestOffsetReaderSeek(t *testing.T) {
buf := []byte("testData")
reader := newOffsetReader(bytes.NewReader(buf), 0)
- orig, err := reader.Seek(0, 1)
+ orig, err := reader.Seek(0, sdkio.SeekCurrent)
assert.NoError(t, err)
assert.Equal(t, int64(0), orig)
- n, err := reader.Seek(0, 2)
+ n, err := reader.Seek(0, sdkio.SeekEnd)
assert.NoError(t, err)
assert.Equal(t, int64(len(buf)), n)
- n, err = reader.Seek(orig, 0)
+ n, err = reader.Seek(orig, sdkio.SeekStart)
assert.NoError(t, err)
assert.Equal(t, int64(0), n)
}
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 4f4f112..211411f 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
@@ -14,6 +14,7 @@ import (
"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/internal/sdkio"
)
const (
@@ -24,10 +25,14 @@ const (
// ErrCodeRead is an error that is returned during HTTP reads.
ErrCodeRead = "ReadError"
- // ErrCodeResponseTimeout is the connection timeout error that is recieved
+ // ErrCodeResponseTimeout is the connection timeout error that is received
// during body reads.
ErrCodeResponseTimeout = "ResponseTimeout"
+ // ErrCodeInvalidPresignExpire is returned when the expire time provided to
+ // presign is invalid
+ ErrCodeInvalidPresignExpire = "InvalidPresignExpireError"
+
// CanceledErrorCode is the error code that will be returned by an
// API request that was canceled. Requests given a aws.Context may
// return this error when canceled.
@@ -41,8 +46,8 @@ type Request struct {
Handlers Handlers
Retryer
+ AttemptTime time.Time
Time time.Time
- ExpireTime time.Duration
Operation *Operation
HTTPRequest *http.Request
HTTPResponse *http.Response
@@ -60,6 +65,11 @@ type Request struct {
LastSignedAt time.Time
DisableFollowRedirects bool
+ // A value greater than 0 instructs the request to be signed as Presigned URL
+ // You should not set this field directly. Instead use Request's
+ // Presign or PresignRequest methods.
+ ExpireTime time.Duration
+
context aws.Context
built bool
@@ -104,12 +114,15 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err)
}
+ SanitizeHostForHeader(httpReq)
+
r := &Request{
Config: cfg,
ClientInfo: clientInfo,
Handlers: handlers.Copy(),
Retryer: retryer,
+ AttemptTime: time.Now(),
Time: time.Now(),
ExpireTime: 0,
Operation: operation,
@@ -214,6 +227,9 @@ func (r *Request) SetContext(ctx aws.Context) {
// WillRetry returns if the request's can be retried.
func (r *Request) WillRetry() bool {
+ if !aws.IsReaderSeekable(r.Body) && r.HTTPRequest.Body != NoBody {
+ return false
+ }
return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries()
}
@@ -245,39 +261,70 @@ func (r *Request) SetStringBody(s string) {
// SetReaderBody will set the request's body reader.
func (r *Request) SetReaderBody(reader io.ReadSeeker) {
r.Body = reader
+ r.BodyStart, _ = reader.Seek(0, sdkio.SeekCurrent) // Get the Bodies current offset.
r.ResetBody()
}
// Presign returns the request's signed URL. Error will be returned
// if the signing fails.
-func (r *Request) Presign(expireTime time.Duration) (string, error) {
- r.ExpireTime = expireTime
+//
+// It is invalid to create a presigned URL with a expire duration 0 or less. An
+// error is returned if expire duration is 0 or less.
+func (r *Request) Presign(expire time.Duration) (string, error) {
+ r = r.copy()
+
+ // Presign requires all headers be hoisted. There is no way to retrieve
+ // the signed headers not hoisted without this. Making the presigned URL
+ // useless.
r.NotHoist = false
+ u, _, err := getPresignedURL(r, expire)
+ return u, err
+}
+
+// PresignRequest behaves just like presign, with the addition of returning a
+// set of headers that were signed.
+//
+// It is invalid to create a presigned URL with a expire duration 0 or less. An
+// error is returned if expire duration is 0 or less.
+//
+// Returns the URL string for the API operation with signature in the query string,
+// and the HTTP headers that were included in the signature. These headers must
+// be included in any HTTP request made with the presigned URL.
+//
+// To prevent hoisting any headers to the query string set NotHoist to true on
+// this Request value prior to calling PresignRequest.
+func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) {
+ r = r.copy()
+ return getPresignedURL(r, expire)
+}
+
+// IsPresigned returns true if the request represents a presigned API url.
+func (r *Request) IsPresigned() bool {
+ return r.ExpireTime != 0
+}
+
+func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, error) {
+ if expire <= 0 {
+ return "", nil, awserr.New(
+ ErrCodeInvalidPresignExpire,
+ "presigned URL requires an expire duration greater than 0",
+ nil,
+ )
+ }
+
+ r.ExpireTime = expire
+
if r.Operation.BeforePresignFn != nil {
- r = r.copy()
- err := r.Operation.BeforePresignFn(r)
- if err != nil {
- return "", err
+ if err := r.Operation.BeforePresignFn(r); err != nil {
+ return "", nil, err
}
}
- r.Sign()
- if r.Error != nil {
- return "", r.Error
+ if err := r.Sign(); err != nil {
+ return "", nil, err
}
- return r.HTTPRequest.URL.String(), nil
-}
-// PresignRequest behaves just like presign, but hoists all headers and signs them.
-// Also returns the signed hash back to the user
-func (r *Request) PresignRequest(expireTime time.Duration) (string, http.Header, error) {
- r.ExpireTime = expireTime
- r.NotHoist = true
- r.Sign()
- if r.Error != nil {
- return "", nil, r.Error
- }
return r.HTTPRequest.URL.String(), r.SignedHeaderVals, nil
}
@@ -297,7 +344,7 @@ func debugLogReqError(r *Request, stage string, retrying bool, err error) {
// Build will build the request's object so it can be signed and sent
// to the service. Build will also validate all the request's parameters.
-// Anny additional build Handlers set on this request will be run
+// Any additional build Handlers set on this request will be run
// in the order they were set.
//
// The request will only be built once. Multiple calls to build will have
@@ -338,10 +385,7 @@ func (r *Request) Sign() error {
return r.Error
}
-// ResetBody rewinds the request body backto its starting position, and
-// set's the HTTP Request body reference. When the body is read prior
-// to being sent in the HTTP request it will need to be rewound.
-func (r *Request) ResetBody() {
+func (r *Request) getNextRequestBody() (io.ReadCloser, error) {
if r.safeBody != nil {
r.safeBody.Close()
}
@@ -361,16 +405,16 @@ func (r *Request) ResetBody() {
// of the SDK if they used that field.
//
// Related golang/go#18257
- l, err := computeBodyLength(r.Body)
+ l, err := aws.SeekerLen(r.Body)
if err != nil {
- r.Error = awserr.New(ErrCodeSerialization, "failed to compute request body size", err)
- return
+ return nil, awserr.New(ErrCodeSerialization, "failed to compute request body size", err)
}
+ var body io.ReadCloser
if l == 0 {
- r.HTTPRequest.Body = noBodyReader
+ body = NoBody
} else if l > 0 {
- r.HTTPRequest.Body = r.safeBody
+ body = r.safeBody
} else {
// Hack to prevent sending bodies for methods where the body
// should be ignored by the server. Sending bodies on these
@@ -379,50 +423,17 @@ func (r *Request) ResetBody() {
// Transfer-Encoding: chunked bodies for these methods.
//
// This would only happen if a aws.ReaderSeekerCloser was used with
- // a io.Reader that was not also an io.Seeker.
+ // a io.Reader that was not also an io.Seeker, or did not implement
+ // Len() method.
switch r.Operation.HTTPMethod {
case "GET", "HEAD", "DELETE":
- r.HTTPRequest.Body = noBodyReader
+ body = NoBody
default:
- r.HTTPRequest.Body = r.safeBody
+ body = r.safeBody
}
}
-}
-
-// Attempts to compute the length of the body of the reader using the
-// io.Seeker interface. If the value is not seekable because of being
-// a ReaderSeekerCloser without an unerlying Seeker -1 will be returned.
-// If no error occurs the length of the body will be returned.
-func computeBodyLength(r io.ReadSeeker) (int64, error) {
- seekable := true
- // Determine if the seeker is actually seekable. ReaderSeekerCloser
- // hides the fact that a io.Readers might not actually be seekable.
- switch v := r.(type) {
- case aws.ReaderSeekerCloser:
- seekable = v.IsSeeker()
- case *aws.ReaderSeekerCloser:
- seekable = v.IsSeeker()
- }
- if !seekable {
- return -1, nil
- }
-
- curOffset, err := r.Seek(0, 1)
- if err != nil {
- return 0, err
- }
-
- endOffset, err := r.Seek(0, 2)
- if err != nil {
- return 0, err
- }
- _, err = r.Seek(curOffset, 0)
- if err != nil {
- return 0, err
- }
-
- return endOffset - curOffset, nil
+ return body, nil
}
// GetBody will return an io.ReadSeeker of the Request's underlying
@@ -452,6 +463,7 @@ func (r *Request) Send() error {
}()
for {
+ r.AttemptTime = time.Now()
if aws.BoolValue(r.Retryable) {
if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) {
r.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d",
@@ -488,7 +500,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 +509,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 +528,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)
@@ -573,3 +586,72 @@ func shouldRetryCancel(r *Request) bool {
errStr != "net/http: request canceled while waiting for connection")
}
+
+// SanitizeHostForHeader removes default port from host and updates request.Host
+func SanitizeHostForHeader(r *http.Request) {
+ host := getHost(r)
+ port := portOnly(host)
+ if port != "" && isDefaultPort(r.URL.Scheme, port) {
+ r.Host = stripPort(host)
+ }
+}
+
+// Returns host from request
+func getHost(r *http.Request) string {
+ if r.Host != "" {
+ return r.Host
+ }
+
+ return r.URL.Host
+}
+
+// Hostname returns u.Host, without any port number.
+//
+// If Host is an IPv6 literal with a port number, Hostname returns the
+// IPv6 literal without the square brackets. IPv6 literals may include
+// a zone identifier.
+//
+// Copied from the Go 1.8 standard library (net/url)
+func stripPort(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return hostport
+ }
+ if i := strings.IndexByte(hostport, ']'); i != -1 {
+ return strings.TrimPrefix(hostport[:i], "[")
+ }
+ return hostport[:colon]
+}
+
+// Port returns the port part of u.Host, without the leading colon.
+// If u.Host doesn't contain a port, Port returns an empty string.
+//
+// Copied from the Go 1.8 standard library (net/url)
+func portOnly(hostport string) string {
+ colon := strings.IndexByte(hostport, ':')
+ if colon == -1 {
+ return ""
+ }
+ if i := strings.Index(hostport, "]:"); i != -1 {
+ return hostport[i+len("]:"):]
+ }
+ if strings.Contains(hostport, "]") {
+ return ""
+ }
+ return hostport[colon+len(":"):]
+}
+
+// Returns true if the specified URI is using the standard port
+// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs)
+func isDefaultPort(scheme, port string) bool {
+ if port == "" {
+ return true
+ }
+
+ lowerCaseScheme := strings.ToLower(scheme)
+ if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") {
+ return true
+ }
+
+ return false
+}
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 1323af9..869b97a 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,24 @@ 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{}
+
+// ResetBody rewinds the request body back to its starting position, and
+// set's the HTTP Request body reference. When the body is read prior
+// to being sent in the HTTP request it will need to be rewound.
+//
+// ResetBody will automatically be called by the SDK's build handler, but if
+// the request is being used directly ResetBody must be called before the request
+// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
+// call ResetBody.
+func (r *Request) ResetBody() {
+ body, err := r.getNextRequestBody()
+ if err != nil {
+ r.Error = err
+ return
+ }
+
+ r.HTTPRequest.Body = body
+}
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 8b963f4..c32fc69 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,32 @@
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
+
+// ResetBody rewinds the request body back to its starting position, and
+// set's the HTTP Request body reference. When the body is read prior
+// to being sent in the HTTP request it will need to be rewound.
+//
+// ResetBody will automatically be called by the SDK's build handler, but if
+// the request is being used directly ResetBody must be called before the request
+// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
+// call ResetBody.
+//
+// Will also set the Go 1.8's http.Request.GetBody member to allow retrying
+// PUT/POST redirects.
+func (r *Request) ResetBody() {
+ body, err := r.getNextRequestBody()
+ if err != nil {
+ r.Error = err
+ return
+ }
+
+ r.HTTPRequest.Body = body
+ r.HTTPRequest.GetBody = r.getNextRequestBody
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8_test.go
index 6a3aba6..8f3b0f0 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8_test.go
@@ -1,15 +1,23 @@
// +build go1.8
-package request
+package request_test
import (
+ "bytes"
+ "io"
"net/http"
+ "net/http/httptest"
"strings"
"testing"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/request"
+ "github.com/aws/aws-sdk-go/awstesting"
+ "github.com/aws/aws-sdk-go/awstesting/unit"
)
func TestResetBody_WithEmptyBody(t *testing.T) {
- r := Request{
+ r := request.Request{
HTTPRequest: &http.Request{},
}
@@ -23,3 +31,55 @@ func TestResetBody_WithEmptyBody(t *testing.T) {
r.HTTPRequest.Body)
}
}
+
+func TestRequest_FollowPUTRedirects(t *testing.T) {
+ const bodySize = 1024
+
+ redirectHit := 0
+ endpointHit := 0
+
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ switch r.URL.Path {
+ case "/redirect-me":
+ u := *r.URL
+ u.Path = "/endpoint"
+ w.Header().Set("Location", u.String())
+ w.WriteHeader(307)
+ redirectHit++
+ case "/endpoint":
+ b := bytes.Buffer{}
+ io.Copy(&b, r.Body)
+ r.Body.Close()
+ if e, a := bodySize, b.Len(); e != a {
+ t.Fatalf("expect %d body size, got %d", e, a)
+ }
+ endpointHit++
+ default:
+ t.Fatalf("unexpected endpoint used, %q", r.URL.String())
+ }
+ }))
+
+ svc := awstesting.NewClient(&aws.Config{
+ Region: unit.Session.Config.Region,
+ DisableSSL: aws.Bool(true),
+ Endpoint: aws.String(server.URL),
+ })
+
+ req := svc.NewRequest(&request.Operation{
+ Name: "Operation",
+ HTTPMethod: "PUT",
+ HTTPPath: "/redirect-me",
+ }, &struct{}{}, &struct{}{})
+ req.SetReaderBody(bytes.NewReader(make([]byte, bodySize)))
+
+ err := req.Send()
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
+ if e, a := 1, redirectHit; e != a {
+ t.Errorf("expect %d redirect hits, got %d", e, a)
+ }
+ if e, a := 1, endpointHit; e != a {
+ t.Errorf("expect %d endpoint hits, got %d", e, a)
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
index 59de673..a633ed5 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
@@ -35,8 +35,12 @@ type Pagination struct {
// NewRequest should always be built from the same API operations. It is
// undefined if different API operations are returned on subsequent calls.
NewRequest func() (*Request, error)
+ // EndPageOnSameToken, when enabled, will allow the paginator to stop on
+ // token that are the same as its previous tokens.
+ EndPageOnSameToken bool
started bool
+ prevTokens []interface{}
nextTokens []interface{}
err error
@@ -49,7 +53,15 @@ type Pagination struct {
//
// Will always return true if Next has not been called yet.
func (p *Pagination) HasNextPage() bool {
- return !(p.started && len(p.nextTokens) == 0)
+ if !p.started {
+ return true
+ }
+
+ hasNextPage := len(p.nextTokens) != 0
+ if p.EndPageOnSameToken {
+ return hasNextPage && !awsutil.DeepEqual(p.nextTokens, p.prevTokens)
+ }
+ return hasNextPage
}
// Err returns the error Pagination encountered when retrieving the next page.
@@ -96,6 +108,7 @@ func (p *Pagination) Next() bool {
return false
}
+ p.prevTokens = p.nextTokens
p.nextTokens = req.nextPageTokens()
p.curPage = req.Data
@@ -142,13 +155,28 @@ func (r *Request) nextPageTokens() []interface{} {
tokens := []interface{}{}
tokenAdded := false
for _, outToken := range r.Operation.OutputTokens {
- v, _ := awsutil.ValuesAtPath(r.Data, outToken)
- if len(v) > 0 {
- tokens = append(tokens, v[0])
- tokenAdded = true
- } else {
+ vs, _ := awsutil.ValuesAtPath(r.Data, outToken)
+ if len(vs) == 0 {
tokens = append(tokens, nil)
+ continue
+ }
+ v := vs[0]
+
+ switch tv := v.(type) {
+ case *string:
+ if len(aws.StringValue(tv)) == 0 {
+ tokens = append(tokens, nil)
+ continue
+ }
+ case string:
+ if len(tv) == 0 {
+ tokens = append(tokens, nil)
+ continue
+ }
}
+
+ tokenAdded = true
+ tokens = append(tokens, v)
}
if !tokenAdded {
return nil
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go
index 73a95ba..03aed30 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination_test.go
@@ -454,78 +454,122 @@ func TestPaginationWithContextNilInput(t *testing.T) {
}
}
-type testPageInput struct {
- NextToken string
-}
-type testPageOutput struct {
- Value string
- NextToken *string
-}
-
func TestPagination_Standalone(t *testing.T) {
- expect := []struct {
- Value, PrevToken, NextToken string
- }{
- {"FirstValue", "InitalToken", "FirstToken"},
- {"SecondValue", "FirstToken", "SecondToken"},
- {"ThirdValue", "SecondToken", ""},
+ type testPageInput struct {
+ NextToken *string
+ }
+ type testPageOutput struct {
+ Value *string
+ NextToken *string
}
- input := testPageInput{
- NextToken: expect[0].PrevToken,
+ type testCase struct {
+ Value, PrevToken, NextToken *string
}
- c := awstesting.NewClient()
- i := 0
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- r := c.NewRequest(
- &request.Operation{
- Name: "Operation",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- },
- },
- &input, &testPageOutput{},
- )
- // Setup handlers for testing
- r.Handlers.Clear()
- r.Handlers.Build.PushBack(func(req *request.Request) {
- in := req.Params.(*testPageInput)
- if e, a := expect[i].PrevToken, in.NextToken; e != a {
- t.Errorf("%d, expect NextToken input %q, got %q", i, e, a)
- }
- })
- r.Handlers.Unmarshal.PushBack(func(req *request.Request) {
- out := &testPageOutput{
- Value: expect[i].Value,
- }
- if len(expect[i].NextToken) > 0 {
- out.NextToken = aws.String(expect[i].NextToken)
- }
- req.Data = out
- })
- return r, nil
- },
+ type testCaseList struct {
+ StopOnSameToken bool
+ Cases []testCase
}
- for p.Next() {
- data := p.Page().(*testPageOutput)
+ cases := []testCaseList{
+ {
+ Cases: []testCase{
+ testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
+ testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
+ testCase{aws.String("ThirdValue"), aws.String("SecondToken"), nil},
+ },
+ StopOnSameToken: false,
+ },
+ {
+ Cases: []testCase{
+ testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
+ testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
+ testCase{aws.String("ThirdValue"), aws.String("SecondToken"), aws.String("")},
+ },
+ StopOnSameToken: false,
+ },
+ {
+ Cases: []testCase{
+ testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
+ testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
+ testCase{nil, aws.String("SecondToken"), aws.String("SecondToken")},
+ },
+ StopOnSameToken: true,
+ },
+ {
+ Cases: []testCase{
+ testCase{aws.String("FirstValue"), aws.String("InitalToken"), aws.String("FirstToken")},
+ testCase{aws.String("SecondValue"), aws.String("FirstToken"), aws.String("SecondToken")},
+ testCase{aws.String("SecondValue"), aws.String("SecondToken"), aws.String("SecondToken")},
+ },
+ StopOnSameToken: true,
+ },
+ }
- if e, a := expect[i].Value, data.Value; e != a {
- t.Errorf("%d, expect Value to be %q, got %q", i, e, a)
+ for _, testcase := range cases {
+ c := testcase.Cases
+ input := testPageInput{
+ NextToken: c[0].PrevToken,
}
- if e, a := expect[i].NextToken, aws.StringValue(data.NextToken); e != a {
- t.Errorf("%d, expect NextToken to be %q, got %q", i, e, a)
+
+ svc := awstesting.NewClient()
+ i := 0
+ p := request.Pagination{
+ EndPageOnSameToken: testcase.StopOnSameToken,
+ NewRequest: func() (*request.Request, error) {
+ r := svc.NewRequest(
+ &request.Operation{
+ Name: "Operation",
+ Paginator: &request.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ },
+ },
+ &input, &testPageOutput{},
+ )
+ // Setup handlers for testing
+ r.Handlers.Clear()
+ r.Handlers.Build.PushBack(func(req *request.Request) {
+ if e, a := len(c), i+1; a > e {
+ t.Fatalf("expect no more than %d requests, got %d", e, a)
+ }
+ in := req.Params.(*testPageInput)
+ if e, a := aws.StringValue(c[i].PrevToken), aws.StringValue(in.NextToken); e != a {
+ t.Errorf("%d, expect NextToken input %q, got %q", i, e, a)
+ }
+ })
+ r.Handlers.Unmarshal.PushBack(func(req *request.Request) {
+ out := &testPageOutput{
+ Value: c[i].Value,
+ }
+ if c[i].NextToken != nil {
+ next := *c[i].NextToken
+ out.NextToken = aws.String(next)
+ }
+ req.Data = out
+ })
+ return r, nil
+ },
}
- i++
- }
- if e, a := len(expect), i; e != a {
- t.Errorf("expected to process %d pages, did %d", e, a)
- }
- if err := p.Err(); err != nil {
- t.Fatalf("%d, expected no error, got %v", i, err)
+ for p.Next() {
+ data := p.Page().(*testPageOutput)
+
+ if e, a := aws.StringValue(c[i].Value), aws.StringValue(data.Value); e != a {
+ t.Errorf("%d, expect Value to be %q, got %q", i, e, a)
+ }
+ if e, a := aws.StringValue(c[i].NextToken), aws.StringValue(data.NextToken); e != a {
+ t.Errorf("%d, expect NextToken to be %q, got %q", i, e, a)
+ }
+
+ i++
+ }
+ if e, a := len(c), i; e != a {
+ t.Errorf("expected to process %d pages, did %d", e, a)
+ }
+ if err := p.Err(); err != nil {
+ t.Fatalf("%d, expected no error, got %v", i, err)
+ }
}
}
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 4efc505..d7845b7 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
@@ -2,6 +2,7 @@ package request
import (
"bytes"
+ "io"
"net/http"
"strings"
"testing"
@@ -25,21 +26,70 @@ func TestResetBody_WithBodyContents(t *testing.T) {
}
}
-func TestResetBody_ExcludeUnseekableBodyByMethod(t *testing.T) {
+type mockReader struct{}
+
+func (mockReader) Read([]byte) (int, error) {
+ return 0, io.EOF
+}
+
+func TestResetBody_ExcludeEmptyUnseekableBodyByMethod(t *testing.T) {
cases := []struct {
Method string
+ Body io.ReadSeeker
IsNoBody bool
}{
- {"GET", true},
- {"HEAD", true},
- {"DELETE", true},
- {"PUT", false},
- {"PATCH", false},
- {"POST", false},
+ {
+ Method: "GET",
+ IsNoBody: true,
+ Body: aws.ReadSeekCloser(mockReader{}),
+ },
+ {
+ Method: "HEAD",
+ IsNoBody: true,
+ Body: aws.ReadSeekCloser(mockReader{}),
+ },
+ {
+ Method: "DELETE",
+ IsNoBody: true,
+ Body: aws.ReadSeekCloser(mockReader{}),
+ },
+ {
+ Method: "PUT",
+ IsNoBody: false,
+ Body: aws.ReadSeekCloser(mockReader{}),
+ },
+ {
+ Method: "PATCH",
+ IsNoBody: false,
+ Body: aws.ReadSeekCloser(mockReader{}),
+ },
+ {
+ Method: "POST",
+ IsNoBody: false,
+ Body: aws.ReadSeekCloser(mockReader{}),
+ },
+ {
+ Method: "GET",
+ IsNoBody: false,
+ Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc"))),
+ },
+ {
+ Method: "GET",
+ IsNoBody: true,
+ Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)),
+ },
+ {
+ Method: "POST",
+ IsNoBody: false,
+ Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc"))),
+ },
+ {
+ Method: "POST",
+ IsNoBody: true,
+ Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)),
+ },
}
- reader := aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc")))
-
for i, c := range cases {
r := Request{
HTTPRequest: &http.Request{},
@@ -47,10 +97,9 @@ func TestResetBody_ExcludeUnseekableBodyByMethod(t *testing.T) {
HTTPMethod: c.Method,
},
}
+ r.SetReaderBody(c.Body)
- 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 c741b5e..0e4cef0 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,15 +3,16 @@ package request_test
import (
"bytes"
"encoding/json"
- "errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/http/httptest"
+ "net/url"
"reflect"
"runtime"
"strconv"
+ "strings"
"testing"
"time"
@@ -21,6 +22,7 @@ import (
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/corehandlers"
"github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/defaults"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/awstesting"
@@ -81,7 +83,7 @@ func TestRequestRecoverRetry5xx(t *testing.T) {
reqNum := 0
reqs := []http.Response{
{StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
- {StatusCode: 501, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
+ {StatusCode: 502, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
{StatusCode: 200, Body: body(`{"data":"valid"}`)},
}
@@ -113,7 +115,8 @@ func TestRequestRecoverRetry4xxRetryable(t *testing.T) {
reqNum := 0
reqs := []http.Response{
{StatusCode: 400, Body: body(`{"__type":"Throttling","message":"Rate exceeded."}`)},
- {StatusCode: 429, Body: body(`{"__type":"ProvisionedThroughputExceededException","message":"Rate exceeded."}`)},
+ {StatusCode: 400, Body: body(`{"__type":"ProvisionedThroughputExceededException","message":"Rate exceeded."}`)},
+ {StatusCode: 429, Body: body(`{"__type":"FooException","message":"Rate exceeded."}`)},
{StatusCode: 200, Body: body(`{"data":"valid"}`)},
}
@@ -132,7 +135,7 @@ func TestRequestRecoverRetry4xxRetryable(t *testing.T) {
if err != nil {
t.Fatalf("expect no error, but got %v", err)
}
- if e, a := 2, int(r.RetryCount); e != a {
+ if e, a := 3, int(r.RetryCount); e != a {
t.Errorf("expect %d retry count, got %d", e, a)
}
if e, a := "valid", out.Data; e != a {
@@ -718,7 +721,9 @@ func TestEnforceShouldRetryCheck(t *testing.T) {
client := &http.Client{Transport: tp}
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- time.Sleep(5 * time.Millisecond)
+ // This server should wait forever. Requests will timeout and the SDK should
+ // attempt to retry.
+ select {}
}))
retryer := &testRetryer{}
@@ -762,31 +767,355 @@ 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),
+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},
+ }
+
+ 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)
+ }
+ }
+}
+
+func TestRequest_TemporaryRetry(t *testing.T) {
+ done := make(chan struct{})
+
+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Length", "1024")
+ w.WriteHeader(http.StatusOK)
+
+ w.Write(make([]byte, 100))
+
+ f := w.(http.Flusher)
+ f.Flush()
+
+ <-done
+ }))
+
+ client := &http.Client{
+ Timeout: 100 * time.Millisecond,
+ }
+
+ svc := awstesting.NewClient(&aws.Config{
+ Region: unit.Session.Config.Region,
+ MaxRetries: aws.Int(1),
+ HTTPClient: client,
DisableSSL: aws.Bool(true),
- LogLevel: aws.LogLevel(aws.LogDebugWithHTTPBody),
+ Endpoint: aws.String(server.URL),
})
+ req := svc.NewRequest(&request.Operation{
+ Name: "name", HTTPMethod: "GET", HTTPPath: "/path",
+ }, &struct{}{}, &struct{}{})
+
+ req.Handlers.Unmarshal.PushBack(func(r *request.Request) {
+ defer req.HTTPResponse.Body.Close()
+ _, err := io.Copy(ioutil.Discard, req.HTTPResponse.Body)
+ r.Error = awserr.New(request.ErrCodeSerialization, "error", err)
+ })
+
+ err := req.Send()
+ if err == nil {
+ t.Errorf("expect error, got none")
+ }
+ close(done)
+
+ aerr := err.(awserr.Error)
+ if e, a := request.ErrCodeSerialization, aerr.Code(); e != a {
+ t.Errorf("expect %q error code, got %q", e, a)
+ }
+
+ if e, a := 1, req.RetryCount; e != a {
+ t.Errorf("expect %d retries, got %d", e, a)
+ }
+
+ type temporary interface {
+ Temporary() bool
+ }
+
+ terr := aerr.OrigErr().(temporary)
+ if !terr.Temporary() {
+ t.Errorf("expect temporary error, was not")
+ }
+}
+
+func TestRequest_Presign(t *testing.T) {
+ presign := func(r *request.Request, expire time.Duration) (string, http.Header, error) {
+ u, err := r.Presign(expire)
+ return u, nil, err
+ }
+ presignRequest := func(r *request.Request, expire time.Duration) (string, http.Header, error) {
+ return r.PresignRequest(expire)
+ }
+ mustParseURL := func(v string) *url.URL {
+ u, err := url.Parse(v)
+ if err != nil {
+ panic(err)
+ }
+ return u
+ }
+
+ cases := []struct {
+ Expire time.Duration
+ PresignFn func(*request.Request, time.Duration) (string, http.Header, error)
+ SignerFn func(*request.Request)
+ URL string
+ Header http.Header
+ Err string
+ }{
+ {
+ PresignFn: presign,
+ Err: request.ErrCodeInvalidPresignExpire,
+ },
+ {
+ PresignFn: presignRequest,
+ Err: request.ErrCodeInvalidPresignExpire,
+ },
+ {
+ Expire: -1,
+ PresignFn: presign,
+ Err: request.ErrCodeInvalidPresignExpire,
+ },
+ {
+ // Presign clear NotHoist
+ Expire: 1 * time.Minute,
+ PresignFn: func(r *request.Request, dur time.Duration) (string, http.Header, error) {
+ r.NotHoist = true
+ return presign(r, dur)
+ },
+ SignerFn: func(r *request.Request) {
+ r.HTTPRequest.URL = mustParseURL("https://endpoint/presignedURL")
+ if r.NotHoist {
+ r.Error = fmt.Errorf("expect NotHoist to be cleared")
+ }
+ },
+ URL: "https://endpoint/presignedURL",
+ },
+ {
+ // PresignRequest does not clear NotHoist
+ Expire: 1 * time.Minute,
+ PresignFn: func(r *request.Request, dur time.Duration) (string, http.Header, error) {
+ r.NotHoist = true
+ return presignRequest(r, dur)
+ },
+ SignerFn: func(r *request.Request) {
+ r.HTTPRequest.URL = mustParseURL("https://endpoint/presignedURL")
+ if !r.NotHoist {
+ r.Error = fmt.Errorf("expect NotHoist not to be cleared")
+ }
+ },
+ URL: "https://endpoint/presignedURL",
+ },
+ {
+ // PresignRequest returns signed headers
+ Expire: 1 * time.Minute,
+ PresignFn: presignRequest,
+ SignerFn: func(r *request.Request) {
+ r.HTTPRequest.URL = mustParseURL("https://endpoint/presignedURL")
+ r.HTTPRequest.Header.Set("UnsigndHeader", "abc")
+ r.SignedHeaderVals = http.Header{
+ "X-Amzn-Header": []string{"abc", "123"},
+ "X-Amzn-Header2": []string{"efg", "456"},
+ }
+ },
+ URL: "https://endpoint/presignedURL",
+ Header: http.Header{
+ "X-Amzn-Header": []string{"abc", "123"},
+ "X-Amzn-Header2": []string{"efg", "456"},
+ },
+ },
+ }
+
+ svc := awstesting.NewClient()
+ svc.Handlers.Clear()
+ for i, c := range cases {
+ req := svc.NewRequest(&request.Operation{
+ Name: "name", HTTPMethod: "GET", HTTPPath: "/path",
+ }, &struct{}{}, &struct{}{})
+ req.Handlers.Sign.PushBack(c.SignerFn)
+
+ u, h, err := c.PresignFn(req, c.Expire)
+ if len(c.Err) != 0 {
+ if e, a := c.Err, err.Error(); !strings.Contains(a, e) {
+ t.Errorf("%d, expect %v to be in %v", i, e, a)
+ }
+ continue
+ } else if err != nil {
+ t.Errorf("%d, expect no error, got %v", i, err)
+ continue
+ }
+ if e, a := c.URL, u; e != a {
+ t.Errorf("%d, expect %v URL, got %v", i, e, a)
+ }
+ if e, a := c.Header, h; !reflect.DeepEqual(e, a) {
+ t.Errorf("%d, expect %v header got %v", i, e, a)
+ }
+ }
+}
+
+func TestNew_EndpointWithDefaultPort(t *testing.T) {
+ endpoint := "https://estest.us-east-1.es.amazonaws.com:443"
+ expectedRequestHost := "estest.us-east-1.es.amazonaws.com"
+
+ r := request.New(
+ aws.Config{},
+ metadata.ClientInfo{Endpoint: endpoint},
+ defaults.Handlers(),
+ client.DefaultRetryer{},
+ &request.Operation{},
+ nil,
+ nil,
+ )
+
+ if h := r.HTTPRequest.Host; h != expectedRequestHost {
+ t.Errorf("expect %v host, got %q", expectedRequestHost, h)
+ }
+}
+
+func TestSanitizeHostForHeader(t *testing.T) {
+ cases := []struct {
+ url string
+ expectedRequestHost string
+ }{
+ {"https://estest.us-east-1.es.amazonaws.com:443", "estest.us-east-1.es.amazonaws.com"},
+ {"https://estest.us-east-1.es.amazonaws.com", "estest.us-east-1.es.amazonaws.com"},
+ {"https://localhost:9200", "localhost:9200"},
+ {"http://localhost:80", "localhost"},
+ {"http://localhost:8080", "localhost:8080"},
+ }
+
+ for _, c := range cases {
+ r, _ := http.NewRequest("GET", c.url, nil)
+ request.SanitizeHostForHeader(r)
+
+ if h := r.Host; h != c.expectedRequestHost {
+ t.Errorf("expect %v host, got %q", c.expectedRequestHost, h)
+ }
+ }
+}
+
+func TestRequestWillRetry_ByBody(t *testing.T) {
+ svc := awstesting.NewClient()
+
+ cases := []struct {
+ WillRetry bool
+ HTTPMethod string
+ Body io.ReadSeeker
+ IsReqNoBody bool
+ }{
+ {
+ WillRetry: true,
+ HTTPMethod: "GET",
+ Body: bytes.NewReader([]byte{}),
+ IsReqNoBody: true,
+ },
+ {
+ WillRetry: true,
+ HTTPMethod: "GET",
+ Body: bytes.NewReader(nil),
+ IsReqNoBody: true,
+ },
+ {
+ WillRetry: true,
+ HTTPMethod: "POST",
+ Body: bytes.NewReader([]byte("abc123")),
+ },
+ {
+ WillRetry: true,
+ HTTPMethod: "POST",
+ Body: aws.ReadSeekCloser(bytes.NewReader([]byte("abc123"))),
+ },
+ {
+ WillRetry: true,
+ HTTPMethod: "GET",
+ Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)),
+ IsReqNoBody: true,
+ },
+ {
+ WillRetry: true,
+ HTTPMethod: "POST",
+ Body: aws.ReadSeekCloser(bytes.NewBuffer(nil)),
+ IsReqNoBody: true,
+ },
+ {
+ WillRetry: false,
+ HTTPMethod: "POST",
+ Body: aws.ReadSeekCloser(bytes.NewBuffer([]byte("abc123"))),
+ },
+ }
+
+ for i, c := range cases {
+ req := svc.NewRequest(&request.Operation{
+ Name: "Operation",
+ HTTPMethod: c.HTTPMethod,
+ HTTPPath: "/",
+ }, nil, nil)
+ req.SetReaderBody(c.Body)
+ req.Build()
+
+ req.Error = fmt.Errorf("some error")
+ req.Retryable = aws.Bool(true)
+ req.HTTPResponse = &http.Response{
+ StatusCode: 500,
+ }
+
+ if e, a := c.IsReqNoBody, request.NoBody == req.HTTPRequest.Body; e != a {
+ t.Errorf("%d, expect request to be no body, %t, got %t, %T", i, e, a, req.HTTPRequest.Body)
+ }
+
+ if e, a := c.WillRetry, req.WillRetry(); e != a {
+ t.Errorf("%d, expect %t willRetry, got %t", i, e, a)
+ }
+
+ if req.Error == nil {
+ t.Fatalf("%d, expect error, got none", i)
+ }
+ if e, a := "some error", req.Error.Error(); !strings.Contains(a, e) {
+ t.Errorf("%d, expect %q error in %q", i, e, a)
+ }
+ if e, a := 0, req.RetryCount; e != a {
+ t.Errorf("%d, expect retry count to be %d, got %d", i, e, a)
+ }
+ }
+}
+
+func Test501NotRetrying(t *testing.T) {
+ reqNum := 0
+ reqs := []http.Response{
+ {StatusCode: 500, Body: body(`{"__type":"UnknownError","message":"An error occurred."}`)},
+ {StatusCode: 501, Body: body(`{"__type":"NotImplemented","message":"An error occurred."}`)},
+ {StatusCode: 200, Body: body(`{"data":"valid"}`)},
+ }
+
+ s := awstesting.NewClient(aws.NewConfig().WithMaxRetries(10))
s.Handlers.Validate.Clear()
- s.Handlers.Send.Clear()
+ s.Handlers.Unmarshal.PushBack(unmarshal)
+ s.Handlers.UnmarshalError.PushBack(unmarshalError)
+ s.Handlers.Send.Clear() // mock sending
s.Handlers.Send.PushBack(func(r *request.Request) {
- r.HTTPResponse = &http.Response{StatusCode: 200, Body: &errReader{errors.New("Foo error")}}
+ r.HTTPResponse = &reqs[reqNum]
+ reqNum++
})
- 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")
+ t.Fatal("expect error, but got none")
}
- 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())
+ aerr := err.(awserr.Error)
+ if e, a := "NotImplemented", aerr.Code(); e != a {
+ t.Errorf("expected error code %q, but received %q", e, a)
+ }
+ if e, a := 1, int(r.RetryCount); e != a {
+ t.Errorf("expect %d retry count, got %d", 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 7af81de..f35fef2 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
@@ -8,7 +8,7 @@ import (
)
// Retryer is an interface to control retry logic for a given service.
-// The default implementation used by most services is the service.DefaultRetryer
+// The default implementation used by most services is the client.DefaultRetryer
// structure, which contains basic retry logic using exponential backoff.
type Retryer interface {
RetryRules(*Request) time.Duration
@@ -38,7 +38,6 @@ var throttleCodes = map[string]struct{}{
"ThrottlingException": {},
"RequestLimitExceeded": {},
"RequestThrottled": {},
- "LimitExceededException": {}, // Deleting 10+ DynamoDb tables at once
"TooManyRequestsException": {}, // Lambda functions
"PriorRequestNotComplete": {}, // Route53
}
@@ -71,8 +70,12 @@ func isCodeExpiredCreds(code string) bool {
}
var validParentCodes = map[string]struct{}{
- ErrCodeSerialization: struct{}{},
- ErrCodeRead: struct{}{},
+ ErrCodeSerialization: {},
+ ErrCodeRead: {},
+}
+
+type temporaryError interface {
+ Temporary() bool
}
func isNestedErrorRetryable(parentErr awserr.Error) bool {
@@ -93,6 +96,10 @@ func isNestedErrorRetryable(parentErr awserr.Error) bool {
return isCodeRetryable(aerr.Code())
}
+ if t, ok := err.(temporaryError); ok {
+ return t.Temporary()
+ }
+
return isErrConnectionReset(err)
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer_test.go
index b1926e3..a878748 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer_test.go
@@ -1,10 +1,10 @@
package request
import (
+ "errors"
+ "fmt"
"testing"
- "github.com/stretchr/testify/assert"
-
"github.com/aws/aws-sdk-go/aws/awserr"
)
@@ -12,5 +12,51 @@ func TestRequestThrottling(t *testing.T) {
req := Request{}
req.Error = awserr.New("Throttling", "", nil)
- assert.True(t, req.IsErrorThrottle())
+ if e, a := true, req.IsErrorThrottle(); e != a {
+ t.Errorf("expect %t to be throttled, was %t", e, a)
+ }
+}
+
+type mockTempError bool
+
+func (e mockTempError) Error() string {
+ return fmt.Sprintf("mock temporary error: %t", e.Temporary())
+}
+func (e mockTempError) Temporary() bool {
+ return bool(e)
+}
+
+func TestIsErrorRetryable(t *testing.T) {
+ cases := []struct {
+ Err error
+ IsTemp bool
+ }{
+ {
+ Err: awserr.New(ErrCodeSerialization, "temporary error", mockTempError(true)),
+ IsTemp: true,
+ },
+ {
+ Err: awserr.New(ErrCodeSerialization, "temporary error", mockTempError(false)),
+ IsTemp: false,
+ },
+ {
+ Err: awserr.New(ErrCodeSerialization, "some error", errors.New("blah")),
+ IsTemp: false,
+ },
+ {
+ Err: awserr.New("SomeError", "some error", nil),
+ IsTemp: false,
+ },
+ {
+ Err: awserr.New("RequestError", "some error", nil),
+ IsTemp: true,
+ },
+ }
+
+ for i, c := range cases {
+ retryable := IsErrorRetryable(c.Err)
+ if e, a := c.IsTemp, retryable; e != a {
+ t.Errorf("%d, expect %t temporary error, got %t", i, e, a)
+ }
+ }
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
index 2520286..4012462 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
@@ -220,7 +220,7 @@ type ErrParamMinLen struct {
func NewErrParamMinLen(field string, min int) *ErrParamMinLen {
return &ErrParamMinLen{
errInvalidParam: errInvalidParam{
- code: ParamMinValueErrCode,
+ code: ParamMinLenErrCode,
field: field,
msg: fmt.Sprintf("minimum field size of %v", min),
},
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 854b085..4601f88 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.
@@ -79,8 +79,9 @@ type Waiter struct {
MaxAttempts int
Delay WaiterDelay
- RequestOptions []Option
- NewRequest func([]Option) (*Request, error)
+ RequestOptions []Option
+ NewRequest func([]Option) (*Request, error)
+ SleepWithContext func(aws.Context, time.Duration) error
}
// ApplyOptions updates the waiter with the list of waiter options provided.
@@ -195,8 +196,15 @@ func (w Waiter) WaitWithContext(ctx aws.Context) error {
if sleepFn := req.Config.SleepDelay; sleepFn != nil {
// Support SleepDelay for backwards compatibility and testing
sleepFn(delay)
- } else if err := aws.SleepWithContext(ctx, delay); err != nil {
- return awserr.New(CanceledErrorCode, "waiter context canceled", err)
+ } else {
+ sleepCtxFn := w.SleepWithContext
+ if sleepCtxFn == nil {
+ sleepCtxFn = aws.SleepWithContext
+ }
+
+ if err := sleepCtxFn(ctx, delay); err != nil {
+ return awserr.New(CanceledErrorCode, "waiter context canceled", err)
+ }
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter_test.go b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter_test.go
index f49901b..db0f92d 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter_test.go
@@ -100,8 +100,9 @@ func TestWaiterPathAll(t *testing.T) {
})
w := request.Waiter{
- MaxAttempts: 10,
- Delay: request.ConstantWaiterDelay(0),
+ MaxAttempts: 10,
+ Delay: request.ConstantWaiterDelay(0),
+ SleepWithContext: aws.SleepWithContext,
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
@@ -164,8 +165,9 @@ func TestWaiterPath(t *testing.T) {
})
w := request.Waiter{
- MaxAttempts: 10,
- Delay: request.ConstantWaiterDelay(0),
+ MaxAttempts: 10,
+ Delay: request.ConstantWaiterDelay(0),
+ SleepWithContext: aws.SleepWithContext,
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
@@ -228,8 +230,9 @@ func TestWaiterFailure(t *testing.T) {
})
w := request.Waiter{
- MaxAttempts: 10,
- Delay: request.ConstantWaiterDelay(0),
+ MaxAttempts: 10,
+ Delay: request.ConstantWaiterDelay(0),
+ SleepWithContext: aws.SleepWithContext,
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
@@ -321,8 +324,9 @@ func TestWaiterError(t *testing.T) {
})
w := request.Waiter{
- MaxAttempts: 10,
- Delay: request.ConstantWaiterDelay(0),
+ MaxAttempts: 10,
+ Delay: request.ConstantWaiterDelay(0),
+ SleepWithContext: aws.SleepWithContext,
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
@@ -389,8 +393,9 @@ func TestWaiterStatus(t *testing.T) {
})
w := request.Waiter{
- MaxAttempts: 10,
- Delay: request.ConstantWaiterDelay(0),
+ MaxAttempts: 10,
+ Delay: request.ConstantWaiterDelay(0),
+ SleepWithContext: aws.SleepWithContext,
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
@@ -447,9 +452,10 @@ func TestWaiter_WithContextCanceled(t *testing.T) {
reqCount := 0
w := request.Waiter{
- Name: "TestWaiter",
- MaxAttempts: 10,
- Delay: request.ConstantWaiterDelay(1 * time.Millisecond),
+ Name: "TestWaiter",
+ MaxAttempts: 10,
+ Delay: request.ConstantWaiterDelay(1 * time.Millisecond),
+ SleepWithContext: aws.SleepWithContext,
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
@@ -475,6 +481,16 @@ func TestWaiter_WithContextCanceled(t *testing.T) {
},
}
+ w.SleepWithContext = func(c aws.Context, delay time.Duration) error {
+ context := c.(*awstesting.FakeContext)
+ select {
+ case <-context.DoneCh:
+ return context.Err()
+ default:
+ return nil
+ }
+ }
+
err := w.WaitWithContext(ctx)
if err == nil {
@@ -498,9 +514,10 @@ func TestWaiter_WithContext(t *testing.T) {
statuses := []int{http.StatusNotFound, http.StatusOK}
w := request.Waiter{
- Name: "TestWaiter",
- MaxAttempts: 10,
- Delay: request.ConstantWaiterDelay(1 * time.Millisecond),
+ Name: "TestWaiter",
+ MaxAttempts: 10,
+ Delay: request.ConstantWaiterDelay(1 * time.Millisecond),
+ SleepWithContext: aws.SleepWithContext,
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
@@ -543,9 +560,10 @@ func TestWaiter_AttemptsExpires(t *testing.T) {
reqCount := 0
w := request.Waiter{
- Name: "TestWaiter",
- MaxAttempts: 2,
- Delay: request.ConstantWaiterDelay(1 * time.Millisecond),
+ Name: "TestWaiter",
+ MaxAttempts: 2,
+ Delay: request.ConstantWaiterDelay(1 * time.Millisecond),
+ SleepWithContext: aws.SleepWithContext,
Acceptors: []request.WaiterAcceptor{
{
State: request.SuccessWaiterState,
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 8a5a3a0..a89c0af 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,158 +2,166 @@ 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)
+ defer awstesting.PopEnv(oldEnv)
- // 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) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
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)
+ defer awstesting.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)
+ defer awstesting.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{}
@@ -164,7 +172,7 @@ func (m *mockRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
func TestNewSession_WithCustomCABundle_UnsupportedTransport(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
s, err := NewSessionWithOptions(Options{
Config: aws.Config{
@@ -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)
+ defer awstesting.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 2fe35e7..ea7b886 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/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
index e6278a7..82e04d7 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
@@ -2,12 +2,15 @@ package session
import (
"os"
- "path/filepath"
"strconv"
"github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/defaults"
)
+// EnvProviderName provides a name of the provider when config is loaded from environment.
+const EnvProviderName = "EnvConfigCredentials"
+
// envConfig is a collection of environment values the SDK will read
// setup config from. All environment values are optional. But some values
// such as credentials require multiple values to be complete or the values
@@ -77,7 +80,7 @@ type envConfig struct {
SharedConfigFile string
// Sets the path to a custom Credentials Authroity (CA) Bundle PEM file
- // that the SDK will use instead of the the system's root CA bundle.
+ // that the SDK will use instead of the system's root CA bundle.
// Only use this if you want to configure the SDK to use a custom set
// of CAs.
//
@@ -93,9 +96,23 @@ type envConfig struct {
//
// AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
CustomCABundle string
+
+ csmEnabled string
+ CSMEnabled bool
+ CSMPort string
+ CSMClientID string
}
var (
+ csmEnabledEnvKey = []string{
+ "AWS_CSM_ENABLED",
+ }
+ csmPortEnvKey = []string{
+ "AWS_CSM_PORT",
+ }
+ csmClientIDEnvKey = []string{
+ "AWS_CSM_CLIENT_ID",
+ }
credAccessEnvKey = []string{
"AWS_ACCESS_KEY_ID",
"AWS_ACCESS_KEY",
@@ -116,6 +133,12 @@ var (
"AWS_PROFILE",
"AWS_DEFAULT_PROFILE", // Only read if AWS_SDK_LOAD_CONFIG is also set
}
+ sharedCredsFileEnvKey = []string{
+ "AWS_SHARED_CREDENTIALS_FILE",
+ }
+ sharedConfigFileEnvKey = []string{
+ "AWS_CONFIG_FILE",
+ }
)
// loadEnvConfig retrieves the SDK's environment configuration.
@@ -148,11 +171,17 @@ func envConfigLoad(enableSharedConfig bool) envConfig {
setFromEnvVal(&cfg.Creds.SecretAccessKey, credSecretEnvKey)
setFromEnvVal(&cfg.Creds.SessionToken, credSessionEnvKey)
+ // CSM environment variables
+ setFromEnvVal(&cfg.csmEnabled, csmEnabledEnvKey)
+ setFromEnvVal(&cfg.CSMPort, csmPortEnvKey)
+ setFromEnvVal(&cfg.CSMClientID, csmClientIDEnvKey)
+ cfg.CSMEnabled = len(cfg.csmEnabled) > 0
+
// Require logical grouping of credentials
if len(cfg.Creds.AccessKeyID) == 0 || len(cfg.Creds.SecretAccessKey) == 0 {
cfg.Creds = credentials.Value{}
} else {
- cfg.Creds.ProviderName = "EnvConfigCredentials"
+ cfg.Creds.ProviderName = EnvProviderName
}
regionKeys := regionEnvKeys
@@ -165,8 +194,15 @@ func envConfigLoad(enableSharedConfig bool) envConfig {
setFromEnvVal(&cfg.Region, regionKeys)
setFromEnvVal(&cfg.Profile, profileKeys)
- cfg.SharedCredentialsFile = sharedCredentialsFilename()
- cfg.SharedConfigFile = sharedConfigFilename()
+ setFromEnvVal(&cfg.SharedCredentialsFile, sharedCredsFileEnvKey)
+ setFromEnvVal(&cfg.SharedConfigFile, sharedConfigFileEnvKey)
+
+ if len(cfg.SharedCredentialsFile) == 0 {
+ cfg.SharedCredentialsFile = defaults.SharedCredentialsFilename()
+ }
+ if len(cfg.SharedConfigFile) == 0 {
+ cfg.SharedConfigFile = defaults.SharedConfigFilename()
+ }
cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE")
@@ -181,28 +217,3 @@ func setFromEnvVal(dst *string, keys []string) {
}
}
}
-
-func sharedCredentialsFilename() string {
- if name := os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(name) > 0 {
- return name
- }
-
- return filepath.Join(userHomeDir(), ".aws", "credentials")
-}
-
-func sharedConfigFilename() string {
- if name := os.Getenv("AWS_CONFIG_FILE"); len(name) > 0 {
- return name
- }
-
- return filepath.Join(userHomeDir(), ".aws", "config")
-}
-
-func userHomeDir() string {
- homeDir := os.Getenv("HOME") // *nix
- if len(homeDir) == 0 { // windows
- homeDir = os.Getenv("USERPROFILE")
- }
-
- return homeDir
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go
index 162a710..3a0b646 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config_test.go
@@ -2,17 +2,17 @@ package session
import (
"os"
- "path/filepath"
- "strings"
+ "reflect"
"testing"
"github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/stretchr/testify/assert"
+ "github.com/aws/aws-sdk-go/awstesting"
+ "github.com/aws/aws-sdk-go/internal/shareddefaults"
)
func TestLoadEnvConfig_Creds(t *testing.T) {
- env := stashEnv()
- defer popEnv(env)
+ env := awstesting.StashEnv()
+ defer awstesting.PopEnv(env)
cases := []struct {
Env map[string]string
@@ -83,26 +83,32 @@ func TestLoadEnvConfig_Creds(t *testing.T) {
}
cfg := loadEnvConfig()
- assert.Equal(t, c.Val, cfg.Creds)
+ if !reflect.DeepEqual(c.Val, cfg.Creds) {
+ t.Errorf("expect credentials to match.\n%s",
+ awstesting.SprintExpectActual(c.Val, cfg.Creds))
+ }
}
}
func TestLoadEnvConfig(t *testing.T) {
- env := stashEnv()
- defer popEnv(env)
+ env := awstesting.StashEnv()
+ defer awstesting.PopEnv(env)
cases := []struct {
Env map[string]string
- Region, Profile string
- CustomCABundle string
UseSharedConfigCall bool
+ Config envConfig
}{
{
Env: map[string]string{
"AWS_REGION": "region",
"AWS_PROFILE": "profile",
},
- Region: "region", Profile: "profile",
+ Config: envConfig{
+ Region: "region", Profile: "profile",
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
},
{
Env: map[string]string{
@@ -111,7 +117,11 @@ func TestLoadEnvConfig(t *testing.T) {
"AWS_PROFILE": "profile",
"AWS_DEFAULT_PROFILE": "default_profile",
},
- Region: "region", Profile: "profile",
+ Config: envConfig{
+ Region: "region", Profile: "profile",
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
},
{
Env: map[string]string{
@@ -121,13 +131,22 @@ func TestLoadEnvConfig(t *testing.T) {
"AWS_DEFAULT_PROFILE": "default_profile",
"AWS_SDK_LOAD_CONFIG": "1",
},
- Region: "region", Profile: "profile",
+ Config: envConfig{
+ Region: "region", Profile: "profile",
+ EnableSharedConfig: true,
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
},
{
Env: map[string]string{
"AWS_DEFAULT_REGION": "default_region",
"AWS_DEFAULT_PROFILE": "default_profile",
},
+ Config: envConfig{
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
},
{
Env: map[string]string{
@@ -135,14 +154,24 @@ func TestLoadEnvConfig(t *testing.T) {
"AWS_DEFAULT_PROFILE": "default_profile",
"AWS_SDK_LOAD_CONFIG": "1",
},
- Region: "default_region", Profile: "default_profile",
+ Config: envConfig{
+ Region: "default_region", Profile: "default_profile",
+ EnableSharedConfig: true,
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
},
{
Env: map[string]string{
"AWS_REGION": "region",
"AWS_PROFILE": "profile",
},
- Region: "region", Profile: "profile",
+ Config: envConfig{
+ Region: "region", Profile: "profile",
+ EnableSharedConfig: true,
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
UseSharedConfigCall: true,
},
{
@@ -152,7 +181,12 @@ func TestLoadEnvConfig(t *testing.T) {
"AWS_PROFILE": "profile",
"AWS_DEFAULT_PROFILE": "default_profile",
},
- Region: "region", Profile: "profile",
+ Config: envConfig{
+ Region: "region", Profile: "profile",
+ EnableSharedConfig: true,
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
UseSharedConfigCall: true,
},
{
@@ -163,7 +197,12 @@ func TestLoadEnvConfig(t *testing.T) {
"AWS_DEFAULT_PROFILE": "default_profile",
"AWS_SDK_LOAD_CONFIG": "1",
},
- Region: "region", Profile: "profile",
+ Config: envConfig{
+ Region: "region", Profile: "profile",
+ EnableSharedConfig: true,
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
UseSharedConfigCall: true,
},
{
@@ -171,7 +210,12 @@ func TestLoadEnvConfig(t *testing.T) {
"AWS_DEFAULT_REGION": "default_region",
"AWS_DEFAULT_PROFILE": "default_profile",
},
- Region: "default_region", Profile: "default_profile",
+ Config: envConfig{
+ Region: "default_region", Profile: "default_profile",
+ EnableSharedConfig: true,
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
UseSharedConfigCall: true,
},
{
@@ -180,22 +224,46 @@ func TestLoadEnvConfig(t *testing.T) {
"AWS_DEFAULT_PROFILE": "default_profile",
"AWS_SDK_LOAD_CONFIG": "1",
},
- Region: "default_region", Profile: "default_profile",
+ Config: envConfig{
+ Region: "default_region", Profile: "default_profile",
+ EnableSharedConfig: true,
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
UseSharedConfigCall: true,
},
{
Env: map[string]string{
"AWS_CA_BUNDLE": "custom_ca_bundle",
},
- CustomCABundle: "custom_ca_bundle",
+ Config: envConfig{
+ CustomCABundle: "custom_ca_bundle",
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
},
{
Env: map[string]string{
"AWS_CA_BUNDLE": "custom_ca_bundle",
},
- CustomCABundle: "custom_ca_bundle",
+ Config: envConfig{
+ CustomCABundle: "custom_ca_bundle",
+ EnableSharedConfig: true,
+ SharedCredentialsFile: shareddefaults.SharedCredentialsFilename(),
+ SharedConfigFile: shareddefaults.SharedConfigFilename(),
+ },
UseSharedConfigCall: true,
},
+ {
+ Env: map[string]string{
+ "AWS_SHARED_CREDENTIALS_FILE": "/path/to/credentials/file",
+ "AWS_CONFIG_FILE": "/path/to/config/file",
+ },
+ Config: envConfig{
+ SharedCredentialsFile: "/path/to/credentials/file",
+ SharedConfigFile: "/path/to/config/file",
+ },
+ },
}
for _, c := range cases {
@@ -212,55 +280,16 @@ func TestLoadEnvConfig(t *testing.T) {
cfg = loadEnvConfig()
}
- assert.Equal(t, c.Region, cfg.Region)
- assert.Equal(t, c.Profile, cfg.Profile)
- assert.Equal(t, c.CustomCABundle, cfg.CustomCABundle)
+ if !reflect.DeepEqual(c.Config, cfg) {
+ t.Errorf("expect config to match.\n%s",
+ awstesting.SprintExpectActual(c.Config, cfg))
+ }
}
}
-func TestSharedCredsFilename(t *testing.T) {
- env := stashEnv()
- defer popEnv(env)
-
- os.Setenv("USERPROFILE", "profile_dir")
- expect := filepath.Join("profile_dir", ".aws", "credentials")
- name := sharedCredentialsFilename()
- assert.Equal(t, expect, name)
-
- os.Setenv("HOME", "home_dir")
- expect = filepath.Join("home_dir", ".aws", "credentials")
- name = sharedCredentialsFilename()
- assert.Equal(t, expect, name)
-
- expect = filepath.Join("path/to/credentials/file")
- os.Setenv("AWS_SHARED_CREDENTIALS_FILE", expect)
- name = sharedCredentialsFilename()
- assert.Equal(t, expect, name)
-}
-
-func TestSharedConfigFilename(t *testing.T) {
- env := stashEnv()
- defer popEnv(env)
-
- os.Setenv("USERPROFILE", "profile_dir")
- expect := filepath.Join("profile_dir", ".aws", "config")
- name := sharedConfigFilename()
- assert.Equal(t, expect, name)
-
- os.Setenv("HOME", "home_dir")
- expect = filepath.Join("home_dir", ".aws", "config")
- name = sharedConfigFilename()
- assert.Equal(t, expect, name)
-
- expect = filepath.Join("path/to/config/file")
- os.Setenv("AWS_CONFIG_FILE", expect)
- name = sharedConfigFilename()
- assert.Equal(t, expect, name)
-}
-
func TestSetEnvValue(t *testing.T) {
- env := stashEnv()
- defer popEnv(env)
+ env := awstesting.StashEnv()
+ defer awstesting.PopEnv(env)
os.Setenv("empty_key", "")
os.Setenv("second_key", "2")
@@ -271,21 +300,7 @@ func TestSetEnvValue(t *testing.T) {
"empty_key", "first_key", "second_key", "third_key",
})
- assert.Equal(t, "2", dst)
-}
-
-func stashEnv() []string {
- env := os.Environ()
- os.Clearenv()
-
- return env
-}
-
-func popEnv(env []string) {
- os.Clearenv()
-
- for _, e := range env {
- p := strings.SplitN(e, "=", 2)
- os.Setenv(p[0], p[1])
+ if e, a := "2", dst; e != a {
+ t.Errorf("expect %s value from environment, got %s", e, a)
}
}
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 4792d3a..51f3055 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
@@ -15,6 +15,7 @@ import (
"github.com/aws/aws-sdk-go/aws/corehandlers"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
+ "github.com/aws/aws-sdk-go/aws/csm"
"github.com/aws/aws-sdk-go/aws/defaults"
"github.com/aws/aws-sdk-go/aws/endpoints"
"github.com/aws/aws-sdk-go/aws/request"
@@ -26,7 +27,7 @@ import (
// Sessions are safe to create service clients concurrently, but it is not safe
// to mutate the Session concurrently.
//
-// The Session satisfies the service client's client.ClientConfigProvider.
+// The Session satisfies the service client's client.ConfigProvider.
type Session struct {
Config *aws.Config
Handlers request.Handlers
@@ -58,7 +59,12 @@ func New(cfgs ...*aws.Config) *Session {
envCfg := loadEnvConfig()
if envCfg.EnableSharedConfig {
- s, err := newSession(Options{}, envCfg, cfgs...)
+ var cfg aws.Config
+ cfg.MergeIn(cfgs...)
+ s, err := NewSessionWithOptions(Options{
+ Config: cfg,
+ SharedConfigState: SharedConfigEnable,
+ })
if err != nil {
// Old session.New expected all errors to be discovered when
// a request is made, and would report the errors then. This
@@ -76,10 +82,16 @@ func New(cfgs ...*aws.Config) *Session {
r.Error = err
})
}
+
return s
}
- return deprecatedNewSession(cfgs...)
+ s := deprecatedNewSession(cfgs...)
+ if envCfg.CSMEnabled {
+ enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger)
+ }
+
+ return s
}
// NewSession returns a new Session created from SDK defaults, config files,
@@ -155,6 +167,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
@@ -291,10 +307,22 @@ func deprecatedNewSession(cfgs ...*aws.Config) *Session {
}
initHandlers(s)
-
return s
}
+func enableCSM(handlers *request.Handlers, clientID string, port string, logger aws.Logger) {
+ logger.Log("Enabling CSM")
+ if len(port) == 0 {
+ port = csm.DefaultPort
+ }
+
+ r, err := csm.Start(clientID, "127.0.0.1:"+port)
+ if err != nil {
+ return
+ }
+ r.InjectHandlers(handlers)
+}
+
func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, error) {
cfg := defaults.Config()
handlers := defaults.Handlers()
@@ -304,13 +332,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)
@@ -329,6 +362,9 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session,
}
initHandlers(s)
+ if envCfg.CSMEnabled {
+ enableCSM(&s.Handlers, envCfg.CSMClientID, envCfg.CSMPort, s.Config.Logger)
+ }
// Setup HTTP client with custom cert bundle if enabled
if opts.CustomCABundle != nil {
@@ -557,11 +593,12 @@ func (s *Session) clientConfigWithErr(serviceName string, cfgs ...*aws.Config) (
}
return client.Config{
- Config: s.Config,
- Handlers: s.Handlers,
- Endpoint: resolved.URL,
- SigningRegion: resolved.SigningRegion,
- SigningName: resolved.SigningName,
+ Config: s.Config,
+ Handlers: s.Handlers,
+ Endpoint: resolved.URL,
+ SigningRegion: resolved.SigningRegion,
+ SigningNameDerived: resolved.SigningNameDerived,
+ SigningName: resolved.SigningName,
}, err
}
@@ -581,10 +618,11 @@ func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Conf
}
return client.Config{
- Config: s.Config,
- Handlers: s.Handlers,
- Endpoint: resolved.URL,
- SigningRegion: resolved.SigningRegion,
- SigningName: resolved.SigningName,
+ Config: s.Config,
+ Handlers: s.Handlers,
+ Endpoint: resolved.URL,
+ SigningRegion: resolved.SigningRegion,
+ SigningNameDerived: resolved.SigningNameDerived,
+ SigningName: resolved.SigningName,
}
}
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 877af02..9612b31 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
@@ -14,12 +14,14 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/defaults"
+ "github.com/aws/aws-sdk-go/aws/endpoints"
+ "github.com/aws/aws-sdk-go/awstesting"
"github.com/aws/aws-sdk-go/service/s3"
)
func TestNewDefaultSession(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
s := New(&aws.Config{Region: aws.String("region")})
@@ -31,7 +33,7 @@ func TestNewDefaultSession(t *testing.T) {
func TestNew_WithCustomCreds(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
customCreds := credentials.NewStaticCredentials("AKID", "SECRET", "TOKEN")
s := New(&aws.Config{Credentials: customCreds})
@@ -49,7 +51,7 @@ func (w mockLogger) Log(args ...interface{}) {
func TestNew_WithSessionLoadError(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
os.Setenv("AWS_CONFIG_FILE", testConfigFilename)
@@ -72,7 +74,7 @@ func TestNew_WithSessionLoadError(t *testing.T) {
func TestSessionCopy(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_REGION", "orig_region")
@@ -88,19 +90,36 @@ func TestSessionCopy(t *testing.T) {
}
func TestSessionClientConfig(t *testing.T) {
- s, err := NewSession(&aws.Config{Region: aws.String("orig_region")})
+ s, err := NewSession(&aws.Config{
+ Credentials: credentials.AnonymousCredentials,
+ Region: aws.String("orig_region"),
+ EndpointResolver: endpoints.ResolverFunc(
+ func(service, region string, opts ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) {
+ if e, a := "mock-service", service; e != a {
+ t.Errorf("expect %q service, got %q", e, a)
+ }
+ if e, a := "other-region", region; e != a {
+ t.Errorf("expect %q region, got %q", e, a)
+ }
+ return endpoints.ResolvedEndpoint{
+ URL: "https://" + service + "." + region + ".amazonaws.com",
+ SigningRegion: region,
+ }, nil
+ },
+ ),
+ })
assert.NoError(t, err)
- cfg := s.ClientConfig("s3", &aws.Config{Region: aws.String("us-west-2")})
+ cfg := s.ClientConfig("mock-service", &aws.Config{Region: aws.String("other-region")})
- assert.Equal(t, "https://s3-us-west-2.amazonaws.com", cfg.Endpoint)
- assert.Equal(t, "us-west-2", cfg.SigningRegion)
- assert.Equal(t, "us-west-2", *cfg.Config.Region)
+ assert.Equal(t, "https://mock-service.other-region.amazonaws.com", cfg.Endpoint)
+ assert.Equal(t, "other-region", cfg.SigningRegion)
+ assert.Equal(t, "other-region", *cfg.Config.Region)
}
func TestNewSession_NoCredentials(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
s, err := NewSession()
assert.NoError(t, err)
@@ -111,7 +130,7 @@ func TestNewSession_NoCredentials(t *testing.T) {
func TestNewSessionWithOptions_OverrideProfile(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
@@ -134,7 +153,7 @@ func TestNewSessionWithOptions_OverrideProfile(t *testing.T) {
func TestNewSessionWithOptions_OverrideSharedConfigEnable(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_SDK_LOAD_CONFIG", "0")
os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
@@ -157,7 +176,7 @@ func TestNewSessionWithOptions_OverrideSharedConfigEnable(t *testing.T) {
func TestNewSessionWithOptions_OverrideSharedConfigDisable(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
@@ -178,6 +197,29 @@ func TestNewSessionWithOptions_OverrideSharedConfigDisable(t *testing.T) {
assert.Contains(t, creds.ProviderName, "SharedConfigCredentials")
}
+func TestNewSessionWithOptions_OverrideSharedConfigFiles(t *testing.T) {
+ oldEnv := initSessionTestEnv()
+ defer awstesting.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
@@ -235,7 +277,7 @@ func TestNewSessionWithOptions_Overrides(t *testing.T) {
for _, c := range cases {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
for k, v := range c.InEnvs {
os.Setenv(k, v)
@@ -279,7 +321,7 @@ const assumeRoleRespMsg = `
func TestSesisonAssumeRole(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_REGION", "us-east-1")
os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
@@ -302,7 +344,7 @@ func TestSesisonAssumeRole(t *testing.T) {
func TestSessionAssumeRole_WithMFA(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_REGION", "us-east-1")
os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
@@ -345,7 +387,7 @@ func TestSessionAssumeRole_WithMFA(t *testing.T) {
func TestSessionAssumeRole_WithMFA_NoTokenProvider(t *testing.T) {
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_REGION", "us-east-1")
os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
@@ -363,7 +405,7 @@ func TestSessionAssumeRole_DisableSharedConfig(t *testing.T) {
// Backwards compatibility with Shared config disabled
// assume role should not be built into the config.
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_SDK_LOAD_CONFIG", "0")
os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
@@ -383,7 +425,7 @@ func TestSessionAssumeRole_InvalidSourceProfile(t *testing.T) {
// Backwards compatibility with Shared config disabled
// assume role should not be built into the config.
oldEnv := initSessionTestEnv()
- defer popEnv(oldEnv)
+ defer awstesting.PopEnv(oldEnv)
os.Setenv("AWS_SDK_LOAD_CONFIG", "1")
os.Setenv("AWS_SHARED_CREDENTIALS_FILE", testConfigFilename)
@@ -396,7 +438,7 @@ func TestSessionAssumeRole_InvalidSourceProfile(t *testing.T) {
}
func initSessionTestEnv() (oldEnv []string) {
- oldEnv = stashEnv()
+ oldEnv = awstesting.StashEnv()
os.Setenv("AWS_CONFIG_FILE", "file_not_exists")
os.Setenv("AWS_SHARED_CREDENTIALS_FILE", "file_not_exists")
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
index b58076f..09c8e5b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
@@ -113,7 +113,7 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) {
f, err := ini.Load(b)
if err != nil {
- return nil, SharedConfigLoadError{Filename: filename}
+ return nil, SharedConfigLoadError{Filename: filename, Err: err}
}
files = append(files, sharedConfigFile{
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config b/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config
deleted file mode 100644
index 8705608..0000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config
+++ /dev/null
@@ -1,65 +0,0 @@
-[default]
-s3 =
- unsupported_key=123
- other_unsupported=abc
-
-region = default_region
-
-[profile alt_profile_name]
-region = alt_profile_name_region
-
-[short_profile_name_first]
-region = short_profile_name_first_short
-
-[profile short_profile_name_first]
-region = short_profile_name_first_alt
-
-[partial_creds]
-aws_access_key_id = partial_creds_akid
-
-[complete_creds]
-aws_access_key_id = complete_creds_akid
-aws_secret_access_key = complete_creds_secret
-
-[complete_creds_with_token]
-aws_access_key_id = complete_creds_with_token_akid
-aws_secret_access_key = complete_creds_with_token_secret
-aws_session_token = complete_creds_with_token_token
-
-[full_profile]
-aws_access_key_id = full_profile_akid
-aws_secret_access_key = full_profile_secret
-region = full_profile_region
-
-[config_file_load_order]
-region = shared_config_region
-aws_access_key_id = shared_config_akid
-aws_secret_access_key = shared_config_secret
-
-[partial_assume_role]
-role_arn = partial_assume_role_role_arn
-
-[assume_role]
-role_arn = assume_role_role_arn
-source_profile = complete_creds
-
-[assume_role_w_mfa]
-role_arn = assume_role_role_arn
-source_profile = complete_creds
-mfa_serial = 0123456789
-
-[assume_role_invalid_source_profile]
-role_arn = assume_role_invalid_source_profile_role_arn
-source_profile = profile_not_exists
-
-[assume_role_w_creds]
-role_arn = assume_role_w_creds_role_arn
-source_profile = assume_role_w_creds
-external_id = 1234
-role_session_name = assume_role_w_creds_session_name
-aws_access_key_id = assume_role_w_creds_akid
-aws_secret_access_key = assume_role_w_creds_secret
-
-[assume_role_wo_creds]
-role_arn = assume_role_wo_creds_role_arn
-source_profile = assume_role_wo_creds
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_invalid_ini b/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_invalid_ini
deleted file mode 100644
index 4db0389..0000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_invalid_ini
+++ /dev/null
@@ -1 +0,0 @@
-[profile_nam
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_other b/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_other
deleted file mode 100644
index 615831b..0000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/testdata/shared_config_other
+++ /dev/null
@@ -1,17 +0,0 @@
-[default]
-region = default_region
-
-[partial_creds]
-aws_access_key_id = AKID
-
-[profile alt_profile_name]
-region = alt_profile_name_region
-
-[creds_from_credentials]
-aws_access_key_id = creds_from_config_akid
-aws_secret_access_key = creds_from_config_secret
-
-[config_file_load_order]
-region = shared_config_other_region
-aws_access_key_id = shared_config_other_akid
-aws_secret_access_key = shared_config_other_secret
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go
index 2d4621c..2e591c2 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_1_5_test.go
@@ -10,7 +10,6 @@ import (
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/awstesting/unit"
- "github.com/stretchr/testify/assert"
)
func TestStandaloneSign(t *testing.T) {
@@ -22,7 +21,9 @@ func TestStandaloneSign(t *testing.T) {
c.SubDomain, c.Region, c.Service)
req, err := http.NewRequest("GET", host, nil)
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
// URL.EscapedPath() will be used by the signer to get the
// escaped form of the request's URI path.
@@ -30,12 +31,20 @@ func TestStandaloneSign(t *testing.T) {
req.URL.RawQuery = c.OrigQuery
_, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0))
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
actual := req.Header.Get("Authorization")
- assert.Equal(t, c.ExpSig, actual)
- assert.Equal(t, c.OrigURI, req.URL.Path)
- assert.Equal(t, c.EscapedURI, req.URL.EscapedPath())
+ if e, a := c.ExpSig, actual; e != a {
+ t.Errorf("expected %v, but recieved %v", e, a)
+ }
+ if e, a := c.OrigURI, req.URL.Path; e != a {
+ t.Errorf("expected %v, but recieved %v", e, a)
+ }
+ if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a {
+ t.Errorf("expected %v, but recieved %v", e, a)
+ }
}
}
@@ -48,7 +57,9 @@ func TestStandaloneSign_RawPath(t *testing.T) {
c.SubDomain, c.Region, c.Service)
req, err := http.NewRequest("GET", host, nil)
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
// URL.EscapedPath() will be used by the signer to get the
// escaped form of the request's URI path.
@@ -57,11 +68,19 @@ func TestStandaloneSign_RawPath(t *testing.T) {
req.URL.RawQuery = c.OrigQuery
_, err = signer.Sign(req, nil, c.Service, c.Region, time.Unix(0, 0))
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
actual := req.Header.Get("Authorization")
- assert.Equal(t, c.ExpSig, actual)
- assert.Equal(t, c.OrigURI, req.URL.Path)
- assert.Equal(t, c.EscapedURI, req.URL.EscapedPath())
+ if e, a := c.ExpSig, actual; e != a {
+ t.Errorf("expected %v, but recieved %v", e, a)
+ }
+ if e, a := c.OrigURI, req.URL.Path; e != a {
+ t.Errorf("expected %v, but recieved %v", e, a)
+ }
+ if e, a := c.EscapedURI, req.URL.EscapedPath(); e != a {
+ t.Errorf("expected %v, but recieved %v", e, a)
+ }
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go
index 9b6b0be..93d664b 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/functional_test.go
@@ -3,6 +3,8 @@ package v4_test
import (
"net/http"
"net/url"
+ "reflect"
+ "strings"
"testing"
"time"
@@ -10,7 +12,6 @@ import (
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/s3"
- "github.com/stretchr/testify/assert"
)
var standaloneSignCases = []struct {
@@ -40,24 +41,43 @@ func TestPresignHandler(t *testing.T) {
req.Time = time.Unix(0, 0)
urlstr, err := req.Presign(5 * time.Minute)
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
expectedHost := "bucket.s3.mock-region.amazonaws.com"
expectedDate := "19700101T000000Z"
expectedHeaders := "content-disposition;host;x-amz-acl"
- expectedSig := "2d76a414208c0eac2a23ef9c834db9635ecd5a0fbb447a00ad191f82d854f55b"
+ expectedSig := "a46583256431b09eb45ba4af2e6286d96a9835ed13721023dc8076dfdcb90fcb"
expectedCred := "AKID/19700101/mock-region/s3/aws4_request"
u, _ := url.Parse(urlstr)
urlQ := u.Query()
- assert.Equal(t, expectedHost, u.Host)
- assert.Equal(t, expectedSig, urlQ.Get("X-Amz-Signature"))
- assert.Equal(t, expectedCred, urlQ.Get("X-Amz-Credential"))
- assert.Equal(t, expectedHeaders, urlQ.Get("X-Amz-SignedHeaders"))
- assert.Equal(t, expectedDate, urlQ.Get("X-Amz-Date"))
- assert.Equal(t, "300", urlQ.Get("X-Amz-Expires"))
-
- assert.NotContains(t, urlstr, "+") // + encoded as %20
+ if e, a := expectedHost, u.Host; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedSig, urlQ.Get("X-Amz-Signature"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedCred, urlQ.Get("X-Amz-Credential"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedHeaders, urlQ.Get("X-Amz-SignedHeaders"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedDate, urlQ.Get("X-Amz-Date"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "300", urlQ.Get("X-Amz-Expires"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "UNSIGNED-PAYLOAD", urlQ.Get("X-Amz-Content-Sha256"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+
+ if e, a := "+", urlstr; strings.Contains(a, e) { // + encoded as %20
+ t.Errorf("expect %v not to be in %v", e, a)
+ }
}
func TestPresignRequest(t *testing.T) {
@@ -71,30 +91,50 @@ func TestPresignRequest(t *testing.T) {
req.Time = time.Unix(0, 0)
urlstr, headers, err := req.PresignRequest(5 * time.Minute)
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
expectedHost := "bucket.s3.mock-region.amazonaws.com"
expectedDate := "19700101T000000Z"
- expectedHeaders := "content-disposition;host;x-amz-acl;x-amz-content-sha256"
- expectedSig := "a5b2b500dfbf2eab5b4f55bec3e3752e04536ea1d5c047aa93bc9f1130a72cd2"
+ expectedHeaders := "content-disposition;host;x-amz-acl"
+ expectedSig := "a46583256431b09eb45ba4af2e6286d96a9835ed13721023dc8076dfdcb90fcb"
expectedCred := "AKID/19700101/mock-region/s3/aws4_request"
expectedHeaderMap := http.Header{
- "x-amz-acl": []string{"public-read"},
- "content-disposition": []string{"a+b c$d"},
- "x-amz-content-sha256": []string{"UNSIGNED-PAYLOAD"},
+ "x-amz-acl": []string{"public-read"},
+ "content-disposition": []string{"a+b c$d"},
}
u, _ := url.Parse(urlstr)
urlQ := u.Query()
- assert.Equal(t, expectedHost, u.Host)
- assert.Equal(t, expectedSig, urlQ.Get("X-Amz-Signature"))
- assert.Equal(t, expectedCred, urlQ.Get("X-Amz-Credential"))
- assert.Equal(t, expectedHeaders, urlQ.Get("X-Amz-SignedHeaders"))
- assert.Equal(t, expectedDate, urlQ.Get("X-Amz-Date"))
- assert.Equal(t, expectedHeaderMap, headers)
- assert.Equal(t, "300", urlQ.Get("X-Amz-Expires"))
-
- assert.NotContains(t, urlstr, "+") // + encoded as %20
+ if e, a := expectedHost, u.Host; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedSig, urlQ.Get("X-Amz-Signature"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedCred, urlQ.Get("X-Amz-Credential"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedHeaders, urlQ.Get("X-Amz-SignedHeaders"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedDate, urlQ.Get("X-Amz-Date"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedHeaderMap, headers; !reflect.DeepEqual(e, a) {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "300", urlQ.Get("X-Amz-Expires"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := "UNSIGNED-PAYLOAD", urlQ.Get("X-Amz-Content-Sha256"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+
+ if e, a := "+", urlstr; strings.Contains(a, e) { // + encoded as %20
+ t.Errorf("expect %v not to be in %v", e, a)
+ }
}
func TestStandaloneSign_CustomURIEscape(t *testing.T) {
@@ -107,14 +147,108 @@ func TestStandaloneSign_CustomURIEscape(t *testing.T) {
host := "https://subdomain.us-east-1.es.amazonaws.com"
req, err := http.NewRequest("GET", host, nil)
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
req.URL.Path = `/log-*/_search`
req.URL.Opaque = "//subdomain.us-east-1.es.amazonaws.com/log-%2A/_search"
_, err = signer.Sign(req, nil, "es", "us-east-1", time.Unix(0, 0))
- assert.NoError(t, err)
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
actual := req.Header.Get("Authorization")
- assert.Equal(t, expectSig, actual)
+ if e, a := expectSig, actual; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+}
+
+func TestStandaloneSign_WithPort(t *testing.T) {
+
+ cases := []struct {
+ description string
+ url string
+ expectedSig string
+ }{
+ {
+ "default HTTPS port",
+ "https://estest.us-east-1.es.amazonaws.com:443/_search",
+ "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=e573fc9aa3a156b720976419319be98fb2824a3abc2ddd895ecb1d1611c6a82d",
+ },
+ {
+ "default HTTP port",
+ "http://example.com:80/_search",
+ "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=54ebe60c4ae03a40948b849e13c333523235f38002e2807059c64a9a8c7cb951",
+ },
+ {
+ "non-standard HTTP port",
+ "http://example.com:9200/_search",
+ "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=cd9d926a460f8d3b58b57beadbd87666dc667e014c0afaa4cea37b2867f51b4f",
+ },
+ {
+ "non-standard HTTPS port",
+ "https://example.com:9200/_search",
+ "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/es/aws4_request, SignedHeaders=host;x-amz-date;x-amz-security-token, Signature=cd9d926a460f8d3b58b57beadbd87666dc667e014c0afaa4cea37b2867f51b4f",
+ },
+ }
+
+ for _, c := range cases {
+ signer := v4.NewSigner(unit.Session.Config.Credentials)
+ req, _ := http.NewRequest("GET", c.url, nil)
+ _, err := signer.Sign(req, nil, "es", "us-east-1", time.Unix(0, 0))
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+
+ actual := req.Header.Get("Authorization")
+ if e, a := c.expectedSig, actual; e != a {
+ t.Errorf("%s, expect %v, got %v", c.description, e, a)
+ }
+ }
+}
+
+func TestStandalonePresign_WithPort(t *testing.T) {
+
+ cases := []struct {
+ description string
+ url string
+ expectedSig string
+ }{
+ {
+ "default HTTPS port",
+ "https://estest.us-east-1.es.amazonaws.com:443/_search",
+ "0abcf61a351063441296febf4b485734d780634fba8cf1e7d9769315c35255d6",
+ },
+ {
+ "default HTTP port",
+ "http://example.com:80/_search",
+ "fce9976dd6c849c21adfa6d3f3e9eefc651d0e4a2ccd740d43efddcccfdc8179",
+ },
+ {
+ "non-standard HTTP port",
+ "http://example.com:9200/_search",
+ "f33c25a81c735e42bef35ed5e9f720c43940562e3e616ff0777bf6dde75249b0",
+ },
+ {
+ "non-standard HTTPS port",
+ "https://example.com:9200/_search",
+ "f33c25a81c735e42bef35ed5e9f720c43940562e3e616ff0777bf6dde75249b0",
+ },
+ }
+
+ for _, c := range cases {
+ signer := v4.NewSigner(unit.Session.Config.Credentials)
+ req, _ := http.NewRequest("GET", c.url, nil)
+ _, err := signer.Presign(req, nil, "es", "us-east-1", 5 * time.Minute, time.Unix(0, 0))
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+
+ actual := req.URL.Query().Get("X-Amz-Signature")
+ if e, a := c.expectedSig, actual; e != a {
+ t.Errorf("%s, expect %v, got %v", c.description, e, a)
+ }
+ }
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go
index 7dfddc8..f4be951 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules_test.go
@@ -2,8 +2,6 @@ package v4
import (
"testing"
-
- "github.com/stretchr/testify/assert"
)
func TestRuleCheckWhitelist(t *testing.T) {
@@ -13,8 +11,12 @@ func TestRuleCheckWhitelist(t *testing.T) {
},
}
- assert.True(t, w.IsValid("Cache-Control"))
- assert.False(t, w.IsValid("Cache-"))
+ if !w.IsValid("Cache-Control") {
+ t.Error("expected true value")
+ }
+ if w.IsValid("Cache-") {
+ t.Error("expected false value")
+ }
}
func TestRuleCheckBlacklist(t *testing.T) {
@@ -24,16 +26,26 @@ func TestRuleCheckBlacklist(t *testing.T) {
},
}
- assert.False(t, b.IsValid("Cache-Control"))
- assert.True(t, b.IsValid("Cache-"))
+ if b.IsValid("Cache-Control") {
+ t.Error("expected false value")
+ }
+ if !b.IsValid("Cache-") {
+ t.Error("expected true value")
+ }
}
func TestRuleCheckPattern(t *testing.T) {
p := patterns{"X-Amz-Meta-"}
- assert.True(t, p.IsValid("X-Amz-Meta-"))
- assert.True(t, p.IsValid("X-Amz-Meta-Star"))
- assert.False(t, p.IsValid("Cache-"))
+ if !p.IsValid("X-Amz-Meta-") {
+ t.Error("expected true value")
+ }
+ if !p.IsValid("X-Amz-Meta-Star") {
+ t.Error("expected true value")
+ }
+ if p.IsValid("Cache-") {
+ t.Error("expected false value")
+ }
}
func TestRuleComplexWhitelist(t *testing.T) {
@@ -50,8 +62,16 @@ func TestRuleComplexWhitelist(t *testing.T) {
inclusiveRules{patterns{"X-Amz-"}, blacklist{w}},
}
- assert.True(t, r.IsValid("X-Amz-Blah"))
- assert.False(t, r.IsValid("X-Amz-Meta-"))
- assert.False(t, r.IsValid("X-Amz-Meta-Star"))
- assert.False(t, r.IsValid("Cache-Control"))
+ if !r.IsValid("X-Amz-Blah") {
+ t.Error("expected true value")
+ }
+ if r.IsValid("X-Amz-Meta-") {
+ t.Error("expected false value")
+ }
+ if r.IsValid("X-Amz-Meta-Star") {
+ t.Error("expected false value")
+ }
+ if r.IsValid("Cache-Control") {
+ t.Error("expected false value")
+ }
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
index 434ac87..6e46376 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
@@ -45,7 +45,7 @@
// If signing a request intended for HTTP2 server, and you're using Go 1.6.2
// through 1.7.4 you should use the URL.RawPath as the pre-escaped form of the
// request URL. https://github.com/golang/go/issues/16847 points to a bug in
-// Go pre 1.8 that failes to make HTTP2 requests using absolute URL in the HTTP
+// Go pre 1.8 that fails to make HTTP2 requests using absolute URL in the HTTP
// message. URL.Opaque generally will force Go to make requests with absolute URL.
// URL.RawPath does not do this, but RawPath must be a valid escaping of Path
// or url.EscapedPath will ignore the RawPath escaping.
@@ -55,7 +55,6 @@
package v4
import (
- "bytes"
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
@@ -72,6 +71,7 @@ import (
"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/internal/sdkio"
"github.com/aws/aws-sdk-go/private/protocol/rest"
)
@@ -269,7 +269,7 @@ type signingCtx struct {
// "X-Amz-Content-Sha256" header with a precomputed value. The signer will
// only compute the hash if the request header value is empty.
func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region string, signTime time.Time) (http.Header, error) {
- return v4.signWithBody(r, body, service, region, 0, signTime)
+ return v4.signWithBody(r, body, service, region, 0, false, signTime)
}
// Presign signs AWS v4 requests with the provided body, service name, region
@@ -303,10 +303,10 @@ func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region strin
// presigned request's signature you can set the "X-Amz-Content-Sha256"
// HTTP header and that will be included in the request's signature.
func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) {
- return v4.signWithBody(r, body, service, region, exp, signTime)
+ return v4.signWithBody(r, body, service, region, exp, true, signTime)
}
-func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) {
+func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, isPresign bool, signTime time.Time) (http.Header, error) {
currentTimeFn := v4.currentTimeFn
if currentTimeFn == nil {
currentTimeFn = time.Now
@@ -318,7 +318,7 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi
Query: r.URL.Query(),
Time: signTime,
ExpireTime: exp,
- isPresign: exp != 0,
+ isPresign: isPresign,
ServiceName: service,
Region: region,
DisableURIPathEscaping: v4.DisableURIPathEscaping,
@@ -340,8 +340,11 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi
return http.Header{}, err
}
+ ctx.sanitizeHostForHeader()
ctx.assignAmzQueryValues()
- ctx.build(v4.DisableHeaderHoisting)
+ if err := ctx.build(v4.DisableHeaderHoisting); err != nil {
+ return nil, err
+ }
// If the request is not presigned the body should be attached to it. This
// prevents the confusion of wanting to send a signed request without
@@ -364,6 +367,10 @@ func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, regi
return ctx.SignedHeaderVals, nil
}
+func (ctx *signingCtx) sanitizeHostForHeader() {
+ request.SanitizeHostForHeader(ctx.Request)
+}
+
func (ctx *signingCtx) handlePresignRemoval() {
if !ctx.isPresign {
return
@@ -402,7 +409,7 @@ var SignRequestHandler = request.NamedHandler{
}
// SignSDKRequest signs an AWS request with the V4 signature. This
-// request handler is bested used only with the SDK's built in service client's
+// request handler should only be used with the SDK's built in service client's
// API operation requests.
//
// This function should not be used on its on its own, but in conjunction with
@@ -468,7 +475,7 @@ func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time
}
signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.GetBody(),
- name, region, req.ExpireTime, signingTime,
+ name, region, req.ExpireTime, req.ExpireTime > 0, signingTime,
)
if err != nil {
req.Error = err
@@ -499,10 +506,14 @@ func (v4 *Signer) logSigningInfo(ctx *signingCtx) {
v4.Logger.Log(msg)
}
-func (ctx *signingCtx) build(disableHeaderHoisting bool) {
+func (ctx *signingCtx) build(disableHeaderHoisting bool) error {
ctx.buildTime() // no depends
ctx.buildCredentialString() // no depends
+ if err := ctx.buildBodyDigest(); err != nil {
+ return err
+ }
+
unsignedHeaders := ctx.Request.Header
if ctx.isPresign {
if !disableHeaderHoisting {
@@ -514,7 +525,6 @@ func (ctx *signingCtx) build(disableHeaderHoisting bool) {
}
}
- ctx.buildBodyDigest()
ctx.buildCanonicalHeaders(ignoredHeaders, unsignedHeaders)
ctx.buildCanonicalString() // depends on canon headers / signed headers
ctx.buildStringToSign() // depends on canon string
@@ -530,6 +540,8 @@ func (ctx *signingCtx) build(disableHeaderHoisting bool) {
}
ctx.Request.Header.Set("Authorization", strings.Join(parts, ", "))
}
+
+ return nil
}
func (ctx *signingCtx) buildTime() {
@@ -604,14 +616,18 @@ func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) {
headerValues := make([]string, len(headers))
for i, k := range headers {
if k == "host" {
- headerValues[i] = "host:" + ctx.Request.URL.Host
+ if ctx.Request.Host != "" {
+ headerValues[i] = "host:" + ctx.Request.Host
+ } else {
+ headerValues[i] = "host:" + ctx.Request.URL.Host
+ }
} else {
headerValues[i] = k + ":" +
strings.Join(ctx.SignedHeaderVals[k], ",")
}
}
-
- ctx.canonicalHeaders = strings.Join(stripExcessSpaces(headerValues), "\n")
+ stripExcessSpaces(headerValues)
+ ctx.canonicalHeaders = strings.Join(headerValues, "\n")
}
func (ctx *signingCtx) buildCanonicalString() {
@@ -652,7 +668,7 @@ func (ctx *signingCtx) buildSignature() {
ctx.signature = hex.EncodeToString(signature)
}
-func (ctx *signingCtx) buildBodyDigest() {
+func (ctx *signingCtx) buildBodyDigest() error {
hash := ctx.Request.Header.Get("X-Amz-Content-Sha256")
if hash == "" {
if ctx.unsignedPayload || (ctx.isPresign && ctx.ServiceName == "s3") {
@@ -660,6 +676,9 @@ func (ctx *signingCtx) buildBodyDigest() {
} else if ctx.Body == nil {
hash = emptyStringSHA256
} else {
+ if !aws.IsReaderSeekable(ctx.Body) {
+ return fmt.Errorf("cannot use unseekable request body %T, for signed request with body", ctx.Body)
+ }
hash = hex.EncodeToString(makeSha256Reader(ctx.Body))
}
if ctx.unsignedPayload || ctx.ServiceName == "s3" || ctx.ServiceName == "glacier" {
@@ -667,6 +686,8 @@ func (ctx *signingCtx) buildBodyDigest() {
}
}
ctx.bodyDigest = hash
+
+ return nil
}
// isRequestSigned returns if the request is currently signed or presigned
@@ -706,56 +727,53 @@ func makeSha256(data []byte) []byte {
func makeSha256Reader(reader io.ReadSeeker) []byte {
hash := sha256.New()
- start, _ := reader.Seek(0, 1)
- defer reader.Seek(start, 0)
+ start, _ := reader.Seek(0, sdkio.SeekCurrent)
+ defer reader.Seek(start, sdkio.SeekStart)
io.Copy(hash, reader)
return hash.Sum(nil)
}
-const doubleSpaces = " "
+const doubleSpace = " "
-var doubleSpaceBytes = []byte(doubleSpaces)
-
-func stripExcessSpaces(headerVals []string) []string {
- vals := make([]string, len(headerVals))
- for i, str := range headerVals {
- // Trim leading and trailing spaces
- trimmed := strings.TrimSpace(str)
+// stripExcessSpaces will rewrite the passed in slice's string values to not
+// contain muliple side-by-side spaces.
+func stripExcessSpaces(vals []string) {
+ var j, k, l, m, spaces int
+ for i, str := range vals {
+ // Trim trailing spaces
+ for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- {
+ }
- idx := strings.Index(trimmed, doubleSpaces)
- var buf []byte
- for idx > -1 {
- // Multiple adjacent spaces found
- if buf == nil {
- // first time create the buffer
- buf = []byte(trimmed)
- }
+ // Trim leading spaces
+ for k = 0; k < j && str[k] == ' '; k++ {
+ }
+ str = str[k : j+1]
- stripToIdx := -1
- for j := idx + 1; j < len(buf); j++ {
- if buf[j] != ' ' {
- buf = append(buf[:idx+1], buf[j:]...)
- stripToIdx = j
- break
- }
- }
+ // Strip multiple spaces.
+ j = strings.Index(str, doubleSpace)
+ if j < 0 {
+ vals[i] = str
+ continue
+ }
- if stripToIdx >= 0 {
- idx = bytes.Index(buf[stripToIdx:], doubleSpaceBytes)
- if idx >= 0 {
- idx += stripToIdx
+ buf := []byte(str)
+ for k, m, l = j, j, len(buf); k < l; k++ {
+ if buf[k] == ' ' {
+ if spaces == 0 {
+ // First space.
+ buf[m] = buf[k]
+ m++
}
+ spaces++
} else {
- idx = -1
+ // End of multiple spaces.
+ spaces = 0
+ buf[m] = buf[k]
+ m++
}
}
- if buf != nil {
- vals[i] = string(buf)
- } else {
- vals[i] = trimmed
- }
+ vals[i] = string(buf[:m])
}
- return vals
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go
index 72763fd..16bc737 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4_test.go
@@ -6,12 +6,12 @@ import (
"io/ioutil"
"net/http"
"net/http/httptest"
+ "reflect"
+ "strconv"
"strings"
"testing"
"time"
- "github.com/stretchr/testify/assert"
-
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/request"
@@ -20,45 +20,84 @@ import (
func TestStripExcessHeaders(t *testing.T) {
vals := []string{
+ "",
"123",
"1 2 3",
+ "1 2 3 ",
" 1 2 3",
"1 2 3",
"1 23",
"1 2 3",
"1 2 ",
" 1 2 ",
+ "12 3",
+ "12 3 1",
+ "12 3 1",
+ "12 3 1abc123",
}
expected := []string{
+ "",
"123",
"1 2 3",
"1 2 3",
"1 2 3",
+ "1 2 3",
"1 23",
"1 2 3",
"1 2",
"1 2",
+ "12 3",
+ "12 3 1",
+ "12 3 1",
+ "12 3 1abc123",
}
- newVals := stripExcessSpaces(vals)
- for i := 0; i < len(newVals); i++ {
- assert.Equal(t, expected[i], newVals[i], "test: %d", i)
+ stripExcessSpaces(vals)
+ for i := 0; i < len(vals); i++ {
+ if e, a := expected[i], vals[i]; e != a {
+ t.Errorf("%d, expect %v, got %v", i, e, a)
+ }
}
}
func buildRequest(serviceName, region, body string) (*http.Request, io.ReadSeeker) {
- endpoint := "https://" + serviceName + "." + region + ".amazonaws.com"
reader := strings.NewReader(body)
- req, _ := http.NewRequest("POST", endpoint, reader)
+ return buildRequestWithBodyReader(serviceName, region, reader)
+}
+
+func buildRequestWithBodyReader(serviceName, region string, body io.Reader) (*http.Request, io.ReadSeeker) {
+ var bodyLen int
+
+ type lenner interface {
+ Len() int
+ }
+ if lr, ok := body.(lenner); ok {
+ bodyLen = lr.Len()
+ }
+
+ endpoint := "https://" + serviceName + "." + region + ".amazonaws.com"
+ req, _ := http.NewRequest("POST", endpoint, body)
req.URL.Opaque = "//example.org/bucket/key-._~,!@#$%^&*()"
- req.Header.Add("X-Amz-Target", "prefix.Operation")
- req.Header.Add("Content-Type", "application/x-amz-json-1.0")
- req.Header.Add("Content-Length", string(len(body)))
- req.Header.Add("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)")
+ req.Header.Set("X-Amz-Target", "prefix.Operation")
+ req.Header.Set("Content-Type", "application/x-amz-json-1.0")
+
+ if bodyLen > 0 {
+ req.Header.Set("Content-Length", strconv.Itoa(bodyLen))
+ }
+
+ req.Header.Set("X-Amz-Meta-Other-Header", "some-value=!@#$%^&* (+)")
req.Header.Add("X-Amz-Meta-Other-Header_With_Underscore", "some-value=!@#$%^&* (+)")
req.Header.Add("X-amz-Meta-Other-Header_With_Underscore", "some-value=!@#$%^&* (+)")
- return req, reader
+
+ var seeker io.ReadSeeker
+ if sr, ok := body.(io.ReadSeeker); ok {
+ seeker = sr
+ } else {
+ seeker = aws.ReadSeekCloser(body)
+ }
+
+ return req, seeker
}
func buildSigner() Signer {
@@ -88,17 +127,29 @@ func TestPresignRequest(t *testing.T) {
expectedDate := "19700101T000000Z"
expectedHeaders := "content-length;content-type;host;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore"
- expectedSig := "ea7856749041f727690c580569738282e99c79355fe0d8f125d3b5535d2ece83"
+ expectedSig := "122f0b9e091e4ba84286097e2b3404a1f1f4c4aad479adda95b7dff0ccbe5581"
expectedCred := "AKID/19700101/us-east-1/dynamodb/aws4_request"
expectedTarget := "prefix.Operation"
q := req.URL.Query()
- assert.Equal(t, expectedSig, q.Get("X-Amz-Signature"))
- assert.Equal(t, expectedCred, q.Get("X-Amz-Credential"))
- assert.Equal(t, expectedHeaders, q.Get("X-Amz-SignedHeaders"))
- assert.Equal(t, expectedDate, q.Get("X-Amz-Date"))
- assert.Empty(t, q.Get("X-Amz-Meta-Other-Header"))
- assert.Equal(t, expectedTarget, q.Get("X-Amz-Target"))
+ if e, a := expectedSig, q.Get("X-Amz-Signature"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedCred, q.Get("X-Amz-Credential"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedHeaders, q.Get("X-Amz-SignedHeaders"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedDate, q.Get("X-Amz-Date"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if a := q.Get("X-Amz-Meta-Other-Header"); len(a) != 0 {
+ t.Errorf("expect %v to be empty", a)
+ }
+ if e, a := expectedTarget, q.Get("X-Amz-Target"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestPresignBodyWithArrayRequest(t *testing.T) {
@@ -110,17 +161,29 @@ func TestPresignBodyWithArrayRequest(t *testing.T) {
expectedDate := "19700101T000000Z"
expectedHeaders := "content-length;content-type;host;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore"
- expectedSig := "fef6002062400bbf526d70f1a6456abc0fb2e213fe1416012737eebd42a62924"
+ expectedSig := "e3ac55addee8711b76c6d608d762cff285fe8b627a057f8b5ec9268cf82c08b1"
expectedCred := "AKID/19700101/us-east-1/dynamodb/aws4_request"
expectedTarget := "prefix.Operation"
q := req.URL.Query()
- assert.Equal(t, expectedSig, q.Get("X-Amz-Signature"))
- assert.Equal(t, expectedCred, q.Get("X-Amz-Credential"))
- assert.Equal(t, expectedHeaders, q.Get("X-Amz-SignedHeaders"))
- assert.Equal(t, expectedDate, q.Get("X-Amz-Date"))
- assert.Empty(t, q.Get("X-Amz-Meta-Other-Header"))
- assert.Equal(t, expectedTarget, q.Get("X-Amz-Target"))
+ if e, a := expectedSig, q.Get("X-Amz-Signature"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedCred, q.Get("X-Amz-Credential"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedHeaders, q.Get("X-Amz-SignedHeaders"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := expectedDate, q.Get("X-Amz-Date"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if a := q.Get("X-Amz-Meta-Other-Header"); len(a) != 0 {
+ t.Errorf("expect %v to be empty, was not", a)
+ }
+ if e, a := expectedTarget, q.Get("X-Amz-Target"); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestSignRequest(t *testing.T) {
@@ -129,11 +192,15 @@ func TestSignRequest(t *testing.T) {
signer.Sign(req, body, "dynamodb", "us-east-1", time.Unix(0, 0))
expectedDate := "19700101T000000Z"
- expectedSig := "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/dynamodb/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore;x-amz-security-token;x-amz-target, Signature=ea766cabd2ec977d955a3c2bae1ae54f4515d70752f2207618396f20aa85bd21"
+ expectedSig := "AWS4-HMAC-SHA256 Credential=AKID/19700101/us-east-1/dynamodb/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-meta-other-header;x-amz-meta-other-header_with_underscore;x-amz-security-token;x-amz-target, Signature=a518299330494908a70222cec6899f6f32f297f8595f6df1776d998936652ad9"
q := req.Header
- assert.Equal(t, expectedSig, q.Get("Authorization"))
- assert.Equal(t, expectedDate, q.Get("X-Amz-Date"))
+ if e, a := expectedSig, q.Get("Authorization"); e != a {
+ t.Errorf("expect\n%v\nactual\n%v\n", e, a)
+ }
+ if e, a := expectedDate, q.Get("X-Amz-Date"); e != a {
+ t.Errorf("expect\n%v\nactual\n%v\n", e, a)
+ }
}
func TestSignBodyS3(t *testing.T) {
@@ -141,7 +208,9 @@ func TestSignBodyS3(t *testing.T) {
signer := buildSigner()
signer.Sign(req, body, "s3", "us-east-1", time.Now())
hash := req.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash)
+ if e, a := "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestSignBodyGlacier(t *testing.T) {
@@ -149,7 +218,9 @@ func TestSignBodyGlacier(t *testing.T) {
signer := buildSigner()
signer.Sign(req, body, "glacier", "us-east-1", time.Now())
hash := req.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash)
+ if e, a := "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", hash; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestPresignEmptyBodyS3(t *testing.T) {
@@ -157,7 +228,56 @@ func TestPresignEmptyBodyS3(t *testing.T) {
signer := buildSigner()
signer.Presign(req, body, "s3", "us-east-1", 5*time.Minute, time.Now())
hash := req.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "UNSIGNED-PAYLOAD", hash)
+ if e, a := "UNSIGNED-PAYLOAD", hash; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+}
+
+func TestSignUnseekableBody(t *testing.T) {
+ req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello")))
+ signer := buildSigner()
+ _, err := signer.Sign(req, body, "mock-service", "mock-region", time.Now())
+ if err == nil {
+ t.Fatalf("expect error signing request")
+ }
+
+ if e, a := "unseekable request body", err.Error(); !strings.Contains(a, e) {
+ t.Errorf("expect %q to be in %q", e, a)
+ }
+}
+
+func TestSignUnsignedPayloadUnseekableBody(t *testing.T) {
+ req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello")))
+
+ signer := buildSigner()
+ signer.UnsignedPayload = true
+
+ _, err := signer.Sign(req, body, "mock-service", "mock-region", time.Now())
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+
+ hash := req.Header.Get("X-Amz-Content-Sha256")
+ if e, a := "UNSIGNED-PAYLOAD", hash; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+}
+
+func TestSignPreComputedHashUnseekableBody(t *testing.T) {
+ req, body := buildRequestWithBodyReader("mock-service", "mock-region", bytes.NewBuffer([]byte("hello")))
+
+ signer := buildSigner()
+
+ req.Header.Set("X-Amz-Content-Sha256", "some-content-sha256")
+ _, err := signer.Sign(req, body, "mock-service", "mock-region", time.Now())
+ if err != nil {
+ t.Fatalf("expect no error, got %v", err)
+ }
+
+ hash := req.Header.Get("X-Amz-Content-Sha256")
+ if e, a := "some-content-sha256", hash; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestSignPrecomputedBodyChecksum(t *testing.T) {
@@ -166,7 +286,9 @@ func TestSignPrecomputedBodyChecksum(t *testing.T) {
signer := buildSigner()
signer.Sign(req, body, "dynamodb", "us-east-1", time.Now())
hash := req.Header.Get("X-Amz-Content-Sha256")
- assert.Equal(t, "PRECOMPUTED", hash)
+ if e, a := "PRECOMPUTED", hash; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestAnonymousCredentials(t *testing.T) {
@@ -183,14 +305,26 @@ func TestAnonymousCredentials(t *testing.T) {
SignSDKRequest(r)
urlQ := r.HTTPRequest.URL.Query()
- assert.Empty(t, urlQ.Get("X-Amz-Signature"))
- assert.Empty(t, urlQ.Get("X-Amz-Credential"))
- assert.Empty(t, urlQ.Get("X-Amz-SignedHeaders"))
- assert.Empty(t, urlQ.Get("X-Amz-Date"))
+ if a := urlQ.Get("X-Amz-Signature"); len(a) != 0 {
+ t.Errorf("expect %v to be empty, was not", a)
+ }
+ if a := urlQ.Get("X-Amz-Credential"); len(a) != 0 {
+ t.Errorf("expect %v to be empty, was not", a)
+ }
+ if a := urlQ.Get("X-Amz-SignedHeaders"); len(a) != 0 {
+ t.Errorf("expect %v to be empty, was not", a)
+ }
+ if a := urlQ.Get("X-Amz-Date"); len(a) != 0 {
+ t.Errorf("expect %v to be empty, was not", a)
+ }
hQ := r.HTTPRequest.Header
- assert.Empty(t, hQ.Get("Authorization"))
- assert.Empty(t, hQ.Get("X-Amz-Date"))
+ if a := hQ.Get("Authorization"); len(a) != 0 {
+ t.Errorf("expect %v to be empty, was not", a)
+ }
+ if a := hQ.Get("X-Amz-Date"); len(a) != 0 {
+ t.Errorf("expect %v to be empty, was not", a)
+ }
}
func TestIgnoreResignRequestWithValidCreds(t *testing.T) {
@@ -216,7 +350,9 @@ func TestIgnoreResignRequestWithValidCreds(t *testing.T) {
// when it is resigned.
return time.Now().Add(1 * time.Second)
})
- assert.NotEqual(t, sig, r.HTTPRequest.Header.Get("Authorization"))
+ if e, a := sig, r.HTTPRequest.Header.Get("Authorization"); e == a {
+ t.Errorf("expect %v to be %v, but was not", e, a)
+ }
}
func TestIgnorePreResignRequestWithValidCreds(t *testing.T) {
@@ -243,7 +379,9 @@ func TestIgnorePreResignRequestWithValidCreds(t *testing.T) {
// when it is resigned.
return time.Now().Add(1 * time.Second)
})
- assert.NotEqual(t, sig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature"))
+ if e, a := sig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature"); e == a {
+ t.Errorf("expect %v to be %v, but was not", e, a)
+ }
}
func TestResignRequestExpiredCreds(t *testing.T) {
@@ -267,8 +405,12 @@ func TestResignRequestExpiredCreds(t *testing.T) {
break
}
}
- assert.NotEmpty(t, origSignedHeaders)
- assert.NotContains(t, origSignedHeaders, "authorization")
+ if a := origSignedHeaders; len(a) == 0 {
+ t.Errorf("expect not to be empty, but was")
+ }
+ if e, a := origSignedHeaders, "authorization"; strings.Contains(a, e) {
+ t.Errorf("expect %v to not be in %v, but was", e, a)
+ }
origSignedAt := r.LastSignedAt
creds.Expire()
@@ -279,7 +421,9 @@ func TestResignRequestExpiredCreds(t *testing.T) {
return time.Now().Add(1 * time.Second)
})
updatedQuerySig := r.HTTPRequest.Header.Get("Authorization")
- assert.NotEqual(t, querySig, updatedQuerySig)
+ if e, a := querySig, updatedQuerySig; e == a {
+ t.Errorf("expect %v to be %v, was not", e, a)
+ }
var updatedSignedHeaders string
for _, p := range strings.Split(updatedQuerySig, ", ") {
@@ -288,9 +432,15 @@ func TestResignRequestExpiredCreds(t *testing.T) {
break
}
}
- assert.NotEmpty(t, updatedSignedHeaders)
- assert.NotContains(t, updatedQuerySig, "authorization")
- assert.NotEqual(t, origSignedAt, r.LastSignedAt)
+ if a := updatedSignedHeaders; len(a) == 0 {
+ t.Errorf("expect not to be empty, but was")
+ }
+ if e, a := updatedQuerySig, "authorization"; strings.Contains(a, e) {
+ t.Errorf("expect %v to not be in %v, but was", e, a)
+ }
+ if e, a := origSignedAt, r.LastSignedAt; e == a {
+ t.Errorf("expect %v to be %v, was not", e, a)
+ }
}
func TestPreResignRequestExpiredCreds(t *testing.T) {
@@ -315,7 +465,9 @@ func TestPreResignRequestExpiredCreds(t *testing.T) {
SignSDKRequest(r)
querySig := r.HTTPRequest.URL.Query().Get("X-Amz-Signature")
signedHeaders := r.HTTPRequest.URL.Query().Get("X-Amz-SignedHeaders")
- assert.NotEmpty(t, signedHeaders)
+ if a := signedHeaders; len(a) == 0 {
+ t.Errorf("expect not to be empty, but was")
+ }
origSignedAt := r.LastSignedAt
creds.Expire()
@@ -324,11 +476,19 @@ func TestPreResignRequestExpiredCreds(t *testing.T) {
// Simulate the request occurred 15 minutes in the past
return time.Now().Add(-48 * time.Hour)
})
- assert.NotEqual(t, querySig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature"))
+ if e, a := querySig, r.HTTPRequest.URL.Query().Get("X-Amz-Signature"); e == a {
+ t.Errorf("expect %v to be %v, was not", e, a)
+ }
resignedHeaders := r.HTTPRequest.URL.Query().Get("X-Amz-SignedHeaders")
- assert.Equal(t, signedHeaders, resignedHeaders)
- assert.NotContains(t, signedHeaders, "x-amz-signedHeaders")
- assert.NotEqual(t, origSignedAt, r.LastSignedAt)
+ if e, a := signedHeaders, resignedHeaders; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
+ if e, a := signedHeaders, "x-amz-signedHeaders"; strings.Contains(a, e) {
+ t.Errorf("expect %v to not be in %v, but was", e, a)
+ }
+ if e, a := origSignedAt, r.LastSignedAt; e == a {
+ t.Errorf("expect %v to be %v, was not", e, a)
+ }
}
func TestResignRequestExpiredRequest(t *testing.T) {
@@ -352,8 +512,12 @@ func TestResignRequestExpiredRequest(t *testing.T) {
// Simulate the request occurred 15 minutes in the past
return time.Now().Add(15 * time.Minute)
})
- assert.NotEqual(t, querySig, r.HTTPRequest.Header.Get("Authorization"))
- assert.NotEqual(t, origSignedAt, r.LastSignedAt)
+ if e, a := querySig, r.HTTPRequest.Header.Get("Authorization"); e == a {
+ t.Errorf("expect %v to be %v, was not", e, a)
+ }
+ if e, a := origSignedAt, r.LastSignedAt; e == a {
+ t.Errorf("expect %v to be %v, was not", e, a)
+ }
}
func TestSignWithRequestBody(t *testing.T) {
@@ -365,19 +529,29 @@ func TestSignWithRequestBody(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
b, err := ioutil.ReadAll(r.Body)
r.Body.Close()
- assert.NoError(t, err)
- assert.Equal(t, expectBody, b)
+ if err != nil {
+ t.Errorf("expect no error, got %v", err)
+ }
+ if e, a := expectBody, b; !reflect.DeepEqual(e, a) {
+ t.Errorf("expect %v, got %v", e, a)
+ }
w.WriteHeader(http.StatusOK)
}))
req, err := http.NewRequest("POST", server.URL, nil)
_, err = signer.Sign(req, bytes.NewReader(expectBody), "service", "region", time.Now())
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expect not no error, got %v", err)
+ }
resp, err := http.DefaultClient.Do(req)
- assert.NoError(t, err)
- assert.Equal(t, http.StatusOK, resp.StatusCode)
+ if err != nil {
+ t.Errorf("expect not no error, got %v", err)
+ }
+ if e, a := http.StatusOK, resp.StatusCode; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestSignWithRequestBody_Overwrite(t *testing.T) {
@@ -389,8 +563,12 @@ func TestSignWithRequestBody_Overwrite(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
b, err := ioutil.ReadAll(r.Body)
r.Body.Close()
- assert.NoError(t, err)
- assert.Equal(t, len(expectBody), len(b))
+ if err != nil {
+ t.Errorf("expect not no error, got %v", err)
+ }
+ if e, a := len(expectBody), len(b); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
w.WriteHeader(http.StatusOK)
}))
@@ -399,11 +577,17 @@ func TestSignWithRequestBody_Overwrite(t *testing.T) {
_, err = signer.Sign(req, nil, "service", "region", time.Now())
req.ContentLength = 0
- assert.NoError(t, err)
+ if err != nil {
+ t.Errorf("expect not no error, got %v", err)
+ }
resp, err := http.DefaultClient.Do(req)
- assert.NoError(t, err)
- assert.Equal(t, http.StatusOK, resp.StatusCode)
+ if err != nil {
+ t.Errorf("expect not no error, got %v", err)
+ }
+ if e, a := http.StatusOK, resp.StatusCode; e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestBuildCanonicalRequest(t *testing.T) {
@@ -421,7 +605,9 @@ func TestBuildCanonicalRequest(t *testing.T) {
ctx.buildCanonicalString()
expected := "https://example.org/bucket/key-._~,!@#$%^&*()?Foo=z&Foo=o&Foo=m&Foo=a"
- assert.Equal(t, expected, ctx.Request.URL.String())
+ if e, a := expected, ctx.Request.URL.String(); e != a {
+ t.Errorf("expect %v, got %v", e, a)
+ }
}
func TestSignWithBody_ReplaceRequestBody(t *testing.T) {
@@ -463,7 +649,27 @@ func TestSignWithBody_NoReplaceRequestBody(t *testing.T) {
}
if req.Body != origBody {
- t.Errorf("expeect request body to not be chagned")
+ t.Errorf("expect request body to not be chagned")
+ }
+}
+
+func TestRequestHost(t *testing.T) {
+ req, body := buildRequest("dynamodb", "us-east-1", "{}")
+ req.URL.RawQuery = "Foo=z&Foo=o&Foo=m&Foo=a"
+ req.Host = "myhost"
+ ctx := &signingCtx{
+ ServiceName: "dynamodb",
+ Region: "us-east-1",
+ Request: req,
+ Body: body,
+ Query: req.URL.Query(),
+ Time: time.Now(),
+ ExpireTime: 5 * time.Second,
+ }
+
+ ctx.buildCanonicalHeaders(ignoredHeaders, ctx.Request.Header)
+ if !strings.Contains(ctx.canonicalHeaders, "host:"+req.Host) {
+ t.Errorf("canonical host header invalid")
}
}
@@ -483,15 +689,29 @@ func BenchmarkSignRequest(b *testing.B) {
}
}
-func BenchmarkStripExcessSpaces(b *testing.B) {
- vals := []string{
- `AWS4-HMAC-SHA256 Credential=AKIDFAKEIDFAKEID/20160628/us-west-2/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=1234567890abcdef1234567890abcdef1234567890abcdef`,
- `123 321 123 321`,
- ` 123 321 123 321 `,
- }
+var stripExcessSpaceCases = []string{
+ `AWS4-HMAC-SHA256 Credential=AKIDFAKEIDFAKEID/20160628/us-west-2/s3/aws4_request, SignedHeaders=host;x-amz-date, Signature=1234567890abcdef1234567890abcdef1234567890abcdef`,
+ `123 321 123 321`,
+ ` 123 321 123 321 `,
+ ` 123 321 123 321 `,
+ "123",
+ "1 2 3",
+ " 1 2 3",
+ "1 2 3",
+ "1 23",
+ "1 2 3",
+ "1 2 ",
+ " 1 2 ",
+ "12 3",
+ "12 3 1",
+ "12 3 1",
+ "12 3 1abc123",
+}
- b.ResetTimer()
+func BenchmarkStripExcessSpaces(b *testing.B) {
for i := 0; i < b.N; i++ {
- stripExcessSpaces(vals)
+ // Make sure to start with a copy of the cases
+ cases := append([]string{}, stripExcessSpaceCases...)
+ stripExcessSpaces(cases)
}
}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/types.go b/vendor/github.com/aws/aws-sdk-go/aws/types.go
index 0e2d864..8b6f234 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/types.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/types.go
@@ -3,6 +3,8 @@ package aws
import (
"io"
"sync"
+
+ "github.com/aws/aws-sdk-go/internal/sdkio"
)
// ReadSeekCloser wraps a io.Reader returning a ReaderSeekerCloser. Should
@@ -22,6 +24,22 @@ type ReaderSeekerCloser struct {
r io.Reader
}
+// IsReaderSeekable returns if the underlying reader type can be seeked. A
+// io.Reader might not actually be seekable if it is the ReaderSeekerCloser
+// type.
+func IsReaderSeekable(r io.Reader) bool {
+ switch v := r.(type) {
+ case ReaderSeekerCloser:
+ return v.IsSeeker()
+ case *ReaderSeekerCloser:
+ return v.IsSeeker()
+ case io.ReadSeeker:
+ return true
+ default:
+ return false
+ }
+}
+
// Read reads from the reader up to size of p. The number of bytes read, and
// error if it occurred will be returned.
//
@@ -56,6 +74,71 @@ func (r ReaderSeekerCloser) IsSeeker() bool {
return ok
}
+// HasLen returns the length of the underlying reader if the value implements
+// the Len() int method.
+func (r ReaderSeekerCloser) HasLen() (int, bool) {
+ type lenner interface {
+ Len() int
+ }
+
+ if lr, ok := r.r.(lenner); ok {
+ return lr.Len(), true
+ }
+
+ return 0, false
+}
+
+// GetLen returns the length of the bytes remaining in the underlying reader.
+// Checks first for Len(), then io.Seeker to determine the size of the
+// underlying reader.
+//
+// Will return -1 if the length cannot be determined.
+func (r ReaderSeekerCloser) GetLen() (int64, error) {
+ if l, ok := r.HasLen(); ok {
+ return int64(l), nil
+ }
+
+ if s, ok := r.r.(io.Seeker); ok {
+ return seekerLen(s)
+ }
+
+ return -1, nil
+}
+
+// SeekerLen attempts to get the number of bytes remaining at the seeker's
+// current position. Returns the number of bytes remaining or error.
+func SeekerLen(s io.Seeker) (int64, error) {
+ // Determine if the seeker is actually seekable. ReaderSeekerCloser
+ // hides the fact that a io.Readers might not actually be seekable.
+ switch v := s.(type) {
+ case ReaderSeekerCloser:
+ return v.GetLen()
+ case *ReaderSeekerCloser:
+ return v.GetLen()
+ }
+
+ return seekerLen(s)
+}
+
+func seekerLen(s io.Seeker) (int64, error) {
+ curOffset, err := s.Seek(0, sdkio.SeekCurrent)
+ if err != nil {
+ return 0, err
+ }
+
+ endOffset, err := s.Seek(0, sdkio.SeekEnd)
+ if err != nil {
+ return 0, err
+ }
+
+ _, err = s.Seek(curOffset, sdkio.SeekStart)
+ if err != nil {
+ return 0, err
+ }
+
+ return endOffset - curOffset, nil
+}
+
// Close closes the ReaderSeekerCloser.
//
// If the ReaderSeekerCloser is not an io.Closer nothing will be done.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/types_test.go b/vendor/github.com/aws/aws-sdk-go/aws/types_test.go
index a7cd93b..e399ef5 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/types_test.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/types_test.go
@@ -1,32 +1,49 @@
package aws
import (
+ "bytes"
"math/rand"
"testing"
-
- "github.com/stretchr/testify/assert"
)
func TestWriteAtBuffer(t *testing.T) {
b := &WriteAtBuffer{}
n, err := b.WriteAt([]byte{1}, 0)
- assert.NoError(t, err)
- assert.Equal(t, 1, n)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
+ if e, a := 1, n; e != a {
+ t.Errorf("expected %d, but recieved %d", e, a)
+ }
n, err = b.WriteAt([]byte{1, 1, 1}, 5)
- assert.NoError(t, err)
- assert.Equal(t, 3, n)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
+ if e, a := 3, n; e != a {
+ t.Errorf("expected %d, but recieved %d", e, a)
+ }
n, err = b.WriteAt([]byte{2}, 1)
- assert.NoError(t, err)
- assert.Equal(t, 1, n)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
+ if e, a := 1, n; e != a {
+ t.Errorf("expected %d, but recieved %d", e, a)
+ }
n, err = b.WriteAt([]byte{3}, 2)
- assert.NoError(t, err)
- assert.Equal(t, 1, n)
+ if err != nil {
+ t.Errorf("expected no error, but received %v", err)
+ }
+ if e, a := 1, n; e != a {
+ t.Errorf("expected %d, but received %d", e, a)
+ }
- assert.Equal(t, []byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes())
+ if !bytes.Equal([]byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes()) {
+ t.Errorf("expected %v, but received %v", []byte{1, 2, 3, 0, 0, 1, 1, 1}, b.Bytes())
+ }
}
func BenchmarkWriteAtBuffer(b *testing.B) {
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 eeb6467..8b04328 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.19"
+const SDKVersion = "1.14.3"
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Readme b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Readme
deleted file mode 100644
index 4cdaa53..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/Godeps/Readme
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory tree is generated automatically by godep.
-
-Please do not edit.
-
-See https://github.com/tools/godep for more information.
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/gen/gen.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/gen/gen.go
deleted file mode 100644
index 286d4bf..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/gen/gen.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// +build go1.5,deprecated
-
-package main
-
-import (
- "bytes"
- "go/format"
- "io"
- "os"
- "path/filepath"
- "sort"
- "strings"
- "text/template"
-
- "github.com/aws/aws-sdk-go/private/model/api"
-)
-
-type pkg struct {
- oldAPI *api.API
- newAPI *api.API
- shapes map[string]*shapentry
- operations map[string]*opentry
-}
-
-type shapentry struct {
- oldShape *api.Shape
- newShape *api.Shape
-}
-
-type opentry struct {
- oldName string
- newName string
-}
-
-type packageRenames struct {
- Shapes map[string]string
- Operations map[string]string
- Fields map[string]string
-}
-
-var exportMap = map[string]*packageRenames{}
-
-func generateRenames(w io.Writer) error {
- tmpl, err := template.New("renames").Parse(t)
- if err != nil {
- return err
- }
-
- out := bytes.NewBuffer(nil)
- if err = tmpl.Execute(out, exportMap); err != nil {
- return err
- }
-
- b, err := format.Source(bytes.TrimSpace(out.Bytes()))
- if err != nil {
- return err
- }
-
- _, err = io.Copy(w, bytes.NewReader(b))
- return err
-}
-
-const t = `
-package rename
-
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-var renamedPackages = map[string]*packageRenames{
- {{ range $key, $entry := . }}"{{ $key }}": &packageRenames{
- operations: map[string]string{
- {{ range $old, $new := $entry.Operations }}"{{ $old }}": "{{ $new }}",
- {{ end }}
- },
- shapes: map[string]string{
- {{ range $old, $new := $entry.Shapes }}"{{ $old }}": "{{ $new }}",
- {{ end }}
- },
- fields: map[string]string{
- {{ range $old, $new := $entry.Fields }}"{{ $old }}": "{{ $new }}",
- {{ end }}
- },
- },
- {{ end }}
-}
-`
-
-func (p *pkg) buildRenames() {
- pkgName := "github.com/aws/aws-sdk-go/service/" + p.oldAPI.PackageName()
- if exportMap[pkgName] == nil {
- exportMap[pkgName] = &packageRenames{map[string]string{}, map[string]string{}, map[string]string{}}
- }
- ifacename := "github.com/aws/aws-sdk-go/service/" + p.oldAPI.PackageName() + "/" +
- p.oldAPI.InterfacePackageName()
- if exportMap[ifacename] == nil {
- exportMap[ifacename] = &packageRenames{map[string]string{}, map[string]string{}, map[string]string{}}
- }
-
- for _, entry := range p.operations {
- if entry.oldName != entry.newName {
- pkgNames := []string{pkgName, ifacename}
- for _, p := range pkgNames {
- exportMap[p].Operations[entry.oldName] = entry.newName
- exportMap[p].Operations[entry.oldName+"Request"] = entry.newName + "Request"
- exportMap[p].Operations[entry.oldName+"Pages"] = entry.newName + "Pages"
- }
- }
- }
-
- for _, entry := range p.shapes {
- if entry.oldShape.Type == "structure" {
- if entry.oldShape.ShapeName != entry.newShape.ShapeName {
- exportMap[pkgName].Shapes[entry.oldShape.ShapeName] = entry.newShape.ShapeName
- }
-
- for _, n := range entry.oldShape.MemberNames() {
- for _, m := range entry.newShape.MemberNames() {
- if n != m && strings.ToLower(n) == strings.ToLower(m) {
- exportMap[pkgName].Fields[n] = m
- }
- }
- }
- }
- }
-}
-
-func load(file string) *pkg {
- p := &pkg{&api.API{}, &api.API{}, map[string]*shapentry{}, map[string]*opentry{}}
-
- p.oldAPI.Attach(file)
- p.oldAPI.Setup()
-
- p.newAPI.Attach(file)
- p.newAPI.Setup()
-
- for _, name := range p.oldAPI.OperationNames() {
- p.operations[strings.ToLower(name)] = &opentry{oldName: name}
- }
-
- for _, name := range p.newAPI.OperationNames() {
- p.operations[strings.ToLower(name)].newName = name
- }
-
- for _, shape := range p.oldAPI.ShapeList() {
- p.shapes[strings.ToLower(shape.ShapeName)] = &shapentry{oldShape: shape}
- }
-
- for _, shape := range p.newAPI.ShapeList() {
- if _, ok := p.shapes[strings.ToLower(shape.ShapeName)]; !ok {
- panic("missing shape " + shape.ShapeName)
- }
- p.shapes[strings.ToLower(shape.ShapeName)].newShape = shape
- }
-
- return p
-}
-
-var excludeServices = map[string]struct{}{
- "simpledb": {},
- "importexport": {},
-}
-
-func main() {
- files, _ := filepath.Glob("../../apis/*/*/api-2.json")
-
- sort.Strings(files)
-
- // Remove old API versions from list
- m := map[string]bool{}
- for i := range files {
- idx := len(files) - 1 - i
- parts := strings.Split(files[idx], string(filepath.Separator))
- svc := parts[len(parts)-3] // service name is 2nd-to-last component
-
- if m[svc] {
- files[idx] = "" // wipe this one out if we already saw the service
- }
- m[svc] = true
- }
-
- for i := range files {
- file := files[i]
- if file == "" { // empty file
- continue
- }
-
- if g := load(file); g != nil {
- if _, ok := excludeServices[g.oldAPI.PackageName()]; !ok {
- g.buildRenames()
- }
- }
- }
-
- outfile, err := os.Create("rename/renames.go")
- if err != nil {
- panic(err)
- }
- if err := generateRenames(outfile); err != nil {
- panic(err)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/rename.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/rename.go
deleted file mode 100644
index 234ae7c..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/rename.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// +build go1.5,deprecated
-
-package rename
-
-import (
- "bytes"
- "flag"
- "fmt"
- "go/format"
- "go/parser"
- "go/token"
- "go/types"
- "io/ioutil"
-
- "golang.org/x/tools/go/loader"
-)
-
-var dryRun = flag.Bool("dryrun", false, "Dry run")
-var verbose = flag.Bool("verbose", false, "Verbose")
-
-type packageRenames struct {
- operations map[string]string
- shapes map[string]string
- fields map[string]string
-}
-
-type renamer struct {
- *loader.Program
- files map[*token.File]bool
-}
-
-// ParsePathsFromArgs parses arguments from command line and looks at import
-// paths to rename objects.
-func ParsePathsFromArgs() {
- flag.Parse()
- for _, dir := range flag.Args() {
- var conf loader.Config
- conf.ParserMode = parser.ParseComments
- conf.ImportWithTests(dir)
- prog, err := conf.Load()
- if err != nil {
- panic(err)
- }
-
- r := renamer{prog, map[*token.File]bool{}}
- r.parse()
- if !*dryRun {
- r.write()
- }
- }
-}
-
-func (r *renamer) dryInfo() string {
- if *dryRun {
- return "[DRY-RUN]"
- }
- return "[!]"
-}
-
-func (r *renamer) printf(msg string, args ...interface{}) {
- if *verbose {
- fmt.Printf(msg, args...)
- }
-}
-
-func (r *renamer) parse() {
- for _, pkg := range r.InitialPackages() {
- r.parseUses(pkg)
- }
-}
-
-func (r *renamer) write() {
- for _, pkg := range r.InitialPackages() {
- for _, f := range pkg.Files {
- tokenFile := r.Fset.File(f.Pos())
- if r.files[tokenFile] {
- var buf bytes.Buffer
- format.Node(&buf, r.Fset, f)
- if err := ioutil.WriteFile(tokenFile.Name(), buf.Bytes(), 0644); err != nil {
- panic(err)
- }
- }
- }
- }
-}
-
-func (r *renamer) parseUses(pkg *loader.PackageInfo) {
- for k, v := range pkg.Uses {
- if v.Pkg() != nil {
- pkgPath := v.Pkg().Path()
- if renames, ok := renamedPackages[pkgPath]; ok {
- name := k.Name
- switch t := v.(type) {
- case *types.Func:
- if newName, ok := renames.operations[t.Name()]; ok && newName != name {
- r.printf("%s Rename [OPERATION]: %q -> %q\n", r.dryInfo(), name, newName)
- r.files[r.Fset.File(k.Pos())] = true
- k.Name = newName
- }
- case *types.TypeName:
- if newName, ok := renames.shapes[name]; ok && newName != name {
- r.printf("%s Rename [SHAPE]: %q -> %q\n", r.dryInfo(), t.Name(), newName)
- r.files[r.Fset.File(k.Pos())] = true
- k.Name = newName
- }
- case *types.Var:
- if newName, ok := renames.fields[name]; ok && newName != name {
- r.printf("%s Rename [FIELD]: %q -> %q\n", r.dryInfo(), t.Name(), newName)
- r.files[r.Fset.File(k.Pos())] = true
- k.Name = newName
- }
- }
- }
- }
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/renames.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/renames.go
deleted file mode 100644
index 55c7b4e..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename/renames.go
+++ /dev/null
@@ -1,2120 +0,0 @@
-// +build go1.5,deprecated
-
-package rename
-
-// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
-
-var renamedPackages = map[string]*packageRenames{
- "github.com/aws/aws-sdk-go/service/autoscaling": {
- operations: map[string]string{},
- shapes: map[string]string{
- "EBS": "Ebs",
- },
- fields: map[string]string{
- "ActivityID": "ActivityId",
- "ActivityIDs": "ActivityIds",
- "AssociatePublicIPAddress": "AssociatePublicIpAddress",
- "ClassicLinkVPCID": "ClassicLinkVPCId",
- "EBS": "Ebs",
- "EBSOptimized": "EbsOptimized",
- "IAMInstanceProfile": "IamInstanceProfile",
- "IOPS": "Iops",
- "ImageID": "ImageId",
- "InstanceID": "InstanceId",
- "InstanceIDs": "InstanceIds",
- "KernelID": "KernelId",
- "RAMDiskID": "RamdiskId",
- "ResourceID": "ResourceId",
- "SnapshotID": "SnapshotId",
- },
- },
- "github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cloudformation": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "EventID": "EventId",
- "LogicalResourceID": "LogicalResourceId",
- "PhysicalResourceID": "PhysicalResourceId",
- "StackID": "StackId",
- "URL": "Url",
- "UniqueID": "UniqueId",
- },
- },
- "github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cloudfront": {
- operations: map[string]string{},
- shapes: map[string]string{
- "KeyPairIDs": "KeyPairIds",
- },
- fields: map[string]string{
- "AWSAccountNumber": "AwsAccountNumber",
- "DistributionID": "DistributionId",
- "IAMCertificateID": "IAMCertificateId",
- "ID": "Id",
- "KeyPairIDs": "KeyPairIds",
- "S3CanonicalUserID": "S3CanonicalUserId",
- "TargetOriginID": "TargetOriginId",
- },
- },
- "github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cloudhsm": {
- operations: map[string]string{
- "CreateHAPG": "CreateHapg",
- "CreateHAPGPages": "CreateHapgPages",
- "CreateHAPGRequest": "CreateHapgRequest",
- "CreateHSM": "CreateHsm",
- "CreateHSMPages": "CreateHsmPages",
- "CreateHSMRequest": "CreateHsmRequest",
- "DeleteHAPG": "DeleteHapg",
- "DeleteHAPGPages": "DeleteHapgPages",
- "DeleteHAPGRequest": "DeleteHapgRequest",
- "DeleteHSM": "DeleteHsm",
- "DeleteHSMPages": "DeleteHsmPages",
- "DeleteHSMRequest": "DeleteHsmRequest",
- "DescribeHAPG": "DescribeHapg",
- "DescribeHAPGPages": "DescribeHapgPages",
- "DescribeHAPGRequest": "DescribeHapgRequest",
- "DescribeHSM": "DescribeHsm",
- "DescribeHSMPages": "DescribeHsmPages",
- "DescribeHSMRequest": "DescribeHsmRequest",
- "ListHSMs": "ListHsms",
- "ListHSMsPages": "ListHsmsPages",
- "ListHSMsRequest": "ListHsmsRequest",
- "ModifyHAPG": "ModifyHapg",
- "ModifyHAPGPages": "ModifyHapgPages",
- "ModifyHAPGRequest": "ModifyHapgRequest",
- "ModifyHSM": "ModifyHsm",
- "ModifyHSMPages": "ModifyHsmPages",
- "ModifyHSMRequest": "ModifyHsmRequest",
- },
- shapes: map[string]string{
- "CreateHAPGInput": "CreateHapgInput",
- "CreateHAPGOutput": "CreateHapgOutput",
- "CreateHSMInput": "CreateHsmInput",
- "CreateHSMOutput": "CreateHsmOutput",
- "DeleteHAPGInput": "DeleteHapgInput",
- "DeleteHAPGOutput": "DeleteHapgOutput",
- "DeleteHSMInput": "DeleteHsmInput",
- "DeleteHSMOutput": "DeleteHsmOutput",
- "DescribeHAPGInput": "DescribeHapgInput",
- "DescribeHAPGOutput": "DescribeHapgOutput",
- "DescribeHSMInput": "DescribeHsmInput",
- "DescribeHSMOutput": "DescribeHsmOutput",
- "ListHSMsInput": "ListHsmsInput",
- "ListHSMsOutput": "ListHsmsOutput",
- "ModifyHAPGInput": "ModifyHapgInput",
- "ModifyHAPGOutput": "ModifyHapgOutput",
- "ModifyHSMInput": "ModifyHsmInput",
- "ModifyHSMOutput": "ModifyHsmOutput",
- },
- fields: map[string]string{
- "ClientARN": "ClientArn",
- "ENIID": "EniId",
- "ENIIP": "EniIp",
- "ExternalID": "ExternalId",
- "HAPGARN": "HapgArn",
- "HAPGList": "HapgList",
- "HAPGSerial": "HapgSerial",
- "HSMARN": "HsmArn",
- "HSMList": "HsmList",
- "HSMSerialNumber": "HsmSerialNumber",
- "HSMType": "HsmType",
- "HSMsLastActionFailed": "HsmsLastActionFailed",
- "HSMsPendingDeletion": "HsmsPendingDeletion",
- "HSMsPendingRegistration": "HsmsPendingRegistration",
- "IAMRoleARN": "IamRoleArn",
- "SSHKey": "SshKey",
- "SSHKeyLastUpdated": "SshKeyLastUpdated",
- "SSHPublicKey": "SshPublicKey",
- "ServerCertURI": "ServerCertUri",
- "SubnetID": "SubnetId",
- "SyslogIP": "SyslogIp",
- "VPCID": "VpcId",
- },
- },
- "github.com/aws/aws-sdk-go/service/cloudhsm/cloudhsmiface": {
- operations: map[string]string{
- "CreateHAPG": "CreateHapg",
- "CreateHAPGPages": "CreateHapgPages",
- "CreateHAPGRequest": "CreateHapgRequest",
- "CreateHSM": "CreateHsm",
- "CreateHSMPages": "CreateHsmPages",
- "CreateHSMRequest": "CreateHsmRequest",
- "DeleteHAPG": "DeleteHapg",
- "DeleteHAPGPages": "DeleteHapgPages",
- "DeleteHAPGRequest": "DeleteHapgRequest",
- "DeleteHSM": "DeleteHsm",
- "DeleteHSMPages": "DeleteHsmPages",
- "DeleteHSMRequest": "DeleteHsmRequest",
- "DescribeHAPG": "DescribeHapg",
- "DescribeHAPGPages": "DescribeHapgPages",
- "DescribeHAPGRequest": "DescribeHapgRequest",
- "DescribeHSM": "DescribeHsm",
- "DescribeHSMPages": "DescribeHsmPages",
- "DescribeHSMRequest": "DescribeHsmRequest",
- "ListHSMs": "ListHsms",
- "ListHSMsPages": "ListHsmsPages",
- "ListHSMsRequest": "ListHsmsRequest",
- "ModifyHAPG": "ModifyHapg",
- "ModifyHAPGPages": "ModifyHapgPages",
- "ModifyHAPGRequest": "ModifyHapgRequest",
- "ModifyHSM": "ModifyHsm",
- "ModifyHSMPages": "ModifyHsmPages",
- "ModifyHSMRequest": "ModifyHsmRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cloudsearch": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "DomainID": "DomainId",
- },
- },
- "github.com/aws/aws-sdk-go/service/cloudsearch/cloudsearchiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cloudsearchdomain": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ID": "Id",
- "RID": "Rid",
- "TimeMS": "Timems",
- },
- },
- "github.com/aws/aws-sdk-go/service/cloudsearchdomain/cloudsearchdomainiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cloudtrail": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "CloudWatchLogsLogGroupARN": "CloudWatchLogsLogGroupArn",
- "CloudWatchLogsRoleARN": "CloudWatchLogsRoleArn",
- "EventID": "EventId",
- "SNSTopicName": "SnsTopicName",
- },
- },
- "github.com/aws/aws-sdk-go/service/cloudtrail/cloudtrailiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cloudwatch": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "AlarmARN": "AlarmArn",
- },
- },
- "github.com/aws/aws-sdk-go/service/cloudwatch/cloudwatchiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cloudwatchlogs": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ARN": "Arn",
- "DestinationARN": "DestinationArn",
- "EventID": "EventId",
- "RoleARN": "RoleArn",
- "TargetARN": "TargetArn",
- },
- },
- "github.com/aws/aws-sdk-go/service/cloudwatchlogs/cloudwatchlogsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/codecommit": {
- operations: map[string]string{},
- shapes: map[string]string{
- "RepositoryNameIDPair": "RepositoryNameIdPair",
- },
- fields: map[string]string{
- "ARN": "Arn",
- "AccountID": "AccountId",
- "CloneURLHTTP": "CloneUrlHttp",
- "CloneURLSSH": "CloneUrlSsh",
- "CommitID": "CommitId",
- "RepositoryID": "RepositoryId",
- },
- },
- "github.com/aws/aws-sdk-go/service/codecommit/codecommitiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/codedeploy": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ApplicationID": "ApplicationId",
- "CommitID": "CommitId",
- "DeploymentConfigID": "DeploymentConfigId",
- "DeploymentGroupID": "DeploymentGroupId",
- "DeploymentID": "DeploymentId",
- "DeploymentIDs": "DeploymentIds",
- "EC2TagFilters": "Ec2TagFilters",
- "IAMUserARN": "IamUserArn",
- "InstanceARN": "InstanceArn",
- "InstanceID": "InstanceId",
- "ServiceRoleARN": "ServiceRoleArn",
- },
- },
- "github.com/aws/aws-sdk-go/service/codedeploy/codedeployiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/codepipeline": {
- operations: map[string]string{},
- shapes: map[string]string{
- "ActionTypeID": "ActionTypeId",
- },
- fields: map[string]string{
- "AccessKeyID": "AccessKeyId",
- "AccountID": "AccountId",
- "ActionTypeID": "ActionTypeId",
- "ClientID": "ClientId",
- "EntityURL": "EntityUrl",
- "EntityURLTemplate": "EntityUrlTemplate",
- "ExecutionURLTemplate": "ExecutionUrlTemplate",
- "ExternalExecutionID": "ExternalExecutionId",
- "ExternalExecutionURL": "ExternalExecutionUrl",
- "ID": "Id",
- "JobID": "JobId",
- "PipelineExecutionID": "PipelineExecutionId",
- "RevisionChangeID": "RevisionChangeId",
- "RevisionID": "RevisionId",
- "RevisionURL": "RevisionUrl",
- "RevisionURLTemplate": "RevisionUrlTemplate",
- "RoleARN": "RoleArn",
- "ThirdPartyConfigurationURL": "ThirdPartyConfigurationUrl",
- },
- },
- "github.com/aws/aws-sdk-go/service/codepipeline/codepipelineiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cognitoidentity": {
- operations: map[string]string{
- "GetID": "GetId",
- "GetIDPages": "GetIdPages",
- "GetIDRequest": "GetIdRequest",
- "GetOpenIDToken": "GetOpenIdToken",
- "GetOpenIDTokenForDeveloperIdentity": "GetOpenIdTokenForDeveloperIdentity",
- "GetOpenIDTokenForDeveloperIdentityPages": "GetOpenIdTokenForDeveloperIdentityPages",
- "GetOpenIDTokenForDeveloperIdentityRequest": "GetOpenIdTokenForDeveloperIdentityRequest",
- "GetOpenIDTokenPages": "GetOpenIdTokenPages",
- "GetOpenIDTokenRequest": "GetOpenIdTokenRequest",
- },
- shapes: map[string]string{
- "GetIDInput": "GetIdInput",
- "GetIDOutput": "GetIdOutput",
- "GetOpenIDTokenForDeveloperIdentityInput": "GetOpenIdTokenForDeveloperIdentityInput",
- "GetOpenIDTokenForDeveloperIdentityOutput": "GetOpenIdTokenForDeveloperIdentityOutput",
- "GetOpenIDTokenInput": "GetOpenIdTokenInput",
- "GetOpenIDTokenOutput": "GetOpenIdTokenOutput",
- "UnprocessedIdentityID": "UnprocessedIdentityId",
- },
- fields: map[string]string{
- "AccessKeyID": "AccessKeyId",
- "AccountID": "AccountId",
- "IdentityID": "IdentityId",
- "IdentityIDsToDelete": "IdentityIdsToDelete",
- "IdentityPoolID": "IdentityPoolId",
- "OpenIDConnectProviderARNs": "OpenIdConnectProviderARNs",
- "UnprocessedIdentityIDs": "UnprocessedIdentityIds",
- },
- },
- "github.com/aws/aws-sdk-go/service/cognitoidentity/cognitoidentityiface": {
- operations: map[string]string{
- "GetID": "GetId",
- "GetIDPages": "GetIdPages",
- "GetIDRequest": "GetIdRequest",
- "GetOpenIDToken": "GetOpenIdToken",
- "GetOpenIDTokenForDeveloperIdentity": "GetOpenIdTokenForDeveloperIdentity",
- "GetOpenIDTokenForDeveloperIdentityPages": "GetOpenIdTokenForDeveloperIdentityPages",
- "GetOpenIDTokenForDeveloperIdentityRequest": "GetOpenIdTokenForDeveloperIdentityRequest",
- "GetOpenIDTokenPages": "GetOpenIdTokenPages",
- "GetOpenIDTokenRequest": "GetOpenIdTokenRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/cognitosync": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ApplicationARNs": "ApplicationArns",
- "DeviceID": "DeviceId",
- "IdentityID": "IdentityId",
- "IdentityPoolID": "IdentityPoolId",
- "RoleARN": "RoleArn",
- },
- },
- "github.com/aws/aws-sdk-go/service/cognitosync/cognitosynciface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/configservice": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ARN": "Arn",
- "AccountID": "AccountId",
- "ConfigSnapshotID": "ConfigSnapshotId",
- "ConfigurationStateID": "ConfigurationStateId",
- "ResourceID": "ResourceId",
- "SNSTopicARN": "SnsTopicARN",
- },
- },
- "github.com/aws/aws-sdk-go/service/configservice/configserviceiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/datapipeline": {
- operations: map[string]string{},
- shapes: map[string]string{
- "PipelineIDName": "PipelineIdName",
- },
- fields: map[string]string{
- "AttemptID": "AttemptId",
- "ErrorID": "ErrorId",
- "ID": "Id",
- "IDs": "Ids",
- "ObjectID": "ObjectId",
- "ObjectIDs": "ObjectIds",
- "PipelineID": "PipelineId",
- "PipelineIDList": "PipelineIdList",
- "PipelineIDs": "PipelineIds",
- "TaskID": "TaskId",
- "TaskRunnerID": "TaskrunnerId",
- "UniqueID": "UniqueId",
- },
- },
- "github.com/aws/aws-sdk-go/service/datapipeline/datapipelineiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/devicefarm": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ARN": "Arn",
- "AWSAccountNumber": "AwsAccountNumber",
- "AppARN": "AppArn",
- "CPU": "Cpu",
- "DevicePoolARN": "DevicePoolArn",
- "ExtraDataPackageARN": "ExtraDataPackageArn",
- "NetworkProfileARN": "NetworkProfileArn",
- "ProjectARN": "ProjectArn",
- "TestPackageARN": "TestPackageArn",
- "URL": "Url",
- },
- },
- "github.com/aws/aws-sdk-go/service/devicefarm/devicefarmiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/directconnect": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ASN": "Asn",
- "CIDR": "Cidr",
- "ConnectionID": "ConnectionId",
- "InterconnectID": "InterconnectId",
- "VLAN": "Vlan",
- "VirtualGatewayID": "VirtualGatewayId",
- "VirtualInterfaceID": "VirtualInterfaceId",
- },
- },
- "github.com/aws/aws-sdk-go/service/directconnect/directconnectiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/directoryservice": {
- operations: map[string]string{
- "DisableSSO": "DisableSso",
- "DisableSSOPages": "DisableSsoPages",
- "DisableSSORequest": "DisableSsoRequest",
- "EnableSSO": "EnableSso",
- "EnableSSOPages": "EnableSsoPages",
- "EnableSSORequest": "EnableSsoRequest",
- },
- shapes: map[string]string{
- "DirectoryVPCSettings": "DirectoryVpcSettings",
- "DirectoryVPCSettingsDescription": "DirectoryVpcSettingsDescription",
- "DisableSSOInput": "DisableSsoInput",
- "DisableSSOOutput": "DisableSsoOutput",
- "EnableSSOInput": "EnableSsoInput",
- "EnableSSOOutput": "EnableSsoOutput",
- },
- fields: map[string]string{
- "AccessURL": "AccessUrl",
- "ComputerID": "ComputerId",
- "ConnectIPs": "ConnectIps",
- "CustomerDNSIPs": "CustomerDnsIps",
- "DNSIPAddrs": "DnsIpAddrs",
- "DirectoryID": "DirectoryId",
- "DirectoryIDs": "DirectoryIds",
- "SSOEnabled": "SsoEnabled",
- "SecurityGroupID": "SecurityGroupId",
- "SnapshotID": "SnapshotId",
- "SnapshotIDs": "SnapshotIds",
- "SubnetIDs": "SubnetIds",
- "VPCID": "VpcId",
- "VPCSettings": "VpcSettings",
- },
- },
- "github.com/aws/aws-sdk-go/service/directoryservice/directoryserviceiface": {
- operations: map[string]string{
- "DisableSSO": "DisableSso",
- "DisableSSOPages": "DisableSsoPages",
- "DisableSSORequest": "DisableSsoRequest",
- "EnableSSO": "EnableSso",
- "EnableSSOPages": "EnableSsoPages",
- "EnableSSORequest": "EnableSsoRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/dynamodb": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "IndexARN": "IndexArn",
- "LatestStreamARN": "LatestStreamArn",
- "TableARN": "TableArn",
- },
- },
- "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/dynamodbstreams": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "AWSRegion": "AwsRegion",
- "DynamoDB": "Dynamodb",
- "ExclusiveStartShardID": "ExclusiveStartShardId",
- "ExclusiveStartStreamARN": "ExclusiveStartStreamArn",
- "LastEvaluatedShardID": "LastEvaluatedShardId",
- "LastEvaluatedStreamARN": "LastEvaluatedStreamArn",
- "ParentShardID": "ParentShardId",
- "ShardID": "ShardId",
- "StreamARN": "StreamArn",
- },
- },
- "github.com/aws/aws-sdk-go/service/dynamodbstreams/dynamodbstreamsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/ec2": {
- operations: map[string]string{
- "AcceptVPCPeeringConnection": "AcceptVpcPeeringConnection",
- "AcceptVPCPeeringConnectionPages": "AcceptVpcPeeringConnectionPages",
- "AcceptVPCPeeringConnectionRequest": "AcceptVpcPeeringConnectionRequest",
- "AssignPrivateIPAddresses": "AssignPrivateIpAddresses",
- "AssignPrivateIPAddressesPages": "AssignPrivateIpAddressesPages",
- "AssignPrivateIPAddressesRequest": "AssignPrivateIpAddressesRequest",
- "AssociateDHCPOptions": "AssociateDhcpOptions",
- "AssociateDHCPOptionsPages": "AssociateDhcpOptionsPages",
- "AssociateDHCPOptionsRequest": "AssociateDhcpOptionsRequest",
- "AttachClassicLinkVPC": "AttachClassicLinkVpc",
- "AttachClassicLinkVPCPages": "AttachClassicLinkVpcPages",
- "AttachClassicLinkVPCRequest": "AttachClassicLinkVpcRequest",
- "AttachVPNGateway": "AttachVpnGateway",
- "AttachVPNGatewayPages": "AttachVpnGatewayPages",
- "AttachVPNGatewayRequest": "AttachVpnGatewayRequest",
- "CreateDHCPOptions": "CreateDhcpOptions",
- "CreateDHCPOptionsPages": "CreateDhcpOptionsPages",
- "CreateDHCPOptionsRequest": "CreateDhcpOptionsRequest",
- "CreateNetworkACL": "CreateNetworkAcl",
- "CreateNetworkACLEntry": "CreateNetworkAclEntry",
- "CreateNetworkACLEntryPages": "CreateNetworkAclEntryPages",
- "CreateNetworkACLEntryRequest": "CreateNetworkAclEntryRequest",
- "CreateNetworkACLPages": "CreateNetworkAclPages",
- "CreateNetworkACLRequest": "CreateNetworkAclRequest",
- "CreateVPC": "CreateVpc",
- "CreateVPCEndpoint": "CreateVpcEndpoint",
- "CreateVPCEndpointPages": "CreateVpcEndpointPages",
- "CreateVPCEndpointRequest": "CreateVpcEndpointRequest",
- "CreateVPCPages": "CreateVpcPages",
- "CreateVPCPeeringConnection": "CreateVpcPeeringConnection",
- "CreateVPCPeeringConnectionPages": "CreateVpcPeeringConnectionPages",
- "CreateVPCPeeringConnectionRequest": "CreateVpcPeeringConnectionRequest",
- "CreateVPCRequest": "CreateVpcRequest",
- "CreateVPNConnection": "CreateVpnConnection",
- "CreateVPNConnectionPages": "CreateVpnConnectionPages",
- "CreateVPNConnectionRequest": "CreateVpnConnectionRequest",
- "CreateVPNConnectionRoute": "CreateVpnConnectionRoute",
- "CreateVPNConnectionRoutePages": "CreateVpnConnectionRoutePages",
- "CreateVPNConnectionRouteRequest": "CreateVpnConnectionRouteRequest",
- "CreateVPNGateway": "CreateVpnGateway",
- "CreateVPNGatewayPages": "CreateVpnGatewayPages",
- "CreateVPNGatewayRequest": "CreateVpnGatewayRequest",
- "DeleteDHCPOptions": "DeleteDhcpOptions",
- "DeleteDHCPOptionsPages": "DeleteDhcpOptionsPages",
- "DeleteDHCPOptionsRequest": "DeleteDhcpOptionsRequest",
- "DeleteNetworkACL": "DeleteNetworkAcl",
- "DeleteNetworkACLEntry": "DeleteNetworkAclEntry",
- "DeleteNetworkACLEntryPages": "DeleteNetworkAclEntryPages",
- "DeleteNetworkACLEntryRequest": "DeleteNetworkAclEntryRequest",
- "DeleteNetworkACLPages": "DeleteNetworkAclPages",
- "DeleteNetworkACLRequest": "DeleteNetworkAclRequest",
- "DeleteVPC": "DeleteVpc",
- "DeleteVPCEndpoints": "DeleteVpcEndpoints",
- "DeleteVPCEndpointsPages": "DeleteVpcEndpointsPages",
- "DeleteVPCEndpointsRequest": "DeleteVpcEndpointsRequest",
- "DeleteVPCPages": "DeleteVpcPages",
- "DeleteVPCPeeringConnection": "DeleteVpcPeeringConnection",
- "DeleteVPCPeeringConnectionPages": "DeleteVpcPeeringConnectionPages",
- "DeleteVPCPeeringConnectionRequest": "DeleteVpcPeeringConnectionRequest",
- "DeleteVPCRequest": "DeleteVpcRequest",
- "DeleteVPNConnection": "DeleteVpnConnection",
- "DeleteVPNConnectionPages": "DeleteVpnConnectionPages",
- "DeleteVPNConnectionRequest": "DeleteVpnConnectionRequest",
- "DeleteVPNConnectionRoute": "DeleteVpnConnectionRoute",
- "DeleteVPNConnectionRoutePages": "DeleteVpnConnectionRoutePages",
- "DeleteVPNConnectionRouteRequest": "DeleteVpnConnectionRouteRequest",
- "DeleteVPNGateway": "DeleteVpnGateway",
- "DeleteVPNGatewayPages": "DeleteVpnGatewayPages",
- "DeleteVPNGatewayRequest": "DeleteVpnGatewayRequest",
- "DescribeDHCPOptions": "DescribeDhcpOptions",
- "DescribeDHCPOptionsPages": "DescribeDhcpOptionsPages",
- "DescribeDHCPOptionsRequest": "DescribeDhcpOptionsRequest",
- "DescribeNetworkACLs": "DescribeNetworkAcls",
- "DescribeNetworkACLsPages": "DescribeNetworkAclsPages",
- "DescribeNetworkACLsRequest": "DescribeNetworkAclsRequest",
- "DescribeVPCAttribute": "DescribeVpcAttribute",
- "DescribeVPCAttributePages": "DescribeVpcAttributePages",
- "DescribeVPCAttributeRequest": "DescribeVpcAttributeRequest",
- "DescribeVPCClassicLink": "DescribeVpcClassicLink",
- "DescribeVPCClassicLinkPages": "DescribeVpcClassicLinkPages",
- "DescribeVPCClassicLinkRequest": "DescribeVpcClassicLinkRequest",
- "DescribeVPCEndpointServices": "DescribeVpcEndpointServices",
- "DescribeVPCEndpointServicesPages": "DescribeVpcEndpointServicesPages",
- "DescribeVPCEndpointServicesRequest": "DescribeVpcEndpointServicesRequest",
- "DescribeVPCEndpoints": "DescribeVpcEndpoints",
- "DescribeVPCEndpointsPages": "DescribeVpcEndpointsPages",
- "DescribeVPCEndpointsRequest": "DescribeVpcEndpointsRequest",
- "DescribeVPCPeeringConnections": "DescribeVpcPeeringConnections",
- "DescribeVPCPeeringConnectionsPages": "DescribeVpcPeeringConnectionsPages",
- "DescribeVPCPeeringConnectionsRequest": "DescribeVpcPeeringConnectionsRequest",
- "DescribeVPCs": "DescribeVpcs",
- "DescribeVPCsPages": "DescribeVpcsPages",
- "DescribeVPCsRequest": "DescribeVpcsRequest",
- "DescribeVPNConnections": "DescribeVpnConnections",
- "DescribeVPNConnectionsPages": "DescribeVpnConnectionsPages",
- "DescribeVPNConnectionsRequest": "DescribeVpnConnectionsRequest",
- "DescribeVPNGateways": "DescribeVpnGateways",
- "DescribeVPNGatewaysPages": "DescribeVpnGatewaysPages",
- "DescribeVPNGatewaysRequest": "DescribeVpnGatewaysRequest",
- "DetachClassicLinkVPC": "DetachClassicLinkVpc",
- "DetachClassicLinkVPCPages": "DetachClassicLinkVpcPages",
- "DetachClassicLinkVPCRequest": "DetachClassicLinkVpcRequest",
- "DetachVPNGateway": "DetachVpnGateway",
- "DetachVPNGatewayPages": "DetachVpnGatewayPages",
- "DetachVPNGatewayRequest": "DetachVpnGatewayRequest",
- "DisableVGWRoutePropagation": "DisableVgwRoutePropagation",
- "DisableVGWRoutePropagationPages": "DisableVgwRoutePropagationPages",
- "DisableVGWRoutePropagationRequest": "DisableVgwRoutePropagationRequest",
- "DisableVPCClassicLink": "DisableVpcClassicLink",
- "DisableVPCClassicLinkPages": "DisableVpcClassicLinkPages",
- "DisableVPCClassicLinkRequest": "DisableVpcClassicLinkRequest",
- "EnableVGWRoutePropagation": "EnableVgwRoutePropagation",
- "EnableVGWRoutePropagationPages": "EnableVgwRoutePropagationPages",
- "EnableVGWRoutePropagationRequest": "EnableVgwRoutePropagationRequest",
- "EnableVPCClassicLink": "EnableVpcClassicLink",
- "EnableVPCClassicLinkPages": "EnableVpcClassicLinkPages",
- "EnableVPCClassicLinkRequest": "EnableVpcClassicLinkRequest",
- "ModifyVPCAttribute": "ModifyVpcAttribute",
- "ModifyVPCAttributePages": "ModifyVpcAttributePages",
- "ModifyVPCAttributeRequest": "ModifyVpcAttributeRequest",
- "ModifyVPCEndpoint": "ModifyVpcEndpoint",
- "ModifyVPCEndpointPages": "ModifyVpcEndpointPages",
- "ModifyVPCEndpointRequest": "ModifyVpcEndpointRequest",
- "MoveAddressToVPC": "MoveAddressToVpc",
- "MoveAddressToVPCPages": "MoveAddressToVpcPages",
- "MoveAddressToVPCRequest": "MoveAddressToVpcRequest",
- "RejectVPCPeeringConnection": "RejectVpcPeeringConnection",
- "RejectVPCPeeringConnectionPages": "RejectVpcPeeringConnectionPages",
- "RejectVPCPeeringConnectionRequest": "RejectVpcPeeringConnectionRequest",
- "ReplaceNetworkACLAssociation": "ReplaceNetworkAclAssociation",
- "ReplaceNetworkACLAssociationPages": "ReplaceNetworkAclAssociationPages",
- "ReplaceNetworkACLAssociationRequest": "ReplaceNetworkAclAssociationRequest",
- "ReplaceNetworkACLEntry": "ReplaceNetworkAclEntry",
- "ReplaceNetworkACLEntryPages": "ReplaceNetworkAclEntryPages",
- "ReplaceNetworkACLEntryRequest": "ReplaceNetworkAclEntryRequest",
- "UnassignPrivateIPAddresses": "UnassignPrivateIpAddresses",
- "UnassignPrivateIPAddressesPages": "UnassignPrivateIpAddressesPages",
- "UnassignPrivateIPAddressesRequest": "UnassignPrivateIpAddressesRequest",
- },
- shapes: map[string]string{
- "AcceptVPCPeeringConnectionInput": "AcceptVpcPeeringConnectionInput",
- "AcceptVPCPeeringConnectionOutput": "AcceptVpcPeeringConnectionOutput",
- "AssignPrivateIPAddressesInput": "AssignPrivateIpAddressesInput",
- "AssignPrivateIPAddressesOutput": "AssignPrivateIpAddressesOutput",
- "AssociateDHCPOptionsInput": "AssociateDhcpOptionsInput",
- "AssociateDHCPOptionsOutput": "AssociateDhcpOptionsOutput",
- "AttachClassicLinkVPCInput": "AttachClassicLinkVpcInput",
- "AttachClassicLinkVPCOutput": "AttachClassicLinkVpcOutput",
- "AttachVPNGatewayInput": "AttachVpnGatewayInput",
- "AttachVPNGatewayOutput": "AttachVpnGatewayOutput",
- "CreateDHCPOptionsInput": "CreateDhcpOptionsInput",
- "CreateDHCPOptionsOutput": "CreateDhcpOptionsOutput",
- "CreateNetworkACLEntryInput": "CreateNetworkAclEntryInput",
- "CreateNetworkACLEntryOutput": "CreateNetworkAclEntryOutput",
- "CreateNetworkACLInput": "CreateNetworkAclInput",
- "CreateNetworkACLOutput": "CreateNetworkAclOutput",
- "CreateVPCEndpointInput": "CreateVpcEndpointInput",
- "CreateVPCEndpointOutput": "CreateVpcEndpointOutput",
- "CreateVPCInput": "CreateVpcInput",
- "CreateVPCOutput": "CreateVpcOutput",
- "CreateVPCPeeringConnectionInput": "CreateVpcPeeringConnectionInput",
- "CreateVPCPeeringConnectionOutput": "CreateVpcPeeringConnectionOutput",
- "CreateVPNConnectionInput": "CreateVpnConnectionInput",
- "CreateVPNConnectionOutput": "CreateVpnConnectionOutput",
- "CreateVPNConnectionRouteInput": "CreateVpnConnectionRouteInput",
- "CreateVPNConnectionRouteOutput": "CreateVpnConnectionRouteOutput",
- "CreateVPNGatewayInput": "CreateVpnGatewayInput",
- "CreateVPNGatewayOutput": "CreateVpnGatewayOutput",
- "DHCPConfiguration": "DhcpConfiguration",
- "DHCPOptions": "DhcpOptions",
- "DeleteDHCPOptionsInput": "DeleteDhcpOptionsInput",
- "DeleteDHCPOptionsOutput": "DeleteDhcpOptionsOutput",
- "DeleteNetworkACLEntryInput": "DeleteNetworkAclEntryInput",
- "DeleteNetworkACLEntryOutput": "DeleteNetworkAclEntryOutput",
- "DeleteNetworkACLInput": "DeleteNetworkAclInput",
- "DeleteNetworkACLOutput": "DeleteNetworkAclOutput",
- "DeleteVPCEndpointsInput": "DeleteVpcEndpointsInput",
- "DeleteVPCEndpointsOutput": "DeleteVpcEndpointsOutput",
- "DeleteVPCInput": "DeleteVpcInput",
- "DeleteVPCOutput": "DeleteVpcOutput",
- "DeleteVPCPeeringConnectionInput": "DeleteVpcPeeringConnectionInput",
- "DeleteVPCPeeringConnectionOutput": "DeleteVpcPeeringConnectionOutput",
- "DeleteVPNConnectionInput": "DeleteVpnConnectionInput",
- "DeleteVPNConnectionOutput": "DeleteVpnConnectionOutput",
- "DeleteVPNConnectionRouteInput": "DeleteVpnConnectionRouteInput",
- "DeleteVPNConnectionRouteOutput": "DeleteVpnConnectionRouteOutput",
- "DeleteVPNGatewayInput": "DeleteVpnGatewayInput",
- "DeleteVPNGatewayOutput": "DeleteVpnGatewayOutput",
- "DescribeDHCPOptionsInput": "DescribeDhcpOptionsInput",
- "DescribeDHCPOptionsOutput": "DescribeDhcpOptionsOutput",
- "DescribeNetworkACLsInput": "DescribeNetworkAclsInput",
- "DescribeNetworkACLsOutput": "DescribeNetworkAclsOutput",
- "DescribeVPCAttributeInput": "DescribeVpcAttributeInput",
- "DescribeVPCAttributeOutput": "DescribeVpcAttributeOutput",
- "DescribeVPCClassicLinkInput": "DescribeVpcClassicLinkInput",
- "DescribeVPCClassicLinkOutput": "DescribeVpcClassicLinkOutput",
- "DescribeVPCEndpointServicesInput": "DescribeVpcEndpointServicesInput",
- "DescribeVPCEndpointServicesOutput": "DescribeVpcEndpointServicesOutput",
- "DescribeVPCEndpointsInput": "DescribeVpcEndpointsInput",
- "DescribeVPCEndpointsOutput": "DescribeVpcEndpointsOutput",
- "DescribeVPCPeeringConnectionsInput": "DescribeVpcPeeringConnectionsInput",
- "DescribeVPCPeeringConnectionsOutput": "DescribeVpcPeeringConnectionsOutput",
- "DescribeVPCsInput": "DescribeVpcsInput",
- "DescribeVPCsOutput": "DescribeVpcsOutput",
- "DescribeVPNConnectionsInput": "DescribeVpnConnectionsInput",
- "DescribeVPNConnectionsOutput": "DescribeVpnConnectionsOutput",
- "DescribeVPNGatewaysInput": "DescribeVpnGatewaysInput",
- "DescribeVPNGatewaysOutput": "DescribeVpnGatewaysOutput",
- "DetachClassicLinkVPCInput": "DetachClassicLinkVpcInput",
- "DetachClassicLinkVPCOutput": "DetachClassicLinkVpcOutput",
- "DetachVPNGatewayInput": "DetachVpnGatewayInput",
- "DetachVPNGatewayOutput": "DetachVpnGatewayOutput",
- "DisableVGWRoutePropagationInput": "DisableVgwRoutePropagationInput",
- "DisableVGWRoutePropagationOutput": "DisableVgwRoutePropagationOutput",
- "DisableVPCClassicLinkInput": "DisableVpcClassicLinkInput",
- "DisableVPCClassicLinkOutput": "DisableVpcClassicLinkOutput",
- "EBSBlockDevice": "EbsBlockDevice",
- "EBSInstanceBlockDevice": "EbsInstanceBlockDevice",
- "EBSInstanceBlockDeviceSpecification": "EbsInstanceBlockDeviceSpecification",
- "EnableVGWRoutePropagationInput": "EnableVgwRoutePropagationInput",
- "EnableVGWRoutePropagationOutput": "EnableVgwRoutePropagationOutput",
- "EnableVPCClassicLinkInput": "EnableVpcClassicLinkInput",
- "EnableVPCClassicLinkOutput": "EnableVpcClassicLinkOutput",
- "IAMInstanceProfile": "IamInstanceProfile",
- "IAMInstanceProfileSpecification": "IamInstanceProfileSpecification",
- "ICMPTypeCode": "IcmpTypeCode",
- "IPPermission": "IpPermission",
- "IPRange": "IpRange",
- "InstancePrivateIPAddress": "InstancePrivateIpAddress",
- "ModifyVPCAttributeInput": "ModifyVpcAttributeInput",
- "ModifyVPCAttributeOutput": "ModifyVpcAttributeOutput",
- "ModifyVPCEndpointInput": "ModifyVpcEndpointInput",
- "ModifyVPCEndpointOutput": "ModifyVpcEndpointOutput",
- "MoveAddressToVPCInput": "MoveAddressToVpcInput",
- "MoveAddressToVPCOutput": "MoveAddressToVpcOutput",
- "NetworkACL": "NetworkAcl",
- "NetworkACLAssociation": "NetworkAclAssociation",
- "NetworkACLEntry": "NetworkAclEntry",
- "NetworkInterfacePrivateIPAddress": "NetworkInterfacePrivateIpAddress",
- "NewDHCPConfiguration": "NewDhcpConfiguration",
- "PrefixListID": "PrefixListId",
- "PrivateIPAddressSpecification": "PrivateIpAddressSpecification",
- "PropagatingVGW": "PropagatingVgw",
- "RejectVPCPeeringConnectionInput": "RejectVpcPeeringConnectionInput",
- "RejectVPCPeeringConnectionOutput": "RejectVpcPeeringConnectionOutput",
- "ReplaceNetworkACLAssociationInput": "ReplaceNetworkAclAssociationInput",
- "ReplaceNetworkACLAssociationOutput": "ReplaceNetworkAclAssociationOutput",
- "ReplaceNetworkACLEntryInput": "ReplaceNetworkAclEntryInput",
- "ReplaceNetworkACLEntryOutput": "ReplaceNetworkAclEntryOutput",
- "ReservedInstancesID": "ReservedInstancesId",
- "UnassignPrivateIPAddressesInput": "UnassignPrivateIpAddressesInput",
- "UnassignPrivateIPAddressesOutput": "UnassignPrivateIpAddressesOutput",
- "UserIDGroupPair": "UserIdGroupPair",
- "VGWTelemetry": "VgwTelemetry",
- "VPC": "Vpc",
- "VPCAttachment": "VpcAttachment",
- "VPCClassicLink": "VpcClassicLink",
- "VPCEndpoint": "VpcEndpoint",
- "VPCPeeringConnection": "VpcPeeringConnection",
- "VPCPeeringConnectionStateReason": "VpcPeeringConnectionStateReason",
- "VPCPeeringConnectionVPCInfo": "VpcPeeringConnectionVpcInfo",
- "VPNConnection": "VpnConnection",
- "VPNConnectionOptions": "VpnConnectionOptions",
- "VPNConnectionOptionsSpecification": "VpnConnectionOptionsSpecification",
- "VPNGateway": "VpnGateway",
- "VPNStaticRoute": "VpnStaticRoute",
- },
- fields: map[string]string{
- "AMILaunchIndex": "AmiLaunchIndex",
- "ARN": "Arn",
- "AWSAccessKeyID": "AWSAccessKeyId",
- "AccepterVPCInfo": "AccepterVpcInfo",
- "AddRouteTableIDs": "AddRouteTableIds",
- "AllocationID": "AllocationId",
- "AllocationIDs": "AllocationIds",
- "AssociatePublicIPAddress": "AssociatePublicIpAddress",
- "AssociationID": "AssociationId",
- "AttachmentID": "AttachmentId",
- "AvailableIPAddressCount": "AvailableIpAddressCount",
- "BGPASN": "BgpAsn",
- "BundleID": "BundleId",
- "BundleIDs": "BundleIds",
- "CIDRBlock": "CidrBlock",
- "CIDRIP": "CidrIp",
- "CIDRs": "Cidrs",
- "ConversionTaskID": "ConversionTaskId",
- "ConversionTaskIDs": "ConversionTaskIds",
- "CustomerGatewayID": "CustomerGatewayId",
- "CustomerGatewayIDs": "CustomerGatewayIds",
- "DHCPConfigurations": "DhcpConfigurations",
- "DHCPOptions": "DhcpOptions",
- "DHCPOptionsID": "DhcpOptionsId",
- "DHCPOptionsIDs": "DhcpOptionsIds",
- "DefaultForAZ": "DefaultForAz",
- "DeliverLogsPermissionARN": "DeliverLogsPermissionArn",
- "DestinationCIDRBlock": "DestinationCidrBlock",
- "DestinationPrefixListID": "DestinationPrefixListId",
- "DisableAPITermination": "DisableApiTermination",
- "EBS": "Ebs",
- "EBSOptimized": "EbsOptimized",
- "EnableDNSHostnames": "EnableDnsHostnames",
- "EnableDNSSupport": "EnableDnsSupport",
- "EventID": "EventId",
- "ExportTaskID": "ExportTaskId",
- "ExportTaskIDs": "ExportTaskIds",
- "FlowLogID": "FlowLogId",
- "FlowLogIDs": "FlowLogIds",
- "GatewayID": "GatewayId",
- "GroupID": "GroupId",
- "GroupIDs": "GroupIds",
- "IAMFleetRole": "IamFleetRole",
- "IAMInstanceProfile": "IamInstanceProfile",
- "ICMPTypeCode": "IcmpTypeCode",
- "ID": "Id",
- "IOPS": "Iops",
- "IPAddress": "IpAddress",
- "IPOwnerID": "IpOwnerId",
- "IPPermissions": "IpPermissions",
- "IPPermissionsEgress": "IpPermissionsEgress",
- "IPProtocol": "IpProtocol",
- "IPRanges": "IpRanges",
- "ImageID": "ImageId",
- "ImageIDs": "ImageIds",
- "ImportManifestURL": "ImportManifestUrl",
- "ImportTaskID": "ImportTaskId",
- "ImportTaskIDs": "ImportTaskIds",
- "InstanceID": "InstanceId",
- "InstanceIDs": "InstanceIds",
- "InstanceOwnerID": "InstanceOwnerId",
- "InternetGatewayID": "InternetGatewayId",
- "InternetGatewayIDs": "InternetGatewayIds",
- "KMSKeyID": "KmsKeyId",
- "KernelID": "KernelId",
- "MACAddress": "MacAddress",
- "MapPublicIPOnLaunch": "MapPublicIpOnLaunch",
- "NetworkACL": "NetworkAcl",
- "NetworkACLAssociationID": "NetworkAclAssociationId",
- "NetworkACLID": "NetworkAclId",
- "NetworkACLIDs": "NetworkAclIds",
- "NetworkACLs": "NetworkAcls",
- "NetworkInterfaceID": "NetworkInterfaceId",
- "NetworkInterfaceIDs": "NetworkInterfaceIds",
- "NetworkInterfaceOwnerID": "NetworkInterfaceOwnerId",
- "NewAssociationID": "NewAssociationId",
- "OutsideIPAddress": "OutsideIpAddress",
- "OwnerID": "OwnerId",
- "OwnerIDs": "OwnerIds",
- "PeerOwnerID": "PeerOwnerId",
- "PeerVPCID": "PeerVpcId",
- "PrefixListID": "PrefixListId",
- "PrefixListIDs": "PrefixListIds",
- "PresignedURL": "PresignedUrl",
- "PrivateDNSName": "PrivateDnsName",
- "PrivateIPAddress": "PrivateIpAddress",
- "PrivateIPAddresses": "PrivateIpAddresses",
- "ProductCodeID": "ProductCodeId",
- "PropagatingVGWs": "PropagatingVgws",
- "PublicDNSName": "PublicDnsName",
- "PublicIP": "PublicIp",
- "PublicIPAddress": "PublicIpAddress",
- "PublicIPs": "PublicIps",
- "RAMDisk": "Ramdisk",
- "RAMDiskID": "RamdiskId",
- "RemoveRouteTableIDs": "RemoveRouteTableIds",
- "RequesterID": "RequesterId",
- "RequesterVPCInfo": "RequesterVpcInfo",
- "ReservationID": "ReservationId",
- "ReservedInstancesID": "ReservedInstancesId",
- "ReservedInstancesIDs": "ReservedInstancesIds",
- "ReservedInstancesListingID": "ReservedInstancesListingId",
- "ReservedInstancesModificationID": "ReservedInstancesModificationId",
- "ReservedInstancesModificationIDs": "ReservedInstancesModificationIds",
- "ReservedInstancesOfferingID": "ReservedInstancesOfferingId",
- "ReservedInstancesOfferingIDs": "ReservedInstancesOfferingIds",
- "ResourceID": "ResourceId",
- "ResourceIDs": "ResourceIds",
- "RestorableByUserIDs": "RestorableByUserIds",
- "RouteTableAssociationID": "RouteTableAssociationId",
- "RouteTableID": "RouteTableId",
- "RouteTableIDs": "RouteTableIds",
- "SRIOVNetSupport": "SriovNetSupport",
- "SecondaryPrivateIPAddressCount": "SecondaryPrivateIpAddressCount",
- "SecurityGroupIDs": "SecurityGroupIds",
- "SnapshotID": "SnapshotId",
- "SnapshotIDs": "SnapshotIds",
- "SourceImageID": "SourceImageId",
- "SourceSecurityGroupOwnerID": "SourceSecurityGroupOwnerId",
- "SourceSnapshotID": "SourceSnapshotId",
- "SpotFleetRequestID": "SpotFleetRequestId",
- "SpotFleetRequestIDs": "SpotFleetRequestIds",
- "SpotInstanceRequestID": "SpotInstanceRequestId",
- "SpotInstanceRequestIDs": "SpotInstanceRequestIds",
- "SubnetID": "SubnetId",
- "SubnetIDs": "SubnetIds",
- "URL": "Url",
- "UserID": "UserId",
- "UserIDGroupPairs": "UserIdGroupPairs",
- "UserIDs": "UserIds",
- "VGWTelemetry": "VgwTelemetry",
- "VPC": "Vpc",
- "VPCAttachment": "VpcAttachment",
- "VPCAttachments": "VpcAttachments",
- "VPCEndpoint": "VpcEndpoint",
- "VPCEndpointID": "VpcEndpointId",
- "VPCEndpointIDs": "VpcEndpointIds",
- "VPCEndpoints": "VpcEndpoints",
- "VPCID": "VpcId",
- "VPCIDs": "VpcIds",
- "VPCPeeringConnection": "VpcPeeringConnection",
- "VPCPeeringConnectionID": "VpcPeeringConnectionId",
- "VPCPeeringConnectionIDs": "VpcPeeringConnectionIds",
- "VPCPeeringConnections": "VpcPeeringConnections",
- "VPCs": "Vpcs",
- "VPNConnection": "VpnConnection",
- "VPNConnectionID": "VpnConnectionId",
- "VPNConnectionIDs": "VpnConnectionIds",
- "VPNConnections": "VpnConnections",
- "VPNGateway": "VpnGateway",
- "VPNGatewayID": "VpnGatewayId",
- "VPNGatewayIDs": "VpnGatewayIds",
- "VPNGateways": "VpnGateways",
- "VolumeID": "VolumeId",
- "VolumeIDs": "VolumeIds",
- },
- },
- "github.com/aws/aws-sdk-go/service/ec2/ec2iface": {
- operations: map[string]string{
- "AcceptVPCPeeringConnection": "AcceptVpcPeeringConnection",
- "AcceptVPCPeeringConnectionPages": "AcceptVpcPeeringConnectionPages",
- "AcceptVPCPeeringConnectionRequest": "AcceptVpcPeeringConnectionRequest",
- "AssignPrivateIPAddresses": "AssignPrivateIpAddresses",
- "AssignPrivateIPAddressesPages": "AssignPrivateIpAddressesPages",
- "AssignPrivateIPAddressesRequest": "AssignPrivateIpAddressesRequest",
- "AssociateDHCPOptions": "AssociateDhcpOptions",
- "AssociateDHCPOptionsPages": "AssociateDhcpOptionsPages",
- "AssociateDHCPOptionsRequest": "AssociateDhcpOptionsRequest",
- "AttachClassicLinkVPC": "AttachClassicLinkVpc",
- "AttachClassicLinkVPCPages": "AttachClassicLinkVpcPages",
- "AttachClassicLinkVPCRequest": "AttachClassicLinkVpcRequest",
- "AttachVPNGateway": "AttachVpnGateway",
- "AttachVPNGatewayPages": "AttachVpnGatewayPages",
- "AttachVPNGatewayRequest": "AttachVpnGatewayRequest",
- "CreateDHCPOptions": "CreateDhcpOptions",
- "CreateDHCPOptionsPages": "CreateDhcpOptionsPages",
- "CreateDHCPOptionsRequest": "CreateDhcpOptionsRequest",
- "CreateNetworkACL": "CreateNetworkAcl",
- "CreateNetworkACLEntry": "CreateNetworkAclEntry",
- "CreateNetworkACLEntryPages": "CreateNetworkAclEntryPages",
- "CreateNetworkACLEntryRequest": "CreateNetworkAclEntryRequest",
- "CreateNetworkACLPages": "CreateNetworkAclPages",
- "CreateNetworkACLRequest": "CreateNetworkAclRequest",
- "CreateVPC": "CreateVpc",
- "CreateVPCEndpoint": "CreateVpcEndpoint",
- "CreateVPCEndpointPages": "CreateVpcEndpointPages",
- "CreateVPCEndpointRequest": "CreateVpcEndpointRequest",
- "CreateVPCPages": "CreateVpcPages",
- "CreateVPCPeeringConnection": "CreateVpcPeeringConnection",
- "CreateVPCPeeringConnectionPages": "CreateVpcPeeringConnectionPages",
- "CreateVPCPeeringConnectionRequest": "CreateVpcPeeringConnectionRequest",
- "CreateVPCRequest": "CreateVpcRequest",
- "CreateVPNConnection": "CreateVpnConnection",
- "CreateVPNConnectionPages": "CreateVpnConnectionPages",
- "CreateVPNConnectionRequest": "CreateVpnConnectionRequest",
- "CreateVPNConnectionRoute": "CreateVpnConnectionRoute",
- "CreateVPNConnectionRoutePages": "CreateVpnConnectionRoutePages",
- "CreateVPNConnectionRouteRequest": "CreateVpnConnectionRouteRequest",
- "CreateVPNGateway": "CreateVpnGateway",
- "CreateVPNGatewayPages": "CreateVpnGatewayPages",
- "CreateVPNGatewayRequest": "CreateVpnGatewayRequest",
- "DeleteDHCPOptions": "DeleteDhcpOptions",
- "DeleteDHCPOptionsPages": "DeleteDhcpOptionsPages",
- "DeleteDHCPOptionsRequest": "DeleteDhcpOptionsRequest",
- "DeleteNetworkACL": "DeleteNetworkAcl",
- "DeleteNetworkACLEntry": "DeleteNetworkAclEntry",
- "DeleteNetworkACLEntryPages": "DeleteNetworkAclEntryPages",
- "DeleteNetworkACLEntryRequest": "DeleteNetworkAclEntryRequest",
- "DeleteNetworkACLPages": "DeleteNetworkAclPages",
- "DeleteNetworkACLRequest": "DeleteNetworkAclRequest",
- "DeleteVPC": "DeleteVpc",
- "DeleteVPCEndpoints": "DeleteVpcEndpoints",
- "DeleteVPCEndpointsPages": "DeleteVpcEndpointsPages",
- "DeleteVPCEndpointsRequest": "DeleteVpcEndpointsRequest",
- "DeleteVPCPages": "DeleteVpcPages",
- "DeleteVPCPeeringConnection": "DeleteVpcPeeringConnection",
- "DeleteVPCPeeringConnectionPages": "DeleteVpcPeeringConnectionPages",
- "DeleteVPCPeeringConnectionRequest": "DeleteVpcPeeringConnectionRequest",
- "DeleteVPCRequest": "DeleteVpcRequest",
- "DeleteVPNConnection": "DeleteVpnConnection",
- "DeleteVPNConnectionPages": "DeleteVpnConnectionPages",
- "DeleteVPNConnectionRequest": "DeleteVpnConnectionRequest",
- "DeleteVPNConnectionRoute": "DeleteVpnConnectionRoute",
- "DeleteVPNConnectionRoutePages": "DeleteVpnConnectionRoutePages",
- "DeleteVPNConnectionRouteRequest": "DeleteVpnConnectionRouteRequest",
- "DeleteVPNGateway": "DeleteVpnGateway",
- "DeleteVPNGatewayPages": "DeleteVpnGatewayPages",
- "DeleteVPNGatewayRequest": "DeleteVpnGatewayRequest",
- "DescribeDHCPOptions": "DescribeDhcpOptions",
- "DescribeDHCPOptionsPages": "DescribeDhcpOptionsPages",
- "DescribeDHCPOptionsRequest": "DescribeDhcpOptionsRequest",
- "DescribeNetworkACLs": "DescribeNetworkAcls",
- "DescribeNetworkACLsPages": "DescribeNetworkAclsPages",
- "DescribeNetworkACLsRequest": "DescribeNetworkAclsRequest",
- "DescribeVPCAttribute": "DescribeVpcAttribute",
- "DescribeVPCAttributePages": "DescribeVpcAttributePages",
- "DescribeVPCAttributeRequest": "DescribeVpcAttributeRequest",
- "DescribeVPCClassicLink": "DescribeVpcClassicLink",
- "DescribeVPCClassicLinkPages": "DescribeVpcClassicLinkPages",
- "DescribeVPCClassicLinkRequest": "DescribeVpcClassicLinkRequest",
- "DescribeVPCEndpointServices": "DescribeVpcEndpointServices",
- "DescribeVPCEndpointServicesPages": "DescribeVpcEndpointServicesPages",
- "DescribeVPCEndpointServicesRequest": "DescribeVpcEndpointServicesRequest",
- "DescribeVPCEndpoints": "DescribeVpcEndpoints",
- "DescribeVPCEndpointsPages": "DescribeVpcEndpointsPages",
- "DescribeVPCEndpointsRequest": "DescribeVpcEndpointsRequest",
- "DescribeVPCPeeringConnections": "DescribeVpcPeeringConnections",
- "DescribeVPCPeeringConnectionsPages": "DescribeVpcPeeringConnectionsPages",
- "DescribeVPCPeeringConnectionsRequest": "DescribeVpcPeeringConnectionsRequest",
- "DescribeVPCs": "DescribeVpcs",
- "DescribeVPCsPages": "DescribeVpcsPages",
- "DescribeVPCsRequest": "DescribeVpcsRequest",
- "DescribeVPNConnections": "DescribeVpnConnections",
- "DescribeVPNConnectionsPages": "DescribeVpnConnectionsPages",
- "DescribeVPNConnectionsRequest": "DescribeVpnConnectionsRequest",
- "DescribeVPNGateways": "DescribeVpnGateways",
- "DescribeVPNGatewaysPages": "DescribeVpnGatewaysPages",
- "DescribeVPNGatewaysRequest": "DescribeVpnGatewaysRequest",
- "DetachClassicLinkVPC": "DetachClassicLinkVpc",
- "DetachClassicLinkVPCPages": "DetachClassicLinkVpcPages",
- "DetachClassicLinkVPCRequest": "DetachClassicLinkVpcRequest",
- "DetachVPNGateway": "DetachVpnGateway",
- "DetachVPNGatewayPages": "DetachVpnGatewayPages",
- "DetachVPNGatewayRequest": "DetachVpnGatewayRequest",
- "DisableVGWRoutePropagation": "DisableVgwRoutePropagation",
- "DisableVGWRoutePropagationPages": "DisableVgwRoutePropagationPages",
- "DisableVGWRoutePropagationRequest": "DisableVgwRoutePropagationRequest",
- "DisableVPCClassicLink": "DisableVpcClassicLink",
- "DisableVPCClassicLinkPages": "DisableVpcClassicLinkPages",
- "DisableVPCClassicLinkRequest": "DisableVpcClassicLinkRequest",
- "EnableVGWRoutePropagation": "EnableVgwRoutePropagation",
- "EnableVGWRoutePropagationPages": "EnableVgwRoutePropagationPages",
- "EnableVGWRoutePropagationRequest": "EnableVgwRoutePropagationRequest",
- "EnableVPCClassicLink": "EnableVpcClassicLink",
- "EnableVPCClassicLinkPages": "EnableVpcClassicLinkPages",
- "EnableVPCClassicLinkRequest": "EnableVpcClassicLinkRequest",
- "ModifyVPCAttribute": "ModifyVpcAttribute",
- "ModifyVPCAttributePages": "ModifyVpcAttributePages",
- "ModifyVPCAttributeRequest": "ModifyVpcAttributeRequest",
- "ModifyVPCEndpoint": "ModifyVpcEndpoint",
- "ModifyVPCEndpointPages": "ModifyVpcEndpointPages",
- "ModifyVPCEndpointRequest": "ModifyVpcEndpointRequest",
- "MoveAddressToVPC": "MoveAddressToVpc",
- "MoveAddressToVPCPages": "MoveAddressToVpcPages",
- "MoveAddressToVPCRequest": "MoveAddressToVpcRequest",
- "RejectVPCPeeringConnection": "RejectVpcPeeringConnection",
- "RejectVPCPeeringConnectionPages": "RejectVpcPeeringConnectionPages",
- "RejectVPCPeeringConnectionRequest": "RejectVpcPeeringConnectionRequest",
- "ReplaceNetworkACLAssociation": "ReplaceNetworkAclAssociation",
- "ReplaceNetworkACLAssociationPages": "ReplaceNetworkAclAssociationPages",
- "ReplaceNetworkACLAssociationRequest": "ReplaceNetworkAclAssociationRequest",
- "ReplaceNetworkACLEntry": "ReplaceNetworkAclEntry",
- "ReplaceNetworkACLEntryPages": "ReplaceNetworkAclEntryPages",
- "ReplaceNetworkACLEntryRequest": "ReplaceNetworkAclEntryRequest",
- "UnassignPrivateIPAddresses": "UnassignPrivateIpAddresses",
- "UnassignPrivateIPAddressesPages": "UnassignPrivateIpAddressesPages",
- "UnassignPrivateIPAddressesRequest": "UnassignPrivateIpAddressesRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/ecs": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ARN": "Arn",
- "CPU": "Cpu",
- "ClusterARN": "ClusterArn",
- "ClusterARNs": "ClusterArns",
- "ContainerARN": "ContainerArn",
- "ContainerInstanceARN": "ContainerInstanceArn",
- "ContainerInstanceARNs": "ContainerInstanceArns",
- "EC2InstanceID": "Ec2InstanceId",
- "ID": "Id",
- "RoleARN": "RoleArn",
- "ServiceARN": "ServiceArn",
- "ServiceARNs": "ServiceArns",
- "TaskARN": "TaskArn",
- "TaskARNs": "TaskArns",
- "TaskDefinitionARN": "TaskDefinitionArn",
- "TaskDefinitionARNs": "TaskDefinitionArns",
- },
- },
- "github.com/aws/aws-sdk-go/service/ecs/ecsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/efs": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "FileSystemID": "FileSystemId",
- "IPAddress": "IpAddress",
- "MountTargetID": "MountTargetId",
- "NetworkInterfaceID": "NetworkInterfaceId",
- "OwnerID": "OwnerId",
- "SubnetID": "SubnetId",
- },
- },
- "github.com/aws/aws-sdk-go/service/efs/efsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/elasticache": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "CacheClusterID": "CacheClusterId",
- "CacheNodeID": "CacheNodeId",
- "CacheNodeIDsToReboot": "CacheNodeIdsToReboot",
- "CacheNodeIDsToRemove": "CacheNodeIdsToRemove",
- "EC2SecurityGroupOwnerID": "EC2SecurityGroupOwnerId",
- "NodeGroupID": "NodeGroupId",
- "NotificationTopicARN": "NotificationTopicArn",
- "OwnerID": "OwnerId",
- "PrimaryClusterID": "PrimaryClusterId",
- "ReplicationGroupID": "ReplicationGroupId",
- "ReservedCacheNodeID": "ReservedCacheNodeId",
- "ReservedCacheNodesOfferingID": "ReservedCacheNodesOfferingId",
- "SecurityGroupID": "SecurityGroupId",
- "SecurityGroupIDs": "SecurityGroupIds",
- "SnapshotARNs": "SnapshotArns",
- "SnapshottingClusterID": "SnapshottingClusterId",
- "SourceCacheNodeID": "SourceCacheNodeId",
- "SubnetIDs": "SubnetIds",
- "TopicARN": "TopicArn",
- "VPCID": "VpcId",
- },
- },
- "github.com/aws/aws-sdk-go/service/elasticache/elasticacheiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/elasticbeanstalk": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "DestinationEnvironmentID": "DestinationEnvironmentId",
- "EC2InstanceID": "Ec2InstanceId",
- "EnvironmentID": "EnvironmentId",
- "EnvironmentIDs": "EnvironmentIds",
- "ID": "Id",
- "OK": "Ok",
- "RequestID": "RequestId",
- "SourceEnvironmentID": "SourceEnvironmentId",
- },
- },
- "github.com/aws/aws-sdk-go/service/elasticbeanstalk/elasticbeanstalkiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/elastictranscoder": {
- operations: map[string]string{},
- shapes: map[string]string{
- "HLSContentProtection": "HlsContentProtection",
- "PlayReadyDRM": "PlayReadyDrm",
- },
- fields: map[string]string{
- "ARN": "Arn",
- "AWSKMSKeyARN": "AwsKmsKeyArn",
- "HLSContentProtection": "HlsContentProtection",
- "ID": "Id",
- "KeyID": "KeyId",
- "KeyMD5": "KeyMd5",
- "LicenseAcquisitionURL": "LicenseAcquisitionUrl",
- "PipelineID": "PipelineId",
- "PlayReadyDRM": "PlayReadyDrm",
- "PresetID": "PresetId",
- "PresetWatermarkID": "PresetWatermarkId",
- },
- },
- "github.com/aws/aws-sdk-go/service/elastictranscoder/elastictranscoderiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/elb": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "InstanceID": "InstanceId",
- "SSLCertificateID": "SSLCertificateId",
- "VPCID": "VPCId",
- },
- },
- "github.com/aws/aws-sdk-go/service/elb/elbiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/emr": {
- operations: map[string]string{},
- shapes: map[string]string{
- "EC2InstanceAttributes": "Ec2InstanceAttributes",
- "HadoopJARStepConfig": "HadoopJarStepConfig",
- },
- fields: map[string]string{
- "AMIVersion": "AmiVersion",
- "ClusterID": "ClusterId",
- "EC2AvailabilityZone": "Ec2AvailabilityZone",
- "EC2InstanceAttributes": "Ec2InstanceAttributes",
- "EC2InstanceID": "Ec2InstanceId",
- "EC2InstanceIDsToTerminate": "EC2InstanceIdsToTerminate",
- "EC2KeyName": "Ec2KeyName",
- "EC2SubnetID": "Ec2SubnetId",
- "EMRManagedMasterSecurityGroup": "EmrManagedMasterSecurityGroup",
- "EMRManagedSlaveSecurityGroup": "EmrManagedSlaveSecurityGroup",
- "HadoopJARStep": "HadoopJarStep",
- "IAMInstanceProfile": "IamInstanceProfile",
- "ID": "Id",
- "InstanceGroupID": "InstanceGroupId",
- "InstanceGroupIDs": "InstanceGroupIds",
- "JAR": "Jar",
- "JobFlowID": "JobFlowId",
- "JobFlowIDs": "JobFlowIds",
- "LogURI": "LogUri",
- "MasterInstanceID": "MasterInstanceId",
- "MasterPublicDNSName": "MasterPublicDnsName",
- "PrivateDNSName": "PrivateDnsName",
- "PrivateIPAddress": "PrivateIpAddress",
- "PublicDNSName": "PublicDnsName",
- "PublicIPAddress": "PublicIpAddress",
- "RequestedAMIVersion": "RequestedAmiVersion",
- "ResourceID": "ResourceId",
- "RunningAMIVersion": "RunningAmiVersion",
- "StepID": "StepId",
- "StepIDs": "StepIds",
- },
- },
- "github.com/aws/aws-sdk-go/service/emr/emriface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/glacier": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "AccountID": "AccountId",
- "ArchiveID": "ArchiveId",
- "JobID": "JobId",
- "LockID": "LockId",
- "MultipartUploadID": "MultipartUploadId",
- "UploadID": "UploadId",
- },
- },
- "github.com/aws/aws-sdk-go/service/glacier/glacieriface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/iam": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ARN": "Arn",
- "AccessKeyID": "AccessKeyId",
- "CertificateID": "CertificateId",
- "DefaultVersionID": "DefaultVersionId",
- "GroupID": "GroupId",
- "InstanceProfileID": "InstanceProfileId",
- "OpenIDConnectProviderARN": "OpenIDConnectProviderArn",
- "PolicyARN": "PolicyArn",
- "PolicyID": "PolicyId",
- "RoleID": "RoleId",
- "SAMLProviderARN": "SAMLProviderArn",
- "SSHPublicKeyID": "SSHPublicKeyId",
- "ServerCertificateID": "ServerCertificateId",
- "URL": "Url",
- "UserID": "UserId",
- "VersionID": "VersionId",
- },
- },
- "github.com/aws/aws-sdk-go/service/iam/iamiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/kinesis": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "AdjacentParentShardID": "AdjacentParentShardId",
- "ExclusiveStartShardID": "ExclusiveStartShardId",
- "ParentShardID": "ParentShardId",
- "ShardID": "ShardId",
- },
- },
- "github.com/aws/aws-sdk-go/service/kinesis/kinesisiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/kms": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ARN": "Arn",
- "AWSAccountID": "AWSAccountId",
- "AliasARN": "AliasArn",
- "DestinationKeyID": "DestinationKeyId",
- "GrantID": "GrantId",
- "KeyARN": "KeyArn",
- "KeyID": "KeyId",
- "SourceKeyID": "SourceKeyId",
- "TargetKeyID": "TargetKeyId",
- },
- },
- "github.com/aws/aws-sdk-go/service/kms/kmsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/lambda": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "EventSourceARN": "EventSourceArn",
- "FunctionARN": "FunctionArn",
- "SourceARN": "SourceArn",
- "StatementID": "StatementId",
- },
- },
- "github.com/aws/aws-sdk-go/service/lambda/lambdaiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/machinelearning": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "BatchPredictionDataSourceID": "BatchPredictionDataSourceId",
- "BatchPredictionID": "BatchPredictionId",
- "CreatedByIAMUser": "CreatedByIamUser",
- "DataPipelineID": "DataPipelineId",
- "DataSchemaURI": "DataSchemaUri",
- "DataSourceID": "DataSourceId",
- "EndpointURL": "EndpointUrl",
- "EvaluationDataSourceID": "EvaluationDataSourceId",
- "EvaluationID": "EvaluationId",
- "LogURI": "LogUri",
- "MLModelID": "MLModelId",
- "OutputURI": "OutputUri",
- "RecipeURI": "RecipeUri",
- "SecurityGroupIDs": "SecurityGroupIds",
- "SelectSQLQuery": "SelectSqlQuery",
- "SubnetID": "SubnetId",
- "TrainingDataSourceID": "TrainingDataSourceId",
- },
- },
- "github.com/aws/aws-sdk-go/service/machinelearning/machinelearningiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/mobileanalytics": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ID": "Id",
- },
- },
- "github.com/aws/aws-sdk-go/service/mobileanalytics/mobileanalyticsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/opsworks": {
- operations: map[string]string{
- "AssociateElasticIP": "AssociateElasticIp",
- "AssociateElasticIPPages": "AssociateElasticIpPages",
- "AssociateElasticIPRequest": "AssociateElasticIpRequest",
- "DeregisterElasticIP": "DeregisterElasticIp",
- "DeregisterElasticIPPages": "DeregisterElasticIpPages",
- "DeregisterElasticIPRequest": "DeregisterElasticIpRequest",
- "DeregisterRDSDBInstance": "DeregisterRdsDbInstance",
- "DeregisterRDSDBInstancePages": "DeregisterRdsDbInstancePages",
- "DeregisterRDSDBInstanceRequest": "DeregisterRdsDbInstanceRequest",
- "DescribeElasticIPs": "DescribeElasticIps",
- "DescribeElasticIPsPages": "DescribeElasticIpsPages",
- "DescribeElasticIPsRequest": "DescribeElasticIpsRequest",
- "DescribeRAIDArrays": "DescribeRaidArrays",
- "DescribeRAIDArraysPages": "DescribeRaidArraysPages",
- "DescribeRAIDArraysRequest": "DescribeRaidArraysRequest",
- "DescribeRDSDBInstances": "DescribeRdsDbInstances",
- "DescribeRDSDBInstancesPages": "DescribeRdsDbInstancesPages",
- "DescribeRDSDBInstancesRequest": "DescribeRdsDbInstancesRequest",
- "DisassociateElasticIP": "DisassociateElasticIp",
- "DisassociateElasticIPPages": "DisassociateElasticIpPages",
- "DisassociateElasticIPRequest": "DisassociateElasticIpRequest",
- "RegisterElasticIP": "RegisterElasticIp",
- "RegisterElasticIPPages": "RegisterElasticIpPages",
- "RegisterElasticIPRequest": "RegisterElasticIpRequest",
- "RegisterRDSDBInstance": "RegisterRdsDbInstance",
- "RegisterRDSDBInstancePages": "RegisterRdsDbInstancePages",
- "RegisterRDSDBInstanceRequest": "RegisterRdsDbInstanceRequest",
- "UpdateElasticIP": "UpdateElasticIp",
- "UpdateElasticIPPages": "UpdateElasticIpPages",
- "UpdateElasticIPRequest": "UpdateElasticIpRequest",
- "UpdateRDSDBInstance": "UpdateRdsDbInstance",
- "UpdateRDSDBInstancePages": "UpdateRdsDbInstancePages",
- "UpdateRDSDBInstanceRequest": "UpdateRdsDbInstanceRequest",
- },
- shapes: map[string]string{
- "AssociateElasticIPInput": "AssociateElasticIpInput",
- "AssociateElasticIPOutput": "AssociateElasticIpOutput",
- "DeregisterElasticIPInput": "DeregisterElasticIpInput",
- "DeregisterElasticIPOutput": "DeregisterElasticIpOutput",
- "DeregisterRDSDBInstanceInput": "DeregisterRdsDbInstanceInput",
- "DeregisterRDSDBInstanceOutput": "DeregisterRdsDbInstanceOutput",
- "DescribeElasticIPsInput": "DescribeElasticIpsInput",
- "DescribeElasticIPsOutput": "DescribeElasticIpsOutput",
- "DescribeRAIDArraysInput": "DescribeRaidArraysInput",
- "DescribeRAIDArraysOutput": "DescribeRaidArraysOutput",
- "DescribeRDSDBInstancesInput": "DescribeRdsDbInstancesInput",
- "DescribeRDSDBInstancesOutput": "DescribeRdsDbInstancesOutput",
- "DisassociateElasticIPInput": "DisassociateElasticIpInput",
- "DisassociateElasticIPOutput": "DisassociateElasticIpOutput",
- "EBSBlockDevice": "EbsBlockDevice",
- "ElasticIP": "ElasticIp",
- "RAIDArray": "RaidArray",
- "RDSDBInstance": "RdsDbInstance",
- "RegisterElasticIPInput": "RegisterElasticIpInput",
- "RegisterElasticIPOutput": "RegisterElasticIpOutput",
- "RegisterRDSDBInstanceInput": "RegisterRdsDbInstanceInput",
- "RegisterRDSDBInstanceOutput": "RegisterRdsDbInstanceOutput",
- "SSLConfiguration": "SslConfiguration",
- "UpdateElasticIPInput": "UpdateElasticIpInput",
- "UpdateElasticIPOutput": "UpdateElasticIpOutput",
- "UpdateRDSDBInstanceInput": "UpdateRdsDbInstanceInput",
- "UpdateRDSDBInstanceOutput": "UpdateRdsDbInstanceOutput",
- },
- fields: map[string]string{
- "AMIID": "AmiId",
- "ARN": "Arn",
- "AgentInstallerURL": "AgentInstallerUrl",
- "AllowSSH": "AllowSsh",
- "AppID": "AppId",
- "AppIDs": "AppIds",
- "AutoAssignElasticIPs": "AutoAssignElasticIps",
- "AutoAssignPublicIPs": "AutoAssignPublicIps",
- "CPUThreshold": "CpuThreshold",
- "CloneAppIDs": "CloneAppIds",
- "CommandID": "CommandId",
- "CommandIDs": "CommandIds",
- "CustomInstanceProfileARN": "CustomInstanceProfileArn",
- "CustomJSON": "CustomJson",
- "CustomSecurityGroupIDs": "CustomSecurityGroupIds",
- "DBInstanceIdentifier": "DbInstanceIdentifier",
- "DBPassword": "DbPassword",
- "DBUser": "DbUser",
- "DNSName": "DnsName",
- "DefaultInstanceProfileARN": "DefaultInstanceProfileArn",
- "DefaultSSHKeyName": "DefaultSshKeyName",
- "DefaultSubnetID": "DefaultSubnetId",
- "DelayUntilELBConnectionsDrained": "DelayUntilElbConnectionsDrained",
- "DeleteElasticIP": "DeleteElasticIp",
- "DeploymentID": "DeploymentId",
- "DeploymentIDs": "DeploymentIds",
- "EBS": "Ebs",
- "EBSOptimized": "EbsOptimized",
- "EC2InstanceID": "Ec2InstanceId",
- "EC2InstanceIDs": "Ec2InstanceIds",
- "EC2VolumeID": "Ec2VolumeId",
- "EcsClusterARN": "EcsClusterArn",
- "EcsClusterARNs": "EcsClusterArns",
- "EcsContainerInstanceARN": "EcsContainerInstanceArn",
- "ElasticIP": "ElasticIp",
- "ElasticIPs": "ElasticIps",
- "EnableSSL": "EnableSsl",
- "IAMUserARN": "IamUserArn",
- "IAMUserARNs": "IamUserArns",
- "IOPS": "Iops",
- "IP": "Ip",
- "IPs": "Ips",
- "InstanceID": "InstanceId",
- "InstanceIDs": "InstanceIds",
- "InstanceProfileARN": "InstanceProfileArn",
- "LastServiceErrorID": "LastServiceErrorId",
- "LayerID": "LayerId",
- "LayerIDs": "LayerIds",
- "LogURL": "LogUrl",
- "MissingOnRDS": "MissingOnRds",
- "PrivateDNS": "PrivateDns",
- "PrivateIP": "PrivateIp",
- "PublicDNS": "PublicDns",
- "PublicIP": "PublicIp",
- "RAIDArrayID": "RaidArrayId",
- "RAIDArrayIDs": "RaidArrayIds",
- "RAIDArrays": "RaidArrays",
- "RAIDLevel": "RaidLevel",
- "RDSDBInstanceARN": "RdsDbInstanceArn",
- "RDSDBInstanceARNs": "RdsDbInstanceArns",
- "RDSDBInstances": "RdsDbInstances",
- "RSAPublicKey": "RsaPublicKey",
- "RSAPublicKeyFingerprint": "RsaPublicKeyFingerprint",
- "RootDeviceVolumeID": "RootDeviceVolumeId",
- "SSHHostDSAKeyFingerprint": "SshHostDsaKeyFingerprint",
- "SSHHostRSAKeyFingerprint": "SshHostRsaKeyFingerprint",
- "SSHKey": "SshKey",
- "SSHKeyName": "SshKeyName",
- "SSHPublicKey": "SshPublicKey",
- "SSHUsername": "SshUsername",
- "SSLConfiguration": "SslConfiguration",
- "SecurityGroupIDs": "SecurityGroupIds",
- "ServiceErrorID": "ServiceErrorId",
- "ServiceErrorIDs": "ServiceErrorIds",
- "ServiceRoleARN": "ServiceRoleArn",
- "SnapshotID": "SnapshotId",
- "SourceStackID": "SourceStackId",
- "StackID": "StackId",
- "StackIDs": "StackIds",
- "SubnetID": "SubnetId",
- "SubnetIDs": "SubnetIds",
- "URL": "Url",
- "UseEBSOptimizedInstances": "UseEbsOptimizedInstances",
- "UseOpsWorksSecurityGroups": "UseOpsworksSecurityGroups",
- "VPCID": "VpcId",
- "VolumeID": "VolumeId",
- "VolumeIDs": "VolumeIds",
- },
- },
- "github.com/aws/aws-sdk-go/service/opsworks/opsworksiface": {
- operations: map[string]string{
- "AssociateElasticIP": "AssociateElasticIp",
- "AssociateElasticIPPages": "AssociateElasticIpPages",
- "AssociateElasticIPRequest": "AssociateElasticIpRequest",
- "DeregisterElasticIP": "DeregisterElasticIp",
- "DeregisterElasticIPPages": "DeregisterElasticIpPages",
- "DeregisterElasticIPRequest": "DeregisterElasticIpRequest",
- "DeregisterRDSDBInstance": "DeregisterRdsDbInstance",
- "DeregisterRDSDBInstancePages": "DeregisterRdsDbInstancePages",
- "DeregisterRDSDBInstanceRequest": "DeregisterRdsDbInstanceRequest",
- "DescribeElasticIPs": "DescribeElasticIps",
- "DescribeElasticIPsPages": "DescribeElasticIpsPages",
- "DescribeElasticIPsRequest": "DescribeElasticIpsRequest",
- "DescribeRAIDArrays": "DescribeRaidArrays",
- "DescribeRAIDArraysPages": "DescribeRaidArraysPages",
- "DescribeRAIDArraysRequest": "DescribeRaidArraysRequest",
- "DescribeRDSDBInstances": "DescribeRdsDbInstances",
- "DescribeRDSDBInstancesPages": "DescribeRdsDbInstancesPages",
- "DescribeRDSDBInstancesRequest": "DescribeRdsDbInstancesRequest",
- "DisassociateElasticIP": "DisassociateElasticIp",
- "DisassociateElasticIPPages": "DisassociateElasticIpPages",
- "DisassociateElasticIPRequest": "DisassociateElasticIpRequest",
- "RegisterElasticIP": "RegisterElasticIp",
- "RegisterElasticIPPages": "RegisterElasticIpPages",
- "RegisterElasticIPRequest": "RegisterElasticIpRequest",
- "RegisterRDSDBInstance": "RegisterRdsDbInstance",
- "RegisterRDSDBInstancePages": "RegisterRdsDbInstancePages",
- "RegisterRDSDBInstanceRequest": "RegisterRdsDbInstanceRequest",
- "UpdateElasticIP": "UpdateElasticIp",
- "UpdateElasticIPPages": "UpdateElasticIpPages",
- "UpdateElasticIPRequest": "UpdateElasticIpRequest",
- "UpdateRDSDBInstance": "UpdateRdsDbInstance",
- "UpdateRDSDBInstancePages": "UpdateRdsDbInstancePages",
- "UpdateRDSDBInstanceRequest": "UpdateRdsDbInstanceRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/rds": {
- operations: map[string]string{},
- shapes: map[string]string{
- "VPCSecurityGroupMembership": "VpcSecurityGroupMembership",
- },
- fields: map[string]string{
- "AllowsVPCAndNonVPCInstanceMemberships": "AllowsVpcAndNonVpcInstanceMemberships",
- "CustSubscriptionID": "CustSubscriptionId",
- "CustomerAWSID": "CustomerAwsId",
- "DBIResourceID": "DbiResourceId",
- "DBInstancePort": "DbInstancePort",
- "EC2SecurityGroupID": "EC2SecurityGroupId",
- "EC2SecurityGroupOwnerID": "EC2SecurityGroupOwnerId",
- "IOPS": "Iops",
- "KMSKeyID": "KmsKeyId",
- "OwnerID": "OwnerId",
- "ReservedDBInstanceID": "ReservedDBInstanceId",
- "ReservedDBInstancesOfferingID": "ReservedDBInstancesOfferingId",
- "SNSTopicARN": "SnsTopicArn",
- "SourceIDs": "SourceIds",
- "SourceIDsList": "SourceIdsList",
- "SubnetIDs": "SubnetIds",
- "SupportsIOPS": "SupportsIops",
- "TDECredentialARN": "TdeCredentialArn",
- "TDECredentialPassword": "TdeCredentialPassword",
- "VPC": "Vpc",
- "VPCID": "VpcId",
- "VPCSecurityGroupID": "VpcSecurityGroupId",
- "VPCSecurityGroupIDs": "VpcSecurityGroupIds",
- "VPCSecurityGroupMemberships": "VpcSecurityGroupMemberships",
- "VPCSecurityGroups": "VpcSecurityGroups",
- },
- },
- "github.com/aws/aws-sdk-go/service/rds/rdsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/redshift": {
- operations: map[string]string{
- "CreateHSMClientCertificate": "CreateHsmClientCertificate",
- "CreateHSMClientCertificatePages": "CreateHsmClientCertificatePages",
- "CreateHSMClientCertificateRequest": "CreateHsmClientCertificateRequest",
- "CreateHSMConfiguration": "CreateHsmConfiguration",
- "CreateHSMConfigurationPages": "CreateHsmConfigurationPages",
- "CreateHSMConfigurationRequest": "CreateHsmConfigurationRequest",
- "DeleteHSMClientCertificate": "DeleteHsmClientCertificate",
- "DeleteHSMClientCertificatePages": "DeleteHsmClientCertificatePages",
- "DeleteHSMClientCertificateRequest": "DeleteHsmClientCertificateRequest",
- "DeleteHSMConfiguration": "DeleteHsmConfiguration",
- "DeleteHSMConfigurationPages": "DeleteHsmConfigurationPages",
- "DeleteHSMConfigurationRequest": "DeleteHsmConfigurationRequest",
- "DescribeHSMClientCertificates": "DescribeHsmClientCertificates",
- "DescribeHSMClientCertificatesPages": "DescribeHsmClientCertificatesPages",
- "DescribeHSMClientCertificatesRequest": "DescribeHsmClientCertificatesRequest",
- "DescribeHSMConfigurations": "DescribeHsmConfigurations",
- "DescribeHSMConfigurationsPages": "DescribeHsmConfigurationsPages",
- "DescribeHSMConfigurationsRequest": "DescribeHsmConfigurationsRequest",
- },
- shapes: map[string]string{
- "CreateHSMClientCertificateInput": "CreateHsmClientCertificateInput",
- "CreateHSMClientCertificateOutput": "CreateHsmClientCertificateOutput",
- "CreateHSMConfigurationInput": "CreateHsmConfigurationInput",
- "CreateHSMConfigurationOutput": "CreateHsmConfigurationOutput",
- "DeleteHSMClientCertificateInput": "DeleteHsmClientCertificateInput",
- "DeleteHSMClientCertificateOutput": "DeleteHsmClientCertificateOutput",
- "DeleteHSMConfigurationInput": "DeleteHsmConfigurationInput",
- "DeleteHSMConfigurationOutput": "DeleteHsmConfigurationOutput",
- "DescribeHSMClientCertificatesInput": "DescribeHsmClientCertificatesInput",
- "DescribeHSMClientCertificatesOutput": "DescribeHsmClientCertificatesOutput",
- "DescribeHSMConfigurationsInput": "DescribeHsmConfigurationsInput",
- "DescribeHSMConfigurationsOutput": "DescribeHsmConfigurationsOutput",
- "ElasticIPStatus": "ElasticIpStatus",
- "HSMClientCertificate": "HsmClientCertificate",
- "HSMConfiguration": "HsmConfiguration",
- "HSMStatus": "HsmStatus",
- "VPCSecurityGroupMembership": "VpcSecurityGroupMembership",
- },
- fields: map[string]string{
- "AccountID": "AccountId",
- "CustSubscriptionID": "CustSubscriptionId",
- "CustomerAWSID": "CustomerAwsId",
- "EC2SecurityGroupOwnerID": "EC2SecurityGroupOwnerId",
- "ElasticIP": "ElasticIp",
- "ElasticIPStatus": "ElasticIpStatus",
- "EventID": "EventId",
- "HSMClientCertificate": "HsmClientCertificate",
- "HSMClientCertificateIdentifier": "HsmClientCertificateIdentifier",
- "HSMClientCertificatePublicKey": "HsmClientCertificatePublicKey",
- "HSMClientCertificates": "HsmClientCertificates",
- "HSMConfiguration": "HsmConfiguration",
- "HSMConfigurationIdentifier": "HsmConfigurationIdentifier",
- "HSMConfigurations": "HsmConfigurations",
- "HSMIPAddress": "HsmIpAddress",
- "HSMPartitionName": "HsmPartitionName",
- "HSMPartitionPassword": "HsmPartitionPassword",
- "HSMServerPublicCertificate": "HsmServerPublicCertificate",
- "HSMStatus": "HsmStatus",
- "KMSKeyID": "KmsKeyId",
- "ReservedNodeID": "ReservedNodeId",
- "ReservedNodeOfferingID": "ReservedNodeOfferingId",
- "SNSTopicARN": "SnsTopicArn",
- "SourceIDs": "SourceIds",
- "SourceIDsList": "SourceIdsList",
- "SubnetIDs": "SubnetIds",
- "VPCID": "VpcId",
- "VPCSecurityGroupID": "VpcSecurityGroupId",
- "VPCSecurityGroupIDs": "VpcSecurityGroupIds",
- "VPCSecurityGroups": "VpcSecurityGroups",
- },
- },
- "github.com/aws/aws-sdk-go/service/redshift/redshiftiface": {
- operations: map[string]string{
- "CreateHSMClientCertificate": "CreateHsmClientCertificate",
- "CreateHSMClientCertificatePages": "CreateHsmClientCertificatePages",
- "CreateHSMClientCertificateRequest": "CreateHsmClientCertificateRequest",
- "CreateHSMConfiguration": "CreateHsmConfiguration",
- "CreateHSMConfigurationPages": "CreateHsmConfigurationPages",
- "CreateHSMConfigurationRequest": "CreateHsmConfigurationRequest",
- "DeleteHSMClientCertificate": "DeleteHsmClientCertificate",
- "DeleteHSMClientCertificatePages": "DeleteHsmClientCertificatePages",
- "DeleteHSMClientCertificateRequest": "DeleteHsmClientCertificateRequest",
- "DeleteHSMConfiguration": "DeleteHsmConfiguration",
- "DeleteHSMConfigurationPages": "DeleteHsmConfigurationPages",
- "DeleteHSMConfigurationRequest": "DeleteHsmConfigurationRequest",
- "DescribeHSMClientCertificates": "DescribeHsmClientCertificates",
- "DescribeHSMClientCertificatesPages": "DescribeHsmClientCertificatesPages",
- "DescribeHSMClientCertificatesRequest": "DescribeHsmClientCertificatesRequest",
- "DescribeHSMConfigurations": "DescribeHsmConfigurations",
- "DescribeHSMConfigurationsPages": "DescribeHsmConfigurationsPages",
- "DescribeHSMConfigurationsRequest": "DescribeHsmConfigurationsRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/route53": {
- operations: map[string]string{
- "GetCheckerIPRanges": "GetCheckerIpRanges",
- "GetCheckerIPRangesPages": "GetCheckerIpRangesPages",
- "GetCheckerIPRangesRequest": "GetCheckerIpRangesRequest",
- },
- shapes: map[string]string{
- "GetCheckerIPRangesInput": "GetCheckerIpRangesInput",
- "GetCheckerIPRangesOutput": "GetCheckerIpRangesOutput",
- },
- fields: map[string]string{
- "CheckerIPRanges": "CheckerIpRanges",
- "DelegationSetID": "DelegationSetId",
- "HealthCheckID": "HealthCheckId",
- "HostedZoneID": "HostedZoneId",
- "ID": "Id",
- "NextHostedZoneID": "NextHostedZoneId",
- "ResourceID": "ResourceId",
- "ResourceIDs": "ResourceIds",
- "VPCID": "VPCId",
- },
- },
- "github.com/aws/aws-sdk-go/service/route53/route53iface": {
- operations: map[string]string{
- "GetCheckerIPRanges": "GetCheckerIpRanges",
- "GetCheckerIPRangesPages": "GetCheckerIpRangesPages",
- "GetCheckerIPRangesRequest": "GetCheckerIpRangesRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/route53domains": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "DNSSec": "DnsSec",
- "GlueIPs": "GlueIps",
- "IDNLangCode": "IdnLangCode",
- "OperationID": "OperationId",
- "RegistrarURL": "RegistrarUrl",
- "RegistryDomainID": "RegistryDomainId",
- },
- },
- "github.com/aws/aws-sdk-go/service/route53domains/route53domainsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/s3": {
- operations: map[string]string{
- "DeleteBucketCORS": "DeleteBucketCors",
- "DeleteBucketCORSPages": "DeleteBucketCorsPages",
- "DeleteBucketCORSRequest": "DeleteBucketCorsRequest",
- "GetBucketACL": "GetBucketAcl",
- "GetBucketACLPages": "GetBucketAclPages",
- "GetBucketACLRequest": "GetBucketAclRequest",
- "GetBucketCORS": "GetBucketCors",
- "GetBucketCORSPages": "GetBucketCorsPages",
- "GetBucketCORSRequest": "GetBucketCorsRequest",
- "GetObjectACL": "GetObjectAcl",
- "GetObjectACLPages": "GetObjectAclPages",
- "GetObjectACLRequest": "GetObjectAclRequest",
- "PutBucketACL": "PutBucketAcl",
- "PutBucketACLPages": "PutBucketAclPages",
- "PutBucketACLRequest": "PutBucketAclRequest",
- "PutBucketCORS": "PutBucketCors",
- "PutBucketCORSPages": "PutBucketCorsPages",
- "PutBucketCORSRequest": "PutBucketCorsRequest",
- "PutObjectACL": "PutObjectAcl",
- "PutObjectACLPages": "PutObjectAclPages",
- "PutObjectACLRequest": "PutObjectAclRequest",
- },
- shapes: map[string]string{
- "DeleteBucketCORSInput": "DeleteBucketCorsInput",
- "DeleteBucketCORSOutput": "DeleteBucketCorsOutput",
- "GetBucketACLInput": "GetBucketAclInput",
- "GetBucketACLOutput": "GetBucketAclOutput",
- "GetBucketCORSInput": "GetBucketCorsInput",
- "GetBucketCORSOutput": "GetBucketCorsOutput",
- "GetObjectACLInput": "GetObjectAclInput",
- "GetObjectACLOutput": "GetObjectAclOutput",
- "PutBucketACLInput": "PutBucketAclInput",
- "PutBucketACLOutput": "PutBucketAclOutput",
- "PutBucketCORSInput": "PutBucketCorsInput",
- "PutBucketCORSOutput": "PutBucketCorsOutput",
- "PutObjectACLInput": "PutObjectAclInput",
- "PutObjectACLOutput": "PutObjectAclOutput",
- },
- fields: map[string]string{
- "CopySourceVersionID": "CopySourceVersionId",
- "DeleteMarkerVersionID": "DeleteMarkerVersionId",
- "HTTPErrorCodeReturnedEquals": "HttpErrorCodeReturnedEquals",
- "HTTPRedirectCode": "HttpRedirectCode",
- "ID": "Id",
- "LambdaFunctionARN": "LambdaFunctionArn",
- "NextUploadIDMarker": "NextUploadIdMarker",
- "NextVersionIDMarker": "NextVersionIdMarker",
- "QueueARN": "QueueArn",
- "SSEKMSKeyID": "SSEKMSKeyId",
- "TopicARN": "TopicArn",
- "UploadID": "UploadId",
- "UploadIDMarker": "UploadIdMarker",
- "VersionID": "VersionId",
- "VersionIDMarker": "VersionIdMarker",
- },
- },
- "github.com/aws/aws-sdk-go/service/s3/s3manager": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "UploadID": "UploadId",
- },
- },
- "github.com/aws/aws-sdk-go/service/s3/s3iface": {
- operations: map[string]string{
- "DeleteBucketCORS": "DeleteBucketCors",
- "DeleteBucketCORSPages": "DeleteBucketCorsPages",
- "DeleteBucketCORSRequest": "DeleteBucketCorsRequest",
- "GetBucketACL": "GetBucketAcl",
- "GetBucketACLPages": "GetBucketAclPages",
- "GetBucketACLRequest": "GetBucketAclRequest",
- "GetBucketCORS": "GetBucketCors",
- "GetBucketCORSPages": "GetBucketCorsPages",
- "GetBucketCORSRequest": "GetBucketCorsRequest",
- "GetObjectACL": "GetObjectAcl",
- "GetObjectACLPages": "GetObjectAclPages",
- "GetObjectACLRequest": "GetObjectAclRequest",
- "PutBucketACL": "PutBucketAcl",
- "PutBucketACLPages": "PutBucketAclPages",
- "PutBucketACLRequest": "PutBucketAclRequest",
- "PutBucketCORS": "PutBucketCors",
- "PutBucketCORSPages": "PutBucketCorsPages",
- "PutBucketCORSRequest": "PutBucketCorsRequest",
- "PutObjectACL": "PutObjectAcl",
- "PutObjectACLPages": "PutObjectAclPages",
- "PutObjectACLRequest": "PutObjectAclRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/ses": {
- operations: map[string]string{
- "GetIdentityDKIMAttributes": "GetIdentityDkimAttributes",
- "GetIdentityDKIMAttributesPages": "GetIdentityDkimAttributesPages",
- "GetIdentityDKIMAttributesRequest": "GetIdentityDkimAttributesRequest",
- "SetIdentityDKIMEnabled": "SetIdentityDkimEnabled",
- "SetIdentityDKIMEnabledPages": "SetIdentityDkimEnabledPages",
- "SetIdentityDKIMEnabledRequest": "SetIdentityDkimEnabledRequest",
- "VerifyDomainDKIM": "VerifyDomainDkim",
- "VerifyDomainDKIMPages": "VerifyDomainDkimPages",
- "VerifyDomainDKIMRequest": "VerifyDomainDkimRequest",
- },
- shapes: map[string]string{
- "GetIdentityDKIMAttributesInput": "GetIdentityDkimAttributesInput",
- "GetIdentityDKIMAttributesOutput": "GetIdentityDkimAttributesOutput",
- "IdentityDKIMAttributes": "IdentityDkimAttributes",
- "SetIdentityDKIMEnabledInput": "SetIdentityDkimEnabledInput",
- "SetIdentityDKIMEnabledOutput": "SetIdentityDkimEnabledOutput",
- "VerifyDomainDKIMInput": "VerifyDomainDkimInput",
- "VerifyDomainDKIMOutput": "VerifyDomainDkimOutput",
- },
- fields: map[string]string{
- "BCCAddresses": "BccAddresses",
- "CCAddresses": "CcAddresses",
- "DKIMAttributes": "DkimAttributes",
- "DKIMEnabled": "DkimEnabled",
- "DKIMTokens": "DkimTokens",
- "DKIMVerificationStatus": "DkimVerificationStatus",
- "FromARN": "FromArn",
- "HTML": "Html",
- "MessageID": "MessageId",
- "ReturnPathARN": "ReturnPathArn",
- "SNSTopic": "SnsTopic",
- "SourceARN": "SourceArn",
- },
- },
- "github.com/aws/aws-sdk-go/service/ses/sesiface": {
- operations: map[string]string{
- "GetIdentityDKIMAttributes": "GetIdentityDkimAttributes",
- "GetIdentityDKIMAttributesPages": "GetIdentityDkimAttributesPages",
- "GetIdentityDKIMAttributesRequest": "GetIdentityDkimAttributesRequest",
- "SetIdentityDKIMEnabled": "SetIdentityDkimEnabled",
- "SetIdentityDKIMEnabledPages": "SetIdentityDkimEnabledPages",
- "SetIdentityDKIMEnabledRequest": "SetIdentityDkimEnabledRequest",
- "VerifyDomainDKIM": "VerifyDomainDkim",
- "VerifyDomainDKIMPages": "VerifyDomainDkimPages",
- "VerifyDomainDKIMRequest": "VerifyDomainDkimRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/sns": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "AWSAccountID": "AWSAccountId",
- "EndpointARN": "EndpointArn",
- "MessageID": "MessageId",
- "PlatformApplicationARN": "PlatformApplicationArn",
- "SubscriptionARN": "SubscriptionArn",
- "TargetARN": "TargetArn",
- "TopicARN": "TopicArn",
- },
- },
- "github.com/aws/aws-sdk-go/service/sns/snsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/sqs": {
- operations: map[string]string{
- "GetQueueURL": "GetQueueUrl",
- "GetQueueURLPages": "GetQueueUrlPages",
- "GetQueueURLRequest": "GetQueueUrlRequest",
- },
- shapes: map[string]string{
- "GetQueueURLInput": "GetQueueUrlInput",
- "GetQueueURLOutput": "GetQueueUrlOutput",
- },
- fields: map[string]string{
- "AWSAccountIDs": "AWSAccountIds",
- "ID": "Id",
- "MessageID": "MessageId",
- "QueueOwnerAWSAccountID": "QueueOwnerAWSAccountId",
- "QueueURL": "QueueUrl",
- "QueueURLs": "QueueUrls",
- },
- },
- "github.com/aws/aws-sdk-go/service/sqs/sqsiface": {
- operations: map[string]string{
- "GetQueueURL": "GetQueueUrl",
- "GetQueueURLPages": "GetQueueUrlPages",
- "GetQueueURLRequest": "GetQueueUrlRequest",
- },
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/ssm": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "InstanceID": "InstanceId",
- "SHA1": "Sha1",
- },
- },
- "github.com/aws/aws-sdk-go/service/ssm/ssmiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/storagegateway": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "DiskID": "DiskId",
- "DiskIDs": "DiskIds",
- "GatewayID": "GatewayId",
- "IPV4Address": "Ipv4Address",
- "IPV6Address": "Ipv6Address",
- "MACAddress": "MacAddress",
- "NetworkInterfaceID": "NetworkInterfaceId",
- "SnapshotID": "SnapshotId",
- "SourceSnapshotID": "SourceSnapshotId",
- "VolumeDiskID": "VolumeDiskId",
- "VolumeID": "VolumeId",
- },
- },
- "github.com/aws/aws-sdk-go/service/storagegateway/storagegatewayiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/sts": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ARN": "Arn",
- "AccessKeyID": "AccessKeyId",
- "AssumedRoleID": "AssumedRoleId",
- "ExternalID": "ExternalId",
- "FederatedUserID": "FederatedUserId",
- "PrincipalARN": "PrincipalArn",
- "ProviderID": "ProviderId",
- "RoleARN": "RoleArn",
- },
- },
- "github.com/aws/aws-sdk-go/service/sts/stsiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/support": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "AttachmentID": "AttachmentId",
- "AttachmentSetID": "AttachmentSetId",
- "CCEmailAddresses": "CcEmailAddresses",
- "CaseID": "CaseId",
- "CaseIDList": "CaseIdList",
- "CheckID": "CheckId",
- "CheckIDs": "CheckIds",
- "DisplayID": "DisplayId",
- "ID": "Id",
- "ResourceID": "ResourceId",
- },
- },
- "github.com/aws/aws-sdk-go/service/support/supportiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/swf": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "ActivityID": "ActivityId",
- "ContinuedExecutionRunID": "ContinuedExecutionRunId",
- "DecisionTaskCompletedEventID": "DecisionTaskCompletedEventId",
- "EventID": "EventId",
- "ExternalInitiatedEventID": "ExternalInitiatedEventId",
- "ID": "Id",
- "InitiatedEventID": "InitiatedEventId",
- "LatestCancelRequestedEventID": "LatestCancelRequestedEventId",
- "NewExecutionRunID": "NewExecutionRunId",
- "ParentInitiatedEventID": "ParentInitiatedEventId",
- "PreviousStartedEventID": "PreviousStartedEventId",
- "RunID": "RunId",
- "ScheduledEventID": "ScheduledEventId",
- "StartedEventID": "StartedEventId",
- "TimerID": "TimerId",
- "WorkflowID": "WorkflowId",
- },
- },
- "github.com/aws/aws-sdk-go/service/swf/swfiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
- "github.com/aws/aws-sdk-go/service/workspaces": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{
- "BundleID": "BundleId",
- "BundleIDs": "BundleIds",
- "CustomSecurityGroupID": "CustomSecurityGroupId",
- "DNSIPAddresses": "DnsIpAddresses",
- "DefaultOU": "DefaultOu",
- "DirectoryID": "DirectoryId",
- "DirectoryIDs": "DirectoryIds",
- "IAMRoleID": "IamRoleId",
- "IPAddress": "IpAddress",
- "SubnetID": "SubnetId",
- "SubnetIDs": "SubnetIds",
- "WorkspaceID": "WorkspaceId",
- "WorkspaceIDs": "WorkspaceIds",
- "WorkspaceSecurityGroupID": "WorkspaceSecurityGroupId",
- },
- },
- "github.com/aws/aws-sdk-go/service/workspaces/workspacesiface": {
- operations: map[string]string{},
- shapes: map[string]string{},
- fields: map[string]string{},
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/renamer.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/renamer.go
deleted file mode 100644
index ab516b8..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/renamer.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// +build go1.5,deprecated
-
-package main
-
-//go:generate go run -tags deprecated gen/gen.go
-
-import (
- "os"
- "os/exec"
- "path/filepath"
- "strings"
-
- "github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/rename"
-)
-
-var safeTag = "4e554f77f00d527b452c68a46f2e68595284121b"
-
-func main() {
- gopath := os.Getenv("GOPATH")
- if gopath == "" {
- panic("GOPATH not set!")
- }
- gopath = strings.Split(gopath, ":")[0]
-
- // change directory to SDK
- err := os.Chdir(filepath.Join(gopath, "src", "github.com", "aws", "aws-sdk-go"))
- if err != nil {
- panic("Cannot find SDK repository")
- }
-
- // store orig HEAD
- head, err := exec.Command("git", "rev-parse", "--abbrev-ref", "HEAD").Output()
- if err != nil {
- panic("Cannot find SDK repository")
- }
- origHEAD := strings.Trim(string(head), " \r\n")
-
- // checkout to safe tag and run conversion
- exec.Command("git", "checkout", safeTag).Run()
- defer func() {
- exec.Command("git", "checkout", origHEAD).Run()
- }()
-
- rename.ParsePathsFromArgs()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/LICENSE b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/LICENSE
deleted file mode 100644
index 6a66aea..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/PATENTS b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/PATENTS
deleted file mode 100644
index 7330990..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
deleted file mode 100644
index 340c9e6..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
+++ /dev/null
@@ -1,624 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package astutil
-
-// This file defines utilities for working with source positions.
-
-import (
- "fmt"
- "go/ast"
- "go/token"
- "sort"
-)
-
-// PathEnclosingInterval returns the node that encloses the source
-// interval [start, end), and all its ancestors up to the AST root.
-//
-// The definition of "enclosing" used by this function considers
-// additional whitespace abutting a node to be enclosed by it.
-// In this example:
-//
-// z := x + y // add them
-// <-A->
-// <----B----->
-//
-// the ast.BinaryExpr(+) node is considered to enclose interval B
-// even though its [Pos()..End()) is actually only interval A.
-// This behaviour makes user interfaces more tolerant of imperfect
-// input.
-//
-// This function treats tokens as nodes, though they are not included
-// in the result. e.g. PathEnclosingInterval("+") returns the
-// enclosing ast.BinaryExpr("x + y").
-//
-// If start==end, the 1-char interval following start is used instead.
-//
-// The 'exact' result is true if the interval contains only path[0]
-// and perhaps some adjacent whitespace. It is false if the interval
-// overlaps multiple children of path[0], or if it contains only
-// interior whitespace of path[0].
-// In this example:
-//
-// z := x + y // add them
-// <--C--> <---E-->
-// ^
-// D
-//
-// intervals C, D and E are inexact. C is contained by the
-// z-assignment statement, because it spans three of its children (:=,
-// x, +). So too is the 1-char interval D, because it contains only
-// interior whitespace of the assignment. E is considered interior
-// whitespace of the BlockStmt containing the assignment.
-//
-// Precondition: [start, end) both lie within the same file as root.
-// TODO(adonovan): return (nil, false) in this case and remove precond.
-// Requires FileSet; see loader.tokenFileContainsPos.
-//
-// Postcondition: path is never nil; it always contains at least 'root'.
-//
-func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Node, exact bool) {
- // fmt.Printf("EnclosingInterval %d %d\n", start, end) // debugging
-
- // Precondition: node.[Pos..End) and adjoining whitespace contain [start, end).
- var visit func(node ast.Node) bool
- visit = func(node ast.Node) bool {
- path = append(path, node)
-
- nodePos := node.Pos()
- nodeEnd := node.End()
-
- // fmt.Printf("visit(%T, %d, %d)\n", node, nodePos, nodeEnd) // debugging
-
- // Intersect [start, end) with interval of node.
- if start < nodePos {
- start = nodePos
- }
- if end > nodeEnd {
- end = nodeEnd
- }
-
- // Find sole child that contains [start, end).
- children := childrenOf(node)
- l := len(children)
- for i, child := range children {
- // [childPos, childEnd) is unaugmented interval of child.
- childPos := child.Pos()
- childEnd := child.End()
-
- // [augPos, augEnd) is whitespace-augmented interval of child.
- augPos := childPos
- augEnd := childEnd
- if i > 0 {
- augPos = children[i-1].End() // start of preceding whitespace
- }
- if i < l-1 {
- nextChildPos := children[i+1].Pos()
- // Does [start, end) lie between child and next child?
- if start >= augEnd && end <= nextChildPos {
- return false // inexact match
- }
- augEnd = nextChildPos // end of following whitespace
- }
-
- // fmt.Printf("\tchild %d: [%d..%d)\tcontains interval [%d..%d)?\n",
- // i, augPos, augEnd, start, end) // debugging
-
- // Does augmented child strictly contain [start, end)?
- if augPos <= start && end <= augEnd {
- _, isToken := child.(tokenNode)
- return isToken || visit(child)
- }
-
- // Does [start, end) overlap multiple children?
- // i.e. left-augmented child contains start
- // but LR-augmented child does not contain end.
- if start < childEnd && end > augEnd {
- break
- }
- }
-
- // No single child contained [start, end),
- // so node is the result. Is it exact?
-
- // (It's tempting to put this condition before the
- // child loop, but it gives the wrong result in the
- // case where a node (e.g. ExprStmt) and its sole
- // child have equal intervals.)
- if start == nodePos && end == nodeEnd {
- return true // exact match
- }
-
- return false // inexact: overlaps multiple children
- }
-
- if start > end {
- start, end = end, start
- }
-
- if start < root.End() && end > root.Pos() {
- if start == end {
- end = start + 1 // empty interval => interval of size 1
- }
- exact = visit(root)
-
- // Reverse the path:
- for i, l := 0, len(path); i < l/2; i++ {
- path[i], path[l-1-i] = path[l-1-i], path[i]
- }
- } else {
- // Selection lies within whitespace preceding the
- // first (or following the last) declaration in the file.
- // The result nonetheless always includes the ast.File.
- path = append(path, root)
- }
-
- return
-}
-
-// tokenNode is a dummy implementation of ast.Node for a single token.
-// They are used transiently by PathEnclosingInterval but never escape
-// this package.
-//
-type tokenNode struct {
- pos token.Pos
- end token.Pos
-}
-
-func (n tokenNode) Pos() token.Pos {
- return n.pos
-}
-
-func (n tokenNode) End() token.Pos {
- return n.end
-}
-
-func tok(pos token.Pos, len int) ast.Node {
- return tokenNode{pos, pos + token.Pos(len)}
-}
-
-// childrenOf returns the direct non-nil children of ast.Node n.
-// It may include fake ast.Node implementations for bare tokens.
-// it is not safe to call (e.g.) ast.Walk on such nodes.
-//
-func childrenOf(n ast.Node) []ast.Node {
- var children []ast.Node
-
- // First add nodes for all true subtrees.
- ast.Inspect(n, func(node ast.Node) bool {
- if node == n { // push n
- return true // recur
- }
- if node != nil { // push child
- children = append(children, node)
- }
- return false // no recursion
- })
-
- // Then add fake Nodes for bare tokens.
- switch n := n.(type) {
- case *ast.ArrayType:
- children = append(children,
- tok(n.Lbrack, len("[")),
- tok(n.Elt.End(), len("]")))
-
- case *ast.AssignStmt:
- children = append(children,
- tok(n.TokPos, len(n.Tok.String())))
-
- case *ast.BasicLit:
- children = append(children,
- tok(n.ValuePos, len(n.Value)))
-
- case *ast.BinaryExpr:
- children = append(children, tok(n.OpPos, len(n.Op.String())))
-
- case *ast.BlockStmt:
- children = append(children,
- tok(n.Lbrace, len("{")),
- tok(n.Rbrace, len("}")))
-
- case *ast.BranchStmt:
- children = append(children,
- tok(n.TokPos, len(n.Tok.String())))
-
- case *ast.CallExpr:
- children = append(children,
- tok(n.Lparen, len("(")),
- tok(n.Rparen, len(")")))
- if n.Ellipsis != 0 {
- children = append(children, tok(n.Ellipsis, len("...")))
- }
-
- case *ast.CaseClause:
- if n.List == nil {
- children = append(children,
- tok(n.Case, len("default")))
- } else {
- children = append(children,
- tok(n.Case, len("case")))
- }
- children = append(children, tok(n.Colon, len(":")))
-
- case *ast.ChanType:
- switch n.Dir {
- case ast.RECV:
- children = append(children, tok(n.Begin, len("<-chan")))
- case ast.SEND:
- children = append(children, tok(n.Begin, len("chan<-")))
- case ast.RECV | ast.SEND:
- children = append(children, tok(n.Begin, len("chan")))
- }
-
- case *ast.CommClause:
- if n.Comm == nil {
- children = append(children,
- tok(n.Case, len("default")))
- } else {
- children = append(children,
- tok(n.Case, len("case")))
- }
- children = append(children, tok(n.Colon, len(":")))
-
- case *ast.Comment:
- // nop
-
- case *ast.CommentGroup:
- // nop
-
- case *ast.CompositeLit:
- children = append(children,
- tok(n.Lbrace, len("{")),
- tok(n.Rbrace, len("{")))
-
- case *ast.DeclStmt:
- // nop
-
- case *ast.DeferStmt:
- children = append(children,
- tok(n.Defer, len("defer")))
-
- case *ast.Ellipsis:
- children = append(children,
- tok(n.Ellipsis, len("...")))
-
- case *ast.EmptyStmt:
- // nop
-
- case *ast.ExprStmt:
- // nop
-
- case *ast.Field:
- // TODO(adonovan): Field.{Doc,Comment,Tag}?
-
- case *ast.FieldList:
- children = append(children,
- tok(n.Opening, len("(")),
- tok(n.Closing, len(")")))
-
- case *ast.File:
- // TODO test: Doc
- children = append(children,
- tok(n.Package, len("package")))
-
- case *ast.ForStmt:
- children = append(children,
- tok(n.For, len("for")))
-
- case *ast.FuncDecl:
- // TODO(adonovan): FuncDecl.Comment?
-
- // Uniquely, FuncDecl breaks the invariant that
- // preorder traversal yields tokens in lexical order:
- // in fact, FuncDecl.Recv precedes FuncDecl.Type.Func.
- //
- // As a workaround, we inline the case for FuncType
- // here and order things correctly.
- //
- children = nil // discard ast.Walk(FuncDecl) info subtrees
- children = append(children, tok(n.Type.Func, len("func")))
- if n.Recv != nil {
- children = append(children, n.Recv)
- }
- children = append(children, n.Name)
- if n.Type.Params != nil {
- children = append(children, n.Type.Params)
- }
- if n.Type.Results != nil {
- children = append(children, n.Type.Results)
- }
- if n.Body != nil {
- children = append(children, n.Body)
- }
-
- case *ast.FuncLit:
- // nop
-
- case *ast.FuncType:
- if n.Func != 0 {
- children = append(children,
- tok(n.Func, len("func")))
- }
-
- case *ast.GenDecl:
- children = append(children,
- tok(n.TokPos, len(n.Tok.String())))
- if n.Lparen != 0 {
- children = append(children,
- tok(n.Lparen, len("(")),
- tok(n.Rparen, len(")")))
- }
-
- case *ast.GoStmt:
- children = append(children,
- tok(n.Go, len("go")))
-
- case *ast.Ident:
- children = append(children,
- tok(n.NamePos, len(n.Name)))
-
- case *ast.IfStmt:
- children = append(children,
- tok(n.If, len("if")))
-
- case *ast.ImportSpec:
- // TODO(adonovan): ImportSpec.{Doc,EndPos}?
-
- case *ast.IncDecStmt:
- children = append(children,
- tok(n.TokPos, len(n.Tok.String())))
-
- case *ast.IndexExpr:
- children = append(children,
- tok(n.Lbrack, len("{")),
- tok(n.Rbrack, len("}")))
-
- case *ast.InterfaceType:
- children = append(children,
- tok(n.Interface, len("interface")))
-
- case *ast.KeyValueExpr:
- children = append(children,
- tok(n.Colon, len(":")))
-
- case *ast.LabeledStmt:
- children = append(children,
- tok(n.Colon, len(":")))
-
- case *ast.MapType:
- children = append(children,
- tok(n.Map, len("map")))
-
- case *ast.ParenExpr:
- children = append(children,
- tok(n.Lparen, len("(")),
- tok(n.Rparen, len(")")))
-
- case *ast.RangeStmt:
- children = append(children,
- tok(n.For, len("for")),
- tok(n.TokPos, len(n.Tok.String())))
-
- case *ast.ReturnStmt:
- children = append(children,
- tok(n.Return, len("return")))
-
- case *ast.SelectStmt:
- children = append(children,
- tok(n.Select, len("select")))
-
- case *ast.SelectorExpr:
- // nop
-
- case *ast.SendStmt:
- children = append(children,
- tok(n.Arrow, len("<-")))
-
- case *ast.SliceExpr:
- children = append(children,
- tok(n.Lbrack, len("[")),
- tok(n.Rbrack, len("]")))
-
- case *ast.StarExpr:
- children = append(children, tok(n.Star, len("*")))
-
- case *ast.StructType:
- children = append(children, tok(n.Struct, len("struct")))
-
- case *ast.SwitchStmt:
- children = append(children, tok(n.Switch, len("switch")))
-
- case *ast.TypeAssertExpr:
- children = append(children,
- tok(n.Lparen-1, len(".")),
- tok(n.Lparen, len("(")),
- tok(n.Rparen, len(")")))
-
- case *ast.TypeSpec:
- // TODO(adonovan): TypeSpec.{Doc,Comment}?
-
- case *ast.TypeSwitchStmt:
- children = append(children, tok(n.Switch, len("switch")))
-
- case *ast.UnaryExpr:
- children = append(children, tok(n.OpPos, len(n.Op.String())))
-
- case *ast.ValueSpec:
- // TODO(adonovan): ValueSpec.{Doc,Comment}?
-
- case *ast.BadDecl, *ast.BadExpr, *ast.BadStmt:
- // nop
- }
-
- // TODO(adonovan): opt: merge the logic of ast.Inspect() into
- // the switch above so we can make interleaved callbacks for
- // both Nodes and Tokens in the right order and avoid the need
- // to sort.
- sort.Sort(byPos(children))
-
- return children
-}
-
-type byPos []ast.Node
-
-func (sl byPos) Len() int {
- return len(sl)
-}
-func (sl byPos) Less(i, j int) bool {
- return sl[i].Pos() < sl[j].Pos()
-}
-func (sl byPos) Swap(i, j int) {
- sl[i], sl[j] = sl[j], sl[i]
-}
-
-// NodeDescription returns a description of the concrete type of n suitable
-// for a user interface.
-//
-// TODO(adonovan): in some cases (e.g. Field, FieldList, Ident,
-// StarExpr) we could be much more specific given the path to the AST
-// root. Perhaps we should do that.
-//
-func NodeDescription(n ast.Node) string {
- switch n := n.(type) {
- case *ast.ArrayType:
- return "array type"
- case *ast.AssignStmt:
- return "assignment"
- case *ast.BadDecl:
- return "bad declaration"
- case *ast.BadExpr:
- return "bad expression"
- case *ast.BadStmt:
- return "bad statement"
- case *ast.BasicLit:
- return "basic literal"
- case *ast.BinaryExpr:
- return fmt.Sprintf("binary %s operation", n.Op)
- case *ast.BlockStmt:
- return "block"
- case *ast.BranchStmt:
- switch n.Tok {
- case token.BREAK:
- return "break statement"
- case token.CONTINUE:
- return "continue statement"
- case token.GOTO:
- return "goto statement"
- case token.FALLTHROUGH:
- return "fall-through statement"
- }
- case *ast.CallExpr:
- return "function call (or conversion)"
- case *ast.CaseClause:
- return "case clause"
- case *ast.ChanType:
- return "channel type"
- case *ast.CommClause:
- return "communication clause"
- case *ast.Comment:
- return "comment"
- case *ast.CommentGroup:
- return "comment group"
- case *ast.CompositeLit:
- return "composite literal"
- case *ast.DeclStmt:
- return NodeDescription(n.Decl) + " statement"
- case *ast.DeferStmt:
- return "defer statement"
- case *ast.Ellipsis:
- return "ellipsis"
- case *ast.EmptyStmt:
- return "empty statement"
- case *ast.ExprStmt:
- return "expression statement"
- case *ast.Field:
- // Can be any of these:
- // struct {x, y int} -- struct field(s)
- // struct {T} -- anon struct field
- // interface {I} -- interface embedding
- // interface {f()} -- interface method
- // func (A) func(B) C -- receiver, param(s), result(s)
- return "field/method/parameter"
- case *ast.FieldList:
- return "field/method/parameter list"
- case *ast.File:
- return "source file"
- case *ast.ForStmt:
- return "for loop"
- case *ast.FuncDecl:
- return "function declaration"
- case *ast.FuncLit:
- return "function literal"
- case *ast.FuncType:
- return "function type"
- case *ast.GenDecl:
- switch n.Tok {
- case token.IMPORT:
- return "import declaration"
- case token.CONST:
- return "constant declaration"
- case token.TYPE:
- return "type declaration"
- case token.VAR:
- return "variable declaration"
- }
- case *ast.GoStmt:
- return "go statement"
- case *ast.Ident:
- return "identifier"
- case *ast.IfStmt:
- return "if statement"
- case *ast.ImportSpec:
- return "import specification"
- case *ast.IncDecStmt:
- if n.Tok == token.INC {
- return "increment statement"
- }
- return "decrement statement"
- case *ast.IndexExpr:
- return "index expression"
- case *ast.InterfaceType:
- return "interface type"
- case *ast.KeyValueExpr:
- return "key/value association"
- case *ast.LabeledStmt:
- return "statement label"
- case *ast.MapType:
- return "map type"
- case *ast.Package:
- return "package"
- case *ast.ParenExpr:
- return "parenthesized " + NodeDescription(n.X)
- case *ast.RangeStmt:
- return "range loop"
- case *ast.ReturnStmt:
- return "return statement"
- case *ast.SelectStmt:
- return "select statement"
- case *ast.SelectorExpr:
- return "selector"
- case *ast.SendStmt:
- return "channel send"
- case *ast.SliceExpr:
- return "slice expression"
- case *ast.StarExpr:
- return "*-operation" // load/store expr or pointer type
- case *ast.StructType:
- return "struct type"
- case *ast.SwitchStmt:
- return "switch statement"
- case *ast.TypeAssertExpr:
- return "type assertion"
- case *ast.TypeSpec:
- return "type specification"
- case *ast.TypeSwitchStmt:
- return "type switch"
- case *ast.UnaryExpr:
- return fmt.Sprintf("unary %s operation", n.Op)
- case *ast.ValueSpec:
- return "value specification"
-
- }
- panic(fmt.Sprintf("unexpected node type: %T", n))
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/imports.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/imports.go
deleted file mode 100644
index a47bcfa..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/imports.go
+++ /dev/null
@@ -1,400 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package astutil contains common utilities for working with the Go AST.
-package astutil
-
-import (
- "fmt"
- "go/ast"
- "go/token"
- "strconv"
- "strings"
-)
-
-// AddImport adds the import path to the file f, if absent.
-func AddImport(fset *token.FileSet, f *ast.File, ipath string) (added bool) {
- return AddNamedImport(fset, f, "", ipath)
-}
-
-// AddNamedImport adds the import path to the file f, if absent.
-// If name is not empty, it is used to rename the import.
-//
-// For example, calling
-// AddNamedImport(fset, f, "pathpkg", "path")
-// adds
-// import pathpkg "path"
-func AddNamedImport(fset *token.FileSet, f *ast.File, name, ipath string) (added bool) {
- if imports(f, ipath) {
- return false
- }
-
- newImport := &ast.ImportSpec{
- Path: &ast.BasicLit{
- Kind: token.STRING,
- Value: strconv.Quote(ipath),
- },
- }
- if name != "" {
- newImport.Name = &ast.Ident{Name: name}
- }
-
- // Find an import decl to add to.
- // The goal is to find an existing import
- // whose import path has the longest shared
- // prefix with ipath.
- var (
- bestMatch = -1 // length of longest shared prefix
- lastImport = -1 // index in f.Decls of the file's final import decl
- impDecl *ast.GenDecl // import decl containing the best match
- impIndex = -1 // spec index in impDecl containing the best match
- )
- for i, decl := range f.Decls {
- gen, ok := decl.(*ast.GenDecl)
- if ok && gen.Tok == token.IMPORT {
- lastImport = i
- // Do not add to import "C", to avoid disrupting the
- // association with its doc comment, breaking cgo.
- if declImports(gen, "C") {
- continue
- }
-
- // Match an empty import decl if that's all that is available.
- if len(gen.Specs) == 0 && bestMatch == -1 {
- impDecl = gen
- }
-
- // Compute longest shared prefix with imports in this group.
- for j, spec := range gen.Specs {
- impspec := spec.(*ast.ImportSpec)
- n := matchLen(importPath(impspec), ipath)
- if n > bestMatch {
- bestMatch = n
- impDecl = gen
- impIndex = j
- }
- }
- }
- }
-
- // If no import decl found, add one after the last import.
- if impDecl == nil {
- impDecl = &ast.GenDecl{
- Tok: token.IMPORT,
- }
- if lastImport >= 0 {
- impDecl.TokPos = f.Decls[lastImport].End()
- } else {
- // There are no existing imports.
- // Our new import goes after the package declaration and after
- // the comment, if any, that starts on the same line as the
- // package declaration.
- impDecl.TokPos = f.Package
-
- file := fset.File(f.Package)
- pkgLine := file.Line(f.Package)
- for _, c := range f.Comments {
- if file.Line(c.Pos()) > pkgLine {
- break
- }
- impDecl.TokPos = c.End()
- }
- }
- f.Decls = append(f.Decls, nil)
- copy(f.Decls[lastImport+2:], f.Decls[lastImport+1:])
- f.Decls[lastImport+1] = impDecl
- }
-
- // Insert new import at insertAt.
- insertAt := 0
- if impIndex >= 0 {
- // insert after the found import
- insertAt = impIndex + 1
- }
- impDecl.Specs = append(impDecl.Specs, nil)
- copy(impDecl.Specs[insertAt+1:], impDecl.Specs[insertAt:])
- impDecl.Specs[insertAt] = newImport
- pos := impDecl.Pos()
- if insertAt > 0 {
- // If there is a comment after an existing import, preserve the comment
- // position by adding the new import after the comment.
- if spec, ok := impDecl.Specs[insertAt-1].(*ast.ImportSpec); ok && spec.Comment != nil {
- pos = spec.Comment.End()
- } else {
- // Assign same position as the previous import,
- // so that the sorter sees it as being in the same block.
- pos = impDecl.Specs[insertAt-1].Pos()
- }
- }
- if newImport.Name != nil {
- newImport.Name.NamePos = pos
- }
- newImport.Path.ValuePos = pos
- newImport.EndPos = pos
-
- // Clean up parens. impDecl contains at least one spec.
- if len(impDecl.Specs) == 1 {
- // Remove unneeded parens.
- impDecl.Lparen = token.NoPos
- } else if !impDecl.Lparen.IsValid() {
- // impDecl needs parens added.
- impDecl.Lparen = impDecl.Specs[0].Pos()
- }
-
- f.Imports = append(f.Imports, newImport)
-
- if len(f.Decls) <= 1 {
- return true
- }
-
- // Merge all the import declarations into the first one.
- var first *ast.GenDecl
- for i, decl := range f.Decls {
- gen, ok := decl.(*ast.GenDecl)
- if !ok || gen.Tok != token.IMPORT || declImports(gen, "C") {
- continue
- }
- if first == nil {
- first = gen
- continue // Don't touch the first one.
- }
- // Move the imports of the other import declaration to the first one.
- for _, spec := range gen.Specs {
- spec.(*ast.ImportSpec).Path.ValuePos = first.Pos()
- first.Specs = append(first.Specs, spec)
- }
- f.Decls = append(f.Decls[:i], f.Decls[i+1:]...)
- }
-
- return true
-}
-
-// DeleteImport deletes the import path from the file f, if present.
-func DeleteImport(fset *token.FileSet, f *ast.File, path string) (deleted bool) {
- return DeleteNamedImport(fset, f, "", path)
-}
-
-// DeleteNamedImport deletes the import with the given name and path from the file f, if present.
-func DeleteNamedImport(fset *token.FileSet, f *ast.File, name, path string) (deleted bool) {
- var delspecs []*ast.ImportSpec
-
- // Find the import nodes that import path, if any.
- for i := 0; i < len(f.Decls); i++ {
- decl := f.Decls[i]
- gen, ok := decl.(*ast.GenDecl)
- if !ok || gen.Tok != token.IMPORT {
- continue
- }
- for j := 0; j < len(gen.Specs); j++ {
- spec := gen.Specs[j]
- impspec := spec.(*ast.ImportSpec)
- if impspec.Name == nil && name != "" {
- continue
- }
- if impspec.Name != nil && impspec.Name.Name != name {
- continue
- }
- if importPath(impspec) != path {
- continue
- }
-
- // We found an import spec that imports path.
- // Delete it.
- delspecs = append(delspecs, impspec)
- deleted = true
- copy(gen.Specs[j:], gen.Specs[j+1:])
- gen.Specs = gen.Specs[:len(gen.Specs)-1]
-
- // If this was the last import spec in this decl,
- // delete the decl, too.
- if len(gen.Specs) == 0 {
- copy(f.Decls[i:], f.Decls[i+1:])
- f.Decls = f.Decls[:len(f.Decls)-1]
- i--
- break
- } else if len(gen.Specs) == 1 {
- gen.Lparen = token.NoPos // drop parens
- }
- if j > 0 {
- lastImpspec := gen.Specs[j-1].(*ast.ImportSpec)
- lastLine := fset.Position(lastImpspec.Path.ValuePos).Line
- line := fset.Position(impspec.Path.ValuePos).Line
-
- // We deleted an entry but now there may be
- // a blank line-sized hole where the import was.
- if line-lastLine > 1 {
- // There was a blank line immediately preceding the deleted import,
- // so there's no need to close the hole.
- // Do nothing.
- } else {
- // There was no blank line. Close the hole.
- fset.File(gen.Rparen).MergeLine(line)
- }
- }
- j--
- }
- }
-
- // Delete them from f.Imports.
- for i := 0; i < len(f.Imports); i++ {
- imp := f.Imports[i]
- for j, del := range delspecs {
- if imp == del {
- copy(f.Imports[i:], f.Imports[i+1:])
- f.Imports = f.Imports[:len(f.Imports)-1]
- copy(delspecs[j:], delspecs[j+1:])
- delspecs = delspecs[:len(delspecs)-1]
- i--
- break
- }
- }
- }
-
- if len(delspecs) > 0 {
- panic(fmt.Sprintf("deleted specs from Decls but not Imports: %v", delspecs))
- }
-
- return
-}
-
-// RewriteImport rewrites any import of path oldPath to path newPath.
-func RewriteImport(fset *token.FileSet, f *ast.File, oldPath, newPath string) (rewrote bool) {
- for _, imp := range f.Imports {
- if importPath(imp) == oldPath {
- rewrote = true
- // record old End, because the default is to compute
- // it using the length of imp.Path.Value.
- imp.EndPos = imp.End()
- imp.Path.Value = strconv.Quote(newPath)
- }
- }
- return
-}
-
-// UsesImport reports whether a given import is used.
-func UsesImport(f *ast.File, path string) (used bool) {
- spec := importSpec(f, path)
- if spec == nil {
- return
- }
-
- name := spec.Name.String()
- switch name {
- case "":
- // If the package name is not explicitly specified,
- // make an educated guess. This is not guaranteed to be correct.
- lastSlash := strings.LastIndex(path, "/")
- if lastSlash == -1 {
- name = path
- } else {
- name = path[lastSlash+1:]
- }
- case "_", ".":
- // Not sure if this import is used - err on the side of caution.
- return true
- }
-
- ast.Walk(visitFn(func(n ast.Node) {
- sel, ok := n.(*ast.SelectorExpr)
- if ok && isTopName(sel.X, name) {
- used = true
- }
- }), f)
-
- return
-}
-
-type visitFn func(node ast.Node)
-
-func (fn visitFn) Visit(node ast.Node) ast.Visitor {
- fn(node)
- return fn
-}
-
-// imports returns true if f imports path.
-func imports(f *ast.File, path string) bool {
- return importSpec(f, path) != nil
-}
-
-// importSpec returns the import spec if f imports path,
-// or nil otherwise.
-func importSpec(f *ast.File, path string) *ast.ImportSpec {
- for _, s := range f.Imports {
- if importPath(s) == path {
- return s
- }
- }
- return nil
-}
-
-// importPath returns the unquoted import path of s,
-// or "" if the path is not properly quoted.
-func importPath(s *ast.ImportSpec) string {
- t, err := strconv.Unquote(s.Path.Value)
- if err == nil {
- return t
- }
- return ""
-}
-
-// declImports reports whether gen contains an import of path.
-func declImports(gen *ast.GenDecl, path string) bool {
- if gen.Tok != token.IMPORT {
- return false
- }
- for _, spec := range gen.Specs {
- impspec := spec.(*ast.ImportSpec)
- if importPath(impspec) == path {
- return true
- }
- }
- return false
-}
-
-// matchLen returns the length of the longest path segment prefix shared by x and y.
-func matchLen(x, y string) int {
- n := 0
- for i := 0; i < len(x) && i < len(y) && x[i] == y[i]; i++ {
- if x[i] == '/' {
- n++
- }
- }
- return n
-}
-
-// isTopName returns true if n is a top-level unresolved identifier with the given name.
-func isTopName(n ast.Expr, name string) bool {
- id, ok := n.(*ast.Ident)
- return ok && id.Name == name && id.Obj == nil
-}
-
-// Imports returns the file imports grouped by paragraph.
-func Imports(fset *token.FileSet, f *ast.File) [][]*ast.ImportSpec {
- var groups [][]*ast.ImportSpec
-
- for _, decl := range f.Decls {
- genDecl, ok := decl.(*ast.GenDecl)
- if !ok || genDecl.Tok != token.IMPORT {
- break
- }
-
- group := []*ast.ImportSpec{}
-
- var lastLine int
- for _, spec := range genDecl.Specs {
- importSpec := spec.(*ast.ImportSpec)
- pos := importSpec.Path.ValuePos
- line := fset.Position(pos).Line
- if lastLine > 0 && pos > 0 && line-lastLine > 1 {
- groups = append(groups, group)
- group = []*ast.ImportSpec{}
- }
- group = append(group, importSpec)
- lastLine = line
- }
- groups = append(groups, group)
- }
-
- return groups
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/util.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/util.go
deleted file mode 100644
index 7630629..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/ast/astutil/util.go
+++ /dev/null
@@ -1,14 +0,0 @@
-package astutil
-
-import "go/ast"
-
-// Unparen returns e with any enclosing parentheses stripped.
-func Unparen(e ast.Expr) ast.Expr {
- for {
- p, ok := e.(*ast.ParenExpr)
- if !ok {
- return e
- }
- e = p.X
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/allpackages.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/allpackages.go
deleted file mode 100644
index 3020809..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/allpackages.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package buildutil provides utilities related to the go/build
-// package in the standard library.
-//
-// All I/O is done via the build.Context file system interface, which must
-// be concurrency-safe.
-package buildutil
-
-import (
- "go/build"
- "os"
- "path/filepath"
- "sort"
- "strings"
- "sync"
-)
-
-// AllPackages returns the package path of each Go package in any source
-// directory of the specified build context (e.g. $GOROOT or an element
-// of $GOPATH). Errors are ignored. The results are sorted.
-// All package paths are canonical, and thus may contain "/vendor/".
-//
-// The result may include import paths for directories that contain no
-// *.go files, such as "archive" (in $GOROOT/src).
-//
-// All I/O is done via the build.Context file system interface,
-// which must be concurrency-safe.
-//
-func AllPackages(ctxt *build.Context) []string {
- var list []string
- ForEachPackage(ctxt, func(pkg string, _ error) {
- list = append(list, pkg)
- })
- sort.Strings(list)
- return list
-}
-
-// ForEachPackage calls the found function with the package path of
-// each Go package it finds in any source directory of the specified
-// build context (e.g. $GOROOT or an element of $GOPATH).
-// All package paths are canonical, and thus may contain "/vendor/".
-//
-// If the package directory exists but could not be read, the second
-// argument to the found function provides the error.
-//
-// All I/O is done via the build.Context file system interface,
-// which must be concurrency-safe.
-//
-func ForEachPackage(ctxt *build.Context, found func(importPath string, err error)) {
- ch := make(chan item)
-
- var wg sync.WaitGroup
- for _, root := range ctxt.SrcDirs() {
- root := root
- wg.Add(1)
- go func() {
- allPackages(ctxt, root, ch)
- wg.Done()
- }()
- }
- go func() {
- wg.Wait()
- close(ch)
- }()
-
- // All calls to found occur in the caller's goroutine.
- for i := range ch {
- found(i.importPath, i.err)
- }
-}
-
-type item struct {
- importPath string
- err error // (optional)
-}
-
-// We use a process-wide counting semaphore to limit
-// the number of parallel calls to ReadDir.
-var ioLimit = make(chan bool, 20)
-
-func allPackages(ctxt *build.Context, root string, ch chan<- item) {
- root = filepath.Clean(root) + string(os.PathSeparator)
-
- var wg sync.WaitGroup
-
- var walkDir func(dir string)
- walkDir = func(dir string) {
- // Avoid .foo, _foo, and testdata directory trees.
- base := filepath.Base(dir)
- if base == "" || base[0] == '.' || base[0] == '_' || base == "testdata" {
- return
- }
-
- pkg := filepath.ToSlash(strings.TrimPrefix(dir, root))
-
- // Prune search if we encounter any of these import paths.
- switch pkg {
- case "builtin":
- return
- }
-
- ioLimit <- true
- files, err := ReadDir(ctxt, dir)
- <-ioLimit
- if pkg != "" || err != nil {
- ch <- item{pkg, err}
- }
- for _, fi := range files {
- fi := fi
- if fi.IsDir() {
- wg.Add(1)
- go func() {
- walkDir(filepath.Join(dir, fi.Name()))
- wg.Done()
- }()
- }
- }
- }
-
- walkDir(root)
- wg.Wait()
-}
-
-// ExpandPatterns returns the set of packages matched by patterns,
-// which may have the following forms:
-//
-// golang.org/x/tools/cmd/guru # a single package
-// golang.org/x/tools/... # all packages beneath dir
-// ... # the entire workspace.
-//
-// Order is significant: a pattern preceded by '-' removes matching
-// packages from the set. For example, these patterns match all encoding
-// packages except encoding/xml:
-//
-// encoding/... -encoding/xml
-//
-func ExpandPatterns(ctxt *build.Context, patterns []string) map[string]bool {
- // TODO(adonovan): support other features of 'go list':
- // - "std"/"cmd"/"all" meta-packages
- // - "..." not at the end of a pattern
- // - relative patterns using "./" or "../" prefix
-
- pkgs := make(map[string]bool)
- doPkg := func(pkg string, neg bool) {
- if neg {
- delete(pkgs, pkg)
- } else {
- pkgs[pkg] = true
- }
- }
-
- // Scan entire workspace if wildcards are present.
- // TODO(adonovan): opt: scan only the necessary subtrees of the workspace.
- var all []string
- for _, arg := range patterns {
- if strings.HasSuffix(arg, "...") {
- all = AllPackages(ctxt)
- break
- }
- }
-
- for _, arg := range patterns {
- if arg == "" {
- continue
- }
-
- neg := arg[0] == '-'
- if neg {
- arg = arg[1:]
- }
-
- if arg == "..." {
- // ... matches all packages
- for _, pkg := range all {
- doPkg(pkg, neg)
- }
- } else if dir := strings.TrimSuffix(arg, "/..."); dir != arg {
- // dir/... matches all packages beneath dir
- for _, pkg := range all {
- if strings.HasPrefix(pkg, dir) &&
- (len(pkg) == len(dir) || pkg[len(dir)] == '/') {
- doPkg(pkg, neg)
- }
- }
- } else {
- // single package
- doPkg(arg, neg)
- }
- }
-
- return pkgs
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/fakecontext.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/fakecontext.go
deleted file mode 100644
index 24cbcbe..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/fakecontext.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package buildutil
-
-import (
- "fmt"
- "go/build"
- "io"
- "io/ioutil"
- "os"
- "path"
- "path/filepath"
- "sort"
- "strings"
- "time"
-)
-
-// FakeContext returns a build.Context for the fake file tree specified
-// by pkgs, which maps package import paths to a mapping from file base
-// names to contents.
-//
-// The fake Context has a GOROOT of "/go" and no GOPATH, and overrides
-// the necessary file access methods to read from memory instead of the
-// real file system.
-//
-// Unlike a real file tree, the fake one has only two levels---packages
-// and files---so ReadDir("/go/src/") returns all packages under
-// /go/src/ including, for instance, "math" and "math/big".
-// ReadDir("/go/src/math/big") would return all the files in the
-// "math/big" package.
-//
-func FakeContext(pkgs map[string]map[string]string) *build.Context {
- clean := func(filename string) string {
- f := path.Clean(filepath.ToSlash(filename))
- // Removing "/go/src" while respecting segment
- // boundaries has this unfortunate corner case:
- if f == "/go/src" {
- return ""
- }
- return strings.TrimPrefix(f, "/go/src/")
- }
-
- ctxt := build.Default // copy
- ctxt.GOROOT = "/go"
- ctxt.GOPATH = ""
- ctxt.IsDir = func(dir string) bool {
- dir = clean(dir)
- if dir == "" {
- return true // needed by (*build.Context).SrcDirs
- }
- return pkgs[dir] != nil
- }
- ctxt.ReadDir = func(dir string) ([]os.FileInfo, error) {
- dir = clean(dir)
- var fis []os.FileInfo
- if dir == "" {
- // enumerate packages
- for importPath := range pkgs {
- fis = append(fis, fakeDirInfo(importPath))
- }
- } else {
- // enumerate files of package
- for basename := range pkgs[dir] {
- fis = append(fis, fakeFileInfo(basename))
- }
- }
- sort.Sort(byName(fis))
- return fis, nil
- }
- ctxt.OpenFile = func(filename string) (io.ReadCloser, error) {
- filename = clean(filename)
- dir, base := path.Split(filename)
- content, ok := pkgs[path.Clean(dir)][base]
- if !ok {
- return nil, fmt.Errorf("file not found: %s", filename)
- }
- return ioutil.NopCloser(strings.NewReader(content)), nil
- }
- ctxt.IsAbsPath = func(path string) bool {
- path = filepath.ToSlash(path)
- // Don't rely on the default (filepath.Path) since on
- // Windows, it reports virtual paths as non-absolute.
- return strings.HasPrefix(path, "/")
- }
- return &ctxt
-}
-
-type byName []os.FileInfo
-
-func (s byName) Len() int { return len(s) }
-func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() }
-
-type fakeFileInfo string
-
-func (fi fakeFileInfo) Name() string { return string(fi) }
-func (fakeFileInfo) Sys() interface{} { return nil }
-func (fakeFileInfo) ModTime() time.Time { return time.Time{} }
-func (fakeFileInfo) IsDir() bool { return false }
-func (fakeFileInfo) Size() int64 { return 0 }
-func (fakeFileInfo) Mode() os.FileMode { return 0644 }
-
-type fakeDirInfo string
-
-func (fd fakeDirInfo) Name() string { return string(fd) }
-func (fakeDirInfo) Sys() interface{} { return nil }
-func (fakeDirInfo) ModTime() time.Time { return time.Time{} }
-func (fakeDirInfo) IsDir() bool { return true }
-func (fakeDirInfo) Size() int64 { return 0 }
-func (fakeDirInfo) Mode() os.FileMode { return 0755 }
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/tags.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/tags.go
deleted file mode 100644
index 486606f..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/tags.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package buildutil
-
-// This logic was copied from stringsFlag from $GOROOT/src/cmd/go/build.go.
-
-import "fmt"
-
-const TagsFlagDoc = "a list of `build tags` to consider satisfied during the build. " +
- "For more information about build tags, see the description of " +
- "build constraints in the documentation for the go/build package"
-
-// TagsFlag is an implementation of the flag.Value and flag.Getter interfaces that parses
-// a flag value in the same manner as go build's -tags flag and
-// populates a []string slice.
-//
-// See $GOROOT/src/go/build/doc.go for description of build tags.
-// See $GOROOT/src/cmd/go/doc.go for description of 'go build -tags' flag.
-//
-// Example:
-// flag.Var((*buildutil.TagsFlag)(&build.Default.BuildTags), "tags", buildutil.TagsFlagDoc)
-type TagsFlag []string
-
-func (v *TagsFlag) Set(s string) error {
- var err error
- *v, err = splitQuotedFields(s)
- if *v == nil {
- *v = []string{}
- }
- return err
-}
-
-func (v *TagsFlag) Get() interface{} { return *v }
-
-func splitQuotedFields(s string) ([]string, error) {
- // Split fields allowing '' or "" around elements.
- // Quotes further inside the string do not count.
- var f []string
- for len(s) > 0 {
- for len(s) > 0 && isSpaceByte(s[0]) {
- s = s[1:]
- }
- if len(s) == 0 {
- break
- }
- // Accepted quoted string. No unescaping inside.
- if s[0] == '"' || s[0] == '\'' {
- quote := s[0]
- s = s[1:]
- i := 0
- for i < len(s) && s[i] != quote {
- i++
- }
- if i >= len(s) {
- return nil, fmt.Errorf("unterminated %c string", quote)
- }
- f = append(f, s[:i])
- s = s[i+1:]
- continue
- }
- i := 0
- for i < len(s) && !isSpaceByte(s[i]) {
- i++
- }
- f = append(f, s[:i])
- s = s[i:]
- }
- return f, nil
-}
-
-func (v *TagsFlag) String() string {
- return ""
-}
-
-func isSpaceByte(c byte) bool {
- return c == ' ' || c == '\t' || c == '\n' || c == '\r'
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/util.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/util.go
deleted file mode 100644
index 0e093fc..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/buildutil/util.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package buildutil
-
-import (
- "fmt"
- "go/ast"
- "go/build"
- "go/parser"
- "go/token"
- "io"
- "io/ioutil"
- "os"
- "path"
- "path/filepath"
- "runtime"
- "strings"
-)
-
-// ParseFile behaves like parser.ParseFile,
-// but uses the build context's file system interface, if any.
-//
-// If file is not absolute (as defined by IsAbsPath), the (dir, file)
-// components are joined using JoinPath; dir must be absolute.
-//
-// The displayPath function, if provided, is used to transform the
-// filename that will be attached to the ASTs.
-//
-// TODO(adonovan): call this from go/loader.parseFiles when the tree thaws.
-//
-func ParseFile(fset *token.FileSet, ctxt *build.Context, displayPath func(string) string, dir string, file string, mode parser.Mode) (*ast.File, error) {
- if !IsAbsPath(ctxt, file) {
- file = JoinPath(ctxt, dir, file)
- }
- rd, err := OpenFile(ctxt, file)
- if err != nil {
- return nil, err
- }
- defer rd.Close() // ignore error
- if displayPath != nil {
- file = displayPath(file)
- }
- return parser.ParseFile(fset, file, rd, mode)
-}
-
-// ContainingPackage returns the package containing filename.
-//
-// If filename is not absolute, it is interpreted relative to working directory dir.
-// All I/O is via the build context's file system interface, if any.
-//
-// The '...Files []string' fields of the resulting build.Package are not
-// populated (build.FindOnly mode).
-//
-// TODO(adonovan): call this from oracle when the tree thaws.
-//
-func ContainingPackage(ctxt *build.Context, dir, filename string) (*build.Package, error) {
- if !IsAbsPath(ctxt, filename) {
- filename = JoinPath(ctxt, dir, filename)
- }
-
- // We must not assume the file tree uses
- // "/" always,
- // `\` always,
- // or os.PathSeparator (which varies by platform),
- // but to make any progress, we are forced to assume that
- // paths will not use `\` unless the PathSeparator
- // is also `\`, thus we can rely on filepath.ToSlash for some sanity.
-
- dirSlash := path.Dir(filepath.ToSlash(filename)) + "/"
-
- // We assume that no source root (GOPATH[i] or GOROOT) contains any other.
- for _, srcdir := range ctxt.SrcDirs() {
- srcdirSlash := filepath.ToSlash(srcdir) + "/"
- if dirHasPrefix(dirSlash, srcdirSlash) {
- importPath := dirSlash[len(srcdirSlash) : len(dirSlash)-len("/")]
- return ctxt.Import(importPath, dir, build.FindOnly)
- }
- }
-
- return nil, fmt.Errorf("can't find package containing %s", filename)
-}
-
-// dirHasPrefix tests whether the directory dir begins with prefix.
-func dirHasPrefix(dir, prefix string) bool {
- if runtime.GOOS != "windows" {
- return strings.HasPrefix(dir, prefix)
- }
- return len(dir) >= len(prefix) && strings.EqualFold(dir[:len(prefix)], prefix)
-}
-
-// -- Effective methods of file system interface -------------------------
-
-// (go/build.Context defines these as methods, but does not export them.)
-
-// TODO(adonovan): HasSubdir?
-
-// FileExists returns true if the specified file exists,
-// using the build context's file system interface.
-func FileExists(ctxt *build.Context, path string) bool {
- if ctxt.OpenFile != nil {
- r, err := ctxt.OpenFile(path)
- if err != nil {
- return false
- }
- r.Close() // ignore error
- return true
- }
- _, err := os.Stat(path)
- return err == nil
-}
-
-// OpenFile behaves like os.Open,
-// but uses the build context's file system interface, if any.
-func OpenFile(ctxt *build.Context, path string) (io.ReadCloser, error) {
- if ctxt.OpenFile != nil {
- return ctxt.OpenFile(path)
- }
- return os.Open(path)
-}
-
-// IsAbsPath behaves like filepath.IsAbs,
-// but uses the build context's file system interface, if any.
-func IsAbsPath(ctxt *build.Context, path string) bool {
- if ctxt.IsAbsPath != nil {
- return ctxt.IsAbsPath(path)
- }
- return filepath.IsAbs(path)
-}
-
-// JoinPath behaves like filepath.Join,
-// but uses the build context's file system interface, if any.
-func JoinPath(ctxt *build.Context, path ...string) string {
- if ctxt.JoinPath != nil {
- return ctxt.JoinPath(path...)
- }
- return filepath.Join(path...)
-}
-
-// IsDir behaves like os.Stat plus IsDir,
-// but uses the build context's file system interface, if any.
-func IsDir(ctxt *build.Context, path string) bool {
- if ctxt.IsDir != nil {
- return ctxt.IsDir(path)
- }
- fi, err := os.Stat(path)
- return err == nil && fi.IsDir()
-}
-
-// ReadDir behaves like ioutil.ReadDir,
-// but uses the build context's file system interface, if any.
-func ReadDir(ctxt *build.Context, path string) ([]os.FileInfo, error) {
- if ctxt.ReadDir != nil {
- return ctxt.ReadDir(path)
- }
- return ioutil.ReadDir(path)
-}
-
-// SplitPathList behaves like filepath.SplitList,
-// but uses the build context's file system interface, if any.
-func SplitPathList(ctxt *build.Context, s string) []string {
- if ctxt.SplitPathList != nil {
- return ctxt.SplitPathList(s)
- }
- return filepath.SplitList(s)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo.go
deleted file mode 100644
index 245b914..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo.go
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.5
-
-package loader
-
-// This file handles cgo preprocessing of files containing `import "C"`.
-//
-// DESIGN
-//
-// The approach taken is to run the cgo processor on the package's
-// CgoFiles and parse the output, faking the filenames of the
-// resulting ASTs so that the synthetic file containing the C types is
-// called "C" (e.g. "~/go/src/net/C") and the preprocessed files
-// have their original names (e.g. "~/go/src/net/cgo_unix.go"),
-// not the names of the actual temporary files.
-//
-// The advantage of this approach is its fidelity to 'go build'. The
-// downside is that the token.Position.Offset for each AST node is
-// incorrect, being an offset within the temporary file. Line numbers
-// should still be correct because of the //line comments.
-//
-// The logic of this file is mostly plundered from the 'go build'
-// tool, which also invokes the cgo preprocessor.
-//
-//
-// REJECTED ALTERNATIVE
-//
-// An alternative approach that we explored is to extend go/types'
-// Importer mechanism to provide the identity of the importing package
-// so that each time `import "C"` appears it resolves to a different
-// synthetic package containing just the objects needed in that case.
-// The loader would invoke cgo but parse only the cgo_types.go file
-// defining the package-level objects, discarding the other files
-// resulting from preprocessing.
-//
-// The benefit of this approach would have been that source-level
-// syntax information would correspond exactly to the original cgo
-// file, with no preprocessing involved, making source tools like
-// godoc, oracle, and eg happy. However, the approach was rejected
-// due to the additional complexity it would impose on go/types. (It
-// made for a beautiful demo, though.)
-//
-// cgo files, despite their *.go extension, are not legal Go source
-// files per the specification since they may refer to unexported
-// members of package "C" such as C.int. Also, a function such as
-// C.getpwent has in effect two types, one matching its C type and one
-// which additionally returns (errno C.int). The cgo preprocessor
-// uses name mangling to distinguish these two functions in the
-// processed code, but go/types would need to duplicate this logic in
-// its handling of function calls, analogous to the treatment of map
-// lookups in which y=m[k] and y,ok=m[k] are both legal.
-
-import (
- "fmt"
- "go/ast"
- "go/build"
- "go/parser"
- "go/token"
- "io/ioutil"
- "log"
- "os"
- "os/exec"
- "path/filepath"
- "regexp"
- "strings"
-)
-
-// processCgoFiles invokes the cgo preprocessor on bp.CgoFiles, parses
-// the output and returns the resulting ASTs.
-//
-func processCgoFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(path string) string, mode parser.Mode) ([]*ast.File, error) {
- tmpdir, err := ioutil.TempDir("", strings.Replace(bp.ImportPath, "/", "_", -1)+"_C")
- if err != nil {
- return nil, err
- }
- defer os.RemoveAll(tmpdir)
-
- pkgdir := bp.Dir
- if DisplayPath != nil {
- pkgdir = DisplayPath(pkgdir)
- }
-
- cgoFiles, cgoDisplayFiles, err := runCgo(bp, pkgdir, tmpdir)
- if err != nil {
- return nil, err
- }
- var files []*ast.File
- for i := range cgoFiles {
- rd, err := os.Open(cgoFiles[i])
- if err != nil {
- return nil, err
- }
- display := filepath.Join(bp.Dir, cgoDisplayFiles[i])
- f, err := parser.ParseFile(fset, display, rd, mode)
- rd.Close()
- if err != nil {
- return nil, err
- }
- files = append(files, f)
- }
- return files, nil
-}
-
-var cgoRe = regexp.MustCompile(`[/\\:]`)
-
-// runCgo invokes the cgo preprocessor on bp.CgoFiles and returns two
-// lists of files: the resulting processed files (in temporary
-// directory tmpdir) and the corresponding names of the unprocessed files.
-//
-// runCgo is adapted from (*builder).cgo in
-// $GOROOT/src/cmd/go/build.go, but these features are unsupported:
-// Objective C, CGOPKGPATH, CGO_FLAGS.
-//
-func runCgo(bp *build.Package, pkgdir, tmpdir string) (files, displayFiles []string, err error) {
- cgoCPPFLAGS, _, _, _ := cflags(bp, true)
- _, cgoexeCFLAGS, _, _ := cflags(bp, false)
-
- if len(bp.CgoPkgConfig) > 0 {
- pcCFLAGS, err := pkgConfigFlags(bp)
- if err != nil {
- return nil, nil, err
- }
- cgoCPPFLAGS = append(cgoCPPFLAGS, pcCFLAGS...)
- }
-
- // Allows including _cgo_export.h from .[ch] files in the package.
- cgoCPPFLAGS = append(cgoCPPFLAGS, "-I", tmpdir)
-
- // _cgo_gotypes.go (displayed "C") contains the type definitions.
- files = append(files, filepath.Join(tmpdir, "_cgo_gotypes.go"))
- displayFiles = append(displayFiles, "C")
- for _, fn := range bp.CgoFiles {
- // "foo.cgo1.go" (displayed "foo.go") is the processed Go source.
- f := cgoRe.ReplaceAllString(fn[:len(fn)-len("go")], "_")
- files = append(files, filepath.Join(tmpdir, f+"cgo1.go"))
- displayFiles = append(displayFiles, fn)
- }
-
- var cgoflags []string
- if bp.Goroot && bp.ImportPath == "runtime/cgo" {
- cgoflags = append(cgoflags, "-import_runtime_cgo=false")
- }
- if bp.Goroot && bp.ImportPath == "runtime/race" || bp.ImportPath == "runtime/cgo" {
- cgoflags = append(cgoflags, "-import_syscall=false")
- }
-
- args := stringList(
- "go", "tool", "cgo", "-objdir", tmpdir, cgoflags, "--",
- cgoCPPFLAGS, cgoexeCFLAGS, bp.CgoFiles,
- )
- if false {
- log.Printf("Running cgo for package %q: %s (dir=%s)", bp.ImportPath, args, pkgdir)
- }
- cmd := exec.Command(args[0], args[1:]...)
- cmd.Dir = pkgdir
- cmd.Stdout = os.Stderr
- cmd.Stderr = os.Stderr
- if err := cmd.Run(); err != nil {
- return nil, nil, fmt.Errorf("cgo failed: %s: %s", args, err)
- }
-
- return files, displayFiles, nil
-}
-
-// -- unmodified from 'go build' ---------------------------------------
-
-// Return the flags to use when invoking the C or C++ compilers, or cgo.
-func cflags(p *build.Package, def bool) (cppflags, cflags, cxxflags, ldflags []string) {
- var defaults string
- if def {
- defaults = "-g -O2"
- }
-
- cppflags = stringList(envList("CGO_CPPFLAGS", ""), p.CgoCPPFLAGS)
- cflags = stringList(envList("CGO_CFLAGS", defaults), p.CgoCFLAGS)
- cxxflags = stringList(envList("CGO_CXXFLAGS", defaults), p.CgoCXXFLAGS)
- ldflags = stringList(envList("CGO_LDFLAGS", defaults), p.CgoLDFLAGS)
- return
-}
-
-// envList returns the value of the given environment variable broken
-// into fields, using the default value when the variable is empty.
-func envList(key, def string) []string {
- v := os.Getenv(key)
- if v == "" {
- v = def
- }
- return strings.Fields(v)
-}
-
-// stringList's arguments should be a sequence of string or []string values.
-// stringList flattens them into a single []string.
-func stringList(args ...interface{}) []string {
- var x []string
- for _, arg := range args {
- switch arg := arg.(type) {
- case []string:
- x = append(x, arg...)
- case string:
- x = append(x, arg)
- default:
- panic("stringList: invalid argument")
- }
- }
- return x
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go
deleted file mode 100644
index de57422..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/cgo_pkgconfig.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package loader
-
-import (
- "errors"
- "fmt"
- "go/build"
- "os/exec"
- "strings"
-)
-
-// pkgConfig runs pkg-config with the specified arguments and returns the flags it prints.
-func pkgConfig(mode string, pkgs []string) (flags []string, err error) {
- cmd := exec.Command("pkg-config", append([]string{mode}, pkgs...)...)
- out, err := cmd.CombinedOutput()
- if err != nil {
- s := fmt.Sprintf("%s failed: %v", strings.Join(cmd.Args, " "), err)
- if len(out) > 0 {
- s = fmt.Sprintf("%s: %s", s, out)
- }
- return nil, errors.New(s)
- }
- if len(out) > 0 {
- flags = strings.Fields(string(out))
- }
- return
-}
-
-// pkgConfigFlags calls pkg-config if needed and returns the cflags
-// needed to build the package.
-func pkgConfigFlags(p *build.Package) (cflags []string, err error) {
- if len(p.CgoPkgConfig) == 0 {
- return nil, nil
- }
- return pkgConfig("--cflags", p.CgoPkgConfig)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/doc.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/doc.go
deleted file mode 100644
index 9b51c9e..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/doc.go
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package loader loads a complete Go program from source code, parsing
-// and type-checking the initial packages plus their transitive closure
-// of dependencies. The ASTs and the derived facts are retained for
-// later use.
-//
-// THIS INTERFACE IS EXPERIMENTAL AND IS LIKELY TO CHANGE.
-//
-// The package defines two primary types: Config, which specifies a
-// set of initial packages to load and various other options; and
-// Program, which is the result of successfully loading the packages
-// specified by a configuration.
-//
-// The configuration can be set directly, but *Config provides various
-// convenience methods to simplify the common cases, each of which can
-// be called any number of times. Finally, these are followed by a
-// call to Load() to actually load and type-check the program.
-//
-// var conf loader.Config
-//
-// // Use the command-line arguments to specify
-// // a set of initial packages to load from source.
-// // See FromArgsUsage for help.
-// rest, err := conf.FromArgs(os.Args[1:], wantTests)
-//
-// // Parse the specified files and create an ad hoc package with path "foo".
-// // All files must have the same 'package' declaration.
-// conf.CreateFromFilenames("foo", "foo.go", "bar.go")
-//
-// // Create an ad hoc package with path "foo" from
-// // the specified already-parsed files.
-// // All ASTs must have the same 'package' declaration.
-// conf.CreateFromFiles("foo", parsedFiles)
-//
-// // Add "runtime" to the set of packages to be loaded.
-// conf.Import("runtime")
-//
-// // Adds "fmt" and "fmt_test" to the set of packages
-// // to be loaded. "fmt" will include *_test.go files.
-// conf.ImportWithTests("fmt")
-//
-// // Finally, load all the packages specified by the configuration.
-// prog, err := conf.Load()
-//
-// See examples_test.go for examples of API usage.
-//
-//
-// CONCEPTS AND TERMINOLOGY
-//
-// The WORKSPACE is the set of packages accessible to the loader. The
-// workspace is defined by Config.Build, a *build.Context. The
-// default context treats subdirectories of $GOROOT and $GOPATH as
-// packages, but this behavior may be overridden.
-//
-// An AD HOC package is one specified as a set of source files on the
-// command line. In the simplest case, it may consist of a single file
-// such as $GOROOT/src/net/http/triv.go.
-//
-// EXTERNAL TEST packages are those comprised of a set of *_test.go
-// files all with the same 'package foo_test' declaration, all in the
-// same directory. (go/build.Package calls these files XTestFiles.)
-//
-// An IMPORTABLE package is one that can be referred to by some import
-// spec. Every importable package is uniquely identified by its
-// PACKAGE PATH or just PATH, a string such as "fmt", "encoding/json",
-// or "cmd/vendor/golang.org/x/arch/x86/x86asm". A package path
-// typically denotes a subdirectory of the workspace.
-//
-// An import declaration uses an IMPORT PATH to refer to a package.
-// Most import declarations use the package path as the import path.
-//
-// Due to VENDORING (https://golang.org/s/go15vendor), the
-// interpretation of an import path may depend on the directory in which
-// it appears. To resolve an import path to a package path, go/build
-// must search the enclosing directories for a subdirectory named
-// "vendor".
-//
-// ad hoc packages and external test packages are NON-IMPORTABLE. The
-// path of an ad hoc package is inferred from the package
-// declarations of its files and is therefore not a unique package key.
-// For example, Config.CreatePkgs may specify two initial ad hoc
-// packages, both with path "main".
-//
-// An AUGMENTED package is an importable package P plus all the
-// *_test.go files with same 'package foo' declaration as P.
-// (go/build.Package calls these files TestFiles.)
-//
-// The INITIAL packages are those specified in the configuration. A
-// DEPENDENCY is a package loaded to satisfy an import in an initial
-// package or another dependency.
-//
-package loader
-
-// IMPLEMENTATION NOTES
-//
-// 'go test', in-package test files, and import cycles
-// ---------------------------------------------------
-//
-// An external test package may depend upon members of the augmented
-// package that are not in the unaugmented package, such as functions
-// that expose internals. (See bufio/export_test.go for an example.)
-// So, the loader must ensure that for each external test package
-// it loads, it also augments the corresponding non-test package.
-//
-// The import graph over n unaugmented packages must be acyclic; the
-// import graph over n-1 unaugmented packages plus one augmented
-// package must also be acyclic. ('go test' relies on this.) But the
-// import graph over n augmented packages may contain cycles.
-//
-// First, all the (unaugmented) non-test packages and their
-// dependencies are imported in the usual way; the loader reports an
-// error if it detects an import cycle.
-//
-// Then, each package P for which testing is desired is augmented by
-// the list P' of its in-package test files, by calling
-// (*types.Checker).Files. This arrangement ensures that P' may
-// reference definitions within P, but P may not reference definitions
-// within P'. Furthermore, P' may import any other package, including
-// ones that depend upon P, without an import cycle error.
-//
-// Consider two packages A and B, both of which have lists of
-// in-package test files we'll call A' and B', and which have the
-// following import graph edges:
-// B imports A
-// B' imports A
-// A' imports B
-// This last edge would be expected to create an error were it not
-// for the special type-checking discipline above.
-// Cycles of size greater than two are possible. For example:
-// compress/bzip2/bzip2_test.go (package bzip2) imports "io/ioutil"
-// io/ioutil/tempfile_test.go (package ioutil) imports "regexp"
-// regexp/exec_test.go (package regexp) imports "compress/bzip2"
-//
-//
-// Concurrency
-// -----------
-//
-// Let us define the import dependency graph as follows. Each node is a
-// list of files passed to (Checker).Files at once. Many of these lists
-// are the production code of an importable Go package, so those nodes
-// are labelled by the package's path. The remaining nodes are
-// ad hoc packages and lists of in-package *_test.go files that augment
-// an importable package; those nodes have no label.
-//
-// The edges of the graph represent import statements appearing within a
-// file. An edge connects a node (a list of files) to the node it
-// imports, which is importable and thus always labelled.
-//
-// Loading is controlled by this dependency graph.
-//
-// To reduce I/O latency, we start loading a package's dependencies
-// asynchronously as soon as we've parsed its files and enumerated its
-// imports (scanImports). This performs a preorder traversal of the
-// import dependency graph.
-//
-// To exploit hardware parallelism, we type-check unrelated packages in
-// parallel, where "unrelated" means not ordered by the partial order of
-// the import dependency graph.
-//
-// We use a concurrency-safe non-blocking cache (importer.imported) to
-// record the results of type-checking, whether success or failure. An
-// entry is created in this cache by startLoad the first time the
-// package is imported. The first goroutine to request an entry becomes
-// responsible for completing the task and broadcasting completion to
-// subsequent requestors, which block until then.
-//
-// Type checking occurs in (parallel) postorder: we cannot type-check a
-// set of files until we have loaded and type-checked all of their
-// immediate dependencies (and thus all of their transitive
-// dependencies). If the input were guaranteed free of import cycles,
-// this would be trivial: we could simply wait for completion of the
-// dependencies and then invoke the typechecker.
-//
-// But as we saw in the 'go test' section above, some cycles in the
-// import graph over packages are actually legal, so long as the
-// cycle-forming edge originates in the in-package test files that
-// augment the package. This explains why the nodes of the import
-// dependency graph are not packages, but lists of files: the unlabelled
-// nodes avoid the cycles. Consider packages A and B where B imports A
-// and A's in-package tests AT import B. The naively constructed import
-// graph over packages would contain a cycle (A+AT) --> B --> (A+AT) but
-// the graph over lists of files is AT --> B --> A, where AT is an
-// unlabelled node.
-//
-// Awaiting completion of the dependencies in a cyclic graph would
-// deadlock, so we must materialize the import dependency graph (as
-// importer.graph) and check whether each import edge forms a cycle. If
-// x imports y, and the graph already contains a path from y to x, then
-// there is an import cycle, in which case the processing of x must not
-// wait for the completion of processing of y.
-//
-// When the type-checker makes a callback (doImport) to the loader for a
-// given import edge, there are two possible cases. In the normal case,
-// the dependency has already been completely type-checked; doImport
-// does a cache lookup and returns it. In the cyclic case, the entry in
-// the cache is still necessarily incomplete, indicating a cycle. We
-// perform the cycle check again to obtain the error message, and return
-// the error.
-//
-// The result of using concurrency is about a 2.5x speedup for stdlib_test.
-
-// TODO(adonovan): overhaul the package documentation.
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/go16.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/go16.go
deleted file mode 100644
index c0ed50f..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/go16.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.6
-
-package loader
-
-import "go/build"
-
-func init() {
- ignoreVendor = build.IgnoreVendor
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/loader.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/loader.go
deleted file mode 100644
index f0171fc..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/loader.go
+++ /dev/null
@@ -1,1059 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.5
-
-package loader
-
-// See doc.go for package documentation and implementation notes.
-
-import (
- "errors"
- "fmt"
- "go/ast"
- "go/build"
- "go/parser"
- "go/token"
- "go/types"
- "os"
- "sort"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/tools/go/ast/astutil"
-)
-
-var ignoreVendor build.ImportMode
-
-const trace = false // show timing info for type-checking
-
-// Config specifies the configuration for loading a whole program from
-// Go source code.
-// The zero value for Config is a ready-to-use default configuration.
-type Config struct {
- // Fset is the file set for the parser to use when loading the
- // program. If nil, it may be lazily initialized by any
- // method of Config.
- Fset *token.FileSet
-
- // ParserMode specifies the mode to be used by the parser when
- // loading source packages.
- ParserMode parser.Mode
-
- // TypeChecker contains options relating to the type checker.
- //
- // The supplied IgnoreFuncBodies is not used; the effective
- // value comes from the TypeCheckFuncBodies func below.
- // The supplied Import function is not used either.
- TypeChecker types.Config
-
- // TypeCheckFuncBodies is a predicate over package paths.
- // A package for which the predicate is false will
- // have its package-level declarations type checked, but not
- // its function bodies; this can be used to quickly load
- // dependencies from source. If nil, all func bodies are type
- // checked.
- TypeCheckFuncBodies func(path string) bool
-
- // If Build is non-nil, it is used to locate source packages.
- // Otherwise &build.Default is used.
- //
- // By default, cgo is invoked to preprocess Go files that
- // import the fake package "C". This behaviour can be
- // disabled by setting CGO_ENABLED=0 in the environment prior
- // to startup, or by setting Build.CgoEnabled=false.
- Build *build.Context
-
- // The current directory, used for resolving relative package
- // references such as "./go/loader". If empty, os.Getwd will be
- // used instead.
- Cwd string
-
- // If DisplayPath is non-nil, it is used to transform each
- // file name obtained from Build.Import(). This can be used
- // to prevent a virtualized build.Config's file names from
- // leaking into the user interface.
- DisplayPath func(path string) string
-
- // If AllowErrors is true, Load will return a Program even
- // if some of the its packages contained I/O, parser or type
- // errors; such errors are accessible via PackageInfo.Errors. If
- // false, Load will fail if any package had an error.
- AllowErrors bool
-
- // CreatePkgs specifies a list of non-importable initial
- // packages to create. The resulting packages will appear in
- // the corresponding elements of the Program.Created slice.
- CreatePkgs []PkgSpec
-
- // ImportPkgs specifies a set of initial packages to load.
- // The map keys are package paths.
- //
- // The map value indicates whether to load tests. If true, Load
- // will add and type-check two lists of files to the package:
- // non-test files followed by in-package *_test.go files. In
- // addition, it will append the external test package (if any)
- // to Program.Created.
- ImportPkgs map[string]bool
-
- // FindPackage is called during Load to create the build.Package
- // for a given import path from a given directory.
- // If FindPackage is nil, (*build.Context).Import is used.
- // A client may use this hook to adapt to a proprietary build
- // system that does not follow the "go build" layout
- // conventions, for example.
- //
- // It must be safe to call concurrently from multiple goroutines.
- FindPackage func(ctxt *build.Context, fromDir, importPath string, mode build.ImportMode) (*build.Package, error)
-
- // AfterTypeCheck is called immediately after a list of files
- // has been type-checked and appended to info.Files.
- //
- // This optional hook function is the earliest opportunity for
- // the client to observe the output of the type checker,
- // which may be useful to reduce analysis latency when loading
- // a large program.
- //
- // The function is permitted to modify info.Info, for instance
- // to clear data structures that are no longer needed, which can
- // dramatically reduce peak memory consumption.
- //
- // The function may be called twice for the same PackageInfo:
- // once for the files of the package and again for the
- // in-package test files.
- //
- // It must be safe to call concurrently from multiple goroutines.
- AfterTypeCheck func(info *PackageInfo, files []*ast.File)
-}
-
-// A PkgSpec specifies a non-importable package to be created by Load.
-// Files are processed first, but typically only one of Files and
-// Filenames is provided. The path needn't be globally unique.
-//
-type PkgSpec struct {
- Path string // package path ("" => use package declaration)
- Files []*ast.File // ASTs of already-parsed files
- Filenames []string // names of files to be parsed
-}
-
-// A Program is a Go program loaded from source as specified by a Config.
-type Program struct {
- Fset *token.FileSet // the file set for this program
-
- // Created[i] contains the initial package whose ASTs or
- // filenames were supplied by Config.CreatePkgs[i], followed by
- // the external test package, if any, of each package in
- // Config.ImportPkgs ordered by ImportPath.
- //
- // NOTE: these files must not import "C". Cgo preprocessing is
- // only performed on imported packages, not ad hoc packages.
- //
- // TODO(adonovan): we need to copy and adapt the logic of
- // goFilesPackage (from $GOROOT/src/cmd/go/build.go) and make
- // Config.Import and Config.Create methods return the same kind
- // of entity, essentially a build.Package.
- // Perhaps we can even reuse that type directly.
- Created []*PackageInfo
-
- // Imported contains the initially imported packages,
- // as specified by Config.ImportPkgs.
- Imported map[string]*PackageInfo
-
- // AllPackages contains the PackageInfo of every package
- // encountered by Load: all initial packages and all
- // dependencies, including incomplete ones.
- AllPackages map[*types.Package]*PackageInfo
-
- // importMap is the canonical mapping of package paths to
- // packages. It contains all Imported initial packages, but not
- // Created ones, and all imported dependencies.
- importMap map[string]*types.Package
-}
-
-// PackageInfo holds the ASTs and facts derived by the type-checker
-// for a single package.
-//
-// Not mutated once exposed via the API.
-//
-type PackageInfo struct {
- Pkg *types.Package
- Importable bool // true if 'import "Pkg.Path()"' would resolve to this
- TransitivelyErrorFree bool // true if Pkg and all its dependencies are free of errors
- Files []*ast.File // syntax trees for the package's files
- Errors []error // non-nil if the package had errors
- types.Info // type-checker deductions.
- dir string // package directory
-
- checker *types.Checker // transient type-checker state
- errorFunc func(error)
-}
-
-func (info *PackageInfo) String() string { return info.Pkg.Path() }
-
-func (info *PackageInfo) appendError(err error) {
- if info.errorFunc != nil {
- info.errorFunc(err)
- } else {
- fmt.Fprintln(os.Stderr, err)
- }
- info.Errors = append(info.Errors, err)
-}
-
-func (conf *Config) fset() *token.FileSet {
- if conf.Fset == nil {
- conf.Fset = token.NewFileSet()
- }
- return conf.Fset
-}
-
-// ParseFile is a convenience function (intended for testing) that invokes
-// the parser using the Config's FileSet, which is initialized if nil.
-//
-// src specifies the parser input as a string, []byte, or io.Reader, and
-// filename is its apparent name. If src is nil, the contents of
-// filename are read from the file system.
-//
-func (conf *Config) ParseFile(filename string, src interface{}) (*ast.File, error) {
- // TODO(adonovan): use conf.build() etc like parseFiles does.
- return parser.ParseFile(conf.fset(), filename, src, conf.ParserMode)
-}
-
-// FromArgsUsage is a partial usage message that applications calling
-// FromArgs may wish to include in their -help output.
-const FromArgsUsage = `
- is a list of arguments denoting a set of initial packages.
-It may take one of two forms:
-
-1. A list of *.go source files.
-
- All of the specified files are loaded, parsed and type-checked
- as a single package. All the files must belong to the same directory.
-
-2. A list of import paths, each denoting a package.
-
- The package's directory is found relative to the $GOROOT and
- $GOPATH using similar logic to 'go build', and the *.go files in
- that directory are loaded, parsed and type-checked as a single
- package.
-
- In addition, all *_test.go files in the directory are then loaded
- and parsed. Those files whose package declaration equals that of
- the non-*_test.go files are included in the primary package. Test
- files whose package declaration ends with "_test" are type-checked
- as another package, the 'external' test package, so that a single
- import path may denote two packages. (Whether this behaviour is
- enabled is tool-specific, and may depend on additional flags.)
-
-A '--' argument terminates the list of packages.
-`
-
-// FromArgs interprets args as a set of initial packages to load from
-// source and updates the configuration. It returns the list of
-// unconsumed arguments.
-//
-// It is intended for use in command-line interfaces that require a
-// set of initial packages to be specified; see FromArgsUsage message
-// for details.
-//
-// Only superficial errors are reported at this stage; errors dependent
-// on I/O are detected during Load.
-//
-func (conf *Config) FromArgs(args []string, xtest bool) ([]string, error) {
- var rest []string
- for i, arg := range args {
- if arg == "--" {
- rest = args[i+1:]
- args = args[:i]
- break // consume "--" and return the remaining args
- }
- }
-
- if len(args) > 0 && strings.HasSuffix(args[0], ".go") {
- // Assume args is a list of a *.go files
- // denoting a single ad hoc package.
- for _, arg := range args {
- if !strings.HasSuffix(arg, ".go") {
- return nil, fmt.Errorf("named files must be .go files: %s", arg)
- }
- }
- conf.CreateFromFilenames("", args...)
- } else {
- // Assume args are directories each denoting a
- // package and (perhaps) an external test, iff xtest.
- for _, arg := range args {
- if xtest {
- conf.ImportWithTests(arg)
- } else {
- conf.Import(arg)
- }
- }
- }
-
- return rest, nil
-}
-
-// CreateFromFilenames is a convenience function that adds
-// a conf.CreatePkgs entry to create a package of the specified *.go
-// files.
-//
-func (conf *Config) CreateFromFilenames(path string, filenames ...string) {
- conf.CreatePkgs = append(conf.CreatePkgs, PkgSpec{Path: path, Filenames: filenames})
-}
-
-// CreateFromFiles is a convenience function that adds a conf.CreatePkgs
-// entry to create package of the specified path and parsed files.
-//
-func (conf *Config) CreateFromFiles(path string, files ...*ast.File) {
- conf.CreatePkgs = append(conf.CreatePkgs, PkgSpec{Path: path, Files: files})
-}
-
-// ImportWithTests is a convenience function that adds path to
-// ImportPkgs, the set of initial source packages located relative to
-// $GOPATH. The package will be augmented by any *_test.go files in
-// its directory that contain a "package x" (not "package x_test")
-// declaration.
-//
-// In addition, if any *_test.go files contain a "package x_test"
-// declaration, an additional package comprising just those files will
-// be added to CreatePkgs.
-//
-func (conf *Config) ImportWithTests(path string) { conf.addImport(path, true) }
-
-// Import is a convenience function that adds path to ImportPkgs, the
-// set of initial packages that will be imported from source.
-//
-func (conf *Config) Import(path string) { conf.addImport(path, false) }
-
-func (conf *Config) addImport(path string, tests bool) {
- if path == "C" {
- return // ignore; not a real package
- }
- if conf.ImportPkgs == nil {
- conf.ImportPkgs = make(map[string]bool)
- }
- conf.ImportPkgs[path] = conf.ImportPkgs[path] || tests
-}
-
-// PathEnclosingInterval returns the PackageInfo and ast.Node that
-// contain source interval [start, end), and all the node's ancestors
-// up to the AST root. It searches all ast.Files of all packages in prog.
-// exact is defined as for astutil.PathEnclosingInterval.
-//
-// The zero value is returned if not found.
-//
-func (prog *Program) PathEnclosingInterval(start, end token.Pos) (pkg *PackageInfo, path []ast.Node, exact bool) {
- for _, info := range prog.AllPackages {
- for _, f := range info.Files {
- if f.Pos() == token.NoPos {
- // This can happen if the parser saw
- // too many errors and bailed out.
- // (Use parser.AllErrors to prevent that.)
- continue
- }
- if !tokenFileContainsPos(prog.Fset.File(f.Pos()), start) {
- continue
- }
- if path, exact := astutil.PathEnclosingInterval(f, start, end); path != nil {
- return info, path, exact
- }
- }
- }
- return nil, nil, false
-}
-
-// InitialPackages returns a new slice containing the set of initial
-// packages (Created + Imported) in unspecified order.
-//
-func (prog *Program) InitialPackages() []*PackageInfo {
- infos := make([]*PackageInfo, 0, len(prog.Created)+len(prog.Imported))
- infos = append(infos, prog.Created...)
- for _, info := range prog.Imported {
- infos = append(infos, info)
- }
- return infos
-}
-
-// Package returns the ASTs and results of type checking for the
-// specified package.
-func (prog *Program) Package(path string) *PackageInfo {
- if info, ok := prog.AllPackages[prog.importMap[path]]; ok {
- return info
- }
- for _, info := range prog.Created {
- if path == info.Pkg.Path() {
- return info
- }
- }
- return nil
-}
-
-// ---------- Implementation ----------
-
-// importer holds the working state of the algorithm.
-type importer struct {
- conf *Config // the client configuration
- start time.Time // for logging
-
- progMu sync.Mutex // guards prog
- prog *Program // the resulting program
-
- // findpkg is a memoization of FindPackage.
- findpkgMu sync.Mutex // guards findpkg
- findpkg map[findpkgKey]*findpkgValue
-
- importedMu sync.Mutex // guards imported
- imported map[string]*importInfo // all imported packages (incl. failures) by import path
-
- // import dependency graph: graph[x][y] => x imports y
- //
- // Since non-importable packages cannot be cyclic, we ignore
- // their imports, thus we only need the subgraph over importable
- // packages. Nodes are identified by their import paths.
- graphMu sync.Mutex
- graph map[string]map[string]bool
-}
-
-type findpkgKey struct {
- importPath string
- fromDir string
- mode build.ImportMode
-}
-
-type findpkgValue struct {
- ready chan struct{} // closed to broadcast readiness
- bp *build.Package
- err error
-}
-
-// importInfo tracks the success or failure of a single import.
-//
-// Upon completion, exactly one of info and err is non-nil:
-// info on successful creation of a package, err otherwise.
-// A successful package may still contain type errors.
-//
-type importInfo struct {
- path string // import path
- info *PackageInfo // results of typechecking (including errors)
- complete chan struct{} // closed to broadcast that info is set.
-}
-
-// awaitCompletion blocks until ii is complete,
-// i.e. the info field is safe to inspect.
-func (ii *importInfo) awaitCompletion() {
- <-ii.complete // wait for close
-}
-
-// Complete marks ii as complete.
-// Its info and err fields will not be subsequently updated.
-func (ii *importInfo) Complete(info *PackageInfo) {
- if info == nil {
- panic("info == nil")
- }
- ii.info = info
- close(ii.complete)
-}
-
-type importError struct {
- path string // import path
- err error // reason for failure to create a package
-}
-
-// Load creates the initial packages specified by conf.{Create,Import}Pkgs,
-// loading their dependencies packages as needed.
-//
-// On success, Load returns a Program containing a PackageInfo for
-// each package. On failure, it returns an error.
-//
-// If AllowErrors is true, Load will return a Program even if some
-// packages contained I/O, parser or type errors, or if dependencies
-// were missing. (Such errors are accessible via PackageInfo.Errors. If
-// false, Load will fail if any package had an error.
-//
-// It is an error if no packages were loaded.
-//
-func (conf *Config) Load() (*Program, error) {
- // Create a simple default error handler for parse/type errors.
- if conf.TypeChecker.Error == nil {
- conf.TypeChecker.Error = func(e error) { fmt.Fprintln(os.Stderr, e) }
- }
-
- // Set default working directory for relative package references.
- if conf.Cwd == "" {
- var err error
- conf.Cwd, err = os.Getwd()
- if err != nil {
- return nil, err
- }
- }
-
- // Install default FindPackage hook using go/build logic.
- if conf.FindPackage == nil {
- conf.FindPackage = (*build.Context).Import
- }
-
- prog := &Program{
- Fset: conf.fset(),
- Imported: make(map[string]*PackageInfo),
- importMap: make(map[string]*types.Package),
- AllPackages: make(map[*types.Package]*PackageInfo),
- }
-
- imp := importer{
- conf: conf,
- prog: prog,
- findpkg: make(map[findpkgKey]*findpkgValue),
- imported: make(map[string]*importInfo),
- start: time.Now(),
- graph: make(map[string]map[string]bool),
- }
-
- // -- loading proper (concurrent phase) --------------------------------
-
- var errpkgs []string // packages that contained errors
-
- // Load the initially imported packages and their dependencies,
- // in parallel.
- // No vendor check on packages imported from the command line.
- infos, importErrors := imp.importAll("", conf.Cwd, conf.ImportPkgs, ignoreVendor)
- for _, ie := range importErrors {
- conf.TypeChecker.Error(ie.err) // failed to create package
- errpkgs = append(errpkgs, ie.path)
- }
- for _, info := range infos {
- prog.Imported[info.Pkg.Path()] = info
- }
-
- // Augment the designated initial packages by their tests.
- // Dependencies are loaded in parallel.
- var xtestPkgs []*build.Package
- for importPath, augment := range conf.ImportPkgs {
- if !augment {
- continue
- }
-
- // No vendor check on packages imported from command line.
- bp, err := imp.findPackage(importPath, conf.Cwd, ignoreVendor)
- if err != nil {
- // Package not found, or can't even parse package declaration.
- // Already reported by previous loop; ignore it.
- continue
- }
-
- // Needs external test package?
- if len(bp.XTestGoFiles) > 0 {
- xtestPkgs = append(xtestPkgs, bp)
- }
-
- // Consult the cache using the canonical package path.
- path := bp.ImportPath
- imp.importedMu.Lock() // (unnecessary, we're sequential here)
- ii, ok := imp.imported[path]
- // Paranoid checks added due to issue #11012.
- if !ok {
- // Unreachable.
- // The previous loop called importAll and thus
- // startLoad for each path in ImportPkgs, which
- // populates imp.imported[path] with a non-zero value.
- panic(fmt.Sprintf("imported[%q] not found", path))
- }
- if ii == nil {
- // Unreachable.
- // The ii values in this loop are the same as in
- // the previous loop, which enforced the invariant
- // that at least one of ii.err and ii.info is non-nil.
- panic(fmt.Sprintf("imported[%q] == nil", path))
- }
- if ii.info == nil {
- // Unreachable.
- // awaitCompletion has the postcondition
- // ii.info != nil.
- panic(fmt.Sprintf("imported[%q].info = nil", path))
- }
- info := ii.info
- imp.importedMu.Unlock()
-
- // Parse the in-package test files.
- files, errs := imp.conf.parsePackageFiles(bp, 't')
- for _, err := range errs {
- info.appendError(err)
- }
-
- // The test files augmenting package P cannot be imported,
- // but may import packages that import P,
- // so we must disable the cycle check.
- imp.addFiles(info, files, false)
- }
-
- createPkg := func(path string, files []*ast.File, errs []error) {
- // TODO(adonovan): fix: use dirname of files, not cwd.
- info := imp.newPackageInfo(path, conf.Cwd)
- for _, err := range errs {
- info.appendError(err)
- }
-
- // Ad hoc packages are non-importable,
- // so no cycle check is needed.
- // addFiles loads dependencies in parallel.
- imp.addFiles(info, files, false)
- prog.Created = append(prog.Created, info)
- }
-
- // Create packages specified by conf.CreatePkgs.
- for _, cp := range conf.CreatePkgs {
- files, errs := parseFiles(conf.fset(), conf.build(), nil, ".", cp.Filenames, conf.ParserMode)
- files = append(files, cp.Files...)
-
- path := cp.Path
- if path == "" {
- if len(files) > 0 {
- path = files[0].Name.Name
- } else {
- path = "(unnamed)"
- }
- }
- createPkg(path, files, errs)
- }
-
- // Create external test packages.
- sort.Sort(byImportPath(xtestPkgs))
- for _, bp := range xtestPkgs {
- files, errs := imp.conf.parsePackageFiles(bp, 'x')
- createPkg(bp.ImportPath+"_test", files, errs)
- }
-
- // -- finishing up (sequential) ----------------------------------------
-
- if len(prog.Imported)+len(prog.Created) == 0 {
- return nil, errors.New("no initial packages were loaded")
- }
-
- // Create infos for indirectly imported packages.
- // e.g. incomplete packages without syntax, loaded from export data.
- for _, obj := range prog.importMap {
- info := prog.AllPackages[obj]
- if info == nil {
- prog.AllPackages[obj] = &PackageInfo{Pkg: obj, Importable: true}
- } else {
- // finished
- info.checker = nil
- info.errorFunc = nil
- }
- }
-
- if !conf.AllowErrors {
- // Report errors in indirectly imported packages.
- for _, info := range prog.AllPackages {
- if len(info.Errors) > 0 {
- errpkgs = append(errpkgs, info.Pkg.Path())
- }
- }
- if errpkgs != nil {
- var more string
- if len(errpkgs) > 3 {
- more = fmt.Sprintf(" and %d more", len(errpkgs)-3)
- errpkgs = errpkgs[:3]
- }
- return nil, fmt.Errorf("couldn't load packages due to errors: %s%s",
- strings.Join(errpkgs, ", "), more)
- }
- }
-
- markErrorFreePackages(prog.AllPackages)
-
- return prog, nil
-}
-
-type byImportPath []*build.Package
-
-func (b byImportPath) Len() int { return len(b) }
-func (b byImportPath) Less(i, j int) bool { return b[i].ImportPath < b[j].ImportPath }
-func (b byImportPath) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
-
-// markErrorFreePackages sets the TransitivelyErrorFree flag on all
-// applicable packages.
-func markErrorFreePackages(allPackages map[*types.Package]*PackageInfo) {
- // Build the transpose of the import graph.
- importedBy := make(map[*types.Package]map[*types.Package]bool)
- for P := range allPackages {
- for _, Q := range P.Imports() {
- clients, ok := importedBy[Q]
- if !ok {
- clients = make(map[*types.Package]bool)
- importedBy[Q] = clients
- }
- clients[P] = true
- }
- }
-
- // Find all packages reachable from some error package.
- reachable := make(map[*types.Package]bool)
- var visit func(*types.Package)
- visit = func(p *types.Package) {
- if !reachable[p] {
- reachable[p] = true
- for q := range importedBy[p] {
- visit(q)
- }
- }
- }
- for _, info := range allPackages {
- if len(info.Errors) > 0 {
- visit(info.Pkg)
- }
- }
-
- // Mark the others as "transitively error-free".
- for _, info := range allPackages {
- if !reachable[info.Pkg] {
- info.TransitivelyErrorFree = true
- }
- }
-}
-
-// build returns the effective build context.
-func (conf *Config) build() *build.Context {
- if conf.Build != nil {
- return conf.Build
- }
- return &build.Default
-}
-
-// parsePackageFiles enumerates the files belonging to package path,
-// then loads, parses and returns them, plus a list of I/O or parse
-// errors that were encountered.
-//
-// 'which' indicates which files to include:
-// 'g': include non-test *.go source files (GoFiles + processed CgoFiles)
-// 't': include in-package *_test.go source files (TestGoFiles)
-// 'x': include external *_test.go source files. (XTestGoFiles)
-//
-func (conf *Config) parsePackageFiles(bp *build.Package, which rune) ([]*ast.File, []error) {
- if bp.ImportPath == "unsafe" {
- return nil, nil
- }
- var filenames []string
- switch which {
- case 'g':
- filenames = bp.GoFiles
- case 't':
- filenames = bp.TestGoFiles
- case 'x':
- filenames = bp.XTestGoFiles
- default:
- panic(which)
- }
-
- files, errs := parseFiles(conf.fset(), conf.build(), conf.DisplayPath, bp.Dir, filenames, conf.ParserMode)
-
- // Preprocess CgoFiles and parse the outputs (sequentially).
- if which == 'g' && bp.CgoFiles != nil {
- cgofiles, err := processCgoFiles(bp, conf.fset(), conf.DisplayPath, conf.ParserMode)
- if err != nil {
- errs = append(errs, err)
- } else {
- files = append(files, cgofiles...)
- }
- }
-
- return files, errs
-}
-
-// doImport imports the package denoted by path.
-// It implements the types.Importer signature.
-//
-// It returns an error if a package could not be created
-// (e.g. go/build or parse error), but type errors are reported via
-// the types.Config.Error callback (the first of which is also saved
-// in the package's PackageInfo).
-//
-// Idempotent.
-//
-func (imp *importer) doImport(from *PackageInfo, to string) (*types.Package, error) {
- if to == "C" {
- // This should be unreachable, but ad hoc packages are
- // not currently subject to cgo preprocessing.
- // See https://github.com/golang/go/issues/11627.
- return nil, fmt.Errorf(`the loader doesn't cgo-process ad hoc packages like %q; see Go issue 11627`,
- from.Pkg.Path())
- }
-
- bp, err := imp.findPackage(to, from.dir, 0)
- if err != nil {
- return nil, err
- }
-
- // The standard unsafe package is handled specially,
- // and has no PackageInfo.
- if bp.ImportPath == "unsafe" {
- return types.Unsafe, nil
- }
-
- // Look for the package in the cache using its canonical path.
- path := bp.ImportPath
- imp.importedMu.Lock()
- ii := imp.imported[path]
- imp.importedMu.Unlock()
- if ii == nil {
- panic("internal error: unexpected import: " + path)
- }
- if ii.info != nil {
- return ii.info.Pkg, nil
- }
-
- // Import of incomplete package: this indicates a cycle.
- fromPath := from.Pkg.Path()
- if cycle := imp.findPath(path, fromPath); cycle != nil {
- cycle = append([]string{fromPath}, cycle...)
- return nil, fmt.Errorf("import cycle: %s", strings.Join(cycle, " -> "))
- }
-
- panic("internal error: import of incomplete (yet acyclic) package: " + fromPath)
-}
-
-// findPackage locates the package denoted by the importPath in the
-// specified directory.
-func (imp *importer) findPackage(importPath, fromDir string, mode build.ImportMode) (*build.Package, error) {
- // We use a non-blocking duplicate-suppressing cache (gopl.io §9.7)
- // to avoid holding the lock around FindPackage.
- key := findpkgKey{importPath, fromDir, mode}
- imp.findpkgMu.Lock()
- v, ok := imp.findpkg[key]
- if ok {
- // cache hit
- imp.findpkgMu.Unlock()
-
- <-v.ready // wait for entry to become ready
- } else {
- // Cache miss: this goroutine becomes responsible for
- // populating the map entry and broadcasting its readiness.
- v = &findpkgValue{ready: make(chan struct{})}
- imp.findpkg[key] = v
- imp.findpkgMu.Unlock()
-
- ioLimit <- true
- v.bp, v.err = imp.conf.FindPackage(imp.conf.build(), importPath, fromDir, mode)
- <-ioLimit
-
- if _, ok := v.err.(*build.NoGoError); ok {
- v.err = nil // empty directory is not an error
- }
-
- close(v.ready) // broadcast ready condition
- }
- return v.bp, v.err
-}
-
-// importAll loads, parses, and type-checks the specified packages in
-// parallel and returns their completed importInfos in unspecified order.
-//
-// fromPath is the package path of the importing package, if it is
-// importable, "" otherwise. It is used for cycle detection.
-//
-// fromDir is the directory containing the import declaration that
-// caused these imports.
-//
-func (imp *importer) importAll(fromPath, fromDir string, imports map[string]bool, mode build.ImportMode) (infos []*PackageInfo, errors []importError) {
- // TODO(adonovan): opt: do the loop in parallel once
- // findPackage is non-blocking.
- var pending []*importInfo
- for importPath := range imports {
- bp, err := imp.findPackage(importPath, fromDir, mode)
- if err != nil {
- errors = append(errors, importError{
- path: importPath,
- err: err,
- })
- continue
- }
- pending = append(pending, imp.startLoad(bp))
- }
-
- if fromPath != "" {
- // We're loading a set of imports.
- //
- // We must record graph edges from the importing package
- // to its dependencies, and check for cycles.
- imp.graphMu.Lock()
- deps, ok := imp.graph[fromPath]
- if !ok {
- deps = make(map[string]bool)
- imp.graph[fromPath] = deps
- }
- for _, ii := range pending {
- deps[ii.path] = true
- }
- imp.graphMu.Unlock()
- }
-
- for _, ii := range pending {
- if fromPath != "" {
- if cycle := imp.findPath(ii.path, fromPath); cycle != nil {
- // Cycle-forming import: we must not await its
- // completion since it would deadlock.
- //
- // We don't record the error in ii since
- // the error is really associated with the
- // cycle-forming edge, not the package itself.
- // (Also it would complicate the
- // invariants of importPath completion.)
- if trace {
- fmt.Fprintf(os.Stderr, "import cycle: %q\n", cycle)
- }
- continue
- }
- }
- ii.awaitCompletion()
- infos = append(infos, ii.info)
- }
-
- return infos, errors
-}
-
-// findPath returns an arbitrary path from 'from' to 'to' in the import
-// graph, or nil if there was none.
-func (imp *importer) findPath(from, to string) []string {
- imp.graphMu.Lock()
- defer imp.graphMu.Unlock()
-
- seen := make(map[string]bool)
- var search func(stack []string, importPath string) []string
- search = func(stack []string, importPath string) []string {
- if !seen[importPath] {
- seen[importPath] = true
- stack = append(stack, importPath)
- if importPath == to {
- return stack
- }
- for x := range imp.graph[importPath] {
- if p := search(stack, x); p != nil {
- return p
- }
- }
- }
- return nil
- }
- return search(make([]string, 0, 20), from)
-}
-
-// startLoad initiates the loading, parsing and type-checking of the
-// specified package and its dependencies, if it has not already begun.
-//
-// It returns an importInfo, not necessarily in a completed state. The
-// caller must call awaitCompletion() before accessing its info field.
-//
-// startLoad is concurrency-safe and idempotent.
-//
-func (imp *importer) startLoad(bp *build.Package) *importInfo {
- path := bp.ImportPath
- imp.importedMu.Lock()
- ii, ok := imp.imported[path]
- if !ok {
- ii = &importInfo{path: path, complete: make(chan struct{})}
- imp.imported[path] = ii
- go func() {
- info := imp.load(bp)
- ii.Complete(info)
- }()
- }
- imp.importedMu.Unlock()
-
- return ii
-}
-
-// load implements package loading by parsing Go source files
-// located by go/build.
-func (imp *importer) load(bp *build.Package) *PackageInfo {
- info := imp.newPackageInfo(bp.ImportPath, bp.Dir)
- info.Importable = true
- files, errs := imp.conf.parsePackageFiles(bp, 'g')
- for _, err := range errs {
- info.appendError(err)
- }
-
- imp.addFiles(info, files, true)
-
- imp.progMu.Lock()
- imp.prog.importMap[bp.ImportPath] = info.Pkg
- imp.progMu.Unlock()
-
- return info
-}
-
-// addFiles adds and type-checks the specified files to info, loading
-// their dependencies if needed. The order of files determines the
-// package initialization order. It may be called multiple times on the
-// same package. Errors are appended to the info.Errors field.
-//
-// cycleCheck determines whether the imports within files create
-// dependency edges that should be checked for potential cycles.
-//
-func (imp *importer) addFiles(info *PackageInfo, files []*ast.File, cycleCheck bool) {
- // Ensure the dependencies are loaded, in parallel.
- var fromPath string
- if cycleCheck {
- fromPath = info.Pkg.Path()
- }
- // TODO(adonovan): opt: make the caller do scanImports.
- // Callers with a build.Package can skip it.
- imp.importAll(fromPath, info.dir, scanImports(files), 0)
-
- if trace {
- fmt.Fprintf(os.Stderr, "%s: start %q (%d)\n",
- time.Since(imp.start), info.Pkg.Path(), len(files))
- }
-
- // Ignore the returned (first) error since we
- // already collect them all in the PackageInfo.
- info.checker.Files(files)
- info.Files = append(info.Files, files...)
-
- if imp.conf.AfterTypeCheck != nil {
- imp.conf.AfterTypeCheck(info, files)
- }
-
- if trace {
- fmt.Fprintf(os.Stderr, "%s: stop %q\n",
- time.Since(imp.start), info.Pkg.Path())
- }
-}
-
-func (imp *importer) newPackageInfo(path, dir string) *PackageInfo {
- pkg := types.NewPackage(path, "")
- info := &PackageInfo{
- Pkg: pkg,
- Info: types.Info{
- Types: make(map[ast.Expr]types.TypeAndValue),
- Defs: make(map[*ast.Ident]types.Object),
- Uses: make(map[*ast.Ident]types.Object),
- Implicits: make(map[ast.Node]types.Object),
- Scopes: make(map[ast.Node]*types.Scope),
- Selections: make(map[*ast.SelectorExpr]*types.Selection),
- },
- errorFunc: imp.conf.TypeChecker.Error,
- dir: dir,
- }
-
- // Copy the types.Config so we can vary it across PackageInfos.
- tc := imp.conf.TypeChecker
- tc.IgnoreFuncBodies = false
- if f := imp.conf.TypeCheckFuncBodies; f != nil {
- tc.IgnoreFuncBodies = !f(path)
- }
- tc.Importer = closure{imp, info}
- tc.Error = info.appendError // appendError wraps the user's Error function
-
- info.checker = types.NewChecker(&tc, imp.conf.fset(), pkg, &info.Info)
- imp.progMu.Lock()
- imp.prog.AllPackages[pkg] = info
- imp.progMu.Unlock()
- return info
-}
-
-type closure struct {
- imp *importer
- info *PackageInfo
-}
-
-func (c closure) Import(to string) (*types.Package, error) { return c.imp.doImport(c.info, to) }
diff --git a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/util.go b/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/util.go
deleted file mode 100644
index 7f38dd7..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awsmigrate/awsmigrate-renamer/vendor/golang.org/x/tools/go/loader/util.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package loader
-
-import (
- "go/ast"
- "go/build"
- "go/parser"
- "go/token"
- "io"
- "os"
- "strconv"
- "sync"
-
- "golang.org/x/tools/go/buildutil"
-)
-
-// We use a counting semaphore to limit
-// the number of parallel I/O calls per process.
-var ioLimit = make(chan bool, 10)
-
-// parseFiles parses the Go source files within directory dir and
-// returns the ASTs of the ones that could be at least partially parsed,
-// along with a list of I/O and parse errors encountered.
-//
-// I/O is done via ctxt, which may specify a virtual file system.
-// displayPath is used to transform the filenames attached to the ASTs.
-//
-func parseFiles(fset *token.FileSet, ctxt *build.Context, displayPath func(string) string, dir string, files []string, mode parser.Mode) ([]*ast.File, []error) {
- if displayPath == nil {
- displayPath = func(path string) string { return path }
- }
- var wg sync.WaitGroup
- n := len(files)
- parsed := make([]*ast.File, n)
- errors := make([]error, n)
- for i, file := range files {
- if !buildutil.IsAbsPath(ctxt, file) {
- file = buildutil.JoinPath(ctxt, dir, file)
- }
- wg.Add(1)
- go func(i int, file string) {
- ioLimit <- true // wait
- defer func() {
- wg.Done()
- <-ioLimit // signal
- }()
- var rd io.ReadCloser
- var err error
- if ctxt.OpenFile != nil {
- rd, err = ctxt.OpenFile(file)
- } else {
- rd, err = os.Open(file)
- }
- if err != nil {
- errors[i] = err // open failed
- return
- }
-
- // ParseFile may return both an AST and an error.
- parsed[i], errors[i] = parser.ParseFile(fset, displayPath(file), rd, mode)
- rd.Close()
- }(i, file)
- }
- wg.Wait()
-
- // Eliminate nils, preserving order.
- var o int
- for _, f := range parsed {
- if f != nil {
- parsed[o] = f
- o++
- }
- }
- parsed = parsed[:o]
-
- o = 0
- for _, err := range errors {
- if err != nil {
- errors[o] = err
- o++
- }
- }
- errors = errors[:o]
-
- return parsed, errors
-}
-
-// scanImports returns the set of all import paths from all
-// import specs in the specified files.
-func scanImports(files []*ast.File) map[string]bool {
- imports := make(map[string]bool)
- for _, f := range files {
- for _, decl := range f.Decls {
- if decl, ok := decl.(*ast.GenDecl); ok && decl.Tok == token.IMPORT {
- for _, spec := range decl.Specs {
- spec := spec.(*ast.ImportSpec)
-
- // NB: do not assume the program is well-formed!
- path, err := strconv.Unquote(spec.Path.Value)
- if err != nil {
- continue // quietly ignore the error
- }
- if path == "C" {
- continue // skip pseudopackage
- }
- imports[path] = true
- }
- }
- }
- }
- return imports
-}
-
-// ---------- Internal helpers ----------
-
-// TODO(adonovan): make this a method: func (*token.File) Contains(token.Pos)
-func tokenFileContainsPos(f *token.File, pos token.Pos) bool {
- p := int(pos)
- base := f.Base()
- return base <= p && p < base+f.Size()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go b/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go
deleted file mode 100644
index 5494dc7..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/assert.go
+++ /dev/null
@@ -1,190 +0,0 @@
-package awstesting
-
-import (
- "encoding/json"
- "encoding/xml"
- "fmt"
- "net/url"
- "reflect"
- "regexp"
- "sort"
- "strings"
- "testing"
-)
-
-// Match is a testing helper to test for testing error by comparing expected
-// with a regular expression.
-func Match(t *testing.T, regex, expected string) {
- if !regexp.MustCompile(regex).Match([]byte(expected)) {
- t.Errorf("%q\n\tdoes not match /%s/", expected, regex)
- }
-}
-
-// AssertURL verifies the expected URL is matches the actual.
-func AssertURL(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool {
- expectURL, err := url.Parse(expect)
- if err != nil {
- t.Errorf(errMsg("unable to parse expected URL", err, msgAndArgs))
- return false
- }
- actualURL, err := url.Parse(actual)
- if err != nil {
- t.Errorf(errMsg("unable to parse actual URL", err, msgAndArgs))
- return false
- }
-
- equal(t, expectURL.Host, actualURL.Host, msgAndArgs...)
- equal(t, expectURL.Scheme, actualURL.Scheme, msgAndArgs...)
- equal(t, expectURL.Path, actualURL.Path, msgAndArgs...)
-
- return AssertQuery(t, expectURL.Query().Encode(), actualURL.Query().Encode(), msgAndArgs...)
-}
-
-var queryMapKey = regexp.MustCompile("(.*?)\\.[0-9]+\\.key")
-
-// AssertQuery verifies the expect HTTP query string matches the actual.
-func AssertQuery(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool {
- expectQ, err := url.ParseQuery(expect)
- if err != nil {
- t.Errorf(errMsg("unable to parse expected Query", err, msgAndArgs))
- return false
- }
- actualQ, err := url.ParseQuery(actual)
- if err != nil {
- t.Errorf(errMsg("unable to parse actual Query", err, msgAndArgs))
- return false
- }
-
- // Make sure the keys are the same
- if !equal(t, queryValueKeys(expectQ), queryValueKeys(actualQ), msgAndArgs...) {
- return false
- }
-
- keys := map[string][]string{}
- for key, v := range expectQ {
- if queryMapKey.Match([]byte(key)) {
- submatch := queryMapKey.FindStringSubmatch(key)
- keys[submatch[1]] = append(keys[submatch[1]], v...)
- }
- }
-
- for k, v := range keys {
- // clear all keys that have prefix
- for key := range expectQ {
- if strings.HasPrefix(key, k) {
- delete(expectQ, key)
- }
- }
-
- sort.Strings(v)
- for i, value := range v {
- expectQ[fmt.Sprintf("%s.%d.key", k, i+1)] = []string{value}
- }
- }
-
- for k, expectQVals := range expectQ {
- sort.Strings(expectQVals)
- actualQVals := actualQ[k]
- sort.Strings(actualQVals)
- if !equal(t, expectQVals, actualQVals, msgAndArgs...) {
- return false
- }
- }
-
- return true
-}
-
-// AssertJSON verifies that the expect json string matches the actual.
-func AssertJSON(t *testing.T, expect, actual string, msgAndArgs ...interface{}) bool {
- expectVal := map[string]interface{}{}
- if err := json.Unmarshal([]byte(expect), &expectVal); err != nil {
- t.Errorf(errMsg("unable to parse expected JSON", err, msgAndArgs...))
- return false
- }
-
- actualVal := map[string]interface{}{}
- if err := json.Unmarshal([]byte(actual), &actualVal); err != nil {
- t.Errorf(errMsg("unable to parse actual JSON", err, msgAndArgs...))
- return false
- }
-
- return equal(t, expectVal, actualVal, msgAndArgs...)
-}
-
-// AssertXML verifies that the expect xml string matches the actual.
-func AssertXML(t *testing.T, expect, actual string, container interface{}, msgAndArgs ...interface{}) bool {
- expectVal := container
- if err := xml.Unmarshal([]byte(expect), &expectVal); err != nil {
- t.Errorf(errMsg("unable to parse expected XML", err, msgAndArgs...))
- }
-
- actualVal := container
- if err := xml.Unmarshal([]byte(actual), &actualVal); err != nil {
- t.Errorf(errMsg("unable to parse actual XML", err, msgAndArgs...))
- }
- return equal(t, expectVal, actualVal, msgAndArgs...)
-}
-
-// objectsAreEqual determines if two objects are considered equal.
-//
-// This function does no assertion of any kind.
-//
-// Based on github.com/stretchr/testify/assert.ObjectsAreEqual
-// Copied locally to prevent non-test build dependencies on testify
-func objectsAreEqual(expected, actual interface{}) bool {
- if expected == nil || actual == nil {
- return expected == actual
- }
-
- return reflect.DeepEqual(expected, actual)
-}
-
-// Equal asserts that two objects are equal.
-//
-// assert.Equal(t, 123, 123, "123 and 123 should be equal")
-//
-// Returns whether the assertion was successful (true) or not (false).
-//
-// Based on github.com/stretchr/testify/assert.Equal
-// Copied locally to prevent non-test build dependencies on testify
-func equal(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{}) bool {
- if !objectsAreEqual(expected, actual) {
- t.Errorf("Not Equal:\n\t%#v (expected)\n\t%#v (actual), %s",
- expected, actual, messageFromMsgAndArgs(msgAndArgs))
- return false
- }
-
- return true
-}
-
-func errMsg(baseMsg string, err error, msgAndArgs ...interface{}) string {
- message := messageFromMsgAndArgs(msgAndArgs)
- if message != "" {
- message += ", "
- }
- return fmt.Sprintf("%s%s, %v", message, baseMsg, err)
-}
-
-// Based on github.com/stretchr/testify/assert.messageFromMsgAndArgs
-// Copied locally to prevent non-test build dependencies on testify
-func messageFromMsgAndArgs(msgAndArgs []interface{}) string {
- if len(msgAndArgs) == 0 || msgAndArgs == nil {
- return ""
- }
- if len(msgAndArgs) == 1 {
- return msgAndArgs[0].(string)
- }
- if len(msgAndArgs) > 1 {
- return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...)
- }
- return ""
-}
-
-func queryValueKeys(v url.Values) []string {
- keys := make([]string, 0, len(v))
- for k := range v {
- keys = append(keys, k)
- }
- sort.Strings(keys)
- return keys
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/assert_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/assert_test.go
deleted file mode 100644
index f72abfb..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/assert_test.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package awstesting_test
-
-import (
- "encoding/xml"
- "testing"
-
- "github.com/aws/aws-sdk-go/awstesting"
-)
-
-func TestAssertJSON(t *testing.T) {
- cases := []struct {
- e, a string
- asserts bool
- }{
- {
- e: `{"RecursiveStruct":{"RecursiveMap":{"foo":{"NoRecurse":"foo"},"bar":{"NoRecurse":"bar"}}}}`,
- a: `{"RecursiveStruct":{"RecursiveMap":{"bar":{"NoRecurse":"bar"},"foo":{"NoRecurse":"foo"}}}}`,
- asserts: true,
- },
- }
-
- for i, c := range cases {
- mockT := &testing.T{}
- if awstesting.AssertJSON(mockT, c.e, c.a) != c.asserts {
- t.Error("Assert JSON result was not expected.", i)
- }
- }
-}
-
-func TestAssertXML(t *testing.T) {
- cases := []struct {
- e, a string
- asserts bool
- container struct {
- XMLName xml.Name `xml:"OperationRequest"`
- NS string `xml:"xmlns,attr"`
- RecursiveStruct struct {
- RecursiveMap struct {
- Entries []struct {
- XMLName xml.Name `xml:"entries"`
- Key string `xml:"key"`
- Value struct {
- XMLName xml.Name `xml:"value"`
- NoRecurse string
- }
- }
- }
- }
- }
- }{
- {
- e: `foofoobarbar`,
- a: `barbarfoofoo`,
- asserts: true,
- },
- }
-
- for i, c := range cases {
- // mockT := &testing.T{}
- if awstesting.AssertXML(t, c.e, c.a, c.container) != c.asserts {
- t.Error("Assert XML result was not expected.", i)
- }
- }
-}
-
-func TestAssertQuery(t *testing.T) {
- cases := []struct {
- e, a string
- asserts bool
- }{
- {
- e: `Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2`,
- a: `Action=OperationName&Version=2014-01-01&Foo=val2&Bar=val3`,
- asserts: false,
- },
- {
- e: `Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2`,
- a: `Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2`,
- asserts: true,
- },
- }
-
- for i, c := range cases {
- mockT := &testing.T{}
- if awstesting.AssertQuery(mockT, c.e, c.a) != c.asserts {
- t.Error("Assert Query result was not expected.", i)
- }
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/client.go
deleted file mode 100644
index 539639d..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/client.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package awstesting
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/defaults"
-)
-
-// NewClient creates and initializes a generic service client for testing.
-func NewClient(cfgs ...*aws.Config) *client.Client {
- info := metadata.ClientInfo{
- Endpoint: "http://endpoint",
- SigningName: "",
- }
- def := defaults.Get()
- def.Config.MergeIn(cfgs...)
-
- if v := aws.StringValue(def.Config.Endpoint); len(v) > 0 {
- info.Endpoint = v
- }
-
- return client.New(*def.Config, info, def.Handlers)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/cmd/bucket_cleanup/main.go b/vendor/github.com/aws/aws-sdk-go/awstesting/cmd/bucket_cleanup/main.go
deleted file mode 100644
index 8425c39..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/cmd/bucket_cleanup/main.go
+++ /dev/null
@@ -1,94 +0,0 @@
-// +build integration
-
-package main
-
-import (
- "fmt"
- "os"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/s3"
-)
-
-// Searches the buckets of an account that match the prefix, and deletes
-// those buckets, and all objects within. Before deleting will prompt user
-// to confirm bucket should be deleted. Positive confirmation is required.
-//
-// Usage:
-// go run deleteBuckets.go
-func main() {
- sess := session.Must(session.NewSession())
-
- svc := s3.New(sess)
- buckets, err := svc.ListBuckets(&s3.ListBucketsInput{})
- if err != nil {
- panic(fmt.Sprintf("failed to list buckets, %v", err))
- }
-
- if len(os.Args) < 2 {
- fmt.Fprintln(os.Stderr, "bucket prefix required")
- os.Exit(1)
- }
- bucketPrefix := os.Args[1]
-
- var failed bool
- for _, b := range buckets.Buckets {
- bucket := aws.StringValue(b.Name)
-
- if !strings.HasPrefix(bucket, bucketPrefix) {
- continue
- }
-
- fmt.Printf("Delete bucket %q? [y/N]: ", bucket)
- var v string
- if _, err := fmt.Scanln(&v); err != nil || !(v == "Y" || v == "y") {
- fmt.Println("\tSkipping")
- continue
- }
-
- fmt.Println("\tDeleting")
- if err := deleteBucket(svc, bucket); err != nil {
- fmt.Fprintf(os.Stderr, "failed to delete bucket %q, %v", bucket, err)
- failed = true
- }
- }
-
- if failed {
- os.Exit(1)
- }
-}
-
-func deleteBucket(svc *s3.S3, bucket string) error {
- bucketName := &bucket
-
- objs, err := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName})
- if err != nil {
- return fmt.Errorf("failed to list bucket %q objects, %v", bucketName, err)
- }
-
- for _, o := range objs.Contents {
- svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key})
- }
-
- uploads, err := svc.ListMultipartUploads(&s3.ListMultipartUploadsInput{Bucket: bucketName})
- if err != nil {
- return fmt.Errorf("failed to list bucket %q multipart objects, %v", bucketName, err)
- }
-
- for _, u := range uploads.Uploads {
- svc.AbortMultipartUpload(&s3.AbortMultipartUploadInput{
- Bucket: bucketName,
- Key: u.Key,
- UploadId: u.UploadId,
- })
- }
-
- _, err = svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName})
- if err != nil {
- return fmt.Errorf("failed to delete bucket %q, %v", bucketName, err)
- }
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go
deleted file mode 100644
index 93d5ff6..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/integration_test.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// +build integration
-
-// Package s3_test runs integration tests for S3
-package s3_test
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "net/http"
- "os"
- "testing"
- "time"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/integration"
- "github.com/aws/aws-sdk-go/service/s3"
-)
-
-var bucketName *string
-var svc *s3.S3
-
-func TestMain(m *testing.M) {
- setup()
- defer teardown() // only called if we panic
- result := m.Run()
- teardown()
- os.Exit(result)
-}
-
-// Create a bucket for testing
-func setup() {
- svc = s3.New(integration.Session)
- bucketName = aws.String(
- fmt.Sprintf("aws-sdk-go-integration-%d-%s", time.Now().Unix(), integration.UniqueID()))
-
- for i := 0; i < 10; i++ {
- _, err := svc.CreateBucket(&s3.CreateBucketInput{Bucket: bucketName})
- if err == nil {
- break
- }
- }
-
- for {
- _, err := svc.HeadBucket(&s3.HeadBucketInput{Bucket: bucketName})
- if err == nil {
- break
- }
- time.Sleep(1 * time.Second)
- }
-}
-
-// Delete the bucket
-func teardown() {
- resp, _ := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName})
- for _, o := range resp.Contents {
- svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key})
- }
- svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName})
-}
-
-func TestWriteToObject(t *testing.T) {
- _, err := svc.PutObject(&s3.PutObjectInput{
- Bucket: bucketName,
- Key: aws.String("key name"),
- Body: bytes.NewReader([]byte("hello world")),
- })
- assert.NoError(t, err)
-
- resp, err := svc.GetObject(&s3.GetObjectInput{
- Bucket: bucketName,
- Key: aws.String("key name"),
- })
- assert.NoError(t, err)
-
- b, _ := ioutil.ReadAll(resp.Body)
- assert.Equal(t, []byte("hello world"), b)
-}
-
-func TestPresignedGetPut(t *testing.T) {
- putreq, _ := svc.PutObjectRequest(&s3.PutObjectInput{
- Bucket: bucketName,
- Key: aws.String("presigned-key"),
- })
- var err error
-
- // Presign a PUT request
- var puturl string
- puturl, err = putreq.Presign(300 * time.Second)
- assert.NoError(t, err)
-
- // PUT to the presigned URL with a body
- var puthttpreq *http.Request
- buf := bytes.NewReader([]byte("hello world"))
- puthttpreq, err = http.NewRequest("PUT", puturl, buf)
- assert.NoError(t, err)
-
- var putresp *http.Response
- putresp, err = http.DefaultClient.Do(puthttpreq)
- assert.NoError(t, err)
- assert.Equal(t, 200, putresp.StatusCode)
-
- // Presign a GET on the same URL
- getreq, _ := svc.GetObjectRequest(&s3.GetObjectInput{
- Bucket: bucketName,
- Key: aws.String("presigned-key"),
- })
-
- var geturl string
- geturl, err = getreq.Presign(300 * time.Second)
- assert.NoError(t, err)
-
- // Get the body
- var getresp *http.Response
- getresp, err = http.Get(geturl)
- assert.NoError(t, err)
-
- var b []byte
- defer getresp.Body.Close()
- b, err = ioutil.ReadAll(getresp.Body)
- assert.Equal(t, "hello world", string(b))
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/client.go
deleted file mode 100644
index eb16be6..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/client.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// +build integration
-
-//Package s3crypto provides gucumber integration tests support.
-package s3crypto
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/s3"
- "github.com/aws/aws-sdk-go/service/s3/s3crypto"
-
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@s3crypto", func() {
- sess := session.New((&aws.Config{
- Region: aws.String("us-west-2"),
- }))
- encryptionClient := s3crypto.NewEncryptionClient(sess, nil, func(c *s3crypto.EncryptionClient) {
- })
- gucumber.World["encryptionClient"] = encryptionClient
-
- decryptionClient := s3crypto.NewDecryptionClient(sess)
- gucumber.World["decryptionClient"] = decryptionClient
-
- gucumber.World["client"] = s3.New(sess)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/s3_crypto.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/s3_crypto.feature
deleted file mode 100644
index 81abc1a..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/s3_crypto.feature
+++ /dev/null
@@ -1,33 +0,0 @@
-# language: en
-@s3crypto @client
-Feature: S3 Integration Crypto Tests
-
- Scenario: Uploading Go's SDK fixtures
- When I get all fixtures for "aes_gcm" from "aws-s3-shared-tests"
- Then I encrypt each fixture with "kms" "AWS_SDK_TEST_ALIAS" "us-west-2" and "aes_gcm"
- And upload "Go" data with folder "version_2"
-
- Scenario: Uploading Go's SDK fixtures
- When I get all fixtures for "aes_cbc" from "aws-s3-shared-tests"
- Then I encrypt each fixture with "kms" "AWS_SDK_TEST_ALIAS" "us-west-2" and "aes_cbc"
- And upload "Go" data with folder "version_2"
-
- Scenario: Get all plaintext fixtures for symmetric masterkey aes gcm
- When I get all fixtures for "aes_gcm" from "aws-s3-shared-tests"
- Then I decrypt each fixture against "Go" "version_2"
- And I compare the decrypted ciphertext to the plaintext
-
- Scenario: Get all plaintext fixtures for symmetric masterkey aes cbc
- When I get all fixtures for "aes_cbc" from "aws-s3-shared-tests"
- Then I decrypt each fixture against "Go" "version_2"
- And I compare the decrypted ciphertext to the plaintext
-
- Scenario: Get all plaintext fixtures for symmetric masterkey aes gcm
- When I get all fixtures for "aes_gcm" from "aws-s3-shared-tests"
- Then I decrypt each fixture against "Java" "version_2"
- And I compare the decrypted ciphertext to the plaintext
-
- Scenario: Get all plaintext fixtures for symmetric masterkey aes cbc
- When I get all fixtures for "aes_cbc" from "aws-s3-shared-tests"
- Then I decrypt each fixture against "Java" "version_2"
- And I compare the decrypted ciphertext to the plaintext
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go
deleted file mode 100644
index 7d58e19..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3crypto/stepdef.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// +build integration
-
-// Package s3crypto contains shared step definitions that are used across integration tests
-package s3crypto
-
-import (
- "bytes"
- "encoding/base64"
- "errors"
- "io/ioutil"
- "strings"
-
- "github.com/gucumber/gucumber"
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/kms"
- "github.com/aws/aws-sdk-go/service/s3"
- "github.com/aws/aws-sdk-go/service/s3/s3crypto"
-)
-
-func init() {
- gucumber.When(`^I get all fixtures for "(.+?)" from "(.+?)"$`,
- func(cekAlg, bucket string) {
- prefix := "plaintext_test_case_"
- baseFolder := "crypto_tests/" + cekAlg
- s3Client := gucumber.World["client"].(*s3.S3)
-
- out, err := s3Client.ListObjects(&s3.ListObjectsInput{
- Bucket: aws.String(bucket),
- Prefix: aws.String(baseFolder + "/" + prefix),
- })
- assert.NoError(gucumber.T, err)
-
- plaintexts := make(map[string][]byte)
- for _, obj := range out.Contents {
- plaintextKey := obj.Key
- ptObj, err := s3Client.GetObject(&s3.GetObjectInput{
- Bucket: aws.String(bucket),
- Key: plaintextKey,
- })
- assert.NoError(gucumber.T, err)
- caseKey := strings.TrimPrefix(*plaintextKey, baseFolder+"/"+prefix)
- plaintext, err := ioutil.ReadAll(ptObj.Body)
- assert.NoError(gucumber.T, err)
-
- plaintexts[caseKey] = plaintext
- }
- gucumber.World["baseFolder"] = baseFolder
- gucumber.World["bucket"] = bucket
- gucumber.World["plaintexts"] = plaintexts
- })
-
- gucumber.Then(`^I decrypt each fixture against "(.+?)" "(.+?)"$`, func(lang, version string) {
- plaintexts := gucumber.World["plaintexts"].(map[string][]byte)
- baseFolder := gucumber.World["baseFolder"].(string)
- bucket := gucumber.World["bucket"].(string)
- prefix := "ciphertext_test_case_"
- s3Client := gucumber.World["client"].(*s3.S3)
- s3CryptoClient := gucumber.World["decryptionClient"].(*s3crypto.DecryptionClient)
- language := "language_" + lang
-
- ciphertexts := make(map[string][]byte)
- for caseKey := range plaintexts {
- cipherKey := baseFolder + "/" + version + "/" + language + "/" + prefix + caseKey
-
- // To get metadata for encryption key
- ctObj, err := s3Client.GetObject(&s3.GetObjectInput{
- Bucket: aws.String(bucket),
- Key: &cipherKey,
- })
- if err != nil {
- continue
- }
-
- // We don't support wrap, so skip it
- if ctObj.Metadata["X-Amz-Wrap-Alg"] == nil || *ctObj.Metadata["X-Amz-Wrap-Alg"] != "kms" {
- continue
- }
-
- ctObj, err = s3CryptoClient.GetObject(&s3.GetObjectInput{
- Bucket: aws.String(bucket),
- Key: &cipherKey,
- },
- )
- assert.NoError(gucumber.T, err)
-
- ciphertext, err := ioutil.ReadAll(ctObj.Body)
- assert.NoError(gucumber.T, err)
- ciphertexts[caseKey] = ciphertext
- }
- gucumber.World["decrypted"] = ciphertexts
- })
-
- gucumber.And(`^I compare the decrypted ciphertext to the plaintext$`, func() {
- plaintexts := gucumber.World["plaintexts"].(map[string][]byte)
- ciphertexts := gucumber.World["decrypted"].(map[string][]byte)
- for caseKey, ciphertext := range ciphertexts {
- assert.Equal(gucumber.T, len(plaintexts[caseKey]), len(ciphertext))
- assert.True(gucumber.T, bytes.Equal(plaintexts[caseKey], ciphertext))
- }
- })
-
- gucumber.Then(`^I encrypt each fixture with "(.+?)" "(.+?)" "(.+?)" and "(.+?)"$`, func(kek, v1, v2, cek string) {
- var handler s3crypto.CipherDataGenerator
- var builder s3crypto.ContentCipherBuilder
- switch kek {
- case "kms":
- arn, err := getAliasInformation(v1, v2)
- assert.Nil(gucumber.T, err)
-
- b64Arn := base64.StdEncoding.EncodeToString([]byte(arn))
- assert.Nil(gucumber.T, err)
- gucumber.World["Masterkey"] = b64Arn
-
- handler = s3crypto.NewKMSKeyGenerator(kms.New(session.New(&aws.Config{
- Region: &v2,
- })), arn)
- assert.Nil(gucumber.T, err)
- default:
- gucumber.T.Skip()
- }
-
- switch cek {
- case "aes_gcm":
- builder = s3crypto.AESGCMContentCipherBuilder(handler)
- case "aes_cbc":
- builder = s3crypto.AESCBCContentCipherBuilder(handler, s3crypto.AESCBCPadder)
- default:
- gucumber.T.Skip()
- }
-
- sess := session.New(&aws.Config{
- Region: aws.String("us-west-2"),
- })
- c := s3crypto.NewEncryptionClient(sess, builder, func(c *s3crypto.EncryptionClient) {
- })
- gucumber.World["encryptionClient"] = c
- gucumber.World["cek"] = cek
- })
-
- gucumber.And(`^upload "(.+?)" data with folder "(.+?)"$`, func(language, folder string) {
- c := gucumber.World["encryptionClient"].(*s3crypto.EncryptionClient)
- cek := gucumber.World["cek"].(string)
- bucket := gucumber.World["bucket"].(string)
- plaintexts := gucumber.World["plaintexts"].(map[string][]byte)
- key := gucumber.World["Masterkey"].(string)
- for caseKey, plaintext := range plaintexts {
- input := &s3.PutObjectInput{
- Bucket: &bucket,
- Key: aws.String("crypto_tests/" + cek + "/" + folder + "/language_" + language + "/ciphertext_test_case_" + caseKey),
- Body: bytes.NewReader(plaintext),
- Metadata: map[string]*string{
- "Masterkey": &key,
- },
- }
-
- _, err := c.PutObject(input)
- assert.Nil(gucumber.T, err)
- }
- })
-}
-
-func getAliasInformation(alias, region string) (string, error) {
- arn := ""
- svc := kms.New(session.New(&aws.Config{
- Region: ®ion,
- }))
-
- truncated := true
- var marker *string
- for truncated {
- out, err := svc.ListAliases(&kms.ListAliasesInput{
- Marker: marker,
- })
- if err != nil {
- return arn, err
- }
- for _, aliasEntry := range out.Aliases {
- if *aliasEntry.AliasName == "alias/"+alias {
- return *aliasEntry.AliasArn, nil
- }
- }
- truncated = *out.Truncated
- marker = out.NextMarker
- }
-
- return "", errors.New("The alias " + alias + " does not exist in your account. Please add the proper alias to a key")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/bucket_region_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/bucket_region_test.go
deleted file mode 100644
index 823b2c1..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/bucket_region_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// +build integration
-
-package s3manager
-
-import (
- "testing"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/integration"
- "github.com/aws/aws-sdk-go/service/s3/s3manager"
-)
-
-func TestGetBucketRegion(t *testing.T) {
- expectRegion := aws.StringValue(integration.Session.Config.Region)
-
- ctx := aws.BackgroundContext()
- region, err := s3manager.GetBucketRegion(ctx, integration.Session,
- aws.StringValue(bucketName), expectRegion)
-
- if err != nil {
- t.Fatalf("expect no error, got %v", err)
- }
-
- if e, a := expectRegion, region; e != a {
- t.Errorf("expect %s bucket region, got %s", e, a)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go
deleted file mode 100644
index 8753643..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/integration_test.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// +build integration
-
-// Package s3manager provides integration tests for the service/s3/s3manager package
-package s3manager
-
-import (
- "bytes"
- "crypto/md5"
- "fmt"
- "io"
- "os"
- "regexp"
- "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/request"
- "github.com/aws/aws-sdk-go/awstesting/integration"
- "github.com/aws/aws-sdk-go/service/s3"
- "github.com/aws/aws-sdk-go/service/s3/s3manager"
-)
-
-var integBuf12MB = make([]byte, 1024*1024*12)
-var integMD512MB = fmt.Sprintf("%x", md5.Sum(integBuf12MB))
-var bucketName *string
-
-func TestMain(m *testing.M) {
- if err := setup(); err != nil {
- panic(fmt.Sprintf("failed to setup integration test, %v", err))
- }
-
- var result int
-
- defer func() {
- if err := teardown(); err != nil {
- fmt.Fprintf(os.Stderr, "teardown failed, %v", err)
- }
- if r := recover(); r != nil {
- fmt.Println("S3Manager integration test hit a panic,", r)
- result = 1
- }
- os.Exit(result)
- }()
-
- result = m.Run()
-}
-
-func setup() error {
- svc := s3.New(integration.Session)
-
- // Create a bucket for testing
- bucketName = aws.String(
- fmt.Sprintf("aws-sdk-go-integration-%d-%s", time.Now().Unix(), integration.UniqueID()))
-
- _, err := svc.CreateBucket(&s3.CreateBucketInput{Bucket: bucketName})
- if err != nil {
- return fmt.Errorf("failed to create bucket %q, %v", *bucketName, err)
- }
-
- err = svc.WaitUntilBucketExists(&s3.HeadBucketInput{Bucket: bucketName})
- if err != nil {
- return fmt.Errorf("failed to wait for bucket %q to exist, %v", bucketName, err)
- }
-
- return nil
-}
-
-// Delete the bucket
-func teardown() error {
- svc := s3.New(integration.Session)
-
- objs, err := svc.ListObjects(&s3.ListObjectsInput{Bucket: bucketName})
- if err != nil {
- return fmt.Errorf("failed to list bucket %q objects, %v", bucketName, err)
- }
-
- for _, o := range objs.Contents {
- svc.DeleteObject(&s3.DeleteObjectInput{Bucket: bucketName, Key: o.Key})
- }
-
- uploads, err := svc.ListMultipartUploads(&s3.ListMultipartUploadsInput{Bucket: bucketName})
- if err != nil {
- return fmt.Errorf("failed to list bucket %q multipart objects, %v", bucketName, err)
- }
-
- for _, u := range uploads.Uploads {
- svc.AbortMultipartUpload(&s3.AbortMultipartUploadInput{
- Bucket: bucketName,
- Key: u.Key,
- UploadId: u.UploadId,
- })
- }
-
- _, err = svc.DeleteBucket(&s3.DeleteBucketInput{Bucket: bucketName})
- if err != nil {
- return fmt.Errorf("failed to delete bucket %q, %v", bucketName, err)
- }
-
- return nil
-}
-
-type dlwriter struct {
- buf []byte
-}
-
-func newDLWriter(size int) *dlwriter {
- return &dlwriter{buf: make([]byte, size)}
-}
-
-func (d dlwriter) WriteAt(p []byte, pos int64) (n int, err error) {
- if pos > int64(len(d.buf)) {
- return 0, io.EOF
- }
-
- written := 0
- for i, b := range p {
- if i >= len(d.buf) {
- break
- }
- d.buf[pos+int64(i)] = b
- written++
- }
- return written, nil
-}
-
-func validate(t *testing.T, key string, md5value string) {
- mgr := s3manager.NewDownloader(integration.Session)
- params := &s3.GetObjectInput{Bucket: bucketName, Key: &key}
-
- w := newDLWriter(1024 * 1024 * 20)
- n, err := mgr.Download(w, params)
- if err != nil {
- t.Fatalf("expect no error, got %v", err)
- }
- if e, a := md5value, fmt.Sprintf("%x", md5.Sum(w.buf[0:n])); e != a {
- t.Errorf("expect %s md5 value, got %s", e, a)
- }
-}
-
-func TestUploadConcurrently(t *testing.T) {
- key := "12mb-1"
- mgr := s3manager.NewUploader(integration.Session)
- out, err := mgr.Upload(&s3manager.UploadInput{
- Bucket: bucketName,
- Key: &key,
- Body: bytes.NewReader(integBuf12MB),
- })
-
- if err != nil {
- t.Fatalf("expect no error, got %v", err)
- }
- if len(out.UploadID) == 0 {
- t.Errorf("expect upload ID but was empty")
- }
-
- re := regexp.MustCompile(`^https?://.+/` + key + `$`)
- if e, a := re.String(), out.Location; !re.MatchString(a) {
- t.Errorf("expect %s to match URL regexp %q, did not", e, a)
- }
-
- validate(t, key, integMD512MB)
-}
-
-func TestUploadFailCleanup(t *testing.T) {
- svc := s3.New(integration.Session)
-
- // Break checksum on 2nd part so it fails
- part := 0
- svc.Handlers.Build.PushBack(func(r *request.Request) {
- if r.Operation.Name == "UploadPart" {
- if part == 1 {
- r.HTTPRequest.Header.Set("X-Amz-Content-Sha256", "000")
- }
- part++
- }
- })
-
- key := "12mb-leave"
- mgr := s3manager.NewUploaderWithClient(svc, func(u *s3manager.Uploader) {
- u.LeavePartsOnError = false
- })
- _, err := mgr.Upload(&s3manager.UploadInput{
- Bucket: bucketName,
- Key: &key,
- Body: bytes.NewReader(integBuf12MB),
- })
- if err == nil {
- t.Fatalf("expect error, but did not get one")
- }
-
- aerr := err.(awserr.Error)
- if e, a := "MissingRegion", aerr.Code(); strings.Contains(a, e) {
- t.Errorf("expect %q to not be in error code %q", e, a)
- }
-
- uploadID := ""
- merr := err.(s3manager.MultiUploadFailure)
- if uploadID = merr.UploadID(); len(uploadID) == 0 {
- t.Errorf("expect upload ID to not be empty, but was")
- }
-
- _, err = svc.ListParts(&s3.ListPartsInput{
- Bucket: bucketName, Key: &key, UploadId: &uploadID,
- })
- if err == nil {
- t.Errorf("expect error for list parts, but got none")
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/stub.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/stub.go
deleted file mode 100644
index 9434ae9..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/s3manager/stub.go
+++ /dev/null
@@ -1 +0,0 @@
-package s3manager
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/stub.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/stub.go
deleted file mode 100644
index 3ed7f97..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/customizations/s3/stub.go
+++ /dev/null
@@ -1 +0,0 @@
-package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/integration.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/integration.go
deleted file mode 100644
index 88bcf16..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/integration.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// +build integration
-
-// Package integration performs initialization and validation for integration
-// tests.
-package integration
-
-import (
- "crypto/rand"
- "fmt"
- "io"
- "os"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
-)
-
-// Session is a shared session for all integration tests to use.
-var Session = session.Must(session.NewSession())
-
-func init() {
- logLevel := Session.Config.LogLevel
- if os.Getenv("DEBUG") != "" {
- logLevel = aws.LogLevel(aws.LogDebug)
- }
- if os.Getenv("DEBUG_SIGNING") != "" {
- logLevel = aws.LogLevel(aws.LogDebugWithSigning)
- }
- if os.Getenv("DEBUG_BODY") != "" {
- logLevel = aws.LogLevel(aws.LogDebugWithSigning | aws.LogDebugWithHTTPBody)
- }
- Session.Config.LogLevel = logLevel
-
- if aws.StringValue(Session.Config.Region) == "" {
- panic("AWS_REGION must be configured to run integration tests")
- }
-}
-
-// UniqueID returns a unique UUID-like identifier for use in generating
-// resources for integration tests.
-func UniqueID() string {
- uuid := make([]byte, 16)
- io.ReadFull(rand.Reader, uuid)
- return fmt.Sprintf("%x", uuid)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/acm.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/acm.feature
deleted file mode 100644
index dc28b55..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/acm.feature
+++ /dev/null
@@ -1,14 +0,0 @@
-#language en
-@acm @client
-Feature: AWS Certificate Manager
-
- Scenario: Making a request
- When I call the "ListCertificates" API
- Then the request should be successful
-
- Scenario: Handling errors
- When I attempt to call the "GetCertificate" API with:
- | CertificateArn | arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 |
- Then I expect the response error code to be "ResourceNotFoundException"
- And I expect the response error message not be empty
-
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/client.go
deleted file mode 100644
index fdb6438..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/acm/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package acm provides gucumber integration tests support.
-package acm
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/acm"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@acm", func() {
- gucumber.World["client"] = acm.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/apigateway.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/apigateway.feature
deleted file mode 100644
index 4286b81..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/apigateway.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@apigateway @client
-Feature: Amazon API Gateway
-
- Scenario: Making a request
- When I call the "GetAccountRequest" API
- Then the request should be successful
-
- Scenario: Handing errors
- When I attempt to call the "GetRestApi" API with:
- | RestApiId | api123 |
- Then I expect the response error code to be "NotFoundException"
- And I expect the response error message to include:
- """
- Invalid REST API identifier specified
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/client.go
deleted file mode 100644
index 10ee2de..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/apigateway/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package apigateway provides gucumber integration tests support.
-package apigateway
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/apigateway"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@apigateway", func() {
- gucumber.World["client"] = apigateway.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/applicationdiscoveryservice.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/applicationdiscoveryservice.feature
deleted file mode 100644
index 02ae287..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/applicationdiscoveryservice.feature
+++ /dev/null
@@ -1,8 +0,0 @@
-#language en
-@applicationdiscoveryservice @client
-Feature: AWS Application Discovery Service
-
- Scenario: Making a request
- When I call the "DescribeAgents" API
- Then the request should be successful
-
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/client.go
deleted file mode 100644
index 85a4dab..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/applicationdiscoveryservice/client.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build integration
-
-//Package applicationdiscoveryservice provides gucumber integration tests support.
-package applicationdiscoveryservice
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/applicationdiscoveryservice"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@applicationdiscoveryservice", func() {
- gucumber.World["client"] = applicationdiscoveryservice.New(
- smoke.Session, &aws.Config{Region: aws.String("us-west-2")},
- )
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/autoscaling.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/autoscaling.feature
deleted file mode 100644
index 7c2bdf6..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/autoscaling.feature
+++ /dev/null
@@ -1,18 +0,0 @@
-# language: en
-@autoscaling @client
-Feature: Auto Scaling
-
- Scenario: Making a request
- When I call the "DescribeScalingProcessTypes" API
- Then the value at "Processes" should be a list
-
- Scenario: Handing errors
- When I attempt to call the "CreateLaunchConfiguration" API with:
- | LaunchConfigurationName | |
- | ImageId | ami-12345678 |
- | InstanceType | m1.small |
- Then I expect the response error code to be "InvalidParameter"
- And I expect the response error message to include:
- """
- LaunchConfigurationName
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/client.go
deleted file mode 100644
index 55c68d1..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/autoscaling/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package autoscaling provides gucumber integration tests support.
-package autoscaling
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/autoscaling"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@autoscaling", func() {
- gucumber.World["client"] = autoscaling.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/client.go
deleted file mode 100644
index 079fde7..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package cloudformation provides gucumber integration tests support.
-package cloudformation
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/cloudformation"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@cloudformation", func() {
- gucumber.World["client"] = cloudformation.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/cloudformation.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/cloudformation.feature
deleted file mode 100644
index 3eafaf6..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudformation/cloudformation.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-# language: en
-@cloudformation @client
-Feature: AWS CloudFormation
-
- Scenario: Making a request
- When I call the "ListStacks" API
- Then the value at "StackSummaries" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "CreateStack" API with:
- | StackName | fakestack |
- | TemplateURL | http://s3.amazonaws.com/foo/bar |
- Then I expect the response error code to be "ValidationError"
- And I expect the response error message to include:
- """
- TemplateURL must reference a valid S3 object to which you have access.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/client.go
deleted file mode 100644
index c958362..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package cloudfront provides gucumber integration tests support.
-package cloudfront
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/cloudfront"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@cloudfront", func() {
- gucumber.World["client"] = cloudfront.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/cloudfront.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/cloudfront.feature
deleted file mode 100644
index bbb2a8d..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudfront/cloudfront.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-# language: en
-@cloudfront @client
-Feature: Amazon CloudFront
-
- Scenario: Making a basic request
- When I call the "ListDistributions" API with:
- | MaxItems | 1 |
- Then the value at "DistributionList.Items" should be a list
-
- Scenario: Error handling
- When I attempt to call the "GetDistribution" API with:
- | Id | fake-id |
- Then I expect the response error code to be "NoSuchDistribution"
- And I expect the response error message to include:
- """
- The specified distribution does not exist.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/client.go
deleted file mode 100644
index 23f24be..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package cloudhsm provides gucumber integration tests support.
-package cloudhsm
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/cloudhsm"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@cloudhsm", func() {
- gucumber.World["client"] = cloudhsm.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/cloudhsm.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/cloudhsm.feature
deleted file mode 100644
index 545ca4e..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudhsm/cloudhsm.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@cloudhsm @client
-Feature: Amazon CloudHSM
-
- Scenario: Making a request
- When I call the "ListHapgs" API
- Then the value at "HapgList" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeHapg" API with:
- | HapgArn | bogus-arn |
- Then I expect the response error code to be "ValidationException"
- And I expect the response error message to include:
- """
- Value 'bogus-arn' at 'hapgArn' failed to satisfy constraint
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/client.go
deleted file mode 100644
index c346b28..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package cloudsearch provides gucumber integration tests support.
-package cloudsearch
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/cloudsearch"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@cloudsearch", func() {
- gucumber.World["client"] = cloudsearch.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/cloudsearch.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/cloudsearch.feature
deleted file mode 100644
index 160e916..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudsearch/cloudsearch.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@cloudsearch @client
-Feature: Amazon CloudSearch
-
- Scenario: Making a request
- When I call the "DescribeDomains" API
- Then the response should contain a "DomainStatusList"
-
- Scenario: Handling errors
- When I attempt to call the "DescribeIndexFields" API with:
- | DomainName | fakedomain |
- Then I expect the response error code to be "ResourceNotFound"
- And I expect the response error message to include:
- """
- Domain not found: fakedomain
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/client.go
deleted file mode 100644
index 97c7bfa..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package cloudtrail provides gucumber integration tests support.
-package cloudtrail
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/cloudtrail"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@cloudtrail", func() {
- gucumber.World["client"] = cloudtrail.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/cloudtrail.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/cloudtrail.feature
deleted file mode 100644
index 817ab5c..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudtrail/cloudtrail.feature
+++ /dev/null
@@ -1,12 +0,0 @@
-# language: en
-@cloudtrail @client
-Feature: AWS CloudTrail
-
- Scenario: Making a request
- When I call the "DescribeTrails" API
- Then the request should be successful
-
- Scenario: Handling errors
- When I attempt to call the "DeleteTrail" API with:
- | Name | faketrail |
- Then I expect the response error code to be "TrailNotFoundException"
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/client.go
deleted file mode 100644
index ebc339d..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package cloudwatch provides gucumber integration tests support.
-package cloudwatch
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/cloudwatch"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@cloudwatch", func() {
- gucumber.World["client"] = cloudwatch.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/cloudwatch.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/cloudwatch.feature
deleted file mode 100644
index 84307ef..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatch/cloudwatch.feature
+++ /dev/null
@@ -1,19 +0,0 @@
-# language: en
-@cloudwatch @monitoring @client
-Feature: Amazon CloudWatch
-
- Scenario: Making a request
- When I call the "ListMetrics" API with:
- | Namespace | AWS/EC2 |
- Then the value at "Metrics" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "SetAlarmState" API with:
- | AlarmName | abc |
- | StateValue | mno |
- | StateReason | xyz |
- Then I expect the response error code to be "ValidationError"
- And I expect the response error message to include:
- """
- failed to satisfy constraint
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/client.go
deleted file mode 100644
index 75fa2c5..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package cloudwatchlogs provides gucumber integration tests support.
-package cloudwatchlogs
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/cloudwatchlogs"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@cloudwatchlogs", func() {
- gucumber.World["client"] = cloudwatchlogs.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/cloudwatchlogs.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/cloudwatchlogs.feature
deleted file mode 100644
index 5711c4e..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cloudwatchlogs/cloudwatchlogs.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-# language: en
-@cloudwatchlogs @logs
-Feature: Amazon CloudWatch Logs
-
- Scenario: Making a request
- When I call the "DescribeLogGroups" API
- Then the value at "logGroups" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetLogEvents" API with:
- | logGroupName | fakegroup |
- | logStreamName | fakestream |
- Then I expect the response error code to be "ResourceNotFoundException"
- And I expect the response error message to include:
- """
- The specified log group does not exist.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/client.go
deleted file mode 100644
index 2f9da34..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package codecommit provides gucumber integration tests support.
-package codecommit
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/codecommit"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@codecommit", func() {
- gucumber.World["client"] = codecommit.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/codecommit.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/codecommit.feature
deleted file mode 100644
index c5c0190..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codecommit/codecommit.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@codecommit @client
-Feature: Amazon CodeCommit
-
- Scenario: Making a request
- When I call the "ListRepositories" API
- Then the value at "repositories" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "ListBranches" API with:
- | repositoryName | fake-repo |
- Then I expect the response error code to be "RepositoryDoesNotExistException"
- And I expect the response error message to include:
- """
- fake-repo does not exist
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/client.go
deleted file mode 100644
index 29587b9..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package codedeploy provides gucumber integration tests support.
-package codedeploy
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/codedeploy"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@codedeploy", func() {
- gucumber.World["client"] = codedeploy.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/codedeploy.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/codedeploy.feature
deleted file mode 100644
index 45dfd2f..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codedeploy/codedeploy.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@codedeploy @client
-Feature: Amazon CodeDeploy
-
- Scenario: Making a request
- When I call the "ListApplications" API
- Then the value at "applications" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetDeployment" API with:
- | deploymentId | d-USUAELQEX |
- Then I expect the response error code to be "DeploymentDoesNotExistException"
- And I expect the response error message to include:
- """
- The deployment d-USUAELQEX could not be found
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/client.go
deleted file mode 100644
index edc34f6..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package codepipeline provides gucumber integration tests support.
-package codepipeline
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/codepipeline"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@codepipeline", func() {
- gucumber.World["client"] = codepipeline.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/codepipeline.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/codepipeline.feature
deleted file mode 100644
index cb962cc..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/codepipeline/codepipeline.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@codepipeline @client
-Feature: Amazon CodePipeline
-
- Scenario: Making a request
- When I call the "ListPipelines" API
- Then the value at "pipelines" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetPipeline" API with:
- | name | fake-pipeline |
- Then I expect the response error code to be "PipelineNotFoundException"
- And I expect the response error message to include:
- """
- does not have a pipeline with name 'fake-pipeline'
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/client.go
deleted file mode 100644
index 476169f..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package cognitoidentity provides gucumber integration tests support.
-package cognitoidentity
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/cognitoidentity"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@cognitoidentity", func() {
- gucumber.World["client"] = cognitoidentity.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/cognitoidentity.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/cognitoidentity.feature
deleted file mode 100644
index 12abcc8..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitoidentity/cognitoidentity.feature
+++ /dev/null
@@ -1,19 +0,0 @@
-# language: en
-@cognitoidentity @client
-Feature: Amazon Cognito Idenity
-
- Scenario: Making a request
- When I call the "ListIdentityPools" API with JSON:
- """
- {"MaxResults": 10}
- """
- Then the value at "IdentityPools" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeIdentityPool" API with:
- | IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
- Then I expect the response error code to be "ResourceNotFoundException"
- And I expect the response error message to include:
- """
- IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/client.go
deleted file mode 100644
index 585e47c..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package cognitosync provides gucumber integration tests support.
-package cognitosync
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/cognitosync"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@cognitosync", func() {
- gucumber.World["client"] = cognitosync.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/cognitosync.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/cognitosync.feature
deleted file mode 100644
index 3cdf84e..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/cognitosync/cognitosync.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@cognitosync @client
-Feature: Amazon Cognito Sync
-
- Scenario: Making a request
- When I call the "ListIdentityPoolUsage" API
- Then the value at "IdentityPoolUsages" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeIdentityPoolUsage" API with:
- | IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
- Then I expect the response error code to be "ResourceNotFoundException"
- And I expect the response error message to include:
- """
- IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/client.go
deleted file mode 100644
index fed6229..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package configservice provides gucumber integration tests support.
-package configservice
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/configservice"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@configservice", func() {
- gucumber.World["client"] = configservice.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/configservice.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/configservice.feature
deleted file mode 100644
index ccc3af6..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/configservice/configservice.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-# language: en
-@configservice @config @client
-Feature: AWS Config
-
- Scenario: Making a request
- When I call the "DescribeConfigurationRecorders" API
- Then the value at "ConfigurationRecorders" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetResourceConfigHistory" API with:
- | resourceType | fake-type |
- | resourceId | fake-id |
- Then I expect the response error code to be "ValidationException"
- And I expect the response error message to include:
- """
- failed to satisfy constraint
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/client.go
deleted file mode 100644
index 10bb6f1..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package datapipeline provides gucumber integration tests support.
-package datapipeline
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/datapipeline"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@datapipeline", func() {
- gucumber.World["client"] = datapipeline.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/datapipeline.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/datapipeline.feature
deleted file mode 100644
index db31518..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/datapipeline/datapipeline.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@datapipeline @client
-Feature: AWS Data Pipeline
-
- Scenario: Making a request
- When I call the "ListPipelines" API
- Then the response should contain a "pipelineIdList"
-
- Scenario: Handling errors
- When I attempt to call the "GetPipelineDefinition" API with:
- | pipelineId | fake-id |
- Then I expect the response error code to be "PipelineNotFoundException"
- And I expect the response error message to include:
- """
- does not exist
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/client.go
deleted file mode 100644
index f1bcbf7..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/client.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build integration
-
-//Package devicefarm provides gucumber integration tests support.
-package devicefarm
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/devicefarm"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@devicefarm", func() {
- // FIXME remove custom region
- gucumber.World["client"] = devicefarm.New(smoke.Session,
- aws.NewConfig().WithRegion("us-west-2"))
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/devicefarm.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/devicefarm.feature
deleted file mode 100644
index 1d200a9..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/devicefarm/devicefarm.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@devicefarm @client
-Feature: AWS Device Farm
-
- Scenario: Making a request
- When I call the "ListDevices" API
- Then the value at "devices" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetDevice" API with:
- | arn | arn:aws:devicefarm:us-west-2::device:000000000000000000000000fake-arn |
- Then I expect the response error code to be "NotFoundException"
- And I expect the response error message to include:
- """
- No device was found for arn
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/client.go
deleted file mode 100644
index c86e5d8..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package directconnect provides gucumber integration tests support.
-package directconnect
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/directconnect"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@directconnect", func() {
- gucumber.World["client"] = directconnect.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/directconnect.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/directconnect.feature
deleted file mode 100644
index 3efd9c7..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directconnect/directconnect.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@directconnect @client
-Feature: AWS Direct Connect
-
- Scenario: Making a request
- When I call the "DescribeConnections" API
- Then the value at "connections" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeConnections" API with:
- | connectionId | fake-connection |
- Then I expect the response error code to be "DirectConnectClientException"
- And I expect the response error message to include:
- """
- Connection ID fake-connection has an invalid format
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/client.go
deleted file mode 100644
index ae2fbba..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package directoryservice provides gucumber integration tests support.
-package directoryservice
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/directoryservice"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@directoryservice", func() {
- gucumber.World["client"] = directoryservice.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/directoryservice.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/directoryservice.feature
deleted file mode 100644
index 315839b..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/directoryservice/directoryservice.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-# language: en
-@directoryservice @ds @client
-Feature: AWS Directory Service
-
- I want to use AWS Directory Service
-
- Scenario: Making a request
- When I call the "DescribeDirectories" API
- Then the value at "DirectoryDescriptions" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "CreateDirectory" API with:
- | Name | |
- | Password | |
- | Size | |
- Then I expect the response error code to be "ValidationException"
-
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/client.go
deleted file mode 100644
index 5e3d3fb..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package dynamodb provides gucumber integration tests support.
-package dynamodb
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/dynamodb"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@dynamodb", func() {
- gucumber.World["client"] = dynamodb.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/dynamodb.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/dynamodb.feature
deleted file mode 100644
index 1df6b3c..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodb/dynamodb.feature
+++ /dev/null
@@ -1,19 +0,0 @@
-# language: en
-@dynamodb @client
-Feature: Amazon DynamoDB
-
- Scenario: Making a request
- When I call the "ListTables" API with JSON:
- """
- {"Limit": 1}
- """
- Then the value at "TableNames" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeTable" API with:
- | TableName | fake-table |
- Then I expect the response error code to be "ResourceNotFoundException"
- And I expect the response error message to include:
- """
- Requested resource not found: Table: fake-table not found
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/client.go
deleted file mode 100644
index 64cedf2..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package dynamodbstreams provides gucumber integration tests support.
-package dynamodbstreams
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/dynamodbstreams"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@dynamodbstreams", func() {
- gucumber.World["client"] = dynamodbstreams.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/dynamodbstreams.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/dynamodbstreams.feature
deleted file mode 100644
index 6e35e29..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/dynamodbstreams/dynamodbstreams.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@dynamodbstreams @client
-Feature: Amazon DynamoDB Streams
-
- Scenario: Making a request
- When I call the "ListStreams" API
- Then the value at "Streams" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeStream" API with:
- | StreamArn | fake-stream |
- Then I expect the response error code to be "InvalidParameter"
- And I expect the response error message to include:
- """
- StreamArn
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/client.go
deleted file mode 100644
index 6820153..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package ec2 provides gucumber integration tests support.
-package ec2
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/ec2"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@ec2", func() {
- gucumber.World["client"] = ec2.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/ec2.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/ec2.feature
deleted file mode 100644
index e238c2c..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ec2/ec2.feature
+++ /dev/null
@@ -1,18 +0,0 @@
-# language: en
-@ec2 @client
-Feature: Amazon Elastic Compute Cloud
-
- Scenario: Making a request
- When I call the "DescribeRegions" API
- Then the value at "Regions" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeInstances" API with JSON:
- """
- {"InstanceIds": ["i-12345678"]}
- """
- Then I expect the response error code to be "InvalidInstanceID.NotFound"
- And I expect the response error message to include:
- """
- The instance ID 'i-12345678' does not exist
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/client.go
deleted file mode 100644
index 0db8224..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/client.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build integration
-
-//Package ecs provides gucumber integration tests support.
-package ecs
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/ecs"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@ecs", func() {
- // FIXME remove custom region
- gucumber.World["client"] = ecs.New(smoke.Session,
- aws.NewConfig().WithRegion("us-west-2"))
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/ecs.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/ecs.feature
deleted file mode 100644
index 6942137..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ecs/ecs.feature
+++ /dev/null
@@ -1,14 +0,0 @@
-# language: en
-@ecs @client
-Feature: Amazon ECS
-
- I want to use Amazon ECS
-
- Scenario: Making a request
- When I call the "ListClusters" API
- Then the value at "clusterArns" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "StopTask" API with:
- | task | xxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxx |
- Then the error code should be "ClusterNotFoundException"
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/client.go
deleted file mode 100644
index fba6a32..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/client.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build integration
-
-//Package efs provides gucumber integration tests support.
-package efs
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/efs"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@efs", func() {
- // FIXME remove custom region
- gucumber.World["client"] = efs.New(smoke.Session,
- aws.NewConfig().WithRegion("us-west-2"))
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/efs.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/efs.feature
deleted file mode 100644
index 113dd35..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/efs/efs.feature
+++ /dev/null
@@ -1,14 +0,0 @@
-# language: en
-@efs @elasticfilesystem @client
-Feature: Amazon Elastic File System
-
- I want to use Amazon Elastic File System
-
- Scenario: Making a request
- When I call the "DescribeFileSystems" API
- Then the value at "FileSystems" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DeleteFileSystem" API with:
- | FileSystemId | fake-id |
- Then the error code should be "BadRequest"
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/client.go
deleted file mode 100644
index 386237f..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package elasticache provides gucumber integration tests support.
-package elasticache
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/elasticache"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@elasticache", func() {
- gucumber.World["client"] = elasticache.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/elasticache.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/elasticache.feature
deleted file mode 100644
index 48828ca..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticache/elasticache.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@elasticache @client
-Feature: ElastiCache
-
- Scenario: Making a request
- When I call the "DescribeEvents" API
- Then the value at "Events" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeCacheClusters" API with:
- | CacheClusterId | fake_cluster |
- Then I expect the response error code to be "InvalidParameterValue"
- And I expect the response error message to include:
- """
- The parameter CacheClusterIdentifier is not a valid identifier.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/client.go
deleted file mode 100644
index 61cb2e1..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package elasticbeanstalk provides gucumber integration tests support.
-package elasticbeanstalk
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/elasticbeanstalk"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@elasticbeanstalk", func() {
- gucumber.World["client"] = elasticbeanstalk.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/elasticbeanstalk.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/elasticbeanstalk.feature
deleted file mode 100644
index 35b1ad8..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticbeanstalk/elasticbeanstalk.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@elasticbeanstalk @client
-Feature: AWS Elastic Beanstalk
-
- Scenario: Making a request
- When I call the "ListAvailableSolutionStacks" API
- Then the value at "SolutionStacks" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeEnvironmentResources" API with:
- | EnvironmentId | fake_environment |
- Then I expect the response error code to be "InvalidParameterValue"
- And I expect the response error message to include:
- """
- No Environment found for EnvironmentId = 'fake_environment'.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/client.go
deleted file mode 100644
index 6682a77..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package elasticloadbalancing provides gucumber integration tests support.
-package elasticloadbalancing
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/elb"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@elasticloadbalancing", func() {
- gucumber.World["client"] = elb.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/elasticloadbalancing.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/elasticloadbalancing.feature
deleted file mode 100644
index a8c7209..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elasticloadbalancing/elasticloadbalancing.feature
+++ /dev/null
@@ -1,18 +0,0 @@
-# language: en
-@elasticloadbalancing @client
-Feature: Elastic Load Balancing
-
- Scenario: Making a request
- When I call the "DescribeLoadBalancers" API
- Then the value at "LoadBalancerDescriptions" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeLoadBalancers" API with JSON:
- """
- {"LoadBalancerNames": ["fake_load_balancer"]}
- """
- Then I expect the response error code to be "ValidationError"
- And I expect the response error message to include:
- """
- LoadBalancer name cannot contain characters that are not letters, or digits or the dash.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/client.go
deleted file mode 100644
index 7e29b47..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package elastictranscoder provides gucumber integration tests support.
-package elastictranscoder
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/elastictranscoder"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@elastictranscoder", func() {
- gucumber.World["client"] = elastictranscoder.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/elastictranscoder.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/elastictranscoder.feature
deleted file mode 100644
index 77658e6..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/elastictranscoder/elastictranscoder.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@elastictranscoder @client
-Feature: Amazon Elastic Transcoder
-
- Scenario: Making a request
- When I call the "ListPresets" API
- Then the value at "Presets" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "ReadJob" API with:
- | Id | fake_job |
- Then I expect the response error code to be "ValidationException"
- And I expect the response error message to include:
- """
- Value 'fake_job' at 'id' failed to satisfy constraint
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/client.go
deleted file mode 100644
index 41295c7..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package emr provides gucumber integration tests support.
-package emr
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/emr"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@emr", func() {
- gucumber.World["client"] = emr.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/emr.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/emr.feature
deleted file mode 100644
index 133c174..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/emr/emr.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@emr @client @elasticmapreduce
-Feature: Amazon EMR
-
- Scenario: Making a request
- When I call the "ListClusters" API
- Then the value at "Clusters" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeCluster" API with:
- | ClusterId | fake_cluster |
- Then I expect the response error code to be "InvalidRequestException"
- And I expect the response error message to include:
- """
- Cluster id 'fake_cluster' is not valid.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/client.go
deleted file mode 100644
index 33e59c4..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package es provides gucumber integration tests support.
-package es
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/elasticsearchservice"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@es", func() {
- gucumber.World["client"] = elasticsearchservice.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/es.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/es.feature
deleted file mode 100644
index 8bd1f1e..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/es/es.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@es @elasticsearchservice
-Feature: Amazon ElasticsearchService
-
- Scenario: Making a request
- When I call the "ListDomainNames" API
- Then the value at "DomainNames" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeElasticsearchDomain" API with:
- | DomainName | not-a-domain |
- Then the error code should be "ResourceNotFoundException"
- And I expect the response error message to include:
- """
- Domain not found: not-a-domain
- """
\ No newline at end of file
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/client.go
deleted file mode 100644
index 26235ab..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package glacier provides gucumber integration tests support.
-package glacier
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/glacier"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@glacier", func() {
- gucumber.World["client"] = glacier.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/glacier.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/glacier.feature
deleted file mode 100644
index 0e1a113..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/glacier/glacier.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@glacier @client
-Feature: Amazon Glacier
-
- Scenario: Making a request
- When I call the "ListVaults" API
- Then the response should contain a "VaultList"
-
- Scenario: Handling errors
- When I attempt to call the "ListVaults" API with:
- | accountId | abcmnoxyz |
- Then I expect the response error code to be "UnrecognizedClientException"
- And I expect the response error message to include:
- """
- No account found for the given parameters
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/client.go
deleted file mode 100644
index d551c73..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package iam provides gucumber integration tests support.
-package iam
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/iam"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@iam", func() {
- gucumber.World["client"] = iam.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/iam.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/iam.feature
deleted file mode 100644
index 0da6463..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iam/iam.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@iam @client
-Feature: AWS Identity and Access Management
-
- Scenario: Making a request
- When I call the "ListUsers" API
- Then the value at "Users" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetUser" API with:
- | UserName | fake_user |
- Then I expect the response error code to be "NoSuchEntity"
- And I expect the response error message to include:
- """
- The user with name fake_user cannot be found.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/client.go
deleted file mode 100644
index 28f9067..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/client.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// +build integration
-
-//Package iotdataplane provides gucumber integration tests support.
-package iotdataplane
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/iot"
- "github.com/aws/aws-sdk-go/service/iotdataplane"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@iotdataplane", func() {
- svc := iot.New(smoke.Session)
- result, err := svc.DescribeEndpoint(&iot.DescribeEndpointInput{})
- if err != nil {
- gucumber.World["error"] = err
- return
- }
-
- fmt.Println("IOT Data endpoint:", *result.EndpointAddress)
- gucumber.World["client"] = iotdataplane.New(smoke.Session, aws.NewConfig().
- WithEndpoint(*result.EndpointAddress))
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/iotdataplane.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/iotdataplane.feature
deleted file mode 100644
index 515d9bb..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/iotdataplane/iotdataplane.feature
+++ /dev/null
@@ -1,9 +0,0 @@
-# language: en
-@iotdataplane @client
-
-Feature: AWS IoT Data Plane
-
- Scenario: Handling errors
- When I attempt to call the "GetThingShadow" API with:
- | thingName | fake-thing |
- Then I expect the response error code to be "ResourceNotFoundException"
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/client.go
deleted file mode 100644
index 5081bfe..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package kinesis provides gucumber integration tests support.
-package kinesis
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/kinesis"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@kinesis", func() {
- gucumber.World["client"] = kinesis.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/kinesis.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/kinesis.feature
deleted file mode 100644
index 570505c..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kinesis/kinesis.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@kinesis @client
-Feature: AWS Kinesis
-
- Scenario: Making a request
- When I call the "ListStreams" API
- Then the value at "StreamNames" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeStream" API with:
- | StreamName | bogus-stream-name |
- Then I expect the response error code to be "ResourceNotFoundException"
- And I expect the response error message to include:
- """
- Stream bogus-stream-name under account
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/client.go
deleted file mode 100644
index e9498b3..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package kms provides gucumber integration tests support.
-package kms
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/kms"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@kms", func() {
- gucumber.World["client"] = kms.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/kms.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/kms.feature
deleted file mode 100644
index ee428ab..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/kms/kms.feature
+++ /dev/null
@@ -1,13 +0,0 @@
-# language: en
-@kms @client
-Feature: Amazon Key Management Service
-
- Scenario: Making a request
- When I call the "ListAliases" API
- Then the value at "Aliases" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetKeyPolicy" API with:
- | KeyId | fake-key |
- | PolicyName | fakepolicy |
- Then I expect the response error code to be "NotFoundException"
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/client.go
deleted file mode 100644
index 257bc26..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package lambda provides gucumber integration tests support.
-package lambda
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/lambda"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@lambda", func() {
- gucumber.World["client"] = lambda.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/lambda.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/lambda.feature
deleted file mode 100644
index 6ff9cf4..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/lambda/lambda.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@lambda @client
-Feature: Amazon Lambda
-
- Scenario: Making a request
- When I call the "ListFunctions" API
- Then the value at "Functions" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "Invoke" API with:
- | FunctionName | bogus-function |
- Then I expect the response error code to be "ResourceNotFoundException"
- And I expect the response error message to include:
- """
- Function not found
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/client.go
deleted file mode 100644
index a8ba24c..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package machinelearning provides gucumber integration tests support.
-package machinelearning
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/machinelearning"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@machinelearning", func() {
- gucumber.World["client"] = machinelearning.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/machinelearning.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/machinelearning.feature
deleted file mode 100644
index 2d9b064..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/machinelearning/machinelearning.feature
+++ /dev/null
@@ -1,18 +0,0 @@
-# language: en
-@machinelearning @client
-Feature: Amazon Machine Learning
-
- I want to use Amazon Machine Learning
-
- Scenario: Making a request
- When I call the "DescribeMLModels" API
- Then the value at "Results" should be a list
-
- Scenario: Error handling
- When I attempt to call the "GetBatchPrediction" API with:
- | BatchPredictionId | fake-id |
- Then the error code should be "ResourceNotFoundException"
- And the error message should contain:
- """
- No BatchPrediction with id fake-id exists
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/client.go
deleted file mode 100644
index 8f3f537..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package opsworks provides gucumber integration tests support.
-package opsworks
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/opsworks"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@opsworks", func() {
- gucumber.World["client"] = opsworks.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/opsworks.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/opsworks.feature
deleted file mode 100644
index a9cfe52..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/opsworks/opsworks.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@opsworks @client
-Feature: AWS OpsWorks
-
- Scenario: Making a request
- When I call the "DescribeStacks" API
- Then the value at "Stacks" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeLayers" API with:
- | StackId | fake_stack |
- Then I expect the response error code to be "ResourceNotFoundException"
- And I expect the response error message to include:
- """
- Unable to find stack with ID fake_stack
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/client.go
deleted file mode 100644
index a12c73b..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package rds provides gucumber integration tests support.
-package rds
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/rds"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@rds", func() {
- gucumber.World["client"] = rds.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/rds.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/rds.feature
deleted file mode 100644
index 547d76d..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/rds/rds.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@rds @client
-Feature: Amazon RDS
-
- Scenario: Making a request
- When I call the "DescribeDBEngineVersions" API
- Then the value at "DBEngineVersions" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeDBInstances" API with:
- | DBInstanceIdentifier | fake-id |
- Then I expect the response error code to be "DBInstanceNotFound"
- And I expect the response error message to include:
- """
- DBInstance fake-id not found.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/client.go
deleted file mode 100644
index 9e6da95..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package redshift provides gucumber integration tests support.
-package redshift
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/redshift"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@redshift", func() {
- gucumber.World["client"] = redshift.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/redshift.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/redshift.feature
deleted file mode 100644
index 8cb45b1..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/redshift/redshift.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@redshift @client
-Feature: Amazon Redshift
-
- Scenario: Making a request
- When I call the "DescribeClusterVersions" API
- Then the value at "ClusterVersions" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeClusters" API with:
- | ClusterIdentifier | fake-cluster |
- Then I expect the response error code to be "ClusterNotFound"
- And I expect the response error message to include:
- """
- Cluster fake-cluster not found.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/client.go
deleted file mode 100644
index a55a14e..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package route53 provides gucumber integration tests support.
-package route53
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/route53"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@route53", func() {
- gucumber.World["client"] = route53.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/route53.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/route53.feature
deleted file mode 100644
index 51463c5..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53/route53.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@route53 @client
-Feature: Amazon Route 53
-
- Scenario: Making a request
- When I call the "ListHostedZones" API
- Then the value at "HostedZones" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetHostedZone" API with:
- | Id | fake-zone |
- Then I expect the response error code to be "NoSuchHostedZone"
- And I expect the response error message to include:
- """
- No hosted zone found with ID: fake-zone
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/client.go
deleted file mode 100644
index c47de45..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package route53domains provides gucumber integration tests support.
-package route53domains
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/route53domains"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@route53domains", func() {
- gucumber.World["client"] = route53domains.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/route53domains.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/route53domains.feature
deleted file mode 100644
index f18dcc4..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/route53domains/route53domains.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@route53domains @client
-Feature: Amazon Route53 Domains
-
- Scenario: Making a request
- When I call the "ListDomains" API
- Then the value at "Domains" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetDomainDetail" API with:
- | DomainName | fake-domain-name |
- Then I expect the response error code to be "InvalidInput"
- And I expect the response error message to include:
- """
- domain name must contain more than 1 label
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/client.go
deleted file mode 100644
index f81947a..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package ses provides gucumber integration tests support.
-package ses
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/ses"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@ses", func() {
- gucumber.World["client"] = ses.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/ses.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/ses.feature
deleted file mode 100644
index 6b67fa7..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ses/ses.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@ses @email @client
-Feature: Amazon Simple Email Service
-
- Scenario: Making a request
- When I call the "ListIdentities" API
- Then the value at "Identities" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "VerifyEmailIdentity" API with:
- | EmailAddress | fake_email |
- Then I expect the response error code to be "InvalidParameterValue"
- And I expect the response error message to include:
- """
- Invalid email address.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go
deleted file mode 100644
index dbb1338..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/shared.go
+++ /dev/null
@@ -1,230 +0,0 @@
-// +build integration
-
-// Package smoke contains shared step definitions that are used across integration tests
-package smoke
-
-import (
- "encoding/json"
- "fmt"
- "os"
- "reflect"
- "regexp"
- "strconv"
- "strings"
-
- "github.com/gucumber/gucumber"
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/session"
-)
-
-// Session is a shared session for all integration smoke tests to use.
-var Session = session.Must(session.NewSession())
-
-func init() {
- logLevel := Session.Config.LogLevel
- if os.Getenv("DEBUG") != "" {
- logLevel = aws.LogLevel(aws.LogDebug)
- }
- if os.Getenv("DEBUG_SIGNING") != "" {
- logLevel = aws.LogLevel(aws.LogDebugWithSigning)
- }
- if os.Getenv("DEBUG_BODY") != "" {
- logLevel = aws.LogLevel(aws.LogDebugWithHTTPBody)
- }
- Session.Config.LogLevel = logLevel
-
- gucumber.When(`^I call the "(.+?)" API$`, func(op string) {
- call(op, nil, false)
- })
-
- gucumber.When(`^I call the "(.+?)" API with:$`, func(op string, args [][]string) {
- call(op, args, false)
- })
-
- gucumber.Then(`^the value at "(.+?)" should be a list$`, func(member string) {
- vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member)
- assert.NotNil(gucumber.T, vals)
- })
-
- gucumber.Then(`^the response should contain a "(.+?)"$`, func(member string) {
- vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member)
- assert.NotEmpty(gucumber.T, vals)
- })
-
- gucumber.When(`^I attempt to call the "(.+?)" API with:$`, func(op string, args [][]string) {
- call(op, args, true)
- })
-
- gucumber.Then(`^I expect the response error code to be "(.+?)"$`, func(code string) {
- err, ok := gucumber.World["error"].(awserr.Error)
- assert.True(gucumber.T, ok, "no error returned")
- if ok {
- assert.Equal(gucumber.T, code, err.Code(), "Error: %v", err)
- }
- })
-
- gucumber.And(`^I expect the response error message to include:$`, func(data string) {
- err, ok := gucumber.World["error"].(awserr.Error)
- assert.True(gucumber.T, ok, "no error returned")
- if ok {
- assert.Contains(gucumber.T, err.Error(), data)
- }
- })
-
- gucumber.And(`^I expect the response error message to include one of:$`, func(table [][]string) {
- err, ok := gucumber.World["error"].(awserr.Error)
- assert.True(gucumber.T, ok, "no error returned")
- if ok {
- found := false
- for _, row := range table {
- if strings.Contains(err.Error(), row[0]) {
- found = true
- break
- }
- }
-
- assert.True(gucumber.T, found, fmt.Sprintf("no error messages matched: \"%s\"", err.Error()))
- }
- })
-
- gucumber.And(`^I expect the response error message not be empty$`, func() {
- err, ok := gucumber.World["error"].(awserr.Error)
- assert.True(gucumber.T, ok, "no error returned")
- assert.NotEmpty(gucumber.T, err.Message())
- })
-
- gucumber.When(`^I call the "(.+?)" API with JSON:$`, func(s1 string, data string) {
- callWithJSON(s1, data, false)
- })
-
- gucumber.When(`^I attempt to call the "(.+?)" API with JSON:$`, func(s1 string, data string) {
- callWithJSON(s1, data, true)
- })
-
- gucumber.Then(`^the error code should be "(.+?)"$`, func(s1 string) {
- err, ok := gucumber.World["error"].(awserr.Error)
- assert.True(gucumber.T, ok, "no error returned")
- assert.Equal(gucumber.T, s1, err.Code())
- })
-
- gucumber.And(`^the error message should contain:$`, func(data string) {
- err, ok := gucumber.World["error"].(awserr.Error)
- assert.True(gucumber.T, ok, "no error returned")
- assert.Contains(gucumber.T, err.Error(), data)
- })
-
- gucumber.Then(`^the request should fail$`, func() {
- err, ok := gucumber.World["error"].(awserr.Error)
- assert.True(gucumber.T, ok, "no error returned")
- assert.Error(gucumber.T, err)
- })
-
- gucumber.Then(`^the request should be successful$`, func() {
- err, ok := gucumber.World["error"].(awserr.Error)
- assert.False(gucumber.T, ok, "error returned")
- assert.NoError(gucumber.T, err)
- })
-}
-
-// findMethod finds the op operation on the v structure using a case-insensitive
-// lookup. Returns nil if no method is found.
-func findMethod(v reflect.Value, op string) *reflect.Value {
- t := v.Type()
- op = strings.ToLower(op)
- for i := 0; i < t.NumMethod(); i++ {
- name := t.Method(i).Name
- if strings.ToLower(name) == op {
- m := v.MethodByName(name)
- return &m
- }
- }
- return nil
-}
-
-// call calls an operation on gucumber.World["client"] by the name op using the args
-// table of arguments to set.
-func call(op string, args [][]string, allowError bool) {
- v := reflect.ValueOf(gucumber.World["client"])
- if m := findMethod(v, op); m != nil {
- t := m.Type()
- in := reflect.New(t.In(0).Elem())
- fillArgs(in, args)
-
- resps := m.Call([]reflect.Value{in})
- gucumber.World["response"] = resps[0].Interface()
- gucumber.World["error"] = resps[1].Interface()
-
- if !allowError {
- err, _ := gucumber.World["error"].(error)
- assert.NoError(gucumber.T, err)
- }
- } else {
- assert.Fail(gucumber.T, "failed to find operation "+op)
- }
-}
-
-// reIsNum is a regular expression matching a numeric input (integer)
-var reIsNum = regexp.MustCompile(`^\d+$`)
-
-// reIsArray is a regular expression matching a list
-var reIsArray = regexp.MustCompile(`^\['.*?'\]$`)
-var reArrayElem = regexp.MustCompile(`'(.+?)'`)
-
-// fillArgs fills arguments on the input structure using the args table of
-// arguments.
-func fillArgs(in reflect.Value, args [][]string) {
- if args == nil {
- return
- }
-
- for _, row := range args {
- path := row[0]
- var val interface{} = row[1]
- if reIsArray.MatchString(row[1]) {
- quotedStrs := reArrayElem.FindAllString(row[1], -1)
- strs := make([]*string, len(quotedStrs))
- for i, e := range quotedStrs {
- str := e[1 : len(e)-1]
- strs[i] = &str
- }
- val = strs
- } else if reIsNum.MatchString(row[1]) { // handle integer values
- num, err := strconv.ParseInt(row[1], 10, 64)
- if err == nil {
- val = num
- }
- }
- awsutil.SetValueAtPath(in.Interface(), path, val)
- }
-}
-
-func callWithJSON(op, j string, allowError bool) {
- v := reflect.ValueOf(gucumber.World["client"])
- if m := findMethod(v, op); m != nil {
- t := m.Type()
- in := reflect.New(t.In(0).Elem())
- fillJSON(in, j)
-
- resps := m.Call([]reflect.Value{in})
- gucumber.World["response"] = resps[0].Interface()
- gucumber.World["error"] = resps[1].Interface()
-
- if !allowError {
- err, _ := gucumber.World["error"].(error)
- assert.NoError(gucumber.T, err)
- }
- } else {
- assert.Fail(gucumber.T, "failed to find operation "+op)
- }
-}
-
-func fillJSON(in reflect.Value, j string) {
- d := json.NewDecoder(strings.NewReader(j))
- if err := d.Decode(in.Interface()); err != nil {
- panic(err)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/client.go
deleted file mode 100644
index e8d9ec2..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package simpledb provides gucumber integration tests support.
-package simpledb
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/simpledb"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@simpledb", func() {
- gucumber.World["client"] = simpledb.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/simpledb.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/simpledb.feature
deleted file mode 100644
index ddc03d8..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/simpledb/simpledb.feature
+++ /dev/null
@@ -1,24 +0,0 @@
-# language: en
-@simpledb @sdb
-Feature: Amazon SimpleDB
-
- I want to use Amazon SimpleDB
-
- Scenario: Making a request
- When I call the "CreateDomain" API with:
- | DomainName | sample-domain |
- Then the request should be successful
- And I call the "ListDomains" API
- Then the value at "DomainNames" should be a list
- And I call the "DeleteDomain" API with:
- | DomainName | sample-domain |
- Then the request should be successful
-
- Scenario: Handling errors
- When I attempt to call the "CreateDomain" API with:
- | DomainName | |
- Then I expect the response error code to be "InvalidParameterValue"
- And I expect the response error message to include:
- """
- DomainName is invalid
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/client.go
deleted file mode 100644
index cbf990c..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package sns provides gucumber integration tests support.
-package sns
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/sns"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@sns", func() {
- gucumber.World["client"] = sns.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/sns.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/sns.feature
deleted file mode 100644
index 76f6a16..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sns/sns.feature
+++ /dev/null
@@ -1,14 +0,0 @@
-# language: en
-@sns @client
-Feature: Amazon Simple Notification Service
-
- Scenario: Making a request
- When I call the "ListTopics" API
- Then the value at "Topics" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "Publish" API with:
- | Message | hello |
- | TopicArn | fake_topic |
- Then I expect the response error code to be "InvalidParameter"
- And I expect the response error message not be empty
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/client.go
deleted file mode 100644
index 884dbbd..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package sqs provides gucumber integration tests support.
-package sqs
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/sqs"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@sqs", func() {
- gucumber.World["client"] = sqs.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/sqs.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/sqs.feature
deleted file mode 100644
index 1413820..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sqs/sqs.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@sqs @client
-Feature: Amazon Simple Queue Service
-
- Scenario: Making a request
- When I call the "ListQueues" API
- Then the value at "QueueUrls" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetQueueUrl" API with:
- | QueueName | fake_queue |
- Then I expect the response error code to be "AWS.SimpleQueueService.NonExistentQueue"
- And I expect the response error message to include:
- """
- The specified queue does not exist for this wsdl version.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/client.go
deleted file mode 100644
index af5e2aa..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package ssm provides gucumber integration tests support.
-package ssm
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/ssm"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@ssm", func() {
- gucumber.World["client"] = ssm.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/ssm.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/ssm.feature
deleted file mode 100644
index 3e2230e..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/ssm/ssm.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@ssm @client
-Feature: Amazon SSM
-
- Scenario: Making a request
- When I call the "ListDocuments" API
- Then the value at "DocumentIdentifiers" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "GetDocument" API with:
- | Name | 'fake-name' |
- Then I expect the response error code to be "ValidationException"
- And I expect the response error message to include:
- """
- validation error detected
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/client.go
deleted file mode 100644
index 44d3731..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package storagegateway provides gucumber integration tests support.
-package storagegateway
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/storagegateway"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@storagegateway", func() {
- gucumber.World["client"] = storagegateway.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/storagegateway.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/storagegateway.feature
deleted file mode 100644
index ef96eed..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/storagegateway/storagegateway.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-# language: en
-@storagegateway @client
-Feature: AWS Storage Gateway
-
- Scenario: Making a request
- When I call the "ListGateways" API
- Then the value at "Gateways" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "ListVolumes" API with:
- | GatewayARN | fake_gateway |
- Then I expect the response error code to be "InvalidParameter"
- And I expect the response error message to include:
- """
- GatewayARN
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/client.go
deleted file mode 100644
index ed61e1b..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package sts provides gucumber integration tests support.
-package sts
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/sts"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@sts", func() {
- gucumber.World["client"] = sts.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/sts.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/sts.feature
deleted file mode 100644
index 9caf1fa..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/sts/sts.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-# language: en
-@sts @client
-Feature: AWS STS
-
- Scenario: Making a request
- When I call the "GetSessionToken" API
- Then the response should contain a "Credentials"
-
- Scenario: Handling errors
- When I attempt to call the "GetFederationToken" API with:
- | Name | temp |
- | Policy | |
- Then I expect the response error code to be "InvalidParameter"
- And I expect the response error message to include:
- """
- Policy
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/client.go
deleted file mode 100644
index 9322d57..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package support provides gucumber integration tests support.
-package support
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/support"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@support", func() {
- gucumber.World["client"] = support.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/support.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/support.feature
deleted file mode 100644
index 2f91ff8..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/support/support.feature
+++ /dev/null
@@ -1,22 +0,0 @@
-# language: en
-@support @client
-Feature: AWS Support
-
- I want to use AWS Support
-
- Scenario: Making a request
- When I call the "DescribeServices" API
- Then the value at "services" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "CreateCase" API with:
- | subject | subject |
- | communicationBody | communication |
- | categoryCode | category |
- | serviceCode | amazon-dynamodb |
- | severityCode | low |
- Then I expect the response error code to be "InvalidParameterValueException"
- And the error message should contain:
- """
- Invalid category code
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/client.go
deleted file mode 100644
index 09020a2..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package swf provides gucumber integration tests support.
-package swf
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/swf"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@swf", func() {
- gucumber.World["client"] = swf.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/swf.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/swf.feature
deleted file mode 100644
index 1349c81..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/swf/swf.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-# language: en
-@swf @client
-Feature: Amazon Simple Workflow Service
-
- Scenario: Making a request
- When I call the "ListDomains" API with:
- | registrationStatus | REGISTERED |
- Then the value at "domainInfos" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeDomain" API with:
- | name | fake_domain |
- Then I expect the response error code to be "UnknownResourceFault"
- And I expect the response error message to include:
- """
- Unknown domain: fake_domain
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/client.go
deleted file mode 100644
index 898f848..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package waf provides gucumber integration tests support.
-package waf
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/waf"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@waf", func() {
- gucumber.World["client"] = waf.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/waf.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/waf.feature
deleted file mode 100644
index bf76fb6..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/waf/waf.feature
+++ /dev/null
@@ -1,20 +0,0 @@
-# language: en
-@waf
-Feature: AWS WAF
-
- Scenario: Making a request
- When I call the "ListRules" API with JSON:
- """
- {"Limit":20}
- """
- Then the value at "Rules" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "CreateSqlInjectionMatchSet" API with:
- | Name | fake_name |
- | ChangeToken | fake_token |
- Then I expect the response error code to be "WAFStaleDataException"
- And I expect the response error message to include:
- """
- The input token is no longer current
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/client.go
deleted file mode 100644
index 320fb1a..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/client.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// +build integration
-
-//Package workspaces provides gucumber integration tests support.
-package workspaces
-
-import (
- "github.com/aws/aws-sdk-go/awstesting/integration/smoke"
- "github.com/aws/aws-sdk-go/service/workspaces"
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@workspaces", func() {
- gucumber.World["client"] = workspaces.New(smoke.Session)
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/workspaces.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/workspaces.feature
deleted file mode 100644
index 09ca884..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/integration/smoke/workspaces/workspaces.feature
+++ /dev/null
@@ -1,18 +0,0 @@
-# language: en
-@workspaces @client
-Feature: Amazon WorkSpaces
-
- I want to use Amazon WorkSpaces
-
- Scenario: Making a request
- When I call the "DescribeWorkspaces" API
- Then the value at "Workspaces" should be a list
-
- Scenario: Handling errors
- When I attempt to call the "DescribeWorkspaces" API with:
- | DirectoryId | fake-id |
- Then I expect the response error code to be "ValidationException"
- And I expect the response error message to include:
- """
- The Directory ID fake-id in the request is invalid.
- """
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/mock/mock.go b/vendor/github.com/aws/aws-sdk-go/awstesting/mock/mock.go
deleted file mode 100644
index 1bc9290..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/mock/mock.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package mock
-
-import (
- "net/http"
- "net/http/httptest"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/session"
-)
-
-// Session is a mock session which is used to hit the mock server
-var Session = func() *session.Session {
- // server is the mock server that simply writes a 200 status back to the client
- server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- w.WriteHeader(http.StatusOK)
- }))
-
- return session.Must(session.NewSession(&aws.Config{
- DisableSSL: aws.Bool(true),
- Endpoint: aws.String(server.URL),
- }))
-}()
-
-// NewMockClient creates and initializes a client that will connect to the
-// mock server
-func NewMockClient(cfgs ...*aws.Config) *client.Client {
- c := Session.ClientConfig("Mock", cfgs...)
-
- svc := client.New(
- *c.Config,
- metadata.ClientInfo{
- ServiceName: "Mock",
- SigningRegion: c.SigningRegion,
- Endpoint: c.Endpoint,
- APIVersion: "2015-12-08",
- JSONVersion: "1.1",
- TargetPrefix: "MockServer",
- },
- c.Handlers,
- )
-
- return svc
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/benchmarks.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/benchmarks.go
deleted file mode 100644
index de13658..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/benchmarks.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// +build integration
-
-package performance
-
-import (
- "errors"
- "fmt"
- "os"
- "reflect"
- "runtime"
- "strings"
- "testing"
-
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/awstesting/mock"
- "github.com/gucumber/gucumber"
-)
-
-// mapCreateClients allows for the creation of clients
-func mapCreateClients() {
- clientFns := []func(){}
- for _, c := range clients {
- clientFns = append(clientFns, func() { c.Call([]reflect.Value{reflect.ValueOf(mock.Session)}) })
- }
-
- gucumber.World["services"] = clientFns
-}
-
-func buildAnArrayOfClients() {
- methods := []reflect.Value{}
- params := [][]reflect.Value{}
-
- for _, c := range clients {
- method, param, err := findAndGetMethod(c.Call([]reflect.Value{reflect.ValueOf(mock.Session)}))
- if err == nil {
- methods = append(methods, method)
- params = append(params, param)
- }
- }
-
- fns := []func(){}
- for i := 0; i < len(methods); i++ {
- m := methods[i]
- p := params[i]
- f := func() {
- reqs := m.Call(p)
- resp := reqs[0].Interface().(*request.Request).Send()
- fmt.Println(resp)
- }
- fns = append(fns, f)
- }
- gucumber.World["clientFns"] = fns
-}
-
-// findAndGetMethod will grab the method, params to be passed to the method, and an error.
-// The method that is found, is a method that doesn't have any required input
-func findAndGetMethod(client interface{}) (reflect.Value, []reflect.Value, error) {
- v := reflect.ValueOf(client).Type()
- n := v.NumMethod()
-
-outer:
- for i := 0; i < n; i++ {
- method := v.Method(i)
- if method.Type.NumIn() != 2 || strings.HasSuffix(method.Name, "Request") {
- continue
- }
- param := reflect.New(method.Type.In(1).Elem())
- for j := 0; j < param.Elem().NumField(); j++ {
- field := param.Elem().Type().Field(j)
- req := field.Tag.Get("required")
-
- if req == "true" {
- continue outer
- }
- }
-
- params := []reflect.Value{reflect.ValueOf(client), param}
- return method.Func, params, nil
- }
-
- return reflect.Value{}, nil, errors.New("No method found")
-}
-
-// benchmarkTask takes a unique key to write to the logger with the benchmark
-// result's data
-func benchmarkTask(key string, fns []func(), i1 int) error {
- gucumber.World["error"] = nil
- memStatStart := &runtime.MemStats{}
- runtime.ReadMemStats(memStatStart)
-
- results := testing.Benchmark(func(b *testing.B) {
- for _, f := range fns {
- for i := 0; i < i1; i++ {
- f()
- }
- }
- })
-
- results.N = i1
- memStatEnd := &runtime.MemStats{}
- runtime.ReadMemStats(memStatEnd)
- l, err := newBenchmarkLogger("stdout")
- if err != nil {
- return err
- }
- l.log(key, results)
-
- toDynamodb := os.Getenv("AWS_TESTING_LOG_RESULTS") == "true"
- if toDynamodb {
- l, err := newBenchmarkLogger("dynamodb")
- if err != nil {
- return err
- }
- l.log(key+"_start_benchmarks", memStatStart)
- l.log(key+"_end_benchmarks", memStatEnd)
- }
-
- if memStatStart.Alloc < memStatEnd.Alloc {
- return errors.New("Leaked memory")
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/client.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/client.go
deleted file mode 100644
index 00c2e81..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/client.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build integration
-
-//Package performance provides gucumber integration tests support.
-package performance
-
-import (
- "github.com/gucumber/gucumber"
-)
-
-func init() {
- gucumber.Before("@performance", func() {
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.feature
deleted file mode 100644
index c248329..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.feature
+++ /dev/null
@@ -1,17 +0,0 @@
-# language: en
-@performance @clients
-Feature: Client Performance
- Background:
- Given I have loaded my SDK and its dependencies
- And I have a list of services
- And I take a snapshot of my resources
-
- Scenario: Creating and then cleaning up clients doesn't leak resources
- When I create and discard 100 clients for each service
- Then I should not have leaked any resources
-
- Scenario: Sending requests doesn't leak resources
- When I create a client for each service
- And I execute 100 command(s) on each client
- And I destroy all the clients
- Then I should not have leaked any resources
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.go
deleted file mode 100644
index 6baa444..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/clients.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// +build integration
-
-package performance
-
-import (
- "reflect"
-
- "github.com/aws/aws-sdk-go/service/acm"
- "github.com/aws/aws-sdk-go/service/apigateway"
- "github.com/aws/aws-sdk-go/service/autoscaling"
- "github.com/aws/aws-sdk-go/service/cloudformation"
- "github.com/aws/aws-sdk-go/service/cloudfront"
- "github.com/aws/aws-sdk-go/service/cloudhsm"
- "github.com/aws/aws-sdk-go/service/cloudsearch"
- "github.com/aws/aws-sdk-go/service/cloudsearchdomain"
- "github.com/aws/aws-sdk-go/service/cloudtrail"
- "github.com/aws/aws-sdk-go/service/cloudwatch"
- "github.com/aws/aws-sdk-go/service/cloudwatchevents"
- "github.com/aws/aws-sdk-go/service/cloudwatchlogs"
- "github.com/aws/aws-sdk-go/service/codecommit"
- "github.com/aws/aws-sdk-go/service/codedeploy"
- "github.com/aws/aws-sdk-go/service/codepipeline"
- "github.com/aws/aws-sdk-go/service/cognitoidentity"
- "github.com/aws/aws-sdk-go/service/cognitosync"
- "github.com/aws/aws-sdk-go/service/configservice"
- "github.com/aws/aws-sdk-go/service/datapipeline"
- "github.com/aws/aws-sdk-go/service/devicefarm"
- "github.com/aws/aws-sdk-go/service/directconnect"
- "github.com/aws/aws-sdk-go/service/directoryservice"
- "github.com/aws/aws-sdk-go/service/dynamodb"
- "github.com/aws/aws-sdk-go/service/dynamodbstreams"
- "github.com/aws/aws-sdk-go/service/ec2"
- "github.com/aws/aws-sdk-go/service/ecr"
- "github.com/aws/aws-sdk-go/service/ecs"
- "github.com/aws/aws-sdk-go/service/efs"
- "github.com/aws/aws-sdk-go/service/elasticache"
- "github.com/aws/aws-sdk-go/service/elasticbeanstalk"
- "github.com/aws/aws-sdk-go/service/elasticsearchservice"
- "github.com/aws/aws-sdk-go/service/elastictranscoder"
- "github.com/aws/aws-sdk-go/service/elb"
- "github.com/aws/aws-sdk-go/service/emr"
- "github.com/aws/aws-sdk-go/service/firehose"
- "github.com/aws/aws-sdk-go/service/glacier"
- "github.com/aws/aws-sdk-go/service/iam"
- "github.com/aws/aws-sdk-go/service/inspector"
- "github.com/aws/aws-sdk-go/service/iot"
- "github.com/aws/aws-sdk-go/service/iotdataplane"
- "github.com/aws/aws-sdk-go/service/kinesis"
- "github.com/aws/aws-sdk-go/service/kms"
- "github.com/aws/aws-sdk-go/service/lambda"
- "github.com/aws/aws-sdk-go/service/machinelearning"
- "github.com/aws/aws-sdk-go/service/marketplacecommerceanalytics"
- "github.com/aws/aws-sdk-go/service/mobileanalytics"
- "github.com/aws/aws-sdk-go/service/opsworks"
- "github.com/aws/aws-sdk-go/service/rds"
- "github.com/aws/aws-sdk-go/service/redshift"
- "github.com/aws/aws-sdk-go/service/route53"
- "github.com/aws/aws-sdk-go/service/route53domains"
- "github.com/aws/aws-sdk-go/service/s3"
- "github.com/aws/aws-sdk-go/service/ses"
- "github.com/aws/aws-sdk-go/service/simpledb"
- "github.com/aws/aws-sdk-go/service/sns"
- "github.com/aws/aws-sdk-go/service/sqs"
- "github.com/aws/aws-sdk-go/service/ssm"
- "github.com/aws/aws-sdk-go/service/storagegateway"
- "github.com/aws/aws-sdk-go/service/sts"
- "github.com/aws/aws-sdk-go/service/support"
- "github.com/aws/aws-sdk-go/service/swf"
- "github.com/aws/aws-sdk-go/service/waf"
- "github.com/aws/aws-sdk-go/service/workspaces"
-)
-
-var clients = []reflect.Value{
- reflect.ValueOf(acm.New),
- reflect.ValueOf(apigateway.New),
- reflect.ValueOf(autoscaling.New),
- reflect.ValueOf(cloudformation.New),
- reflect.ValueOf(cloudfront.New),
- reflect.ValueOf(cloudhsm.New),
- reflect.ValueOf(cloudsearch.New),
- reflect.ValueOf(cloudsearchdomain.New),
- reflect.ValueOf(cloudtrail.New),
- reflect.ValueOf(cloudwatch.New),
- reflect.ValueOf(cloudwatchevents.New),
- reflect.ValueOf(cloudwatchlogs.New),
- reflect.ValueOf(codecommit.New),
- reflect.ValueOf(codedeploy.New),
- reflect.ValueOf(codepipeline.New),
- reflect.ValueOf(cognitoidentity.New),
- reflect.ValueOf(cognitosync.New),
- reflect.ValueOf(configservice.New),
- reflect.ValueOf(datapipeline.New),
- reflect.ValueOf(devicefarm.New),
- reflect.ValueOf(directconnect.New),
- reflect.ValueOf(directoryservice.New),
- reflect.ValueOf(dynamodb.New),
- reflect.ValueOf(dynamodbstreams.New),
- reflect.ValueOf(ec2.New),
- reflect.ValueOf(ecr.New),
- reflect.ValueOf(ecs.New),
- reflect.ValueOf(efs.New),
- reflect.ValueOf(elasticache.New),
- reflect.ValueOf(elasticbeanstalk.New),
- reflect.ValueOf(elasticsearchservice.New),
- reflect.ValueOf(elastictranscoder.New),
- reflect.ValueOf(elb.New),
- reflect.ValueOf(emr.New),
- reflect.ValueOf(firehose.New),
- reflect.ValueOf(glacier.New),
- reflect.ValueOf(iam.New),
- reflect.ValueOf(inspector.New),
- reflect.ValueOf(iot.New),
- reflect.ValueOf(iotdataplane.New),
- reflect.ValueOf(kinesis.New),
- reflect.ValueOf(kms.New),
- reflect.ValueOf(lambda.New),
- reflect.ValueOf(machinelearning.New),
- reflect.ValueOf(marketplacecommerceanalytics.New),
- reflect.ValueOf(mobileanalytics.New),
- reflect.ValueOf(opsworks.New),
- reflect.ValueOf(rds.New),
- reflect.ValueOf(redshift.New),
- reflect.ValueOf(route53.New),
- reflect.ValueOf(route53domains.New),
- reflect.ValueOf(s3.New),
- reflect.ValueOf(ses.New),
- reflect.ValueOf(simpledb.New),
- reflect.ValueOf(sns.New),
- reflect.ValueOf(sqs.New),
- reflect.ValueOf(ssm.New),
- reflect.ValueOf(storagegateway.New),
- reflect.ValueOf(sts.New),
- reflect.ValueOf(support.New),
- reflect.ValueOf(swf.New),
- reflect.ValueOf(waf.New),
- reflect.ValueOf(workspaces.New),
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go
deleted file mode 100644
index 81596d1..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/init.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// +build integration
-
-package performance
-
-import (
- "bytes"
- "errors"
- "fmt"
- "runtime"
-
- "github.com/gucumber/gucumber"
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/awstesting/mock"
- "github.com/aws/aws-sdk-go/service/s3"
-)
-
-func init() {
- // Go loads all of its dependecies on compile
- gucumber.Given(`^I have loaded my SDK and its dependencies$`, func() {
- })
-
- // Performance
- gucumber.When(`^I create and discard (\d+) clients for each service$`, func(i1 int) {
- services := gucumber.World["services"].([]func())
- err := benchmarkTask(fmt.Sprintf("%d_create_and_discard_clients", i1), services, i1)
- gucumber.World["error"] = err
- })
-
- gucumber.Then(`^I should not have leaked any resources$`, func() {
- runtime.GC()
- err, ok := gucumber.World["error"].(awserr.Error)
- assert.False(gucumber.T, ok, "error returned")
- assert.NoError(gucumber.T, err)
- })
-
- gucumber.And(`^I have a list of services$`, func() {
- mapCreateClients()
- })
-
- gucumber.And(`^I take a snapshot of my resources$`, func() {
- // Can't take a memory snapshot here, because gucumber does some
- // allocation between each instruction leading to unreliable numbers
- })
-
- gucumber.When(`^I create a client for each service$`, func() {
- buildAnArrayOfClients()
- })
-
- gucumber.And("^I execute (\\d+) command\\(s\\) on each client$", func(i1 int) {
- clientFns := gucumber.World["clientFns"].([]func())
- err := benchmarkTask(fmt.Sprintf("%d_commands_on_clients", i1), clientFns, i1)
- gucumber.World["error"] = err
- })
-
- gucumber.And(`^I destroy all the clients$`, func() {
- delete(gucumber.World, "clientFns")
- runtime.GC()
- })
-
- gucumber.Given(`^I have a (\d+) byte file$`, func(i1 int) {
- gucumber.World["file"] = make([]byte, i1)
- })
-
- gucumber.When(`^I upload the file$`, func() {
- svc := s3.New(mock.Session)
- memStatStart := &runtime.MemStats{}
- runtime.ReadMemStats(memStatStart)
- gucumber.World["start"] = memStatStart
-
- svc.PutObjectRequest(&s3.PutObjectInput{
- Bucket: aws.String("bucketmesilly"),
- Key: aws.String("testKey"),
- Body: bytes.NewReader(gucumber.World["file"].([]byte)),
- })
- })
-
- gucumber.And(`then download the file$`, func() {
- svc := s3.New(mock.Session)
- svc.GetObjectRequest(&s3.GetObjectInput{
- Bucket: aws.String("bucketmesilly"),
- Key: aws.String("testKey"),
- })
- memStatEnd := &runtime.MemStats{}
- runtime.ReadMemStats(memStatEnd)
- memStatStart := gucumber.World["start"].(*runtime.MemStats)
- if memStatStart.Alloc < memStatEnd.Alloc {
- gucumber.World["error"] = errors.New("Leaked memory")
- }
- })
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/logging.go b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/logging.go
deleted file mode 100644
index 03c885f..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/logging.go
+++ /dev/null
@@ -1,122 +0,0 @@
-// +build integration
-
-// Package performance contains shared step definitions that are used for performance testing
-package performance
-
-import (
- "errors"
- "fmt"
- "os"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/awstesting/unit"
- "github.com/aws/aws-sdk-go/service/dynamodb"
- "github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
-)
-
-// benchmarkLogger handles all benchmark logging
-type benchmarkLogger struct {
- outputer
-}
-
-// logger interface that handles any logging to an output
-type logger interface {
- log(key string, data map[string]interface{}) error
-}
-
-// init initializes the logger and uses dependency injection for the
-// outputer
-func newBenchmarkLogger(output string) (*benchmarkLogger, error) {
- b := &benchmarkLogger{}
- switch output {
- case "dynamodb":
- region := os.Getenv("AWS_TESTING_REGION")
- if region == "" {
- return b, errors.New("No region specified. Please export AWS_TESTING_REGION")
- }
-
- table := os.Getenv("AWS_TESTING_DB_TABLE")
- if table == "" {
- return b, errors.New("No table specified. Please export AWS_TESTING_DB_TABLE")
- }
- b.outputer = newDynamodbOut(table, region)
- case "stdout":
- b.outputer = stdout{}
- default:
- return b, errors.New("Unsupported outputer")
- }
- return b, nil
-}
-
-type record struct {
- Key string
- Data interface{}
-}
-
-// log calls the output command and building a data structure
-// to pass into its output formatter
-func (b benchmarkLogger) log(key, data interface{}) error {
- formatData := record{
- Key: fmt.Sprintf("%d-%v", time.Now().Unix(), key.(string)),
- Data: data,
- }
-
- return b.output(formatData)
-}
-
-// outputer is a simple interface that'll handle output
-// to whatever system like dynamodb or stdout
-type outputer interface {
- output(record) error
-}
-
-// dyanmodbOut handles simple writes to dynamodb
-type dynamodbOut struct {
- table string // table to write to in dynamodb
- region string
- db *dynamodb.DynamoDB // the dynamodb
-}
-
-// init initializes dynamodbOut
-func newDynamodbOut(table, region string) *dynamodbOut {
- out := dynamodbOut{
- table: table,
- region: region,
- }
-
- out.db = dynamodb.New(
- unit.Session,
- &aws.Config{Region: &out.region},
- )
- return &out
-}
-
-// output just writes to dynamodb
-func (out dynamodbOut) output(data record) error {
- input := &dynamodb.PutItemInput{
- TableName: aws.String(out.table),
- }
-
- item, err := dynamodbattribute.ConvertToMap(data)
- if err != nil {
- return err
- }
-
- input.Item = item
- _, err = out.db.PutItem(input)
- return err
-}
-
-// stdout handles writes to stdout
-type stdout struct{}
-
-// output expects key value data to print to stdout
-func (out stdout) output(data record) error {
- item, err := dynamodbattribute.ConvertToMap(data.Data)
- if err != nil {
- return err
- }
- fmt.Println(item)
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/streaming.feature b/vendor/github.com/aws/aws-sdk-go/awstesting/performance/streaming.feature
deleted file mode 100644
index cd24cb7..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/performance/streaming.feature
+++ /dev/null
@@ -1,26 +0,0 @@
-# language: en
-@performance @streaming
-Feature: Streaming transfers consume a fixed amount of memory
-
- Scenario Outline: Streaming uploads are O(1) in memory usage
- Given I have a byte file
- And I take a snapshot of my resources
- When I upload the file
- Then I should not have leaked any resources
-
- Examples:
- | bytes |
- | 2097152 |
- | 209715200 |
-
- Scenario Outline: Streaming download are O(1) in memory usage
- Given I have a byte file
- And I take a snapshot of my resources
- When I upload the file
- And then download the file
- Then I should not have leaked any resources
-
- Examples:
- | bytes |
- | 2097152 |
- | 209715200 |
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.golang-tip b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.golang-tip
deleted file mode 100644
index 6d51663..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.golang-tip
+++ /dev/null
@@ -1,41 +0,0 @@
-# Based on docker-library's golang 1.6 alpine and wheezy docker files.
-# https://github.com/docker-library/golang/blob/master/1.6/alpine/Dockerfile
-# https://github.com/docker-library/golang/blob/master/1.6/wheezy/Dockerfile
-FROM buildpack-deps:wheezy-scm
-
-ENV GOLANG_SRC_REPO_URL https://github.com/golang/go
-
-ENV GOLANG_BOOTSTRAP_URL https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz
-ENV GOLANG_BOOTSTRAP_SHA256 ce3140662f45356eb78bc16a88fc7cfb29fb00e18d7c632608245b789b2086d2
-ENV GOLANG_BOOTSTRAP_PATH /usr/local/bootstrap
-
-# gcc for cgo
-RUN apt-get update && apt-get install -y --no-install-recommends \
- g++ \
- gcc \
- libc6-dev \
- make \
- git \
- && rm -rf /var/lib/apt/lists/*
-
-# Setup the Bootstrap
-RUN mkdir -p "$GOLANG_BOOTSTRAP_PATH" \
- && curl -fsSL "$GOLANG_BOOTSTRAP_URL" -o golang.tar.gz \
- && echo "$GOLANG_BOOTSTRAP_SHA256 golang.tar.gz" | sha256sum -c - \
- && tar -C "$GOLANG_BOOTSTRAP_PATH" -xzf golang.tar.gz \
- && rm golang.tar.gz
-
-# Get and build Go tip
-RUN export GOROOT_BOOTSTRAP=$GOLANG_BOOTSTRAP_PATH/go \
- && git clone "$GOLANG_SRC_REPO_URL" /usr/local/go \
- && cd /usr/local/go/src \
- && ./make.bash \
- && rm -rf "$GOLANG_BOOTSTRAP_PATH" /usr/local/go/pkg/bootstrap
-
-# Build Go workspace and environment
-ENV GOPATH /go
-ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
-RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" \
- && chmod -R 777 "$GOPATH"
-
-WORKDIR $GOPATH
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.4 b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.4
deleted file mode 100644
index eda0a97..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.4
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM ubuntu:12.04
-FROM golang:1.4
-
-ADD . /go/src/github.com/aws/aws-sdk-go
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
- vim \
- && rm -rf /var/list/apt/lists/*
-
-WORKDIR /go/src/github.com/aws/aws-sdk-go
-CMD ["make", "get-deps", "unit"]
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.5-novendorexp b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.5-novendorexp
deleted file mode 100644
index 9ec9f16..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.5-novendorexp
+++ /dev/null
@@ -1,7 +0,0 @@
-FROM ubuntu:12.04
-FROM golang:1.5
-
-ADD . /go/src/github.com/aws/aws-sdk-go
-
-WORKDIR /go/src/github.com/aws/aws-sdk-go
-CMD ["make", "get-deps", "unit"]
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.7 b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.7
deleted file mode 100644
index 11db3be..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.go1.7
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM ubuntu:12.04
-FROM golang:1.7
-
-ADD . /go/src/github.com/aws/aws-sdk-go
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
- vim \
- && rm -rf /var/list/apt/lists/*
-
-WORKDIR /go/src/github.com/aws/aws-sdk-go
-CMD ["make", "unit"]
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.gotip b/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.gotip
deleted file mode 100644
index b6d2c9e..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/sandbox/Dockerfile.test.gotip
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM ubuntu:12.04
-FROM aws-golang:tip
-
-ADD . /go/src/github.com/aws/aws-sdk-go
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
- vim \
- && rm -rf /var/list/apt/lists/*
-
-WORKDIR /go/src/github.com/aws/aws-sdk-go
-CMD ["make", "unit"]
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/unit/unit.go b/vendor/github.com/aws/aws-sdk-go/awstesting/unit/unit.go
deleted file mode 100644
index 1c6e605..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/unit/unit.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Package unit performs initialization and validation for unit tests
-package unit
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/session"
-)
-
-// Session is a shared session for unit tests to use.
-var Session = session.Must(session.NewSession(aws.NewConfig().
- WithCredentials(credentials.NewStaticCredentials("AKID", "SECRET", "SESSION")).
- WithRegion("mock-region")))
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/util.go b/vendor/github.com/aws/aws-sdk-go/awstesting/util.go
deleted file mode 100644
index fde4dcc..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/util.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package awstesting
-
-import (
- "io"
- "time"
-
- "github.com/aws/aws-sdk-go/private/util"
-)
-
-// ZeroReader is a io.Reader which will always write zeros to the byte slice provided.
-type ZeroReader struct{}
-
-// Read fills the provided byte slice with zeros returning the number of bytes written.
-func (r *ZeroReader) Read(b []byte) (int, error) {
- for i := 0; i < len(b); i++ {
- b[i] = 0
- }
- return len(b), nil
-}
-
-// ReadCloser is a io.ReadCloser for unit testing.
-// Designed to test for leaks and whether a handle has
-// been closed
-type ReadCloser struct {
- Size int
- Closed bool
- set bool
- FillData func(bool, []byte, int, int)
-}
-
-// Read will call FillData and fill it with whatever data needed.
-// Decrements the size until zero, then return io.EOF.
-func (r *ReadCloser) Read(b []byte) (int, error) {
- if r.Closed {
- return 0, io.EOF
- }
-
- delta := len(b)
- if delta > r.Size {
- delta = r.Size
- }
- r.Size -= delta
-
- for i := 0; i < delta; i++ {
- b[i] = 'a'
- }
-
- if r.FillData != nil {
- r.FillData(r.set, b, r.Size, delta)
- }
- r.set = true
-
- if r.Size > 0 {
- return delta, nil
- }
- return delta, io.EOF
-}
-
-// Close sets Closed to true and returns no error
-func (r *ReadCloser) Close() error {
- r.Closed = true
- return nil
-}
-
-// SortedKeys returns a sorted slice of keys of a map.
-func SortedKeys(m map[string]interface{}) []string {
- return util.SortedKeys(m)
-}
-
-// A FakeContext provides a simple stub implementation of a Context
-type FakeContext struct {
- Error error
- DoneCh chan struct{}
-}
-
-// Deadline always will return not set
-func (c *FakeContext) Deadline() (deadline time.Time, ok bool) {
- return time.Time{}, false
-}
-
-// Done returns a read channel for listening to the Done event
-func (c *FakeContext) Done() <-chan struct{} {
- return c.DoneCh
-}
-
-// Err returns the error, is nil if not set.
-func (c *FakeContext) Err() error {
- return c.Error
-}
-
-// Value ignores the Value and always returns nil
-func (c *FakeContext) Value(key interface{}) interface{} {
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go b/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go
deleted file mode 100644
index 4b03db0..0000000
--- a/vendor/github.com/aws/aws-sdk-go/awstesting/util_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package awstesting_test
-
-import (
- "io"
- "testing"
-
- "github.com/stretchr/testify/assert"
-
- "github.com/aws/aws-sdk-go/awstesting"
-)
-
-func TestReadCloserClose(t *testing.T) {
- rc := awstesting.ReadCloser{Size: 1}
- err := rc.Close()
-
- assert.Nil(t, err)
- assert.True(t, rc.Closed)
- assert.Equal(t, rc.Size, 1)
-}
-
-func TestReadCloserRead(t *testing.T) {
- rc := awstesting.ReadCloser{Size: 5}
- b := make([]byte, 2)
-
- n, err := rc.Read(b)
-
- assert.Nil(t, err)
- assert.Equal(t, n, 2)
- assert.False(t, rc.Closed)
- assert.Equal(t, rc.Size, 3)
-
- err = rc.Close()
- assert.Nil(t, err)
- n, err = rc.Read(b)
- assert.Equal(t, err, io.EOF)
- assert.Equal(t, n, 0)
-}
-
-func TestReadCloserReadAll(t *testing.T) {
- rc := awstesting.ReadCloser{Size: 5}
- b := make([]byte, 5)
-
- n, err := rc.Read(b)
-
- assert.Equal(t, err, io.EOF)
- assert.Equal(t, n, 5)
- assert.False(t, rc.Closed)
- assert.Equal(t, rc.Size, 0)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/buildspec.yml b/vendor/github.com/aws/aws-sdk-go/buildspec.yml
new file mode 100644
index 0000000..2defb7f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/buildspec.yml
@@ -0,0 +1,21 @@
+version: 0.2
+
+phases:
+ build:
+ commands:
+ - echo Build started on `date`
+ - export GOPATH=/go
+ - export SDK_CB_ROOT=`pwd`
+ - export SDK_GO_ROOT=/go/src/github.com/aws/aws-sdk-go
+ - mkdir -p /go/src/github.com/aws
+ - ln -s $SDK_CB_ROOT $SDK_GO_ROOT
+ - cd $SDK_GO_ROOT
+ - make ci-test
+ - cd $SDK_CB_ROOT
+ - #echo Compiling the Go code...
+ post_build:
+ commands:
+ - echo Build completed on `date`
+#artifacts:
+# files:
+# - hello
diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/callgraph.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/callgraph.html
deleted file mode 100644
index c56b2ef..0000000
--- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/callgraph.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
▹ Internal call graph
-
-
-
▾ Internal call graph
-
- This viewer shows the portion of the internal call
- graph of this package that is reachable from this function.
- See the package's call
- graph for more information.
-
').appendTo(tocRow).append(dl2);
-}
-
-function bindToggle(el) {
- $('.toggleButton', el).click(function() {
- if ($(el).is('.toggle')) {
- $(el).addClass('toggleVisible').removeClass('toggle');
- } else {
- $(el).addClass('toggle').removeClass('toggleVisible');
- }
- });
-}
-function bindToggles(selector) {
- $(selector).each(function(i, el) {
- bindToggle(el);
- });
-}
-
-function bindToggleLink(el, prefix) {
- $(el).click(function() {
- var href = $(el).attr('href');
- var i = href.indexOf('#'+prefix);
- if (i < 0) {
- return;
- }
- var id = '#' + prefix + href.slice(i+1+prefix.length);
- if ($(id).is('.toggle')) {
- $(id).find('.toggleButton').first().click();
- }
- });
-}
-function bindToggleLinks(selector, prefix) {
- $(selector).each(function(i, el) {
- bindToggleLink(el, prefix);
- });
-}
-
-function setupDropdownPlayground() {
- if (!$('#page').is('.wide')) {
- return; // don't show on front page
- }
- var button = $('#playgroundButton');
- var div = $('#playground');
- var setup = false;
- button.toggle(function() {
- button.addClass('active');
- div.show();
- if (setup) {
- return;
- }
- setup = true;
- playground({
- 'codeEl': $('.code', div),
- 'outputEl': $('.output', div),
- 'runEl': $('.run', div),
- 'fmtEl': $('.fmt', div),
- 'shareEl': $('.share', div),
- 'shareRedirect': '//play.golang.org/p/'
- });
- },
- function() {
- button.removeClass('active');
- div.hide();
- });
- button.show();
- $('#menu').css('min-width', '+=60');
-}
-
-function setupInlinePlayground() {
- 'use strict';
- // Set up playground when each element is toggled.
- $('div.play').each(function (i, el) {
- // Set up playground for this example.
- var setup = function() {
- var code = $('.code', el);
- playground({
- 'codeEl': code,
- 'outputEl': $('.output', el),
- 'runEl': $('.run', el),
- 'fmtEl': $('.fmt', el),
- 'shareEl': $('.share', el),
- 'shareRedirect': '//play.golang.org/p/'
- });
-
- // Make the code textarea resize to fit content.
- var resize = function() {
- code.height(0);
- var h = code[0].scrollHeight;
- code.height(h+20); // minimize bouncing.
- code.closest('.input').height(h);
- };
- code.on('keydown', resize);
- code.on('keyup', resize);
- code.keyup(); // resize now.
- };
-
- // If example already visible, set up playground now.
- if ($(el).is(':visible')) {
- setup();
- return;
- }
-
- // Otherwise, set up playground when example is expanded.
- var built = false;
- $(el).closest('.toggle').click(function() {
- // Only set up once.
- if (!built) {
- setup();
- built = true;
- }
- });
- });
-}
-
-// fixFocus tries to put focus to div#page so that keyboard navigation works.
-function fixFocus() {
- var page = $('div#page');
- var topbar = $('div#topbar');
- page.css('outline', 0); // disable outline when focused
- page.attr('tabindex', -1); // and set tabindex so that it is focusable
- $(window).resize(function (evt) {
- // only focus page when the topbar is at fixed position (that is, it's in
- // front of page, and keyboard event will go to the former by default.)
- // by focusing page, keyboard event will go to page so that up/down arrow,
- // space, etc. will work as expected.
- if (topbar.css('position') == "fixed")
- page.focus();
- }).resize();
-}
-
-function toggleHash() {
- var hash = $(window.location.hash);
- if (hash.is('.toggle')) {
- hash.find('.toggleButton').first().click();
- }
-}
-
-function personalizeInstallInstructions() {
- var prefix = '?download=';
- var s = window.location.search;
- if (s.indexOf(prefix) != 0) {
- // No 'download' query string; bail.
- return;
- }
-
- var filename = s.substr(prefix.length);
- var filenameRE = /^go1\.\d+(\.\d+)?([a-z0-9]+)?\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\.[68])?\.([a-z.]+)$/;
- $('.downloadFilename').text(filename);
- $('.hideFromDownload').hide();
- var m = filenameRE.exec(filename);
- if (!m) {
- // Can't interpret file name; bail.
- return;
- }
-
- var os = m[3];
- var ext = m[6];
- if (ext != 'tar.gz') {
- $('#tarballInstructions').hide();
- }
- if (os != 'darwin' || ext != 'pkg') {
- $('#darwinPackageInstructions').hide();
- }
- if (os != 'windows') {
- $('#windowsInstructions').hide();
- $('.testUnix').show();
- $('.testWindows').hide();
- } else {
- if (ext != 'msi') {
- $('#windowsInstallerInstructions').hide();
- }
- if (ext != 'zip') {
- $('#windowsZipInstructions').hide();
- }
- $('.testUnix').hide();
- $('.testWindows').show();
- }
-
- var download = "https://storage.googleapis.com/golang/" + filename;
-
- var message = $('
'+
- 'Your download should begin shortly. '+
- 'If it does not, click this link.
');
- message.find('a').attr('href', download);
- message.insertAfter('#nav');
-
- window.location = download;
-}
-
-$(document).ready(function() {
- bindSearchEvents();
- generateTOC();
- bindToggles(".toggle");
- bindToggles(".toggleVisible");
- bindToggleLinks(".exampleLink", "example_");
- bindToggleLinks(".overviewLink", "");
- bindToggleLinks(".examplesLink", "");
- bindToggleLinks(".indexLink", "");
- setupDropdownPlayground();
- setupInlinePlayground();
- fixFocus();
- setupTypeInfo();
- setupCallgraphs();
- toggleHash();
- personalizeInstallInstructions();
-
- // godoc.html defines window.initFuncs in the tag, and root.html and
- // codewalk.js push their on-page-ready functions to the list.
- // We execute those functions here, to avoid loading jQuery until the page
- // content is loaded.
- for (var i = 0; i < window.initFuncs.length; i++) window.initFuncs[i]();
-});
-
-// -- analysis ---------------------------------------------------------
-
-// escapeHTML returns HTML for s, with metacharacters quoted.
-// It is safe for use in both elements and attributes
-// (unlike the "set innerText, read innerHTML" trick).
-function escapeHTML(s) {
- return s.replace(/&/g, '&').
- replace(/\"/g, '"').
- replace(/\'/g, ''').
- replace(//g, '>');
-}
-
-// makeAnchor returns HTML for an element, given an anchorJSON object.
-function makeAnchor(json) {
- var html = escapeHTML(json.Text);
- if (json.Href != "") {
- html = "" + html + "";
- }
- return html;
-}
-
-function showLowFrame(html) {
- var lowframe = document.getElementById('lowframe');
- lowframe.style.height = "200px";
- lowframe.innerHTML = "
" + html + "
\n" +
- "
✘
"
-};
-
-document.hideLowFrame = function() {
- var lowframe = document.getElementById('lowframe');
- lowframe.style.height = "0px";
-}
-
-// onClickCallers is the onclick action for the 'func' tokens of a
-// function declaration.
-document.onClickCallers = function(index) {
- var data = document.ANALYSIS_DATA[index]
- if (data.Callers.length == 1 && data.Callers[0].Sites.length == 1) {
- document.location = data.Callers[0].Sites[0].Href; // jump to sole caller
- return;
- }
-
- var html = "Callers of " + escapeHTML(data.Callee) + ": \n";
- for (var i = 0; i < data.Callers.length; i++) {
- var caller = data.Callers[i];
- html += "" + escapeHTML(caller.Func) + "";
- var sites = caller.Sites;
- if (sites != null && sites.length > 0) {
- html += " at line ";
- for (var j = 0; j < sites.length; j++) {
- if (j > 0) {
- html += ", ";
- }
- html += "" + makeAnchor(sites[j]) + "";
- }
- }
- html += " \n";
- }
- showLowFrame(html);
-};
-
-// onClickCallees is the onclick action for the '(' token of a function call.
-document.onClickCallees = function(index) {
- var data = document.ANALYSIS_DATA[index]
- if (data.Callees.length == 1) {
- document.location = data.Callees[0].Href; // jump to sole callee
- return;
- }
-
- var html = "Callees of this " + escapeHTML(data.Descr) + ": \n";
- for (var i = 0; i < data.Callees.length; i++) {
- html += "" + makeAnchor(data.Callees[i]) + " \n";
- }
- showLowFrame(html);
-};
-
-// onClickTypeInfo is the onclick action for identifiers declaring a named type.
-document.onClickTypeInfo = function(index) {
- var data = document.ANALYSIS_DATA[index];
- var html = "Type " + data.Name + ": " +
- " (size=" + data.Size + ", align=" + data.Align + ") \n";
- html += implementsHTML(data);
- html += methodsetHTML(data);
- showLowFrame(html);
-};
-
-// implementsHTML returns HTML for the implements relation of the
-// specified TypeInfoJSON value.
-function implementsHTML(info) {
- var html = "";
- if (info.ImplGroups != null) {
- for (var i = 0; i < info.ImplGroups.length; i++) {
- var group = info.ImplGroups[i];
- var x = "" + escapeHTML(group.Descr) + " ";
- for (var j = 0; j < group.Facts.length; j++) {
- var fact = group.Facts[j];
- var y = "" + makeAnchor(fact.Other) + "";
- if (fact.ByKind != null) {
- html += escapeHTML(fact.ByKind) + " type " + y + " implements " + x;
- } else {
- html += x + " implements " + y;
- }
- html += " \n";
- }
- }
- }
- return html;
-}
-
-
-// methodsetHTML returns HTML for the methodset of the specified
-// TypeInfoJSON value.
-function methodsetHTML(info) {
- var html = "";
- if (info.Methods != null) {
- for (var i = 0; i < info.Methods.length; i++) {
- html += "" + makeAnchor(info.Methods[i]) + " \n";
- }
- }
- return html;
-}
-
-// onClickComm is the onclick action for channel "make" and "<-"
-// send/receive tokens.
-document.onClickComm = function(index) {
- var ops = document.ANALYSIS_DATA[index].Ops
- if (ops.length == 1) {
- document.location = ops[0].Op.Href; // jump to sole element
- return;
- }
-
- var html = "Operations on this channel: \n";
- for (var i = 0; i < ops.length; i++) {
- html += makeAnchor(ops[i].Op) + " by " + escapeHTML(ops[i].Fn) + " \n";
- }
- if (ops.length == 0) {
- html += "(none) \n";
- }
- showLowFrame(html);
-};
-
-$(window).load(function() {
- // Scroll window so that first selection is visible.
- // (This means we don't need to emit id='L%d' spans for each line.)
- // TODO(adonovan): ideally, scroll it so that it's under the pointer,
- // but I don't know how to get the pointer y coordinate.
- var elts = document.getElementsByClassName("selection");
- if (elts.length > 0) {
- elts[0].scrollIntoView()
- }
-});
-
-// setupTypeInfo populates the "Implements" and "Method set" toggle for
-// each type in the package doc.
-function setupTypeInfo() {
- for (var i in document.ANALYSIS_DATA) {
- var data = document.ANALYSIS_DATA[i];
-
- var el = document.getElementById("implements-" + i);
- if (el != null) {
- // el != null => data is TypeInfoJSON.
- if (data.ImplGroups != null) {
- el.innerHTML = implementsHTML(data);
- el.parentNode.parentNode.style.display = "block";
- }
- }
-
- var el = document.getElementById("methodset-" + i);
- if (el != null) {
- // el != null => data is TypeInfoJSON.
- if (data.Methods != null) {
- el.innerHTML = methodsetHTML(data);
- el.parentNode.parentNode.style.display = "block";
- }
- }
- }
-}
-
-function setupCallgraphs() {
- if (document.CALLGRAPH == null) {
- return
- }
- document.getElementById("pkg-callgraph").style.display = "block";
-
- var treeviews = document.getElementsByClassName("treeview");
- for (var i = 0; i < treeviews.length; i++) {
- var tree = treeviews[i];
- if (tree.id == null || tree.id.indexOf("callgraph-") != 0) {
- continue;
- }
- var id = tree.id.substring("callgraph-".length);
- $(tree).treeview({collapsed: true, animated: "fast"});
- document.cgAddChildren(tree, tree, [id]);
- tree.parentNode.parentNode.style.display = "block";
- }
-}
-
-document.cgAddChildren = function(tree, ul, indices) {
- if (indices != null) {
- for (var i = 0; i < indices.length; i++) {
- var li = cgAddChild(tree, ul, document.CALLGRAPH[indices[i]]);
- if (i == indices.length - 1) {
- $(li).addClass("last");
- }
- }
- }
- $(tree).treeview({animated: "fast", add: ul});
-}
-
-// cgAddChild adds an
element for document.CALLGRAPH node cgn to
-// the parent
element ul. tree is the tree's root
element.
-function cgAddChild(tree, ul, cgn) {
- var li = document.createElement("li");
- ul.appendChild(li);
- li.className = "closed";
-
- var code = document.createElement("code");
-
- if (cgn.Callees != null) {
- $(li).addClass("expandable");
-
- // Event handlers and innerHTML updates don't play nicely together,
- // hence all this explicit DOM manipulation.
- var hitarea = document.createElement("div");
- hitarea.className = "hitarea expandable-hitarea";
- li.appendChild(hitarea);
-
- li.appendChild(code);
-
- var childUL = document.createElement("ul");
- li.appendChild(childUL);
- childUL.setAttribute('style', "display: none;");
-
- var onClick = function() {
- document.cgAddChildren(tree, childUL, cgn.Callees);
- hitarea.removeEventListener('click', onClick)
- };
- hitarea.addEventListener('click', onClick);
-
- } else {
- li.appendChild(code);
- }
- code.innerHTML += " " + makeAnchor(cgn.Func);
- return li
-}
-
-})();
diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/implements.html b/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/implements.html
deleted file mode 100644
index 5f65b86..0000000
--- a/vendor/github.com/aws/aws-sdk-go/doc-src/aws-godoc/templates/implements.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
- In the call graph viewer below, each node
- is a function belonging to this package
- and its children are the functions it
- calls—perhaps dynamically.
-
-
- The root nodes are the entry points of the
- package: functions that may be called from
- outside the package.
- There may be non-exported or anonymous
- functions among them if they are called
- dynamically from another package.
-
-
- Click a node to visit that function's source code.
- From there you can visit its callers by
- clicking its declaring func
- token.
-
-
- Functions may be omitted if they were
- determined to be unreachable in the
- particular programs or tests that were
- analyzed.
-
- {{if ne $.IfaceLink ""}}
- The stub package, {{$.PDoc.Name}}iface, can be used to provide alternative implementations of service clients,
- such as mocking the client for testing.
- {{end}}
-
-
-
- {{example_html $ ""}}
-
-
-
-
Operations ▹
-
-
-
Operations ▾
-
-
-
-
- {{range .Funcs}}
- {{$name_html := html .Name}}
-
- In the call graph viewer below, each node
- is a function belonging to this package
- and its children are the functions it
- calls—perhaps dynamically.
-
-
- The root nodes are the entry points of the
- package: functions that may be called from
- outside the package.
- There may be non-exported or anonymous
- functions among them if they are called
- dynamically from another package.
-
-
- Click a node to visit that function's source code.
- From there you can visit its callers by
- clicking its declaring func
- token.
-
-
- Functions may be omitted if they were
- determined to be unreachable in the
- particular programs or tests that were
- analyzed.
-
-
-
-
-
-
- {{with .Consts}}
-
-
-
Constants ▹
-
-
-
Constants ▾
- {{range .}}
-
{{node_html $ .Decl true}}
- {{comment_html .Doc}}
- {{end}}
-
-
- {{end}}
- {{with .Vars}}
-
Variables
- {{range .}}
-
{{node_html $ .Decl true}}
- {{comment_html .Doc}}
- {{end}}
- {{end}}
- {{range .Funcs}}
- {{/* Name is a string - no need for FSet */}}
- {{$name_html := html .Name}}
-
- aws-sdk-go is the official AWS SDK for the Go programming language.
-
- Checkout our release notes for information about the latest bug fixes, updates, and features added to the SDK.
-
-
Installing
-
- If you are using Go 1.5 with the GO15VENDOREXPERIMENT=1 vendoring flag you can use the following to get the SDK as the SDK's runtime dependencies are vendored in the vendor folder.
-
-
$ go get -u github.com/aws/aws-sdk-go
-
- Otherwise you'll need to tell Go to get the SDK and all of its dependencies.
-
-
$ go get -u github.com/aws/aws-sdk-go/...
-
Configuring Credentials
-
- 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:
-
- The AWS SDK for Go does not support the AWS CLI's config file. The SDK will not use any contents from this file. The SDK only supports the shared credentials file (~/aws/credentials). #384 tracks this feature request discussion.
-
-
Using the Go SDK
-
- 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.
-
- To list a set of instance IDs from EC2, you could run:
-
-
- package main
-
- import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/ec2"
- )
-
- func main() {
- // Create an EC2 service object in the "us-west-2" region
- // Note that you can also configure your region globally by
- // exporting the AWS_REGION environment variable
- svc := ec2.New(session.New(), &aws.Config{Region: aws.String("us-west-2")})
-
- // Call the DescribeInstances Operation
- resp, err := svc.DescribeInstances(nil)
- if err != nil {
- panic(err)
- }
-
- // resp has all of the response data, pull out instance IDs:
- fmt.Println("> Number of reservation sets: ", len(resp.Reservations))
- for idx, res := range resp.Reservations {
- fmt.Println(" > Number of instances: ", len(res.Instances))
- for _, inst := range resp.Reservations[idx].Instances {
- fmt.Println(" - Instance ID: ", *inst.InstanceId)
- }
- }
- }
-
-
-
-
diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/plugin.rb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/plugin.rb
deleted file mode 100644
index 9882707..0000000
--- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/plugin.rb
+++ /dev/null
@@ -1,187 +0,0 @@
-require 'yard'
-require 'yard-go'
-
-module GoLinksHelper
- def signature(obj, link = true, show_extras = true, full_attr_name = true)
- case obj
- when YARDGo::CodeObjects::FuncObject
- if link && obj.has_tag?(:service_operation)
- ret = signature_types(obj, !link)
- args = obj.parameters.map {|m| m[0].split(/\s+/).last }.join(", ")
- line = "#{obj.name}(#{args}) #{ret}"
- return link ? linkify(obj, line) : line
- end
- end
-
- super(obj, link, show_extras, full_attr_name)
- end
-
- def html_syntax_highlight(source, type = nil)
- src = super(source, type || :go)
- object.has_tag?(:service_operation) ? link_types(src) : src
- end
-end
-
-YARD::Templates::Helpers::HtmlHelper.send(:prepend, GoLinksHelper)
-YARD::Templates::Engine.register_template_path(File.dirname(__FILE__) + '/templates')
-
-YARD::Parser::SourceParser.after_parse_list do
- YARD::Registry.all(:struct).each do |obj|
- if obj.file =~ /\/?service\/(.+?)\/(service|api)\.go$/
- obj.add_tag YARD::Tags::Tag.new(:service, $1)
- obj.groups = ["Constructor Functions", "Service Operations", "Request Methods", "Pagination Methods"]
- end
- end
-
- YARD::Registry.all(:method).each do |obj|
- if obj.file =~ /service\/.+?\/api\.go$/ && obj.scope == :instance
- if obj.name.to_s =~ /Pages$/
- obj.group = "Pagination Methods"
- opname = obj.name.to_s.sub(/Pages$/, '')
- obj.docstring = <<-eof
-#{obj.name} iterates over the pages of a {#{opname} #{opname}()} operation, calling the `fn`
-function callback with the response data in each page. To stop iterating, return `false` from
-the function callback.
-
-@note This operation can generate multiple requests to a service.
-@example Iterating over at most 3 pages of a #{opname} operation
- pageNum := 0
- err := client.#{obj.name}(params, func(page *#{obj.parent.parent.name}.#{obj.parameters[1][0].split("*").last}, lastPage bool) bool {
- pageNum++
- fmt.Println(page)
- return pageNum <= 3
- })
-@see #{opname}
-eof
- obj.add_tag YARD::Tags::Tag.new(:paginator, '')
- elsif obj.name.to_s =~ /Request$/
- obj.group = "Request Methods"
- obj.signature = obj.name.to_s
- obj.parameters = []
- opname = obj.name.to_s.sub(/Request$/, '')
- obj.docstring = <<-eof
-#{obj.name} generates a {aws/request.Request} object representing the client request for
-the {#{opname} #{opname}()} operation. The `output` return value can be used to capture
-response data after {aws/request.Request.Send Request.Send()} is called.
-
-Creating a request object using this method should be used when you want to inject
-custom logic into the request lifecycle using a custom handler, or if you want to
-access properties on the request object before or after sending the request. If
-you just want the service response, call the {#{opname} service operation method}
-directly instead.
-
-@note You must call the {aws/request.Request.Send Send()} method on the returned
- request object in order to execute the request.
-@example Sending a request using the #{obj.name}() method
- req, resp := client.#{obj.name}(params)
- err := req.Send()
-
- if err == nil { // resp is now filled
- fmt.Println(resp)
- }
-eof
- obj.add_tag YARD::Tags::Tag.new(:request_method, '')
- else
- obj.group = "Service Operations"
- obj.add_tag YARD::Tags::Tag.new(:service_operation, '')
- if ex = obj.tag(:example)
- ex.name = "Calling the #{obj.name} operation"
- end
- end
- end
- end
-
- apply_docs
-end
-
-def apply_docs
- svc_pkg = YARD::Registry.at('service')
- return if svc_pkg.nil?
-
- pkgs = svc_pkg.children.select {|t| t.type == :package }
- pkgs.each do |pkg|
- svc = pkg.children.find {|t| t.has_tag?(:service) }
- ctor = P(svc, ".New")
- svc_name = ctor.source[/ServiceName:\s*"(.+?)",/, 1]
- api_ver = ctor.source[/APIVersion:\s*"(.+?)",/, 1]
- log.progress "Parsing service documentation for #{svc_name} (#{api_ver})"
- file = Dir.glob("models/apis/#{svc_name}/#{api_ver}/docs-2.json").sort.last
- next if file.nil?
-
- next if svc.nil?
- exmeth = svc.children.find {|s| s.has_tag?(:service_operation) }
- pkg.docstring += <<-eof
-
-@example Sending a request using the {#{svc.name}} client
- client := #{pkg.name}.New(nil)
- params := {pkg.name}.#{exmeth.parameters.first[0].split("*").last}{...}
- resp, err := client.#{exmeth.name}(params)
-@see #{svc.name}
-@version #{api_ver}
-eof
-
- ctor.docstring += <<-eof
-
-@example Constructing a client using default configuration
- client := #{pkg.name}.New(nil)
-
-@example Constructing a client with custom configuration
- config := aws.NewConfig().WithRegion("us-west-2")
- client := #{pkg.name}.New(config)
-eof
-
- json = JSON.parse(File.read(file))
- if svc
- apply_doc(svc, json["service"])
- end
-
- json["operations"].each do |op, doc|
- if doc && obj = svc.children.find {|t| t.name.to_s.downcase == op.downcase }
- apply_doc(obj, doc)
- end
- end
-
- json["shapes"].each do |shape, data|
- shape = shape_name(shape)
- if obj = pkg.children.find {|t| t.name.to_s.downcase == shape.downcase }
- apply_doc(obj, data["base"])
- end
-
- data["refs"].each do |refname, doc|
- refshape, member = *refname.split("$")
- refshape = shape_name(refshape)
- if refobj = pkg.children.find {|t| t.name.to_s.downcase == refshape.downcase }
- if m = refobj.children.find {|t| t.name.to_s.downcase == member.downcase }
- apply_doc(m, doc || data["base"])
- end
- end
- end if data["refs"]
- end
- end
-end
-
-def apply_doc(obj, doc)
- tags = obj.docstring.tags || []
- obj.docstring = clean_docstring(doc)
- tags.each {|t| obj.docstring.add_tag(t) }
-end
-
-def shape_name(shape)
- shape.sub(/Request$/, "Input").sub(/Response$/, "Output")
-end
-
-def clean_docstring(docs)
- return nil unless docs
- docs = docs.gsub(//m, '')
- docs = docs.gsub(/.+?<\/fullname?>/m, '')
- docs = docs.gsub(/.+?<\/examples?>/m, '')
- docs = docs.gsub(/\s*<\/note>/m, '')
- docs = docs.gsub(/(.+?)<\/a>/, '\1')
- docs = docs.gsub(/(.+?)<\/note>/m) do
- text = $1.gsub(/<\/?p>/, '')
- "
diff --git a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/setup.rb b/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/setup.rb
deleted file mode 100644
index 9038945..0000000
--- a/vendor/github.com/aws/aws-sdk-go/doc-src/plugin/templates/default/struct/html/setup.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-def init
- super
- sections.place(:request_methods, :paginators).after(:method_summary)
-end
-
-def groups(list, type = "Method")
- super(list.reject {|o| o.has_tag?(:paginator) || o.has_tag?(:request_method) }, type)
-end
-
-def paginators
- @items = object.children.select {|o| o.has_tag?(:paginator) }
- return if @items.size == 0
- erb(:paginators)
-end
-
-def request_methods
- @items = object.children.select {|o| o.has_tag?(:request_method) }
- return if @items.size == 0
- erb(:request_methods)
-end
diff --git a/vendor/github.com/aws/aws-sdk-go/doc.go b/vendor/github.com/aws/aws-sdk-go/doc.go
new file mode 100644
index 0000000..32b806a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/doc.go
@@ -0,0 +1,405 @@
+// Package sdk is the official AWS SDK for the Go programming language.
+//
+// The AWS SDK for Go provides APIs and utilities that developers can use to
+// build Go applications that use AWS services, such as Amazon Elastic Compute
+// Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3).
+//
+// The SDK removes the complexity of coding directly against a web service
+// interface. It hides a lot of the lower-level plumbing, such as authentication,
+// request retries, and error handling.
+//
+// The SDK also includes helpful utilities on top of the AWS APIs that add additional
+// capabilities and functionality. For example, the Amazon S3 Download and Upload
+// Manager will automatically split up large objects into multiple parts and
+// transfer them concurrently.
+//
+// See the s3manager package documentation for more information.
+// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/
+//
+// Getting More Information
+//
+// Checkout the Getting Started Guide and API Reference Docs detailed the SDK's
+// components and details on each AWS client the SDK supports.
+//
+// The Getting Started Guide provides examples and detailed description of how
+// to get setup with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/welcome.html
+//
+// The API Reference Docs include a detailed breakdown of the SDK's components
+// such as utilities and AWS clients. Use this as a reference of the Go types
+// included with the SDK, such as AWS clients, API operations, and API parameters.
+// https://docs.aws.amazon.com/sdk-for-go/api/
+//
+// 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.
+//
+// See the SDK's configuration guide for more information.
+// https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html
+//
+// See the session package documentation for more information on how to use Session
+// with the SDK.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/session/
+//
+// See the Config type in the aws package for more information on configuration
+// options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// 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.
+//
+// // 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 package documentation for more information on credential
+// providers included with the SDK, and how to customize the SDK's usage of
+// credentials.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/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.
+//
+// sess := session.Must(session.NewSessionWithOptions(session.Options{
+// SharedConfigState: session.SharedConfigEnable,
+// }))
+//
+// 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.
+//
+// sess := session.Must(session.NewSession(&aws.Config{
+// Region: aws.String(endpoints.UsWest2RegionID),
+// }))
+//
+// See the endpoints package for the AWS Regions and Endpoints metadata.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/
+//
+// 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.
+//
+// svc := s3.New(sess, &aws.Config{
+// Region: aws.String(endpoints.UsWest2RegionID),
+// })
+//
+// See the Config type in the aws package for more information and additional
+// options such as setting the Endpoint, and other service client configuration options.
+// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
+//
+// 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.
+//
+// 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))
+//
+// API Request Pagination and Resource Waiters
+//
+// 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.
+//
+// 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)
+//
+// 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.
+//
+// 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")
+//
+// 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.
+//
+// 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)
+// }
+package sdk
diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/README.md b/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/README.md
deleted file mode 100644
index 1930681..0000000
--- a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-Custom Endpoint Example
-===
-
-This example provides examples on how you can provide custom endpoints, and logic to how endpoints are resolved by the SDK.
-
-The example creates multiple clients with different endpoint configuration. From a custom endpoint resolver that wraps the default resolver so that any Amazon S3 service client created uses the custom endpoint, to how you can provide your own logic to a single service's endpoint resolving.
-
-
-Usage
----
-
-```sh
-go run -tags example customeEndpoint.go
-```
diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/customEndpoint.go b/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/customEndpoint.go
deleted file mode 100644
index 6163172..0000000
--- a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/customEndpoint/customEndpoint.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// +build example
-
-package main
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/dynamodb"
- "github.com/aws/aws-sdk-go/service/s3"
- "github.com/aws/aws-sdk-go/service/sqs"
-)
-
-func main() {
- defaultResolver := endpoints.DefaultResolver()
- s3CustResolverFn := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) {
- if service == "s3" {
- return endpoints.ResolvedEndpoint{
- URL: "s3.custom.endpoint.com",
- SigningRegion: "custom-signing-region",
- }, nil
- }
-
- return defaultResolver.EndpointFor(service, region, optFns...)
- }
- sess := session.Must(session.NewSessionWithOptions(session.Options{
- Config: aws.Config{
- Region: aws.String("us-west-2"),
- EndpointResolver: endpoints.ResolverFunc(s3CustResolverFn),
- },
- }))
-
- // Create the S3 service client with the shared session. This will
- // automatically use the S3 custom endpoint configured in the custom
- // endpoint resolver wrapping the default endpoint resolver.
- s3Svc := s3.New(sess)
- // Operation calls will be made to the custom endpoint.
- s3Svc.GetObject(&s3.GetObjectInput{
- Bucket: aws.String("myBucket"),
- Key: aws.String("myObjectKey"),
- })
-
- // Create the SQS service client with the shared session. This will
- // fallback to the default endpoint resolver because the customization
- // passes any non S3 service endpoint resolve to the default resolver.
- sqsSvc := sqs.New(sess)
- // Operation calls will be made to the default endpoint for SQS for the
- // region configured.
- sqsSvc.ReceiveMessage(&sqs.ReceiveMessageInput{
- QueueUrl: aws.String("my-queue-url"),
- })
-
- // Create a DynamoDB service client that will use a custom endpoint
- // resolver that overrides the shared session's. This is useful when
- // custom endpoints are generated, or multiple endpoints are switched on
- // by a region value.
- ddbCustResolverFn := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) {
- return endpoints.ResolvedEndpoint{
- URL: "dynamodb.custom.endpoint",
- SigningRegion: "custom-signing-region",
- }, nil
- }
- ddbSvc := dynamodb.New(sess, &aws.Config{
- EndpointResolver: endpoints.ResolverFunc(ddbCustResolverFn),
- })
- // Operation calls will be made to the custom endpoint set in the
- // ddCustResolverFn.
- ddbSvc.ListTables(&dynamodb.ListTablesInput{})
-
- // Setting Config's Endpoint will override the EndpointResolver. Forcing
- // the service clien to make all operation to the endpoint specified
- // the in the config.
- ddbSvcLocal := dynamodb.New(sess, &aws.Config{
- Endpoint: aws.String("http://localhost:8088"),
- })
- ddbSvcLocal.ListTables(&dynamodb.ListTablesInput{})
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/README.md b/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/README.md
deleted file mode 100644
index 4f8744c..0000000
--- a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/README.md
+++ /dev/null
@@ -1,37 +0,0 @@
-Enumerate Regions and Endpoints Example
-===
-
-Demonstrates how the SDK's endpoints can be enumerated over to discover regions, services, and endpoints defined by the SDK's Regions and Endpoints metadata.
-
-Usage
----
-
-The following parameters can be used to enumerate the SDK's partition metadata.
-
-Example:
-
- go run -tags example enumEndpoints.go -p aws -services -r us-west-2
-
-Output:
-
- Services with endpoint us-west-2 in aws:
- ec2
- dynamodb
- s3
- ...
-
-CLI parameters
----
-
-```
- -p=id partition id, e.g: aws
- -r=id region id, e.g: us-west-2
- -s=id service id, e.g: s3
-
- -partitions Lists all partitions.
- -regions Lists all regions in a partition. Requires partition ID.
- If service ID is also provided will show endpoints for a service.
- -services Lists all services in a partition. Requires partition ID.
- If region ID is also provided, will show services available in that region.
-```
-
diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/enumEndpoints.go b/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/enumEndpoints.go
deleted file mode 100644
index 4310701..0000000
--- a/vendor/github.com/aws/aws-sdk-go/example/aws/endpoints/enumEndpoints/enumEndpoints.go
+++ /dev/null
@@ -1,126 +0,0 @@
-// +build example
-
-package main
-
-import (
- "flag"
- "fmt"
- "os"
-
- "github.com/aws/aws-sdk-go/aws/endpoints"
-)
-
-// Demostrates how the SDK's endpoints can be enumerated over to discover
-// regions, services, and endpoints defined by the SDK's Regions and Endpoints
-// metadata.
-//
-// Usage:
-// -p=id partition id, e.g: aws
-// -r=id region id, e.g: us-west-2
-// -s=id service id, e.g: s3
-//
-// -partitions Lists all partitions.
-// -regions Lists all regions in a partition. Requires partition ID.
-// If service ID is also provided will show endpoints for a service.
-// -services Lists all services in a partition. Requires partition ID.
-// If region ID is also provided, will show services available in that region.
-//
-// Example:
-// go run enumEndpoints.go -p aws -services -r us-west-2
-//
-// Output:
-// Services with endpoint us-west-2 in aws:
-// ...
-func main() {
- var partitionID, regionID, serviceID string
- flag.StringVar(&partitionID, "p", "", "Partition ID")
- flag.StringVar(®ionID, "r", "", "Region ID")
- flag.StringVar(&serviceID, "s", "", "Service ID")
-
- var cmdPartitions, cmdRegions, cmdServices bool
- flag.BoolVar(&cmdPartitions, "partitions", false, "Lists partitions.")
- flag.BoolVar(&cmdRegions, "regions", false, "Lists regions of a partition. Requires partition ID to be provided. Will filter by a service if '-s' is set.")
- flag.BoolVar(&cmdServices, "services", false, "Lists services for a partition. Requires partition ID to be provided. Will filter by a region if '-r' is set.")
- flag.Parse()
-
- partitions := endpoints.DefaultResolver().(endpoints.EnumPartitions).Partitions()
-
- if cmdPartitions {
- printPartitions(partitions)
- }
-
- if !(cmdRegions || cmdServices) {
- return
- }
-
- p, ok := findPartition(partitions, partitionID)
- if !ok {
- fmt.Fprintf(os.Stderr, "Partition %q not found", partitionID)
- os.Exit(1)
- }
-
- if cmdRegions {
- printRegions(p, serviceID)
- }
-
- if cmdServices {
- printServices(p, regionID)
- }
-}
-
-func printPartitions(ps []endpoints.Partition) {
- fmt.Println("Partitions:")
- for _, p := range ps {
- fmt.Println(p.ID())
- }
-}
-
-func printRegions(p endpoints.Partition, serviceID string) {
- if len(serviceID) != 0 {
- s, ok := p.Services()[serviceID]
- if !ok {
- fmt.Fprintf(os.Stderr, "service %q does not exist in partition %q", serviceID, p.ID())
- os.Exit(1)
- }
- es := s.Endpoints()
- fmt.Printf("Endpoints for %s in %s:\n", serviceID, p.ID())
- for _, e := range es {
- r, _ := e.ResolveEndpoint()
- fmt.Printf("%s: %s\n", e.ID(), r.URL)
- }
-
- } else {
- rs := p.Regions()
- fmt.Printf("Regions in %s:\n", p.ID())
- for _, r := range rs {
- fmt.Println(r.ID())
- }
- }
-}
-
-func printServices(p endpoints.Partition, endpointID string) {
- ss := p.Services()
-
- if len(endpointID) > 0 {
- fmt.Printf("Services with endpoint %s in %s:\n", endpointID, p.ID())
- } else {
- fmt.Printf("Services in %s:\n", p.ID())
- }
-
- for id, s := range ss {
- if _, ok := s.Endpoints()[endpointID]; !ok && len(endpointID) > 0 {
- continue
- }
- fmt.Println(id)
- }
-}
-
-func findPartition(ps []endpoints.Partition, partitionID string) (endpoints.Partition, bool) {
- for _, p := range ps {
- if p.ID() == partitionID {
- return p, true
- }
- }
-
- return endpoints.Partition{}, false
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/README.md b/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/README.md
deleted file mode 100644
index afc7063..0000000
--- a/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# Handling Specific Service Error Codes
-
-This examples highlights how you can use the `awserr.Error` type to perform logic based on specific error codes returned by service API operations.
-
-In this example the `S3` `GetObject` API operation is used to request the contents of a object in S3. The example handles the `NoSuchBucket` and `NoSuchKey` error codes printing custom messages to stderr. If Any other error is received a generic message is printed.
-
-## Usage
-
-Will make a request to S3 for the contents of an object. If the request was successful, and the object was found the object's path and size will be printed to stdout.
-
-If the object's bucket or key does not exist a specific error message will be printed to stderr for the error.
-
-Any other error will be printed as an unknown error.
-
-```sh
-go run -tags example handleServiceErrorCodes.go mybucket mykey
-```
diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/handleServiceErrorCodes.go b/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/handleServiceErrorCodes.go
deleted file mode 100644
index ee1da3a..0000000
--- a/vendor/github.com/aws/aws-sdk-go/example/aws/request/handleServiceErrorCodes/handleServiceErrorCodes.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// +build example
-
-package main
-
-import (
- "fmt"
- "os"
- "path/filepath"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/s3"
-)
-
-func exitErrorf(msg string, args ...interface{}) {
- fmt.Fprintf(os.Stderr, msg+"\n", args...)
- os.Exit(1)
-}
-
-// Will make a request to S3 for the contents of an object. If the request
-// was successful, and the object was found the object's path and size will be
-// printed to stdout.
-//
-// If the object's bucket or key does not exist a specific error message will
-// be printed to stderr for the error.
-//
-// Any other error will be printed as an unknown error.
-//
-// Usage: handleServiceErrorCodes
-func main() {
- if len(os.Args) < 3 {
- exitErrorf("Usage: %s ", filepath.Base(os.Args[0]))
- }
- sess := session.Must(session.NewSession())
-
- svc := s3.New(sess)
- resp, err := svc.GetObject(&s3.GetObjectInput{
- Bucket: aws.String(os.Args[1]),
- Key: aws.String(os.Args[2]),
- })
-
- if err != nil {
- // Casting to the awserr.Error type will allow you to inspect the error
- // code returned by the service in code. The error code can be used
- // to switch on context specific functionality. In this case a context
- // specific error message is printed to the user based on the bucket
- // and key existing.
- //
- // For information on other S3 API error codes see:
- // http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
- if aerr, ok := err.(awserr.Error); ok {
- switch aerr.Code() {
- case s3.ErrCodeNoSuchBucket:
- exitErrorf("bucket %s does not exist", os.Args[1])
- case s3.ErrCodeNoSuchKey:
- exitErrorf("object with key %s does not exist in bucket %s", os.Args[2], os.Args[1])
- }
- }
- exitErrorf("unknown error occurred, %v", err)
- }
- defer resp.Body.Close()
-
- fmt.Printf("s3://%s/%s exists. size: %d\n", os.Args[1], os.Args[2],
- aws.Int64Value(resp.ContentLength))
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/README.md b/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/README.md
deleted file mode 100644
index 062aeec..0000000
--- a/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Example
-
-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 -tags example withContext.go -b mybucket -k myKey -d 10m < myfile.txt
diff --git a/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/withContext.go b/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/withContext.go
deleted file mode 100644
index e629221..0000000
--- a/vendor/github.com/aws/aws-sdk-go/example/aws/request/withContext/withContext.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// +build example,go1.7
-
-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)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/example/service/cloudfront/signCookies/README.md b/vendor/github.com/aws/aws-sdk-go/example/service/cloudfront/signCookies/README.md
deleted file mode 100644
index 567d226..0000000
--- a/vendor/github.com/aws/aws-sdk-go/example/service/cloudfront/signCookies/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Example
-
-This example shows how the CloudFront CookieSigner can be used to generate signed cookies to provided short term access to restricted resourced fronted by CloudFront.
-
-# Usage
-Makes a request for object using CloudFront cookie signing, and outputs the contents of the object to stdout.
-
-```sh
-go run -tags example signCookies.go -file -id -r -g
- {{end}} - {{.XML}} -