aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/aws
diff options
context:
space:
mode:
authorJake Champlin <jake@gnu.space>2017-06-09 17:54:32 +0000
committerJake Champlin <jake@gnu.space>2017-06-09 17:54:32 +0000
commit9b12e4fe6f3c95986f1f3ec791636c58ca7e7583 (patch)
tree38f5f12bec0e488a12f0459a7356e6b7de7d8f84 /vendor/github.com/aws
parentcec3de8a3bcaffd21dedd1bf42da4b490cae7e16 (diff)
downloadterraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.tar.gz
terraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.tar.zst
terraform-provider-statuscake-9b12e4fe6f3c95986f1f3ec791636c58ca7e7583.zip
Transfer of provider code
Diffstat (limited to 'vendor/github.com/aws')
-rw-r--r--vendor/github.com/aws/aws-sdk-go/LICENSE.txt202
-rw-r--r--vendor/github.com/aws/aws-sdk-go/NOTICE.txt3
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/client/client.go59
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/client/logger.go108
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go16
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go33
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go27
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go95
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go2
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_other.go (renamed from vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error_appengine.go)2
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go31
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/request/request.go28
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go22
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go30
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go9
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go36
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/session/session.go28
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go2
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/version.go2
-rw-r--r--vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go40
-rw-r--r--vendor/github.com/aws/aws-sdk-go/service/sts/api.go6
21 files changed, 429 insertions, 352 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go/LICENSE.txt
deleted file mode 100644
index d645695..0000000
--- a/vendor/github.com/aws/aws-sdk-go/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
1
2 Apache License
3 Version 2.0, January 2004
4 http://www.apache.org/licenses/
5
6 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
8 1. Definitions.
9
10 "License" shall mean the terms and conditions for use, reproduction,
11 and distribution as defined by Sections 1 through 9 of this document.
12
13 "Licensor" shall mean the copyright owner or entity authorized by
14 the copyright owner that is granting the License.
15
16 "Legal Entity" shall mean the union of the acting entity and all
17 other entities that control, are controlled by, or are under common
18 control with that entity. For the purposes of this definition,
19 "control" means (i) the power, direct or indirect, to cause the
20 direction or management of such entity, whether by contract or
21 otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 outstanding shares, or (iii) beneficial ownership of such entity.
23
24 "You" (or "Your") shall mean an individual or Legal Entity
25 exercising permissions granted by this License.
26
27 "Source" form shall mean the preferred form for making modifications,
28 including but not limited to software source code, documentation
29 source, and configuration files.
30
31 "Object" form shall mean any form resulting from mechanical
32 transformation or translation of a Source form, including but
33 not limited to compiled object code, generated documentation,
34 and conversions to other media types.
35
36 "Work" shall mean the work of authorship, whether in Source or
37 Object form, made available under the License, as indicated by a
38 copyright notice that is included in or attached to the work
39 (an example is provided in the Appendix below).
40
41 "Derivative Works" shall mean any work, whether in Source or Object
42 form, that is based on (or derived from) the Work and for which the
43 editorial revisions, annotations, elaborations, or other modifications
44 represent, as a whole, an original work of authorship. For the purposes
45 of this License, Derivative Works shall not include works that remain
46 separable from, or merely link (or bind by name) to the interfaces of,
47 the Work and Derivative Works thereof.
48
49 "Contribution" shall mean any work of authorship, including
50 the original version of the Work and any modifications or additions
51 to that Work or Derivative Works thereof, that is intentionally
52 submitted to Licensor for inclusion in the Work by the copyright owner
53 or by an individual or Legal Entity authorized to submit on behalf of
54 the copyright owner. For the purposes of this definition, "submitted"
55 means any form of electronic, verbal, or written communication sent
56 to the Licensor or its representatives, including but not limited to
57 communication on electronic mailing lists, source code control systems,
58 and issue tracking systems that are managed by, or on behalf of, the
59 Licensor for the purpose of discussing and improving the Work, but
60 excluding communication that is conspicuously marked or otherwise
61 designated in writing by the copyright owner as "Not a Contribution."
62
63 "Contributor" shall mean Licensor and any individual or Legal Entity
64 on behalf of whom a Contribution has been received by Licensor and
65 subsequently incorporated within the Work.
66
67 2. Grant of Copyright License. Subject to the terms and conditions of
68 this License, each Contributor hereby grants to You a perpetual,
69 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 copyright license to reproduce, prepare Derivative Works of,
71 publicly display, publicly perform, sublicense, and distribute the
72 Work and such Derivative Works in Source or Object form.
73
74 3. Grant of Patent License. Subject to the terms and conditions of
75 this License, each Contributor hereby grants to You a perpetual,
76 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 (except as stated in this section) patent license to make, have made,
78 use, offer to sell, sell, import, and otherwise transfer the Work,
79 where such license applies only to those patent claims licensable
80 by such Contributor that are necessarily infringed by their
81 Contribution(s) alone or by combination of their Contribution(s)
82 with the Work to which such Contribution(s) was submitted. If You
83 institute patent litigation against any entity (including a
84 cross-claim or counterclaim in a lawsuit) alleging that the Work
85 or a Contribution incorporated within the Work constitutes direct
86 or contributory patent infringement, then any patent licenses
87 granted to You under this License for that Work shall terminate
88 as of the date such litigation is filed.
89
90 4. Redistribution. You may reproduce and distribute copies of the
91 Work or Derivative Works thereof in any medium, with or without
92 modifications, and in Source or Object form, provided that You
93 meet the following conditions:
94
95 (a) You must give any other recipients of the Work or
96 Derivative Works a copy of this License; and
97
98 (b) You must cause any modified files to carry prominent notices
99 stating that You changed the files; and
100
101 (c) You must retain, in the Source form of any Derivative Works
102 that You distribute, all copyright, patent, trademark, and
103 attribution notices from the Source form of the Work,
104 excluding those notices that do not pertain to any part of
105 the Derivative Works; and
106
107 (d) If the Work includes a "NOTICE" text file as part of its
108 distribution, then any Derivative Works that You distribute must
109 include a readable copy of the attribution notices contained
110 within such NOTICE file, excluding those notices that do not
111 pertain to any part of the Derivative Works, in at least one
112 of the following places: within a NOTICE text file distributed
113 as part of the Derivative Works; within the Source form or
114 documentation, if provided along with the Derivative Works; or,
115 within a display generated by the Derivative Works, if and
116 wherever such third-party notices normally appear. The contents
117 of the NOTICE file are for informational purposes only and
118 do not modify the License. You may add Your own attribution
119 notices within Derivative Works that You distribute, alongside
120 or as an addendum to the NOTICE text from the Work, provided
121 that such additional attribution notices cannot be construed
122 as modifying the License.
123
124 You may add Your own copyright statement to Your modifications and
125 may provide additional or different license terms and conditions
126 for use, reproduction, or distribution of Your modifications, or
127 for any such Derivative Works as a whole, provided Your use,
128 reproduction, and distribution of the Work otherwise complies with
129 the conditions stated in this License.
130
131 5. Submission of Contributions. Unless You explicitly state otherwise,
132 any Contribution intentionally submitted for inclusion in the Work
133 by You to the Licensor shall be under the terms and conditions of
134 this License, without any additional terms or conditions.
135 Notwithstanding the above, nothing herein shall supersede or modify
136 the terms of any separate license agreement you may have executed
137 with Licensor regarding such Contributions.
138
139 6. Trademarks. This License does not grant permission to use the trade
140 names, trademarks, service marks, or product names of the Licensor,
141 except as required for reasonable and customary use in describing the
142 origin of the Work and reproducing the content of the NOTICE file.
143
144 7. Disclaimer of Warranty. Unless required by applicable law or
145 agreed to in writing, Licensor provides the Work (and each
146 Contributor provides its Contributions) on an "AS IS" BASIS,
147 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 implied, including, without limitation, any warranties or conditions
149 of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 PARTICULAR PURPOSE. You are solely responsible for determining the
151 appropriateness of using or redistributing the Work and assume any
152 risks associated with Your exercise of permissions under this License.
153
154 8. Limitation of Liability. In no event and under no legal theory,
155 whether in tort (including negligence), contract, or otherwise,
156 unless required by applicable law (such as deliberate and grossly
157 negligent acts) or agreed to in writing, shall any Contributor be
158 liable to You for damages, including any direct, indirect, special,
159 incidental, or consequential damages of any character arising as a
160 result of this License or out of the use or inability to use the
161 Work (including but not limited to damages for loss of goodwill,
162 work stoppage, computer failure or malfunction, or any and all
163 other commercial damages or losses), even if such Contributor
164 has been advised of the possibility of such damages.
165
166 9. Accepting Warranty or Additional Liability. While redistributing
167 the Work or Derivative Works thereof, You may choose to offer,
168 and charge a fee for, acceptance of support, warranty, indemnity,
169 or other liability obligations and/or rights consistent with this
170 License. However, in accepting such obligations, You may act only
171 on Your own behalf and on Your sole responsibility, not on behalf
172 of any other Contributor, and only if You agree to indemnify,
173 defend, and hold each Contributor harmless for any liability
174 incurred by, or claims asserted against, such Contributor by reason
175 of your accepting any such warranty or additional liability.
176
177 END OF TERMS AND CONDITIONS
178
179 APPENDIX: How to apply the Apache License to your work.
180
181 To apply the Apache License to your work, attach the following
182 boilerplate notice, with the fields enclosed by brackets "[]"
183 replaced with your own identifying information. (Don't include
184 the brackets!) The text should be enclosed in the appropriate
185 comment syntax for the file format. We also recommend that a
186 file or class name and description of purpose be included on the
187 same "printed page" as the copyright notice for easier
188 identification within third-party archives.
189
190 Copyright [yyyy] [name of copyright owner]
191
192 Licensed under the Apache License, Version 2.0 (the "License");
193 you may not use this file except in compliance with the License.
194 You may obtain a copy of the License at
195
196 http://www.apache.org/licenses/LICENSE-2.0
197
198 Unless required by applicable law or agreed to in writing, software
199 distributed under the License is distributed on an "AS IS" BASIS,
200 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 See the License for the specific language governing permissions and
202 limitations under the License.
diff --git a/vendor/github.com/aws/aws-sdk-go/NOTICE.txt b/vendor/github.com/aws/aws-sdk-go/NOTICE.txt
deleted file mode 100644
index 5f14d11..0000000
--- a/vendor/github.com/aws/aws-sdk-go/NOTICE.txt
+++ /dev/null
@@ -1,3 +0,0 @@
1AWS SDK for Go
2Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3Copyright 2014-2015 Stripe, Inc.
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..788fe6e 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
2 2
3import ( 3import (
4 "fmt" 4 "fmt"
5 "net/http/httputil"
6 5
7 "github.com/aws/aws-sdk-go/aws" 6 "github.com/aws/aws-sdk-go/aws"
8 "github.com/aws/aws-sdk-go/aws/awserr"
9 "github.com/aws/aws-sdk-go/aws/client/metadata" 7 "github.com/aws/aws-sdk-go/aws/client/metadata"
10 "github.com/aws/aws-sdk-go/aws/request" 8 "github.com/aws/aws-sdk-go/aws/request"
11) 9)
@@ -90,60 +88,3 @@ func (c *Client) AddDebugHandlers() {
90 c.Handlers.Send.PushFrontNamed(request.NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest}) 88 c.Handlers.Send.PushFrontNamed(request.NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest})
91 c.Handlers.Send.PushBackNamed(request.NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse}) 89 c.Handlers.Send.PushBackNamed(request.NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse})
92} 90}
93
94const logReqMsg = `DEBUG: Request %s/%s Details:
95---[ REQUEST POST-SIGN ]-----------------------------
96%s
97-----------------------------------------------------`
98
99const logReqErrMsg = `DEBUG ERROR: Request %s/%s:
100---[ REQUEST DUMP ERROR ]-----------------------------
101%s
102-----------------------------------------------------`
103
104func logRequest(r *request.Request) {
105 logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
106 dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody)
107 if err != nil {
108 r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
109 r.Error = awserr.New(request.ErrCodeRead, "an error occurred during request body reading", err)
110 return
111 }
112
113 if logBody {
114 // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's
115 // Body as a NoOpCloser and will not be reset after read by the HTTP
116 // client reader.
117 r.ResetBody()
118 }
119
120 r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody)))
121}
122
123const logRespMsg = `DEBUG: Response %s/%s Details:
124---[ RESPONSE ]--------------------------------------
125%s
126-----------------------------------------------------`
127
128const logRespErrMsg = `DEBUG ERROR: Response %s/%s:
129---[ RESPONSE DUMP ERROR ]-----------------------------
130%s
131-----------------------------------------------------`
132
133func logResponse(r *request.Request) {
134 var msg = "no response data"
135 if r.HTTPResponse != nil {
136 logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
137 dumpedBody, err := httputil.DumpResponse(r.HTTPResponse, logBody)
138 if err != nil {
139 r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
140 r.Error = awserr.New(request.ErrCodeRead, "an error occurred during response body reading", err)
141 return
142 }
143
144 msg = string(dumpedBody)
145 } else if r.Error != nil {
146 msg = r.Error.Error()
147 }
148 r.Config.Logger.Log(fmt.Sprintf(logRespMsg, r.ClientInfo.ServiceName, r.Operation.Name, msg))
149}
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..1f39c91
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
@@ -0,0 +1,108 @@
1package client
2
3import (
4 "bytes"
5 "fmt"
6 "io"
7 "io/ioutil"
8 "net/http/httputil"
9
10 "github.com/aws/aws-sdk-go/aws"
11 "github.com/aws/aws-sdk-go/aws/request"
12)
13
14const logReqMsg = `DEBUG: Request %s/%s Details:
15---[ REQUEST POST-SIGN ]-----------------------------
16%s
17-----------------------------------------------------`
18
19const logReqErrMsg = `DEBUG ERROR: Request %s/%s:
20---[ REQUEST DUMP ERROR ]-----------------------------
21%s
22------------------------------------------------------`
23
24type logWriter struct {
25 // Logger is what we will use to log the payload of a response.
26 Logger aws.Logger
27 // buf stores the contents of what has been read
28 buf *bytes.Buffer
29}
30
31func (logger *logWriter) Write(b []byte) (int, error) {
32 return logger.buf.Write(b)
33}
34
35type teeReaderCloser struct {
36 // io.Reader will be a tee reader that is used during logging.
37 // This structure will read from a body and write the contents to a logger.
38 io.Reader
39 // Source is used just to close when we are done reading.
40 Source io.ReadCloser
41}
42
43func (reader *teeReaderCloser) Close() error {
44 return reader.Source.Close()
45}
46
47func logRequest(r *request.Request) {
48 logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
49 dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody)
50 if err != nil {
51 r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
52 return
53 }
54
55 if logBody {
56 // Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's
57 // Body as a NoOpCloser and will not be reset after read by the HTTP
58 // client reader.
59 r.ResetBody()
60 }
61
62 r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody)))
63}
64
65const logRespMsg = `DEBUG: Response %s/%s Details:
66---[ RESPONSE ]--------------------------------------
67%s
68-----------------------------------------------------`
69
70const logRespErrMsg = `DEBUG ERROR: Response %s/%s:
71---[ RESPONSE DUMP ERROR ]-----------------------------
72%s
73-----------------------------------------------------`
74
75func logResponse(r *request.Request) {
76 lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)}
77 r.HTTPResponse.Body = &teeReaderCloser{
78 Reader: io.TeeReader(r.HTTPResponse.Body, lw),
79 Source: r.HTTPResponse.Body,
80 }
81
82 handlerFn := func(req *request.Request) {
83 body, err := httputil.DumpResponse(req.HTTPResponse, false)
84 if err != nil {
85 lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err))
86 return
87 }
88
89 b, err := ioutil.ReadAll(lw.buf)
90 if err != nil {
91 lw.Logger.Log(fmt.Sprintf(logRespErrMsg, req.ClientInfo.ServiceName, req.Operation.Name, err))
92 return
93 }
94 lw.Logger.Log(fmt.Sprintf(logRespMsg, req.ClientInfo.ServiceName, req.Operation.Name, string(body)))
95 if req.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) {
96 lw.Logger.Log(string(b))
97 }
98 }
99
100 const handlerName = "awsdk.client.LogResponse.ResponseBody"
101
102 r.Handlers.Unmarshal.SetBackNamed(request.NamedHandler{
103 Name: handlerName, Fn: handlerFn,
104 })
105 r.Handlers.UnmarshalError.SetBackNamed(request.NamedHandler{
106 Name: handlerName, Fn: handlerFn,
107 })
108}
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..495e3ef 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
@@ -106,6 +106,22 @@ var SendHandler = request.NamedHandler{
106 sender = sendWithoutFollowRedirects 106 sender = sendWithoutFollowRedirects
107 } 107 }
108 108
109 if request.NoBody == r.HTTPRequest.Body {
110 // Strip off the request body if the NoBody reader was used as a
111 // place holder for a request body. This prevents the SDK from
112 // making requests with a request body when it would be invalid
113 // to do so.
114 //
115 // Use a shallow copy of the http.Request to ensure the race condition
116 // of transport on Body will not trigger
117 reqOrig, reqCopy := r.HTTPRequest, *r.HTTPRequest
118 reqCopy.Body = nil
119 r.HTTPRequest = &reqCopy
120 defer func() {
121 r.HTTPRequest = reqOrig
122 }()
123 }
124
109 var err error 125 var err error
110 r.HTTPResponse, err = sender(r) 126 r.HTTPResponse, err = sender(r)
111 if err != nil { 127 if err != nil {
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
3import ( 3import (
4 "fmt" 4 "fmt"
5 "os" 5 "os"
6 "path/filepath"
7 6
8 "github.com/go-ini/ini" 7 "github.com/go-ini/ini"
9 8
10 "github.com/aws/aws-sdk-go/aws/awserr" 9 "github.com/aws/aws-sdk-go/aws/awserr"
10 "github.com/aws/aws-sdk-go/internal/shareddefaults"
11) 11)
12 12
13// SharedCredsProviderName provides a name of SharedCreds provider 13// SharedCredsProviderName provides a name of SharedCreds provider
@@ -15,8 +15,6 @@ const SharedCredsProviderName = "SharedCredentialsProvider"
15 15
16var ( 16var (
17 // ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found. 17 // ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found.
18 //
19 // @readonly
20 ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil) 18 ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil)
21) 19)
22 20
@@ -117,22 +115,23 @@ func loadProfile(filename, profile string) (Value, error) {
117// 115//
118// Will return an error if the user's home directory path cannot be found. 116// Will return an error if the user's home directory path cannot be found.
119func (p *SharedCredentialsProvider) filename() (string, error) { 117func (p *SharedCredentialsProvider) filename() (string, error) {
120 if p.Filename == "" { 118 if len(p.Filename) != 0 {
121 if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); p.Filename != "" { 119 return p.Filename, nil
122 return p.Filename, nil 120 }
123 } 121
124 122 if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(p.Filename) != 0 {
125 homeDir := os.Getenv("HOME") // *nix 123 return p.Filename, nil
126 if homeDir == "" { // Windows
127 homeDir = os.Getenv("USERPROFILE")
128 }
129 if homeDir == "" {
130 return "", ErrSharedCredentialsHomeNotFound
131 }
132
133 p.Filename = filepath.Join(homeDir, ".aws", "credentials")
134 } 124 }
135 125
126 if home := shareddefaults.UserHomeDir(); len(home) == 0 {
127 // Backwards compatibility of home directly not found error being returned.
128 // This error is too verbose, failure when opening the file would of been
129 // a better error to return.
130 return "", ErrSharedCredentialsHomeNotFound
131 }
132
133 p.Filename = shareddefaults.SharedCredentialsFilename()
134
136 return p.Filename, nil 135 return p.Filename, nil
137} 136}
138 137
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 @@
1package defaults
2
3import (
4 "github.com/aws/aws-sdk-go/internal/shareddefaults"
5)
6
7// SharedCredentialsFilename returns the SDK's default file path
8// for the shared credentials file.
9//
10// Builds the shared config file path based on the OS's platform.
11//
12// - Linux/Unix: $HOME/.aws/credentials
13// - Windows: %USERPROFILE%\.aws\credentials
14func SharedCredentialsFilename() string {
15 return shareddefaults.SharedCredentialsFilename()
16}
17
18// SharedConfigFilename returns the SDK's default file path for
19// the shared config file.
20//
21// Builds the shared config file path based on the OS's platform.
22//
23// - Linux/Unix: $HOME/.aws/config
24// - Windows: %USERPROFILE%\.aws\config
25func SharedConfigFilename() string {
26 return shareddefaults.SharedConfigFilename()
27}
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 e6d7ede..d6d87e4 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
@@ -47,6 +47,7 @@ const (
47 ApigatewayServiceID = "apigateway" // Apigateway. 47 ApigatewayServiceID = "apigateway" // Apigateway.
48 ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling. 48 ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling.
49 Appstream2ServiceID = "appstream2" // Appstream2. 49 Appstream2ServiceID = "appstream2" // Appstream2.
50 AthenaServiceID = "athena" // Athena.
50 AutoscalingServiceID = "autoscaling" // Autoscaling. 51 AutoscalingServiceID = "autoscaling" // Autoscaling.
51 BatchServiceID = "batch" // Batch. 52 BatchServiceID = "batch" // Batch.
52 BudgetsServiceID = "budgets" // Budgets. 53 BudgetsServiceID = "budgets" // Budgets.
@@ -307,6 +308,14 @@ var awsPartition = partition{
307 "us-west-2": endpoint{}, 308 "us-west-2": endpoint{},
308 }, 309 },
309 }, 310 },
311 "athena": service{
312
313 Endpoints: endpoints{
314 "us-east-1": endpoint{},
315 "us-east-2": endpoint{},
316 "us-west-2": endpoint{},
317 },
318 },
310 "autoscaling": service{ 319 "autoscaling": service{
311 Defaults: endpoint{ 320 Defaults: endpoint{
312 Protocols: []string{"http", "https"}, 321 Protocols: []string{"http", "https"},
@@ -331,7 +340,9 @@ var awsPartition = partition{
331 "batch": service{ 340 "batch": service{
332 341
333 Endpoints: endpoints{ 342 Endpoints: endpoints{
343 "eu-west-1": endpoint{},
334 "us-east-1": endpoint{}, 344 "us-east-1": endpoint{},
345 "us-west-2": endpoint{},
335 }, 346 },
336 }, 347 },
337 "budgets": service{ 348 "budgets": service{
@@ -457,10 +468,14 @@ var awsPartition = partition{
457 "codecommit": service{ 468 "codecommit": service{
458 469
459 Endpoints: endpoints{ 470 Endpoints: endpoints{
460 "eu-west-1": endpoint{}, 471 "ap-northeast-1": endpoint{},
461 "us-east-1": endpoint{}, 472 "ap-southeast-1": endpoint{},
462 "us-east-2": endpoint{}, 473 "ap-southeast-2": endpoint{},
463 "us-west-2": endpoint{}, 474 "eu-central-1": endpoint{},
475 "eu-west-1": endpoint{},
476 "us-east-1": endpoint{},
477 "us-east-2": endpoint{},
478 "us-west-2": endpoint{},
464 }, 479 },
465 }, 480 },
466 "codedeploy": service{ 481 "codedeploy": service{
@@ -639,11 +654,15 @@ var awsPartition = partition{
639 654
640 Endpoints: endpoints{ 655 Endpoints: endpoints{
641 "ap-northeast-1": endpoint{}, 656 "ap-northeast-1": endpoint{},
657 "ap-northeast-2": endpoint{},
642 "ap-southeast-1": endpoint{}, 658 "ap-southeast-1": endpoint{},
643 "ap-southeast-2": endpoint{}, 659 "ap-southeast-2": endpoint{},
660 "ca-central-1": endpoint{},
644 "eu-central-1": endpoint{}, 661 "eu-central-1": endpoint{},
645 "eu-west-1": endpoint{}, 662 "eu-west-1": endpoint{},
663 "eu-west-2": endpoint{},
646 "us-east-1": endpoint{}, 664 "us-east-1": endpoint{},
665 "us-east-2": endpoint{},
647 "us-west-2": endpoint{}, 666 "us-west-2": endpoint{},
648 }, 667 },
649 }, 668 },
@@ -1075,7 +1094,16 @@ var awsPartition = partition{
1075 "lightsail": service{ 1094 "lightsail": service{
1076 1095
1077 Endpoints: endpoints{ 1096 Endpoints: endpoints{
1078 "us-east-1": endpoint{}, 1097 "ap-northeast-1": endpoint{},
1098 "ap-south-1": endpoint{},
1099 "ap-southeast-1": endpoint{},
1100 "ap-southeast-2": endpoint{},
1101 "eu-central-1": endpoint{},
1102 "eu-west-1": endpoint{},
1103 "eu-west-2": endpoint{},
1104 "us-east-1": endpoint{},
1105 "us-east-2": endpoint{},
1106 "us-west-2": endpoint{},
1079 }, 1107 },
1080 }, 1108 },
1081 "logs": service{ 1109 "logs": service{
@@ -1488,10 +1516,13 @@ var awsPartition = partition{
1488 Endpoints: endpoints{ 1516 Endpoints: endpoints{
1489 "ap-northeast-1": endpoint{}, 1517 "ap-northeast-1": endpoint{},
1490 "ap-northeast-2": endpoint{}, 1518 "ap-northeast-2": endpoint{},
1519 "ap-south-1": endpoint{},
1491 "ap-southeast-1": endpoint{}, 1520 "ap-southeast-1": endpoint{},
1492 "ap-southeast-2": endpoint{}, 1521 "ap-southeast-2": endpoint{},
1522 "ca-central-1": endpoint{},
1493 "eu-central-1": endpoint{}, 1523 "eu-central-1": endpoint{},
1494 "eu-west-1": endpoint{}, 1524 "eu-west-1": endpoint{},
1525 "eu-west-2": endpoint{},
1495 "sa-east-1": endpoint{}, 1526 "sa-east-1": endpoint{},
1496 "us-east-1": endpoint{}, 1527 "us-east-1": endpoint{},
1497 "us-east-2": endpoint{}, 1528 "us-east-2": endpoint{},
@@ -1531,7 +1562,7 @@ var awsPartition = partition{
1531 }, 1562 },
1532 "streams.dynamodb": service{ 1563 "streams.dynamodb": service{
1533 Defaults: endpoint{ 1564 Defaults: endpoint{
1534 Protocols: []string{"http", "http", "https", "https"}, 1565 Protocols: []string{"http", "https"},
1535 CredentialScope: credentialScope{ 1566 CredentialScope: credentialScope{
1536 Service: "dynamodb", 1567 Service: "dynamodb",
1537 }, 1568 },
@@ -1586,9 +1617,33 @@ var awsPartition = partition{
1586 "eu-west-2": endpoint{}, 1617 "eu-west-2": endpoint{},
1587 "sa-east-1": endpoint{}, 1618 "sa-east-1": endpoint{},
1588 "us-east-1": endpoint{}, 1619 "us-east-1": endpoint{},
1589 "us-east-2": endpoint{}, 1620 "us-east-1-fips": endpoint{
1590 "us-west-1": endpoint{}, 1621 Hostname: "sts-fips.us-east-1.amazonaws.com",
1591 "us-west-2": endpoint{}, 1622 CredentialScope: credentialScope{
1623 Region: "us-east-1",
1624 },
1625 },
1626 "us-east-2": endpoint{},
1627 "us-east-2-fips": endpoint{
1628 Hostname: "sts-fips.us-east-2.amazonaws.com",
1629 CredentialScope: credentialScope{
1630 Region: "us-east-2",
1631 },
1632 },
1633 "us-west-1": endpoint{},
1634 "us-west-1-fips": endpoint{
1635 Hostname: "sts-fips.us-west-1.amazonaws.com",
1636 CredentialScope: credentialScope{
1637 Region: "us-west-1",
1638 },
1639 },
1640 "us-west-2": endpoint{},
1641 "us-west-2-fips": endpoint{
1642 Hostname: "sts-fips.us-west-2.amazonaws.com",
1643 CredentialScope: credentialScope{
1644 Region: "us-west-2",
1645 },
1646 },
1592 }, 1647 },
1593 }, 1648 },
1594 "support": service{ 1649 "support": service{
@@ -1688,8 +1743,10 @@ var awsPartition = partition{
1688 "ap-south-1": endpoint{}, 1743 "ap-south-1": endpoint{},
1689 "ap-southeast-1": endpoint{}, 1744 "ap-southeast-1": endpoint{},
1690 "ap-southeast-2": endpoint{}, 1745 "ap-southeast-2": endpoint{},
1746 "ca-central-1": endpoint{},
1691 "eu-central-1": endpoint{}, 1747 "eu-central-1": endpoint{},
1692 "eu-west-1": endpoint{}, 1748 "eu-west-1": endpoint{},
1749 "eu-west-2": endpoint{},
1693 "sa-east-1": endpoint{}, 1750 "sa-east-1": endpoint{},
1694 "us-east-1": endpoint{}, 1751 "us-east-1": endpoint{},
1695 "us-east-2": endpoint{}, 1752 "us-east-2": endpoint{},
@@ -1912,7 +1969,7 @@ var awscnPartition = partition{
1912 }, 1969 },
1913 "streams.dynamodb": service{ 1970 "streams.dynamodb": service{
1914 Defaults: endpoint{ 1971 Defaults: endpoint{
1915 Protocols: []string{"http", "http", "https", "https"}, 1972 Protocols: []string{"http", "https"},
1916 CredentialScope: credentialScope{ 1973 CredentialScope: credentialScope{
1917 Service: "dynamodb", 1974 Service: "dynamodb",
1918 }, 1975 },
@@ -1994,6 +2051,12 @@ var awsusgovPartition = partition{
1994 "us-gov-west-1": endpoint{}, 2051 "us-gov-west-1": endpoint{},
1995 }, 2052 },
1996 }, 2053 },
2054 "codedeploy": service{
2055
2056 Endpoints: endpoints{
2057 "us-gov-west-1": endpoint{},
2058 },
2059 },
1997 "config": service{ 2060 "config": service{
1998 2061
1999 Endpoints: endpoints{ 2062 Endpoints: endpoints{
@@ -2051,6 +2114,12 @@ var awsusgovPartition = partition{
2051 }, 2114 },
2052 }, 2115 },
2053 }, 2116 },
2117 "events": service{
2118
2119 Endpoints: endpoints{
2120 "us-gov-west-1": endpoint{},
2121 },
2122 },
2054 "glacier": service{ 2123 "glacier": service{
2055 2124
2056 Endpoints: endpoints{ 2125 Endpoints: endpoints{
@@ -2084,6 +2153,12 @@ var awsusgovPartition = partition{
2084 "us-gov-west-1": endpoint{}, 2153 "us-gov-west-1": endpoint{},
2085 }, 2154 },
2086 }, 2155 },
2156 "lambda": service{
2157
2158 Endpoints: endpoints{
2159 "us-gov-west-1": endpoint{},
2160 },
2161 },
2087 "logs": service{ 2162 "logs": service{
2088 2163
2089 Endpoints: endpoints{ 2164 Endpoints: endpoints{
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 @@
1// +build !appengine 1// +build !appengine,!plan9
2 2
3package request 3package request
4 4
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
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 @@
1// +build appengine 1// +build appengine plan9
2 2
3package request 3package request
4 4
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..802ac88 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
@@ -158,6 +158,37 @@ func (l *HandlerList) RemoveByName(name string) {
158 } 158 }
159} 159}
160 160
161// SwapNamed will swap out any existing handlers with the same name as the
162// passed in NamedHandler returning true if handlers were swapped. False is
163// returned otherwise.
164func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) {
165 for i := 0; i < len(l.list); i++ {
166 if l.list[i].Name == n.Name {
167 l.list[i].Fn = n.Fn
168 swapped = true
169 }
170 }
171
172 return swapped
173}
174
175// SetBackNamed will replace the named handler if it exists in the handler list.
176// If the handler does not exist the handler will be added to the end of the list.
177func (l *HandlerList) SetBackNamed(n NamedHandler) {
178 if !l.SwapNamed(n) {
179 l.PushBackNamed(n)
180 }
181}
182
183// SetFrontNamed will replace the named handler if it exists in the handler list.
184// If the handler does not exist the handler will be added to the beginning of
185// the list.
186func (l *HandlerList) SetFrontNamed(n NamedHandler) {
187 if !l.SwapNamed(n) {
188 l.PushFrontNamed(n)
189 }
190}
191
161// Run executes all handlers in the list with a given request object. 192// Run executes all handlers in the list with a given request object.
162func (l *HandlerList) Run(r *Request) { 193func (l *HandlerList) Run(r *Request) {
163 for i, h := range l.list { 194 for i, h := range l.list {
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..299dc37 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
@@ -338,10 +338,7 @@ func (r *Request) Sign() error {
338 return r.Error 338 return r.Error
339} 339}
340 340
341// ResetBody rewinds the request body backto its starting position, and 341func (r *Request) getNextRequestBody() (io.ReadCloser, error) {
342// set's the HTTP Request body reference. When the body is read prior
343// to being sent in the HTTP request it will need to be rewound.
344func (r *Request) ResetBody() {
345 if r.safeBody != nil { 342 if r.safeBody != nil {
346 r.safeBody.Close() 343 r.safeBody.Close()
347 } 344 }
@@ -363,14 +360,14 @@ func (r *Request) ResetBody() {
363 // Related golang/go#18257 360 // Related golang/go#18257
364 l, err := computeBodyLength(r.Body) 361 l, err := computeBodyLength(r.Body)
365 if err != nil { 362 if err != nil {
366 r.Error = awserr.New(ErrCodeSerialization, "failed to compute request body size", err) 363 return nil, awserr.New(ErrCodeSerialization, "failed to compute request body size", err)
367 return
368 } 364 }
369 365
366 var body io.ReadCloser
370 if l == 0 { 367 if l == 0 {
371 r.HTTPRequest.Body = noBodyReader 368 body = NoBody
372 } else if l > 0 { 369 } else if l > 0 {
373 r.HTTPRequest.Body = r.safeBody 370 body = r.safeBody
374 } else { 371 } else {
375 // Hack to prevent sending bodies for methods where the body 372 // Hack to prevent sending bodies for methods where the body
376 // should be ignored by the server. Sending bodies on these 373 // should be ignored by the server. Sending bodies on these
@@ -382,11 +379,13 @@ func (r *Request) ResetBody() {
382 // a io.Reader that was not also an io.Seeker. 379 // a io.Reader that was not also an io.Seeker.
383 switch r.Operation.HTTPMethod { 380 switch r.Operation.HTTPMethod {
384 case "GET", "HEAD", "DELETE": 381 case "GET", "HEAD", "DELETE":
385 r.HTTPRequest.Body = noBodyReader 382 body = NoBody
386 default: 383 default:
387 r.HTTPRequest.Body = r.safeBody 384 body = r.safeBody
388 } 385 }
389 } 386 }
387
388 return body, nil
390} 389}
391 390
392// Attempts to compute the length of the body of the reader using the 391// Attempts to compute the length of the body of the reader using the
@@ -488,7 +487,7 @@ func (r *Request) Send() error {
488 r.Handlers.Retry.Run(r) 487 r.Handlers.Retry.Run(r)
489 r.Handlers.AfterRetry.Run(r) 488 r.Handlers.AfterRetry.Run(r)
490 if r.Error != nil { 489 if r.Error != nil {
491 debugLogReqError(r, "Send Request", false, r.Error) 490 debugLogReqError(r, "Send Request", false, err)
492 return r.Error 491 return r.Error
493 } 492 }
494 debugLogReqError(r, "Send Request", true, err) 493 debugLogReqError(r, "Send Request", true, err)
@@ -497,12 +496,13 @@ func (r *Request) Send() error {
497 r.Handlers.UnmarshalMeta.Run(r) 496 r.Handlers.UnmarshalMeta.Run(r)
498 r.Handlers.ValidateResponse.Run(r) 497 r.Handlers.ValidateResponse.Run(r)
499 if r.Error != nil { 498 if r.Error != nil {
500 err := r.Error
501 r.Handlers.UnmarshalError.Run(r) 499 r.Handlers.UnmarshalError.Run(r)
500 err := r.Error
501
502 r.Handlers.Retry.Run(r) 502 r.Handlers.Retry.Run(r)
503 r.Handlers.AfterRetry.Run(r) 503 r.Handlers.AfterRetry.Run(r)
504 if r.Error != nil { 504 if r.Error != nil {
505 debugLogReqError(r, "Validate Response", false, r.Error) 505 debugLogReqError(r, "Validate Response", false, err)
506 return r.Error 506 return r.Error
507 } 507 }
508 debugLogReqError(r, "Validate Response", true, err) 508 debugLogReqError(r, "Validate Response", true, err)
@@ -515,7 +515,7 @@ func (r *Request) Send() error {
515 r.Handlers.Retry.Run(r) 515 r.Handlers.Retry.Run(r)
516 r.Handlers.AfterRetry.Run(r) 516 r.Handlers.AfterRetry.Run(r)
517 if r.Error != nil { 517 if r.Error != nil {
518 debugLogReqError(r, "Unmarshal Response", false, r.Error) 518 debugLogReqError(r, "Unmarshal Response", false, err)
519 return r.Error 519 return r.Error
520 } 520 }
521 debugLogReqError(r, "Unmarshal Response", true, err) 521 debugLogReqError(r, "Unmarshal Response", true, err)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
index 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 }
16func (noBody) Close() error { return nil } 16func (noBody) Close() error { return nil }
17func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil } 17func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil }
18 18
19// Is an empty reader that will trigger the Go HTTP client to not include 19// NoBody is an empty reader that will trigger the Go HTTP client to not include
20// and body in the HTTP request. 20// and body in the HTTP request.
21var noBodyReader = noBody{} 21var NoBody = noBody{}
22
23// ResetBody rewinds the request body back to its starting position, and
24// set's the HTTP Request body reference. When the body is read prior
25// to being sent in the HTTP request it will need to be rewound.
26//
27// ResetBody will automatically be called by the SDK's build handler, but if
28// the request is being used directly ResetBody must be called before the request
29// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
30// call ResetBody.
31func (r *Request) ResetBody() {
32 body, err := r.getNextRequestBody()
33 if err != nil {
34 r.Error = err
35 return
36 }
37
38 r.HTTPRequest.Body = body
39}
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 @@
2 2
3package request 3package request
4 4
5import "net/http" 5import (
6 "net/http"
7)
6 8
7// Is a http.NoBody reader instructing Go HTTP client to not include 9// NoBody is a http.NoBody reader instructing Go HTTP client to not include
8// and body in the HTTP request. 10// and body in the HTTP request.
9var noBodyReader = http.NoBody 11var NoBody = http.NoBody
12
13// ResetBody rewinds the request body back to its starting position, and
14// set's the HTTP Request body reference. When the body is read prior
15// to being sent in the HTTP request it will need to be rewound.
16//
17// ResetBody will automatically be called by the SDK's build handler, but if
18// the request is being used directly ResetBody must be called before the request
19// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
20// call ResetBody.
21//
22// Will also set the Go 1.8's http.Request.GetBody member to allow retrying
23// PUT/POST redirects.
24func (r *Request) ResetBody() {
25 body, err := r.getNextRequestBody()
26 if err != nil {
27 r.Error = err
28 return
29 }
30
31 r.HTTPRequest.Body = body
32 r.HTTPRequest.GetBody = r.getNextRequestBody
33}
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..8d369c1 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
@@ -38,7 +38,6 @@ var throttleCodes = map[string]struct{}{
38 "ThrottlingException": {}, 38 "ThrottlingException": {},
39 "RequestLimitExceeded": {}, 39 "RequestLimitExceeded": {},
40 "RequestThrottled": {}, 40 "RequestThrottled": {},
41 "LimitExceededException": {}, // Deleting 10+ DynamoDb tables at once
42 "TooManyRequestsException": {}, // Lambda functions 41 "TooManyRequestsException": {}, // Lambda functions
43 "PriorRequestNotComplete": {}, // Route53 42 "PriorRequestNotComplete": {}, // Route53
44} 43}
@@ -75,6 +74,10 @@ var validParentCodes = map[string]struct{}{
75 ErrCodeRead: struct{}{}, 74 ErrCodeRead: struct{}{},
76} 75}
77 76
77type temporaryError interface {
78 Temporary() bool
79}
80
78func isNestedErrorRetryable(parentErr awserr.Error) bool { 81func isNestedErrorRetryable(parentErr awserr.Error) bool {
79 if parentErr == nil { 82 if parentErr == nil {
80 return false 83 return false
@@ -93,6 +96,10 @@ func isNestedErrorRetryable(parentErr awserr.Error) bool {
93 return isCodeRetryable(aerr.Code()) 96 return isCodeRetryable(aerr.Code())
94 } 97 }
95 98
99 if t, ok := err.(temporaryError); ok {
100 return t.Temporary()
101 }
102
96 return isErrConnectionReset(err) 103 return isErrConnectionReset(err)
97} 104}
98 105
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..7357e54 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,7 +2,6 @@ package session
2 2
3import ( 3import (
4 "os" 4 "os"
5 "path/filepath"
6 "strconv" 5 "strconv"
7 6
8 "github.com/aws/aws-sdk-go/aws/credentials" 7 "github.com/aws/aws-sdk-go/aws/credentials"
@@ -116,6 +115,12 @@ var (
116 "AWS_PROFILE", 115 "AWS_PROFILE",
117 "AWS_DEFAULT_PROFILE", // Only read if AWS_SDK_LOAD_CONFIG is also set 116 "AWS_DEFAULT_PROFILE", // Only read if AWS_SDK_LOAD_CONFIG is also set
118 } 117 }
118 sharedCredsFileEnvKey = []string{
119 "AWS_SHARED_CREDENTIALS_FILE",
120 }
121 sharedConfigFileEnvKey = []string{
122 "AWS_CONFIG_FILE",
123 }
119) 124)
120 125
121// loadEnvConfig retrieves the SDK's environment configuration. 126// loadEnvConfig retrieves the SDK's environment configuration.
@@ -165,8 +170,8 @@ func envConfigLoad(enableSharedConfig bool) envConfig {
165 setFromEnvVal(&cfg.Region, regionKeys) 170 setFromEnvVal(&cfg.Region, regionKeys)
166 setFromEnvVal(&cfg.Profile, profileKeys) 171 setFromEnvVal(&cfg.Profile, profileKeys)
167 172
168 cfg.SharedCredentialsFile = sharedCredentialsFilename() 173 setFromEnvVal(&cfg.SharedCredentialsFile, sharedCredsFileEnvKey)
169 cfg.SharedConfigFile = sharedConfigFilename() 174 setFromEnvVal(&cfg.SharedConfigFile, sharedConfigFileEnvKey)
170 175
171 cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE") 176 cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE")
172 177
@@ -181,28 +186,3 @@ func setFromEnvVal(dst *string, keys []string) {
181 } 186 }
182 } 187 }
183} 188}
184
185func sharedCredentialsFilename() string {
186 if name := os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(name) > 0 {
187 return name
188 }
189
190 return filepath.Join(userHomeDir(), ".aws", "credentials")
191}
192
193func sharedConfigFilename() string {
194 if name := os.Getenv("AWS_CONFIG_FILE"); len(name) > 0 {
195 return name
196 }
197
198 return filepath.Join(userHomeDir(), ".aws", "config")
199}
200
201func userHomeDir() string {
202 homeDir := os.Getenv("HOME") // *nix
203 if len(homeDir) == 0 { // windows
204 homeDir = os.Getenv("USERPROFILE")
205 }
206
207 return homeDir
208}
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..9f75d5a 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
@@ -155,6 +155,10 @@ type Options struct {
155 // and enable or disable the shared config functionality. 155 // and enable or disable the shared config functionality.
156 SharedConfigState SharedConfigState 156 SharedConfigState SharedConfigState
157 157
158 // Ordered list of files the session will load configuration from.
159 // It will override environment variable AWS_SHARED_CREDENTIALS_FILE, AWS_CONFIG_FILE.
160 SharedConfigFiles []string
161
158 // When the SDK's shared config is configured to assume a role with MFA 162 // When the SDK's shared config is configured to assume a role with MFA
159 // this option is required in order to provide the mechanism that will 163 // this option is required in order to provide the mechanism that will
160 // retrieve the MFA token. There is no default value for this field. If 164 // retrieve the MFA token. There is no default value for this field. If
@@ -239,6 +243,13 @@ func NewSessionWithOptions(opts Options) (*Session, error) {
239 envCfg.EnableSharedConfig = true 243 envCfg.EnableSharedConfig = true
240 } 244 }
241 245
246 if len(envCfg.SharedCredentialsFile) == 0 {
247 envCfg.SharedCredentialsFile = defaults.SharedCredentialsFilename()
248 }
249 if len(envCfg.SharedConfigFile) == 0 {
250 envCfg.SharedConfigFile = defaults.SharedConfigFilename()
251 }
252
242 // Only use AWS_CA_BUNDLE if session option is not provided. 253 // Only use AWS_CA_BUNDLE if session option is not provided.
243 if len(envCfg.CustomCABundle) != 0 && opts.CustomCABundle == nil { 254 if len(envCfg.CustomCABundle) != 0 && opts.CustomCABundle == nil {
244 f, err := os.Open(envCfg.CustomCABundle) 255 f, err := os.Open(envCfg.CustomCABundle)
@@ -304,13 +315,18 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session,
304 userCfg := &aws.Config{} 315 userCfg := &aws.Config{}
305 userCfg.MergeIn(cfgs...) 316 userCfg.MergeIn(cfgs...)
306 317
307 // Order config files will be loaded in with later files overwriting 318 // Ordered config files will be loaded in with later files overwriting
308 // previous config file values. 319 // previous config file values.
309 cfgFiles := []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile} 320 var cfgFiles []string
310 if !envCfg.EnableSharedConfig { 321 if opts.SharedConfigFiles != nil {
311 // The shared config file (~/.aws/config) is only loaded if instructed 322 cfgFiles = opts.SharedConfigFiles
312 // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG). 323 } else {
313 cfgFiles = cfgFiles[1:] 324 cfgFiles = []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile}
325 if !envCfg.EnableSharedConfig {
326 // The shared config file (~/.aws/config) is only loaded if instructed
327 // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG).
328 cfgFiles = cfgFiles[1:]
329 }
314 } 330 }
315 331
316 // Load additional config from file(s) 332 // Load additional config from file(s)
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) {
113 113
114 f, err := ini.Load(b) 114 f, err := ini.Load(b)
115 if err != nil { 115 if err != nil {
116 return nil, SharedConfigLoadError{Filename: filename} 116 return nil, SharedConfigLoadError{Filename: filename, Err: err}
117 } 117 }
118 118
119 files = append(files, sharedConfigFile{ 119 files = append(files, sharedConfigFile{
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 129dad9..bbf4c2f 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
5const SDKName = "aws-sdk-go" 5const SDKName = "aws-sdk-go"
6 6
7// SDKVersion is the version of this SDK 7// SDKVersion is the version of this SDK
8const SDKVersion = "1.8.21" 8const SDKVersion = "1.8.34"
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
new file mode 100644
index 0000000..ebcbc2b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
@@ -0,0 +1,40 @@
1package shareddefaults
2
3import (
4 "os"
5 "path/filepath"
6 "runtime"
7)
8
9// SharedCredentialsFilename returns the SDK's default file path
10// for the shared credentials file.
11//
12// Builds the shared config file path based on the OS's platform.
13//
14// - Linux/Unix: $HOME/.aws/credentials
15// - Windows: %USERPROFILE%\.aws\credentials
16func SharedCredentialsFilename() string {
17 return filepath.Join(UserHomeDir(), ".aws", "credentials")
18}
19
20// SharedConfigFilename returns the SDK's default file path for
21// the shared config file.
22//
23// Builds the shared config file path based on the OS's platform.
24//
25// - Linux/Unix: $HOME/.aws/config
26// - Windows: %USERPROFILE%\.aws\config
27func SharedConfigFilename() string {
28 return filepath.Join(UserHomeDir(), ".aws", "config")
29}
30
31// UserHomeDir returns the home directory for the user the process is
32// running under.
33func UserHomeDir() string {
34 if runtime.GOOS == "windows" { // Windows
35 return os.Getenv("USERPROFILE")
36 }
37
38 // *nix
39 return os.Getenv("HOME")
40}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
index 2de6528..e5c105f 100644
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
+++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
@@ -1085,7 +1085,7 @@ type AssumeRoleInput struct {
1085 // 1085 //
1086 // The regex used to validated this parameter is a string of characters consisting 1086 // The regex used to validated this parameter is a string of characters consisting
1087 // of upper- and lower-case alphanumeric characters with no spaces. You can 1087 // of upper- and lower-case alphanumeric characters with no spaces. You can
1088 // also include underscores or any of the following characters: =,.@:\/- 1088 // also include underscores or any of the following characters: =,.@:/-
1089 ExternalId *string `min:"2" type:"string"` 1089 ExternalId *string `min:"2" type:"string"`
1090 1090
1091 // An IAM policy in JSON format. 1091 // An IAM policy in JSON format.
@@ -2269,9 +2269,9 @@ type GetSessionTokenInput struct {
2269 // You can find the device for an IAM user by going to the AWS Management Console 2269 // You can find the device for an IAM user by going to the AWS Management Console
2270 // and viewing the user's security credentials. 2270 // and viewing the user's security credentials.
2271 // 2271 //
2272 // The regex used to validate this parameter is a string of characters consisting 2272 // The regex used to validated this parameter is a string of characters consisting
2273 // of upper- and lower-case alphanumeric characters with no spaces. You can 2273 // of upper- and lower-case alphanumeric characters with no spaces. You can
2274 // also include underscores or any of the following characters: =,.@- 2274 // also include underscores or any of the following characters: =,.@:/-
2275 SerialNumber *string `min:"9" type:"string"` 2275 SerialNumber *string `min:"9" type:"string"`
2276 2276
2277 // The value provided by the MFA device, if MFA is required. If any policy requires 2277 // The value provided by the MFA device, if MFA is required. If any policy requires