diff options
author | Jake Champlin <jake.champlin.27@gmail.com> | 2017-06-06 12:40:07 -0400 |
---|---|---|
committer | Jake Champlin <jake.champlin.27@gmail.com> | 2017-06-06 12:40:07 -0400 |
commit | bae9f6d2fd5eb5bc80929bd393932b23f14d7c93 (patch) | |
tree | ca9ab12a7d78b1fc27a8f734729081357ce6d252 /vendor/github.com/aws/aws-sdk-go/service | |
parent | 254c495b6bebab3fb72a243c4bce858d79e6ee99 (diff) | |
download | terraform-provider-statuscake-bae9f6d2fd5eb5bc80929bd393932b23f14d7c93.tar.gz terraform-provider-statuscake-bae9f6d2fd5eb5bc80929bd393932b23f14d7c93.tar.zst terraform-provider-statuscake-bae9f6d2fd5eb5bc80929bd393932b23f14d7c93.zip |
Initial transfer of provider code
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/service')
20 files changed, 23022 insertions, 0 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go new file mode 100644 index 0000000..52ac02c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go | |||
@@ -0,0 +1,19245 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | package s3 | ||
4 | |||
5 | import ( | ||
6 | "fmt" | ||
7 | "io" | ||
8 | "time" | ||
9 | |||
10 | "github.com/aws/aws-sdk-go/aws" | ||
11 | "github.com/aws/aws-sdk-go/aws/awsutil" | ||
12 | "github.com/aws/aws-sdk-go/aws/request" | ||
13 | "github.com/aws/aws-sdk-go/private/protocol" | ||
14 | "github.com/aws/aws-sdk-go/private/protocol/restxml" | ||
15 | ) | ||
16 | |||
17 | const opAbortMultipartUpload = "AbortMultipartUpload" | ||
18 | |||
19 | // AbortMultipartUploadRequest generates a "aws/request.Request" representing the | ||
20 | // client's request for the AbortMultipartUpload operation. The "output" return | ||
21 | // value can be used to capture response data after the request's "Send" method | ||
22 | // is called. | ||
23 | // | ||
24 | // See AbortMultipartUpload for usage and error information. | ||
25 | // | ||
26 | // Creating a request object using this method should be used when you want to inject | ||
27 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
28 | // access properties on the request object before or after sending the request. If | ||
29 | // you just want the service response, call the AbortMultipartUpload method directly | ||
30 | // instead. | ||
31 | // | ||
32 | // Note: You must call the "Send" method on the returned request object in order | ||
33 | // to execute the request. | ||
34 | // | ||
35 | // // Example sending a request using the AbortMultipartUploadRequest method. | ||
36 | // req, resp := client.AbortMultipartUploadRequest(params) | ||
37 | // | ||
38 | // err := req.Send() | ||
39 | // if err == nil { // resp is now filled | ||
40 | // fmt.Println(resp) | ||
41 | // } | ||
42 | // | ||
43 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload | ||
44 | func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) { | ||
45 | op := &request.Operation{ | ||
46 | Name: opAbortMultipartUpload, | ||
47 | HTTPMethod: "DELETE", | ||
48 | HTTPPath: "/{Bucket}/{Key+}", | ||
49 | } | ||
50 | |||
51 | if input == nil { | ||
52 | input = &AbortMultipartUploadInput{} | ||
53 | } | ||
54 | |||
55 | output = &AbortMultipartUploadOutput{} | ||
56 | req = c.newRequest(op, input, output) | ||
57 | return | ||
58 | } | ||
59 | |||
60 | // AbortMultipartUpload API operation for Amazon Simple Storage Service. | ||
61 | // | ||
62 | // Aborts a multipart upload. | ||
63 | // | ||
64 | // To verify that all parts have been removed, so you don't get charged for | ||
65 | // the part storage, you should call the List Parts operation and ensure the | ||
66 | // parts list is empty. | ||
67 | // | ||
68 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
69 | // with awserr.Error's Code and Message methods to get detailed information about | ||
70 | // the error. | ||
71 | // | ||
72 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
73 | // API operation AbortMultipartUpload for usage and error information. | ||
74 | // | ||
75 | // Returned Error Codes: | ||
76 | // * ErrCodeNoSuchUpload "NoSuchUpload" | ||
77 | // The specified multipart upload does not exist. | ||
78 | // | ||
79 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload | ||
80 | func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) { | ||
81 | req, out := c.AbortMultipartUploadRequest(input) | ||
82 | return out, req.Send() | ||
83 | } | ||
84 | |||
85 | // AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of | ||
86 | // the ability to pass a context and additional request options. | ||
87 | // | ||
88 | // See AbortMultipartUpload for details on how to use this API operation. | ||
89 | // | ||
90 | // The context must be non-nil and will be used for request cancellation. If | ||
91 | // the context is nil a panic will occur. In the future the SDK may create | ||
92 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
93 | // for more information on using Contexts. | ||
94 | func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) { | ||
95 | req, out := c.AbortMultipartUploadRequest(input) | ||
96 | req.SetContext(ctx) | ||
97 | req.ApplyOptions(opts...) | ||
98 | return out, req.Send() | ||
99 | } | ||
100 | |||
101 | const opCompleteMultipartUpload = "CompleteMultipartUpload" | ||
102 | |||
103 | // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the | ||
104 | // client's request for the CompleteMultipartUpload operation. The "output" return | ||
105 | // value can be used to capture response data after the request's "Send" method | ||
106 | // is called. | ||
107 | // | ||
108 | // See CompleteMultipartUpload for usage and error information. | ||
109 | // | ||
110 | // Creating a request object using this method should be used when you want to inject | ||
111 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
112 | // access properties on the request object before or after sending the request. If | ||
113 | // you just want the service response, call the CompleteMultipartUpload method directly | ||
114 | // instead. | ||
115 | // | ||
116 | // Note: You must call the "Send" method on the returned request object in order | ||
117 | // to execute the request. | ||
118 | // | ||
119 | // // Example sending a request using the CompleteMultipartUploadRequest method. | ||
120 | // req, resp := client.CompleteMultipartUploadRequest(params) | ||
121 | // | ||
122 | // err := req.Send() | ||
123 | // if err == nil { // resp is now filled | ||
124 | // fmt.Println(resp) | ||
125 | // } | ||
126 | // | ||
127 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload | ||
128 | func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) { | ||
129 | op := &request.Operation{ | ||
130 | Name: opCompleteMultipartUpload, | ||
131 | HTTPMethod: "POST", | ||
132 | HTTPPath: "/{Bucket}/{Key+}", | ||
133 | } | ||
134 | |||
135 | if input == nil { | ||
136 | input = &CompleteMultipartUploadInput{} | ||
137 | } | ||
138 | |||
139 | output = &CompleteMultipartUploadOutput{} | ||
140 | req = c.newRequest(op, input, output) | ||
141 | return | ||
142 | } | ||
143 | |||
144 | // CompleteMultipartUpload API operation for Amazon Simple Storage Service. | ||
145 | // | ||
146 | // Completes a multipart upload by assembling previously uploaded parts. | ||
147 | // | ||
148 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
149 | // with awserr.Error's Code and Message methods to get detailed information about | ||
150 | // the error. | ||
151 | // | ||
152 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
153 | // API operation CompleteMultipartUpload for usage and error information. | ||
154 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload | ||
155 | func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) { | ||
156 | req, out := c.CompleteMultipartUploadRequest(input) | ||
157 | return out, req.Send() | ||
158 | } | ||
159 | |||
160 | // CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of | ||
161 | // the ability to pass a context and additional request options. | ||
162 | // | ||
163 | // See CompleteMultipartUpload for details on how to use this API operation. | ||
164 | // | ||
165 | // The context must be non-nil and will be used for request cancellation. If | ||
166 | // the context is nil a panic will occur. In the future the SDK may create | ||
167 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
168 | // for more information on using Contexts. | ||
169 | func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) { | ||
170 | req, out := c.CompleteMultipartUploadRequest(input) | ||
171 | req.SetContext(ctx) | ||
172 | req.ApplyOptions(opts...) | ||
173 | return out, req.Send() | ||
174 | } | ||
175 | |||
176 | const opCopyObject = "CopyObject" | ||
177 | |||
178 | // CopyObjectRequest generates a "aws/request.Request" representing the | ||
179 | // client's request for the CopyObject operation. The "output" return | ||
180 | // value can be used to capture response data after the request's "Send" method | ||
181 | // is called. | ||
182 | // | ||
183 | // See CopyObject for usage and error information. | ||
184 | // | ||
185 | // Creating a request object using this method should be used when you want to inject | ||
186 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
187 | // access properties on the request object before or after sending the request. If | ||
188 | // you just want the service response, call the CopyObject method directly | ||
189 | // instead. | ||
190 | // | ||
191 | // Note: You must call the "Send" method on the returned request object in order | ||
192 | // to execute the request. | ||
193 | // | ||
194 | // // Example sending a request using the CopyObjectRequest method. | ||
195 | // req, resp := client.CopyObjectRequest(params) | ||
196 | // | ||
197 | // err := req.Send() | ||
198 | // if err == nil { // resp is now filled | ||
199 | // fmt.Println(resp) | ||
200 | // } | ||
201 | // | ||
202 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject | ||
203 | func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) { | ||
204 | op := &request.Operation{ | ||
205 | Name: opCopyObject, | ||
206 | HTTPMethod: "PUT", | ||
207 | HTTPPath: "/{Bucket}/{Key+}", | ||
208 | } | ||
209 | |||
210 | if input == nil { | ||
211 | input = &CopyObjectInput{} | ||
212 | } | ||
213 | |||
214 | output = &CopyObjectOutput{} | ||
215 | req = c.newRequest(op, input, output) | ||
216 | return | ||
217 | } | ||
218 | |||
219 | // CopyObject API operation for Amazon Simple Storage Service. | ||
220 | // | ||
221 | // Creates a copy of an object that is already stored in Amazon S3. | ||
222 | // | ||
223 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
224 | // with awserr.Error's Code and Message methods to get detailed information about | ||
225 | // the error. | ||
226 | // | ||
227 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
228 | // API operation CopyObject for usage and error information. | ||
229 | // | ||
230 | // Returned Error Codes: | ||
231 | // * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError" | ||
232 | // The source object of the COPY operation is not in the active tier and is | ||
233 | // only stored in Amazon Glacier. | ||
234 | // | ||
235 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject | ||
236 | func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) { | ||
237 | req, out := c.CopyObjectRequest(input) | ||
238 | return out, req.Send() | ||
239 | } | ||
240 | |||
241 | // CopyObjectWithContext is the same as CopyObject with the addition of | ||
242 | // the ability to pass a context and additional request options. | ||
243 | // | ||
244 | // See CopyObject for details on how to use this API operation. | ||
245 | // | ||
246 | // The context must be non-nil and will be used for request cancellation. If | ||
247 | // the context is nil a panic will occur. In the future the SDK may create | ||
248 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
249 | // for more information on using Contexts. | ||
250 | func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) { | ||
251 | req, out := c.CopyObjectRequest(input) | ||
252 | req.SetContext(ctx) | ||
253 | req.ApplyOptions(opts...) | ||
254 | return out, req.Send() | ||
255 | } | ||
256 | |||
257 | const opCreateBucket = "CreateBucket" | ||
258 | |||
259 | // CreateBucketRequest generates a "aws/request.Request" representing the | ||
260 | // client's request for the CreateBucket operation. The "output" return | ||
261 | // value can be used to capture response data after the request's "Send" method | ||
262 | // is called. | ||
263 | // | ||
264 | // See CreateBucket for usage and error information. | ||
265 | // | ||
266 | // Creating a request object using this method should be used when you want to inject | ||
267 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
268 | // access properties on the request object before or after sending the request. If | ||
269 | // you just want the service response, call the CreateBucket method directly | ||
270 | // instead. | ||
271 | // | ||
272 | // Note: You must call the "Send" method on the returned request object in order | ||
273 | // to execute the request. | ||
274 | // | ||
275 | // // Example sending a request using the CreateBucketRequest method. | ||
276 | // req, resp := client.CreateBucketRequest(params) | ||
277 | // | ||
278 | // err := req.Send() | ||
279 | // if err == nil { // resp is now filled | ||
280 | // fmt.Println(resp) | ||
281 | // } | ||
282 | // | ||
283 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket | ||
284 | func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) { | ||
285 | op := &request.Operation{ | ||
286 | Name: opCreateBucket, | ||
287 | HTTPMethod: "PUT", | ||
288 | HTTPPath: "/{Bucket}", | ||
289 | } | ||
290 | |||
291 | if input == nil { | ||
292 | input = &CreateBucketInput{} | ||
293 | } | ||
294 | |||
295 | output = &CreateBucketOutput{} | ||
296 | req = c.newRequest(op, input, output) | ||
297 | return | ||
298 | } | ||
299 | |||
300 | // CreateBucket API operation for Amazon Simple Storage Service. | ||
301 | // | ||
302 | // Creates a new bucket. | ||
303 | // | ||
304 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
305 | // with awserr.Error's Code and Message methods to get detailed information about | ||
306 | // the error. | ||
307 | // | ||
308 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
309 | // API operation CreateBucket for usage and error information. | ||
310 | // | ||
311 | // Returned Error Codes: | ||
312 | // * ErrCodeBucketAlreadyExists "BucketAlreadyExists" | ||
313 | // The requested bucket name is not available. The bucket namespace is shared | ||
314 | // by all users of the system. Please select a different name and try again. | ||
315 | // | ||
316 | // * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou" | ||
317 | // | ||
318 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket | ||
319 | func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) { | ||
320 | req, out := c.CreateBucketRequest(input) | ||
321 | return out, req.Send() | ||
322 | } | ||
323 | |||
324 | // CreateBucketWithContext is the same as CreateBucket with the addition of | ||
325 | // the ability to pass a context and additional request options. | ||
326 | // | ||
327 | // See CreateBucket for details on how to use this API operation. | ||
328 | // | ||
329 | // The context must be non-nil and will be used for request cancellation. If | ||
330 | // the context is nil a panic will occur. In the future the SDK may create | ||
331 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
332 | // for more information on using Contexts. | ||
333 | func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) { | ||
334 | req, out := c.CreateBucketRequest(input) | ||
335 | req.SetContext(ctx) | ||
336 | req.ApplyOptions(opts...) | ||
337 | return out, req.Send() | ||
338 | } | ||
339 | |||
340 | const opCreateMultipartUpload = "CreateMultipartUpload" | ||
341 | |||
342 | // CreateMultipartUploadRequest generates a "aws/request.Request" representing the | ||
343 | // client's request for the CreateMultipartUpload operation. The "output" return | ||
344 | // value can be used to capture response data after the request's "Send" method | ||
345 | // is called. | ||
346 | // | ||
347 | // See CreateMultipartUpload for usage and error information. | ||
348 | // | ||
349 | // Creating a request object using this method should be used when you want to inject | ||
350 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
351 | // access properties on the request object before or after sending the request. If | ||
352 | // you just want the service response, call the CreateMultipartUpload method directly | ||
353 | // instead. | ||
354 | // | ||
355 | // Note: You must call the "Send" method on the returned request object in order | ||
356 | // to execute the request. | ||
357 | // | ||
358 | // // Example sending a request using the CreateMultipartUploadRequest method. | ||
359 | // req, resp := client.CreateMultipartUploadRequest(params) | ||
360 | // | ||
361 | // err := req.Send() | ||
362 | // if err == nil { // resp is now filled | ||
363 | // fmt.Println(resp) | ||
364 | // } | ||
365 | // | ||
366 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload | ||
367 | func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) { | ||
368 | op := &request.Operation{ | ||
369 | Name: opCreateMultipartUpload, | ||
370 | HTTPMethod: "POST", | ||
371 | HTTPPath: "/{Bucket}/{Key+}?uploads", | ||
372 | } | ||
373 | |||
374 | if input == nil { | ||
375 | input = &CreateMultipartUploadInput{} | ||
376 | } | ||
377 | |||
378 | output = &CreateMultipartUploadOutput{} | ||
379 | req = c.newRequest(op, input, output) | ||
380 | return | ||
381 | } | ||
382 | |||
383 | // CreateMultipartUpload API operation for Amazon Simple Storage Service. | ||
384 | // | ||
385 | // Initiates a multipart upload and returns an upload ID. | ||
386 | // | ||
387 | // Note: After you initiate multipart upload and upload one or more parts, you | ||
388 | // must either complete or abort multipart upload in order to stop getting charged | ||
389 | // for storage of the uploaded parts. Only after you either complete or abort | ||
390 | // multipart upload, Amazon S3 frees up the parts storage and stops charging | ||
391 | // you for the parts storage. | ||
392 | // | ||
393 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
394 | // with awserr.Error's Code and Message methods to get detailed information about | ||
395 | // the error. | ||
396 | // | ||
397 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
398 | // API operation CreateMultipartUpload for usage and error information. | ||
399 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload | ||
400 | func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) { | ||
401 | req, out := c.CreateMultipartUploadRequest(input) | ||
402 | return out, req.Send() | ||
403 | } | ||
404 | |||
405 | // CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of | ||
406 | // the ability to pass a context and additional request options. | ||
407 | // | ||
408 | // See CreateMultipartUpload for details on how to use this API operation. | ||
409 | // | ||
410 | // The context must be non-nil and will be used for request cancellation. If | ||
411 | // the context is nil a panic will occur. In the future the SDK may create | ||
412 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
413 | // for more information on using Contexts. | ||
414 | func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) { | ||
415 | req, out := c.CreateMultipartUploadRequest(input) | ||
416 | req.SetContext(ctx) | ||
417 | req.ApplyOptions(opts...) | ||
418 | return out, req.Send() | ||
419 | } | ||
420 | |||
421 | const opDeleteBucket = "DeleteBucket" | ||
422 | |||
423 | // DeleteBucketRequest generates a "aws/request.Request" representing the | ||
424 | // client's request for the DeleteBucket operation. The "output" return | ||
425 | // value can be used to capture response data after the request's "Send" method | ||
426 | // is called. | ||
427 | // | ||
428 | // See DeleteBucket for usage and error information. | ||
429 | // | ||
430 | // Creating a request object using this method should be used when you want to inject | ||
431 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
432 | // access properties on the request object before or after sending the request. If | ||
433 | // you just want the service response, call the DeleteBucket method directly | ||
434 | // instead. | ||
435 | // | ||
436 | // Note: You must call the "Send" method on the returned request object in order | ||
437 | // to execute the request. | ||
438 | // | ||
439 | // // Example sending a request using the DeleteBucketRequest method. | ||
440 | // req, resp := client.DeleteBucketRequest(params) | ||
441 | // | ||
442 | // err := req.Send() | ||
443 | // if err == nil { // resp is now filled | ||
444 | // fmt.Println(resp) | ||
445 | // } | ||
446 | // | ||
447 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket | ||
448 | func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) { | ||
449 | op := &request.Operation{ | ||
450 | Name: opDeleteBucket, | ||
451 | HTTPMethod: "DELETE", | ||
452 | HTTPPath: "/{Bucket}", | ||
453 | } | ||
454 | |||
455 | if input == nil { | ||
456 | input = &DeleteBucketInput{} | ||
457 | } | ||
458 | |||
459 | output = &DeleteBucketOutput{} | ||
460 | req = c.newRequest(op, input, output) | ||
461 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
462 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
463 | return | ||
464 | } | ||
465 | |||
466 | // DeleteBucket API operation for Amazon Simple Storage Service. | ||
467 | // | ||
468 | // Deletes the bucket. All objects (including all object versions and Delete | ||
469 | // Markers) in the bucket must be deleted before the bucket itself can be deleted. | ||
470 | // | ||
471 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
472 | // with awserr.Error's Code and Message methods to get detailed information about | ||
473 | // the error. | ||
474 | // | ||
475 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
476 | // API operation DeleteBucket for usage and error information. | ||
477 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket | ||
478 | func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) { | ||
479 | req, out := c.DeleteBucketRequest(input) | ||
480 | return out, req.Send() | ||
481 | } | ||
482 | |||
483 | // DeleteBucketWithContext is the same as DeleteBucket with the addition of | ||
484 | // the ability to pass a context and additional request options. | ||
485 | // | ||
486 | // See DeleteBucket for details on how to use this API operation. | ||
487 | // | ||
488 | // The context must be non-nil and will be used for request cancellation. If | ||
489 | // the context is nil a panic will occur. In the future the SDK may create | ||
490 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
491 | // for more information on using Contexts. | ||
492 | func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) { | ||
493 | req, out := c.DeleteBucketRequest(input) | ||
494 | req.SetContext(ctx) | ||
495 | req.ApplyOptions(opts...) | ||
496 | return out, req.Send() | ||
497 | } | ||
498 | |||
499 | const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration" | ||
500 | |||
501 | // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the | ||
502 | // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return | ||
503 | // value can be used to capture response data after the request's "Send" method | ||
504 | // is called. | ||
505 | // | ||
506 | // See DeleteBucketAnalyticsConfiguration for usage and error information. | ||
507 | // | ||
508 | // Creating a request object using this method should be used when you want to inject | ||
509 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
510 | // access properties on the request object before or after sending the request. If | ||
511 | // you just want the service response, call the DeleteBucketAnalyticsConfiguration method directly | ||
512 | // instead. | ||
513 | // | ||
514 | // Note: You must call the "Send" method on the returned request object in order | ||
515 | // to execute the request. | ||
516 | // | ||
517 | // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method. | ||
518 | // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params) | ||
519 | // | ||
520 | // err := req.Send() | ||
521 | // if err == nil { // resp is now filled | ||
522 | // fmt.Println(resp) | ||
523 | // } | ||
524 | // | ||
525 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration | ||
526 | func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) { | ||
527 | op := &request.Operation{ | ||
528 | Name: opDeleteBucketAnalyticsConfiguration, | ||
529 | HTTPMethod: "DELETE", | ||
530 | HTTPPath: "/{Bucket}?analytics", | ||
531 | } | ||
532 | |||
533 | if input == nil { | ||
534 | input = &DeleteBucketAnalyticsConfigurationInput{} | ||
535 | } | ||
536 | |||
537 | output = &DeleteBucketAnalyticsConfigurationOutput{} | ||
538 | req = c.newRequest(op, input, output) | ||
539 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
540 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
541 | return | ||
542 | } | ||
543 | |||
544 | // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service. | ||
545 | // | ||
546 | // Deletes an analytics configuration for the bucket (specified by the analytics | ||
547 | // configuration ID). | ||
548 | // | ||
549 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
550 | // with awserr.Error's Code and Message methods to get detailed information about | ||
551 | // the error. | ||
552 | // | ||
553 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
554 | // API operation DeleteBucketAnalyticsConfiguration for usage and error information. | ||
555 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration | ||
556 | func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) { | ||
557 | req, out := c.DeleteBucketAnalyticsConfigurationRequest(input) | ||
558 | return out, req.Send() | ||
559 | } | ||
560 | |||
561 | // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of | ||
562 | // the ability to pass a context and additional request options. | ||
563 | // | ||
564 | // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation. | ||
565 | // | ||
566 | // The context must be non-nil and will be used for request cancellation. If | ||
567 | // the context is nil a panic will occur. In the future the SDK may create | ||
568 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
569 | // for more information on using Contexts. | ||
570 | func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) { | ||
571 | req, out := c.DeleteBucketAnalyticsConfigurationRequest(input) | ||
572 | req.SetContext(ctx) | ||
573 | req.ApplyOptions(opts...) | ||
574 | return out, req.Send() | ||
575 | } | ||
576 | |||
577 | const opDeleteBucketCors = "DeleteBucketCors" | ||
578 | |||
579 | // DeleteBucketCorsRequest generates a "aws/request.Request" representing the | ||
580 | // client's request for the DeleteBucketCors operation. The "output" return | ||
581 | // value can be used to capture response data after the request's "Send" method | ||
582 | // is called. | ||
583 | // | ||
584 | // See DeleteBucketCors for usage and error information. | ||
585 | // | ||
586 | // Creating a request object using this method should be used when you want to inject | ||
587 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
588 | // access properties on the request object before or after sending the request. If | ||
589 | // you just want the service response, call the DeleteBucketCors method directly | ||
590 | // instead. | ||
591 | // | ||
592 | // Note: You must call the "Send" method on the returned request object in order | ||
593 | // to execute the request. | ||
594 | // | ||
595 | // // Example sending a request using the DeleteBucketCorsRequest method. | ||
596 | // req, resp := client.DeleteBucketCorsRequest(params) | ||
597 | // | ||
598 | // err := req.Send() | ||
599 | // if err == nil { // resp is now filled | ||
600 | // fmt.Println(resp) | ||
601 | // } | ||
602 | // | ||
603 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors | ||
604 | func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) { | ||
605 | op := &request.Operation{ | ||
606 | Name: opDeleteBucketCors, | ||
607 | HTTPMethod: "DELETE", | ||
608 | HTTPPath: "/{Bucket}?cors", | ||
609 | } | ||
610 | |||
611 | if input == nil { | ||
612 | input = &DeleteBucketCorsInput{} | ||
613 | } | ||
614 | |||
615 | output = &DeleteBucketCorsOutput{} | ||
616 | req = c.newRequest(op, input, output) | ||
617 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
618 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
619 | return | ||
620 | } | ||
621 | |||
622 | // DeleteBucketCors API operation for Amazon Simple Storage Service. | ||
623 | // | ||
624 | // Deletes the cors configuration information set for the bucket. | ||
625 | // | ||
626 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
627 | // with awserr.Error's Code and Message methods to get detailed information about | ||
628 | // the error. | ||
629 | // | ||
630 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
631 | // API operation DeleteBucketCors for usage and error information. | ||
632 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors | ||
633 | func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) { | ||
634 | req, out := c.DeleteBucketCorsRequest(input) | ||
635 | return out, req.Send() | ||
636 | } | ||
637 | |||
638 | // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of | ||
639 | // the ability to pass a context and additional request options. | ||
640 | // | ||
641 | // See DeleteBucketCors for details on how to use this API operation. | ||
642 | // | ||
643 | // The context must be non-nil and will be used for request cancellation. If | ||
644 | // the context is nil a panic will occur. In the future the SDK may create | ||
645 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
646 | // for more information on using Contexts. | ||
647 | func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) { | ||
648 | req, out := c.DeleteBucketCorsRequest(input) | ||
649 | req.SetContext(ctx) | ||
650 | req.ApplyOptions(opts...) | ||
651 | return out, req.Send() | ||
652 | } | ||
653 | |||
654 | const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration" | ||
655 | |||
656 | // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the | ||
657 | // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return | ||
658 | // value can be used to capture response data after the request's "Send" method | ||
659 | // is called. | ||
660 | // | ||
661 | // See DeleteBucketInventoryConfiguration for usage and error information. | ||
662 | // | ||
663 | // Creating a request object using this method should be used when you want to inject | ||
664 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
665 | // access properties on the request object before or after sending the request. If | ||
666 | // you just want the service response, call the DeleteBucketInventoryConfiguration method directly | ||
667 | // instead. | ||
668 | // | ||
669 | // Note: You must call the "Send" method on the returned request object in order | ||
670 | // to execute the request. | ||
671 | // | ||
672 | // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method. | ||
673 | // req, resp := client.DeleteBucketInventoryConfigurationRequest(params) | ||
674 | // | ||
675 | // err := req.Send() | ||
676 | // if err == nil { // resp is now filled | ||
677 | // fmt.Println(resp) | ||
678 | // } | ||
679 | // | ||
680 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration | ||
681 | func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) { | ||
682 | op := &request.Operation{ | ||
683 | Name: opDeleteBucketInventoryConfiguration, | ||
684 | HTTPMethod: "DELETE", | ||
685 | HTTPPath: "/{Bucket}?inventory", | ||
686 | } | ||
687 | |||
688 | if input == nil { | ||
689 | input = &DeleteBucketInventoryConfigurationInput{} | ||
690 | } | ||
691 | |||
692 | output = &DeleteBucketInventoryConfigurationOutput{} | ||
693 | req = c.newRequest(op, input, output) | ||
694 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
695 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
696 | return | ||
697 | } | ||
698 | |||
699 | // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service. | ||
700 | // | ||
701 | // Deletes an inventory configuration (identified by the inventory ID) from | ||
702 | // the bucket. | ||
703 | // | ||
704 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
705 | // with awserr.Error's Code and Message methods to get detailed information about | ||
706 | // the error. | ||
707 | // | ||
708 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
709 | // API operation DeleteBucketInventoryConfiguration for usage and error information. | ||
710 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration | ||
711 | func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) { | ||
712 | req, out := c.DeleteBucketInventoryConfigurationRequest(input) | ||
713 | return out, req.Send() | ||
714 | } | ||
715 | |||
716 | // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of | ||
717 | // the ability to pass a context and additional request options. | ||
718 | // | ||
719 | // See DeleteBucketInventoryConfiguration for details on how to use this API operation. | ||
720 | // | ||
721 | // The context must be non-nil and will be used for request cancellation. If | ||
722 | // the context is nil a panic will occur. In the future the SDK may create | ||
723 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
724 | // for more information on using Contexts. | ||
725 | func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) { | ||
726 | req, out := c.DeleteBucketInventoryConfigurationRequest(input) | ||
727 | req.SetContext(ctx) | ||
728 | req.ApplyOptions(opts...) | ||
729 | return out, req.Send() | ||
730 | } | ||
731 | |||
732 | const opDeleteBucketLifecycle = "DeleteBucketLifecycle" | ||
733 | |||
734 | // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the | ||
735 | // client's request for the DeleteBucketLifecycle operation. The "output" return | ||
736 | // value can be used to capture response data after the request's "Send" method | ||
737 | // is called. | ||
738 | // | ||
739 | // See DeleteBucketLifecycle for usage and error information. | ||
740 | // | ||
741 | // Creating a request object using this method should be used when you want to inject | ||
742 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
743 | // access properties on the request object before or after sending the request. If | ||
744 | // you just want the service response, call the DeleteBucketLifecycle method directly | ||
745 | // instead. | ||
746 | // | ||
747 | // Note: You must call the "Send" method on the returned request object in order | ||
748 | // to execute the request. | ||
749 | // | ||
750 | // // Example sending a request using the DeleteBucketLifecycleRequest method. | ||
751 | // req, resp := client.DeleteBucketLifecycleRequest(params) | ||
752 | // | ||
753 | // err := req.Send() | ||
754 | // if err == nil { // resp is now filled | ||
755 | // fmt.Println(resp) | ||
756 | // } | ||
757 | // | ||
758 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle | ||
759 | func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) { | ||
760 | op := &request.Operation{ | ||
761 | Name: opDeleteBucketLifecycle, | ||
762 | HTTPMethod: "DELETE", | ||
763 | HTTPPath: "/{Bucket}?lifecycle", | ||
764 | } | ||
765 | |||
766 | if input == nil { | ||
767 | input = &DeleteBucketLifecycleInput{} | ||
768 | } | ||
769 | |||
770 | output = &DeleteBucketLifecycleOutput{} | ||
771 | req = c.newRequest(op, input, output) | ||
772 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
773 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
774 | return | ||
775 | } | ||
776 | |||
777 | // DeleteBucketLifecycle API operation for Amazon Simple Storage Service. | ||
778 | // | ||
779 | // Deletes the lifecycle configuration from the bucket. | ||
780 | // | ||
781 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
782 | // with awserr.Error's Code and Message methods to get detailed information about | ||
783 | // the error. | ||
784 | // | ||
785 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
786 | // API operation DeleteBucketLifecycle for usage and error information. | ||
787 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle | ||
788 | func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) { | ||
789 | req, out := c.DeleteBucketLifecycleRequest(input) | ||
790 | return out, req.Send() | ||
791 | } | ||
792 | |||
793 | // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of | ||
794 | // the ability to pass a context and additional request options. | ||
795 | // | ||
796 | // See DeleteBucketLifecycle for details on how to use this API operation. | ||
797 | // | ||
798 | // The context must be non-nil and will be used for request cancellation. If | ||
799 | // the context is nil a panic will occur. In the future the SDK may create | ||
800 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
801 | // for more information on using Contexts. | ||
802 | func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) { | ||
803 | req, out := c.DeleteBucketLifecycleRequest(input) | ||
804 | req.SetContext(ctx) | ||
805 | req.ApplyOptions(opts...) | ||
806 | return out, req.Send() | ||
807 | } | ||
808 | |||
809 | const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration" | ||
810 | |||
811 | // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the | ||
812 | // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return | ||
813 | // value can be used to capture response data after the request's "Send" method | ||
814 | // is called. | ||
815 | // | ||
816 | // See DeleteBucketMetricsConfiguration for usage and error information. | ||
817 | // | ||
818 | // Creating a request object using this method should be used when you want to inject | ||
819 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
820 | // access properties on the request object before or after sending the request. If | ||
821 | // you just want the service response, call the DeleteBucketMetricsConfiguration method directly | ||
822 | // instead. | ||
823 | // | ||
824 | // Note: You must call the "Send" method on the returned request object in order | ||
825 | // to execute the request. | ||
826 | // | ||
827 | // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method. | ||
828 | // req, resp := client.DeleteBucketMetricsConfigurationRequest(params) | ||
829 | // | ||
830 | // err := req.Send() | ||
831 | // if err == nil { // resp is now filled | ||
832 | // fmt.Println(resp) | ||
833 | // } | ||
834 | // | ||
835 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration | ||
836 | func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) { | ||
837 | op := &request.Operation{ | ||
838 | Name: opDeleteBucketMetricsConfiguration, | ||
839 | HTTPMethod: "DELETE", | ||
840 | HTTPPath: "/{Bucket}?metrics", | ||
841 | } | ||
842 | |||
843 | if input == nil { | ||
844 | input = &DeleteBucketMetricsConfigurationInput{} | ||
845 | } | ||
846 | |||
847 | output = &DeleteBucketMetricsConfigurationOutput{} | ||
848 | req = c.newRequest(op, input, output) | ||
849 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
850 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
851 | return | ||
852 | } | ||
853 | |||
854 | // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service. | ||
855 | // | ||
856 | // Deletes a metrics configuration (specified by the metrics configuration ID) | ||
857 | // from the bucket. | ||
858 | // | ||
859 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
860 | // with awserr.Error's Code and Message methods to get detailed information about | ||
861 | // the error. | ||
862 | // | ||
863 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
864 | // API operation DeleteBucketMetricsConfiguration for usage and error information. | ||
865 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration | ||
866 | func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) { | ||
867 | req, out := c.DeleteBucketMetricsConfigurationRequest(input) | ||
868 | return out, req.Send() | ||
869 | } | ||
870 | |||
871 | // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of | ||
872 | // the ability to pass a context and additional request options. | ||
873 | // | ||
874 | // See DeleteBucketMetricsConfiguration for details on how to use this API operation. | ||
875 | // | ||
876 | // The context must be non-nil and will be used for request cancellation. If | ||
877 | // the context is nil a panic will occur. In the future the SDK may create | ||
878 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
879 | // for more information on using Contexts. | ||
880 | func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) { | ||
881 | req, out := c.DeleteBucketMetricsConfigurationRequest(input) | ||
882 | req.SetContext(ctx) | ||
883 | req.ApplyOptions(opts...) | ||
884 | return out, req.Send() | ||
885 | } | ||
886 | |||
887 | const opDeleteBucketPolicy = "DeleteBucketPolicy" | ||
888 | |||
889 | // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the | ||
890 | // client's request for the DeleteBucketPolicy operation. The "output" return | ||
891 | // value can be used to capture response data after the request's "Send" method | ||
892 | // is called. | ||
893 | // | ||
894 | // See DeleteBucketPolicy for usage and error information. | ||
895 | // | ||
896 | // Creating a request object using this method should be used when you want to inject | ||
897 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
898 | // access properties on the request object before or after sending the request. If | ||
899 | // you just want the service response, call the DeleteBucketPolicy method directly | ||
900 | // instead. | ||
901 | // | ||
902 | // Note: You must call the "Send" method on the returned request object in order | ||
903 | // to execute the request. | ||
904 | // | ||
905 | // // Example sending a request using the DeleteBucketPolicyRequest method. | ||
906 | // req, resp := client.DeleteBucketPolicyRequest(params) | ||
907 | // | ||
908 | // err := req.Send() | ||
909 | // if err == nil { // resp is now filled | ||
910 | // fmt.Println(resp) | ||
911 | // } | ||
912 | // | ||
913 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy | ||
914 | func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) { | ||
915 | op := &request.Operation{ | ||
916 | Name: opDeleteBucketPolicy, | ||
917 | HTTPMethod: "DELETE", | ||
918 | HTTPPath: "/{Bucket}?policy", | ||
919 | } | ||
920 | |||
921 | if input == nil { | ||
922 | input = &DeleteBucketPolicyInput{} | ||
923 | } | ||
924 | |||
925 | output = &DeleteBucketPolicyOutput{} | ||
926 | req = c.newRequest(op, input, output) | ||
927 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
928 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
929 | return | ||
930 | } | ||
931 | |||
932 | // DeleteBucketPolicy API operation for Amazon Simple Storage Service. | ||
933 | // | ||
934 | // Deletes the policy from the bucket. | ||
935 | // | ||
936 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
937 | // with awserr.Error's Code and Message methods to get detailed information about | ||
938 | // the error. | ||
939 | // | ||
940 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
941 | // API operation DeleteBucketPolicy for usage and error information. | ||
942 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy | ||
943 | func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) { | ||
944 | req, out := c.DeleteBucketPolicyRequest(input) | ||
945 | return out, req.Send() | ||
946 | } | ||
947 | |||
948 | // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of | ||
949 | // the ability to pass a context and additional request options. | ||
950 | // | ||
951 | // See DeleteBucketPolicy for details on how to use this API operation. | ||
952 | // | ||
953 | // The context must be non-nil and will be used for request cancellation. If | ||
954 | // the context is nil a panic will occur. In the future the SDK may create | ||
955 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
956 | // for more information on using Contexts. | ||
957 | func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) { | ||
958 | req, out := c.DeleteBucketPolicyRequest(input) | ||
959 | req.SetContext(ctx) | ||
960 | req.ApplyOptions(opts...) | ||
961 | return out, req.Send() | ||
962 | } | ||
963 | |||
964 | const opDeleteBucketReplication = "DeleteBucketReplication" | ||
965 | |||
966 | // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the | ||
967 | // client's request for the DeleteBucketReplication operation. The "output" return | ||
968 | // value can be used to capture response data after the request's "Send" method | ||
969 | // is called. | ||
970 | // | ||
971 | // See DeleteBucketReplication for usage and error information. | ||
972 | // | ||
973 | // Creating a request object using this method should be used when you want to inject | ||
974 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
975 | // access properties on the request object before or after sending the request. If | ||
976 | // you just want the service response, call the DeleteBucketReplication method directly | ||
977 | // instead. | ||
978 | // | ||
979 | // Note: You must call the "Send" method on the returned request object in order | ||
980 | // to execute the request. | ||
981 | // | ||
982 | // // Example sending a request using the DeleteBucketReplicationRequest method. | ||
983 | // req, resp := client.DeleteBucketReplicationRequest(params) | ||
984 | // | ||
985 | // err := req.Send() | ||
986 | // if err == nil { // resp is now filled | ||
987 | // fmt.Println(resp) | ||
988 | // } | ||
989 | // | ||
990 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication | ||
991 | func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) { | ||
992 | op := &request.Operation{ | ||
993 | Name: opDeleteBucketReplication, | ||
994 | HTTPMethod: "DELETE", | ||
995 | HTTPPath: "/{Bucket}?replication", | ||
996 | } | ||
997 | |||
998 | if input == nil { | ||
999 | input = &DeleteBucketReplicationInput{} | ||
1000 | } | ||
1001 | |||
1002 | output = &DeleteBucketReplicationOutput{} | ||
1003 | req = c.newRequest(op, input, output) | ||
1004 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
1005 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
1006 | return | ||
1007 | } | ||
1008 | |||
1009 | // DeleteBucketReplication API operation for Amazon Simple Storage Service. | ||
1010 | // | ||
1011 | // Deletes the replication configuration from the bucket. | ||
1012 | // | ||
1013 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1014 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1015 | // the error. | ||
1016 | // | ||
1017 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1018 | // API operation DeleteBucketReplication for usage and error information. | ||
1019 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication | ||
1020 | func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) { | ||
1021 | req, out := c.DeleteBucketReplicationRequest(input) | ||
1022 | return out, req.Send() | ||
1023 | } | ||
1024 | |||
1025 | // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of | ||
1026 | // the ability to pass a context and additional request options. | ||
1027 | // | ||
1028 | // See DeleteBucketReplication for details on how to use this API operation. | ||
1029 | // | ||
1030 | // The context must be non-nil and will be used for request cancellation. If | ||
1031 | // the context is nil a panic will occur. In the future the SDK may create | ||
1032 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1033 | // for more information on using Contexts. | ||
1034 | func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) { | ||
1035 | req, out := c.DeleteBucketReplicationRequest(input) | ||
1036 | req.SetContext(ctx) | ||
1037 | req.ApplyOptions(opts...) | ||
1038 | return out, req.Send() | ||
1039 | } | ||
1040 | |||
1041 | const opDeleteBucketTagging = "DeleteBucketTagging" | ||
1042 | |||
1043 | // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the | ||
1044 | // client's request for the DeleteBucketTagging operation. The "output" return | ||
1045 | // value can be used to capture response data after the request's "Send" method | ||
1046 | // is called. | ||
1047 | // | ||
1048 | // See DeleteBucketTagging for usage and error information. | ||
1049 | // | ||
1050 | // Creating a request object using this method should be used when you want to inject | ||
1051 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1052 | // access properties on the request object before or after sending the request. If | ||
1053 | // you just want the service response, call the DeleteBucketTagging method directly | ||
1054 | // instead. | ||
1055 | // | ||
1056 | // Note: You must call the "Send" method on the returned request object in order | ||
1057 | // to execute the request. | ||
1058 | // | ||
1059 | // // Example sending a request using the DeleteBucketTaggingRequest method. | ||
1060 | // req, resp := client.DeleteBucketTaggingRequest(params) | ||
1061 | // | ||
1062 | // err := req.Send() | ||
1063 | // if err == nil { // resp is now filled | ||
1064 | // fmt.Println(resp) | ||
1065 | // } | ||
1066 | // | ||
1067 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging | ||
1068 | func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) { | ||
1069 | op := &request.Operation{ | ||
1070 | Name: opDeleteBucketTagging, | ||
1071 | HTTPMethod: "DELETE", | ||
1072 | HTTPPath: "/{Bucket}?tagging", | ||
1073 | } | ||
1074 | |||
1075 | if input == nil { | ||
1076 | input = &DeleteBucketTaggingInput{} | ||
1077 | } | ||
1078 | |||
1079 | output = &DeleteBucketTaggingOutput{} | ||
1080 | req = c.newRequest(op, input, output) | ||
1081 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
1082 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
1083 | return | ||
1084 | } | ||
1085 | |||
1086 | // DeleteBucketTagging API operation for Amazon Simple Storage Service. | ||
1087 | // | ||
1088 | // Deletes the tags from the bucket. | ||
1089 | // | ||
1090 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1091 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1092 | // the error. | ||
1093 | // | ||
1094 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1095 | // API operation DeleteBucketTagging for usage and error information. | ||
1096 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging | ||
1097 | func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) { | ||
1098 | req, out := c.DeleteBucketTaggingRequest(input) | ||
1099 | return out, req.Send() | ||
1100 | } | ||
1101 | |||
1102 | // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of | ||
1103 | // the ability to pass a context and additional request options. | ||
1104 | // | ||
1105 | // See DeleteBucketTagging for details on how to use this API operation. | ||
1106 | // | ||
1107 | // The context must be non-nil and will be used for request cancellation. If | ||
1108 | // the context is nil a panic will occur. In the future the SDK may create | ||
1109 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1110 | // for more information on using Contexts. | ||
1111 | func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) { | ||
1112 | req, out := c.DeleteBucketTaggingRequest(input) | ||
1113 | req.SetContext(ctx) | ||
1114 | req.ApplyOptions(opts...) | ||
1115 | return out, req.Send() | ||
1116 | } | ||
1117 | |||
1118 | const opDeleteBucketWebsite = "DeleteBucketWebsite" | ||
1119 | |||
1120 | // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the | ||
1121 | // client's request for the DeleteBucketWebsite operation. The "output" return | ||
1122 | // value can be used to capture response data after the request's "Send" method | ||
1123 | // is called. | ||
1124 | // | ||
1125 | // See DeleteBucketWebsite for usage and error information. | ||
1126 | // | ||
1127 | // Creating a request object using this method should be used when you want to inject | ||
1128 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1129 | // access properties on the request object before or after sending the request. If | ||
1130 | // you just want the service response, call the DeleteBucketWebsite method directly | ||
1131 | // instead. | ||
1132 | // | ||
1133 | // Note: You must call the "Send" method on the returned request object in order | ||
1134 | // to execute the request. | ||
1135 | // | ||
1136 | // // Example sending a request using the DeleteBucketWebsiteRequest method. | ||
1137 | // req, resp := client.DeleteBucketWebsiteRequest(params) | ||
1138 | // | ||
1139 | // err := req.Send() | ||
1140 | // if err == nil { // resp is now filled | ||
1141 | // fmt.Println(resp) | ||
1142 | // } | ||
1143 | // | ||
1144 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite | ||
1145 | func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) { | ||
1146 | op := &request.Operation{ | ||
1147 | Name: opDeleteBucketWebsite, | ||
1148 | HTTPMethod: "DELETE", | ||
1149 | HTTPPath: "/{Bucket}?website", | ||
1150 | } | ||
1151 | |||
1152 | if input == nil { | ||
1153 | input = &DeleteBucketWebsiteInput{} | ||
1154 | } | ||
1155 | |||
1156 | output = &DeleteBucketWebsiteOutput{} | ||
1157 | req = c.newRequest(op, input, output) | ||
1158 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
1159 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
1160 | return | ||
1161 | } | ||
1162 | |||
1163 | // DeleteBucketWebsite API operation for Amazon Simple Storage Service. | ||
1164 | // | ||
1165 | // This operation removes the website configuration from the bucket. | ||
1166 | // | ||
1167 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1168 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1169 | // the error. | ||
1170 | // | ||
1171 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1172 | // API operation DeleteBucketWebsite for usage and error information. | ||
1173 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite | ||
1174 | func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) { | ||
1175 | req, out := c.DeleteBucketWebsiteRequest(input) | ||
1176 | return out, req.Send() | ||
1177 | } | ||
1178 | |||
1179 | // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of | ||
1180 | // the ability to pass a context and additional request options. | ||
1181 | // | ||
1182 | // See DeleteBucketWebsite for details on how to use this API operation. | ||
1183 | // | ||
1184 | // The context must be non-nil and will be used for request cancellation. If | ||
1185 | // the context is nil a panic will occur. In the future the SDK may create | ||
1186 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1187 | // for more information on using Contexts. | ||
1188 | func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) { | ||
1189 | req, out := c.DeleteBucketWebsiteRequest(input) | ||
1190 | req.SetContext(ctx) | ||
1191 | req.ApplyOptions(opts...) | ||
1192 | return out, req.Send() | ||
1193 | } | ||
1194 | |||
1195 | const opDeleteObject = "DeleteObject" | ||
1196 | |||
1197 | // DeleteObjectRequest generates a "aws/request.Request" representing the | ||
1198 | // client's request for the DeleteObject operation. The "output" return | ||
1199 | // value can be used to capture response data after the request's "Send" method | ||
1200 | // is called. | ||
1201 | // | ||
1202 | // See DeleteObject for usage and error information. | ||
1203 | // | ||
1204 | // Creating a request object using this method should be used when you want to inject | ||
1205 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1206 | // access properties on the request object before or after sending the request. If | ||
1207 | // you just want the service response, call the DeleteObject method directly | ||
1208 | // instead. | ||
1209 | // | ||
1210 | // Note: You must call the "Send" method on the returned request object in order | ||
1211 | // to execute the request. | ||
1212 | // | ||
1213 | // // Example sending a request using the DeleteObjectRequest method. | ||
1214 | // req, resp := client.DeleteObjectRequest(params) | ||
1215 | // | ||
1216 | // err := req.Send() | ||
1217 | // if err == nil { // resp is now filled | ||
1218 | // fmt.Println(resp) | ||
1219 | // } | ||
1220 | // | ||
1221 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject | ||
1222 | func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) { | ||
1223 | op := &request.Operation{ | ||
1224 | Name: opDeleteObject, | ||
1225 | HTTPMethod: "DELETE", | ||
1226 | HTTPPath: "/{Bucket}/{Key+}", | ||
1227 | } | ||
1228 | |||
1229 | if input == nil { | ||
1230 | input = &DeleteObjectInput{} | ||
1231 | } | ||
1232 | |||
1233 | output = &DeleteObjectOutput{} | ||
1234 | req = c.newRequest(op, input, output) | ||
1235 | return | ||
1236 | } | ||
1237 | |||
1238 | // DeleteObject API operation for Amazon Simple Storage Service. | ||
1239 | // | ||
1240 | // Removes the null version (if there is one) of an object and inserts a delete | ||
1241 | // marker, which becomes the latest version of the object. If there isn't a | ||
1242 | // null version, Amazon S3 does not remove any objects. | ||
1243 | // | ||
1244 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1245 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1246 | // the error. | ||
1247 | // | ||
1248 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1249 | // API operation DeleteObject for usage and error information. | ||
1250 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject | ||
1251 | func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) { | ||
1252 | req, out := c.DeleteObjectRequest(input) | ||
1253 | return out, req.Send() | ||
1254 | } | ||
1255 | |||
1256 | // DeleteObjectWithContext is the same as DeleteObject with the addition of | ||
1257 | // the ability to pass a context and additional request options. | ||
1258 | // | ||
1259 | // See DeleteObject for details on how to use this API operation. | ||
1260 | // | ||
1261 | // The context must be non-nil and will be used for request cancellation. If | ||
1262 | // the context is nil a panic will occur. In the future the SDK may create | ||
1263 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1264 | // for more information on using Contexts. | ||
1265 | func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) { | ||
1266 | req, out := c.DeleteObjectRequest(input) | ||
1267 | req.SetContext(ctx) | ||
1268 | req.ApplyOptions(opts...) | ||
1269 | return out, req.Send() | ||
1270 | } | ||
1271 | |||
1272 | const opDeleteObjectTagging = "DeleteObjectTagging" | ||
1273 | |||
1274 | // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the | ||
1275 | // client's request for the DeleteObjectTagging operation. The "output" return | ||
1276 | // value can be used to capture response data after the request's "Send" method | ||
1277 | // is called. | ||
1278 | // | ||
1279 | // See DeleteObjectTagging for usage and error information. | ||
1280 | // | ||
1281 | // Creating a request object using this method should be used when you want to inject | ||
1282 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1283 | // access properties on the request object before or after sending the request. If | ||
1284 | // you just want the service response, call the DeleteObjectTagging method directly | ||
1285 | // instead. | ||
1286 | // | ||
1287 | // Note: You must call the "Send" method on the returned request object in order | ||
1288 | // to execute the request. | ||
1289 | // | ||
1290 | // // Example sending a request using the DeleteObjectTaggingRequest method. | ||
1291 | // req, resp := client.DeleteObjectTaggingRequest(params) | ||
1292 | // | ||
1293 | // err := req.Send() | ||
1294 | // if err == nil { // resp is now filled | ||
1295 | // fmt.Println(resp) | ||
1296 | // } | ||
1297 | // | ||
1298 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging | ||
1299 | func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) { | ||
1300 | op := &request.Operation{ | ||
1301 | Name: opDeleteObjectTagging, | ||
1302 | HTTPMethod: "DELETE", | ||
1303 | HTTPPath: "/{Bucket}/{Key+}?tagging", | ||
1304 | } | ||
1305 | |||
1306 | if input == nil { | ||
1307 | input = &DeleteObjectTaggingInput{} | ||
1308 | } | ||
1309 | |||
1310 | output = &DeleteObjectTaggingOutput{} | ||
1311 | req = c.newRequest(op, input, output) | ||
1312 | return | ||
1313 | } | ||
1314 | |||
1315 | // DeleteObjectTagging API operation for Amazon Simple Storage Service. | ||
1316 | // | ||
1317 | // Removes the tag-set from an existing object. | ||
1318 | // | ||
1319 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1320 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1321 | // the error. | ||
1322 | // | ||
1323 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1324 | // API operation DeleteObjectTagging for usage and error information. | ||
1325 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging | ||
1326 | func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) { | ||
1327 | req, out := c.DeleteObjectTaggingRequest(input) | ||
1328 | return out, req.Send() | ||
1329 | } | ||
1330 | |||
1331 | // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of | ||
1332 | // the ability to pass a context and additional request options. | ||
1333 | // | ||
1334 | // See DeleteObjectTagging for details on how to use this API operation. | ||
1335 | // | ||
1336 | // The context must be non-nil and will be used for request cancellation. If | ||
1337 | // the context is nil a panic will occur. In the future the SDK may create | ||
1338 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1339 | // for more information on using Contexts. | ||
1340 | func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) { | ||
1341 | req, out := c.DeleteObjectTaggingRequest(input) | ||
1342 | req.SetContext(ctx) | ||
1343 | req.ApplyOptions(opts...) | ||
1344 | return out, req.Send() | ||
1345 | } | ||
1346 | |||
1347 | const opDeleteObjects = "DeleteObjects" | ||
1348 | |||
1349 | // DeleteObjectsRequest generates a "aws/request.Request" representing the | ||
1350 | // client's request for the DeleteObjects operation. The "output" return | ||
1351 | // value can be used to capture response data after the request's "Send" method | ||
1352 | // is called. | ||
1353 | // | ||
1354 | // See DeleteObjects for usage and error information. | ||
1355 | // | ||
1356 | // Creating a request object using this method should be used when you want to inject | ||
1357 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1358 | // access properties on the request object before or after sending the request. If | ||
1359 | // you just want the service response, call the DeleteObjects method directly | ||
1360 | // instead. | ||
1361 | // | ||
1362 | // Note: You must call the "Send" method on the returned request object in order | ||
1363 | // to execute the request. | ||
1364 | // | ||
1365 | // // Example sending a request using the DeleteObjectsRequest method. | ||
1366 | // req, resp := client.DeleteObjectsRequest(params) | ||
1367 | // | ||
1368 | // err := req.Send() | ||
1369 | // if err == nil { // resp is now filled | ||
1370 | // fmt.Println(resp) | ||
1371 | // } | ||
1372 | // | ||
1373 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects | ||
1374 | func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) { | ||
1375 | op := &request.Operation{ | ||
1376 | Name: opDeleteObjects, | ||
1377 | HTTPMethod: "POST", | ||
1378 | HTTPPath: "/{Bucket}?delete", | ||
1379 | } | ||
1380 | |||
1381 | if input == nil { | ||
1382 | input = &DeleteObjectsInput{} | ||
1383 | } | ||
1384 | |||
1385 | output = &DeleteObjectsOutput{} | ||
1386 | req = c.newRequest(op, input, output) | ||
1387 | return | ||
1388 | } | ||
1389 | |||
1390 | // DeleteObjects API operation for Amazon Simple Storage Service. | ||
1391 | // | ||
1392 | // This operation enables you to delete multiple objects from a bucket using | ||
1393 | // a single HTTP request. You may specify up to 1000 keys. | ||
1394 | // | ||
1395 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1396 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1397 | // the error. | ||
1398 | // | ||
1399 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1400 | // API operation DeleteObjects for usage and error information. | ||
1401 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects | ||
1402 | func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) { | ||
1403 | req, out := c.DeleteObjectsRequest(input) | ||
1404 | return out, req.Send() | ||
1405 | } | ||
1406 | |||
1407 | // DeleteObjectsWithContext is the same as DeleteObjects with the addition of | ||
1408 | // the ability to pass a context and additional request options. | ||
1409 | // | ||
1410 | // See DeleteObjects for details on how to use this API operation. | ||
1411 | // | ||
1412 | // The context must be non-nil and will be used for request cancellation. If | ||
1413 | // the context is nil a panic will occur. In the future the SDK may create | ||
1414 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1415 | // for more information on using Contexts. | ||
1416 | func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) { | ||
1417 | req, out := c.DeleteObjectsRequest(input) | ||
1418 | req.SetContext(ctx) | ||
1419 | req.ApplyOptions(opts...) | ||
1420 | return out, req.Send() | ||
1421 | } | ||
1422 | |||
1423 | const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration" | ||
1424 | |||
1425 | // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the | ||
1426 | // client's request for the GetBucketAccelerateConfiguration operation. The "output" return | ||
1427 | // value can be used to capture response data after the request's "Send" method | ||
1428 | // is called. | ||
1429 | // | ||
1430 | // See GetBucketAccelerateConfiguration for usage and error information. | ||
1431 | // | ||
1432 | // Creating a request object using this method should be used when you want to inject | ||
1433 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1434 | // access properties on the request object before or after sending the request. If | ||
1435 | // you just want the service response, call the GetBucketAccelerateConfiguration method directly | ||
1436 | // instead. | ||
1437 | // | ||
1438 | // Note: You must call the "Send" method on the returned request object in order | ||
1439 | // to execute the request. | ||
1440 | // | ||
1441 | // // Example sending a request using the GetBucketAccelerateConfigurationRequest method. | ||
1442 | // req, resp := client.GetBucketAccelerateConfigurationRequest(params) | ||
1443 | // | ||
1444 | // err := req.Send() | ||
1445 | // if err == nil { // resp is now filled | ||
1446 | // fmt.Println(resp) | ||
1447 | // } | ||
1448 | // | ||
1449 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration | ||
1450 | func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) { | ||
1451 | op := &request.Operation{ | ||
1452 | Name: opGetBucketAccelerateConfiguration, | ||
1453 | HTTPMethod: "GET", | ||
1454 | HTTPPath: "/{Bucket}?accelerate", | ||
1455 | } | ||
1456 | |||
1457 | if input == nil { | ||
1458 | input = &GetBucketAccelerateConfigurationInput{} | ||
1459 | } | ||
1460 | |||
1461 | output = &GetBucketAccelerateConfigurationOutput{} | ||
1462 | req = c.newRequest(op, input, output) | ||
1463 | return | ||
1464 | } | ||
1465 | |||
1466 | // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service. | ||
1467 | // | ||
1468 | // Returns the accelerate configuration of a bucket. | ||
1469 | // | ||
1470 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1471 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1472 | // the error. | ||
1473 | // | ||
1474 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1475 | // API operation GetBucketAccelerateConfiguration for usage and error information. | ||
1476 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration | ||
1477 | func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) { | ||
1478 | req, out := c.GetBucketAccelerateConfigurationRequest(input) | ||
1479 | return out, req.Send() | ||
1480 | } | ||
1481 | |||
1482 | // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of | ||
1483 | // the ability to pass a context and additional request options. | ||
1484 | // | ||
1485 | // See GetBucketAccelerateConfiguration for details on how to use this API operation. | ||
1486 | // | ||
1487 | // The context must be non-nil and will be used for request cancellation. If | ||
1488 | // the context is nil a panic will occur. In the future the SDK may create | ||
1489 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1490 | // for more information on using Contexts. | ||
1491 | func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) { | ||
1492 | req, out := c.GetBucketAccelerateConfigurationRequest(input) | ||
1493 | req.SetContext(ctx) | ||
1494 | req.ApplyOptions(opts...) | ||
1495 | return out, req.Send() | ||
1496 | } | ||
1497 | |||
1498 | const opGetBucketAcl = "GetBucketAcl" | ||
1499 | |||
1500 | // GetBucketAclRequest generates a "aws/request.Request" representing the | ||
1501 | // client's request for the GetBucketAcl operation. The "output" return | ||
1502 | // value can be used to capture response data after the request's "Send" method | ||
1503 | // is called. | ||
1504 | // | ||
1505 | // See GetBucketAcl for usage and error information. | ||
1506 | // | ||
1507 | // Creating a request object using this method should be used when you want to inject | ||
1508 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1509 | // access properties on the request object before or after sending the request. If | ||
1510 | // you just want the service response, call the GetBucketAcl method directly | ||
1511 | // instead. | ||
1512 | // | ||
1513 | // Note: You must call the "Send" method on the returned request object in order | ||
1514 | // to execute the request. | ||
1515 | // | ||
1516 | // // Example sending a request using the GetBucketAclRequest method. | ||
1517 | // req, resp := client.GetBucketAclRequest(params) | ||
1518 | // | ||
1519 | // err := req.Send() | ||
1520 | // if err == nil { // resp is now filled | ||
1521 | // fmt.Println(resp) | ||
1522 | // } | ||
1523 | // | ||
1524 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl | ||
1525 | func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) { | ||
1526 | op := &request.Operation{ | ||
1527 | Name: opGetBucketAcl, | ||
1528 | HTTPMethod: "GET", | ||
1529 | HTTPPath: "/{Bucket}?acl", | ||
1530 | } | ||
1531 | |||
1532 | if input == nil { | ||
1533 | input = &GetBucketAclInput{} | ||
1534 | } | ||
1535 | |||
1536 | output = &GetBucketAclOutput{} | ||
1537 | req = c.newRequest(op, input, output) | ||
1538 | return | ||
1539 | } | ||
1540 | |||
1541 | // GetBucketAcl API operation for Amazon Simple Storage Service. | ||
1542 | // | ||
1543 | // Gets the access control policy for the bucket. | ||
1544 | // | ||
1545 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1546 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1547 | // the error. | ||
1548 | // | ||
1549 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1550 | // API operation GetBucketAcl for usage and error information. | ||
1551 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl | ||
1552 | func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) { | ||
1553 | req, out := c.GetBucketAclRequest(input) | ||
1554 | return out, req.Send() | ||
1555 | } | ||
1556 | |||
1557 | // GetBucketAclWithContext is the same as GetBucketAcl with the addition of | ||
1558 | // the ability to pass a context and additional request options. | ||
1559 | // | ||
1560 | // See GetBucketAcl for details on how to use this API operation. | ||
1561 | // | ||
1562 | // The context must be non-nil and will be used for request cancellation. If | ||
1563 | // the context is nil a panic will occur. In the future the SDK may create | ||
1564 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1565 | // for more information on using Contexts. | ||
1566 | func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) { | ||
1567 | req, out := c.GetBucketAclRequest(input) | ||
1568 | req.SetContext(ctx) | ||
1569 | req.ApplyOptions(opts...) | ||
1570 | return out, req.Send() | ||
1571 | } | ||
1572 | |||
1573 | const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration" | ||
1574 | |||
1575 | // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the | ||
1576 | // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return | ||
1577 | // value can be used to capture response data after the request's "Send" method | ||
1578 | // is called. | ||
1579 | // | ||
1580 | // See GetBucketAnalyticsConfiguration for usage and error information. | ||
1581 | // | ||
1582 | // Creating a request object using this method should be used when you want to inject | ||
1583 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1584 | // access properties on the request object before or after sending the request. If | ||
1585 | // you just want the service response, call the GetBucketAnalyticsConfiguration method directly | ||
1586 | // instead. | ||
1587 | // | ||
1588 | // Note: You must call the "Send" method on the returned request object in order | ||
1589 | // to execute the request. | ||
1590 | // | ||
1591 | // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method. | ||
1592 | // req, resp := client.GetBucketAnalyticsConfigurationRequest(params) | ||
1593 | // | ||
1594 | // err := req.Send() | ||
1595 | // if err == nil { // resp is now filled | ||
1596 | // fmt.Println(resp) | ||
1597 | // } | ||
1598 | // | ||
1599 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration | ||
1600 | func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) { | ||
1601 | op := &request.Operation{ | ||
1602 | Name: opGetBucketAnalyticsConfiguration, | ||
1603 | HTTPMethod: "GET", | ||
1604 | HTTPPath: "/{Bucket}?analytics", | ||
1605 | } | ||
1606 | |||
1607 | if input == nil { | ||
1608 | input = &GetBucketAnalyticsConfigurationInput{} | ||
1609 | } | ||
1610 | |||
1611 | output = &GetBucketAnalyticsConfigurationOutput{} | ||
1612 | req = c.newRequest(op, input, output) | ||
1613 | return | ||
1614 | } | ||
1615 | |||
1616 | // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service. | ||
1617 | // | ||
1618 | // Gets an analytics configuration for the bucket (specified by the analytics | ||
1619 | // configuration ID). | ||
1620 | // | ||
1621 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1622 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1623 | // the error. | ||
1624 | // | ||
1625 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1626 | // API operation GetBucketAnalyticsConfiguration for usage and error information. | ||
1627 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration | ||
1628 | func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) { | ||
1629 | req, out := c.GetBucketAnalyticsConfigurationRequest(input) | ||
1630 | return out, req.Send() | ||
1631 | } | ||
1632 | |||
1633 | // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of | ||
1634 | // the ability to pass a context and additional request options. | ||
1635 | // | ||
1636 | // See GetBucketAnalyticsConfiguration for details on how to use this API operation. | ||
1637 | // | ||
1638 | // The context must be non-nil and will be used for request cancellation. If | ||
1639 | // the context is nil a panic will occur. In the future the SDK may create | ||
1640 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1641 | // for more information on using Contexts. | ||
1642 | func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) { | ||
1643 | req, out := c.GetBucketAnalyticsConfigurationRequest(input) | ||
1644 | req.SetContext(ctx) | ||
1645 | req.ApplyOptions(opts...) | ||
1646 | return out, req.Send() | ||
1647 | } | ||
1648 | |||
1649 | const opGetBucketCors = "GetBucketCors" | ||
1650 | |||
1651 | // GetBucketCorsRequest generates a "aws/request.Request" representing the | ||
1652 | // client's request for the GetBucketCors operation. The "output" return | ||
1653 | // value can be used to capture response data after the request's "Send" method | ||
1654 | // is called. | ||
1655 | // | ||
1656 | // See GetBucketCors for usage and error information. | ||
1657 | // | ||
1658 | // Creating a request object using this method should be used when you want to inject | ||
1659 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1660 | // access properties on the request object before or after sending the request. If | ||
1661 | // you just want the service response, call the GetBucketCors method directly | ||
1662 | // instead. | ||
1663 | // | ||
1664 | // Note: You must call the "Send" method on the returned request object in order | ||
1665 | // to execute the request. | ||
1666 | // | ||
1667 | // // Example sending a request using the GetBucketCorsRequest method. | ||
1668 | // req, resp := client.GetBucketCorsRequest(params) | ||
1669 | // | ||
1670 | // err := req.Send() | ||
1671 | // if err == nil { // resp is now filled | ||
1672 | // fmt.Println(resp) | ||
1673 | // } | ||
1674 | // | ||
1675 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors | ||
1676 | func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) { | ||
1677 | op := &request.Operation{ | ||
1678 | Name: opGetBucketCors, | ||
1679 | HTTPMethod: "GET", | ||
1680 | HTTPPath: "/{Bucket}?cors", | ||
1681 | } | ||
1682 | |||
1683 | if input == nil { | ||
1684 | input = &GetBucketCorsInput{} | ||
1685 | } | ||
1686 | |||
1687 | output = &GetBucketCorsOutput{} | ||
1688 | req = c.newRequest(op, input, output) | ||
1689 | return | ||
1690 | } | ||
1691 | |||
1692 | // GetBucketCors API operation for Amazon Simple Storage Service. | ||
1693 | // | ||
1694 | // Returns the cors configuration for the bucket. | ||
1695 | // | ||
1696 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1697 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1698 | // the error. | ||
1699 | // | ||
1700 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1701 | // API operation GetBucketCors for usage and error information. | ||
1702 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors | ||
1703 | func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) { | ||
1704 | req, out := c.GetBucketCorsRequest(input) | ||
1705 | return out, req.Send() | ||
1706 | } | ||
1707 | |||
1708 | // GetBucketCorsWithContext is the same as GetBucketCors with the addition of | ||
1709 | // the ability to pass a context and additional request options. | ||
1710 | // | ||
1711 | // See GetBucketCors for details on how to use this API operation. | ||
1712 | // | ||
1713 | // The context must be non-nil and will be used for request cancellation. If | ||
1714 | // the context is nil a panic will occur. In the future the SDK may create | ||
1715 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1716 | // for more information on using Contexts. | ||
1717 | func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) { | ||
1718 | req, out := c.GetBucketCorsRequest(input) | ||
1719 | req.SetContext(ctx) | ||
1720 | req.ApplyOptions(opts...) | ||
1721 | return out, req.Send() | ||
1722 | } | ||
1723 | |||
1724 | const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration" | ||
1725 | |||
1726 | // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the | ||
1727 | // client's request for the GetBucketInventoryConfiguration operation. The "output" return | ||
1728 | // value can be used to capture response data after the request's "Send" method | ||
1729 | // is called. | ||
1730 | // | ||
1731 | // See GetBucketInventoryConfiguration for usage and error information. | ||
1732 | // | ||
1733 | // Creating a request object using this method should be used when you want to inject | ||
1734 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1735 | // access properties on the request object before or after sending the request. If | ||
1736 | // you just want the service response, call the GetBucketInventoryConfiguration method directly | ||
1737 | // instead. | ||
1738 | // | ||
1739 | // Note: You must call the "Send" method on the returned request object in order | ||
1740 | // to execute the request. | ||
1741 | // | ||
1742 | // // Example sending a request using the GetBucketInventoryConfigurationRequest method. | ||
1743 | // req, resp := client.GetBucketInventoryConfigurationRequest(params) | ||
1744 | // | ||
1745 | // err := req.Send() | ||
1746 | // if err == nil { // resp is now filled | ||
1747 | // fmt.Println(resp) | ||
1748 | // } | ||
1749 | // | ||
1750 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration | ||
1751 | func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) { | ||
1752 | op := &request.Operation{ | ||
1753 | Name: opGetBucketInventoryConfiguration, | ||
1754 | HTTPMethod: "GET", | ||
1755 | HTTPPath: "/{Bucket}?inventory", | ||
1756 | } | ||
1757 | |||
1758 | if input == nil { | ||
1759 | input = &GetBucketInventoryConfigurationInput{} | ||
1760 | } | ||
1761 | |||
1762 | output = &GetBucketInventoryConfigurationOutput{} | ||
1763 | req = c.newRequest(op, input, output) | ||
1764 | return | ||
1765 | } | ||
1766 | |||
1767 | // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service. | ||
1768 | // | ||
1769 | // Returns an inventory configuration (identified by the inventory ID) from | ||
1770 | // the bucket. | ||
1771 | // | ||
1772 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1773 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1774 | // the error. | ||
1775 | // | ||
1776 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1777 | // API operation GetBucketInventoryConfiguration for usage and error information. | ||
1778 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration | ||
1779 | func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) { | ||
1780 | req, out := c.GetBucketInventoryConfigurationRequest(input) | ||
1781 | return out, req.Send() | ||
1782 | } | ||
1783 | |||
1784 | // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of | ||
1785 | // the ability to pass a context and additional request options. | ||
1786 | // | ||
1787 | // See GetBucketInventoryConfiguration for details on how to use this API operation. | ||
1788 | // | ||
1789 | // The context must be non-nil and will be used for request cancellation. If | ||
1790 | // the context is nil a panic will occur. In the future the SDK may create | ||
1791 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1792 | // for more information on using Contexts. | ||
1793 | func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) { | ||
1794 | req, out := c.GetBucketInventoryConfigurationRequest(input) | ||
1795 | req.SetContext(ctx) | ||
1796 | req.ApplyOptions(opts...) | ||
1797 | return out, req.Send() | ||
1798 | } | ||
1799 | |||
1800 | const opGetBucketLifecycle = "GetBucketLifecycle" | ||
1801 | |||
1802 | // GetBucketLifecycleRequest generates a "aws/request.Request" representing the | ||
1803 | // client's request for the GetBucketLifecycle operation. The "output" return | ||
1804 | // value can be used to capture response data after the request's "Send" method | ||
1805 | // is called. | ||
1806 | // | ||
1807 | // See GetBucketLifecycle for usage and error information. | ||
1808 | // | ||
1809 | // Creating a request object using this method should be used when you want to inject | ||
1810 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1811 | // access properties on the request object before or after sending the request. If | ||
1812 | // you just want the service response, call the GetBucketLifecycle method directly | ||
1813 | // instead. | ||
1814 | // | ||
1815 | // Note: You must call the "Send" method on the returned request object in order | ||
1816 | // to execute the request. | ||
1817 | // | ||
1818 | // // Example sending a request using the GetBucketLifecycleRequest method. | ||
1819 | // req, resp := client.GetBucketLifecycleRequest(params) | ||
1820 | // | ||
1821 | // err := req.Send() | ||
1822 | // if err == nil { // resp is now filled | ||
1823 | // fmt.Println(resp) | ||
1824 | // } | ||
1825 | // | ||
1826 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle | ||
1827 | func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) { | ||
1828 | if c.Client.Config.Logger != nil { | ||
1829 | c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated") | ||
1830 | } | ||
1831 | op := &request.Operation{ | ||
1832 | Name: opGetBucketLifecycle, | ||
1833 | HTTPMethod: "GET", | ||
1834 | HTTPPath: "/{Bucket}?lifecycle", | ||
1835 | } | ||
1836 | |||
1837 | if input == nil { | ||
1838 | input = &GetBucketLifecycleInput{} | ||
1839 | } | ||
1840 | |||
1841 | output = &GetBucketLifecycleOutput{} | ||
1842 | req = c.newRequest(op, input, output) | ||
1843 | return | ||
1844 | } | ||
1845 | |||
1846 | // GetBucketLifecycle API operation for Amazon Simple Storage Service. | ||
1847 | // | ||
1848 | // Deprecated, see the GetBucketLifecycleConfiguration operation. | ||
1849 | // | ||
1850 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1851 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1852 | // the error. | ||
1853 | // | ||
1854 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1855 | // API operation GetBucketLifecycle for usage and error information. | ||
1856 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle | ||
1857 | func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) { | ||
1858 | req, out := c.GetBucketLifecycleRequest(input) | ||
1859 | return out, req.Send() | ||
1860 | } | ||
1861 | |||
1862 | // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of | ||
1863 | // the ability to pass a context and additional request options. | ||
1864 | // | ||
1865 | // See GetBucketLifecycle for details on how to use this API operation. | ||
1866 | // | ||
1867 | // The context must be non-nil and will be used for request cancellation. If | ||
1868 | // the context is nil a panic will occur. In the future the SDK may create | ||
1869 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1870 | // for more information on using Contexts. | ||
1871 | func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) { | ||
1872 | req, out := c.GetBucketLifecycleRequest(input) | ||
1873 | req.SetContext(ctx) | ||
1874 | req.ApplyOptions(opts...) | ||
1875 | return out, req.Send() | ||
1876 | } | ||
1877 | |||
1878 | const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration" | ||
1879 | |||
1880 | // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the | ||
1881 | // client's request for the GetBucketLifecycleConfiguration operation. The "output" return | ||
1882 | // value can be used to capture response data after the request's "Send" method | ||
1883 | // is called. | ||
1884 | // | ||
1885 | // See GetBucketLifecycleConfiguration for usage and error information. | ||
1886 | // | ||
1887 | // Creating a request object using this method should be used when you want to inject | ||
1888 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1889 | // access properties on the request object before or after sending the request. If | ||
1890 | // you just want the service response, call the GetBucketLifecycleConfiguration method directly | ||
1891 | // instead. | ||
1892 | // | ||
1893 | // Note: You must call the "Send" method on the returned request object in order | ||
1894 | // to execute the request. | ||
1895 | // | ||
1896 | // // Example sending a request using the GetBucketLifecycleConfigurationRequest method. | ||
1897 | // req, resp := client.GetBucketLifecycleConfigurationRequest(params) | ||
1898 | // | ||
1899 | // err := req.Send() | ||
1900 | // if err == nil { // resp is now filled | ||
1901 | // fmt.Println(resp) | ||
1902 | // } | ||
1903 | // | ||
1904 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration | ||
1905 | func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) { | ||
1906 | op := &request.Operation{ | ||
1907 | Name: opGetBucketLifecycleConfiguration, | ||
1908 | HTTPMethod: "GET", | ||
1909 | HTTPPath: "/{Bucket}?lifecycle", | ||
1910 | } | ||
1911 | |||
1912 | if input == nil { | ||
1913 | input = &GetBucketLifecycleConfigurationInput{} | ||
1914 | } | ||
1915 | |||
1916 | output = &GetBucketLifecycleConfigurationOutput{} | ||
1917 | req = c.newRequest(op, input, output) | ||
1918 | return | ||
1919 | } | ||
1920 | |||
1921 | // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service. | ||
1922 | // | ||
1923 | // Returns the lifecycle configuration information set on the bucket. | ||
1924 | // | ||
1925 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1926 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1927 | // the error. | ||
1928 | // | ||
1929 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
1930 | // API operation GetBucketLifecycleConfiguration for usage and error information. | ||
1931 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration | ||
1932 | func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) { | ||
1933 | req, out := c.GetBucketLifecycleConfigurationRequest(input) | ||
1934 | return out, req.Send() | ||
1935 | } | ||
1936 | |||
1937 | // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of | ||
1938 | // the ability to pass a context and additional request options. | ||
1939 | // | ||
1940 | // See GetBucketLifecycleConfiguration for details on how to use this API operation. | ||
1941 | // | ||
1942 | // The context must be non-nil and will be used for request cancellation. If | ||
1943 | // the context is nil a panic will occur. In the future the SDK may create | ||
1944 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1945 | // for more information on using Contexts. | ||
1946 | func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) { | ||
1947 | req, out := c.GetBucketLifecycleConfigurationRequest(input) | ||
1948 | req.SetContext(ctx) | ||
1949 | req.ApplyOptions(opts...) | ||
1950 | return out, req.Send() | ||
1951 | } | ||
1952 | |||
1953 | const opGetBucketLocation = "GetBucketLocation" | ||
1954 | |||
1955 | // GetBucketLocationRequest generates a "aws/request.Request" representing the | ||
1956 | // client's request for the GetBucketLocation operation. The "output" return | ||
1957 | // value can be used to capture response data after the request's "Send" method | ||
1958 | // is called. | ||
1959 | // | ||
1960 | // See GetBucketLocation for usage and error information. | ||
1961 | // | ||
1962 | // Creating a request object using this method should be used when you want to inject | ||
1963 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
1964 | // access properties on the request object before or after sending the request. If | ||
1965 | // you just want the service response, call the GetBucketLocation method directly | ||
1966 | // instead. | ||
1967 | // | ||
1968 | // Note: You must call the "Send" method on the returned request object in order | ||
1969 | // to execute the request. | ||
1970 | // | ||
1971 | // // Example sending a request using the GetBucketLocationRequest method. | ||
1972 | // req, resp := client.GetBucketLocationRequest(params) | ||
1973 | // | ||
1974 | // err := req.Send() | ||
1975 | // if err == nil { // resp is now filled | ||
1976 | // fmt.Println(resp) | ||
1977 | // } | ||
1978 | // | ||
1979 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation | ||
1980 | func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) { | ||
1981 | op := &request.Operation{ | ||
1982 | Name: opGetBucketLocation, | ||
1983 | HTTPMethod: "GET", | ||
1984 | HTTPPath: "/{Bucket}?location", | ||
1985 | } | ||
1986 | |||
1987 | if input == nil { | ||
1988 | input = &GetBucketLocationInput{} | ||
1989 | } | ||
1990 | |||
1991 | output = &GetBucketLocationOutput{} | ||
1992 | req = c.newRequest(op, input, output) | ||
1993 | return | ||
1994 | } | ||
1995 | |||
1996 | // GetBucketLocation API operation for Amazon Simple Storage Service. | ||
1997 | // | ||
1998 | // Returns the region the bucket resides in. | ||
1999 | // | ||
2000 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2001 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2002 | // the error. | ||
2003 | // | ||
2004 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2005 | // API operation GetBucketLocation for usage and error information. | ||
2006 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation | ||
2007 | func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) { | ||
2008 | req, out := c.GetBucketLocationRequest(input) | ||
2009 | return out, req.Send() | ||
2010 | } | ||
2011 | |||
2012 | // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of | ||
2013 | // the ability to pass a context and additional request options. | ||
2014 | // | ||
2015 | // See GetBucketLocation for details on how to use this API operation. | ||
2016 | // | ||
2017 | // The context must be non-nil and will be used for request cancellation. If | ||
2018 | // the context is nil a panic will occur. In the future the SDK may create | ||
2019 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2020 | // for more information on using Contexts. | ||
2021 | func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) { | ||
2022 | req, out := c.GetBucketLocationRequest(input) | ||
2023 | req.SetContext(ctx) | ||
2024 | req.ApplyOptions(opts...) | ||
2025 | return out, req.Send() | ||
2026 | } | ||
2027 | |||
2028 | const opGetBucketLogging = "GetBucketLogging" | ||
2029 | |||
2030 | // GetBucketLoggingRequest generates a "aws/request.Request" representing the | ||
2031 | // client's request for the GetBucketLogging operation. The "output" return | ||
2032 | // value can be used to capture response data after the request's "Send" method | ||
2033 | // is called. | ||
2034 | // | ||
2035 | // See GetBucketLogging for usage and error information. | ||
2036 | // | ||
2037 | // Creating a request object using this method should be used when you want to inject | ||
2038 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2039 | // access properties on the request object before or after sending the request. If | ||
2040 | // you just want the service response, call the GetBucketLogging method directly | ||
2041 | // instead. | ||
2042 | // | ||
2043 | // Note: You must call the "Send" method on the returned request object in order | ||
2044 | // to execute the request. | ||
2045 | // | ||
2046 | // // Example sending a request using the GetBucketLoggingRequest method. | ||
2047 | // req, resp := client.GetBucketLoggingRequest(params) | ||
2048 | // | ||
2049 | // err := req.Send() | ||
2050 | // if err == nil { // resp is now filled | ||
2051 | // fmt.Println(resp) | ||
2052 | // } | ||
2053 | // | ||
2054 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging | ||
2055 | func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) { | ||
2056 | op := &request.Operation{ | ||
2057 | Name: opGetBucketLogging, | ||
2058 | HTTPMethod: "GET", | ||
2059 | HTTPPath: "/{Bucket}?logging", | ||
2060 | } | ||
2061 | |||
2062 | if input == nil { | ||
2063 | input = &GetBucketLoggingInput{} | ||
2064 | } | ||
2065 | |||
2066 | output = &GetBucketLoggingOutput{} | ||
2067 | req = c.newRequest(op, input, output) | ||
2068 | return | ||
2069 | } | ||
2070 | |||
2071 | // GetBucketLogging API operation for Amazon Simple Storage Service. | ||
2072 | // | ||
2073 | // Returns the logging status of a bucket and the permissions users have to | ||
2074 | // view and modify that status. To use GET, you must be the bucket owner. | ||
2075 | // | ||
2076 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2077 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2078 | // the error. | ||
2079 | // | ||
2080 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2081 | // API operation GetBucketLogging for usage and error information. | ||
2082 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging | ||
2083 | func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) { | ||
2084 | req, out := c.GetBucketLoggingRequest(input) | ||
2085 | return out, req.Send() | ||
2086 | } | ||
2087 | |||
2088 | // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of | ||
2089 | // the ability to pass a context and additional request options. | ||
2090 | // | ||
2091 | // See GetBucketLogging for details on how to use this API operation. | ||
2092 | // | ||
2093 | // The context must be non-nil and will be used for request cancellation. If | ||
2094 | // the context is nil a panic will occur. In the future the SDK may create | ||
2095 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2096 | // for more information on using Contexts. | ||
2097 | func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) { | ||
2098 | req, out := c.GetBucketLoggingRequest(input) | ||
2099 | req.SetContext(ctx) | ||
2100 | req.ApplyOptions(opts...) | ||
2101 | return out, req.Send() | ||
2102 | } | ||
2103 | |||
2104 | const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration" | ||
2105 | |||
2106 | // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the | ||
2107 | // client's request for the GetBucketMetricsConfiguration operation. The "output" return | ||
2108 | // value can be used to capture response data after the request's "Send" method | ||
2109 | // is called. | ||
2110 | // | ||
2111 | // See GetBucketMetricsConfiguration for usage and error information. | ||
2112 | // | ||
2113 | // Creating a request object using this method should be used when you want to inject | ||
2114 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2115 | // access properties on the request object before or after sending the request. If | ||
2116 | // you just want the service response, call the GetBucketMetricsConfiguration method directly | ||
2117 | // instead. | ||
2118 | // | ||
2119 | // Note: You must call the "Send" method on the returned request object in order | ||
2120 | // to execute the request. | ||
2121 | // | ||
2122 | // // Example sending a request using the GetBucketMetricsConfigurationRequest method. | ||
2123 | // req, resp := client.GetBucketMetricsConfigurationRequest(params) | ||
2124 | // | ||
2125 | // err := req.Send() | ||
2126 | // if err == nil { // resp is now filled | ||
2127 | // fmt.Println(resp) | ||
2128 | // } | ||
2129 | // | ||
2130 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration | ||
2131 | func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) { | ||
2132 | op := &request.Operation{ | ||
2133 | Name: opGetBucketMetricsConfiguration, | ||
2134 | HTTPMethod: "GET", | ||
2135 | HTTPPath: "/{Bucket}?metrics", | ||
2136 | } | ||
2137 | |||
2138 | if input == nil { | ||
2139 | input = &GetBucketMetricsConfigurationInput{} | ||
2140 | } | ||
2141 | |||
2142 | output = &GetBucketMetricsConfigurationOutput{} | ||
2143 | req = c.newRequest(op, input, output) | ||
2144 | return | ||
2145 | } | ||
2146 | |||
2147 | // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service. | ||
2148 | // | ||
2149 | // Gets a metrics configuration (specified by the metrics configuration ID) | ||
2150 | // from the bucket. | ||
2151 | // | ||
2152 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2153 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2154 | // the error. | ||
2155 | // | ||
2156 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2157 | // API operation GetBucketMetricsConfiguration for usage and error information. | ||
2158 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration | ||
2159 | func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) { | ||
2160 | req, out := c.GetBucketMetricsConfigurationRequest(input) | ||
2161 | return out, req.Send() | ||
2162 | } | ||
2163 | |||
2164 | // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of | ||
2165 | // the ability to pass a context and additional request options. | ||
2166 | // | ||
2167 | // See GetBucketMetricsConfiguration for details on how to use this API operation. | ||
2168 | // | ||
2169 | // The context must be non-nil and will be used for request cancellation. If | ||
2170 | // the context is nil a panic will occur. In the future the SDK may create | ||
2171 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2172 | // for more information on using Contexts. | ||
2173 | func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) { | ||
2174 | req, out := c.GetBucketMetricsConfigurationRequest(input) | ||
2175 | req.SetContext(ctx) | ||
2176 | req.ApplyOptions(opts...) | ||
2177 | return out, req.Send() | ||
2178 | } | ||
2179 | |||
2180 | const opGetBucketNotification = "GetBucketNotification" | ||
2181 | |||
2182 | // GetBucketNotificationRequest generates a "aws/request.Request" representing the | ||
2183 | // client's request for the GetBucketNotification operation. The "output" return | ||
2184 | // value can be used to capture response data after the request's "Send" method | ||
2185 | // is called. | ||
2186 | // | ||
2187 | // See GetBucketNotification for usage and error information. | ||
2188 | // | ||
2189 | // Creating a request object using this method should be used when you want to inject | ||
2190 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2191 | // access properties on the request object before or after sending the request. If | ||
2192 | // you just want the service response, call the GetBucketNotification method directly | ||
2193 | // instead. | ||
2194 | // | ||
2195 | // Note: You must call the "Send" method on the returned request object in order | ||
2196 | // to execute the request. | ||
2197 | // | ||
2198 | // // Example sending a request using the GetBucketNotificationRequest method. | ||
2199 | // req, resp := client.GetBucketNotificationRequest(params) | ||
2200 | // | ||
2201 | // err := req.Send() | ||
2202 | // if err == nil { // resp is now filled | ||
2203 | // fmt.Println(resp) | ||
2204 | // } | ||
2205 | // | ||
2206 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification | ||
2207 | func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) { | ||
2208 | if c.Client.Config.Logger != nil { | ||
2209 | c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated") | ||
2210 | } | ||
2211 | op := &request.Operation{ | ||
2212 | Name: opGetBucketNotification, | ||
2213 | HTTPMethod: "GET", | ||
2214 | HTTPPath: "/{Bucket}?notification", | ||
2215 | } | ||
2216 | |||
2217 | if input == nil { | ||
2218 | input = &GetBucketNotificationConfigurationRequest{} | ||
2219 | } | ||
2220 | |||
2221 | output = &NotificationConfigurationDeprecated{} | ||
2222 | req = c.newRequest(op, input, output) | ||
2223 | return | ||
2224 | } | ||
2225 | |||
2226 | // GetBucketNotification API operation for Amazon Simple Storage Service. | ||
2227 | // | ||
2228 | // Deprecated, see the GetBucketNotificationConfiguration operation. | ||
2229 | // | ||
2230 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2231 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2232 | // the error. | ||
2233 | // | ||
2234 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2235 | // API operation GetBucketNotification for usage and error information. | ||
2236 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification | ||
2237 | func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) { | ||
2238 | req, out := c.GetBucketNotificationRequest(input) | ||
2239 | return out, req.Send() | ||
2240 | } | ||
2241 | |||
2242 | // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of | ||
2243 | // the ability to pass a context and additional request options. | ||
2244 | // | ||
2245 | // See GetBucketNotification for details on how to use this API operation. | ||
2246 | // | ||
2247 | // The context must be non-nil and will be used for request cancellation. If | ||
2248 | // the context is nil a panic will occur. In the future the SDK may create | ||
2249 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2250 | // for more information on using Contexts. | ||
2251 | func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) { | ||
2252 | req, out := c.GetBucketNotificationRequest(input) | ||
2253 | req.SetContext(ctx) | ||
2254 | req.ApplyOptions(opts...) | ||
2255 | return out, req.Send() | ||
2256 | } | ||
2257 | |||
2258 | const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration" | ||
2259 | |||
2260 | // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the | ||
2261 | // client's request for the GetBucketNotificationConfiguration operation. The "output" return | ||
2262 | // value can be used to capture response data after the request's "Send" method | ||
2263 | // is called. | ||
2264 | // | ||
2265 | // See GetBucketNotificationConfiguration for usage and error information. | ||
2266 | // | ||
2267 | // Creating a request object using this method should be used when you want to inject | ||
2268 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2269 | // access properties on the request object before or after sending the request. If | ||
2270 | // you just want the service response, call the GetBucketNotificationConfiguration method directly | ||
2271 | // instead. | ||
2272 | // | ||
2273 | // Note: You must call the "Send" method on the returned request object in order | ||
2274 | // to execute the request. | ||
2275 | // | ||
2276 | // // Example sending a request using the GetBucketNotificationConfigurationRequest method. | ||
2277 | // req, resp := client.GetBucketNotificationConfigurationRequest(params) | ||
2278 | // | ||
2279 | // err := req.Send() | ||
2280 | // if err == nil { // resp is now filled | ||
2281 | // fmt.Println(resp) | ||
2282 | // } | ||
2283 | // | ||
2284 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration | ||
2285 | func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) { | ||
2286 | op := &request.Operation{ | ||
2287 | Name: opGetBucketNotificationConfiguration, | ||
2288 | HTTPMethod: "GET", | ||
2289 | HTTPPath: "/{Bucket}?notification", | ||
2290 | } | ||
2291 | |||
2292 | if input == nil { | ||
2293 | input = &GetBucketNotificationConfigurationRequest{} | ||
2294 | } | ||
2295 | |||
2296 | output = &NotificationConfiguration{} | ||
2297 | req = c.newRequest(op, input, output) | ||
2298 | return | ||
2299 | } | ||
2300 | |||
2301 | // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service. | ||
2302 | // | ||
2303 | // Returns the notification configuration of a bucket. | ||
2304 | // | ||
2305 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2306 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2307 | // the error. | ||
2308 | // | ||
2309 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2310 | // API operation GetBucketNotificationConfiguration for usage and error information. | ||
2311 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration | ||
2312 | func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) { | ||
2313 | req, out := c.GetBucketNotificationConfigurationRequest(input) | ||
2314 | return out, req.Send() | ||
2315 | } | ||
2316 | |||
2317 | // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of | ||
2318 | // the ability to pass a context and additional request options. | ||
2319 | // | ||
2320 | // See GetBucketNotificationConfiguration for details on how to use this API operation. | ||
2321 | // | ||
2322 | // The context must be non-nil and will be used for request cancellation. If | ||
2323 | // the context is nil a panic will occur. In the future the SDK may create | ||
2324 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2325 | // for more information on using Contexts. | ||
2326 | func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) { | ||
2327 | req, out := c.GetBucketNotificationConfigurationRequest(input) | ||
2328 | req.SetContext(ctx) | ||
2329 | req.ApplyOptions(opts...) | ||
2330 | return out, req.Send() | ||
2331 | } | ||
2332 | |||
2333 | const opGetBucketPolicy = "GetBucketPolicy" | ||
2334 | |||
2335 | // GetBucketPolicyRequest generates a "aws/request.Request" representing the | ||
2336 | // client's request for the GetBucketPolicy operation. The "output" return | ||
2337 | // value can be used to capture response data after the request's "Send" method | ||
2338 | // is called. | ||
2339 | // | ||
2340 | // See GetBucketPolicy for usage and error information. | ||
2341 | // | ||
2342 | // Creating a request object using this method should be used when you want to inject | ||
2343 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2344 | // access properties on the request object before or after sending the request. If | ||
2345 | // you just want the service response, call the GetBucketPolicy method directly | ||
2346 | // instead. | ||
2347 | // | ||
2348 | // Note: You must call the "Send" method on the returned request object in order | ||
2349 | // to execute the request. | ||
2350 | // | ||
2351 | // // Example sending a request using the GetBucketPolicyRequest method. | ||
2352 | // req, resp := client.GetBucketPolicyRequest(params) | ||
2353 | // | ||
2354 | // err := req.Send() | ||
2355 | // if err == nil { // resp is now filled | ||
2356 | // fmt.Println(resp) | ||
2357 | // } | ||
2358 | // | ||
2359 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy | ||
2360 | func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) { | ||
2361 | op := &request.Operation{ | ||
2362 | Name: opGetBucketPolicy, | ||
2363 | HTTPMethod: "GET", | ||
2364 | HTTPPath: "/{Bucket}?policy", | ||
2365 | } | ||
2366 | |||
2367 | if input == nil { | ||
2368 | input = &GetBucketPolicyInput{} | ||
2369 | } | ||
2370 | |||
2371 | output = &GetBucketPolicyOutput{} | ||
2372 | req = c.newRequest(op, input, output) | ||
2373 | return | ||
2374 | } | ||
2375 | |||
2376 | // GetBucketPolicy API operation for Amazon Simple Storage Service. | ||
2377 | // | ||
2378 | // Returns the policy of a specified bucket. | ||
2379 | // | ||
2380 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2381 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2382 | // the error. | ||
2383 | // | ||
2384 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2385 | // API operation GetBucketPolicy for usage and error information. | ||
2386 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy | ||
2387 | func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) { | ||
2388 | req, out := c.GetBucketPolicyRequest(input) | ||
2389 | return out, req.Send() | ||
2390 | } | ||
2391 | |||
2392 | // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of | ||
2393 | // the ability to pass a context and additional request options. | ||
2394 | // | ||
2395 | // See GetBucketPolicy for details on how to use this API operation. | ||
2396 | // | ||
2397 | // The context must be non-nil and will be used for request cancellation. If | ||
2398 | // the context is nil a panic will occur. In the future the SDK may create | ||
2399 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2400 | // for more information on using Contexts. | ||
2401 | func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) { | ||
2402 | req, out := c.GetBucketPolicyRequest(input) | ||
2403 | req.SetContext(ctx) | ||
2404 | req.ApplyOptions(opts...) | ||
2405 | return out, req.Send() | ||
2406 | } | ||
2407 | |||
2408 | const opGetBucketReplication = "GetBucketReplication" | ||
2409 | |||
2410 | // GetBucketReplicationRequest generates a "aws/request.Request" representing the | ||
2411 | // client's request for the GetBucketReplication operation. The "output" return | ||
2412 | // value can be used to capture response data after the request's "Send" method | ||
2413 | // is called. | ||
2414 | // | ||
2415 | // See GetBucketReplication for usage and error information. | ||
2416 | // | ||
2417 | // Creating a request object using this method should be used when you want to inject | ||
2418 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2419 | // access properties on the request object before or after sending the request. If | ||
2420 | // you just want the service response, call the GetBucketReplication method directly | ||
2421 | // instead. | ||
2422 | // | ||
2423 | // Note: You must call the "Send" method on the returned request object in order | ||
2424 | // to execute the request. | ||
2425 | // | ||
2426 | // // Example sending a request using the GetBucketReplicationRequest method. | ||
2427 | // req, resp := client.GetBucketReplicationRequest(params) | ||
2428 | // | ||
2429 | // err := req.Send() | ||
2430 | // if err == nil { // resp is now filled | ||
2431 | // fmt.Println(resp) | ||
2432 | // } | ||
2433 | // | ||
2434 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication | ||
2435 | func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) { | ||
2436 | op := &request.Operation{ | ||
2437 | Name: opGetBucketReplication, | ||
2438 | HTTPMethod: "GET", | ||
2439 | HTTPPath: "/{Bucket}?replication", | ||
2440 | } | ||
2441 | |||
2442 | if input == nil { | ||
2443 | input = &GetBucketReplicationInput{} | ||
2444 | } | ||
2445 | |||
2446 | output = &GetBucketReplicationOutput{} | ||
2447 | req = c.newRequest(op, input, output) | ||
2448 | return | ||
2449 | } | ||
2450 | |||
2451 | // GetBucketReplication API operation for Amazon Simple Storage Service. | ||
2452 | // | ||
2453 | // Returns the replication configuration of a bucket. | ||
2454 | // | ||
2455 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2456 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2457 | // the error. | ||
2458 | // | ||
2459 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2460 | // API operation GetBucketReplication for usage and error information. | ||
2461 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication | ||
2462 | func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) { | ||
2463 | req, out := c.GetBucketReplicationRequest(input) | ||
2464 | return out, req.Send() | ||
2465 | } | ||
2466 | |||
2467 | // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of | ||
2468 | // the ability to pass a context and additional request options. | ||
2469 | // | ||
2470 | // See GetBucketReplication for details on how to use this API operation. | ||
2471 | // | ||
2472 | // The context must be non-nil and will be used for request cancellation. If | ||
2473 | // the context is nil a panic will occur. In the future the SDK may create | ||
2474 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2475 | // for more information on using Contexts. | ||
2476 | func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) { | ||
2477 | req, out := c.GetBucketReplicationRequest(input) | ||
2478 | req.SetContext(ctx) | ||
2479 | req.ApplyOptions(opts...) | ||
2480 | return out, req.Send() | ||
2481 | } | ||
2482 | |||
2483 | const opGetBucketRequestPayment = "GetBucketRequestPayment" | ||
2484 | |||
2485 | // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the | ||
2486 | // client's request for the GetBucketRequestPayment operation. The "output" return | ||
2487 | // value can be used to capture response data after the request's "Send" method | ||
2488 | // is called. | ||
2489 | // | ||
2490 | // See GetBucketRequestPayment for usage and error information. | ||
2491 | // | ||
2492 | // Creating a request object using this method should be used when you want to inject | ||
2493 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2494 | // access properties on the request object before or after sending the request. If | ||
2495 | // you just want the service response, call the GetBucketRequestPayment method directly | ||
2496 | // instead. | ||
2497 | // | ||
2498 | // Note: You must call the "Send" method on the returned request object in order | ||
2499 | // to execute the request. | ||
2500 | // | ||
2501 | // // Example sending a request using the GetBucketRequestPaymentRequest method. | ||
2502 | // req, resp := client.GetBucketRequestPaymentRequest(params) | ||
2503 | // | ||
2504 | // err := req.Send() | ||
2505 | // if err == nil { // resp is now filled | ||
2506 | // fmt.Println(resp) | ||
2507 | // } | ||
2508 | // | ||
2509 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment | ||
2510 | func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) { | ||
2511 | op := &request.Operation{ | ||
2512 | Name: opGetBucketRequestPayment, | ||
2513 | HTTPMethod: "GET", | ||
2514 | HTTPPath: "/{Bucket}?requestPayment", | ||
2515 | } | ||
2516 | |||
2517 | if input == nil { | ||
2518 | input = &GetBucketRequestPaymentInput{} | ||
2519 | } | ||
2520 | |||
2521 | output = &GetBucketRequestPaymentOutput{} | ||
2522 | req = c.newRequest(op, input, output) | ||
2523 | return | ||
2524 | } | ||
2525 | |||
2526 | // GetBucketRequestPayment API operation for Amazon Simple Storage Service. | ||
2527 | // | ||
2528 | // Returns the request payment configuration of a bucket. | ||
2529 | // | ||
2530 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2531 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2532 | // the error. | ||
2533 | // | ||
2534 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2535 | // API operation GetBucketRequestPayment for usage and error information. | ||
2536 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment | ||
2537 | func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) { | ||
2538 | req, out := c.GetBucketRequestPaymentRequest(input) | ||
2539 | return out, req.Send() | ||
2540 | } | ||
2541 | |||
2542 | // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of | ||
2543 | // the ability to pass a context and additional request options. | ||
2544 | // | ||
2545 | // See GetBucketRequestPayment for details on how to use this API operation. | ||
2546 | // | ||
2547 | // The context must be non-nil and will be used for request cancellation. If | ||
2548 | // the context is nil a panic will occur. In the future the SDK may create | ||
2549 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2550 | // for more information on using Contexts. | ||
2551 | func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) { | ||
2552 | req, out := c.GetBucketRequestPaymentRequest(input) | ||
2553 | req.SetContext(ctx) | ||
2554 | req.ApplyOptions(opts...) | ||
2555 | return out, req.Send() | ||
2556 | } | ||
2557 | |||
2558 | const opGetBucketTagging = "GetBucketTagging" | ||
2559 | |||
2560 | // GetBucketTaggingRequest generates a "aws/request.Request" representing the | ||
2561 | // client's request for the GetBucketTagging operation. The "output" return | ||
2562 | // value can be used to capture response data after the request's "Send" method | ||
2563 | // is called. | ||
2564 | // | ||
2565 | // See GetBucketTagging for usage and error information. | ||
2566 | // | ||
2567 | // Creating a request object using this method should be used when you want to inject | ||
2568 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2569 | // access properties on the request object before or after sending the request. If | ||
2570 | // you just want the service response, call the GetBucketTagging method directly | ||
2571 | // instead. | ||
2572 | // | ||
2573 | // Note: You must call the "Send" method on the returned request object in order | ||
2574 | // to execute the request. | ||
2575 | // | ||
2576 | // // Example sending a request using the GetBucketTaggingRequest method. | ||
2577 | // req, resp := client.GetBucketTaggingRequest(params) | ||
2578 | // | ||
2579 | // err := req.Send() | ||
2580 | // if err == nil { // resp is now filled | ||
2581 | // fmt.Println(resp) | ||
2582 | // } | ||
2583 | // | ||
2584 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging | ||
2585 | func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) { | ||
2586 | op := &request.Operation{ | ||
2587 | Name: opGetBucketTagging, | ||
2588 | HTTPMethod: "GET", | ||
2589 | HTTPPath: "/{Bucket}?tagging", | ||
2590 | } | ||
2591 | |||
2592 | if input == nil { | ||
2593 | input = &GetBucketTaggingInput{} | ||
2594 | } | ||
2595 | |||
2596 | output = &GetBucketTaggingOutput{} | ||
2597 | req = c.newRequest(op, input, output) | ||
2598 | return | ||
2599 | } | ||
2600 | |||
2601 | // GetBucketTagging API operation for Amazon Simple Storage Service. | ||
2602 | // | ||
2603 | // Returns the tag set associated with the bucket. | ||
2604 | // | ||
2605 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2606 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2607 | // the error. | ||
2608 | // | ||
2609 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2610 | // API operation GetBucketTagging for usage and error information. | ||
2611 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging | ||
2612 | func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) { | ||
2613 | req, out := c.GetBucketTaggingRequest(input) | ||
2614 | return out, req.Send() | ||
2615 | } | ||
2616 | |||
2617 | // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of | ||
2618 | // the ability to pass a context and additional request options. | ||
2619 | // | ||
2620 | // See GetBucketTagging for details on how to use this API operation. | ||
2621 | // | ||
2622 | // The context must be non-nil and will be used for request cancellation. If | ||
2623 | // the context is nil a panic will occur. In the future the SDK may create | ||
2624 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2625 | // for more information on using Contexts. | ||
2626 | func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) { | ||
2627 | req, out := c.GetBucketTaggingRequest(input) | ||
2628 | req.SetContext(ctx) | ||
2629 | req.ApplyOptions(opts...) | ||
2630 | return out, req.Send() | ||
2631 | } | ||
2632 | |||
2633 | const opGetBucketVersioning = "GetBucketVersioning" | ||
2634 | |||
2635 | // GetBucketVersioningRequest generates a "aws/request.Request" representing the | ||
2636 | // client's request for the GetBucketVersioning operation. The "output" return | ||
2637 | // value can be used to capture response data after the request's "Send" method | ||
2638 | // is called. | ||
2639 | // | ||
2640 | // See GetBucketVersioning for usage and error information. | ||
2641 | // | ||
2642 | // Creating a request object using this method should be used when you want to inject | ||
2643 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2644 | // access properties on the request object before or after sending the request. If | ||
2645 | // you just want the service response, call the GetBucketVersioning method directly | ||
2646 | // instead. | ||
2647 | // | ||
2648 | // Note: You must call the "Send" method on the returned request object in order | ||
2649 | // to execute the request. | ||
2650 | // | ||
2651 | // // Example sending a request using the GetBucketVersioningRequest method. | ||
2652 | // req, resp := client.GetBucketVersioningRequest(params) | ||
2653 | // | ||
2654 | // err := req.Send() | ||
2655 | // if err == nil { // resp is now filled | ||
2656 | // fmt.Println(resp) | ||
2657 | // } | ||
2658 | // | ||
2659 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning | ||
2660 | func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) { | ||
2661 | op := &request.Operation{ | ||
2662 | Name: opGetBucketVersioning, | ||
2663 | HTTPMethod: "GET", | ||
2664 | HTTPPath: "/{Bucket}?versioning", | ||
2665 | } | ||
2666 | |||
2667 | if input == nil { | ||
2668 | input = &GetBucketVersioningInput{} | ||
2669 | } | ||
2670 | |||
2671 | output = &GetBucketVersioningOutput{} | ||
2672 | req = c.newRequest(op, input, output) | ||
2673 | return | ||
2674 | } | ||
2675 | |||
2676 | // GetBucketVersioning API operation for Amazon Simple Storage Service. | ||
2677 | // | ||
2678 | // Returns the versioning state of a bucket. | ||
2679 | // | ||
2680 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2681 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2682 | // the error. | ||
2683 | // | ||
2684 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2685 | // API operation GetBucketVersioning for usage and error information. | ||
2686 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning | ||
2687 | func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) { | ||
2688 | req, out := c.GetBucketVersioningRequest(input) | ||
2689 | return out, req.Send() | ||
2690 | } | ||
2691 | |||
2692 | // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of | ||
2693 | // the ability to pass a context and additional request options. | ||
2694 | // | ||
2695 | // See GetBucketVersioning for details on how to use this API operation. | ||
2696 | // | ||
2697 | // The context must be non-nil and will be used for request cancellation. If | ||
2698 | // the context is nil a panic will occur. In the future the SDK may create | ||
2699 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2700 | // for more information on using Contexts. | ||
2701 | func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) { | ||
2702 | req, out := c.GetBucketVersioningRequest(input) | ||
2703 | req.SetContext(ctx) | ||
2704 | req.ApplyOptions(opts...) | ||
2705 | return out, req.Send() | ||
2706 | } | ||
2707 | |||
2708 | const opGetBucketWebsite = "GetBucketWebsite" | ||
2709 | |||
2710 | // GetBucketWebsiteRequest generates a "aws/request.Request" representing the | ||
2711 | // client's request for the GetBucketWebsite operation. The "output" return | ||
2712 | // value can be used to capture response data after the request's "Send" method | ||
2713 | // is called. | ||
2714 | // | ||
2715 | // See GetBucketWebsite for usage and error information. | ||
2716 | // | ||
2717 | // Creating a request object using this method should be used when you want to inject | ||
2718 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2719 | // access properties on the request object before or after sending the request. If | ||
2720 | // you just want the service response, call the GetBucketWebsite method directly | ||
2721 | // instead. | ||
2722 | // | ||
2723 | // Note: You must call the "Send" method on the returned request object in order | ||
2724 | // to execute the request. | ||
2725 | // | ||
2726 | // // Example sending a request using the GetBucketWebsiteRequest method. | ||
2727 | // req, resp := client.GetBucketWebsiteRequest(params) | ||
2728 | // | ||
2729 | // err := req.Send() | ||
2730 | // if err == nil { // resp is now filled | ||
2731 | // fmt.Println(resp) | ||
2732 | // } | ||
2733 | // | ||
2734 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite | ||
2735 | func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) { | ||
2736 | op := &request.Operation{ | ||
2737 | Name: opGetBucketWebsite, | ||
2738 | HTTPMethod: "GET", | ||
2739 | HTTPPath: "/{Bucket}?website", | ||
2740 | } | ||
2741 | |||
2742 | if input == nil { | ||
2743 | input = &GetBucketWebsiteInput{} | ||
2744 | } | ||
2745 | |||
2746 | output = &GetBucketWebsiteOutput{} | ||
2747 | req = c.newRequest(op, input, output) | ||
2748 | return | ||
2749 | } | ||
2750 | |||
2751 | // GetBucketWebsite API operation for Amazon Simple Storage Service. | ||
2752 | // | ||
2753 | // Returns the website configuration for a bucket. | ||
2754 | // | ||
2755 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2756 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2757 | // the error. | ||
2758 | // | ||
2759 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2760 | // API operation GetBucketWebsite for usage and error information. | ||
2761 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite | ||
2762 | func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) { | ||
2763 | req, out := c.GetBucketWebsiteRequest(input) | ||
2764 | return out, req.Send() | ||
2765 | } | ||
2766 | |||
2767 | // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of | ||
2768 | // the ability to pass a context and additional request options. | ||
2769 | // | ||
2770 | // See GetBucketWebsite for details on how to use this API operation. | ||
2771 | // | ||
2772 | // The context must be non-nil and will be used for request cancellation. If | ||
2773 | // the context is nil a panic will occur. In the future the SDK may create | ||
2774 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2775 | // for more information on using Contexts. | ||
2776 | func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) { | ||
2777 | req, out := c.GetBucketWebsiteRequest(input) | ||
2778 | req.SetContext(ctx) | ||
2779 | req.ApplyOptions(opts...) | ||
2780 | return out, req.Send() | ||
2781 | } | ||
2782 | |||
2783 | const opGetObject = "GetObject" | ||
2784 | |||
2785 | // GetObjectRequest generates a "aws/request.Request" representing the | ||
2786 | // client's request for the GetObject operation. The "output" return | ||
2787 | // value can be used to capture response data after the request's "Send" method | ||
2788 | // is called. | ||
2789 | // | ||
2790 | // See GetObject for usage and error information. | ||
2791 | // | ||
2792 | // Creating a request object using this method should be used when you want to inject | ||
2793 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2794 | // access properties on the request object before or after sending the request. If | ||
2795 | // you just want the service response, call the GetObject method directly | ||
2796 | // instead. | ||
2797 | // | ||
2798 | // Note: You must call the "Send" method on the returned request object in order | ||
2799 | // to execute the request. | ||
2800 | // | ||
2801 | // // Example sending a request using the GetObjectRequest method. | ||
2802 | // req, resp := client.GetObjectRequest(params) | ||
2803 | // | ||
2804 | // err := req.Send() | ||
2805 | // if err == nil { // resp is now filled | ||
2806 | // fmt.Println(resp) | ||
2807 | // } | ||
2808 | // | ||
2809 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject | ||
2810 | func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) { | ||
2811 | op := &request.Operation{ | ||
2812 | Name: opGetObject, | ||
2813 | HTTPMethod: "GET", | ||
2814 | HTTPPath: "/{Bucket}/{Key+}", | ||
2815 | } | ||
2816 | |||
2817 | if input == nil { | ||
2818 | input = &GetObjectInput{} | ||
2819 | } | ||
2820 | |||
2821 | output = &GetObjectOutput{} | ||
2822 | req = c.newRequest(op, input, output) | ||
2823 | return | ||
2824 | } | ||
2825 | |||
2826 | // GetObject API operation for Amazon Simple Storage Service. | ||
2827 | // | ||
2828 | // Retrieves objects from Amazon S3. | ||
2829 | // | ||
2830 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2831 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2832 | // the error. | ||
2833 | // | ||
2834 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2835 | // API operation GetObject for usage and error information. | ||
2836 | // | ||
2837 | // Returned Error Codes: | ||
2838 | // * ErrCodeNoSuchKey "NoSuchKey" | ||
2839 | // The specified key does not exist. | ||
2840 | // | ||
2841 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject | ||
2842 | func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) { | ||
2843 | req, out := c.GetObjectRequest(input) | ||
2844 | return out, req.Send() | ||
2845 | } | ||
2846 | |||
2847 | // GetObjectWithContext is the same as GetObject with the addition of | ||
2848 | // the ability to pass a context and additional request options. | ||
2849 | // | ||
2850 | // See GetObject for details on how to use this API operation. | ||
2851 | // | ||
2852 | // The context must be non-nil and will be used for request cancellation. If | ||
2853 | // the context is nil a panic will occur. In the future the SDK may create | ||
2854 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2855 | // for more information on using Contexts. | ||
2856 | func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) { | ||
2857 | req, out := c.GetObjectRequest(input) | ||
2858 | req.SetContext(ctx) | ||
2859 | req.ApplyOptions(opts...) | ||
2860 | return out, req.Send() | ||
2861 | } | ||
2862 | |||
2863 | const opGetObjectAcl = "GetObjectAcl" | ||
2864 | |||
2865 | // GetObjectAclRequest generates a "aws/request.Request" representing the | ||
2866 | // client's request for the GetObjectAcl operation. The "output" return | ||
2867 | // value can be used to capture response data after the request's "Send" method | ||
2868 | // is called. | ||
2869 | // | ||
2870 | // See GetObjectAcl for usage and error information. | ||
2871 | // | ||
2872 | // Creating a request object using this method should be used when you want to inject | ||
2873 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2874 | // access properties on the request object before or after sending the request. If | ||
2875 | // you just want the service response, call the GetObjectAcl method directly | ||
2876 | // instead. | ||
2877 | // | ||
2878 | // Note: You must call the "Send" method on the returned request object in order | ||
2879 | // to execute the request. | ||
2880 | // | ||
2881 | // // Example sending a request using the GetObjectAclRequest method. | ||
2882 | // req, resp := client.GetObjectAclRequest(params) | ||
2883 | // | ||
2884 | // err := req.Send() | ||
2885 | // if err == nil { // resp is now filled | ||
2886 | // fmt.Println(resp) | ||
2887 | // } | ||
2888 | // | ||
2889 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl | ||
2890 | func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) { | ||
2891 | op := &request.Operation{ | ||
2892 | Name: opGetObjectAcl, | ||
2893 | HTTPMethod: "GET", | ||
2894 | HTTPPath: "/{Bucket}/{Key+}?acl", | ||
2895 | } | ||
2896 | |||
2897 | if input == nil { | ||
2898 | input = &GetObjectAclInput{} | ||
2899 | } | ||
2900 | |||
2901 | output = &GetObjectAclOutput{} | ||
2902 | req = c.newRequest(op, input, output) | ||
2903 | return | ||
2904 | } | ||
2905 | |||
2906 | // GetObjectAcl API operation for Amazon Simple Storage Service. | ||
2907 | // | ||
2908 | // Returns the access control list (ACL) of an object. | ||
2909 | // | ||
2910 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2911 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2912 | // the error. | ||
2913 | // | ||
2914 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2915 | // API operation GetObjectAcl for usage and error information. | ||
2916 | // | ||
2917 | // Returned Error Codes: | ||
2918 | // * ErrCodeNoSuchKey "NoSuchKey" | ||
2919 | // The specified key does not exist. | ||
2920 | // | ||
2921 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl | ||
2922 | func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) { | ||
2923 | req, out := c.GetObjectAclRequest(input) | ||
2924 | return out, req.Send() | ||
2925 | } | ||
2926 | |||
2927 | // GetObjectAclWithContext is the same as GetObjectAcl with the addition of | ||
2928 | // the ability to pass a context and additional request options. | ||
2929 | // | ||
2930 | // See GetObjectAcl for details on how to use this API operation. | ||
2931 | // | ||
2932 | // The context must be non-nil and will be used for request cancellation. If | ||
2933 | // the context is nil a panic will occur. In the future the SDK may create | ||
2934 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
2935 | // for more information on using Contexts. | ||
2936 | func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) { | ||
2937 | req, out := c.GetObjectAclRequest(input) | ||
2938 | req.SetContext(ctx) | ||
2939 | req.ApplyOptions(opts...) | ||
2940 | return out, req.Send() | ||
2941 | } | ||
2942 | |||
2943 | const opGetObjectTagging = "GetObjectTagging" | ||
2944 | |||
2945 | // GetObjectTaggingRequest generates a "aws/request.Request" representing the | ||
2946 | // client's request for the GetObjectTagging operation. The "output" return | ||
2947 | // value can be used to capture response data after the request's "Send" method | ||
2948 | // is called. | ||
2949 | // | ||
2950 | // See GetObjectTagging for usage and error information. | ||
2951 | // | ||
2952 | // Creating a request object using this method should be used when you want to inject | ||
2953 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
2954 | // access properties on the request object before or after sending the request. If | ||
2955 | // you just want the service response, call the GetObjectTagging method directly | ||
2956 | // instead. | ||
2957 | // | ||
2958 | // Note: You must call the "Send" method on the returned request object in order | ||
2959 | // to execute the request. | ||
2960 | // | ||
2961 | // // Example sending a request using the GetObjectTaggingRequest method. | ||
2962 | // req, resp := client.GetObjectTaggingRequest(params) | ||
2963 | // | ||
2964 | // err := req.Send() | ||
2965 | // if err == nil { // resp is now filled | ||
2966 | // fmt.Println(resp) | ||
2967 | // } | ||
2968 | // | ||
2969 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging | ||
2970 | func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) { | ||
2971 | op := &request.Operation{ | ||
2972 | Name: opGetObjectTagging, | ||
2973 | HTTPMethod: "GET", | ||
2974 | HTTPPath: "/{Bucket}/{Key+}?tagging", | ||
2975 | } | ||
2976 | |||
2977 | if input == nil { | ||
2978 | input = &GetObjectTaggingInput{} | ||
2979 | } | ||
2980 | |||
2981 | output = &GetObjectTaggingOutput{} | ||
2982 | req = c.newRequest(op, input, output) | ||
2983 | return | ||
2984 | } | ||
2985 | |||
2986 | // GetObjectTagging API operation for Amazon Simple Storage Service. | ||
2987 | // | ||
2988 | // Returns the tag-set of an object. | ||
2989 | // | ||
2990 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
2991 | // with awserr.Error's Code and Message methods to get detailed information about | ||
2992 | // the error. | ||
2993 | // | ||
2994 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
2995 | // API operation GetObjectTagging for usage and error information. | ||
2996 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging | ||
2997 | func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) { | ||
2998 | req, out := c.GetObjectTaggingRequest(input) | ||
2999 | return out, req.Send() | ||
3000 | } | ||
3001 | |||
3002 | // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of | ||
3003 | // the ability to pass a context and additional request options. | ||
3004 | // | ||
3005 | // See GetObjectTagging for details on how to use this API operation. | ||
3006 | // | ||
3007 | // The context must be non-nil and will be used for request cancellation. If | ||
3008 | // the context is nil a panic will occur. In the future the SDK may create | ||
3009 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3010 | // for more information on using Contexts. | ||
3011 | func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) { | ||
3012 | req, out := c.GetObjectTaggingRequest(input) | ||
3013 | req.SetContext(ctx) | ||
3014 | req.ApplyOptions(opts...) | ||
3015 | return out, req.Send() | ||
3016 | } | ||
3017 | |||
3018 | const opGetObjectTorrent = "GetObjectTorrent" | ||
3019 | |||
3020 | // GetObjectTorrentRequest generates a "aws/request.Request" representing the | ||
3021 | // client's request for the GetObjectTorrent operation. The "output" return | ||
3022 | // value can be used to capture response data after the request's "Send" method | ||
3023 | // is called. | ||
3024 | // | ||
3025 | // See GetObjectTorrent for usage and error information. | ||
3026 | // | ||
3027 | // Creating a request object using this method should be used when you want to inject | ||
3028 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3029 | // access properties on the request object before or after sending the request. If | ||
3030 | // you just want the service response, call the GetObjectTorrent method directly | ||
3031 | // instead. | ||
3032 | // | ||
3033 | // Note: You must call the "Send" method on the returned request object in order | ||
3034 | // to execute the request. | ||
3035 | // | ||
3036 | // // Example sending a request using the GetObjectTorrentRequest method. | ||
3037 | // req, resp := client.GetObjectTorrentRequest(params) | ||
3038 | // | ||
3039 | // err := req.Send() | ||
3040 | // if err == nil { // resp is now filled | ||
3041 | // fmt.Println(resp) | ||
3042 | // } | ||
3043 | // | ||
3044 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent | ||
3045 | func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) { | ||
3046 | op := &request.Operation{ | ||
3047 | Name: opGetObjectTorrent, | ||
3048 | HTTPMethod: "GET", | ||
3049 | HTTPPath: "/{Bucket}/{Key+}?torrent", | ||
3050 | } | ||
3051 | |||
3052 | if input == nil { | ||
3053 | input = &GetObjectTorrentInput{} | ||
3054 | } | ||
3055 | |||
3056 | output = &GetObjectTorrentOutput{} | ||
3057 | req = c.newRequest(op, input, output) | ||
3058 | return | ||
3059 | } | ||
3060 | |||
3061 | // GetObjectTorrent API operation for Amazon Simple Storage Service. | ||
3062 | // | ||
3063 | // Return torrent files from a bucket. | ||
3064 | // | ||
3065 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3066 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3067 | // the error. | ||
3068 | // | ||
3069 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3070 | // API operation GetObjectTorrent for usage and error information. | ||
3071 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent | ||
3072 | func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) { | ||
3073 | req, out := c.GetObjectTorrentRequest(input) | ||
3074 | return out, req.Send() | ||
3075 | } | ||
3076 | |||
3077 | // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of | ||
3078 | // the ability to pass a context and additional request options. | ||
3079 | // | ||
3080 | // See GetObjectTorrent for details on how to use this API operation. | ||
3081 | // | ||
3082 | // The context must be non-nil and will be used for request cancellation. If | ||
3083 | // the context is nil a panic will occur. In the future the SDK may create | ||
3084 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3085 | // for more information on using Contexts. | ||
3086 | func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) { | ||
3087 | req, out := c.GetObjectTorrentRequest(input) | ||
3088 | req.SetContext(ctx) | ||
3089 | req.ApplyOptions(opts...) | ||
3090 | return out, req.Send() | ||
3091 | } | ||
3092 | |||
3093 | const opHeadBucket = "HeadBucket" | ||
3094 | |||
3095 | // HeadBucketRequest generates a "aws/request.Request" representing the | ||
3096 | // client's request for the HeadBucket operation. The "output" return | ||
3097 | // value can be used to capture response data after the request's "Send" method | ||
3098 | // is called. | ||
3099 | // | ||
3100 | // See HeadBucket for usage and error information. | ||
3101 | // | ||
3102 | // Creating a request object using this method should be used when you want to inject | ||
3103 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3104 | // access properties on the request object before or after sending the request. If | ||
3105 | // you just want the service response, call the HeadBucket method directly | ||
3106 | // instead. | ||
3107 | // | ||
3108 | // Note: You must call the "Send" method on the returned request object in order | ||
3109 | // to execute the request. | ||
3110 | // | ||
3111 | // // Example sending a request using the HeadBucketRequest method. | ||
3112 | // req, resp := client.HeadBucketRequest(params) | ||
3113 | // | ||
3114 | // err := req.Send() | ||
3115 | // if err == nil { // resp is now filled | ||
3116 | // fmt.Println(resp) | ||
3117 | // } | ||
3118 | // | ||
3119 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket | ||
3120 | func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) { | ||
3121 | op := &request.Operation{ | ||
3122 | Name: opHeadBucket, | ||
3123 | HTTPMethod: "HEAD", | ||
3124 | HTTPPath: "/{Bucket}", | ||
3125 | } | ||
3126 | |||
3127 | if input == nil { | ||
3128 | input = &HeadBucketInput{} | ||
3129 | } | ||
3130 | |||
3131 | output = &HeadBucketOutput{} | ||
3132 | req = c.newRequest(op, input, output) | ||
3133 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
3134 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
3135 | return | ||
3136 | } | ||
3137 | |||
3138 | // HeadBucket API operation for Amazon Simple Storage Service. | ||
3139 | // | ||
3140 | // This operation is useful to determine if a bucket exists and you have permission | ||
3141 | // to access it. | ||
3142 | // | ||
3143 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3144 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3145 | // the error. | ||
3146 | // | ||
3147 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3148 | // API operation HeadBucket for usage and error information. | ||
3149 | // | ||
3150 | // Returned Error Codes: | ||
3151 | // * ErrCodeNoSuchBucket "NoSuchBucket" | ||
3152 | // The specified bucket does not exist. | ||
3153 | // | ||
3154 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket | ||
3155 | func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) { | ||
3156 | req, out := c.HeadBucketRequest(input) | ||
3157 | return out, req.Send() | ||
3158 | } | ||
3159 | |||
3160 | // HeadBucketWithContext is the same as HeadBucket with the addition of | ||
3161 | // the ability to pass a context and additional request options. | ||
3162 | // | ||
3163 | // See HeadBucket for details on how to use this API operation. | ||
3164 | // | ||
3165 | // The context must be non-nil and will be used for request cancellation. If | ||
3166 | // the context is nil a panic will occur. In the future the SDK may create | ||
3167 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3168 | // for more information on using Contexts. | ||
3169 | func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) { | ||
3170 | req, out := c.HeadBucketRequest(input) | ||
3171 | req.SetContext(ctx) | ||
3172 | req.ApplyOptions(opts...) | ||
3173 | return out, req.Send() | ||
3174 | } | ||
3175 | |||
3176 | const opHeadObject = "HeadObject" | ||
3177 | |||
3178 | // HeadObjectRequest generates a "aws/request.Request" representing the | ||
3179 | // client's request for the HeadObject operation. The "output" return | ||
3180 | // value can be used to capture response data after the request's "Send" method | ||
3181 | // is called. | ||
3182 | // | ||
3183 | // See HeadObject for usage and error information. | ||
3184 | // | ||
3185 | // Creating a request object using this method should be used when you want to inject | ||
3186 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3187 | // access properties on the request object before or after sending the request. If | ||
3188 | // you just want the service response, call the HeadObject method directly | ||
3189 | // instead. | ||
3190 | // | ||
3191 | // Note: You must call the "Send" method on the returned request object in order | ||
3192 | // to execute the request. | ||
3193 | // | ||
3194 | // // Example sending a request using the HeadObjectRequest method. | ||
3195 | // req, resp := client.HeadObjectRequest(params) | ||
3196 | // | ||
3197 | // err := req.Send() | ||
3198 | // if err == nil { // resp is now filled | ||
3199 | // fmt.Println(resp) | ||
3200 | // } | ||
3201 | // | ||
3202 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject | ||
3203 | func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) { | ||
3204 | op := &request.Operation{ | ||
3205 | Name: opHeadObject, | ||
3206 | HTTPMethod: "HEAD", | ||
3207 | HTTPPath: "/{Bucket}/{Key+}", | ||
3208 | } | ||
3209 | |||
3210 | if input == nil { | ||
3211 | input = &HeadObjectInput{} | ||
3212 | } | ||
3213 | |||
3214 | output = &HeadObjectOutput{} | ||
3215 | req = c.newRequest(op, input, output) | ||
3216 | return | ||
3217 | } | ||
3218 | |||
3219 | // HeadObject API operation for Amazon Simple Storage Service. | ||
3220 | // | ||
3221 | // The HEAD operation retrieves metadata from an object without returning the | ||
3222 | // object itself. This operation is useful if you're only interested in an object's | ||
3223 | // metadata. To use HEAD, you must have READ access to the object. | ||
3224 | // | ||
3225 | // See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses | ||
3226 | // for more information on returned errors. | ||
3227 | // | ||
3228 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3229 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3230 | // the error. | ||
3231 | // | ||
3232 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3233 | // API operation HeadObject for usage and error information. | ||
3234 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject | ||
3235 | func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) { | ||
3236 | req, out := c.HeadObjectRequest(input) | ||
3237 | return out, req.Send() | ||
3238 | } | ||
3239 | |||
3240 | // HeadObjectWithContext is the same as HeadObject with the addition of | ||
3241 | // the ability to pass a context and additional request options. | ||
3242 | // | ||
3243 | // See HeadObject for details on how to use this API operation. | ||
3244 | // | ||
3245 | // The context must be non-nil and will be used for request cancellation. If | ||
3246 | // the context is nil a panic will occur. In the future the SDK may create | ||
3247 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3248 | // for more information on using Contexts. | ||
3249 | func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) { | ||
3250 | req, out := c.HeadObjectRequest(input) | ||
3251 | req.SetContext(ctx) | ||
3252 | req.ApplyOptions(opts...) | ||
3253 | return out, req.Send() | ||
3254 | } | ||
3255 | |||
3256 | const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations" | ||
3257 | |||
3258 | // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the | ||
3259 | // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return | ||
3260 | // value can be used to capture response data after the request's "Send" method | ||
3261 | // is called. | ||
3262 | // | ||
3263 | // See ListBucketAnalyticsConfigurations for usage and error information. | ||
3264 | // | ||
3265 | // Creating a request object using this method should be used when you want to inject | ||
3266 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3267 | // access properties on the request object before or after sending the request. If | ||
3268 | // you just want the service response, call the ListBucketAnalyticsConfigurations method directly | ||
3269 | // instead. | ||
3270 | // | ||
3271 | // Note: You must call the "Send" method on the returned request object in order | ||
3272 | // to execute the request. | ||
3273 | // | ||
3274 | // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method. | ||
3275 | // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params) | ||
3276 | // | ||
3277 | // err := req.Send() | ||
3278 | // if err == nil { // resp is now filled | ||
3279 | // fmt.Println(resp) | ||
3280 | // } | ||
3281 | // | ||
3282 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations | ||
3283 | func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) { | ||
3284 | op := &request.Operation{ | ||
3285 | Name: opListBucketAnalyticsConfigurations, | ||
3286 | HTTPMethod: "GET", | ||
3287 | HTTPPath: "/{Bucket}?analytics", | ||
3288 | } | ||
3289 | |||
3290 | if input == nil { | ||
3291 | input = &ListBucketAnalyticsConfigurationsInput{} | ||
3292 | } | ||
3293 | |||
3294 | output = &ListBucketAnalyticsConfigurationsOutput{} | ||
3295 | req = c.newRequest(op, input, output) | ||
3296 | return | ||
3297 | } | ||
3298 | |||
3299 | // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service. | ||
3300 | // | ||
3301 | // Lists the analytics configurations for the bucket. | ||
3302 | // | ||
3303 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3304 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3305 | // the error. | ||
3306 | // | ||
3307 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3308 | // API operation ListBucketAnalyticsConfigurations for usage and error information. | ||
3309 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations | ||
3310 | func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) { | ||
3311 | req, out := c.ListBucketAnalyticsConfigurationsRequest(input) | ||
3312 | return out, req.Send() | ||
3313 | } | ||
3314 | |||
3315 | // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of | ||
3316 | // the ability to pass a context and additional request options. | ||
3317 | // | ||
3318 | // See ListBucketAnalyticsConfigurations for details on how to use this API operation. | ||
3319 | // | ||
3320 | // The context must be non-nil and will be used for request cancellation. If | ||
3321 | // the context is nil a panic will occur. In the future the SDK may create | ||
3322 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3323 | // for more information on using Contexts. | ||
3324 | func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) { | ||
3325 | req, out := c.ListBucketAnalyticsConfigurationsRequest(input) | ||
3326 | req.SetContext(ctx) | ||
3327 | req.ApplyOptions(opts...) | ||
3328 | return out, req.Send() | ||
3329 | } | ||
3330 | |||
3331 | const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations" | ||
3332 | |||
3333 | // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the | ||
3334 | // client's request for the ListBucketInventoryConfigurations operation. The "output" return | ||
3335 | // value can be used to capture response data after the request's "Send" method | ||
3336 | // is called. | ||
3337 | // | ||
3338 | // See ListBucketInventoryConfigurations for usage and error information. | ||
3339 | // | ||
3340 | // Creating a request object using this method should be used when you want to inject | ||
3341 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3342 | // access properties on the request object before or after sending the request. If | ||
3343 | // you just want the service response, call the ListBucketInventoryConfigurations method directly | ||
3344 | // instead. | ||
3345 | // | ||
3346 | // Note: You must call the "Send" method on the returned request object in order | ||
3347 | // to execute the request. | ||
3348 | // | ||
3349 | // // Example sending a request using the ListBucketInventoryConfigurationsRequest method. | ||
3350 | // req, resp := client.ListBucketInventoryConfigurationsRequest(params) | ||
3351 | // | ||
3352 | // err := req.Send() | ||
3353 | // if err == nil { // resp is now filled | ||
3354 | // fmt.Println(resp) | ||
3355 | // } | ||
3356 | // | ||
3357 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations | ||
3358 | func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) { | ||
3359 | op := &request.Operation{ | ||
3360 | Name: opListBucketInventoryConfigurations, | ||
3361 | HTTPMethod: "GET", | ||
3362 | HTTPPath: "/{Bucket}?inventory", | ||
3363 | } | ||
3364 | |||
3365 | if input == nil { | ||
3366 | input = &ListBucketInventoryConfigurationsInput{} | ||
3367 | } | ||
3368 | |||
3369 | output = &ListBucketInventoryConfigurationsOutput{} | ||
3370 | req = c.newRequest(op, input, output) | ||
3371 | return | ||
3372 | } | ||
3373 | |||
3374 | // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service. | ||
3375 | // | ||
3376 | // Returns a list of inventory configurations for the bucket. | ||
3377 | // | ||
3378 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3379 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3380 | // the error. | ||
3381 | // | ||
3382 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3383 | // API operation ListBucketInventoryConfigurations for usage and error information. | ||
3384 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations | ||
3385 | func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) { | ||
3386 | req, out := c.ListBucketInventoryConfigurationsRequest(input) | ||
3387 | return out, req.Send() | ||
3388 | } | ||
3389 | |||
3390 | // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of | ||
3391 | // the ability to pass a context and additional request options. | ||
3392 | // | ||
3393 | // See ListBucketInventoryConfigurations for details on how to use this API operation. | ||
3394 | // | ||
3395 | // The context must be non-nil and will be used for request cancellation. If | ||
3396 | // the context is nil a panic will occur. In the future the SDK may create | ||
3397 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3398 | // for more information on using Contexts. | ||
3399 | func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) { | ||
3400 | req, out := c.ListBucketInventoryConfigurationsRequest(input) | ||
3401 | req.SetContext(ctx) | ||
3402 | req.ApplyOptions(opts...) | ||
3403 | return out, req.Send() | ||
3404 | } | ||
3405 | |||
3406 | const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations" | ||
3407 | |||
3408 | // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the | ||
3409 | // client's request for the ListBucketMetricsConfigurations operation. The "output" return | ||
3410 | // value can be used to capture response data after the request's "Send" method | ||
3411 | // is called. | ||
3412 | // | ||
3413 | // See ListBucketMetricsConfigurations for usage and error information. | ||
3414 | // | ||
3415 | // Creating a request object using this method should be used when you want to inject | ||
3416 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3417 | // access properties on the request object before or after sending the request. If | ||
3418 | // you just want the service response, call the ListBucketMetricsConfigurations method directly | ||
3419 | // instead. | ||
3420 | // | ||
3421 | // Note: You must call the "Send" method on the returned request object in order | ||
3422 | // to execute the request. | ||
3423 | // | ||
3424 | // // Example sending a request using the ListBucketMetricsConfigurationsRequest method. | ||
3425 | // req, resp := client.ListBucketMetricsConfigurationsRequest(params) | ||
3426 | // | ||
3427 | // err := req.Send() | ||
3428 | // if err == nil { // resp is now filled | ||
3429 | // fmt.Println(resp) | ||
3430 | // } | ||
3431 | // | ||
3432 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations | ||
3433 | func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) { | ||
3434 | op := &request.Operation{ | ||
3435 | Name: opListBucketMetricsConfigurations, | ||
3436 | HTTPMethod: "GET", | ||
3437 | HTTPPath: "/{Bucket}?metrics", | ||
3438 | } | ||
3439 | |||
3440 | if input == nil { | ||
3441 | input = &ListBucketMetricsConfigurationsInput{} | ||
3442 | } | ||
3443 | |||
3444 | output = &ListBucketMetricsConfigurationsOutput{} | ||
3445 | req = c.newRequest(op, input, output) | ||
3446 | return | ||
3447 | } | ||
3448 | |||
3449 | // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service. | ||
3450 | // | ||
3451 | // Lists the metrics configurations for the bucket. | ||
3452 | // | ||
3453 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3454 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3455 | // the error. | ||
3456 | // | ||
3457 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3458 | // API operation ListBucketMetricsConfigurations for usage and error information. | ||
3459 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations | ||
3460 | func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) { | ||
3461 | req, out := c.ListBucketMetricsConfigurationsRequest(input) | ||
3462 | return out, req.Send() | ||
3463 | } | ||
3464 | |||
3465 | // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of | ||
3466 | // the ability to pass a context and additional request options. | ||
3467 | // | ||
3468 | // See ListBucketMetricsConfigurations for details on how to use this API operation. | ||
3469 | // | ||
3470 | // The context must be non-nil and will be used for request cancellation. If | ||
3471 | // the context is nil a panic will occur. In the future the SDK may create | ||
3472 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3473 | // for more information on using Contexts. | ||
3474 | func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) { | ||
3475 | req, out := c.ListBucketMetricsConfigurationsRequest(input) | ||
3476 | req.SetContext(ctx) | ||
3477 | req.ApplyOptions(opts...) | ||
3478 | return out, req.Send() | ||
3479 | } | ||
3480 | |||
3481 | const opListBuckets = "ListBuckets" | ||
3482 | |||
3483 | // ListBucketsRequest generates a "aws/request.Request" representing the | ||
3484 | // client's request for the ListBuckets operation. The "output" return | ||
3485 | // value can be used to capture response data after the request's "Send" method | ||
3486 | // is called. | ||
3487 | // | ||
3488 | // See ListBuckets for usage and error information. | ||
3489 | // | ||
3490 | // Creating a request object using this method should be used when you want to inject | ||
3491 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3492 | // access properties on the request object before or after sending the request. If | ||
3493 | // you just want the service response, call the ListBuckets method directly | ||
3494 | // instead. | ||
3495 | // | ||
3496 | // Note: You must call the "Send" method on the returned request object in order | ||
3497 | // to execute the request. | ||
3498 | // | ||
3499 | // // Example sending a request using the ListBucketsRequest method. | ||
3500 | // req, resp := client.ListBucketsRequest(params) | ||
3501 | // | ||
3502 | // err := req.Send() | ||
3503 | // if err == nil { // resp is now filled | ||
3504 | // fmt.Println(resp) | ||
3505 | // } | ||
3506 | // | ||
3507 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets | ||
3508 | func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) { | ||
3509 | op := &request.Operation{ | ||
3510 | Name: opListBuckets, | ||
3511 | HTTPMethod: "GET", | ||
3512 | HTTPPath: "/", | ||
3513 | } | ||
3514 | |||
3515 | if input == nil { | ||
3516 | input = &ListBucketsInput{} | ||
3517 | } | ||
3518 | |||
3519 | output = &ListBucketsOutput{} | ||
3520 | req = c.newRequest(op, input, output) | ||
3521 | return | ||
3522 | } | ||
3523 | |||
3524 | // ListBuckets API operation for Amazon Simple Storage Service. | ||
3525 | // | ||
3526 | // Returns a list of all buckets owned by the authenticated sender of the request. | ||
3527 | // | ||
3528 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3529 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3530 | // the error. | ||
3531 | // | ||
3532 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3533 | // API operation ListBuckets for usage and error information. | ||
3534 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets | ||
3535 | func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) { | ||
3536 | req, out := c.ListBucketsRequest(input) | ||
3537 | return out, req.Send() | ||
3538 | } | ||
3539 | |||
3540 | // ListBucketsWithContext is the same as ListBuckets with the addition of | ||
3541 | // the ability to pass a context and additional request options. | ||
3542 | // | ||
3543 | // See ListBuckets for details on how to use this API operation. | ||
3544 | // | ||
3545 | // The context must be non-nil and will be used for request cancellation. If | ||
3546 | // the context is nil a panic will occur. In the future the SDK may create | ||
3547 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3548 | // for more information on using Contexts. | ||
3549 | func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) { | ||
3550 | req, out := c.ListBucketsRequest(input) | ||
3551 | req.SetContext(ctx) | ||
3552 | req.ApplyOptions(opts...) | ||
3553 | return out, req.Send() | ||
3554 | } | ||
3555 | |||
3556 | const opListMultipartUploads = "ListMultipartUploads" | ||
3557 | |||
3558 | // ListMultipartUploadsRequest generates a "aws/request.Request" representing the | ||
3559 | // client's request for the ListMultipartUploads operation. The "output" return | ||
3560 | // value can be used to capture response data after the request's "Send" method | ||
3561 | // is called. | ||
3562 | // | ||
3563 | // See ListMultipartUploads for usage and error information. | ||
3564 | // | ||
3565 | // Creating a request object using this method should be used when you want to inject | ||
3566 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3567 | // access properties on the request object before or after sending the request. If | ||
3568 | // you just want the service response, call the ListMultipartUploads method directly | ||
3569 | // instead. | ||
3570 | // | ||
3571 | // Note: You must call the "Send" method on the returned request object in order | ||
3572 | // to execute the request. | ||
3573 | // | ||
3574 | // // Example sending a request using the ListMultipartUploadsRequest method. | ||
3575 | // req, resp := client.ListMultipartUploadsRequest(params) | ||
3576 | // | ||
3577 | // err := req.Send() | ||
3578 | // if err == nil { // resp is now filled | ||
3579 | // fmt.Println(resp) | ||
3580 | // } | ||
3581 | // | ||
3582 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads | ||
3583 | func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) { | ||
3584 | op := &request.Operation{ | ||
3585 | Name: opListMultipartUploads, | ||
3586 | HTTPMethod: "GET", | ||
3587 | HTTPPath: "/{Bucket}?uploads", | ||
3588 | Paginator: &request.Paginator{ | ||
3589 | InputTokens: []string{"KeyMarker", "UploadIdMarker"}, | ||
3590 | OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"}, | ||
3591 | LimitToken: "MaxUploads", | ||
3592 | TruncationToken: "IsTruncated", | ||
3593 | }, | ||
3594 | } | ||
3595 | |||
3596 | if input == nil { | ||
3597 | input = &ListMultipartUploadsInput{} | ||
3598 | } | ||
3599 | |||
3600 | output = &ListMultipartUploadsOutput{} | ||
3601 | req = c.newRequest(op, input, output) | ||
3602 | return | ||
3603 | } | ||
3604 | |||
3605 | // ListMultipartUploads API operation for Amazon Simple Storage Service. | ||
3606 | // | ||
3607 | // This operation lists in-progress multipart uploads. | ||
3608 | // | ||
3609 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3610 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3611 | // the error. | ||
3612 | // | ||
3613 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3614 | // API operation ListMultipartUploads for usage and error information. | ||
3615 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads | ||
3616 | func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) { | ||
3617 | req, out := c.ListMultipartUploadsRequest(input) | ||
3618 | return out, req.Send() | ||
3619 | } | ||
3620 | |||
3621 | // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of | ||
3622 | // the ability to pass a context and additional request options. | ||
3623 | // | ||
3624 | // See ListMultipartUploads for details on how to use this API operation. | ||
3625 | // | ||
3626 | // The context must be non-nil and will be used for request cancellation. If | ||
3627 | // the context is nil a panic will occur. In the future the SDK may create | ||
3628 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3629 | // for more information on using Contexts. | ||
3630 | func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) { | ||
3631 | req, out := c.ListMultipartUploadsRequest(input) | ||
3632 | req.SetContext(ctx) | ||
3633 | req.ApplyOptions(opts...) | ||
3634 | return out, req.Send() | ||
3635 | } | ||
3636 | |||
3637 | // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation, | ||
3638 | // calling the "fn" function with the response data for each page. To stop | ||
3639 | // iterating, return false from the fn function. | ||
3640 | // | ||
3641 | // See ListMultipartUploads method for more information on how to use this operation. | ||
3642 | // | ||
3643 | // Note: This operation can generate multiple requests to a service. | ||
3644 | // | ||
3645 | // // Example iterating over at most 3 pages of a ListMultipartUploads operation. | ||
3646 | // pageNum := 0 | ||
3647 | // err := client.ListMultipartUploadsPages(params, | ||
3648 | // func(page *ListMultipartUploadsOutput, lastPage bool) bool { | ||
3649 | // pageNum++ | ||
3650 | // fmt.Println(page) | ||
3651 | // return pageNum <= 3 | ||
3652 | // }) | ||
3653 | // | ||
3654 | func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error { | ||
3655 | return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn) | ||
3656 | } | ||
3657 | |||
3658 | // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except | ||
3659 | // it takes a Context and allows setting request options on the pages. | ||
3660 | // | ||
3661 | // The context must be non-nil and will be used for request cancellation. If | ||
3662 | // the context is nil a panic will occur. In the future the SDK may create | ||
3663 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3664 | // for more information on using Contexts. | ||
3665 | func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error { | ||
3666 | p := request.Pagination{ | ||
3667 | NewRequest: func() (*request.Request, error) { | ||
3668 | var inCpy *ListMultipartUploadsInput | ||
3669 | if input != nil { | ||
3670 | tmp := *input | ||
3671 | inCpy = &tmp | ||
3672 | } | ||
3673 | req, _ := c.ListMultipartUploadsRequest(inCpy) | ||
3674 | req.SetContext(ctx) | ||
3675 | req.ApplyOptions(opts...) | ||
3676 | return req, nil | ||
3677 | }, | ||
3678 | } | ||
3679 | |||
3680 | cont := true | ||
3681 | for p.Next() && cont { | ||
3682 | cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) | ||
3683 | } | ||
3684 | return p.Err() | ||
3685 | } | ||
3686 | |||
3687 | const opListObjectVersions = "ListObjectVersions" | ||
3688 | |||
3689 | // ListObjectVersionsRequest generates a "aws/request.Request" representing the | ||
3690 | // client's request for the ListObjectVersions operation. The "output" return | ||
3691 | // value can be used to capture response data after the request's "Send" method | ||
3692 | // is called. | ||
3693 | // | ||
3694 | // See ListObjectVersions for usage and error information. | ||
3695 | // | ||
3696 | // Creating a request object using this method should be used when you want to inject | ||
3697 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3698 | // access properties on the request object before or after sending the request. If | ||
3699 | // you just want the service response, call the ListObjectVersions method directly | ||
3700 | // instead. | ||
3701 | // | ||
3702 | // Note: You must call the "Send" method on the returned request object in order | ||
3703 | // to execute the request. | ||
3704 | // | ||
3705 | // // Example sending a request using the ListObjectVersionsRequest method. | ||
3706 | // req, resp := client.ListObjectVersionsRequest(params) | ||
3707 | // | ||
3708 | // err := req.Send() | ||
3709 | // if err == nil { // resp is now filled | ||
3710 | // fmt.Println(resp) | ||
3711 | // } | ||
3712 | // | ||
3713 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions | ||
3714 | func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) { | ||
3715 | op := &request.Operation{ | ||
3716 | Name: opListObjectVersions, | ||
3717 | HTTPMethod: "GET", | ||
3718 | HTTPPath: "/{Bucket}?versions", | ||
3719 | Paginator: &request.Paginator{ | ||
3720 | InputTokens: []string{"KeyMarker", "VersionIdMarker"}, | ||
3721 | OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"}, | ||
3722 | LimitToken: "MaxKeys", | ||
3723 | TruncationToken: "IsTruncated", | ||
3724 | }, | ||
3725 | } | ||
3726 | |||
3727 | if input == nil { | ||
3728 | input = &ListObjectVersionsInput{} | ||
3729 | } | ||
3730 | |||
3731 | output = &ListObjectVersionsOutput{} | ||
3732 | req = c.newRequest(op, input, output) | ||
3733 | return | ||
3734 | } | ||
3735 | |||
3736 | // ListObjectVersions API operation for Amazon Simple Storage Service. | ||
3737 | // | ||
3738 | // Returns metadata about all of the versions of objects in a bucket. | ||
3739 | // | ||
3740 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3741 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3742 | // the error. | ||
3743 | // | ||
3744 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3745 | // API operation ListObjectVersions for usage and error information. | ||
3746 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions | ||
3747 | func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) { | ||
3748 | req, out := c.ListObjectVersionsRequest(input) | ||
3749 | return out, req.Send() | ||
3750 | } | ||
3751 | |||
3752 | // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of | ||
3753 | // the ability to pass a context and additional request options. | ||
3754 | // | ||
3755 | // See ListObjectVersions for details on how to use this API operation. | ||
3756 | // | ||
3757 | // The context must be non-nil and will be used for request cancellation. If | ||
3758 | // the context is nil a panic will occur. In the future the SDK may create | ||
3759 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3760 | // for more information on using Contexts. | ||
3761 | func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) { | ||
3762 | req, out := c.ListObjectVersionsRequest(input) | ||
3763 | req.SetContext(ctx) | ||
3764 | req.ApplyOptions(opts...) | ||
3765 | return out, req.Send() | ||
3766 | } | ||
3767 | |||
3768 | // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation, | ||
3769 | // calling the "fn" function with the response data for each page. To stop | ||
3770 | // iterating, return false from the fn function. | ||
3771 | // | ||
3772 | // See ListObjectVersions method for more information on how to use this operation. | ||
3773 | // | ||
3774 | // Note: This operation can generate multiple requests to a service. | ||
3775 | // | ||
3776 | // // Example iterating over at most 3 pages of a ListObjectVersions operation. | ||
3777 | // pageNum := 0 | ||
3778 | // err := client.ListObjectVersionsPages(params, | ||
3779 | // func(page *ListObjectVersionsOutput, lastPage bool) bool { | ||
3780 | // pageNum++ | ||
3781 | // fmt.Println(page) | ||
3782 | // return pageNum <= 3 | ||
3783 | // }) | ||
3784 | // | ||
3785 | func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error { | ||
3786 | return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn) | ||
3787 | } | ||
3788 | |||
3789 | // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except | ||
3790 | // it takes a Context and allows setting request options on the pages. | ||
3791 | // | ||
3792 | // The context must be non-nil and will be used for request cancellation. If | ||
3793 | // the context is nil a panic will occur. In the future the SDK may create | ||
3794 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3795 | // for more information on using Contexts. | ||
3796 | func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error { | ||
3797 | p := request.Pagination{ | ||
3798 | NewRequest: func() (*request.Request, error) { | ||
3799 | var inCpy *ListObjectVersionsInput | ||
3800 | if input != nil { | ||
3801 | tmp := *input | ||
3802 | inCpy = &tmp | ||
3803 | } | ||
3804 | req, _ := c.ListObjectVersionsRequest(inCpy) | ||
3805 | req.SetContext(ctx) | ||
3806 | req.ApplyOptions(opts...) | ||
3807 | return req, nil | ||
3808 | }, | ||
3809 | } | ||
3810 | |||
3811 | cont := true | ||
3812 | for p.Next() && cont { | ||
3813 | cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage()) | ||
3814 | } | ||
3815 | return p.Err() | ||
3816 | } | ||
3817 | |||
3818 | const opListObjects = "ListObjects" | ||
3819 | |||
3820 | // ListObjectsRequest generates a "aws/request.Request" representing the | ||
3821 | // client's request for the ListObjects operation. The "output" return | ||
3822 | // value can be used to capture response data after the request's "Send" method | ||
3823 | // is called. | ||
3824 | // | ||
3825 | // See ListObjects for usage and error information. | ||
3826 | // | ||
3827 | // Creating a request object using this method should be used when you want to inject | ||
3828 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3829 | // access properties on the request object before or after sending the request. If | ||
3830 | // you just want the service response, call the ListObjects method directly | ||
3831 | // instead. | ||
3832 | // | ||
3833 | // Note: You must call the "Send" method on the returned request object in order | ||
3834 | // to execute the request. | ||
3835 | // | ||
3836 | // // Example sending a request using the ListObjectsRequest method. | ||
3837 | // req, resp := client.ListObjectsRequest(params) | ||
3838 | // | ||
3839 | // err := req.Send() | ||
3840 | // if err == nil { // resp is now filled | ||
3841 | // fmt.Println(resp) | ||
3842 | // } | ||
3843 | // | ||
3844 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects | ||
3845 | func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) { | ||
3846 | op := &request.Operation{ | ||
3847 | Name: opListObjects, | ||
3848 | HTTPMethod: "GET", | ||
3849 | HTTPPath: "/{Bucket}", | ||
3850 | Paginator: &request.Paginator{ | ||
3851 | InputTokens: []string{"Marker"}, | ||
3852 | OutputTokens: []string{"NextMarker || Contents[-1].Key"}, | ||
3853 | LimitToken: "MaxKeys", | ||
3854 | TruncationToken: "IsTruncated", | ||
3855 | }, | ||
3856 | } | ||
3857 | |||
3858 | if input == nil { | ||
3859 | input = &ListObjectsInput{} | ||
3860 | } | ||
3861 | |||
3862 | output = &ListObjectsOutput{} | ||
3863 | req = c.newRequest(op, input, output) | ||
3864 | return | ||
3865 | } | ||
3866 | |||
3867 | // ListObjects API operation for Amazon Simple Storage Service. | ||
3868 | // | ||
3869 | // Returns some or all (up to 1000) of the objects in a bucket. You can use | ||
3870 | // the request parameters as selection criteria to return a subset of the objects | ||
3871 | // in a bucket. | ||
3872 | // | ||
3873 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
3874 | // with awserr.Error's Code and Message methods to get detailed information about | ||
3875 | // the error. | ||
3876 | // | ||
3877 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
3878 | // API operation ListObjects for usage and error information. | ||
3879 | // | ||
3880 | // Returned Error Codes: | ||
3881 | // * ErrCodeNoSuchBucket "NoSuchBucket" | ||
3882 | // The specified bucket does not exist. | ||
3883 | // | ||
3884 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects | ||
3885 | func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) { | ||
3886 | req, out := c.ListObjectsRequest(input) | ||
3887 | return out, req.Send() | ||
3888 | } | ||
3889 | |||
3890 | // ListObjectsWithContext is the same as ListObjects with the addition of | ||
3891 | // the ability to pass a context and additional request options. | ||
3892 | // | ||
3893 | // See ListObjects for details on how to use this API operation. | ||
3894 | // | ||
3895 | // The context must be non-nil and will be used for request cancellation. If | ||
3896 | // the context is nil a panic will occur. In the future the SDK may create | ||
3897 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3898 | // for more information on using Contexts. | ||
3899 | func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) { | ||
3900 | req, out := c.ListObjectsRequest(input) | ||
3901 | req.SetContext(ctx) | ||
3902 | req.ApplyOptions(opts...) | ||
3903 | return out, req.Send() | ||
3904 | } | ||
3905 | |||
3906 | // ListObjectsPages iterates over the pages of a ListObjects operation, | ||
3907 | // calling the "fn" function with the response data for each page. To stop | ||
3908 | // iterating, return false from the fn function. | ||
3909 | // | ||
3910 | // See ListObjects method for more information on how to use this operation. | ||
3911 | // | ||
3912 | // Note: This operation can generate multiple requests to a service. | ||
3913 | // | ||
3914 | // // Example iterating over at most 3 pages of a ListObjects operation. | ||
3915 | // pageNum := 0 | ||
3916 | // err := client.ListObjectsPages(params, | ||
3917 | // func(page *ListObjectsOutput, lastPage bool) bool { | ||
3918 | // pageNum++ | ||
3919 | // fmt.Println(page) | ||
3920 | // return pageNum <= 3 | ||
3921 | // }) | ||
3922 | // | ||
3923 | func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error { | ||
3924 | return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn) | ||
3925 | } | ||
3926 | |||
3927 | // ListObjectsPagesWithContext same as ListObjectsPages except | ||
3928 | // it takes a Context and allows setting request options on the pages. | ||
3929 | // | ||
3930 | // The context must be non-nil and will be used for request cancellation. If | ||
3931 | // the context is nil a panic will occur. In the future the SDK may create | ||
3932 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
3933 | // for more information on using Contexts. | ||
3934 | func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error { | ||
3935 | p := request.Pagination{ | ||
3936 | NewRequest: func() (*request.Request, error) { | ||
3937 | var inCpy *ListObjectsInput | ||
3938 | if input != nil { | ||
3939 | tmp := *input | ||
3940 | inCpy = &tmp | ||
3941 | } | ||
3942 | req, _ := c.ListObjectsRequest(inCpy) | ||
3943 | req.SetContext(ctx) | ||
3944 | req.ApplyOptions(opts...) | ||
3945 | return req, nil | ||
3946 | }, | ||
3947 | } | ||
3948 | |||
3949 | cont := true | ||
3950 | for p.Next() && cont { | ||
3951 | cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage()) | ||
3952 | } | ||
3953 | return p.Err() | ||
3954 | } | ||
3955 | |||
3956 | const opListObjectsV2 = "ListObjectsV2" | ||
3957 | |||
3958 | // ListObjectsV2Request generates a "aws/request.Request" representing the | ||
3959 | // client's request for the ListObjectsV2 operation. The "output" return | ||
3960 | // value can be used to capture response data after the request's "Send" method | ||
3961 | // is called. | ||
3962 | // | ||
3963 | // See ListObjectsV2 for usage and error information. | ||
3964 | // | ||
3965 | // Creating a request object using this method should be used when you want to inject | ||
3966 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
3967 | // access properties on the request object before or after sending the request. If | ||
3968 | // you just want the service response, call the ListObjectsV2 method directly | ||
3969 | // instead. | ||
3970 | // | ||
3971 | // Note: You must call the "Send" method on the returned request object in order | ||
3972 | // to execute the request. | ||
3973 | // | ||
3974 | // // Example sending a request using the ListObjectsV2Request method. | ||
3975 | // req, resp := client.ListObjectsV2Request(params) | ||
3976 | // | ||
3977 | // err := req.Send() | ||
3978 | // if err == nil { // resp is now filled | ||
3979 | // fmt.Println(resp) | ||
3980 | // } | ||
3981 | // | ||
3982 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2 | ||
3983 | func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) { | ||
3984 | op := &request.Operation{ | ||
3985 | Name: opListObjectsV2, | ||
3986 | HTTPMethod: "GET", | ||
3987 | HTTPPath: "/{Bucket}?list-type=2", | ||
3988 | Paginator: &request.Paginator{ | ||
3989 | InputTokens: []string{"ContinuationToken"}, | ||
3990 | OutputTokens: []string{"NextContinuationToken"}, | ||
3991 | LimitToken: "MaxKeys", | ||
3992 | TruncationToken: "", | ||
3993 | }, | ||
3994 | } | ||
3995 | |||
3996 | if input == nil { | ||
3997 | input = &ListObjectsV2Input{} | ||
3998 | } | ||
3999 | |||
4000 | output = &ListObjectsV2Output{} | ||
4001 | req = c.newRequest(op, input, output) | ||
4002 | return | ||
4003 | } | ||
4004 | |||
4005 | // ListObjectsV2 API operation for Amazon Simple Storage Service. | ||
4006 | // | ||
4007 | // Returns some or all (up to 1000) of the objects in a bucket. You can use | ||
4008 | // the request parameters as selection criteria to return a subset of the objects | ||
4009 | // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend | ||
4010 | // you use this revised API for new application development. | ||
4011 | // | ||
4012 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4013 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4014 | // the error. | ||
4015 | // | ||
4016 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4017 | // API operation ListObjectsV2 for usage and error information. | ||
4018 | // | ||
4019 | // Returned Error Codes: | ||
4020 | // * ErrCodeNoSuchBucket "NoSuchBucket" | ||
4021 | // The specified bucket does not exist. | ||
4022 | // | ||
4023 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2 | ||
4024 | func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) { | ||
4025 | req, out := c.ListObjectsV2Request(input) | ||
4026 | return out, req.Send() | ||
4027 | } | ||
4028 | |||
4029 | // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of | ||
4030 | // the ability to pass a context and additional request options. | ||
4031 | // | ||
4032 | // See ListObjectsV2 for details on how to use this API operation. | ||
4033 | // | ||
4034 | // The context must be non-nil and will be used for request cancellation. If | ||
4035 | // the context is nil a panic will occur. In the future the SDK may create | ||
4036 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4037 | // for more information on using Contexts. | ||
4038 | func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) { | ||
4039 | req, out := c.ListObjectsV2Request(input) | ||
4040 | req.SetContext(ctx) | ||
4041 | req.ApplyOptions(opts...) | ||
4042 | return out, req.Send() | ||
4043 | } | ||
4044 | |||
4045 | // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation, | ||
4046 | // calling the "fn" function with the response data for each page. To stop | ||
4047 | // iterating, return false from the fn function. | ||
4048 | // | ||
4049 | // See ListObjectsV2 method for more information on how to use this operation. | ||
4050 | // | ||
4051 | // Note: This operation can generate multiple requests to a service. | ||
4052 | // | ||
4053 | // // Example iterating over at most 3 pages of a ListObjectsV2 operation. | ||
4054 | // pageNum := 0 | ||
4055 | // err := client.ListObjectsV2Pages(params, | ||
4056 | // func(page *ListObjectsV2Output, lastPage bool) bool { | ||
4057 | // pageNum++ | ||
4058 | // fmt.Println(page) | ||
4059 | // return pageNum <= 3 | ||
4060 | // }) | ||
4061 | // | ||
4062 | func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error { | ||
4063 | return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn) | ||
4064 | } | ||
4065 | |||
4066 | // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except | ||
4067 | // it takes a Context and allows setting request options on the pages. | ||
4068 | // | ||
4069 | // The context must be non-nil and will be used for request cancellation. If | ||
4070 | // the context is nil a panic will occur. In the future the SDK may create | ||
4071 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4072 | // for more information on using Contexts. | ||
4073 | func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error { | ||
4074 | p := request.Pagination{ | ||
4075 | NewRequest: func() (*request.Request, error) { | ||
4076 | var inCpy *ListObjectsV2Input | ||
4077 | if input != nil { | ||
4078 | tmp := *input | ||
4079 | inCpy = &tmp | ||
4080 | } | ||
4081 | req, _ := c.ListObjectsV2Request(inCpy) | ||
4082 | req.SetContext(ctx) | ||
4083 | req.ApplyOptions(opts...) | ||
4084 | return req, nil | ||
4085 | }, | ||
4086 | } | ||
4087 | |||
4088 | cont := true | ||
4089 | for p.Next() && cont { | ||
4090 | cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage()) | ||
4091 | } | ||
4092 | return p.Err() | ||
4093 | } | ||
4094 | |||
4095 | const opListParts = "ListParts" | ||
4096 | |||
4097 | // ListPartsRequest generates a "aws/request.Request" representing the | ||
4098 | // client's request for the ListParts operation. The "output" return | ||
4099 | // value can be used to capture response data after the request's "Send" method | ||
4100 | // is called. | ||
4101 | // | ||
4102 | // See ListParts for usage and error information. | ||
4103 | // | ||
4104 | // Creating a request object using this method should be used when you want to inject | ||
4105 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4106 | // access properties on the request object before or after sending the request. If | ||
4107 | // you just want the service response, call the ListParts method directly | ||
4108 | // instead. | ||
4109 | // | ||
4110 | // Note: You must call the "Send" method on the returned request object in order | ||
4111 | // to execute the request. | ||
4112 | // | ||
4113 | // // Example sending a request using the ListPartsRequest method. | ||
4114 | // req, resp := client.ListPartsRequest(params) | ||
4115 | // | ||
4116 | // err := req.Send() | ||
4117 | // if err == nil { // resp is now filled | ||
4118 | // fmt.Println(resp) | ||
4119 | // } | ||
4120 | // | ||
4121 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts | ||
4122 | func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) { | ||
4123 | op := &request.Operation{ | ||
4124 | Name: opListParts, | ||
4125 | HTTPMethod: "GET", | ||
4126 | HTTPPath: "/{Bucket}/{Key+}", | ||
4127 | Paginator: &request.Paginator{ | ||
4128 | InputTokens: []string{"PartNumberMarker"}, | ||
4129 | OutputTokens: []string{"NextPartNumberMarker"}, | ||
4130 | LimitToken: "MaxParts", | ||
4131 | TruncationToken: "IsTruncated", | ||
4132 | }, | ||
4133 | } | ||
4134 | |||
4135 | if input == nil { | ||
4136 | input = &ListPartsInput{} | ||
4137 | } | ||
4138 | |||
4139 | output = &ListPartsOutput{} | ||
4140 | req = c.newRequest(op, input, output) | ||
4141 | return | ||
4142 | } | ||
4143 | |||
4144 | // ListParts API operation for Amazon Simple Storage Service. | ||
4145 | // | ||
4146 | // Lists the parts that have been uploaded for a specific multipart upload. | ||
4147 | // | ||
4148 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4149 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4150 | // the error. | ||
4151 | // | ||
4152 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4153 | // API operation ListParts for usage and error information. | ||
4154 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts | ||
4155 | func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) { | ||
4156 | req, out := c.ListPartsRequest(input) | ||
4157 | return out, req.Send() | ||
4158 | } | ||
4159 | |||
4160 | // ListPartsWithContext is the same as ListParts with the addition of | ||
4161 | // the ability to pass a context and additional request options. | ||
4162 | // | ||
4163 | // See ListParts for details on how to use this API operation. | ||
4164 | // | ||
4165 | // The context must be non-nil and will be used for request cancellation. If | ||
4166 | // the context is nil a panic will occur. In the future the SDK may create | ||
4167 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4168 | // for more information on using Contexts. | ||
4169 | func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) { | ||
4170 | req, out := c.ListPartsRequest(input) | ||
4171 | req.SetContext(ctx) | ||
4172 | req.ApplyOptions(opts...) | ||
4173 | return out, req.Send() | ||
4174 | } | ||
4175 | |||
4176 | // ListPartsPages iterates over the pages of a ListParts operation, | ||
4177 | // calling the "fn" function with the response data for each page. To stop | ||
4178 | // iterating, return false from the fn function. | ||
4179 | // | ||
4180 | // See ListParts method for more information on how to use this operation. | ||
4181 | // | ||
4182 | // Note: This operation can generate multiple requests to a service. | ||
4183 | // | ||
4184 | // // Example iterating over at most 3 pages of a ListParts operation. | ||
4185 | // pageNum := 0 | ||
4186 | // err := client.ListPartsPages(params, | ||
4187 | // func(page *ListPartsOutput, lastPage bool) bool { | ||
4188 | // pageNum++ | ||
4189 | // fmt.Println(page) | ||
4190 | // return pageNum <= 3 | ||
4191 | // }) | ||
4192 | // | ||
4193 | func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error { | ||
4194 | return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn) | ||
4195 | } | ||
4196 | |||
4197 | // ListPartsPagesWithContext same as ListPartsPages except | ||
4198 | // it takes a Context and allows setting request options on the pages. | ||
4199 | // | ||
4200 | // The context must be non-nil and will be used for request cancellation. If | ||
4201 | // the context is nil a panic will occur. In the future the SDK may create | ||
4202 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4203 | // for more information on using Contexts. | ||
4204 | func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error { | ||
4205 | p := request.Pagination{ | ||
4206 | NewRequest: func() (*request.Request, error) { | ||
4207 | var inCpy *ListPartsInput | ||
4208 | if input != nil { | ||
4209 | tmp := *input | ||
4210 | inCpy = &tmp | ||
4211 | } | ||
4212 | req, _ := c.ListPartsRequest(inCpy) | ||
4213 | req.SetContext(ctx) | ||
4214 | req.ApplyOptions(opts...) | ||
4215 | return req, nil | ||
4216 | }, | ||
4217 | } | ||
4218 | |||
4219 | cont := true | ||
4220 | for p.Next() && cont { | ||
4221 | cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) | ||
4222 | } | ||
4223 | return p.Err() | ||
4224 | } | ||
4225 | |||
4226 | const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration" | ||
4227 | |||
4228 | // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the | ||
4229 | // client's request for the PutBucketAccelerateConfiguration operation. The "output" return | ||
4230 | // value can be used to capture response data after the request's "Send" method | ||
4231 | // is called. | ||
4232 | // | ||
4233 | // See PutBucketAccelerateConfiguration for usage and error information. | ||
4234 | // | ||
4235 | // Creating a request object using this method should be used when you want to inject | ||
4236 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4237 | // access properties on the request object before or after sending the request. If | ||
4238 | // you just want the service response, call the PutBucketAccelerateConfiguration method directly | ||
4239 | // instead. | ||
4240 | // | ||
4241 | // Note: You must call the "Send" method on the returned request object in order | ||
4242 | // to execute the request. | ||
4243 | // | ||
4244 | // // Example sending a request using the PutBucketAccelerateConfigurationRequest method. | ||
4245 | // req, resp := client.PutBucketAccelerateConfigurationRequest(params) | ||
4246 | // | ||
4247 | // err := req.Send() | ||
4248 | // if err == nil { // resp is now filled | ||
4249 | // fmt.Println(resp) | ||
4250 | // } | ||
4251 | // | ||
4252 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration | ||
4253 | func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) { | ||
4254 | op := &request.Operation{ | ||
4255 | Name: opPutBucketAccelerateConfiguration, | ||
4256 | HTTPMethod: "PUT", | ||
4257 | HTTPPath: "/{Bucket}?accelerate", | ||
4258 | } | ||
4259 | |||
4260 | if input == nil { | ||
4261 | input = &PutBucketAccelerateConfigurationInput{} | ||
4262 | } | ||
4263 | |||
4264 | output = &PutBucketAccelerateConfigurationOutput{} | ||
4265 | req = c.newRequest(op, input, output) | ||
4266 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4267 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4268 | return | ||
4269 | } | ||
4270 | |||
4271 | // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service. | ||
4272 | // | ||
4273 | // Sets the accelerate configuration of an existing bucket. | ||
4274 | // | ||
4275 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4276 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4277 | // the error. | ||
4278 | // | ||
4279 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4280 | // API operation PutBucketAccelerateConfiguration for usage and error information. | ||
4281 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration | ||
4282 | func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) { | ||
4283 | req, out := c.PutBucketAccelerateConfigurationRequest(input) | ||
4284 | return out, req.Send() | ||
4285 | } | ||
4286 | |||
4287 | // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of | ||
4288 | // the ability to pass a context and additional request options. | ||
4289 | // | ||
4290 | // See PutBucketAccelerateConfiguration for details on how to use this API operation. | ||
4291 | // | ||
4292 | // The context must be non-nil and will be used for request cancellation. If | ||
4293 | // the context is nil a panic will occur. In the future the SDK may create | ||
4294 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4295 | // for more information on using Contexts. | ||
4296 | func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) { | ||
4297 | req, out := c.PutBucketAccelerateConfigurationRequest(input) | ||
4298 | req.SetContext(ctx) | ||
4299 | req.ApplyOptions(opts...) | ||
4300 | return out, req.Send() | ||
4301 | } | ||
4302 | |||
4303 | const opPutBucketAcl = "PutBucketAcl" | ||
4304 | |||
4305 | // PutBucketAclRequest generates a "aws/request.Request" representing the | ||
4306 | // client's request for the PutBucketAcl operation. The "output" return | ||
4307 | // value can be used to capture response data after the request's "Send" method | ||
4308 | // is called. | ||
4309 | // | ||
4310 | // See PutBucketAcl for usage and error information. | ||
4311 | // | ||
4312 | // Creating a request object using this method should be used when you want to inject | ||
4313 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4314 | // access properties on the request object before or after sending the request. If | ||
4315 | // you just want the service response, call the PutBucketAcl method directly | ||
4316 | // instead. | ||
4317 | // | ||
4318 | // Note: You must call the "Send" method on the returned request object in order | ||
4319 | // to execute the request. | ||
4320 | // | ||
4321 | // // Example sending a request using the PutBucketAclRequest method. | ||
4322 | // req, resp := client.PutBucketAclRequest(params) | ||
4323 | // | ||
4324 | // err := req.Send() | ||
4325 | // if err == nil { // resp is now filled | ||
4326 | // fmt.Println(resp) | ||
4327 | // } | ||
4328 | // | ||
4329 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl | ||
4330 | func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) { | ||
4331 | op := &request.Operation{ | ||
4332 | Name: opPutBucketAcl, | ||
4333 | HTTPMethod: "PUT", | ||
4334 | HTTPPath: "/{Bucket}?acl", | ||
4335 | } | ||
4336 | |||
4337 | if input == nil { | ||
4338 | input = &PutBucketAclInput{} | ||
4339 | } | ||
4340 | |||
4341 | output = &PutBucketAclOutput{} | ||
4342 | req = c.newRequest(op, input, output) | ||
4343 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4344 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4345 | return | ||
4346 | } | ||
4347 | |||
4348 | // PutBucketAcl API operation for Amazon Simple Storage Service. | ||
4349 | // | ||
4350 | // Sets the permissions on a bucket using access control lists (ACL). | ||
4351 | // | ||
4352 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4353 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4354 | // the error. | ||
4355 | // | ||
4356 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4357 | // API operation PutBucketAcl for usage and error information. | ||
4358 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl | ||
4359 | func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) { | ||
4360 | req, out := c.PutBucketAclRequest(input) | ||
4361 | return out, req.Send() | ||
4362 | } | ||
4363 | |||
4364 | // PutBucketAclWithContext is the same as PutBucketAcl with the addition of | ||
4365 | // the ability to pass a context and additional request options. | ||
4366 | // | ||
4367 | // See PutBucketAcl for details on how to use this API operation. | ||
4368 | // | ||
4369 | // The context must be non-nil and will be used for request cancellation. If | ||
4370 | // the context is nil a panic will occur. In the future the SDK may create | ||
4371 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4372 | // for more information on using Contexts. | ||
4373 | func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) { | ||
4374 | req, out := c.PutBucketAclRequest(input) | ||
4375 | req.SetContext(ctx) | ||
4376 | req.ApplyOptions(opts...) | ||
4377 | return out, req.Send() | ||
4378 | } | ||
4379 | |||
4380 | const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration" | ||
4381 | |||
4382 | // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the | ||
4383 | // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return | ||
4384 | // value can be used to capture response data after the request's "Send" method | ||
4385 | // is called. | ||
4386 | // | ||
4387 | // See PutBucketAnalyticsConfiguration for usage and error information. | ||
4388 | // | ||
4389 | // Creating a request object using this method should be used when you want to inject | ||
4390 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4391 | // access properties on the request object before or after sending the request. If | ||
4392 | // you just want the service response, call the PutBucketAnalyticsConfiguration method directly | ||
4393 | // instead. | ||
4394 | // | ||
4395 | // Note: You must call the "Send" method on the returned request object in order | ||
4396 | // to execute the request. | ||
4397 | // | ||
4398 | // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method. | ||
4399 | // req, resp := client.PutBucketAnalyticsConfigurationRequest(params) | ||
4400 | // | ||
4401 | // err := req.Send() | ||
4402 | // if err == nil { // resp is now filled | ||
4403 | // fmt.Println(resp) | ||
4404 | // } | ||
4405 | // | ||
4406 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration | ||
4407 | func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) { | ||
4408 | op := &request.Operation{ | ||
4409 | Name: opPutBucketAnalyticsConfiguration, | ||
4410 | HTTPMethod: "PUT", | ||
4411 | HTTPPath: "/{Bucket}?analytics", | ||
4412 | } | ||
4413 | |||
4414 | if input == nil { | ||
4415 | input = &PutBucketAnalyticsConfigurationInput{} | ||
4416 | } | ||
4417 | |||
4418 | output = &PutBucketAnalyticsConfigurationOutput{} | ||
4419 | req = c.newRequest(op, input, output) | ||
4420 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4421 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4422 | return | ||
4423 | } | ||
4424 | |||
4425 | // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service. | ||
4426 | // | ||
4427 | // Sets an analytics configuration for the bucket (specified by the analytics | ||
4428 | // configuration ID). | ||
4429 | // | ||
4430 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4431 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4432 | // the error. | ||
4433 | // | ||
4434 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4435 | // API operation PutBucketAnalyticsConfiguration for usage and error information. | ||
4436 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration | ||
4437 | func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) { | ||
4438 | req, out := c.PutBucketAnalyticsConfigurationRequest(input) | ||
4439 | return out, req.Send() | ||
4440 | } | ||
4441 | |||
4442 | // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of | ||
4443 | // the ability to pass a context and additional request options. | ||
4444 | // | ||
4445 | // See PutBucketAnalyticsConfiguration for details on how to use this API operation. | ||
4446 | // | ||
4447 | // The context must be non-nil and will be used for request cancellation. If | ||
4448 | // the context is nil a panic will occur. In the future the SDK may create | ||
4449 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4450 | // for more information on using Contexts. | ||
4451 | func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) { | ||
4452 | req, out := c.PutBucketAnalyticsConfigurationRequest(input) | ||
4453 | req.SetContext(ctx) | ||
4454 | req.ApplyOptions(opts...) | ||
4455 | return out, req.Send() | ||
4456 | } | ||
4457 | |||
4458 | const opPutBucketCors = "PutBucketCors" | ||
4459 | |||
4460 | // PutBucketCorsRequest generates a "aws/request.Request" representing the | ||
4461 | // client's request for the PutBucketCors operation. The "output" return | ||
4462 | // value can be used to capture response data after the request's "Send" method | ||
4463 | // is called. | ||
4464 | // | ||
4465 | // See PutBucketCors for usage and error information. | ||
4466 | // | ||
4467 | // Creating a request object using this method should be used when you want to inject | ||
4468 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4469 | // access properties on the request object before or after sending the request. If | ||
4470 | // you just want the service response, call the PutBucketCors method directly | ||
4471 | // instead. | ||
4472 | // | ||
4473 | // Note: You must call the "Send" method on the returned request object in order | ||
4474 | // to execute the request. | ||
4475 | // | ||
4476 | // // Example sending a request using the PutBucketCorsRequest method. | ||
4477 | // req, resp := client.PutBucketCorsRequest(params) | ||
4478 | // | ||
4479 | // err := req.Send() | ||
4480 | // if err == nil { // resp is now filled | ||
4481 | // fmt.Println(resp) | ||
4482 | // } | ||
4483 | // | ||
4484 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors | ||
4485 | func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) { | ||
4486 | op := &request.Operation{ | ||
4487 | Name: opPutBucketCors, | ||
4488 | HTTPMethod: "PUT", | ||
4489 | HTTPPath: "/{Bucket}?cors", | ||
4490 | } | ||
4491 | |||
4492 | if input == nil { | ||
4493 | input = &PutBucketCorsInput{} | ||
4494 | } | ||
4495 | |||
4496 | output = &PutBucketCorsOutput{} | ||
4497 | req = c.newRequest(op, input, output) | ||
4498 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4499 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4500 | return | ||
4501 | } | ||
4502 | |||
4503 | // PutBucketCors API operation for Amazon Simple Storage Service. | ||
4504 | // | ||
4505 | // Sets the cors configuration for a bucket. | ||
4506 | // | ||
4507 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4508 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4509 | // the error. | ||
4510 | // | ||
4511 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4512 | // API operation PutBucketCors for usage and error information. | ||
4513 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors | ||
4514 | func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) { | ||
4515 | req, out := c.PutBucketCorsRequest(input) | ||
4516 | return out, req.Send() | ||
4517 | } | ||
4518 | |||
4519 | // PutBucketCorsWithContext is the same as PutBucketCors with the addition of | ||
4520 | // the ability to pass a context and additional request options. | ||
4521 | // | ||
4522 | // See PutBucketCors for details on how to use this API operation. | ||
4523 | // | ||
4524 | // The context must be non-nil and will be used for request cancellation. If | ||
4525 | // the context is nil a panic will occur. In the future the SDK may create | ||
4526 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4527 | // for more information on using Contexts. | ||
4528 | func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) { | ||
4529 | req, out := c.PutBucketCorsRequest(input) | ||
4530 | req.SetContext(ctx) | ||
4531 | req.ApplyOptions(opts...) | ||
4532 | return out, req.Send() | ||
4533 | } | ||
4534 | |||
4535 | const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration" | ||
4536 | |||
4537 | // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the | ||
4538 | // client's request for the PutBucketInventoryConfiguration operation. The "output" return | ||
4539 | // value can be used to capture response data after the request's "Send" method | ||
4540 | // is called. | ||
4541 | // | ||
4542 | // See PutBucketInventoryConfiguration for usage and error information. | ||
4543 | // | ||
4544 | // Creating a request object using this method should be used when you want to inject | ||
4545 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4546 | // access properties on the request object before or after sending the request. If | ||
4547 | // you just want the service response, call the PutBucketInventoryConfiguration method directly | ||
4548 | // instead. | ||
4549 | // | ||
4550 | // Note: You must call the "Send" method on the returned request object in order | ||
4551 | // to execute the request. | ||
4552 | // | ||
4553 | // // Example sending a request using the PutBucketInventoryConfigurationRequest method. | ||
4554 | // req, resp := client.PutBucketInventoryConfigurationRequest(params) | ||
4555 | // | ||
4556 | // err := req.Send() | ||
4557 | // if err == nil { // resp is now filled | ||
4558 | // fmt.Println(resp) | ||
4559 | // } | ||
4560 | // | ||
4561 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration | ||
4562 | func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) { | ||
4563 | op := &request.Operation{ | ||
4564 | Name: opPutBucketInventoryConfiguration, | ||
4565 | HTTPMethod: "PUT", | ||
4566 | HTTPPath: "/{Bucket}?inventory", | ||
4567 | } | ||
4568 | |||
4569 | if input == nil { | ||
4570 | input = &PutBucketInventoryConfigurationInput{} | ||
4571 | } | ||
4572 | |||
4573 | output = &PutBucketInventoryConfigurationOutput{} | ||
4574 | req = c.newRequest(op, input, output) | ||
4575 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4576 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4577 | return | ||
4578 | } | ||
4579 | |||
4580 | // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service. | ||
4581 | // | ||
4582 | // Adds an inventory configuration (identified by the inventory ID) from the | ||
4583 | // bucket. | ||
4584 | // | ||
4585 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4586 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4587 | // the error. | ||
4588 | // | ||
4589 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4590 | // API operation PutBucketInventoryConfiguration for usage and error information. | ||
4591 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration | ||
4592 | func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) { | ||
4593 | req, out := c.PutBucketInventoryConfigurationRequest(input) | ||
4594 | return out, req.Send() | ||
4595 | } | ||
4596 | |||
4597 | // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of | ||
4598 | // the ability to pass a context and additional request options. | ||
4599 | // | ||
4600 | // See PutBucketInventoryConfiguration for details on how to use this API operation. | ||
4601 | // | ||
4602 | // The context must be non-nil and will be used for request cancellation. If | ||
4603 | // the context is nil a panic will occur. In the future the SDK may create | ||
4604 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4605 | // for more information on using Contexts. | ||
4606 | func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) { | ||
4607 | req, out := c.PutBucketInventoryConfigurationRequest(input) | ||
4608 | req.SetContext(ctx) | ||
4609 | req.ApplyOptions(opts...) | ||
4610 | return out, req.Send() | ||
4611 | } | ||
4612 | |||
4613 | const opPutBucketLifecycle = "PutBucketLifecycle" | ||
4614 | |||
4615 | // PutBucketLifecycleRequest generates a "aws/request.Request" representing the | ||
4616 | // client's request for the PutBucketLifecycle operation. The "output" return | ||
4617 | // value can be used to capture response data after the request's "Send" method | ||
4618 | // is called. | ||
4619 | // | ||
4620 | // See PutBucketLifecycle for usage and error information. | ||
4621 | // | ||
4622 | // Creating a request object using this method should be used when you want to inject | ||
4623 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4624 | // access properties on the request object before or after sending the request. If | ||
4625 | // you just want the service response, call the PutBucketLifecycle method directly | ||
4626 | // instead. | ||
4627 | // | ||
4628 | // Note: You must call the "Send" method on the returned request object in order | ||
4629 | // to execute the request. | ||
4630 | // | ||
4631 | // // Example sending a request using the PutBucketLifecycleRequest method. | ||
4632 | // req, resp := client.PutBucketLifecycleRequest(params) | ||
4633 | // | ||
4634 | // err := req.Send() | ||
4635 | // if err == nil { // resp is now filled | ||
4636 | // fmt.Println(resp) | ||
4637 | // } | ||
4638 | // | ||
4639 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle | ||
4640 | func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) { | ||
4641 | if c.Client.Config.Logger != nil { | ||
4642 | c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated") | ||
4643 | } | ||
4644 | op := &request.Operation{ | ||
4645 | Name: opPutBucketLifecycle, | ||
4646 | HTTPMethod: "PUT", | ||
4647 | HTTPPath: "/{Bucket}?lifecycle", | ||
4648 | } | ||
4649 | |||
4650 | if input == nil { | ||
4651 | input = &PutBucketLifecycleInput{} | ||
4652 | } | ||
4653 | |||
4654 | output = &PutBucketLifecycleOutput{} | ||
4655 | req = c.newRequest(op, input, output) | ||
4656 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4657 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4658 | return | ||
4659 | } | ||
4660 | |||
4661 | // PutBucketLifecycle API operation for Amazon Simple Storage Service. | ||
4662 | // | ||
4663 | // Deprecated, see the PutBucketLifecycleConfiguration operation. | ||
4664 | // | ||
4665 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4666 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4667 | // the error. | ||
4668 | // | ||
4669 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4670 | // API operation PutBucketLifecycle for usage and error information. | ||
4671 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle | ||
4672 | func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) { | ||
4673 | req, out := c.PutBucketLifecycleRequest(input) | ||
4674 | return out, req.Send() | ||
4675 | } | ||
4676 | |||
4677 | // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of | ||
4678 | // the ability to pass a context and additional request options. | ||
4679 | // | ||
4680 | // See PutBucketLifecycle for details on how to use this API operation. | ||
4681 | // | ||
4682 | // The context must be non-nil and will be used for request cancellation. If | ||
4683 | // the context is nil a panic will occur. In the future the SDK may create | ||
4684 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4685 | // for more information on using Contexts. | ||
4686 | func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) { | ||
4687 | req, out := c.PutBucketLifecycleRequest(input) | ||
4688 | req.SetContext(ctx) | ||
4689 | req.ApplyOptions(opts...) | ||
4690 | return out, req.Send() | ||
4691 | } | ||
4692 | |||
4693 | const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration" | ||
4694 | |||
4695 | // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the | ||
4696 | // client's request for the PutBucketLifecycleConfiguration operation. The "output" return | ||
4697 | // value can be used to capture response data after the request's "Send" method | ||
4698 | // is called. | ||
4699 | // | ||
4700 | // See PutBucketLifecycleConfiguration for usage and error information. | ||
4701 | // | ||
4702 | // Creating a request object using this method should be used when you want to inject | ||
4703 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4704 | // access properties on the request object before or after sending the request. If | ||
4705 | // you just want the service response, call the PutBucketLifecycleConfiguration method directly | ||
4706 | // instead. | ||
4707 | // | ||
4708 | // Note: You must call the "Send" method on the returned request object in order | ||
4709 | // to execute the request. | ||
4710 | // | ||
4711 | // // Example sending a request using the PutBucketLifecycleConfigurationRequest method. | ||
4712 | // req, resp := client.PutBucketLifecycleConfigurationRequest(params) | ||
4713 | // | ||
4714 | // err := req.Send() | ||
4715 | // if err == nil { // resp is now filled | ||
4716 | // fmt.Println(resp) | ||
4717 | // } | ||
4718 | // | ||
4719 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration | ||
4720 | func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) { | ||
4721 | op := &request.Operation{ | ||
4722 | Name: opPutBucketLifecycleConfiguration, | ||
4723 | HTTPMethod: "PUT", | ||
4724 | HTTPPath: "/{Bucket}?lifecycle", | ||
4725 | } | ||
4726 | |||
4727 | if input == nil { | ||
4728 | input = &PutBucketLifecycleConfigurationInput{} | ||
4729 | } | ||
4730 | |||
4731 | output = &PutBucketLifecycleConfigurationOutput{} | ||
4732 | req = c.newRequest(op, input, output) | ||
4733 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4734 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4735 | return | ||
4736 | } | ||
4737 | |||
4738 | // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service. | ||
4739 | // | ||
4740 | // Sets lifecycle configuration for your bucket. If a lifecycle configuration | ||
4741 | // exists, it replaces it. | ||
4742 | // | ||
4743 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4744 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4745 | // the error. | ||
4746 | // | ||
4747 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4748 | // API operation PutBucketLifecycleConfiguration for usage and error information. | ||
4749 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration | ||
4750 | func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) { | ||
4751 | req, out := c.PutBucketLifecycleConfigurationRequest(input) | ||
4752 | return out, req.Send() | ||
4753 | } | ||
4754 | |||
4755 | // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of | ||
4756 | // the ability to pass a context and additional request options. | ||
4757 | // | ||
4758 | // See PutBucketLifecycleConfiguration for details on how to use this API operation. | ||
4759 | // | ||
4760 | // The context must be non-nil and will be used for request cancellation. If | ||
4761 | // the context is nil a panic will occur. In the future the SDK may create | ||
4762 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4763 | // for more information on using Contexts. | ||
4764 | func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) { | ||
4765 | req, out := c.PutBucketLifecycleConfigurationRequest(input) | ||
4766 | req.SetContext(ctx) | ||
4767 | req.ApplyOptions(opts...) | ||
4768 | return out, req.Send() | ||
4769 | } | ||
4770 | |||
4771 | const opPutBucketLogging = "PutBucketLogging" | ||
4772 | |||
4773 | // PutBucketLoggingRequest generates a "aws/request.Request" representing the | ||
4774 | // client's request for the PutBucketLogging operation. The "output" return | ||
4775 | // value can be used to capture response data after the request's "Send" method | ||
4776 | // is called. | ||
4777 | // | ||
4778 | // See PutBucketLogging for usage and error information. | ||
4779 | // | ||
4780 | // Creating a request object using this method should be used when you want to inject | ||
4781 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4782 | // access properties on the request object before or after sending the request. If | ||
4783 | // you just want the service response, call the PutBucketLogging method directly | ||
4784 | // instead. | ||
4785 | // | ||
4786 | // Note: You must call the "Send" method on the returned request object in order | ||
4787 | // to execute the request. | ||
4788 | // | ||
4789 | // // Example sending a request using the PutBucketLoggingRequest method. | ||
4790 | // req, resp := client.PutBucketLoggingRequest(params) | ||
4791 | // | ||
4792 | // err := req.Send() | ||
4793 | // if err == nil { // resp is now filled | ||
4794 | // fmt.Println(resp) | ||
4795 | // } | ||
4796 | // | ||
4797 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging | ||
4798 | func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) { | ||
4799 | op := &request.Operation{ | ||
4800 | Name: opPutBucketLogging, | ||
4801 | HTTPMethod: "PUT", | ||
4802 | HTTPPath: "/{Bucket}?logging", | ||
4803 | } | ||
4804 | |||
4805 | if input == nil { | ||
4806 | input = &PutBucketLoggingInput{} | ||
4807 | } | ||
4808 | |||
4809 | output = &PutBucketLoggingOutput{} | ||
4810 | req = c.newRequest(op, input, output) | ||
4811 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4812 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4813 | return | ||
4814 | } | ||
4815 | |||
4816 | // PutBucketLogging API operation for Amazon Simple Storage Service. | ||
4817 | // | ||
4818 | // Set the logging parameters for a bucket and to specify permissions for who | ||
4819 | // can view and modify the logging parameters. To set the logging status of | ||
4820 | // a bucket, you must be the bucket owner. | ||
4821 | // | ||
4822 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4823 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4824 | // the error. | ||
4825 | // | ||
4826 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4827 | // API operation PutBucketLogging for usage and error information. | ||
4828 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging | ||
4829 | func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) { | ||
4830 | req, out := c.PutBucketLoggingRequest(input) | ||
4831 | return out, req.Send() | ||
4832 | } | ||
4833 | |||
4834 | // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of | ||
4835 | // the ability to pass a context and additional request options. | ||
4836 | // | ||
4837 | // See PutBucketLogging for details on how to use this API operation. | ||
4838 | // | ||
4839 | // The context must be non-nil and will be used for request cancellation. If | ||
4840 | // the context is nil a panic will occur. In the future the SDK may create | ||
4841 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4842 | // for more information on using Contexts. | ||
4843 | func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) { | ||
4844 | req, out := c.PutBucketLoggingRequest(input) | ||
4845 | req.SetContext(ctx) | ||
4846 | req.ApplyOptions(opts...) | ||
4847 | return out, req.Send() | ||
4848 | } | ||
4849 | |||
4850 | const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration" | ||
4851 | |||
4852 | // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the | ||
4853 | // client's request for the PutBucketMetricsConfiguration operation. The "output" return | ||
4854 | // value can be used to capture response data after the request's "Send" method | ||
4855 | // is called. | ||
4856 | // | ||
4857 | // See PutBucketMetricsConfiguration for usage and error information. | ||
4858 | // | ||
4859 | // Creating a request object using this method should be used when you want to inject | ||
4860 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4861 | // access properties on the request object before or after sending the request. If | ||
4862 | // you just want the service response, call the PutBucketMetricsConfiguration method directly | ||
4863 | // instead. | ||
4864 | // | ||
4865 | // Note: You must call the "Send" method on the returned request object in order | ||
4866 | // to execute the request. | ||
4867 | // | ||
4868 | // // Example sending a request using the PutBucketMetricsConfigurationRequest method. | ||
4869 | // req, resp := client.PutBucketMetricsConfigurationRequest(params) | ||
4870 | // | ||
4871 | // err := req.Send() | ||
4872 | // if err == nil { // resp is now filled | ||
4873 | // fmt.Println(resp) | ||
4874 | // } | ||
4875 | // | ||
4876 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration | ||
4877 | func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) { | ||
4878 | op := &request.Operation{ | ||
4879 | Name: opPutBucketMetricsConfiguration, | ||
4880 | HTTPMethod: "PUT", | ||
4881 | HTTPPath: "/{Bucket}?metrics", | ||
4882 | } | ||
4883 | |||
4884 | if input == nil { | ||
4885 | input = &PutBucketMetricsConfigurationInput{} | ||
4886 | } | ||
4887 | |||
4888 | output = &PutBucketMetricsConfigurationOutput{} | ||
4889 | req = c.newRequest(op, input, output) | ||
4890 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4891 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4892 | return | ||
4893 | } | ||
4894 | |||
4895 | // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service. | ||
4896 | // | ||
4897 | // Sets a metrics configuration (specified by the metrics configuration ID) | ||
4898 | // for the bucket. | ||
4899 | // | ||
4900 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4901 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4902 | // the error. | ||
4903 | // | ||
4904 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4905 | // API operation PutBucketMetricsConfiguration for usage and error information. | ||
4906 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration | ||
4907 | func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) { | ||
4908 | req, out := c.PutBucketMetricsConfigurationRequest(input) | ||
4909 | return out, req.Send() | ||
4910 | } | ||
4911 | |||
4912 | // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of | ||
4913 | // the ability to pass a context and additional request options. | ||
4914 | // | ||
4915 | // See PutBucketMetricsConfiguration for details on how to use this API operation. | ||
4916 | // | ||
4917 | // The context must be non-nil and will be used for request cancellation. If | ||
4918 | // the context is nil a panic will occur. In the future the SDK may create | ||
4919 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
4920 | // for more information on using Contexts. | ||
4921 | func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) { | ||
4922 | req, out := c.PutBucketMetricsConfigurationRequest(input) | ||
4923 | req.SetContext(ctx) | ||
4924 | req.ApplyOptions(opts...) | ||
4925 | return out, req.Send() | ||
4926 | } | ||
4927 | |||
4928 | const opPutBucketNotification = "PutBucketNotification" | ||
4929 | |||
4930 | // PutBucketNotificationRequest generates a "aws/request.Request" representing the | ||
4931 | // client's request for the PutBucketNotification operation. The "output" return | ||
4932 | // value can be used to capture response data after the request's "Send" method | ||
4933 | // is called. | ||
4934 | // | ||
4935 | // See PutBucketNotification for usage and error information. | ||
4936 | // | ||
4937 | // Creating a request object using this method should be used when you want to inject | ||
4938 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
4939 | // access properties on the request object before or after sending the request. If | ||
4940 | // you just want the service response, call the PutBucketNotification method directly | ||
4941 | // instead. | ||
4942 | // | ||
4943 | // Note: You must call the "Send" method on the returned request object in order | ||
4944 | // to execute the request. | ||
4945 | // | ||
4946 | // // Example sending a request using the PutBucketNotificationRequest method. | ||
4947 | // req, resp := client.PutBucketNotificationRequest(params) | ||
4948 | // | ||
4949 | // err := req.Send() | ||
4950 | // if err == nil { // resp is now filled | ||
4951 | // fmt.Println(resp) | ||
4952 | // } | ||
4953 | // | ||
4954 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification | ||
4955 | func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) { | ||
4956 | if c.Client.Config.Logger != nil { | ||
4957 | c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated") | ||
4958 | } | ||
4959 | op := &request.Operation{ | ||
4960 | Name: opPutBucketNotification, | ||
4961 | HTTPMethod: "PUT", | ||
4962 | HTTPPath: "/{Bucket}?notification", | ||
4963 | } | ||
4964 | |||
4965 | if input == nil { | ||
4966 | input = &PutBucketNotificationInput{} | ||
4967 | } | ||
4968 | |||
4969 | output = &PutBucketNotificationOutput{} | ||
4970 | req = c.newRequest(op, input, output) | ||
4971 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
4972 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
4973 | return | ||
4974 | } | ||
4975 | |||
4976 | // PutBucketNotification API operation for Amazon Simple Storage Service. | ||
4977 | // | ||
4978 | // Deprecated, see the PutBucketNotificationConfiguraiton operation. | ||
4979 | // | ||
4980 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
4981 | // with awserr.Error's Code and Message methods to get detailed information about | ||
4982 | // the error. | ||
4983 | // | ||
4984 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
4985 | // API operation PutBucketNotification for usage and error information. | ||
4986 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification | ||
4987 | func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) { | ||
4988 | req, out := c.PutBucketNotificationRequest(input) | ||
4989 | return out, req.Send() | ||
4990 | } | ||
4991 | |||
4992 | // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of | ||
4993 | // the ability to pass a context and additional request options. | ||
4994 | // | ||
4995 | // See PutBucketNotification for details on how to use this API operation. | ||
4996 | // | ||
4997 | // The context must be non-nil and will be used for request cancellation. If | ||
4998 | // the context is nil a panic will occur. In the future the SDK may create | ||
4999 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5000 | // for more information on using Contexts. | ||
5001 | func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) { | ||
5002 | req, out := c.PutBucketNotificationRequest(input) | ||
5003 | req.SetContext(ctx) | ||
5004 | req.ApplyOptions(opts...) | ||
5005 | return out, req.Send() | ||
5006 | } | ||
5007 | |||
5008 | const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration" | ||
5009 | |||
5010 | // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the | ||
5011 | // client's request for the PutBucketNotificationConfiguration operation. The "output" return | ||
5012 | // value can be used to capture response data after the request's "Send" method | ||
5013 | // is called. | ||
5014 | // | ||
5015 | // See PutBucketNotificationConfiguration for usage and error information. | ||
5016 | // | ||
5017 | // Creating a request object using this method should be used when you want to inject | ||
5018 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5019 | // access properties on the request object before or after sending the request. If | ||
5020 | // you just want the service response, call the PutBucketNotificationConfiguration method directly | ||
5021 | // instead. | ||
5022 | // | ||
5023 | // Note: You must call the "Send" method on the returned request object in order | ||
5024 | // to execute the request. | ||
5025 | // | ||
5026 | // // Example sending a request using the PutBucketNotificationConfigurationRequest method. | ||
5027 | // req, resp := client.PutBucketNotificationConfigurationRequest(params) | ||
5028 | // | ||
5029 | // err := req.Send() | ||
5030 | // if err == nil { // resp is now filled | ||
5031 | // fmt.Println(resp) | ||
5032 | // } | ||
5033 | // | ||
5034 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration | ||
5035 | func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) { | ||
5036 | op := &request.Operation{ | ||
5037 | Name: opPutBucketNotificationConfiguration, | ||
5038 | HTTPMethod: "PUT", | ||
5039 | HTTPPath: "/{Bucket}?notification", | ||
5040 | } | ||
5041 | |||
5042 | if input == nil { | ||
5043 | input = &PutBucketNotificationConfigurationInput{} | ||
5044 | } | ||
5045 | |||
5046 | output = &PutBucketNotificationConfigurationOutput{} | ||
5047 | req = c.newRequest(op, input, output) | ||
5048 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
5049 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
5050 | return | ||
5051 | } | ||
5052 | |||
5053 | // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service. | ||
5054 | // | ||
5055 | // Enables notifications of specified events for a bucket. | ||
5056 | // | ||
5057 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5058 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5059 | // the error. | ||
5060 | // | ||
5061 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5062 | // API operation PutBucketNotificationConfiguration for usage and error information. | ||
5063 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration | ||
5064 | func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) { | ||
5065 | req, out := c.PutBucketNotificationConfigurationRequest(input) | ||
5066 | return out, req.Send() | ||
5067 | } | ||
5068 | |||
5069 | // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of | ||
5070 | // the ability to pass a context and additional request options. | ||
5071 | // | ||
5072 | // See PutBucketNotificationConfiguration for details on how to use this API operation. | ||
5073 | // | ||
5074 | // The context must be non-nil and will be used for request cancellation. If | ||
5075 | // the context is nil a panic will occur. In the future the SDK may create | ||
5076 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5077 | // for more information on using Contexts. | ||
5078 | func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) { | ||
5079 | req, out := c.PutBucketNotificationConfigurationRequest(input) | ||
5080 | req.SetContext(ctx) | ||
5081 | req.ApplyOptions(opts...) | ||
5082 | return out, req.Send() | ||
5083 | } | ||
5084 | |||
5085 | const opPutBucketPolicy = "PutBucketPolicy" | ||
5086 | |||
5087 | // PutBucketPolicyRequest generates a "aws/request.Request" representing the | ||
5088 | // client's request for the PutBucketPolicy operation. The "output" return | ||
5089 | // value can be used to capture response data after the request's "Send" method | ||
5090 | // is called. | ||
5091 | // | ||
5092 | // See PutBucketPolicy for usage and error information. | ||
5093 | // | ||
5094 | // Creating a request object using this method should be used when you want to inject | ||
5095 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5096 | // access properties on the request object before or after sending the request. If | ||
5097 | // you just want the service response, call the PutBucketPolicy method directly | ||
5098 | // instead. | ||
5099 | // | ||
5100 | // Note: You must call the "Send" method on the returned request object in order | ||
5101 | // to execute the request. | ||
5102 | // | ||
5103 | // // Example sending a request using the PutBucketPolicyRequest method. | ||
5104 | // req, resp := client.PutBucketPolicyRequest(params) | ||
5105 | // | ||
5106 | // err := req.Send() | ||
5107 | // if err == nil { // resp is now filled | ||
5108 | // fmt.Println(resp) | ||
5109 | // } | ||
5110 | // | ||
5111 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy | ||
5112 | func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) { | ||
5113 | op := &request.Operation{ | ||
5114 | Name: opPutBucketPolicy, | ||
5115 | HTTPMethod: "PUT", | ||
5116 | HTTPPath: "/{Bucket}?policy", | ||
5117 | } | ||
5118 | |||
5119 | if input == nil { | ||
5120 | input = &PutBucketPolicyInput{} | ||
5121 | } | ||
5122 | |||
5123 | output = &PutBucketPolicyOutput{} | ||
5124 | req = c.newRequest(op, input, output) | ||
5125 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
5126 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
5127 | return | ||
5128 | } | ||
5129 | |||
5130 | // PutBucketPolicy API operation for Amazon Simple Storage Service. | ||
5131 | // | ||
5132 | // Replaces a policy on a bucket. If the bucket already has a policy, the one | ||
5133 | // in this request completely replaces it. | ||
5134 | // | ||
5135 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5136 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5137 | // the error. | ||
5138 | // | ||
5139 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5140 | // API operation PutBucketPolicy for usage and error information. | ||
5141 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy | ||
5142 | func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) { | ||
5143 | req, out := c.PutBucketPolicyRequest(input) | ||
5144 | return out, req.Send() | ||
5145 | } | ||
5146 | |||
5147 | // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of | ||
5148 | // the ability to pass a context and additional request options. | ||
5149 | // | ||
5150 | // See PutBucketPolicy for details on how to use this API operation. | ||
5151 | // | ||
5152 | // The context must be non-nil and will be used for request cancellation. If | ||
5153 | // the context is nil a panic will occur. In the future the SDK may create | ||
5154 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5155 | // for more information on using Contexts. | ||
5156 | func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) { | ||
5157 | req, out := c.PutBucketPolicyRequest(input) | ||
5158 | req.SetContext(ctx) | ||
5159 | req.ApplyOptions(opts...) | ||
5160 | return out, req.Send() | ||
5161 | } | ||
5162 | |||
5163 | const opPutBucketReplication = "PutBucketReplication" | ||
5164 | |||
5165 | // PutBucketReplicationRequest generates a "aws/request.Request" representing the | ||
5166 | // client's request for the PutBucketReplication operation. The "output" return | ||
5167 | // value can be used to capture response data after the request's "Send" method | ||
5168 | // is called. | ||
5169 | // | ||
5170 | // See PutBucketReplication for usage and error information. | ||
5171 | // | ||
5172 | // Creating a request object using this method should be used when you want to inject | ||
5173 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5174 | // access properties on the request object before or after sending the request. If | ||
5175 | // you just want the service response, call the PutBucketReplication method directly | ||
5176 | // instead. | ||
5177 | // | ||
5178 | // Note: You must call the "Send" method on the returned request object in order | ||
5179 | // to execute the request. | ||
5180 | // | ||
5181 | // // Example sending a request using the PutBucketReplicationRequest method. | ||
5182 | // req, resp := client.PutBucketReplicationRequest(params) | ||
5183 | // | ||
5184 | // err := req.Send() | ||
5185 | // if err == nil { // resp is now filled | ||
5186 | // fmt.Println(resp) | ||
5187 | // } | ||
5188 | // | ||
5189 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication | ||
5190 | func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) { | ||
5191 | op := &request.Operation{ | ||
5192 | Name: opPutBucketReplication, | ||
5193 | HTTPMethod: "PUT", | ||
5194 | HTTPPath: "/{Bucket}?replication", | ||
5195 | } | ||
5196 | |||
5197 | if input == nil { | ||
5198 | input = &PutBucketReplicationInput{} | ||
5199 | } | ||
5200 | |||
5201 | output = &PutBucketReplicationOutput{} | ||
5202 | req = c.newRequest(op, input, output) | ||
5203 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
5204 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
5205 | return | ||
5206 | } | ||
5207 | |||
5208 | // PutBucketReplication API operation for Amazon Simple Storage Service. | ||
5209 | // | ||
5210 | // Creates a new replication configuration (or replaces an existing one, if | ||
5211 | // present). | ||
5212 | // | ||
5213 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5214 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5215 | // the error. | ||
5216 | // | ||
5217 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5218 | // API operation PutBucketReplication for usage and error information. | ||
5219 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication | ||
5220 | func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) { | ||
5221 | req, out := c.PutBucketReplicationRequest(input) | ||
5222 | return out, req.Send() | ||
5223 | } | ||
5224 | |||
5225 | // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of | ||
5226 | // the ability to pass a context and additional request options. | ||
5227 | // | ||
5228 | // See PutBucketReplication for details on how to use this API operation. | ||
5229 | // | ||
5230 | // The context must be non-nil and will be used for request cancellation. If | ||
5231 | // the context is nil a panic will occur. In the future the SDK may create | ||
5232 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5233 | // for more information on using Contexts. | ||
5234 | func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) { | ||
5235 | req, out := c.PutBucketReplicationRequest(input) | ||
5236 | req.SetContext(ctx) | ||
5237 | req.ApplyOptions(opts...) | ||
5238 | return out, req.Send() | ||
5239 | } | ||
5240 | |||
5241 | const opPutBucketRequestPayment = "PutBucketRequestPayment" | ||
5242 | |||
5243 | // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the | ||
5244 | // client's request for the PutBucketRequestPayment operation. The "output" return | ||
5245 | // value can be used to capture response data after the request's "Send" method | ||
5246 | // is called. | ||
5247 | // | ||
5248 | // See PutBucketRequestPayment for usage and error information. | ||
5249 | // | ||
5250 | // Creating a request object using this method should be used when you want to inject | ||
5251 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5252 | // access properties on the request object before or after sending the request. If | ||
5253 | // you just want the service response, call the PutBucketRequestPayment method directly | ||
5254 | // instead. | ||
5255 | // | ||
5256 | // Note: You must call the "Send" method on the returned request object in order | ||
5257 | // to execute the request. | ||
5258 | // | ||
5259 | // // Example sending a request using the PutBucketRequestPaymentRequest method. | ||
5260 | // req, resp := client.PutBucketRequestPaymentRequest(params) | ||
5261 | // | ||
5262 | // err := req.Send() | ||
5263 | // if err == nil { // resp is now filled | ||
5264 | // fmt.Println(resp) | ||
5265 | // } | ||
5266 | // | ||
5267 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment | ||
5268 | func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) { | ||
5269 | op := &request.Operation{ | ||
5270 | Name: opPutBucketRequestPayment, | ||
5271 | HTTPMethod: "PUT", | ||
5272 | HTTPPath: "/{Bucket}?requestPayment", | ||
5273 | } | ||
5274 | |||
5275 | if input == nil { | ||
5276 | input = &PutBucketRequestPaymentInput{} | ||
5277 | } | ||
5278 | |||
5279 | output = &PutBucketRequestPaymentOutput{} | ||
5280 | req = c.newRequest(op, input, output) | ||
5281 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
5282 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
5283 | return | ||
5284 | } | ||
5285 | |||
5286 | // PutBucketRequestPayment API operation for Amazon Simple Storage Service. | ||
5287 | // | ||
5288 | // Sets the request payment configuration for a bucket. By default, the bucket | ||
5289 | // owner pays for downloads from the bucket. This configuration parameter enables | ||
5290 | // the bucket owner (only) to specify that the person requesting the download | ||
5291 | // will be charged for the download. Documentation on requester pays buckets | ||
5292 | // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html | ||
5293 | // | ||
5294 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5295 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5296 | // the error. | ||
5297 | // | ||
5298 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5299 | // API operation PutBucketRequestPayment for usage and error information. | ||
5300 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment | ||
5301 | func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) { | ||
5302 | req, out := c.PutBucketRequestPaymentRequest(input) | ||
5303 | return out, req.Send() | ||
5304 | } | ||
5305 | |||
5306 | // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of | ||
5307 | // the ability to pass a context and additional request options. | ||
5308 | // | ||
5309 | // See PutBucketRequestPayment for details on how to use this API operation. | ||
5310 | // | ||
5311 | // The context must be non-nil and will be used for request cancellation. If | ||
5312 | // the context is nil a panic will occur. In the future the SDK may create | ||
5313 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5314 | // for more information on using Contexts. | ||
5315 | func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) { | ||
5316 | req, out := c.PutBucketRequestPaymentRequest(input) | ||
5317 | req.SetContext(ctx) | ||
5318 | req.ApplyOptions(opts...) | ||
5319 | return out, req.Send() | ||
5320 | } | ||
5321 | |||
5322 | const opPutBucketTagging = "PutBucketTagging" | ||
5323 | |||
5324 | // PutBucketTaggingRequest generates a "aws/request.Request" representing the | ||
5325 | // client's request for the PutBucketTagging operation. The "output" return | ||
5326 | // value can be used to capture response data after the request's "Send" method | ||
5327 | // is called. | ||
5328 | // | ||
5329 | // See PutBucketTagging for usage and error information. | ||
5330 | // | ||
5331 | // Creating a request object using this method should be used when you want to inject | ||
5332 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5333 | // access properties on the request object before or after sending the request. If | ||
5334 | // you just want the service response, call the PutBucketTagging method directly | ||
5335 | // instead. | ||
5336 | // | ||
5337 | // Note: You must call the "Send" method on the returned request object in order | ||
5338 | // to execute the request. | ||
5339 | // | ||
5340 | // // Example sending a request using the PutBucketTaggingRequest method. | ||
5341 | // req, resp := client.PutBucketTaggingRequest(params) | ||
5342 | // | ||
5343 | // err := req.Send() | ||
5344 | // if err == nil { // resp is now filled | ||
5345 | // fmt.Println(resp) | ||
5346 | // } | ||
5347 | // | ||
5348 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging | ||
5349 | func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) { | ||
5350 | op := &request.Operation{ | ||
5351 | Name: opPutBucketTagging, | ||
5352 | HTTPMethod: "PUT", | ||
5353 | HTTPPath: "/{Bucket}?tagging", | ||
5354 | } | ||
5355 | |||
5356 | if input == nil { | ||
5357 | input = &PutBucketTaggingInput{} | ||
5358 | } | ||
5359 | |||
5360 | output = &PutBucketTaggingOutput{} | ||
5361 | req = c.newRequest(op, input, output) | ||
5362 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
5363 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
5364 | return | ||
5365 | } | ||
5366 | |||
5367 | // PutBucketTagging API operation for Amazon Simple Storage Service. | ||
5368 | // | ||
5369 | // Sets the tags for a bucket. | ||
5370 | // | ||
5371 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5372 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5373 | // the error. | ||
5374 | // | ||
5375 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5376 | // API operation PutBucketTagging for usage and error information. | ||
5377 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging | ||
5378 | func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) { | ||
5379 | req, out := c.PutBucketTaggingRequest(input) | ||
5380 | return out, req.Send() | ||
5381 | } | ||
5382 | |||
5383 | // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of | ||
5384 | // the ability to pass a context and additional request options. | ||
5385 | // | ||
5386 | // See PutBucketTagging for details on how to use this API operation. | ||
5387 | // | ||
5388 | // The context must be non-nil and will be used for request cancellation. If | ||
5389 | // the context is nil a panic will occur. In the future the SDK may create | ||
5390 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5391 | // for more information on using Contexts. | ||
5392 | func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) { | ||
5393 | req, out := c.PutBucketTaggingRequest(input) | ||
5394 | req.SetContext(ctx) | ||
5395 | req.ApplyOptions(opts...) | ||
5396 | return out, req.Send() | ||
5397 | } | ||
5398 | |||
5399 | const opPutBucketVersioning = "PutBucketVersioning" | ||
5400 | |||
5401 | // PutBucketVersioningRequest generates a "aws/request.Request" representing the | ||
5402 | // client's request for the PutBucketVersioning operation. The "output" return | ||
5403 | // value can be used to capture response data after the request's "Send" method | ||
5404 | // is called. | ||
5405 | // | ||
5406 | // See PutBucketVersioning for usage and error information. | ||
5407 | // | ||
5408 | // Creating a request object using this method should be used when you want to inject | ||
5409 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5410 | // access properties on the request object before or after sending the request. If | ||
5411 | // you just want the service response, call the PutBucketVersioning method directly | ||
5412 | // instead. | ||
5413 | // | ||
5414 | // Note: You must call the "Send" method on the returned request object in order | ||
5415 | // to execute the request. | ||
5416 | // | ||
5417 | // // Example sending a request using the PutBucketVersioningRequest method. | ||
5418 | // req, resp := client.PutBucketVersioningRequest(params) | ||
5419 | // | ||
5420 | // err := req.Send() | ||
5421 | // if err == nil { // resp is now filled | ||
5422 | // fmt.Println(resp) | ||
5423 | // } | ||
5424 | // | ||
5425 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning | ||
5426 | func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) { | ||
5427 | op := &request.Operation{ | ||
5428 | Name: opPutBucketVersioning, | ||
5429 | HTTPMethod: "PUT", | ||
5430 | HTTPPath: "/{Bucket}?versioning", | ||
5431 | } | ||
5432 | |||
5433 | if input == nil { | ||
5434 | input = &PutBucketVersioningInput{} | ||
5435 | } | ||
5436 | |||
5437 | output = &PutBucketVersioningOutput{} | ||
5438 | req = c.newRequest(op, input, output) | ||
5439 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
5440 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
5441 | return | ||
5442 | } | ||
5443 | |||
5444 | // PutBucketVersioning API operation for Amazon Simple Storage Service. | ||
5445 | // | ||
5446 | // Sets the versioning state of an existing bucket. To set the versioning state, | ||
5447 | // you must be the bucket owner. | ||
5448 | // | ||
5449 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5450 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5451 | // the error. | ||
5452 | // | ||
5453 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5454 | // API operation PutBucketVersioning for usage and error information. | ||
5455 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning | ||
5456 | func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) { | ||
5457 | req, out := c.PutBucketVersioningRequest(input) | ||
5458 | return out, req.Send() | ||
5459 | } | ||
5460 | |||
5461 | // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of | ||
5462 | // the ability to pass a context and additional request options. | ||
5463 | // | ||
5464 | // See PutBucketVersioning for details on how to use this API operation. | ||
5465 | // | ||
5466 | // The context must be non-nil and will be used for request cancellation. If | ||
5467 | // the context is nil a panic will occur. In the future the SDK may create | ||
5468 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5469 | // for more information on using Contexts. | ||
5470 | func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) { | ||
5471 | req, out := c.PutBucketVersioningRequest(input) | ||
5472 | req.SetContext(ctx) | ||
5473 | req.ApplyOptions(opts...) | ||
5474 | return out, req.Send() | ||
5475 | } | ||
5476 | |||
5477 | const opPutBucketWebsite = "PutBucketWebsite" | ||
5478 | |||
5479 | // PutBucketWebsiteRequest generates a "aws/request.Request" representing the | ||
5480 | // client's request for the PutBucketWebsite operation. The "output" return | ||
5481 | // value can be used to capture response data after the request's "Send" method | ||
5482 | // is called. | ||
5483 | // | ||
5484 | // See PutBucketWebsite for usage and error information. | ||
5485 | // | ||
5486 | // Creating a request object using this method should be used when you want to inject | ||
5487 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5488 | // access properties on the request object before or after sending the request. If | ||
5489 | // you just want the service response, call the PutBucketWebsite method directly | ||
5490 | // instead. | ||
5491 | // | ||
5492 | // Note: You must call the "Send" method on the returned request object in order | ||
5493 | // to execute the request. | ||
5494 | // | ||
5495 | // // Example sending a request using the PutBucketWebsiteRequest method. | ||
5496 | // req, resp := client.PutBucketWebsiteRequest(params) | ||
5497 | // | ||
5498 | // err := req.Send() | ||
5499 | // if err == nil { // resp is now filled | ||
5500 | // fmt.Println(resp) | ||
5501 | // } | ||
5502 | // | ||
5503 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite | ||
5504 | func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) { | ||
5505 | op := &request.Operation{ | ||
5506 | Name: opPutBucketWebsite, | ||
5507 | HTTPMethod: "PUT", | ||
5508 | HTTPPath: "/{Bucket}?website", | ||
5509 | } | ||
5510 | |||
5511 | if input == nil { | ||
5512 | input = &PutBucketWebsiteInput{} | ||
5513 | } | ||
5514 | |||
5515 | output = &PutBucketWebsiteOutput{} | ||
5516 | req = c.newRequest(op, input, output) | ||
5517 | req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) | ||
5518 | req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) | ||
5519 | return | ||
5520 | } | ||
5521 | |||
5522 | // PutBucketWebsite API operation for Amazon Simple Storage Service. | ||
5523 | // | ||
5524 | // Set the website configuration for a bucket. | ||
5525 | // | ||
5526 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5527 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5528 | // the error. | ||
5529 | // | ||
5530 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5531 | // API operation PutBucketWebsite for usage and error information. | ||
5532 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite | ||
5533 | func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) { | ||
5534 | req, out := c.PutBucketWebsiteRequest(input) | ||
5535 | return out, req.Send() | ||
5536 | } | ||
5537 | |||
5538 | // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of | ||
5539 | // the ability to pass a context and additional request options. | ||
5540 | // | ||
5541 | // See PutBucketWebsite for details on how to use this API operation. | ||
5542 | // | ||
5543 | // The context must be non-nil and will be used for request cancellation. If | ||
5544 | // the context is nil a panic will occur. In the future the SDK may create | ||
5545 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5546 | // for more information on using Contexts. | ||
5547 | func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) { | ||
5548 | req, out := c.PutBucketWebsiteRequest(input) | ||
5549 | req.SetContext(ctx) | ||
5550 | req.ApplyOptions(opts...) | ||
5551 | return out, req.Send() | ||
5552 | } | ||
5553 | |||
5554 | const opPutObject = "PutObject" | ||
5555 | |||
5556 | // PutObjectRequest generates a "aws/request.Request" representing the | ||
5557 | // client's request for the PutObject operation. The "output" return | ||
5558 | // value can be used to capture response data after the request's "Send" method | ||
5559 | // is called. | ||
5560 | // | ||
5561 | // See PutObject for usage and error information. | ||
5562 | // | ||
5563 | // Creating a request object using this method should be used when you want to inject | ||
5564 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5565 | // access properties on the request object before or after sending the request. If | ||
5566 | // you just want the service response, call the PutObject method directly | ||
5567 | // instead. | ||
5568 | // | ||
5569 | // Note: You must call the "Send" method on the returned request object in order | ||
5570 | // to execute the request. | ||
5571 | // | ||
5572 | // // Example sending a request using the PutObjectRequest method. | ||
5573 | // req, resp := client.PutObjectRequest(params) | ||
5574 | // | ||
5575 | // err := req.Send() | ||
5576 | // if err == nil { // resp is now filled | ||
5577 | // fmt.Println(resp) | ||
5578 | // } | ||
5579 | // | ||
5580 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject | ||
5581 | func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) { | ||
5582 | op := &request.Operation{ | ||
5583 | Name: opPutObject, | ||
5584 | HTTPMethod: "PUT", | ||
5585 | HTTPPath: "/{Bucket}/{Key+}", | ||
5586 | } | ||
5587 | |||
5588 | if input == nil { | ||
5589 | input = &PutObjectInput{} | ||
5590 | } | ||
5591 | |||
5592 | output = &PutObjectOutput{} | ||
5593 | req = c.newRequest(op, input, output) | ||
5594 | return | ||
5595 | } | ||
5596 | |||
5597 | // PutObject API operation for Amazon Simple Storage Service. | ||
5598 | // | ||
5599 | // Adds an object to a bucket. | ||
5600 | // | ||
5601 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5602 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5603 | // the error. | ||
5604 | // | ||
5605 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5606 | // API operation PutObject for usage and error information. | ||
5607 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject | ||
5608 | func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) { | ||
5609 | req, out := c.PutObjectRequest(input) | ||
5610 | return out, req.Send() | ||
5611 | } | ||
5612 | |||
5613 | // PutObjectWithContext is the same as PutObject with the addition of | ||
5614 | // the ability to pass a context and additional request options. | ||
5615 | // | ||
5616 | // See PutObject for details on how to use this API operation. | ||
5617 | // | ||
5618 | // The context must be non-nil and will be used for request cancellation. If | ||
5619 | // the context is nil a panic will occur. In the future the SDK may create | ||
5620 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5621 | // for more information on using Contexts. | ||
5622 | func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) { | ||
5623 | req, out := c.PutObjectRequest(input) | ||
5624 | req.SetContext(ctx) | ||
5625 | req.ApplyOptions(opts...) | ||
5626 | return out, req.Send() | ||
5627 | } | ||
5628 | |||
5629 | const opPutObjectAcl = "PutObjectAcl" | ||
5630 | |||
5631 | // PutObjectAclRequest generates a "aws/request.Request" representing the | ||
5632 | // client's request for the PutObjectAcl operation. The "output" return | ||
5633 | // value can be used to capture response data after the request's "Send" method | ||
5634 | // is called. | ||
5635 | // | ||
5636 | // See PutObjectAcl for usage and error information. | ||
5637 | // | ||
5638 | // Creating a request object using this method should be used when you want to inject | ||
5639 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5640 | // access properties on the request object before or after sending the request. If | ||
5641 | // you just want the service response, call the PutObjectAcl method directly | ||
5642 | // instead. | ||
5643 | // | ||
5644 | // Note: You must call the "Send" method on the returned request object in order | ||
5645 | // to execute the request. | ||
5646 | // | ||
5647 | // // Example sending a request using the PutObjectAclRequest method. | ||
5648 | // req, resp := client.PutObjectAclRequest(params) | ||
5649 | // | ||
5650 | // err := req.Send() | ||
5651 | // if err == nil { // resp is now filled | ||
5652 | // fmt.Println(resp) | ||
5653 | // } | ||
5654 | // | ||
5655 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl | ||
5656 | func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) { | ||
5657 | op := &request.Operation{ | ||
5658 | Name: opPutObjectAcl, | ||
5659 | HTTPMethod: "PUT", | ||
5660 | HTTPPath: "/{Bucket}/{Key+}?acl", | ||
5661 | } | ||
5662 | |||
5663 | if input == nil { | ||
5664 | input = &PutObjectAclInput{} | ||
5665 | } | ||
5666 | |||
5667 | output = &PutObjectAclOutput{} | ||
5668 | req = c.newRequest(op, input, output) | ||
5669 | return | ||
5670 | } | ||
5671 | |||
5672 | // PutObjectAcl API operation for Amazon Simple Storage Service. | ||
5673 | // | ||
5674 | // uses the acl subresource to set the access control list (ACL) permissions | ||
5675 | // for an object that already exists in a bucket | ||
5676 | // | ||
5677 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5678 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5679 | // the error. | ||
5680 | // | ||
5681 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5682 | // API operation PutObjectAcl for usage and error information. | ||
5683 | // | ||
5684 | // Returned Error Codes: | ||
5685 | // * ErrCodeNoSuchKey "NoSuchKey" | ||
5686 | // The specified key does not exist. | ||
5687 | // | ||
5688 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl | ||
5689 | func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) { | ||
5690 | req, out := c.PutObjectAclRequest(input) | ||
5691 | return out, req.Send() | ||
5692 | } | ||
5693 | |||
5694 | // PutObjectAclWithContext is the same as PutObjectAcl with the addition of | ||
5695 | // the ability to pass a context and additional request options. | ||
5696 | // | ||
5697 | // See PutObjectAcl for details on how to use this API operation. | ||
5698 | // | ||
5699 | // The context must be non-nil and will be used for request cancellation. If | ||
5700 | // the context is nil a panic will occur. In the future the SDK may create | ||
5701 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5702 | // for more information on using Contexts. | ||
5703 | func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) { | ||
5704 | req, out := c.PutObjectAclRequest(input) | ||
5705 | req.SetContext(ctx) | ||
5706 | req.ApplyOptions(opts...) | ||
5707 | return out, req.Send() | ||
5708 | } | ||
5709 | |||
5710 | const opPutObjectTagging = "PutObjectTagging" | ||
5711 | |||
5712 | // PutObjectTaggingRequest generates a "aws/request.Request" representing the | ||
5713 | // client's request for the PutObjectTagging operation. The "output" return | ||
5714 | // value can be used to capture response data after the request's "Send" method | ||
5715 | // is called. | ||
5716 | // | ||
5717 | // See PutObjectTagging for usage and error information. | ||
5718 | // | ||
5719 | // Creating a request object using this method should be used when you want to inject | ||
5720 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5721 | // access properties on the request object before or after sending the request. If | ||
5722 | // you just want the service response, call the PutObjectTagging method directly | ||
5723 | // instead. | ||
5724 | // | ||
5725 | // Note: You must call the "Send" method on the returned request object in order | ||
5726 | // to execute the request. | ||
5727 | // | ||
5728 | // // Example sending a request using the PutObjectTaggingRequest method. | ||
5729 | // req, resp := client.PutObjectTaggingRequest(params) | ||
5730 | // | ||
5731 | // err := req.Send() | ||
5732 | // if err == nil { // resp is now filled | ||
5733 | // fmt.Println(resp) | ||
5734 | // } | ||
5735 | // | ||
5736 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging | ||
5737 | func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) { | ||
5738 | op := &request.Operation{ | ||
5739 | Name: opPutObjectTagging, | ||
5740 | HTTPMethod: "PUT", | ||
5741 | HTTPPath: "/{Bucket}/{Key+}?tagging", | ||
5742 | } | ||
5743 | |||
5744 | if input == nil { | ||
5745 | input = &PutObjectTaggingInput{} | ||
5746 | } | ||
5747 | |||
5748 | output = &PutObjectTaggingOutput{} | ||
5749 | req = c.newRequest(op, input, output) | ||
5750 | return | ||
5751 | } | ||
5752 | |||
5753 | // PutObjectTagging API operation for Amazon Simple Storage Service. | ||
5754 | // | ||
5755 | // Sets the supplied tag-set to an object that already exists in a bucket | ||
5756 | // | ||
5757 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5758 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5759 | // the error. | ||
5760 | // | ||
5761 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5762 | // API operation PutObjectTagging for usage and error information. | ||
5763 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging | ||
5764 | func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) { | ||
5765 | req, out := c.PutObjectTaggingRequest(input) | ||
5766 | return out, req.Send() | ||
5767 | } | ||
5768 | |||
5769 | // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of | ||
5770 | // the ability to pass a context and additional request options. | ||
5771 | // | ||
5772 | // See PutObjectTagging for details on how to use this API operation. | ||
5773 | // | ||
5774 | // The context must be non-nil and will be used for request cancellation. If | ||
5775 | // the context is nil a panic will occur. In the future the SDK may create | ||
5776 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5777 | // for more information on using Contexts. | ||
5778 | func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) { | ||
5779 | req, out := c.PutObjectTaggingRequest(input) | ||
5780 | req.SetContext(ctx) | ||
5781 | req.ApplyOptions(opts...) | ||
5782 | return out, req.Send() | ||
5783 | } | ||
5784 | |||
5785 | const opRestoreObject = "RestoreObject" | ||
5786 | |||
5787 | // RestoreObjectRequest generates a "aws/request.Request" representing the | ||
5788 | // client's request for the RestoreObject operation. The "output" return | ||
5789 | // value can be used to capture response data after the request's "Send" method | ||
5790 | // is called. | ||
5791 | // | ||
5792 | // See RestoreObject for usage and error information. | ||
5793 | // | ||
5794 | // Creating a request object using this method should be used when you want to inject | ||
5795 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5796 | // access properties on the request object before or after sending the request. If | ||
5797 | // you just want the service response, call the RestoreObject method directly | ||
5798 | // instead. | ||
5799 | // | ||
5800 | // Note: You must call the "Send" method on the returned request object in order | ||
5801 | // to execute the request. | ||
5802 | // | ||
5803 | // // Example sending a request using the RestoreObjectRequest method. | ||
5804 | // req, resp := client.RestoreObjectRequest(params) | ||
5805 | // | ||
5806 | // err := req.Send() | ||
5807 | // if err == nil { // resp is now filled | ||
5808 | // fmt.Println(resp) | ||
5809 | // } | ||
5810 | // | ||
5811 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject | ||
5812 | func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) { | ||
5813 | op := &request.Operation{ | ||
5814 | Name: opRestoreObject, | ||
5815 | HTTPMethod: "POST", | ||
5816 | HTTPPath: "/{Bucket}/{Key+}?restore", | ||
5817 | } | ||
5818 | |||
5819 | if input == nil { | ||
5820 | input = &RestoreObjectInput{} | ||
5821 | } | ||
5822 | |||
5823 | output = &RestoreObjectOutput{} | ||
5824 | req = c.newRequest(op, input, output) | ||
5825 | return | ||
5826 | } | ||
5827 | |||
5828 | // RestoreObject API operation for Amazon Simple Storage Service. | ||
5829 | // | ||
5830 | // Restores an archived copy of an object back into Amazon S3 | ||
5831 | // | ||
5832 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5833 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5834 | // the error. | ||
5835 | // | ||
5836 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5837 | // API operation RestoreObject for usage and error information. | ||
5838 | // | ||
5839 | // Returned Error Codes: | ||
5840 | // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError" | ||
5841 | // This operation is not allowed against this storage tier | ||
5842 | // | ||
5843 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject | ||
5844 | func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) { | ||
5845 | req, out := c.RestoreObjectRequest(input) | ||
5846 | return out, req.Send() | ||
5847 | } | ||
5848 | |||
5849 | // RestoreObjectWithContext is the same as RestoreObject with the addition of | ||
5850 | // the ability to pass a context and additional request options. | ||
5851 | // | ||
5852 | // See RestoreObject for details on how to use this API operation. | ||
5853 | // | ||
5854 | // The context must be non-nil and will be used for request cancellation. If | ||
5855 | // the context is nil a panic will occur. In the future the SDK may create | ||
5856 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5857 | // for more information on using Contexts. | ||
5858 | func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) { | ||
5859 | req, out := c.RestoreObjectRequest(input) | ||
5860 | req.SetContext(ctx) | ||
5861 | req.ApplyOptions(opts...) | ||
5862 | return out, req.Send() | ||
5863 | } | ||
5864 | |||
5865 | const opUploadPart = "UploadPart" | ||
5866 | |||
5867 | // UploadPartRequest generates a "aws/request.Request" representing the | ||
5868 | // client's request for the UploadPart operation. The "output" return | ||
5869 | // value can be used to capture response data after the request's "Send" method | ||
5870 | // is called. | ||
5871 | // | ||
5872 | // See UploadPart for usage and error information. | ||
5873 | // | ||
5874 | // Creating a request object using this method should be used when you want to inject | ||
5875 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5876 | // access properties on the request object before or after sending the request. If | ||
5877 | // you just want the service response, call the UploadPart method directly | ||
5878 | // instead. | ||
5879 | // | ||
5880 | // Note: You must call the "Send" method on the returned request object in order | ||
5881 | // to execute the request. | ||
5882 | // | ||
5883 | // // Example sending a request using the UploadPartRequest method. | ||
5884 | // req, resp := client.UploadPartRequest(params) | ||
5885 | // | ||
5886 | // err := req.Send() | ||
5887 | // if err == nil { // resp is now filled | ||
5888 | // fmt.Println(resp) | ||
5889 | // } | ||
5890 | // | ||
5891 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart | ||
5892 | func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) { | ||
5893 | op := &request.Operation{ | ||
5894 | Name: opUploadPart, | ||
5895 | HTTPMethod: "PUT", | ||
5896 | HTTPPath: "/{Bucket}/{Key+}", | ||
5897 | } | ||
5898 | |||
5899 | if input == nil { | ||
5900 | input = &UploadPartInput{} | ||
5901 | } | ||
5902 | |||
5903 | output = &UploadPartOutput{} | ||
5904 | req = c.newRequest(op, input, output) | ||
5905 | return | ||
5906 | } | ||
5907 | |||
5908 | // UploadPart API operation for Amazon Simple Storage Service. | ||
5909 | // | ||
5910 | // Uploads a part in a multipart upload. | ||
5911 | // | ||
5912 | // Note: After you initiate multipart upload and upload one or more parts, you | ||
5913 | // must either complete or abort multipart upload in order to stop getting charged | ||
5914 | // for storage of the uploaded parts. Only after you either complete or abort | ||
5915 | // multipart upload, Amazon S3 frees up the parts storage and stops charging | ||
5916 | // you for the parts storage. | ||
5917 | // | ||
5918 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5919 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5920 | // the error. | ||
5921 | // | ||
5922 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5923 | // API operation UploadPart for usage and error information. | ||
5924 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart | ||
5925 | func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) { | ||
5926 | req, out := c.UploadPartRequest(input) | ||
5927 | return out, req.Send() | ||
5928 | } | ||
5929 | |||
5930 | // UploadPartWithContext is the same as UploadPart with the addition of | ||
5931 | // the ability to pass a context and additional request options. | ||
5932 | // | ||
5933 | // See UploadPart for details on how to use this API operation. | ||
5934 | // | ||
5935 | // The context must be non-nil and will be used for request cancellation. If | ||
5936 | // the context is nil a panic will occur. In the future the SDK may create | ||
5937 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
5938 | // for more information on using Contexts. | ||
5939 | func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) { | ||
5940 | req, out := c.UploadPartRequest(input) | ||
5941 | req.SetContext(ctx) | ||
5942 | req.ApplyOptions(opts...) | ||
5943 | return out, req.Send() | ||
5944 | } | ||
5945 | |||
5946 | const opUploadPartCopy = "UploadPartCopy" | ||
5947 | |||
5948 | // UploadPartCopyRequest generates a "aws/request.Request" representing the | ||
5949 | // client's request for the UploadPartCopy operation. The "output" return | ||
5950 | // value can be used to capture response data after the request's "Send" method | ||
5951 | // is called. | ||
5952 | // | ||
5953 | // See UploadPartCopy for usage and error information. | ||
5954 | // | ||
5955 | // Creating a request object using this method should be used when you want to inject | ||
5956 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
5957 | // access properties on the request object before or after sending the request. If | ||
5958 | // you just want the service response, call the UploadPartCopy method directly | ||
5959 | // instead. | ||
5960 | // | ||
5961 | // Note: You must call the "Send" method on the returned request object in order | ||
5962 | // to execute the request. | ||
5963 | // | ||
5964 | // // Example sending a request using the UploadPartCopyRequest method. | ||
5965 | // req, resp := client.UploadPartCopyRequest(params) | ||
5966 | // | ||
5967 | // err := req.Send() | ||
5968 | // if err == nil { // resp is now filled | ||
5969 | // fmt.Println(resp) | ||
5970 | // } | ||
5971 | // | ||
5972 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy | ||
5973 | func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) { | ||
5974 | op := &request.Operation{ | ||
5975 | Name: opUploadPartCopy, | ||
5976 | HTTPMethod: "PUT", | ||
5977 | HTTPPath: "/{Bucket}/{Key+}", | ||
5978 | } | ||
5979 | |||
5980 | if input == nil { | ||
5981 | input = &UploadPartCopyInput{} | ||
5982 | } | ||
5983 | |||
5984 | output = &UploadPartCopyOutput{} | ||
5985 | req = c.newRequest(op, input, output) | ||
5986 | return | ||
5987 | } | ||
5988 | |||
5989 | // UploadPartCopy API operation for Amazon Simple Storage Service. | ||
5990 | // | ||
5991 | // Uploads a part by copying data from an existing object as data source. | ||
5992 | // | ||
5993 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
5994 | // with awserr.Error's Code and Message methods to get detailed information about | ||
5995 | // the error. | ||
5996 | // | ||
5997 | // See the AWS API reference guide for Amazon Simple Storage Service's | ||
5998 | // API operation UploadPartCopy for usage and error information. | ||
5999 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy | ||
6000 | func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) { | ||
6001 | req, out := c.UploadPartCopyRequest(input) | ||
6002 | return out, req.Send() | ||
6003 | } | ||
6004 | |||
6005 | // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of | ||
6006 | // the ability to pass a context and additional request options. | ||
6007 | // | ||
6008 | // See UploadPartCopy for details on how to use this API operation. | ||
6009 | // | ||
6010 | // The context must be non-nil and will be used for request cancellation. If | ||
6011 | // the context is nil a panic will occur. In the future the SDK may create | ||
6012 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
6013 | // for more information on using Contexts. | ||
6014 | func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) { | ||
6015 | req, out := c.UploadPartCopyRequest(input) | ||
6016 | req.SetContext(ctx) | ||
6017 | req.ApplyOptions(opts...) | ||
6018 | return out, req.Send() | ||
6019 | } | ||
6020 | |||
6021 | // Specifies the days since the initiation of an Incomplete Multipart Upload | ||
6022 | // that Lifecycle will wait before permanently removing all parts of the upload. | ||
6023 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortIncompleteMultipartUpload | ||
6024 | type AbortIncompleteMultipartUpload struct { | ||
6025 | _ struct{} `type:"structure"` | ||
6026 | |||
6027 | // Indicates the number of days that must pass since initiation for Lifecycle | ||
6028 | // to abort an Incomplete Multipart Upload. | ||
6029 | DaysAfterInitiation *int64 `type:"integer"` | ||
6030 | } | ||
6031 | |||
6032 | // String returns the string representation | ||
6033 | func (s AbortIncompleteMultipartUpload) String() string { | ||
6034 | return awsutil.Prettify(s) | ||
6035 | } | ||
6036 | |||
6037 | // GoString returns the string representation | ||
6038 | func (s AbortIncompleteMultipartUpload) GoString() string { | ||
6039 | return s.String() | ||
6040 | } | ||
6041 | |||
6042 | // SetDaysAfterInitiation sets the DaysAfterInitiation field's value. | ||
6043 | func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload { | ||
6044 | s.DaysAfterInitiation = &v | ||
6045 | return s | ||
6046 | } | ||
6047 | |||
6048 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadRequest | ||
6049 | type AbortMultipartUploadInput struct { | ||
6050 | _ struct{} `type:"structure"` | ||
6051 | |||
6052 | // Bucket is a required field | ||
6053 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
6054 | |||
6055 | // Key is a required field | ||
6056 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
6057 | |||
6058 | // Confirms that the requester knows that she or he will be charged for the | ||
6059 | // request. Bucket owners need not specify this parameter in their requests. | ||
6060 | // Documentation on downloading objects from requester pays buckets can be found | ||
6061 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
6062 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
6063 | |||
6064 | // UploadId is a required field | ||
6065 | UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"` | ||
6066 | } | ||
6067 | |||
6068 | // String returns the string representation | ||
6069 | func (s AbortMultipartUploadInput) String() string { | ||
6070 | return awsutil.Prettify(s) | ||
6071 | } | ||
6072 | |||
6073 | // GoString returns the string representation | ||
6074 | func (s AbortMultipartUploadInput) GoString() string { | ||
6075 | return s.String() | ||
6076 | } | ||
6077 | |||
6078 | // Validate inspects the fields of the type to determine if they are valid. | ||
6079 | func (s *AbortMultipartUploadInput) Validate() error { | ||
6080 | invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"} | ||
6081 | if s.Bucket == nil { | ||
6082 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
6083 | } | ||
6084 | if s.Key == nil { | ||
6085 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
6086 | } | ||
6087 | if s.Key != nil && len(*s.Key) < 1 { | ||
6088 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
6089 | } | ||
6090 | if s.UploadId == nil { | ||
6091 | invalidParams.Add(request.NewErrParamRequired("UploadId")) | ||
6092 | } | ||
6093 | |||
6094 | if invalidParams.Len() > 0 { | ||
6095 | return invalidParams | ||
6096 | } | ||
6097 | return nil | ||
6098 | } | ||
6099 | |||
6100 | // SetBucket sets the Bucket field's value. | ||
6101 | func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput { | ||
6102 | s.Bucket = &v | ||
6103 | return s | ||
6104 | } | ||
6105 | |||
6106 | // SetKey sets the Key field's value. | ||
6107 | func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput { | ||
6108 | s.Key = &v | ||
6109 | return s | ||
6110 | } | ||
6111 | |||
6112 | // SetRequestPayer sets the RequestPayer field's value. | ||
6113 | func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput { | ||
6114 | s.RequestPayer = &v | ||
6115 | return s | ||
6116 | } | ||
6117 | |||
6118 | // SetUploadId sets the UploadId field's value. | ||
6119 | func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput { | ||
6120 | s.UploadId = &v | ||
6121 | return s | ||
6122 | } | ||
6123 | |||
6124 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadOutput | ||
6125 | type AbortMultipartUploadOutput struct { | ||
6126 | _ struct{} `type:"structure"` | ||
6127 | |||
6128 | // If present, indicates that the requester was successfully charged for the | ||
6129 | // request. | ||
6130 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
6131 | } | ||
6132 | |||
6133 | // String returns the string representation | ||
6134 | func (s AbortMultipartUploadOutput) String() string { | ||
6135 | return awsutil.Prettify(s) | ||
6136 | } | ||
6137 | |||
6138 | // GoString returns the string representation | ||
6139 | func (s AbortMultipartUploadOutput) GoString() string { | ||
6140 | return s.String() | ||
6141 | } | ||
6142 | |||
6143 | // SetRequestCharged sets the RequestCharged field's value. | ||
6144 | func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput { | ||
6145 | s.RequestCharged = &v | ||
6146 | return s | ||
6147 | } | ||
6148 | |||
6149 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccelerateConfiguration | ||
6150 | type AccelerateConfiguration struct { | ||
6151 | _ struct{} `type:"structure"` | ||
6152 | |||
6153 | // The accelerate configuration of the bucket. | ||
6154 | Status *string `type:"string" enum:"BucketAccelerateStatus"` | ||
6155 | } | ||
6156 | |||
6157 | // String returns the string representation | ||
6158 | func (s AccelerateConfiguration) String() string { | ||
6159 | return awsutil.Prettify(s) | ||
6160 | } | ||
6161 | |||
6162 | // GoString returns the string representation | ||
6163 | func (s AccelerateConfiguration) GoString() string { | ||
6164 | return s.String() | ||
6165 | } | ||
6166 | |||
6167 | // SetStatus sets the Status field's value. | ||
6168 | func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration { | ||
6169 | s.Status = &v | ||
6170 | return s | ||
6171 | } | ||
6172 | |||
6173 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccessControlPolicy | ||
6174 | type AccessControlPolicy struct { | ||
6175 | _ struct{} `type:"structure"` | ||
6176 | |||
6177 | // A list of grants. | ||
6178 | Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"` | ||
6179 | |||
6180 | Owner *Owner `type:"structure"` | ||
6181 | } | ||
6182 | |||
6183 | // String returns the string representation | ||
6184 | func (s AccessControlPolicy) String() string { | ||
6185 | return awsutil.Prettify(s) | ||
6186 | } | ||
6187 | |||
6188 | // GoString returns the string representation | ||
6189 | func (s AccessControlPolicy) GoString() string { | ||
6190 | return s.String() | ||
6191 | } | ||
6192 | |||
6193 | // Validate inspects the fields of the type to determine if they are valid. | ||
6194 | func (s *AccessControlPolicy) Validate() error { | ||
6195 | invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"} | ||
6196 | if s.Grants != nil { | ||
6197 | for i, v := range s.Grants { | ||
6198 | if v == nil { | ||
6199 | continue | ||
6200 | } | ||
6201 | if err := v.Validate(); err != nil { | ||
6202 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams)) | ||
6203 | } | ||
6204 | } | ||
6205 | } | ||
6206 | |||
6207 | if invalidParams.Len() > 0 { | ||
6208 | return invalidParams | ||
6209 | } | ||
6210 | return nil | ||
6211 | } | ||
6212 | |||
6213 | // SetGrants sets the Grants field's value. | ||
6214 | func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy { | ||
6215 | s.Grants = v | ||
6216 | return s | ||
6217 | } | ||
6218 | |||
6219 | // SetOwner sets the Owner field's value. | ||
6220 | func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy { | ||
6221 | s.Owner = v | ||
6222 | return s | ||
6223 | } | ||
6224 | |||
6225 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsAndOperator | ||
6226 | type AnalyticsAndOperator struct { | ||
6227 | _ struct{} `type:"structure"` | ||
6228 | |||
6229 | // The prefix to use when evaluating an AND predicate. | ||
6230 | Prefix *string `type:"string"` | ||
6231 | |||
6232 | // The list of tags to use when evaluating an AND predicate. | ||
6233 | Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"` | ||
6234 | } | ||
6235 | |||
6236 | // String returns the string representation | ||
6237 | func (s AnalyticsAndOperator) String() string { | ||
6238 | return awsutil.Prettify(s) | ||
6239 | } | ||
6240 | |||
6241 | // GoString returns the string representation | ||
6242 | func (s AnalyticsAndOperator) GoString() string { | ||
6243 | return s.String() | ||
6244 | } | ||
6245 | |||
6246 | // Validate inspects the fields of the type to determine if they are valid. | ||
6247 | func (s *AnalyticsAndOperator) Validate() error { | ||
6248 | invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"} | ||
6249 | if s.Tags != nil { | ||
6250 | for i, v := range s.Tags { | ||
6251 | if v == nil { | ||
6252 | continue | ||
6253 | } | ||
6254 | if err := v.Validate(); err != nil { | ||
6255 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) | ||
6256 | } | ||
6257 | } | ||
6258 | } | ||
6259 | |||
6260 | if invalidParams.Len() > 0 { | ||
6261 | return invalidParams | ||
6262 | } | ||
6263 | return nil | ||
6264 | } | ||
6265 | |||
6266 | // SetPrefix sets the Prefix field's value. | ||
6267 | func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator { | ||
6268 | s.Prefix = &v | ||
6269 | return s | ||
6270 | } | ||
6271 | |||
6272 | // SetTags sets the Tags field's value. | ||
6273 | func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator { | ||
6274 | s.Tags = v | ||
6275 | return s | ||
6276 | } | ||
6277 | |||
6278 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsConfiguration | ||
6279 | type AnalyticsConfiguration struct { | ||
6280 | _ struct{} `type:"structure"` | ||
6281 | |||
6282 | // The filter used to describe a set of objects for analyses. A filter must | ||
6283 | // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). | ||
6284 | // If no filter is provided, all objects will be considered in any analysis. | ||
6285 | Filter *AnalyticsFilter `type:"structure"` | ||
6286 | |||
6287 | // The identifier used to represent an analytics configuration. | ||
6288 | // | ||
6289 | // Id is a required field | ||
6290 | Id *string `type:"string" required:"true"` | ||
6291 | |||
6292 | // If present, it indicates that data related to access patterns will be collected | ||
6293 | // and made available to analyze the tradeoffs between different storage classes. | ||
6294 | // | ||
6295 | // StorageClassAnalysis is a required field | ||
6296 | StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"` | ||
6297 | } | ||
6298 | |||
6299 | // String returns the string representation | ||
6300 | func (s AnalyticsConfiguration) String() string { | ||
6301 | return awsutil.Prettify(s) | ||
6302 | } | ||
6303 | |||
6304 | // GoString returns the string representation | ||
6305 | func (s AnalyticsConfiguration) GoString() string { | ||
6306 | return s.String() | ||
6307 | } | ||
6308 | |||
6309 | // Validate inspects the fields of the type to determine if they are valid. | ||
6310 | func (s *AnalyticsConfiguration) Validate() error { | ||
6311 | invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"} | ||
6312 | if s.Id == nil { | ||
6313 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
6314 | } | ||
6315 | if s.StorageClassAnalysis == nil { | ||
6316 | invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis")) | ||
6317 | } | ||
6318 | if s.Filter != nil { | ||
6319 | if err := s.Filter.Validate(); err != nil { | ||
6320 | invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) | ||
6321 | } | ||
6322 | } | ||
6323 | if s.StorageClassAnalysis != nil { | ||
6324 | if err := s.StorageClassAnalysis.Validate(); err != nil { | ||
6325 | invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams)) | ||
6326 | } | ||
6327 | } | ||
6328 | |||
6329 | if invalidParams.Len() > 0 { | ||
6330 | return invalidParams | ||
6331 | } | ||
6332 | return nil | ||
6333 | } | ||
6334 | |||
6335 | // SetFilter sets the Filter field's value. | ||
6336 | func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration { | ||
6337 | s.Filter = v | ||
6338 | return s | ||
6339 | } | ||
6340 | |||
6341 | // SetId sets the Id field's value. | ||
6342 | func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration { | ||
6343 | s.Id = &v | ||
6344 | return s | ||
6345 | } | ||
6346 | |||
6347 | // SetStorageClassAnalysis sets the StorageClassAnalysis field's value. | ||
6348 | func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration { | ||
6349 | s.StorageClassAnalysis = v | ||
6350 | return s | ||
6351 | } | ||
6352 | |||
6353 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsExportDestination | ||
6354 | type AnalyticsExportDestination struct { | ||
6355 | _ struct{} `type:"structure"` | ||
6356 | |||
6357 | // A destination signifying output to an S3 bucket. | ||
6358 | // | ||
6359 | // S3BucketDestination is a required field | ||
6360 | S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"` | ||
6361 | } | ||
6362 | |||
6363 | // String returns the string representation | ||
6364 | func (s AnalyticsExportDestination) String() string { | ||
6365 | return awsutil.Prettify(s) | ||
6366 | } | ||
6367 | |||
6368 | // GoString returns the string representation | ||
6369 | func (s AnalyticsExportDestination) GoString() string { | ||
6370 | return s.String() | ||
6371 | } | ||
6372 | |||
6373 | // Validate inspects the fields of the type to determine if they are valid. | ||
6374 | func (s *AnalyticsExportDestination) Validate() error { | ||
6375 | invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"} | ||
6376 | if s.S3BucketDestination == nil { | ||
6377 | invalidParams.Add(request.NewErrParamRequired("S3BucketDestination")) | ||
6378 | } | ||
6379 | if s.S3BucketDestination != nil { | ||
6380 | if err := s.S3BucketDestination.Validate(); err != nil { | ||
6381 | invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams)) | ||
6382 | } | ||
6383 | } | ||
6384 | |||
6385 | if invalidParams.Len() > 0 { | ||
6386 | return invalidParams | ||
6387 | } | ||
6388 | return nil | ||
6389 | } | ||
6390 | |||
6391 | // SetS3BucketDestination sets the S3BucketDestination field's value. | ||
6392 | func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination { | ||
6393 | s.S3BucketDestination = v | ||
6394 | return s | ||
6395 | } | ||
6396 | |||
6397 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsFilter | ||
6398 | type AnalyticsFilter struct { | ||
6399 | _ struct{} `type:"structure"` | ||
6400 | |||
6401 | // A conjunction (logical AND) of predicates, which is used in evaluating an | ||
6402 | // analytics filter. The operator must have at least two predicates. | ||
6403 | And *AnalyticsAndOperator `type:"structure"` | ||
6404 | |||
6405 | // The prefix to use when evaluating an analytics filter. | ||
6406 | Prefix *string `type:"string"` | ||
6407 | |||
6408 | // The tag to use when evaluating an analytics filter. | ||
6409 | Tag *Tag `type:"structure"` | ||
6410 | } | ||
6411 | |||
6412 | // String returns the string representation | ||
6413 | func (s AnalyticsFilter) String() string { | ||
6414 | return awsutil.Prettify(s) | ||
6415 | } | ||
6416 | |||
6417 | // GoString returns the string representation | ||
6418 | func (s AnalyticsFilter) GoString() string { | ||
6419 | return s.String() | ||
6420 | } | ||
6421 | |||
6422 | // Validate inspects the fields of the type to determine if they are valid. | ||
6423 | func (s *AnalyticsFilter) Validate() error { | ||
6424 | invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"} | ||
6425 | if s.And != nil { | ||
6426 | if err := s.And.Validate(); err != nil { | ||
6427 | invalidParams.AddNested("And", err.(request.ErrInvalidParams)) | ||
6428 | } | ||
6429 | } | ||
6430 | if s.Tag != nil { | ||
6431 | if err := s.Tag.Validate(); err != nil { | ||
6432 | invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) | ||
6433 | } | ||
6434 | } | ||
6435 | |||
6436 | if invalidParams.Len() > 0 { | ||
6437 | return invalidParams | ||
6438 | } | ||
6439 | return nil | ||
6440 | } | ||
6441 | |||
6442 | // SetAnd sets the And field's value. | ||
6443 | func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter { | ||
6444 | s.And = v | ||
6445 | return s | ||
6446 | } | ||
6447 | |||
6448 | // SetPrefix sets the Prefix field's value. | ||
6449 | func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter { | ||
6450 | s.Prefix = &v | ||
6451 | return s | ||
6452 | } | ||
6453 | |||
6454 | // SetTag sets the Tag field's value. | ||
6455 | func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter { | ||
6456 | s.Tag = v | ||
6457 | return s | ||
6458 | } | ||
6459 | |||
6460 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsS3BucketDestination | ||
6461 | type AnalyticsS3BucketDestination struct { | ||
6462 | _ struct{} `type:"structure"` | ||
6463 | |||
6464 | // The Amazon resource name (ARN) of the bucket to which data is exported. | ||
6465 | // | ||
6466 | // Bucket is a required field | ||
6467 | Bucket *string `type:"string" required:"true"` | ||
6468 | |||
6469 | // The account ID that owns the destination bucket. If no account ID is provided, | ||
6470 | // the owner will not be validated prior to exporting data. | ||
6471 | BucketAccountId *string `type:"string"` | ||
6472 | |||
6473 | // The file format used when exporting data to Amazon S3. | ||
6474 | // | ||
6475 | // Format is a required field | ||
6476 | Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"` | ||
6477 | |||
6478 | // The prefix to use when exporting data. The exported data begins with this | ||
6479 | // prefix. | ||
6480 | Prefix *string `type:"string"` | ||
6481 | } | ||
6482 | |||
6483 | // String returns the string representation | ||
6484 | func (s AnalyticsS3BucketDestination) String() string { | ||
6485 | return awsutil.Prettify(s) | ||
6486 | } | ||
6487 | |||
6488 | // GoString returns the string representation | ||
6489 | func (s AnalyticsS3BucketDestination) GoString() string { | ||
6490 | return s.String() | ||
6491 | } | ||
6492 | |||
6493 | // Validate inspects the fields of the type to determine if they are valid. | ||
6494 | func (s *AnalyticsS3BucketDestination) Validate() error { | ||
6495 | invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"} | ||
6496 | if s.Bucket == nil { | ||
6497 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
6498 | } | ||
6499 | if s.Format == nil { | ||
6500 | invalidParams.Add(request.NewErrParamRequired("Format")) | ||
6501 | } | ||
6502 | |||
6503 | if invalidParams.Len() > 0 { | ||
6504 | return invalidParams | ||
6505 | } | ||
6506 | return nil | ||
6507 | } | ||
6508 | |||
6509 | // SetBucket sets the Bucket field's value. | ||
6510 | func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination { | ||
6511 | s.Bucket = &v | ||
6512 | return s | ||
6513 | } | ||
6514 | |||
6515 | // SetBucketAccountId sets the BucketAccountId field's value. | ||
6516 | func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination { | ||
6517 | s.BucketAccountId = &v | ||
6518 | return s | ||
6519 | } | ||
6520 | |||
6521 | // SetFormat sets the Format field's value. | ||
6522 | func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination { | ||
6523 | s.Format = &v | ||
6524 | return s | ||
6525 | } | ||
6526 | |||
6527 | // SetPrefix sets the Prefix field's value. | ||
6528 | func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination { | ||
6529 | s.Prefix = &v | ||
6530 | return s | ||
6531 | } | ||
6532 | |||
6533 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Bucket | ||
6534 | type Bucket struct { | ||
6535 | _ struct{} `type:"structure"` | ||
6536 | |||
6537 | // Date the bucket was created. | ||
6538 | CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
6539 | |||
6540 | // The name of the bucket. | ||
6541 | Name *string `type:"string"` | ||
6542 | } | ||
6543 | |||
6544 | // String returns the string representation | ||
6545 | func (s Bucket) String() string { | ||
6546 | return awsutil.Prettify(s) | ||
6547 | } | ||
6548 | |||
6549 | // GoString returns the string representation | ||
6550 | func (s Bucket) GoString() string { | ||
6551 | return s.String() | ||
6552 | } | ||
6553 | |||
6554 | // SetCreationDate sets the CreationDate field's value. | ||
6555 | func (s *Bucket) SetCreationDate(v time.Time) *Bucket { | ||
6556 | s.CreationDate = &v | ||
6557 | return s | ||
6558 | } | ||
6559 | |||
6560 | // SetName sets the Name field's value. | ||
6561 | func (s *Bucket) SetName(v string) *Bucket { | ||
6562 | s.Name = &v | ||
6563 | return s | ||
6564 | } | ||
6565 | |||
6566 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLifecycleConfiguration | ||
6567 | type BucketLifecycleConfiguration struct { | ||
6568 | _ struct{} `type:"structure"` | ||
6569 | |||
6570 | // Rules is a required field | ||
6571 | Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"` | ||
6572 | } | ||
6573 | |||
6574 | // String returns the string representation | ||
6575 | func (s BucketLifecycleConfiguration) String() string { | ||
6576 | return awsutil.Prettify(s) | ||
6577 | } | ||
6578 | |||
6579 | // GoString returns the string representation | ||
6580 | func (s BucketLifecycleConfiguration) GoString() string { | ||
6581 | return s.String() | ||
6582 | } | ||
6583 | |||
6584 | // Validate inspects the fields of the type to determine if they are valid. | ||
6585 | func (s *BucketLifecycleConfiguration) Validate() error { | ||
6586 | invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"} | ||
6587 | if s.Rules == nil { | ||
6588 | invalidParams.Add(request.NewErrParamRequired("Rules")) | ||
6589 | } | ||
6590 | if s.Rules != nil { | ||
6591 | for i, v := range s.Rules { | ||
6592 | if v == nil { | ||
6593 | continue | ||
6594 | } | ||
6595 | if err := v.Validate(); err != nil { | ||
6596 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) | ||
6597 | } | ||
6598 | } | ||
6599 | } | ||
6600 | |||
6601 | if invalidParams.Len() > 0 { | ||
6602 | return invalidParams | ||
6603 | } | ||
6604 | return nil | ||
6605 | } | ||
6606 | |||
6607 | // SetRules sets the Rules field's value. | ||
6608 | func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration { | ||
6609 | s.Rules = v | ||
6610 | return s | ||
6611 | } | ||
6612 | |||
6613 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLoggingStatus | ||
6614 | type BucketLoggingStatus struct { | ||
6615 | _ struct{} `type:"structure"` | ||
6616 | |||
6617 | LoggingEnabled *LoggingEnabled `type:"structure"` | ||
6618 | } | ||
6619 | |||
6620 | // String returns the string representation | ||
6621 | func (s BucketLoggingStatus) String() string { | ||
6622 | return awsutil.Prettify(s) | ||
6623 | } | ||
6624 | |||
6625 | // GoString returns the string representation | ||
6626 | func (s BucketLoggingStatus) GoString() string { | ||
6627 | return s.String() | ||
6628 | } | ||
6629 | |||
6630 | // Validate inspects the fields of the type to determine if they are valid. | ||
6631 | func (s *BucketLoggingStatus) Validate() error { | ||
6632 | invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"} | ||
6633 | if s.LoggingEnabled != nil { | ||
6634 | if err := s.LoggingEnabled.Validate(); err != nil { | ||
6635 | invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams)) | ||
6636 | } | ||
6637 | } | ||
6638 | |||
6639 | if invalidParams.Len() > 0 { | ||
6640 | return invalidParams | ||
6641 | } | ||
6642 | return nil | ||
6643 | } | ||
6644 | |||
6645 | // SetLoggingEnabled sets the LoggingEnabled field's value. | ||
6646 | func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus { | ||
6647 | s.LoggingEnabled = v | ||
6648 | return s | ||
6649 | } | ||
6650 | |||
6651 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSConfiguration | ||
6652 | type CORSConfiguration struct { | ||
6653 | _ struct{} `type:"structure"` | ||
6654 | |||
6655 | // CORSRules is a required field | ||
6656 | CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"` | ||
6657 | } | ||
6658 | |||
6659 | // String returns the string representation | ||
6660 | func (s CORSConfiguration) String() string { | ||
6661 | return awsutil.Prettify(s) | ||
6662 | } | ||
6663 | |||
6664 | // GoString returns the string representation | ||
6665 | func (s CORSConfiguration) GoString() string { | ||
6666 | return s.String() | ||
6667 | } | ||
6668 | |||
6669 | // Validate inspects the fields of the type to determine if they are valid. | ||
6670 | func (s *CORSConfiguration) Validate() error { | ||
6671 | invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"} | ||
6672 | if s.CORSRules == nil { | ||
6673 | invalidParams.Add(request.NewErrParamRequired("CORSRules")) | ||
6674 | } | ||
6675 | if s.CORSRules != nil { | ||
6676 | for i, v := range s.CORSRules { | ||
6677 | if v == nil { | ||
6678 | continue | ||
6679 | } | ||
6680 | if err := v.Validate(); err != nil { | ||
6681 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams)) | ||
6682 | } | ||
6683 | } | ||
6684 | } | ||
6685 | |||
6686 | if invalidParams.Len() > 0 { | ||
6687 | return invalidParams | ||
6688 | } | ||
6689 | return nil | ||
6690 | } | ||
6691 | |||
6692 | // SetCORSRules sets the CORSRules field's value. | ||
6693 | func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration { | ||
6694 | s.CORSRules = v | ||
6695 | return s | ||
6696 | } | ||
6697 | |||
6698 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSRule | ||
6699 | type CORSRule struct { | ||
6700 | _ struct{} `type:"structure"` | ||
6701 | |||
6702 | // Specifies which headers are allowed in a pre-flight OPTIONS request. | ||
6703 | AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"` | ||
6704 | |||
6705 | // Identifies HTTP methods that the domain/origin specified in the rule is allowed | ||
6706 | // to execute. | ||
6707 | // | ||
6708 | // AllowedMethods is a required field | ||
6709 | AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"` | ||
6710 | |||
6711 | // One or more origins you want customers to be able to access the bucket from. | ||
6712 | // | ||
6713 | // AllowedOrigins is a required field | ||
6714 | AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"` | ||
6715 | |||
6716 | // One or more headers in the response that you want customers to be able to | ||
6717 | // access from their applications (for example, from a JavaScript XMLHttpRequest | ||
6718 | // object). | ||
6719 | ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"` | ||
6720 | |||
6721 | // The time in seconds that your browser is to cache the preflight response | ||
6722 | // for the specified resource. | ||
6723 | MaxAgeSeconds *int64 `type:"integer"` | ||
6724 | } | ||
6725 | |||
6726 | // String returns the string representation | ||
6727 | func (s CORSRule) String() string { | ||
6728 | return awsutil.Prettify(s) | ||
6729 | } | ||
6730 | |||
6731 | // GoString returns the string representation | ||
6732 | func (s CORSRule) GoString() string { | ||
6733 | return s.String() | ||
6734 | } | ||
6735 | |||
6736 | // Validate inspects the fields of the type to determine if they are valid. | ||
6737 | func (s *CORSRule) Validate() error { | ||
6738 | invalidParams := request.ErrInvalidParams{Context: "CORSRule"} | ||
6739 | if s.AllowedMethods == nil { | ||
6740 | invalidParams.Add(request.NewErrParamRequired("AllowedMethods")) | ||
6741 | } | ||
6742 | if s.AllowedOrigins == nil { | ||
6743 | invalidParams.Add(request.NewErrParamRequired("AllowedOrigins")) | ||
6744 | } | ||
6745 | |||
6746 | if invalidParams.Len() > 0 { | ||
6747 | return invalidParams | ||
6748 | } | ||
6749 | return nil | ||
6750 | } | ||
6751 | |||
6752 | // SetAllowedHeaders sets the AllowedHeaders field's value. | ||
6753 | func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule { | ||
6754 | s.AllowedHeaders = v | ||
6755 | return s | ||
6756 | } | ||
6757 | |||
6758 | // SetAllowedMethods sets the AllowedMethods field's value. | ||
6759 | func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule { | ||
6760 | s.AllowedMethods = v | ||
6761 | return s | ||
6762 | } | ||
6763 | |||
6764 | // SetAllowedOrigins sets the AllowedOrigins field's value. | ||
6765 | func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule { | ||
6766 | s.AllowedOrigins = v | ||
6767 | return s | ||
6768 | } | ||
6769 | |||
6770 | // SetExposeHeaders sets the ExposeHeaders field's value. | ||
6771 | func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule { | ||
6772 | s.ExposeHeaders = v | ||
6773 | return s | ||
6774 | } | ||
6775 | |||
6776 | // SetMaxAgeSeconds sets the MaxAgeSeconds field's value. | ||
6777 | func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule { | ||
6778 | s.MaxAgeSeconds = &v | ||
6779 | return s | ||
6780 | } | ||
6781 | |||
6782 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CloudFunctionConfiguration | ||
6783 | type CloudFunctionConfiguration struct { | ||
6784 | _ struct{} `type:"structure"` | ||
6785 | |||
6786 | CloudFunction *string `type:"string"` | ||
6787 | |||
6788 | // Bucket event for which to send notifications. | ||
6789 | Event *string `deprecated:"true" type:"string" enum:"Event"` | ||
6790 | |||
6791 | Events []*string `locationName:"Event" type:"list" flattened:"true"` | ||
6792 | |||
6793 | // Optional unique identifier for configurations in a notification configuration. | ||
6794 | // If you don't provide one, Amazon S3 will assign an ID. | ||
6795 | Id *string `type:"string"` | ||
6796 | |||
6797 | InvocationRole *string `type:"string"` | ||
6798 | } | ||
6799 | |||
6800 | // String returns the string representation | ||
6801 | func (s CloudFunctionConfiguration) String() string { | ||
6802 | return awsutil.Prettify(s) | ||
6803 | } | ||
6804 | |||
6805 | // GoString returns the string representation | ||
6806 | func (s CloudFunctionConfiguration) GoString() string { | ||
6807 | return s.String() | ||
6808 | } | ||
6809 | |||
6810 | // SetCloudFunction sets the CloudFunction field's value. | ||
6811 | func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration { | ||
6812 | s.CloudFunction = &v | ||
6813 | return s | ||
6814 | } | ||
6815 | |||
6816 | // SetEvent sets the Event field's value. | ||
6817 | func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration { | ||
6818 | s.Event = &v | ||
6819 | return s | ||
6820 | } | ||
6821 | |||
6822 | // SetEvents sets the Events field's value. | ||
6823 | func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration { | ||
6824 | s.Events = v | ||
6825 | return s | ||
6826 | } | ||
6827 | |||
6828 | // SetId sets the Id field's value. | ||
6829 | func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration { | ||
6830 | s.Id = &v | ||
6831 | return s | ||
6832 | } | ||
6833 | |||
6834 | // SetInvocationRole sets the InvocationRole field's value. | ||
6835 | func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration { | ||
6836 | s.InvocationRole = &v | ||
6837 | return s | ||
6838 | } | ||
6839 | |||
6840 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CommonPrefix | ||
6841 | type CommonPrefix struct { | ||
6842 | _ struct{} `type:"structure"` | ||
6843 | |||
6844 | Prefix *string `type:"string"` | ||
6845 | } | ||
6846 | |||
6847 | // String returns the string representation | ||
6848 | func (s CommonPrefix) String() string { | ||
6849 | return awsutil.Prettify(s) | ||
6850 | } | ||
6851 | |||
6852 | // GoString returns the string representation | ||
6853 | func (s CommonPrefix) GoString() string { | ||
6854 | return s.String() | ||
6855 | } | ||
6856 | |||
6857 | // SetPrefix sets the Prefix field's value. | ||
6858 | func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix { | ||
6859 | s.Prefix = &v | ||
6860 | return s | ||
6861 | } | ||
6862 | |||
6863 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadRequest | ||
6864 | type CompleteMultipartUploadInput struct { | ||
6865 | _ struct{} `type:"structure" payload:"MultipartUpload"` | ||
6866 | |||
6867 | // Bucket is a required field | ||
6868 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
6869 | |||
6870 | // Key is a required field | ||
6871 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
6872 | |||
6873 | MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure"` | ||
6874 | |||
6875 | // Confirms that the requester knows that she or he will be charged for the | ||
6876 | // request. Bucket owners need not specify this parameter in their requests. | ||
6877 | // Documentation on downloading objects from requester pays buckets can be found | ||
6878 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
6879 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
6880 | |||
6881 | // UploadId is a required field | ||
6882 | UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"` | ||
6883 | } | ||
6884 | |||
6885 | // String returns the string representation | ||
6886 | func (s CompleteMultipartUploadInput) String() string { | ||
6887 | return awsutil.Prettify(s) | ||
6888 | } | ||
6889 | |||
6890 | // GoString returns the string representation | ||
6891 | func (s CompleteMultipartUploadInput) GoString() string { | ||
6892 | return s.String() | ||
6893 | } | ||
6894 | |||
6895 | // Validate inspects the fields of the type to determine if they are valid. | ||
6896 | func (s *CompleteMultipartUploadInput) Validate() error { | ||
6897 | invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"} | ||
6898 | if s.Bucket == nil { | ||
6899 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
6900 | } | ||
6901 | if s.Key == nil { | ||
6902 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
6903 | } | ||
6904 | if s.Key != nil && len(*s.Key) < 1 { | ||
6905 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
6906 | } | ||
6907 | if s.UploadId == nil { | ||
6908 | invalidParams.Add(request.NewErrParamRequired("UploadId")) | ||
6909 | } | ||
6910 | |||
6911 | if invalidParams.Len() > 0 { | ||
6912 | return invalidParams | ||
6913 | } | ||
6914 | return nil | ||
6915 | } | ||
6916 | |||
6917 | // SetBucket sets the Bucket field's value. | ||
6918 | func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput { | ||
6919 | s.Bucket = &v | ||
6920 | return s | ||
6921 | } | ||
6922 | |||
6923 | // SetKey sets the Key field's value. | ||
6924 | func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput { | ||
6925 | s.Key = &v | ||
6926 | return s | ||
6927 | } | ||
6928 | |||
6929 | // SetMultipartUpload sets the MultipartUpload field's value. | ||
6930 | func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput { | ||
6931 | s.MultipartUpload = v | ||
6932 | return s | ||
6933 | } | ||
6934 | |||
6935 | // SetRequestPayer sets the RequestPayer field's value. | ||
6936 | func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput { | ||
6937 | s.RequestPayer = &v | ||
6938 | return s | ||
6939 | } | ||
6940 | |||
6941 | // SetUploadId sets the UploadId field's value. | ||
6942 | func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput { | ||
6943 | s.UploadId = &v | ||
6944 | return s | ||
6945 | } | ||
6946 | |||
6947 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadOutput | ||
6948 | type CompleteMultipartUploadOutput struct { | ||
6949 | _ struct{} `type:"structure"` | ||
6950 | |||
6951 | Bucket *string `type:"string"` | ||
6952 | |||
6953 | // Entity tag of the object. | ||
6954 | ETag *string `type:"string"` | ||
6955 | |||
6956 | // If the object expiration is configured, this will contain the expiration | ||
6957 | // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded. | ||
6958 | Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` | ||
6959 | |||
6960 | Key *string `min:"1" type:"string"` | ||
6961 | |||
6962 | Location *string `type:"string"` | ||
6963 | |||
6964 | // If present, indicates that the requester was successfully charged for the | ||
6965 | // request. | ||
6966 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
6967 | |||
6968 | // If present, specifies the ID of the AWS Key Management Service (KMS) master | ||
6969 | // encryption key that was used for the object. | ||
6970 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
6971 | |||
6972 | // The Server-side encryption algorithm used when storing this object in S3 | ||
6973 | // (e.g., AES256, aws:kms). | ||
6974 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
6975 | |||
6976 | // Version of the object. | ||
6977 | VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` | ||
6978 | } | ||
6979 | |||
6980 | // String returns the string representation | ||
6981 | func (s CompleteMultipartUploadOutput) String() string { | ||
6982 | return awsutil.Prettify(s) | ||
6983 | } | ||
6984 | |||
6985 | // GoString returns the string representation | ||
6986 | func (s CompleteMultipartUploadOutput) GoString() string { | ||
6987 | return s.String() | ||
6988 | } | ||
6989 | |||
6990 | // SetBucket sets the Bucket field's value. | ||
6991 | func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput { | ||
6992 | s.Bucket = &v | ||
6993 | return s | ||
6994 | } | ||
6995 | |||
6996 | // SetETag sets the ETag field's value. | ||
6997 | func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput { | ||
6998 | s.ETag = &v | ||
6999 | return s | ||
7000 | } | ||
7001 | |||
7002 | // SetExpiration sets the Expiration field's value. | ||
7003 | func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput { | ||
7004 | s.Expiration = &v | ||
7005 | return s | ||
7006 | } | ||
7007 | |||
7008 | // SetKey sets the Key field's value. | ||
7009 | func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput { | ||
7010 | s.Key = &v | ||
7011 | return s | ||
7012 | } | ||
7013 | |||
7014 | // SetLocation sets the Location field's value. | ||
7015 | func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput { | ||
7016 | s.Location = &v | ||
7017 | return s | ||
7018 | } | ||
7019 | |||
7020 | // SetRequestCharged sets the RequestCharged field's value. | ||
7021 | func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput { | ||
7022 | s.RequestCharged = &v | ||
7023 | return s | ||
7024 | } | ||
7025 | |||
7026 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
7027 | func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput { | ||
7028 | s.SSEKMSKeyId = &v | ||
7029 | return s | ||
7030 | } | ||
7031 | |||
7032 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
7033 | func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput { | ||
7034 | s.ServerSideEncryption = &v | ||
7035 | return s | ||
7036 | } | ||
7037 | |||
7038 | // SetVersionId sets the VersionId field's value. | ||
7039 | func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput { | ||
7040 | s.VersionId = &v | ||
7041 | return s | ||
7042 | } | ||
7043 | |||
7044 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedMultipartUpload | ||
7045 | type CompletedMultipartUpload struct { | ||
7046 | _ struct{} `type:"structure"` | ||
7047 | |||
7048 | Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"` | ||
7049 | } | ||
7050 | |||
7051 | // String returns the string representation | ||
7052 | func (s CompletedMultipartUpload) String() string { | ||
7053 | return awsutil.Prettify(s) | ||
7054 | } | ||
7055 | |||
7056 | // GoString returns the string representation | ||
7057 | func (s CompletedMultipartUpload) GoString() string { | ||
7058 | return s.String() | ||
7059 | } | ||
7060 | |||
7061 | // SetParts sets the Parts field's value. | ||
7062 | func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload { | ||
7063 | s.Parts = v | ||
7064 | return s | ||
7065 | } | ||
7066 | |||
7067 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedPart | ||
7068 | type CompletedPart struct { | ||
7069 | _ struct{} `type:"structure"` | ||
7070 | |||
7071 | // Entity tag returned when the part was uploaded. | ||
7072 | ETag *string `type:"string"` | ||
7073 | |||
7074 | // Part number that identifies the part. This is a positive integer between | ||
7075 | // 1 and 10,000. | ||
7076 | PartNumber *int64 `type:"integer"` | ||
7077 | } | ||
7078 | |||
7079 | // String returns the string representation | ||
7080 | func (s CompletedPart) String() string { | ||
7081 | return awsutil.Prettify(s) | ||
7082 | } | ||
7083 | |||
7084 | // GoString returns the string representation | ||
7085 | func (s CompletedPart) GoString() string { | ||
7086 | return s.String() | ||
7087 | } | ||
7088 | |||
7089 | // SetETag sets the ETag field's value. | ||
7090 | func (s *CompletedPart) SetETag(v string) *CompletedPart { | ||
7091 | s.ETag = &v | ||
7092 | return s | ||
7093 | } | ||
7094 | |||
7095 | // SetPartNumber sets the PartNumber field's value. | ||
7096 | func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart { | ||
7097 | s.PartNumber = &v | ||
7098 | return s | ||
7099 | } | ||
7100 | |||
7101 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Condition | ||
7102 | type Condition struct { | ||
7103 | _ struct{} `type:"structure"` | ||
7104 | |||
7105 | // The HTTP error code when the redirect is applied. In the event of an error, | ||
7106 | // if the error code equals this value, then the specified redirect is applied. | ||
7107 | // Required when parent element Condition is specified and sibling KeyPrefixEquals | ||
7108 | // is not specified. If both are specified, then both must be true for the redirect | ||
7109 | // to be applied. | ||
7110 | HttpErrorCodeReturnedEquals *string `type:"string"` | ||
7111 | |||
7112 | // The object key name prefix when the redirect is applied. For example, to | ||
7113 | // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html. | ||
7114 | // To redirect request for all pages with the prefix docs/, the key prefix will | ||
7115 | // be /docs, which identifies all objects in the docs/ folder. Required when | ||
7116 | // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals | ||
7117 | // is not specified. If both conditions are specified, both must be true for | ||
7118 | // the redirect to be applied. | ||
7119 | KeyPrefixEquals *string `type:"string"` | ||
7120 | } | ||
7121 | |||
7122 | // String returns the string representation | ||
7123 | func (s Condition) String() string { | ||
7124 | return awsutil.Prettify(s) | ||
7125 | } | ||
7126 | |||
7127 | // GoString returns the string representation | ||
7128 | func (s Condition) GoString() string { | ||
7129 | return s.String() | ||
7130 | } | ||
7131 | |||
7132 | // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value. | ||
7133 | func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition { | ||
7134 | s.HttpErrorCodeReturnedEquals = &v | ||
7135 | return s | ||
7136 | } | ||
7137 | |||
7138 | // SetKeyPrefixEquals sets the KeyPrefixEquals field's value. | ||
7139 | func (s *Condition) SetKeyPrefixEquals(v string) *Condition { | ||
7140 | s.KeyPrefixEquals = &v | ||
7141 | return s | ||
7142 | } | ||
7143 | |||
7144 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectRequest | ||
7145 | type CopyObjectInput struct { | ||
7146 | _ struct{} `type:"structure"` | ||
7147 | |||
7148 | // The canned ACL to apply to the object. | ||
7149 | ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"` | ||
7150 | |||
7151 | // Bucket is a required field | ||
7152 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
7153 | |||
7154 | // Specifies caching behavior along the request/reply chain. | ||
7155 | CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` | ||
7156 | |||
7157 | // Specifies presentational information for the object. | ||
7158 | ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` | ||
7159 | |||
7160 | // Specifies what content encodings have been applied to the object and thus | ||
7161 | // what decoding mechanisms must be applied to obtain the media-type referenced | ||
7162 | // by the Content-Type header field. | ||
7163 | ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` | ||
7164 | |||
7165 | // The language the content is in. | ||
7166 | ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` | ||
7167 | |||
7168 | // A standard MIME type describing the format of the object data. | ||
7169 | ContentType *string `location:"header" locationName:"Content-Type" type:"string"` | ||
7170 | |||
7171 | // The name of the source bucket and key name of the source object, separated | ||
7172 | // by a slash (/). Must be URL-encoded. | ||
7173 | // | ||
7174 | // CopySource is a required field | ||
7175 | CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"` | ||
7176 | |||
7177 | // Copies the object if its entity tag (ETag) matches the specified tag. | ||
7178 | CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"` | ||
7179 | |||
7180 | // Copies the object if it has been modified since the specified time. | ||
7181 | CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"` | ||
7182 | |||
7183 | // Copies the object if its entity tag (ETag) is different than the specified | ||
7184 | // ETag. | ||
7185 | CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"` | ||
7186 | |||
7187 | // Copies the object if it hasn't been modified since the specified time. | ||
7188 | CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"` | ||
7189 | |||
7190 | // Specifies the algorithm to use when decrypting the source object (e.g., AES256). | ||
7191 | CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"` | ||
7192 | |||
7193 | // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt | ||
7194 | // the source object. The encryption key provided in this header must be one | ||
7195 | // that was used when the source object was created. | ||
7196 | CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"` | ||
7197 | |||
7198 | // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | ||
7199 | // Amazon S3 uses this header for a message integrity check to ensure the encryption | ||
7200 | // key was transmitted without error. | ||
7201 | CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"` | ||
7202 | |||
7203 | // The date and time at which the object is no longer cacheable. | ||
7204 | Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"` | ||
7205 | |||
7206 | // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. | ||
7207 | GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` | ||
7208 | |||
7209 | // Allows grantee to read the object data and its metadata. | ||
7210 | GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` | ||
7211 | |||
7212 | // Allows grantee to read the object ACL. | ||
7213 | GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` | ||
7214 | |||
7215 | // Allows grantee to write the ACL for the applicable object. | ||
7216 | GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` | ||
7217 | |||
7218 | // Key is a required field | ||
7219 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
7220 | |||
7221 | // A map of metadata to store with the object in S3. | ||
7222 | Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` | ||
7223 | |||
7224 | // Specifies whether the metadata is copied from the source object or replaced | ||
7225 | // with metadata provided in the request. | ||
7226 | MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"` | ||
7227 | |||
7228 | // Confirms that the requester knows that she or he will be charged for the | ||
7229 | // request. Bucket owners need not specify this parameter in their requests. | ||
7230 | // Documentation on downloading objects from requester pays buckets can be found | ||
7231 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
7232 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
7233 | |||
7234 | // Specifies the algorithm to use to when encrypting the object (e.g., AES256). | ||
7235 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
7236 | |||
7237 | // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting | ||
7238 | // data. This value is used to store the object and then it is discarded; Amazon | ||
7239 | // does not store the encryption key. The key must be appropriate for use with | ||
7240 | // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm | ||
7241 | // header. | ||
7242 | SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` | ||
7243 | |||
7244 | // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | ||
7245 | // Amazon S3 uses this header for a message integrity check to ensure the encryption | ||
7246 | // key was transmitted without error. | ||
7247 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
7248 | |||
7249 | // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT | ||
7250 | // requests for an object protected by AWS KMS will fail if not made via SSL | ||
7251 | // or using SigV4. Documentation on configuring any of the officially supported | ||
7252 | // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version | ||
7253 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
7254 | |||
7255 | // The Server-side encryption algorithm used when storing this object in S3 | ||
7256 | // (e.g., AES256, aws:kms). | ||
7257 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
7258 | |||
7259 | // The type of storage to use for the object. Defaults to 'STANDARD'. | ||
7260 | StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` | ||
7261 | |||
7262 | // The tag-set for the object destination object this value must be used in | ||
7263 | // conjunction with the TaggingDirective. The tag-set must be encoded as URL | ||
7264 | // Query parameters | ||
7265 | Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"` | ||
7266 | |||
7267 | // Specifies whether the object tag-set are copied from the source object or | ||
7268 | // replaced with tag-set provided in the request. | ||
7269 | TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"` | ||
7270 | |||
7271 | // If the bucket is configured as a website, redirects requests for this object | ||
7272 | // to another object in the same bucket or to an external URL. Amazon S3 stores | ||
7273 | // the value of this header in the object metadata. | ||
7274 | WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"` | ||
7275 | } | ||
7276 | |||
7277 | // String returns the string representation | ||
7278 | func (s CopyObjectInput) String() string { | ||
7279 | return awsutil.Prettify(s) | ||
7280 | } | ||
7281 | |||
7282 | // GoString returns the string representation | ||
7283 | func (s CopyObjectInput) GoString() string { | ||
7284 | return s.String() | ||
7285 | } | ||
7286 | |||
7287 | // Validate inspects the fields of the type to determine if they are valid. | ||
7288 | func (s *CopyObjectInput) Validate() error { | ||
7289 | invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"} | ||
7290 | if s.Bucket == nil { | ||
7291 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
7292 | } | ||
7293 | if s.CopySource == nil { | ||
7294 | invalidParams.Add(request.NewErrParamRequired("CopySource")) | ||
7295 | } | ||
7296 | if s.Key == nil { | ||
7297 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
7298 | } | ||
7299 | if s.Key != nil && len(*s.Key) < 1 { | ||
7300 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
7301 | } | ||
7302 | |||
7303 | if invalidParams.Len() > 0 { | ||
7304 | return invalidParams | ||
7305 | } | ||
7306 | return nil | ||
7307 | } | ||
7308 | |||
7309 | // SetACL sets the ACL field's value. | ||
7310 | func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput { | ||
7311 | s.ACL = &v | ||
7312 | return s | ||
7313 | } | ||
7314 | |||
7315 | // SetBucket sets the Bucket field's value. | ||
7316 | func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput { | ||
7317 | s.Bucket = &v | ||
7318 | return s | ||
7319 | } | ||
7320 | |||
7321 | // SetCacheControl sets the CacheControl field's value. | ||
7322 | func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput { | ||
7323 | s.CacheControl = &v | ||
7324 | return s | ||
7325 | } | ||
7326 | |||
7327 | // SetContentDisposition sets the ContentDisposition field's value. | ||
7328 | func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput { | ||
7329 | s.ContentDisposition = &v | ||
7330 | return s | ||
7331 | } | ||
7332 | |||
7333 | // SetContentEncoding sets the ContentEncoding field's value. | ||
7334 | func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput { | ||
7335 | s.ContentEncoding = &v | ||
7336 | return s | ||
7337 | } | ||
7338 | |||
7339 | // SetContentLanguage sets the ContentLanguage field's value. | ||
7340 | func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput { | ||
7341 | s.ContentLanguage = &v | ||
7342 | return s | ||
7343 | } | ||
7344 | |||
7345 | // SetContentType sets the ContentType field's value. | ||
7346 | func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput { | ||
7347 | s.ContentType = &v | ||
7348 | return s | ||
7349 | } | ||
7350 | |||
7351 | // SetCopySource sets the CopySource field's value. | ||
7352 | func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput { | ||
7353 | s.CopySource = &v | ||
7354 | return s | ||
7355 | } | ||
7356 | |||
7357 | // SetCopySourceIfMatch sets the CopySourceIfMatch field's value. | ||
7358 | func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput { | ||
7359 | s.CopySourceIfMatch = &v | ||
7360 | return s | ||
7361 | } | ||
7362 | |||
7363 | // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value. | ||
7364 | func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput { | ||
7365 | s.CopySourceIfModifiedSince = &v | ||
7366 | return s | ||
7367 | } | ||
7368 | |||
7369 | // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value. | ||
7370 | func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput { | ||
7371 | s.CopySourceIfNoneMatch = &v | ||
7372 | return s | ||
7373 | } | ||
7374 | |||
7375 | // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value. | ||
7376 | func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput { | ||
7377 | s.CopySourceIfUnmodifiedSince = &v | ||
7378 | return s | ||
7379 | } | ||
7380 | |||
7381 | // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value. | ||
7382 | func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput { | ||
7383 | s.CopySourceSSECustomerAlgorithm = &v | ||
7384 | return s | ||
7385 | } | ||
7386 | |||
7387 | // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value. | ||
7388 | func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput { | ||
7389 | s.CopySourceSSECustomerKey = &v | ||
7390 | return s | ||
7391 | } | ||
7392 | |||
7393 | // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value. | ||
7394 | func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput { | ||
7395 | s.CopySourceSSECustomerKeyMD5 = &v | ||
7396 | return s | ||
7397 | } | ||
7398 | |||
7399 | // SetExpires sets the Expires field's value. | ||
7400 | func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput { | ||
7401 | s.Expires = &v | ||
7402 | return s | ||
7403 | } | ||
7404 | |||
7405 | // SetGrantFullControl sets the GrantFullControl field's value. | ||
7406 | func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput { | ||
7407 | s.GrantFullControl = &v | ||
7408 | return s | ||
7409 | } | ||
7410 | |||
7411 | // SetGrantRead sets the GrantRead field's value. | ||
7412 | func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput { | ||
7413 | s.GrantRead = &v | ||
7414 | return s | ||
7415 | } | ||
7416 | |||
7417 | // SetGrantReadACP sets the GrantReadACP field's value. | ||
7418 | func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput { | ||
7419 | s.GrantReadACP = &v | ||
7420 | return s | ||
7421 | } | ||
7422 | |||
7423 | // SetGrantWriteACP sets the GrantWriteACP field's value. | ||
7424 | func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput { | ||
7425 | s.GrantWriteACP = &v | ||
7426 | return s | ||
7427 | } | ||
7428 | |||
7429 | // SetKey sets the Key field's value. | ||
7430 | func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput { | ||
7431 | s.Key = &v | ||
7432 | return s | ||
7433 | } | ||
7434 | |||
7435 | // SetMetadata sets the Metadata field's value. | ||
7436 | func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput { | ||
7437 | s.Metadata = v | ||
7438 | return s | ||
7439 | } | ||
7440 | |||
7441 | // SetMetadataDirective sets the MetadataDirective field's value. | ||
7442 | func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput { | ||
7443 | s.MetadataDirective = &v | ||
7444 | return s | ||
7445 | } | ||
7446 | |||
7447 | // SetRequestPayer sets the RequestPayer field's value. | ||
7448 | func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput { | ||
7449 | s.RequestPayer = &v | ||
7450 | return s | ||
7451 | } | ||
7452 | |||
7453 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
7454 | func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput { | ||
7455 | s.SSECustomerAlgorithm = &v | ||
7456 | return s | ||
7457 | } | ||
7458 | |||
7459 | // SetSSECustomerKey sets the SSECustomerKey field's value. | ||
7460 | func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput { | ||
7461 | s.SSECustomerKey = &v | ||
7462 | return s | ||
7463 | } | ||
7464 | |||
7465 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
7466 | func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput { | ||
7467 | s.SSECustomerKeyMD5 = &v | ||
7468 | return s | ||
7469 | } | ||
7470 | |||
7471 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
7472 | func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput { | ||
7473 | s.SSEKMSKeyId = &v | ||
7474 | return s | ||
7475 | } | ||
7476 | |||
7477 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
7478 | func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput { | ||
7479 | s.ServerSideEncryption = &v | ||
7480 | return s | ||
7481 | } | ||
7482 | |||
7483 | // SetStorageClass sets the StorageClass field's value. | ||
7484 | func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput { | ||
7485 | s.StorageClass = &v | ||
7486 | return s | ||
7487 | } | ||
7488 | |||
7489 | // SetTagging sets the Tagging field's value. | ||
7490 | func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput { | ||
7491 | s.Tagging = &v | ||
7492 | return s | ||
7493 | } | ||
7494 | |||
7495 | // SetTaggingDirective sets the TaggingDirective field's value. | ||
7496 | func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput { | ||
7497 | s.TaggingDirective = &v | ||
7498 | return s | ||
7499 | } | ||
7500 | |||
7501 | // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. | ||
7502 | func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput { | ||
7503 | s.WebsiteRedirectLocation = &v | ||
7504 | return s | ||
7505 | } | ||
7506 | |||
7507 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectOutput | ||
7508 | type CopyObjectOutput struct { | ||
7509 | _ struct{} `type:"structure" payload:"CopyObjectResult"` | ||
7510 | |||
7511 | CopyObjectResult *CopyObjectResult `type:"structure"` | ||
7512 | |||
7513 | CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"` | ||
7514 | |||
7515 | // If the object expiration is configured, the response includes this header. | ||
7516 | Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` | ||
7517 | |||
7518 | // If present, indicates that the requester was successfully charged for the | ||
7519 | // request. | ||
7520 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
7521 | |||
7522 | // If server-side encryption with a customer-provided encryption key was requested, | ||
7523 | // the response will include this header confirming the encryption algorithm | ||
7524 | // used. | ||
7525 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
7526 | |||
7527 | // If server-side encryption with a customer-provided encryption key was requested, | ||
7528 | // the response will include this header to provide round trip message integrity | ||
7529 | // verification of the customer-provided encryption key. | ||
7530 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
7531 | |||
7532 | // If present, specifies the ID of the AWS Key Management Service (KMS) master | ||
7533 | // encryption key that was used for the object. | ||
7534 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
7535 | |||
7536 | // The Server-side encryption algorithm used when storing this object in S3 | ||
7537 | // (e.g., AES256, aws:kms). | ||
7538 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
7539 | |||
7540 | // Version ID of the newly created copy. | ||
7541 | VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` | ||
7542 | } | ||
7543 | |||
7544 | // String returns the string representation | ||
7545 | func (s CopyObjectOutput) String() string { | ||
7546 | return awsutil.Prettify(s) | ||
7547 | } | ||
7548 | |||
7549 | // GoString returns the string representation | ||
7550 | func (s CopyObjectOutput) GoString() string { | ||
7551 | return s.String() | ||
7552 | } | ||
7553 | |||
7554 | // SetCopyObjectResult sets the CopyObjectResult field's value. | ||
7555 | func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput { | ||
7556 | s.CopyObjectResult = v | ||
7557 | return s | ||
7558 | } | ||
7559 | |||
7560 | // SetCopySourceVersionId sets the CopySourceVersionId field's value. | ||
7561 | func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput { | ||
7562 | s.CopySourceVersionId = &v | ||
7563 | return s | ||
7564 | } | ||
7565 | |||
7566 | // SetExpiration sets the Expiration field's value. | ||
7567 | func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput { | ||
7568 | s.Expiration = &v | ||
7569 | return s | ||
7570 | } | ||
7571 | |||
7572 | // SetRequestCharged sets the RequestCharged field's value. | ||
7573 | func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput { | ||
7574 | s.RequestCharged = &v | ||
7575 | return s | ||
7576 | } | ||
7577 | |||
7578 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
7579 | func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput { | ||
7580 | s.SSECustomerAlgorithm = &v | ||
7581 | return s | ||
7582 | } | ||
7583 | |||
7584 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
7585 | func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput { | ||
7586 | s.SSECustomerKeyMD5 = &v | ||
7587 | return s | ||
7588 | } | ||
7589 | |||
7590 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
7591 | func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput { | ||
7592 | s.SSEKMSKeyId = &v | ||
7593 | return s | ||
7594 | } | ||
7595 | |||
7596 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
7597 | func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput { | ||
7598 | s.ServerSideEncryption = &v | ||
7599 | return s | ||
7600 | } | ||
7601 | |||
7602 | // SetVersionId sets the VersionId field's value. | ||
7603 | func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput { | ||
7604 | s.VersionId = &v | ||
7605 | return s | ||
7606 | } | ||
7607 | |||
7608 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectResult | ||
7609 | type CopyObjectResult struct { | ||
7610 | _ struct{} `type:"structure"` | ||
7611 | |||
7612 | ETag *string `type:"string"` | ||
7613 | |||
7614 | LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
7615 | } | ||
7616 | |||
7617 | // String returns the string representation | ||
7618 | func (s CopyObjectResult) String() string { | ||
7619 | return awsutil.Prettify(s) | ||
7620 | } | ||
7621 | |||
7622 | // GoString returns the string representation | ||
7623 | func (s CopyObjectResult) GoString() string { | ||
7624 | return s.String() | ||
7625 | } | ||
7626 | |||
7627 | // SetETag sets the ETag field's value. | ||
7628 | func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult { | ||
7629 | s.ETag = &v | ||
7630 | return s | ||
7631 | } | ||
7632 | |||
7633 | // SetLastModified sets the LastModified field's value. | ||
7634 | func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult { | ||
7635 | s.LastModified = &v | ||
7636 | return s | ||
7637 | } | ||
7638 | |||
7639 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyPartResult | ||
7640 | type CopyPartResult struct { | ||
7641 | _ struct{} `type:"structure"` | ||
7642 | |||
7643 | // Entity tag of the object. | ||
7644 | ETag *string `type:"string"` | ||
7645 | |||
7646 | // Date and time at which the object was uploaded. | ||
7647 | LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
7648 | } | ||
7649 | |||
7650 | // String returns the string representation | ||
7651 | func (s CopyPartResult) String() string { | ||
7652 | return awsutil.Prettify(s) | ||
7653 | } | ||
7654 | |||
7655 | // GoString returns the string representation | ||
7656 | func (s CopyPartResult) GoString() string { | ||
7657 | return s.String() | ||
7658 | } | ||
7659 | |||
7660 | // SetETag sets the ETag field's value. | ||
7661 | func (s *CopyPartResult) SetETag(v string) *CopyPartResult { | ||
7662 | s.ETag = &v | ||
7663 | return s | ||
7664 | } | ||
7665 | |||
7666 | // SetLastModified sets the LastModified field's value. | ||
7667 | func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult { | ||
7668 | s.LastModified = &v | ||
7669 | return s | ||
7670 | } | ||
7671 | |||
7672 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketConfiguration | ||
7673 | type CreateBucketConfiguration struct { | ||
7674 | _ struct{} `type:"structure"` | ||
7675 | |||
7676 | // Specifies the region where the bucket will be created. If you don't specify | ||
7677 | // a region, the bucket will be created in US Standard. | ||
7678 | LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"` | ||
7679 | } | ||
7680 | |||
7681 | // String returns the string representation | ||
7682 | func (s CreateBucketConfiguration) String() string { | ||
7683 | return awsutil.Prettify(s) | ||
7684 | } | ||
7685 | |||
7686 | // GoString returns the string representation | ||
7687 | func (s CreateBucketConfiguration) GoString() string { | ||
7688 | return s.String() | ||
7689 | } | ||
7690 | |||
7691 | // SetLocationConstraint sets the LocationConstraint field's value. | ||
7692 | func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration { | ||
7693 | s.LocationConstraint = &v | ||
7694 | return s | ||
7695 | } | ||
7696 | |||
7697 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketRequest | ||
7698 | type CreateBucketInput struct { | ||
7699 | _ struct{} `type:"structure" payload:"CreateBucketConfiguration"` | ||
7700 | |||
7701 | // The canned ACL to apply to the bucket. | ||
7702 | ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"` | ||
7703 | |||
7704 | // Bucket is a required field | ||
7705 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
7706 | |||
7707 | CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure"` | ||
7708 | |||
7709 | // Allows grantee the read, write, read ACP, and write ACP permissions on the | ||
7710 | // bucket. | ||
7711 | GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` | ||
7712 | |||
7713 | // Allows grantee to list the objects in the bucket. | ||
7714 | GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` | ||
7715 | |||
7716 | // Allows grantee to read the bucket ACL. | ||
7717 | GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` | ||
7718 | |||
7719 | // Allows grantee to create, overwrite, and delete any object in the bucket. | ||
7720 | GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"` | ||
7721 | |||
7722 | // Allows grantee to write the ACL for the applicable bucket. | ||
7723 | GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` | ||
7724 | } | ||
7725 | |||
7726 | // String returns the string representation | ||
7727 | func (s CreateBucketInput) String() string { | ||
7728 | return awsutil.Prettify(s) | ||
7729 | } | ||
7730 | |||
7731 | // GoString returns the string representation | ||
7732 | func (s CreateBucketInput) GoString() string { | ||
7733 | return s.String() | ||
7734 | } | ||
7735 | |||
7736 | // Validate inspects the fields of the type to determine if they are valid. | ||
7737 | func (s *CreateBucketInput) Validate() error { | ||
7738 | invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"} | ||
7739 | if s.Bucket == nil { | ||
7740 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
7741 | } | ||
7742 | |||
7743 | if invalidParams.Len() > 0 { | ||
7744 | return invalidParams | ||
7745 | } | ||
7746 | return nil | ||
7747 | } | ||
7748 | |||
7749 | // SetACL sets the ACL field's value. | ||
7750 | func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput { | ||
7751 | s.ACL = &v | ||
7752 | return s | ||
7753 | } | ||
7754 | |||
7755 | // SetBucket sets the Bucket field's value. | ||
7756 | func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput { | ||
7757 | s.Bucket = &v | ||
7758 | return s | ||
7759 | } | ||
7760 | |||
7761 | // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value. | ||
7762 | func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput { | ||
7763 | s.CreateBucketConfiguration = v | ||
7764 | return s | ||
7765 | } | ||
7766 | |||
7767 | // SetGrantFullControl sets the GrantFullControl field's value. | ||
7768 | func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput { | ||
7769 | s.GrantFullControl = &v | ||
7770 | return s | ||
7771 | } | ||
7772 | |||
7773 | // SetGrantRead sets the GrantRead field's value. | ||
7774 | func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput { | ||
7775 | s.GrantRead = &v | ||
7776 | return s | ||
7777 | } | ||
7778 | |||
7779 | // SetGrantReadACP sets the GrantReadACP field's value. | ||
7780 | func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput { | ||
7781 | s.GrantReadACP = &v | ||
7782 | return s | ||
7783 | } | ||
7784 | |||
7785 | // SetGrantWrite sets the GrantWrite field's value. | ||
7786 | func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput { | ||
7787 | s.GrantWrite = &v | ||
7788 | return s | ||
7789 | } | ||
7790 | |||
7791 | // SetGrantWriteACP sets the GrantWriteACP field's value. | ||
7792 | func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput { | ||
7793 | s.GrantWriteACP = &v | ||
7794 | return s | ||
7795 | } | ||
7796 | |||
7797 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketOutput | ||
7798 | type CreateBucketOutput struct { | ||
7799 | _ struct{} `type:"structure"` | ||
7800 | |||
7801 | Location *string `location:"header" locationName:"Location" type:"string"` | ||
7802 | } | ||
7803 | |||
7804 | // String returns the string representation | ||
7805 | func (s CreateBucketOutput) String() string { | ||
7806 | return awsutil.Prettify(s) | ||
7807 | } | ||
7808 | |||
7809 | // GoString returns the string representation | ||
7810 | func (s CreateBucketOutput) GoString() string { | ||
7811 | return s.String() | ||
7812 | } | ||
7813 | |||
7814 | // SetLocation sets the Location field's value. | ||
7815 | func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput { | ||
7816 | s.Location = &v | ||
7817 | return s | ||
7818 | } | ||
7819 | |||
7820 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadRequest | ||
7821 | type CreateMultipartUploadInput struct { | ||
7822 | _ struct{} `type:"structure"` | ||
7823 | |||
7824 | // The canned ACL to apply to the object. | ||
7825 | ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"` | ||
7826 | |||
7827 | // Bucket is a required field | ||
7828 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
7829 | |||
7830 | // Specifies caching behavior along the request/reply chain. | ||
7831 | CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` | ||
7832 | |||
7833 | // Specifies presentational information for the object. | ||
7834 | ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` | ||
7835 | |||
7836 | // Specifies what content encodings have been applied to the object and thus | ||
7837 | // what decoding mechanisms must be applied to obtain the media-type referenced | ||
7838 | // by the Content-Type header field. | ||
7839 | ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` | ||
7840 | |||
7841 | // The language the content is in. | ||
7842 | ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` | ||
7843 | |||
7844 | // A standard MIME type describing the format of the object data. | ||
7845 | ContentType *string `location:"header" locationName:"Content-Type" type:"string"` | ||
7846 | |||
7847 | // The date and time at which the object is no longer cacheable. | ||
7848 | Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"` | ||
7849 | |||
7850 | // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. | ||
7851 | GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` | ||
7852 | |||
7853 | // Allows grantee to read the object data and its metadata. | ||
7854 | GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` | ||
7855 | |||
7856 | // Allows grantee to read the object ACL. | ||
7857 | GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` | ||
7858 | |||
7859 | // Allows grantee to write the ACL for the applicable object. | ||
7860 | GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` | ||
7861 | |||
7862 | // Key is a required field | ||
7863 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
7864 | |||
7865 | // A map of metadata to store with the object in S3. | ||
7866 | Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` | ||
7867 | |||
7868 | // Confirms that the requester knows that she or he will be charged for the | ||
7869 | // request. Bucket owners need not specify this parameter in their requests. | ||
7870 | // Documentation on downloading objects from requester pays buckets can be found | ||
7871 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
7872 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
7873 | |||
7874 | // Specifies the algorithm to use to when encrypting the object (e.g., AES256). | ||
7875 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
7876 | |||
7877 | // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting | ||
7878 | // data. This value is used to store the object and then it is discarded; Amazon | ||
7879 | // does not store the encryption key. The key must be appropriate for use with | ||
7880 | // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm | ||
7881 | // header. | ||
7882 | SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` | ||
7883 | |||
7884 | // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | ||
7885 | // Amazon S3 uses this header for a message integrity check to ensure the encryption | ||
7886 | // key was transmitted without error. | ||
7887 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
7888 | |||
7889 | // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT | ||
7890 | // requests for an object protected by AWS KMS will fail if not made via SSL | ||
7891 | // or using SigV4. Documentation on configuring any of the officially supported | ||
7892 | // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version | ||
7893 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
7894 | |||
7895 | // The Server-side encryption algorithm used when storing this object in S3 | ||
7896 | // (e.g., AES256, aws:kms). | ||
7897 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
7898 | |||
7899 | // The type of storage to use for the object. Defaults to 'STANDARD'. | ||
7900 | StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` | ||
7901 | |||
7902 | // If the bucket is configured as a website, redirects requests for this object | ||
7903 | // to another object in the same bucket or to an external URL. Amazon S3 stores | ||
7904 | // the value of this header in the object metadata. | ||
7905 | WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"` | ||
7906 | } | ||
7907 | |||
7908 | // String returns the string representation | ||
7909 | func (s CreateMultipartUploadInput) String() string { | ||
7910 | return awsutil.Prettify(s) | ||
7911 | } | ||
7912 | |||
7913 | // GoString returns the string representation | ||
7914 | func (s CreateMultipartUploadInput) GoString() string { | ||
7915 | return s.String() | ||
7916 | } | ||
7917 | |||
7918 | // Validate inspects the fields of the type to determine if they are valid. | ||
7919 | func (s *CreateMultipartUploadInput) Validate() error { | ||
7920 | invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"} | ||
7921 | if s.Bucket == nil { | ||
7922 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
7923 | } | ||
7924 | if s.Key == nil { | ||
7925 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
7926 | } | ||
7927 | if s.Key != nil && len(*s.Key) < 1 { | ||
7928 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
7929 | } | ||
7930 | |||
7931 | if invalidParams.Len() > 0 { | ||
7932 | return invalidParams | ||
7933 | } | ||
7934 | return nil | ||
7935 | } | ||
7936 | |||
7937 | // SetACL sets the ACL field's value. | ||
7938 | func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput { | ||
7939 | s.ACL = &v | ||
7940 | return s | ||
7941 | } | ||
7942 | |||
7943 | // SetBucket sets the Bucket field's value. | ||
7944 | func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput { | ||
7945 | s.Bucket = &v | ||
7946 | return s | ||
7947 | } | ||
7948 | |||
7949 | // SetCacheControl sets the CacheControl field's value. | ||
7950 | func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput { | ||
7951 | s.CacheControl = &v | ||
7952 | return s | ||
7953 | } | ||
7954 | |||
7955 | // SetContentDisposition sets the ContentDisposition field's value. | ||
7956 | func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput { | ||
7957 | s.ContentDisposition = &v | ||
7958 | return s | ||
7959 | } | ||
7960 | |||
7961 | // SetContentEncoding sets the ContentEncoding field's value. | ||
7962 | func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput { | ||
7963 | s.ContentEncoding = &v | ||
7964 | return s | ||
7965 | } | ||
7966 | |||
7967 | // SetContentLanguage sets the ContentLanguage field's value. | ||
7968 | func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput { | ||
7969 | s.ContentLanguage = &v | ||
7970 | return s | ||
7971 | } | ||
7972 | |||
7973 | // SetContentType sets the ContentType field's value. | ||
7974 | func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput { | ||
7975 | s.ContentType = &v | ||
7976 | return s | ||
7977 | } | ||
7978 | |||
7979 | // SetExpires sets the Expires field's value. | ||
7980 | func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput { | ||
7981 | s.Expires = &v | ||
7982 | return s | ||
7983 | } | ||
7984 | |||
7985 | // SetGrantFullControl sets the GrantFullControl field's value. | ||
7986 | func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput { | ||
7987 | s.GrantFullControl = &v | ||
7988 | return s | ||
7989 | } | ||
7990 | |||
7991 | // SetGrantRead sets the GrantRead field's value. | ||
7992 | func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput { | ||
7993 | s.GrantRead = &v | ||
7994 | return s | ||
7995 | } | ||
7996 | |||
7997 | // SetGrantReadACP sets the GrantReadACP field's value. | ||
7998 | func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput { | ||
7999 | s.GrantReadACP = &v | ||
8000 | return s | ||
8001 | } | ||
8002 | |||
8003 | // SetGrantWriteACP sets the GrantWriteACP field's value. | ||
8004 | func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput { | ||
8005 | s.GrantWriteACP = &v | ||
8006 | return s | ||
8007 | } | ||
8008 | |||
8009 | // SetKey sets the Key field's value. | ||
8010 | func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput { | ||
8011 | s.Key = &v | ||
8012 | return s | ||
8013 | } | ||
8014 | |||
8015 | // SetMetadata sets the Metadata field's value. | ||
8016 | func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput { | ||
8017 | s.Metadata = v | ||
8018 | return s | ||
8019 | } | ||
8020 | |||
8021 | // SetRequestPayer sets the RequestPayer field's value. | ||
8022 | func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput { | ||
8023 | s.RequestPayer = &v | ||
8024 | return s | ||
8025 | } | ||
8026 | |||
8027 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
8028 | func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput { | ||
8029 | s.SSECustomerAlgorithm = &v | ||
8030 | return s | ||
8031 | } | ||
8032 | |||
8033 | // SetSSECustomerKey sets the SSECustomerKey field's value. | ||
8034 | func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput { | ||
8035 | s.SSECustomerKey = &v | ||
8036 | return s | ||
8037 | } | ||
8038 | |||
8039 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
8040 | func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput { | ||
8041 | s.SSECustomerKeyMD5 = &v | ||
8042 | return s | ||
8043 | } | ||
8044 | |||
8045 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
8046 | func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput { | ||
8047 | s.SSEKMSKeyId = &v | ||
8048 | return s | ||
8049 | } | ||
8050 | |||
8051 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
8052 | func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput { | ||
8053 | s.ServerSideEncryption = &v | ||
8054 | return s | ||
8055 | } | ||
8056 | |||
8057 | // SetStorageClass sets the StorageClass field's value. | ||
8058 | func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput { | ||
8059 | s.StorageClass = &v | ||
8060 | return s | ||
8061 | } | ||
8062 | |||
8063 | // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. | ||
8064 | func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput { | ||
8065 | s.WebsiteRedirectLocation = &v | ||
8066 | return s | ||
8067 | } | ||
8068 | |||
8069 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadOutput | ||
8070 | type CreateMultipartUploadOutput struct { | ||
8071 | _ struct{} `type:"structure"` | ||
8072 | |||
8073 | // Date when multipart upload will become eligible for abort operation by lifecycle. | ||
8074 | AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"` | ||
8075 | |||
8076 | // Id of the lifecycle rule that makes a multipart upload eligible for abort | ||
8077 | // operation. | ||
8078 | AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"` | ||
8079 | |||
8080 | // Name of the bucket to which the multipart upload was initiated. | ||
8081 | Bucket *string `locationName:"Bucket" type:"string"` | ||
8082 | |||
8083 | // Object key for which the multipart upload was initiated. | ||
8084 | Key *string `min:"1" type:"string"` | ||
8085 | |||
8086 | // If present, indicates that the requester was successfully charged for the | ||
8087 | // request. | ||
8088 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
8089 | |||
8090 | // If server-side encryption with a customer-provided encryption key was requested, | ||
8091 | // the response will include this header confirming the encryption algorithm | ||
8092 | // used. | ||
8093 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
8094 | |||
8095 | // If server-side encryption with a customer-provided encryption key was requested, | ||
8096 | // the response will include this header to provide round trip message integrity | ||
8097 | // verification of the customer-provided encryption key. | ||
8098 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
8099 | |||
8100 | // If present, specifies the ID of the AWS Key Management Service (KMS) master | ||
8101 | // encryption key that was used for the object. | ||
8102 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
8103 | |||
8104 | // The Server-side encryption algorithm used when storing this object in S3 | ||
8105 | // (e.g., AES256, aws:kms). | ||
8106 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
8107 | |||
8108 | // ID for the initiated multipart upload. | ||
8109 | UploadId *string `type:"string"` | ||
8110 | } | ||
8111 | |||
8112 | // String returns the string representation | ||
8113 | func (s CreateMultipartUploadOutput) String() string { | ||
8114 | return awsutil.Prettify(s) | ||
8115 | } | ||
8116 | |||
8117 | // GoString returns the string representation | ||
8118 | func (s CreateMultipartUploadOutput) GoString() string { | ||
8119 | return s.String() | ||
8120 | } | ||
8121 | |||
8122 | // SetAbortDate sets the AbortDate field's value. | ||
8123 | func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput { | ||
8124 | s.AbortDate = &v | ||
8125 | return s | ||
8126 | } | ||
8127 | |||
8128 | // SetAbortRuleId sets the AbortRuleId field's value. | ||
8129 | func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput { | ||
8130 | s.AbortRuleId = &v | ||
8131 | return s | ||
8132 | } | ||
8133 | |||
8134 | // SetBucket sets the Bucket field's value. | ||
8135 | func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput { | ||
8136 | s.Bucket = &v | ||
8137 | return s | ||
8138 | } | ||
8139 | |||
8140 | // SetKey sets the Key field's value. | ||
8141 | func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput { | ||
8142 | s.Key = &v | ||
8143 | return s | ||
8144 | } | ||
8145 | |||
8146 | // SetRequestCharged sets the RequestCharged field's value. | ||
8147 | func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput { | ||
8148 | s.RequestCharged = &v | ||
8149 | return s | ||
8150 | } | ||
8151 | |||
8152 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
8153 | func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput { | ||
8154 | s.SSECustomerAlgorithm = &v | ||
8155 | return s | ||
8156 | } | ||
8157 | |||
8158 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
8159 | func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput { | ||
8160 | s.SSECustomerKeyMD5 = &v | ||
8161 | return s | ||
8162 | } | ||
8163 | |||
8164 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
8165 | func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput { | ||
8166 | s.SSEKMSKeyId = &v | ||
8167 | return s | ||
8168 | } | ||
8169 | |||
8170 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
8171 | func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput { | ||
8172 | s.ServerSideEncryption = &v | ||
8173 | return s | ||
8174 | } | ||
8175 | |||
8176 | // SetUploadId sets the UploadId field's value. | ||
8177 | func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput { | ||
8178 | s.UploadId = &v | ||
8179 | return s | ||
8180 | } | ||
8181 | |||
8182 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Delete | ||
8183 | type Delete struct { | ||
8184 | _ struct{} `type:"structure"` | ||
8185 | |||
8186 | // Objects is a required field | ||
8187 | Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"` | ||
8188 | |||
8189 | // Element to enable quiet mode for the request. When you add this element, | ||
8190 | // you must set its value to true. | ||
8191 | Quiet *bool `type:"boolean"` | ||
8192 | } | ||
8193 | |||
8194 | // String returns the string representation | ||
8195 | func (s Delete) String() string { | ||
8196 | return awsutil.Prettify(s) | ||
8197 | } | ||
8198 | |||
8199 | // GoString returns the string representation | ||
8200 | func (s Delete) GoString() string { | ||
8201 | return s.String() | ||
8202 | } | ||
8203 | |||
8204 | // Validate inspects the fields of the type to determine if they are valid. | ||
8205 | func (s *Delete) Validate() error { | ||
8206 | invalidParams := request.ErrInvalidParams{Context: "Delete"} | ||
8207 | if s.Objects == nil { | ||
8208 | invalidParams.Add(request.NewErrParamRequired("Objects")) | ||
8209 | } | ||
8210 | if s.Objects != nil { | ||
8211 | for i, v := range s.Objects { | ||
8212 | if v == nil { | ||
8213 | continue | ||
8214 | } | ||
8215 | if err := v.Validate(); err != nil { | ||
8216 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams)) | ||
8217 | } | ||
8218 | } | ||
8219 | } | ||
8220 | |||
8221 | if invalidParams.Len() > 0 { | ||
8222 | return invalidParams | ||
8223 | } | ||
8224 | return nil | ||
8225 | } | ||
8226 | |||
8227 | // SetObjects sets the Objects field's value. | ||
8228 | func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete { | ||
8229 | s.Objects = v | ||
8230 | return s | ||
8231 | } | ||
8232 | |||
8233 | // SetQuiet sets the Quiet field's value. | ||
8234 | func (s *Delete) SetQuiet(v bool) *Delete { | ||
8235 | s.Quiet = &v | ||
8236 | return s | ||
8237 | } | ||
8238 | |||
8239 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationRequest | ||
8240 | type DeleteBucketAnalyticsConfigurationInput struct { | ||
8241 | _ struct{} `type:"structure"` | ||
8242 | |||
8243 | // The name of the bucket from which an analytics configuration is deleted. | ||
8244 | // | ||
8245 | // Bucket is a required field | ||
8246 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8247 | |||
8248 | // The identifier used to represent an analytics configuration. | ||
8249 | // | ||
8250 | // Id is a required field | ||
8251 | Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` | ||
8252 | } | ||
8253 | |||
8254 | // String returns the string representation | ||
8255 | func (s DeleteBucketAnalyticsConfigurationInput) String() string { | ||
8256 | return awsutil.Prettify(s) | ||
8257 | } | ||
8258 | |||
8259 | // GoString returns the string representation | ||
8260 | func (s DeleteBucketAnalyticsConfigurationInput) GoString() string { | ||
8261 | return s.String() | ||
8262 | } | ||
8263 | |||
8264 | // Validate inspects the fields of the type to determine if they are valid. | ||
8265 | func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error { | ||
8266 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"} | ||
8267 | if s.Bucket == nil { | ||
8268 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8269 | } | ||
8270 | if s.Id == nil { | ||
8271 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
8272 | } | ||
8273 | |||
8274 | if invalidParams.Len() > 0 { | ||
8275 | return invalidParams | ||
8276 | } | ||
8277 | return nil | ||
8278 | } | ||
8279 | |||
8280 | // SetBucket sets the Bucket field's value. | ||
8281 | func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput { | ||
8282 | s.Bucket = &v | ||
8283 | return s | ||
8284 | } | ||
8285 | |||
8286 | // SetId sets the Id field's value. | ||
8287 | func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput { | ||
8288 | s.Id = &v | ||
8289 | return s | ||
8290 | } | ||
8291 | |||
8292 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationOutput | ||
8293 | type DeleteBucketAnalyticsConfigurationOutput struct { | ||
8294 | _ struct{} `type:"structure"` | ||
8295 | } | ||
8296 | |||
8297 | // String returns the string representation | ||
8298 | func (s DeleteBucketAnalyticsConfigurationOutput) String() string { | ||
8299 | return awsutil.Prettify(s) | ||
8300 | } | ||
8301 | |||
8302 | // GoString returns the string representation | ||
8303 | func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string { | ||
8304 | return s.String() | ||
8305 | } | ||
8306 | |||
8307 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsRequest | ||
8308 | type DeleteBucketCorsInput struct { | ||
8309 | _ struct{} `type:"structure"` | ||
8310 | |||
8311 | // Bucket is a required field | ||
8312 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8313 | } | ||
8314 | |||
8315 | // String returns the string representation | ||
8316 | func (s DeleteBucketCorsInput) String() string { | ||
8317 | return awsutil.Prettify(s) | ||
8318 | } | ||
8319 | |||
8320 | // GoString returns the string representation | ||
8321 | func (s DeleteBucketCorsInput) GoString() string { | ||
8322 | return s.String() | ||
8323 | } | ||
8324 | |||
8325 | // Validate inspects the fields of the type to determine if they are valid. | ||
8326 | func (s *DeleteBucketCorsInput) Validate() error { | ||
8327 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"} | ||
8328 | if s.Bucket == nil { | ||
8329 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8330 | } | ||
8331 | |||
8332 | if invalidParams.Len() > 0 { | ||
8333 | return invalidParams | ||
8334 | } | ||
8335 | return nil | ||
8336 | } | ||
8337 | |||
8338 | // SetBucket sets the Bucket field's value. | ||
8339 | func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput { | ||
8340 | s.Bucket = &v | ||
8341 | return s | ||
8342 | } | ||
8343 | |||
8344 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsOutput | ||
8345 | type DeleteBucketCorsOutput struct { | ||
8346 | _ struct{} `type:"structure"` | ||
8347 | } | ||
8348 | |||
8349 | // String returns the string representation | ||
8350 | func (s DeleteBucketCorsOutput) String() string { | ||
8351 | return awsutil.Prettify(s) | ||
8352 | } | ||
8353 | |||
8354 | // GoString returns the string representation | ||
8355 | func (s DeleteBucketCorsOutput) GoString() string { | ||
8356 | return s.String() | ||
8357 | } | ||
8358 | |||
8359 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketRequest | ||
8360 | type DeleteBucketInput struct { | ||
8361 | _ struct{} `type:"structure"` | ||
8362 | |||
8363 | // Bucket is a required field | ||
8364 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8365 | } | ||
8366 | |||
8367 | // String returns the string representation | ||
8368 | func (s DeleteBucketInput) String() string { | ||
8369 | return awsutil.Prettify(s) | ||
8370 | } | ||
8371 | |||
8372 | // GoString returns the string representation | ||
8373 | func (s DeleteBucketInput) GoString() string { | ||
8374 | return s.String() | ||
8375 | } | ||
8376 | |||
8377 | // Validate inspects the fields of the type to determine if they are valid. | ||
8378 | func (s *DeleteBucketInput) Validate() error { | ||
8379 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"} | ||
8380 | if s.Bucket == nil { | ||
8381 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8382 | } | ||
8383 | |||
8384 | if invalidParams.Len() > 0 { | ||
8385 | return invalidParams | ||
8386 | } | ||
8387 | return nil | ||
8388 | } | ||
8389 | |||
8390 | // SetBucket sets the Bucket field's value. | ||
8391 | func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput { | ||
8392 | s.Bucket = &v | ||
8393 | return s | ||
8394 | } | ||
8395 | |||
8396 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationRequest | ||
8397 | type DeleteBucketInventoryConfigurationInput struct { | ||
8398 | _ struct{} `type:"structure"` | ||
8399 | |||
8400 | // The name of the bucket containing the inventory configuration to delete. | ||
8401 | // | ||
8402 | // Bucket is a required field | ||
8403 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8404 | |||
8405 | // The ID used to identify the inventory configuration. | ||
8406 | // | ||
8407 | // Id is a required field | ||
8408 | Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` | ||
8409 | } | ||
8410 | |||
8411 | // String returns the string representation | ||
8412 | func (s DeleteBucketInventoryConfigurationInput) String() string { | ||
8413 | return awsutil.Prettify(s) | ||
8414 | } | ||
8415 | |||
8416 | // GoString returns the string representation | ||
8417 | func (s DeleteBucketInventoryConfigurationInput) GoString() string { | ||
8418 | return s.String() | ||
8419 | } | ||
8420 | |||
8421 | // Validate inspects the fields of the type to determine if they are valid. | ||
8422 | func (s *DeleteBucketInventoryConfigurationInput) Validate() error { | ||
8423 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"} | ||
8424 | if s.Bucket == nil { | ||
8425 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8426 | } | ||
8427 | if s.Id == nil { | ||
8428 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
8429 | } | ||
8430 | |||
8431 | if invalidParams.Len() > 0 { | ||
8432 | return invalidParams | ||
8433 | } | ||
8434 | return nil | ||
8435 | } | ||
8436 | |||
8437 | // SetBucket sets the Bucket field's value. | ||
8438 | func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput { | ||
8439 | s.Bucket = &v | ||
8440 | return s | ||
8441 | } | ||
8442 | |||
8443 | // SetId sets the Id field's value. | ||
8444 | func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput { | ||
8445 | s.Id = &v | ||
8446 | return s | ||
8447 | } | ||
8448 | |||
8449 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationOutput | ||
8450 | type DeleteBucketInventoryConfigurationOutput struct { | ||
8451 | _ struct{} `type:"structure"` | ||
8452 | } | ||
8453 | |||
8454 | // String returns the string representation | ||
8455 | func (s DeleteBucketInventoryConfigurationOutput) String() string { | ||
8456 | return awsutil.Prettify(s) | ||
8457 | } | ||
8458 | |||
8459 | // GoString returns the string representation | ||
8460 | func (s DeleteBucketInventoryConfigurationOutput) GoString() string { | ||
8461 | return s.String() | ||
8462 | } | ||
8463 | |||
8464 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleRequest | ||
8465 | type DeleteBucketLifecycleInput struct { | ||
8466 | _ struct{} `type:"structure"` | ||
8467 | |||
8468 | // Bucket is a required field | ||
8469 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8470 | } | ||
8471 | |||
8472 | // String returns the string representation | ||
8473 | func (s DeleteBucketLifecycleInput) String() string { | ||
8474 | return awsutil.Prettify(s) | ||
8475 | } | ||
8476 | |||
8477 | // GoString returns the string representation | ||
8478 | func (s DeleteBucketLifecycleInput) GoString() string { | ||
8479 | return s.String() | ||
8480 | } | ||
8481 | |||
8482 | // Validate inspects the fields of the type to determine if they are valid. | ||
8483 | func (s *DeleteBucketLifecycleInput) Validate() error { | ||
8484 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"} | ||
8485 | if s.Bucket == nil { | ||
8486 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8487 | } | ||
8488 | |||
8489 | if invalidParams.Len() > 0 { | ||
8490 | return invalidParams | ||
8491 | } | ||
8492 | return nil | ||
8493 | } | ||
8494 | |||
8495 | // SetBucket sets the Bucket field's value. | ||
8496 | func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput { | ||
8497 | s.Bucket = &v | ||
8498 | return s | ||
8499 | } | ||
8500 | |||
8501 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleOutput | ||
8502 | type DeleteBucketLifecycleOutput struct { | ||
8503 | _ struct{} `type:"structure"` | ||
8504 | } | ||
8505 | |||
8506 | // String returns the string representation | ||
8507 | func (s DeleteBucketLifecycleOutput) String() string { | ||
8508 | return awsutil.Prettify(s) | ||
8509 | } | ||
8510 | |||
8511 | // GoString returns the string representation | ||
8512 | func (s DeleteBucketLifecycleOutput) GoString() string { | ||
8513 | return s.String() | ||
8514 | } | ||
8515 | |||
8516 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationRequest | ||
8517 | type DeleteBucketMetricsConfigurationInput struct { | ||
8518 | _ struct{} `type:"structure"` | ||
8519 | |||
8520 | // The name of the bucket containing the metrics configuration to delete. | ||
8521 | // | ||
8522 | // Bucket is a required field | ||
8523 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8524 | |||
8525 | // The ID used to identify the metrics configuration. | ||
8526 | // | ||
8527 | // Id is a required field | ||
8528 | Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` | ||
8529 | } | ||
8530 | |||
8531 | // String returns the string representation | ||
8532 | func (s DeleteBucketMetricsConfigurationInput) String() string { | ||
8533 | return awsutil.Prettify(s) | ||
8534 | } | ||
8535 | |||
8536 | // GoString returns the string representation | ||
8537 | func (s DeleteBucketMetricsConfigurationInput) GoString() string { | ||
8538 | return s.String() | ||
8539 | } | ||
8540 | |||
8541 | // Validate inspects the fields of the type to determine if they are valid. | ||
8542 | func (s *DeleteBucketMetricsConfigurationInput) Validate() error { | ||
8543 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"} | ||
8544 | if s.Bucket == nil { | ||
8545 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8546 | } | ||
8547 | if s.Id == nil { | ||
8548 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
8549 | } | ||
8550 | |||
8551 | if invalidParams.Len() > 0 { | ||
8552 | return invalidParams | ||
8553 | } | ||
8554 | return nil | ||
8555 | } | ||
8556 | |||
8557 | // SetBucket sets the Bucket field's value. | ||
8558 | func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput { | ||
8559 | s.Bucket = &v | ||
8560 | return s | ||
8561 | } | ||
8562 | |||
8563 | // SetId sets the Id field's value. | ||
8564 | func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput { | ||
8565 | s.Id = &v | ||
8566 | return s | ||
8567 | } | ||
8568 | |||
8569 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationOutput | ||
8570 | type DeleteBucketMetricsConfigurationOutput struct { | ||
8571 | _ struct{} `type:"structure"` | ||
8572 | } | ||
8573 | |||
8574 | // String returns the string representation | ||
8575 | func (s DeleteBucketMetricsConfigurationOutput) String() string { | ||
8576 | return awsutil.Prettify(s) | ||
8577 | } | ||
8578 | |||
8579 | // GoString returns the string representation | ||
8580 | func (s DeleteBucketMetricsConfigurationOutput) GoString() string { | ||
8581 | return s.String() | ||
8582 | } | ||
8583 | |||
8584 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOutput | ||
8585 | type DeleteBucketOutput struct { | ||
8586 | _ struct{} `type:"structure"` | ||
8587 | } | ||
8588 | |||
8589 | // String returns the string representation | ||
8590 | func (s DeleteBucketOutput) String() string { | ||
8591 | return awsutil.Prettify(s) | ||
8592 | } | ||
8593 | |||
8594 | // GoString returns the string representation | ||
8595 | func (s DeleteBucketOutput) GoString() string { | ||
8596 | return s.String() | ||
8597 | } | ||
8598 | |||
8599 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyRequest | ||
8600 | type DeleteBucketPolicyInput struct { | ||
8601 | _ struct{} `type:"structure"` | ||
8602 | |||
8603 | // Bucket is a required field | ||
8604 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8605 | } | ||
8606 | |||
8607 | // String returns the string representation | ||
8608 | func (s DeleteBucketPolicyInput) String() string { | ||
8609 | return awsutil.Prettify(s) | ||
8610 | } | ||
8611 | |||
8612 | // GoString returns the string representation | ||
8613 | func (s DeleteBucketPolicyInput) GoString() string { | ||
8614 | return s.String() | ||
8615 | } | ||
8616 | |||
8617 | // Validate inspects the fields of the type to determine if they are valid. | ||
8618 | func (s *DeleteBucketPolicyInput) Validate() error { | ||
8619 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"} | ||
8620 | if s.Bucket == nil { | ||
8621 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8622 | } | ||
8623 | |||
8624 | if invalidParams.Len() > 0 { | ||
8625 | return invalidParams | ||
8626 | } | ||
8627 | return nil | ||
8628 | } | ||
8629 | |||
8630 | // SetBucket sets the Bucket field's value. | ||
8631 | func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput { | ||
8632 | s.Bucket = &v | ||
8633 | return s | ||
8634 | } | ||
8635 | |||
8636 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyOutput | ||
8637 | type DeleteBucketPolicyOutput struct { | ||
8638 | _ struct{} `type:"structure"` | ||
8639 | } | ||
8640 | |||
8641 | // String returns the string representation | ||
8642 | func (s DeleteBucketPolicyOutput) String() string { | ||
8643 | return awsutil.Prettify(s) | ||
8644 | } | ||
8645 | |||
8646 | // GoString returns the string representation | ||
8647 | func (s DeleteBucketPolicyOutput) GoString() string { | ||
8648 | return s.String() | ||
8649 | } | ||
8650 | |||
8651 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationRequest | ||
8652 | type DeleteBucketReplicationInput struct { | ||
8653 | _ struct{} `type:"structure"` | ||
8654 | |||
8655 | // Bucket is a required field | ||
8656 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8657 | } | ||
8658 | |||
8659 | // String returns the string representation | ||
8660 | func (s DeleteBucketReplicationInput) String() string { | ||
8661 | return awsutil.Prettify(s) | ||
8662 | } | ||
8663 | |||
8664 | // GoString returns the string representation | ||
8665 | func (s DeleteBucketReplicationInput) GoString() string { | ||
8666 | return s.String() | ||
8667 | } | ||
8668 | |||
8669 | // Validate inspects the fields of the type to determine if they are valid. | ||
8670 | func (s *DeleteBucketReplicationInput) Validate() error { | ||
8671 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"} | ||
8672 | if s.Bucket == nil { | ||
8673 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8674 | } | ||
8675 | |||
8676 | if invalidParams.Len() > 0 { | ||
8677 | return invalidParams | ||
8678 | } | ||
8679 | return nil | ||
8680 | } | ||
8681 | |||
8682 | // SetBucket sets the Bucket field's value. | ||
8683 | func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput { | ||
8684 | s.Bucket = &v | ||
8685 | return s | ||
8686 | } | ||
8687 | |||
8688 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationOutput | ||
8689 | type DeleteBucketReplicationOutput struct { | ||
8690 | _ struct{} `type:"structure"` | ||
8691 | } | ||
8692 | |||
8693 | // String returns the string representation | ||
8694 | func (s DeleteBucketReplicationOutput) String() string { | ||
8695 | return awsutil.Prettify(s) | ||
8696 | } | ||
8697 | |||
8698 | // GoString returns the string representation | ||
8699 | func (s DeleteBucketReplicationOutput) GoString() string { | ||
8700 | return s.String() | ||
8701 | } | ||
8702 | |||
8703 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingRequest | ||
8704 | type DeleteBucketTaggingInput struct { | ||
8705 | _ struct{} `type:"structure"` | ||
8706 | |||
8707 | // Bucket is a required field | ||
8708 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8709 | } | ||
8710 | |||
8711 | // String returns the string representation | ||
8712 | func (s DeleteBucketTaggingInput) String() string { | ||
8713 | return awsutil.Prettify(s) | ||
8714 | } | ||
8715 | |||
8716 | // GoString returns the string representation | ||
8717 | func (s DeleteBucketTaggingInput) GoString() string { | ||
8718 | return s.String() | ||
8719 | } | ||
8720 | |||
8721 | // Validate inspects the fields of the type to determine if they are valid. | ||
8722 | func (s *DeleteBucketTaggingInput) Validate() error { | ||
8723 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"} | ||
8724 | if s.Bucket == nil { | ||
8725 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8726 | } | ||
8727 | |||
8728 | if invalidParams.Len() > 0 { | ||
8729 | return invalidParams | ||
8730 | } | ||
8731 | return nil | ||
8732 | } | ||
8733 | |||
8734 | // SetBucket sets the Bucket field's value. | ||
8735 | func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput { | ||
8736 | s.Bucket = &v | ||
8737 | return s | ||
8738 | } | ||
8739 | |||
8740 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingOutput | ||
8741 | type DeleteBucketTaggingOutput struct { | ||
8742 | _ struct{} `type:"structure"` | ||
8743 | } | ||
8744 | |||
8745 | // String returns the string representation | ||
8746 | func (s DeleteBucketTaggingOutput) String() string { | ||
8747 | return awsutil.Prettify(s) | ||
8748 | } | ||
8749 | |||
8750 | // GoString returns the string representation | ||
8751 | func (s DeleteBucketTaggingOutput) GoString() string { | ||
8752 | return s.String() | ||
8753 | } | ||
8754 | |||
8755 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteRequest | ||
8756 | type DeleteBucketWebsiteInput struct { | ||
8757 | _ struct{} `type:"structure"` | ||
8758 | |||
8759 | // Bucket is a required field | ||
8760 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8761 | } | ||
8762 | |||
8763 | // String returns the string representation | ||
8764 | func (s DeleteBucketWebsiteInput) String() string { | ||
8765 | return awsutil.Prettify(s) | ||
8766 | } | ||
8767 | |||
8768 | // GoString returns the string representation | ||
8769 | func (s DeleteBucketWebsiteInput) GoString() string { | ||
8770 | return s.String() | ||
8771 | } | ||
8772 | |||
8773 | // Validate inspects the fields of the type to determine if they are valid. | ||
8774 | func (s *DeleteBucketWebsiteInput) Validate() error { | ||
8775 | invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"} | ||
8776 | if s.Bucket == nil { | ||
8777 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8778 | } | ||
8779 | |||
8780 | if invalidParams.Len() > 0 { | ||
8781 | return invalidParams | ||
8782 | } | ||
8783 | return nil | ||
8784 | } | ||
8785 | |||
8786 | // SetBucket sets the Bucket field's value. | ||
8787 | func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput { | ||
8788 | s.Bucket = &v | ||
8789 | return s | ||
8790 | } | ||
8791 | |||
8792 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteOutput | ||
8793 | type DeleteBucketWebsiteOutput struct { | ||
8794 | _ struct{} `type:"structure"` | ||
8795 | } | ||
8796 | |||
8797 | // String returns the string representation | ||
8798 | func (s DeleteBucketWebsiteOutput) String() string { | ||
8799 | return awsutil.Prettify(s) | ||
8800 | } | ||
8801 | |||
8802 | // GoString returns the string representation | ||
8803 | func (s DeleteBucketWebsiteOutput) GoString() string { | ||
8804 | return s.String() | ||
8805 | } | ||
8806 | |||
8807 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteMarkerEntry | ||
8808 | type DeleteMarkerEntry struct { | ||
8809 | _ struct{} `type:"structure"` | ||
8810 | |||
8811 | // Specifies whether the object is (true) or is not (false) the latest version | ||
8812 | // of an object. | ||
8813 | IsLatest *bool `type:"boolean"` | ||
8814 | |||
8815 | // The object key. | ||
8816 | Key *string `min:"1" type:"string"` | ||
8817 | |||
8818 | // Date and time the object was last modified. | ||
8819 | LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
8820 | |||
8821 | Owner *Owner `type:"structure"` | ||
8822 | |||
8823 | // Version ID of an object. | ||
8824 | VersionId *string `type:"string"` | ||
8825 | } | ||
8826 | |||
8827 | // String returns the string representation | ||
8828 | func (s DeleteMarkerEntry) String() string { | ||
8829 | return awsutil.Prettify(s) | ||
8830 | } | ||
8831 | |||
8832 | // GoString returns the string representation | ||
8833 | func (s DeleteMarkerEntry) GoString() string { | ||
8834 | return s.String() | ||
8835 | } | ||
8836 | |||
8837 | // SetIsLatest sets the IsLatest field's value. | ||
8838 | func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry { | ||
8839 | s.IsLatest = &v | ||
8840 | return s | ||
8841 | } | ||
8842 | |||
8843 | // SetKey sets the Key field's value. | ||
8844 | func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry { | ||
8845 | s.Key = &v | ||
8846 | return s | ||
8847 | } | ||
8848 | |||
8849 | // SetLastModified sets the LastModified field's value. | ||
8850 | func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry { | ||
8851 | s.LastModified = &v | ||
8852 | return s | ||
8853 | } | ||
8854 | |||
8855 | // SetOwner sets the Owner field's value. | ||
8856 | func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry { | ||
8857 | s.Owner = v | ||
8858 | return s | ||
8859 | } | ||
8860 | |||
8861 | // SetVersionId sets the VersionId field's value. | ||
8862 | func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry { | ||
8863 | s.VersionId = &v | ||
8864 | return s | ||
8865 | } | ||
8866 | |||
8867 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectRequest | ||
8868 | type DeleteObjectInput struct { | ||
8869 | _ struct{} `type:"structure"` | ||
8870 | |||
8871 | // Bucket is a required field | ||
8872 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
8873 | |||
8874 | // Key is a required field | ||
8875 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
8876 | |||
8877 | // The concatenation of the authentication device's serial number, a space, | ||
8878 | // and the value that is displayed on your authentication device. | ||
8879 | MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"` | ||
8880 | |||
8881 | // Confirms that the requester knows that she or he will be charged for the | ||
8882 | // request. Bucket owners need not specify this parameter in their requests. | ||
8883 | // Documentation on downloading objects from requester pays buckets can be found | ||
8884 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
8885 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
8886 | |||
8887 | // VersionId used to reference a specific version of the object. | ||
8888 | VersionId *string `location:"querystring" locationName:"versionId" type:"string"` | ||
8889 | } | ||
8890 | |||
8891 | // String returns the string representation | ||
8892 | func (s DeleteObjectInput) String() string { | ||
8893 | return awsutil.Prettify(s) | ||
8894 | } | ||
8895 | |||
8896 | // GoString returns the string representation | ||
8897 | func (s DeleteObjectInput) GoString() string { | ||
8898 | return s.String() | ||
8899 | } | ||
8900 | |||
8901 | // Validate inspects the fields of the type to determine if they are valid. | ||
8902 | func (s *DeleteObjectInput) Validate() error { | ||
8903 | invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"} | ||
8904 | if s.Bucket == nil { | ||
8905 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
8906 | } | ||
8907 | if s.Key == nil { | ||
8908 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
8909 | } | ||
8910 | if s.Key != nil && len(*s.Key) < 1 { | ||
8911 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
8912 | } | ||
8913 | |||
8914 | if invalidParams.Len() > 0 { | ||
8915 | return invalidParams | ||
8916 | } | ||
8917 | return nil | ||
8918 | } | ||
8919 | |||
8920 | // SetBucket sets the Bucket field's value. | ||
8921 | func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput { | ||
8922 | s.Bucket = &v | ||
8923 | return s | ||
8924 | } | ||
8925 | |||
8926 | // SetKey sets the Key field's value. | ||
8927 | func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput { | ||
8928 | s.Key = &v | ||
8929 | return s | ||
8930 | } | ||
8931 | |||
8932 | // SetMFA sets the MFA field's value. | ||
8933 | func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput { | ||
8934 | s.MFA = &v | ||
8935 | return s | ||
8936 | } | ||
8937 | |||
8938 | // SetRequestPayer sets the RequestPayer field's value. | ||
8939 | func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput { | ||
8940 | s.RequestPayer = &v | ||
8941 | return s | ||
8942 | } | ||
8943 | |||
8944 | // SetVersionId sets the VersionId field's value. | ||
8945 | func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput { | ||
8946 | s.VersionId = &v | ||
8947 | return s | ||
8948 | } | ||
8949 | |||
8950 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectOutput | ||
8951 | type DeleteObjectOutput struct { | ||
8952 | _ struct{} `type:"structure"` | ||
8953 | |||
8954 | // Specifies whether the versioned object that was permanently deleted was (true) | ||
8955 | // or was not (false) a delete marker. | ||
8956 | DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"` | ||
8957 | |||
8958 | // If present, indicates that the requester was successfully charged for the | ||
8959 | // request. | ||
8960 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
8961 | |||
8962 | // Returns the version ID of the delete marker created as a result of the DELETE | ||
8963 | // operation. | ||
8964 | VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` | ||
8965 | } | ||
8966 | |||
8967 | // String returns the string representation | ||
8968 | func (s DeleteObjectOutput) String() string { | ||
8969 | return awsutil.Prettify(s) | ||
8970 | } | ||
8971 | |||
8972 | // GoString returns the string representation | ||
8973 | func (s DeleteObjectOutput) GoString() string { | ||
8974 | return s.String() | ||
8975 | } | ||
8976 | |||
8977 | // SetDeleteMarker sets the DeleteMarker field's value. | ||
8978 | func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput { | ||
8979 | s.DeleteMarker = &v | ||
8980 | return s | ||
8981 | } | ||
8982 | |||
8983 | // SetRequestCharged sets the RequestCharged field's value. | ||
8984 | func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput { | ||
8985 | s.RequestCharged = &v | ||
8986 | return s | ||
8987 | } | ||
8988 | |||
8989 | // SetVersionId sets the VersionId field's value. | ||
8990 | func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput { | ||
8991 | s.VersionId = &v | ||
8992 | return s | ||
8993 | } | ||
8994 | |||
8995 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingRequest | ||
8996 | type DeleteObjectTaggingInput struct { | ||
8997 | _ struct{} `type:"structure"` | ||
8998 | |||
8999 | // Bucket is a required field | ||
9000 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9001 | |||
9002 | // Key is a required field | ||
9003 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
9004 | |||
9005 | // The versionId of the object that the tag-set will be removed from. | ||
9006 | VersionId *string `location:"querystring" locationName:"versionId" type:"string"` | ||
9007 | } | ||
9008 | |||
9009 | // String returns the string representation | ||
9010 | func (s DeleteObjectTaggingInput) String() string { | ||
9011 | return awsutil.Prettify(s) | ||
9012 | } | ||
9013 | |||
9014 | // GoString returns the string representation | ||
9015 | func (s DeleteObjectTaggingInput) GoString() string { | ||
9016 | return s.String() | ||
9017 | } | ||
9018 | |||
9019 | // Validate inspects the fields of the type to determine if they are valid. | ||
9020 | func (s *DeleteObjectTaggingInput) Validate() error { | ||
9021 | invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"} | ||
9022 | if s.Bucket == nil { | ||
9023 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9024 | } | ||
9025 | if s.Key == nil { | ||
9026 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
9027 | } | ||
9028 | if s.Key != nil && len(*s.Key) < 1 { | ||
9029 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
9030 | } | ||
9031 | |||
9032 | if invalidParams.Len() > 0 { | ||
9033 | return invalidParams | ||
9034 | } | ||
9035 | return nil | ||
9036 | } | ||
9037 | |||
9038 | // SetBucket sets the Bucket field's value. | ||
9039 | func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput { | ||
9040 | s.Bucket = &v | ||
9041 | return s | ||
9042 | } | ||
9043 | |||
9044 | // SetKey sets the Key field's value. | ||
9045 | func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput { | ||
9046 | s.Key = &v | ||
9047 | return s | ||
9048 | } | ||
9049 | |||
9050 | // SetVersionId sets the VersionId field's value. | ||
9051 | func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput { | ||
9052 | s.VersionId = &v | ||
9053 | return s | ||
9054 | } | ||
9055 | |||
9056 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingOutput | ||
9057 | type DeleteObjectTaggingOutput struct { | ||
9058 | _ struct{} `type:"structure"` | ||
9059 | |||
9060 | // The versionId of the object the tag-set was removed from. | ||
9061 | VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` | ||
9062 | } | ||
9063 | |||
9064 | // String returns the string representation | ||
9065 | func (s DeleteObjectTaggingOutput) String() string { | ||
9066 | return awsutil.Prettify(s) | ||
9067 | } | ||
9068 | |||
9069 | // GoString returns the string representation | ||
9070 | func (s DeleteObjectTaggingOutput) GoString() string { | ||
9071 | return s.String() | ||
9072 | } | ||
9073 | |||
9074 | // SetVersionId sets the VersionId field's value. | ||
9075 | func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput { | ||
9076 | s.VersionId = &v | ||
9077 | return s | ||
9078 | } | ||
9079 | |||
9080 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsRequest | ||
9081 | type DeleteObjectsInput struct { | ||
9082 | _ struct{} `type:"structure" payload:"Delete"` | ||
9083 | |||
9084 | // Bucket is a required field | ||
9085 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9086 | |||
9087 | // Delete is a required field | ||
9088 | Delete *Delete `locationName:"Delete" type:"structure" required:"true"` | ||
9089 | |||
9090 | // The concatenation of the authentication device's serial number, a space, | ||
9091 | // and the value that is displayed on your authentication device. | ||
9092 | MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"` | ||
9093 | |||
9094 | // Confirms that the requester knows that she or he will be charged for the | ||
9095 | // request. Bucket owners need not specify this parameter in their requests. | ||
9096 | // Documentation on downloading objects from requester pays buckets can be found | ||
9097 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
9098 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
9099 | } | ||
9100 | |||
9101 | // String returns the string representation | ||
9102 | func (s DeleteObjectsInput) String() string { | ||
9103 | return awsutil.Prettify(s) | ||
9104 | } | ||
9105 | |||
9106 | // GoString returns the string representation | ||
9107 | func (s DeleteObjectsInput) GoString() string { | ||
9108 | return s.String() | ||
9109 | } | ||
9110 | |||
9111 | // Validate inspects the fields of the type to determine if they are valid. | ||
9112 | func (s *DeleteObjectsInput) Validate() error { | ||
9113 | invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"} | ||
9114 | if s.Bucket == nil { | ||
9115 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9116 | } | ||
9117 | if s.Delete == nil { | ||
9118 | invalidParams.Add(request.NewErrParamRequired("Delete")) | ||
9119 | } | ||
9120 | if s.Delete != nil { | ||
9121 | if err := s.Delete.Validate(); err != nil { | ||
9122 | invalidParams.AddNested("Delete", err.(request.ErrInvalidParams)) | ||
9123 | } | ||
9124 | } | ||
9125 | |||
9126 | if invalidParams.Len() > 0 { | ||
9127 | return invalidParams | ||
9128 | } | ||
9129 | return nil | ||
9130 | } | ||
9131 | |||
9132 | // SetBucket sets the Bucket field's value. | ||
9133 | func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput { | ||
9134 | s.Bucket = &v | ||
9135 | return s | ||
9136 | } | ||
9137 | |||
9138 | // SetDelete sets the Delete field's value. | ||
9139 | func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput { | ||
9140 | s.Delete = v | ||
9141 | return s | ||
9142 | } | ||
9143 | |||
9144 | // SetMFA sets the MFA field's value. | ||
9145 | func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput { | ||
9146 | s.MFA = &v | ||
9147 | return s | ||
9148 | } | ||
9149 | |||
9150 | // SetRequestPayer sets the RequestPayer field's value. | ||
9151 | func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput { | ||
9152 | s.RequestPayer = &v | ||
9153 | return s | ||
9154 | } | ||
9155 | |||
9156 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsOutput | ||
9157 | type DeleteObjectsOutput struct { | ||
9158 | _ struct{} `type:"structure"` | ||
9159 | |||
9160 | Deleted []*DeletedObject `type:"list" flattened:"true"` | ||
9161 | |||
9162 | Errors []*Error `locationName:"Error" type:"list" flattened:"true"` | ||
9163 | |||
9164 | // If present, indicates that the requester was successfully charged for the | ||
9165 | // request. | ||
9166 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
9167 | } | ||
9168 | |||
9169 | // String returns the string representation | ||
9170 | func (s DeleteObjectsOutput) String() string { | ||
9171 | return awsutil.Prettify(s) | ||
9172 | } | ||
9173 | |||
9174 | // GoString returns the string representation | ||
9175 | func (s DeleteObjectsOutput) GoString() string { | ||
9176 | return s.String() | ||
9177 | } | ||
9178 | |||
9179 | // SetDeleted sets the Deleted field's value. | ||
9180 | func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput { | ||
9181 | s.Deleted = v | ||
9182 | return s | ||
9183 | } | ||
9184 | |||
9185 | // SetErrors sets the Errors field's value. | ||
9186 | func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput { | ||
9187 | s.Errors = v | ||
9188 | return s | ||
9189 | } | ||
9190 | |||
9191 | // SetRequestCharged sets the RequestCharged field's value. | ||
9192 | func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput { | ||
9193 | s.RequestCharged = &v | ||
9194 | return s | ||
9195 | } | ||
9196 | |||
9197 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletedObject | ||
9198 | type DeletedObject struct { | ||
9199 | _ struct{} `type:"structure"` | ||
9200 | |||
9201 | DeleteMarker *bool `type:"boolean"` | ||
9202 | |||
9203 | DeleteMarkerVersionId *string `type:"string"` | ||
9204 | |||
9205 | Key *string `min:"1" type:"string"` | ||
9206 | |||
9207 | VersionId *string `type:"string"` | ||
9208 | } | ||
9209 | |||
9210 | // String returns the string representation | ||
9211 | func (s DeletedObject) String() string { | ||
9212 | return awsutil.Prettify(s) | ||
9213 | } | ||
9214 | |||
9215 | // GoString returns the string representation | ||
9216 | func (s DeletedObject) GoString() string { | ||
9217 | return s.String() | ||
9218 | } | ||
9219 | |||
9220 | // SetDeleteMarker sets the DeleteMarker field's value. | ||
9221 | func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject { | ||
9222 | s.DeleteMarker = &v | ||
9223 | return s | ||
9224 | } | ||
9225 | |||
9226 | // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value. | ||
9227 | func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject { | ||
9228 | s.DeleteMarkerVersionId = &v | ||
9229 | return s | ||
9230 | } | ||
9231 | |||
9232 | // SetKey sets the Key field's value. | ||
9233 | func (s *DeletedObject) SetKey(v string) *DeletedObject { | ||
9234 | s.Key = &v | ||
9235 | return s | ||
9236 | } | ||
9237 | |||
9238 | // SetVersionId sets the VersionId field's value. | ||
9239 | func (s *DeletedObject) SetVersionId(v string) *DeletedObject { | ||
9240 | s.VersionId = &v | ||
9241 | return s | ||
9242 | } | ||
9243 | |||
9244 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Destination | ||
9245 | type Destination struct { | ||
9246 | _ struct{} `type:"structure"` | ||
9247 | |||
9248 | // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store | ||
9249 | // replicas of the object identified by the rule. | ||
9250 | // | ||
9251 | // Bucket is a required field | ||
9252 | Bucket *string `type:"string" required:"true"` | ||
9253 | |||
9254 | // The class of storage used to store the object. | ||
9255 | StorageClass *string `type:"string" enum:"StorageClass"` | ||
9256 | } | ||
9257 | |||
9258 | // String returns the string representation | ||
9259 | func (s Destination) String() string { | ||
9260 | return awsutil.Prettify(s) | ||
9261 | } | ||
9262 | |||
9263 | // GoString returns the string representation | ||
9264 | func (s Destination) GoString() string { | ||
9265 | return s.String() | ||
9266 | } | ||
9267 | |||
9268 | // Validate inspects the fields of the type to determine if they are valid. | ||
9269 | func (s *Destination) Validate() error { | ||
9270 | invalidParams := request.ErrInvalidParams{Context: "Destination"} | ||
9271 | if s.Bucket == nil { | ||
9272 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9273 | } | ||
9274 | |||
9275 | if invalidParams.Len() > 0 { | ||
9276 | return invalidParams | ||
9277 | } | ||
9278 | return nil | ||
9279 | } | ||
9280 | |||
9281 | // SetBucket sets the Bucket field's value. | ||
9282 | func (s *Destination) SetBucket(v string) *Destination { | ||
9283 | s.Bucket = &v | ||
9284 | return s | ||
9285 | } | ||
9286 | |||
9287 | // SetStorageClass sets the StorageClass field's value. | ||
9288 | func (s *Destination) SetStorageClass(v string) *Destination { | ||
9289 | s.StorageClass = &v | ||
9290 | return s | ||
9291 | } | ||
9292 | |||
9293 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Error | ||
9294 | type Error struct { | ||
9295 | _ struct{} `type:"structure"` | ||
9296 | |||
9297 | Code *string `type:"string"` | ||
9298 | |||
9299 | Key *string `min:"1" type:"string"` | ||
9300 | |||
9301 | Message *string `type:"string"` | ||
9302 | |||
9303 | VersionId *string `type:"string"` | ||
9304 | } | ||
9305 | |||
9306 | // String returns the string representation | ||
9307 | func (s Error) String() string { | ||
9308 | return awsutil.Prettify(s) | ||
9309 | } | ||
9310 | |||
9311 | // GoString returns the string representation | ||
9312 | func (s Error) GoString() string { | ||
9313 | return s.String() | ||
9314 | } | ||
9315 | |||
9316 | // SetCode sets the Code field's value. | ||
9317 | func (s *Error) SetCode(v string) *Error { | ||
9318 | s.Code = &v | ||
9319 | return s | ||
9320 | } | ||
9321 | |||
9322 | // SetKey sets the Key field's value. | ||
9323 | func (s *Error) SetKey(v string) *Error { | ||
9324 | s.Key = &v | ||
9325 | return s | ||
9326 | } | ||
9327 | |||
9328 | // SetMessage sets the Message field's value. | ||
9329 | func (s *Error) SetMessage(v string) *Error { | ||
9330 | s.Message = &v | ||
9331 | return s | ||
9332 | } | ||
9333 | |||
9334 | // SetVersionId sets the VersionId field's value. | ||
9335 | func (s *Error) SetVersionId(v string) *Error { | ||
9336 | s.VersionId = &v | ||
9337 | return s | ||
9338 | } | ||
9339 | |||
9340 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ErrorDocument | ||
9341 | type ErrorDocument struct { | ||
9342 | _ struct{} `type:"structure"` | ||
9343 | |||
9344 | // The object key name to use when a 4XX class error occurs. | ||
9345 | // | ||
9346 | // Key is a required field | ||
9347 | Key *string `min:"1" type:"string" required:"true"` | ||
9348 | } | ||
9349 | |||
9350 | // String returns the string representation | ||
9351 | func (s ErrorDocument) String() string { | ||
9352 | return awsutil.Prettify(s) | ||
9353 | } | ||
9354 | |||
9355 | // GoString returns the string representation | ||
9356 | func (s ErrorDocument) GoString() string { | ||
9357 | return s.String() | ||
9358 | } | ||
9359 | |||
9360 | // Validate inspects the fields of the type to determine if they are valid. | ||
9361 | func (s *ErrorDocument) Validate() error { | ||
9362 | invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"} | ||
9363 | if s.Key == nil { | ||
9364 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
9365 | } | ||
9366 | if s.Key != nil && len(*s.Key) < 1 { | ||
9367 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
9368 | } | ||
9369 | |||
9370 | if invalidParams.Len() > 0 { | ||
9371 | return invalidParams | ||
9372 | } | ||
9373 | return nil | ||
9374 | } | ||
9375 | |||
9376 | // SetKey sets the Key field's value. | ||
9377 | func (s *ErrorDocument) SetKey(v string) *ErrorDocument { | ||
9378 | s.Key = &v | ||
9379 | return s | ||
9380 | } | ||
9381 | |||
9382 | // Container for key value pair that defines the criteria for the filter rule. | ||
9383 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/FilterRule | ||
9384 | type FilterRule struct { | ||
9385 | _ struct{} `type:"structure"` | ||
9386 | |||
9387 | // Object key name prefix or suffix identifying one or more objects to which | ||
9388 | // the filtering rule applies. Maximum prefix length can be up to 1,024 characters. | ||
9389 | // Overlapping prefixes and suffixes are not supported. For more information, | ||
9390 | // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) | ||
9391 | Name *string `type:"string" enum:"FilterRuleName"` | ||
9392 | |||
9393 | Value *string `type:"string"` | ||
9394 | } | ||
9395 | |||
9396 | // String returns the string representation | ||
9397 | func (s FilterRule) String() string { | ||
9398 | return awsutil.Prettify(s) | ||
9399 | } | ||
9400 | |||
9401 | // GoString returns the string representation | ||
9402 | func (s FilterRule) GoString() string { | ||
9403 | return s.String() | ||
9404 | } | ||
9405 | |||
9406 | // SetName sets the Name field's value. | ||
9407 | func (s *FilterRule) SetName(v string) *FilterRule { | ||
9408 | s.Name = &v | ||
9409 | return s | ||
9410 | } | ||
9411 | |||
9412 | // SetValue sets the Value field's value. | ||
9413 | func (s *FilterRule) SetValue(v string) *FilterRule { | ||
9414 | s.Value = &v | ||
9415 | return s | ||
9416 | } | ||
9417 | |||
9418 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationRequest | ||
9419 | type GetBucketAccelerateConfigurationInput struct { | ||
9420 | _ struct{} `type:"structure"` | ||
9421 | |||
9422 | // Name of the bucket for which the accelerate configuration is retrieved. | ||
9423 | // | ||
9424 | // Bucket is a required field | ||
9425 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9426 | } | ||
9427 | |||
9428 | // String returns the string representation | ||
9429 | func (s GetBucketAccelerateConfigurationInput) String() string { | ||
9430 | return awsutil.Prettify(s) | ||
9431 | } | ||
9432 | |||
9433 | // GoString returns the string representation | ||
9434 | func (s GetBucketAccelerateConfigurationInput) GoString() string { | ||
9435 | return s.String() | ||
9436 | } | ||
9437 | |||
9438 | // Validate inspects the fields of the type to determine if they are valid. | ||
9439 | func (s *GetBucketAccelerateConfigurationInput) Validate() error { | ||
9440 | invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"} | ||
9441 | if s.Bucket == nil { | ||
9442 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9443 | } | ||
9444 | |||
9445 | if invalidParams.Len() > 0 { | ||
9446 | return invalidParams | ||
9447 | } | ||
9448 | return nil | ||
9449 | } | ||
9450 | |||
9451 | // SetBucket sets the Bucket field's value. | ||
9452 | func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput { | ||
9453 | s.Bucket = &v | ||
9454 | return s | ||
9455 | } | ||
9456 | |||
9457 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationOutput | ||
9458 | type GetBucketAccelerateConfigurationOutput struct { | ||
9459 | _ struct{} `type:"structure"` | ||
9460 | |||
9461 | // The accelerate configuration of the bucket. | ||
9462 | Status *string `type:"string" enum:"BucketAccelerateStatus"` | ||
9463 | } | ||
9464 | |||
9465 | // String returns the string representation | ||
9466 | func (s GetBucketAccelerateConfigurationOutput) String() string { | ||
9467 | return awsutil.Prettify(s) | ||
9468 | } | ||
9469 | |||
9470 | // GoString returns the string representation | ||
9471 | func (s GetBucketAccelerateConfigurationOutput) GoString() string { | ||
9472 | return s.String() | ||
9473 | } | ||
9474 | |||
9475 | // SetStatus sets the Status field's value. | ||
9476 | func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput { | ||
9477 | s.Status = &v | ||
9478 | return s | ||
9479 | } | ||
9480 | |||
9481 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclRequest | ||
9482 | type GetBucketAclInput struct { | ||
9483 | _ struct{} `type:"structure"` | ||
9484 | |||
9485 | // Bucket is a required field | ||
9486 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9487 | } | ||
9488 | |||
9489 | // String returns the string representation | ||
9490 | func (s GetBucketAclInput) String() string { | ||
9491 | return awsutil.Prettify(s) | ||
9492 | } | ||
9493 | |||
9494 | // GoString returns the string representation | ||
9495 | func (s GetBucketAclInput) GoString() string { | ||
9496 | return s.String() | ||
9497 | } | ||
9498 | |||
9499 | // Validate inspects the fields of the type to determine if they are valid. | ||
9500 | func (s *GetBucketAclInput) Validate() error { | ||
9501 | invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"} | ||
9502 | if s.Bucket == nil { | ||
9503 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9504 | } | ||
9505 | |||
9506 | if invalidParams.Len() > 0 { | ||
9507 | return invalidParams | ||
9508 | } | ||
9509 | return nil | ||
9510 | } | ||
9511 | |||
9512 | // SetBucket sets the Bucket field's value. | ||
9513 | func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput { | ||
9514 | s.Bucket = &v | ||
9515 | return s | ||
9516 | } | ||
9517 | |||
9518 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclOutput | ||
9519 | type GetBucketAclOutput struct { | ||
9520 | _ struct{} `type:"structure"` | ||
9521 | |||
9522 | // A list of grants. | ||
9523 | Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"` | ||
9524 | |||
9525 | Owner *Owner `type:"structure"` | ||
9526 | } | ||
9527 | |||
9528 | // String returns the string representation | ||
9529 | func (s GetBucketAclOutput) String() string { | ||
9530 | return awsutil.Prettify(s) | ||
9531 | } | ||
9532 | |||
9533 | // GoString returns the string representation | ||
9534 | func (s GetBucketAclOutput) GoString() string { | ||
9535 | return s.String() | ||
9536 | } | ||
9537 | |||
9538 | // SetGrants sets the Grants field's value. | ||
9539 | func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput { | ||
9540 | s.Grants = v | ||
9541 | return s | ||
9542 | } | ||
9543 | |||
9544 | // SetOwner sets the Owner field's value. | ||
9545 | func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput { | ||
9546 | s.Owner = v | ||
9547 | return s | ||
9548 | } | ||
9549 | |||
9550 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationRequest | ||
9551 | type GetBucketAnalyticsConfigurationInput struct { | ||
9552 | _ struct{} `type:"structure"` | ||
9553 | |||
9554 | // The name of the bucket from which an analytics configuration is retrieved. | ||
9555 | // | ||
9556 | // Bucket is a required field | ||
9557 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9558 | |||
9559 | // The identifier used to represent an analytics configuration. | ||
9560 | // | ||
9561 | // Id is a required field | ||
9562 | Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` | ||
9563 | } | ||
9564 | |||
9565 | // String returns the string representation | ||
9566 | func (s GetBucketAnalyticsConfigurationInput) String() string { | ||
9567 | return awsutil.Prettify(s) | ||
9568 | } | ||
9569 | |||
9570 | // GoString returns the string representation | ||
9571 | func (s GetBucketAnalyticsConfigurationInput) GoString() string { | ||
9572 | return s.String() | ||
9573 | } | ||
9574 | |||
9575 | // Validate inspects the fields of the type to determine if they are valid. | ||
9576 | func (s *GetBucketAnalyticsConfigurationInput) Validate() error { | ||
9577 | invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"} | ||
9578 | if s.Bucket == nil { | ||
9579 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9580 | } | ||
9581 | if s.Id == nil { | ||
9582 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
9583 | } | ||
9584 | |||
9585 | if invalidParams.Len() > 0 { | ||
9586 | return invalidParams | ||
9587 | } | ||
9588 | return nil | ||
9589 | } | ||
9590 | |||
9591 | // SetBucket sets the Bucket field's value. | ||
9592 | func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput { | ||
9593 | s.Bucket = &v | ||
9594 | return s | ||
9595 | } | ||
9596 | |||
9597 | // SetId sets the Id field's value. | ||
9598 | func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput { | ||
9599 | s.Id = &v | ||
9600 | return s | ||
9601 | } | ||
9602 | |||
9603 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationOutput | ||
9604 | type GetBucketAnalyticsConfigurationOutput struct { | ||
9605 | _ struct{} `type:"structure" payload:"AnalyticsConfiguration"` | ||
9606 | |||
9607 | // The configuration and any analyses for the analytics filter. | ||
9608 | AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"` | ||
9609 | } | ||
9610 | |||
9611 | // String returns the string representation | ||
9612 | func (s GetBucketAnalyticsConfigurationOutput) String() string { | ||
9613 | return awsutil.Prettify(s) | ||
9614 | } | ||
9615 | |||
9616 | // GoString returns the string representation | ||
9617 | func (s GetBucketAnalyticsConfigurationOutput) GoString() string { | ||
9618 | return s.String() | ||
9619 | } | ||
9620 | |||
9621 | // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value. | ||
9622 | func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput { | ||
9623 | s.AnalyticsConfiguration = v | ||
9624 | return s | ||
9625 | } | ||
9626 | |||
9627 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsRequest | ||
9628 | type GetBucketCorsInput struct { | ||
9629 | _ struct{} `type:"structure"` | ||
9630 | |||
9631 | // Bucket is a required field | ||
9632 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9633 | } | ||
9634 | |||
9635 | // String returns the string representation | ||
9636 | func (s GetBucketCorsInput) String() string { | ||
9637 | return awsutil.Prettify(s) | ||
9638 | } | ||
9639 | |||
9640 | // GoString returns the string representation | ||
9641 | func (s GetBucketCorsInput) GoString() string { | ||
9642 | return s.String() | ||
9643 | } | ||
9644 | |||
9645 | // Validate inspects the fields of the type to determine if they are valid. | ||
9646 | func (s *GetBucketCorsInput) Validate() error { | ||
9647 | invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"} | ||
9648 | if s.Bucket == nil { | ||
9649 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9650 | } | ||
9651 | |||
9652 | if invalidParams.Len() > 0 { | ||
9653 | return invalidParams | ||
9654 | } | ||
9655 | return nil | ||
9656 | } | ||
9657 | |||
9658 | // SetBucket sets the Bucket field's value. | ||
9659 | func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput { | ||
9660 | s.Bucket = &v | ||
9661 | return s | ||
9662 | } | ||
9663 | |||
9664 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsOutput | ||
9665 | type GetBucketCorsOutput struct { | ||
9666 | _ struct{} `type:"structure"` | ||
9667 | |||
9668 | CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"` | ||
9669 | } | ||
9670 | |||
9671 | // String returns the string representation | ||
9672 | func (s GetBucketCorsOutput) String() string { | ||
9673 | return awsutil.Prettify(s) | ||
9674 | } | ||
9675 | |||
9676 | // GoString returns the string representation | ||
9677 | func (s GetBucketCorsOutput) GoString() string { | ||
9678 | return s.String() | ||
9679 | } | ||
9680 | |||
9681 | // SetCORSRules sets the CORSRules field's value. | ||
9682 | func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput { | ||
9683 | s.CORSRules = v | ||
9684 | return s | ||
9685 | } | ||
9686 | |||
9687 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationRequest | ||
9688 | type GetBucketInventoryConfigurationInput struct { | ||
9689 | _ struct{} `type:"structure"` | ||
9690 | |||
9691 | // The name of the bucket containing the inventory configuration to retrieve. | ||
9692 | // | ||
9693 | // Bucket is a required field | ||
9694 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9695 | |||
9696 | // The ID used to identify the inventory configuration. | ||
9697 | // | ||
9698 | // Id is a required field | ||
9699 | Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` | ||
9700 | } | ||
9701 | |||
9702 | // String returns the string representation | ||
9703 | func (s GetBucketInventoryConfigurationInput) String() string { | ||
9704 | return awsutil.Prettify(s) | ||
9705 | } | ||
9706 | |||
9707 | // GoString returns the string representation | ||
9708 | func (s GetBucketInventoryConfigurationInput) GoString() string { | ||
9709 | return s.String() | ||
9710 | } | ||
9711 | |||
9712 | // Validate inspects the fields of the type to determine if they are valid. | ||
9713 | func (s *GetBucketInventoryConfigurationInput) Validate() error { | ||
9714 | invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"} | ||
9715 | if s.Bucket == nil { | ||
9716 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9717 | } | ||
9718 | if s.Id == nil { | ||
9719 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
9720 | } | ||
9721 | |||
9722 | if invalidParams.Len() > 0 { | ||
9723 | return invalidParams | ||
9724 | } | ||
9725 | return nil | ||
9726 | } | ||
9727 | |||
9728 | // SetBucket sets the Bucket field's value. | ||
9729 | func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput { | ||
9730 | s.Bucket = &v | ||
9731 | return s | ||
9732 | } | ||
9733 | |||
9734 | // SetId sets the Id field's value. | ||
9735 | func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput { | ||
9736 | s.Id = &v | ||
9737 | return s | ||
9738 | } | ||
9739 | |||
9740 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationOutput | ||
9741 | type GetBucketInventoryConfigurationOutput struct { | ||
9742 | _ struct{} `type:"structure" payload:"InventoryConfiguration"` | ||
9743 | |||
9744 | // Specifies the inventory configuration. | ||
9745 | InventoryConfiguration *InventoryConfiguration `type:"structure"` | ||
9746 | } | ||
9747 | |||
9748 | // String returns the string representation | ||
9749 | func (s GetBucketInventoryConfigurationOutput) String() string { | ||
9750 | return awsutil.Prettify(s) | ||
9751 | } | ||
9752 | |||
9753 | // GoString returns the string representation | ||
9754 | func (s GetBucketInventoryConfigurationOutput) GoString() string { | ||
9755 | return s.String() | ||
9756 | } | ||
9757 | |||
9758 | // SetInventoryConfiguration sets the InventoryConfiguration field's value. | ||
9759 | func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput { | ||
9760 | s.InventoryConfiguration = v | ||
9761 | return s | ||
9762 | } | ||
9763 | |||
9764 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationRequest | ||
9765 | type GetBucketLifecycleConfigurationInput struct { | ||
9766 | _ struct{} `type:"structure"` | ||
9767 | |||
9768 | // Bucket is a required field | ||
9769 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9770 | } | ||
9771 | |||
9772 | // String returns the string representation | ||
9773 | func (s GetBucketLifecycleConfigurationInput) String() string { | ||
9774 | return awsutil.Prettify(s) | ||
9775 | } | ||
9776 | |||
9777 | // GoString returns the string representation | ||
9778 | func (s GetBucketLifecycleConfigurationInput) GoString() string { | ||
9779 | return s.String() | ||
9780 | } | ||
9781 | |||
9782 | // Validate inspects the fields of the type to determine if they are valid. | ||
9783 | func (s *GetBucketLifecycleConfigurationInput) Validate() error { | ||
9784 | invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"} | ||
9785 | if s.Bucket == nil { | ||
9786 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9787 | } | ||
9788 | |||
9789 | if invalidParams.Len() > 0 { | ||
9790 | return invalidParams | ||
9791 | } | ||
9792 | return nil | ||
9793 | } | ||
9794 | |||
9795 | // SetBucket sets the Bucket field's value. | ||
9796 | func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput { | ||
9797 | s.Bucket = &v | ||
9798 | return s | ||
9799 | } | ||
9800 | |||
9801 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationOutput | ||
9802 | type GetBucketLifecycleConfigurationOutput struct { | ||
9803 | _ struct{} `type:"structure"` | ||
9804 | |||
9805 | Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"` | ||
9806 | } | ||
9807 | |||
9808 | // String returns the string representation | ||
9809 | func (s GetBucketLifecycleConfigurationOutput) String() string { | ||
9810 | return awsutil.Prettify(s) | ||
9811 | } | ||
9812 | |||
9813 | // GoString returns the string representation | ||
9814 | func (s GetBucketLifecycleConfigurationOutput) GoString() string { | ||
9815 | return s.String() | ||
9816 | } | ||
9817 | |||
9818 | // SetRules sets the Rules field's value. | ||
9819 | func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput { | ||
9820 | s.Rules = v | ||
9821 | return s | ||
9822 | } | ||
9823 | |||
9824 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleRequest | ||
9825 | type GetBucketLifecycleInput struct { | ||
9826 | _ struct{} `type:"structure"` | ||
9827 | |||
9828 | // Bucket is a required field | ||
9829 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9830 | } | ||
9831 | |||
9832 | // String returns the string representation | ||
9833 | func (s GetBucketLifecycleInput) String() string { | ||
9834 | return awsutil.Prettify(s) | ||
9835 | } | ||
9836 | |||
9837 | // GoString returns the string representation | ||
9838 | func (s GetBucketLifecycleInput) GoString() string { | ||
9839 | return s.String() | ||
9840 | } | ||
9841 | |||
9842 | // Validate inspects the fields of the type to determine if they are valid. | ||
9843 | func (s *GetBucketLifecycleInput) Validate() error { | ||
9844 | invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"} | ||
9845 | if s.Bucket == nil { | ||
9846 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9847 | } | ||
9848 | |||
9849 | if invalidParams.Len() > 0 { | ||
9850 | return invalidParams | ||
9851 | } | ||
9852 | return nil | ||
9853 | } | ||
9854 | |||
9855 | // SetBucket sets the Bucket field's value. | ||
9856 | func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput { | ||
9857 | s.Bucket = &v | ||
9858 | return s | ||
9859 | } | ||
9860 | |||
9861 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleOutput | ||
9862 | type GetBucketLifecycleOutput struct { | ||
9863 | _ struct{} `type:"structure"` | ||
9864 | |||
9865 | Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"` | ||
9866 | } | ||
9867 | |||
9868 | // String returns the string representation | ||
9869 | func (s GetBucketLifecycleOutput) String() string { | ||
9870 | return awsutil.Prettify(s) | ||
9871 | } | ||
9872 | |||
9873 | // GoString returns the string representation | ||
9874 | func (s GetBucketLifecycleOutput) GoString() string { | ||
9875 | return s.String() | ||
9876 | } | ||
9877 | |||
9878 | // SetRules sets the Rules field's value. | ||
9879 | func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput { | ||
9880 | s.Rules = v | ||
9881 | return s | ||
9882 | } | ||
9883 | |||
9884 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationRequest | ||
9885 | type GetBucketLocationInput struct { | ||
9886 | _ struct{} `type:"structure"` | ||
9887 | |||
9888 | // Bucket is a required field | ||
9889 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9890 | } | ||
9891 | |||
9892 | // String returns the string representation | ||
9893 | func (s GetBucketLocationInput) String() string { | ||
9894 | return awsutil.Prettify(s) | ||
9895 | } | ||
9896 | |||
9897 | // GoString returns the string representation | ||
9898 | func (s GetBucketLocationInput) GoString() string { | ||
9899 | return s.String() | ||
9900 | } | ||
9901 | |||
9902 | // Validate inspects the fields of the type to determine if they are valid. | ||
9903 | func (s *GetBucketLocationInput) Validate() error { | ||
9904 | invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"} | ||
9905 | if s.Bucket == nil { | ||
9906 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9907 | } | ||
9908 | |||
9909 | if invalidParams.Len() > 0 { | ||
9910 | return invalidParams | ||
9911 | } | ||
9912 | return nil | ||
9913 | } | ||
9914 | |||
9915 | // SetBucket sets the Bucket field's value. | ||
9916 | func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput { | ||
9917 | s.Bucket = &v | ||
9918 | return s | ||
9919 | } | ||
9920 | |||
9921 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationOutput | ||
9922 | type GetBucketLocationOutput struct { | ||
9923 | _ struct{} `type:"structure"` | ||
9924 | |||
9925 | LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"` | ||
9926 | } | ||
9927 | |||
9928 | // String returns the string representation | ||
9929 | func (s GetBucketLocationOutput) String() string { | ||
9930 | return awsutil.Prettify(s) | ||
9931 | } | ||
9932 | |||
9933 | // GoString returns the string representation | ||
9934 | func (s GetBucketLocationOutput) GoString() string { | ||
9935 | return s.String() | ||
9936 | } | ||
9937 | |||
9938 | // SetLocationConstraint sets the LocationConstraint field's value. | ||
9939 | func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput { | ||
9940 | s.LocationConstraint = &v | ||
9941 | return s | ||
9942 | } | ||
9943 | |||
9944 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingRequest | ||
9945 | type GetBucketLoggingInput struct { | ||
9946 | _ struct{} `type:"structure"` | ||
9947 | |||
9948 | // Bucket is a required field | ||
9949 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
9950 | } | ||
9951 | |||
9952 | // String returns the string representation | ||
9953 | func (s GetBucketLoggingInput) String() string { | ||
9954 | return awsutil.Prettify(s) | ||
9955 | } | ||
9956 | |||
9957 | // GoString returns the string representation | ||
9958 | func (s GetBucketLoggingInput) GoString() string { | ||
9959 | return s.String() | ||
9960 | } | ||
9961 | |||
9962 | // Validate inspects the fields of the type to determine if they are valid. | ||
9963 | func (s *GetBucketLoggingInput) Validate() error { | ||
9964 | invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"} | ||
9965 | if s.Bucket == nil { | ||
9966 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
9967 | } | ||
9968 | |||
9969 | if invalidParams.Len() > 0 { | ||
9970 | return invalidParams | ||
9971 | } | ||
9972 | return nil | ||
9973 | } | ||
9974 | |||
9975 | // SetBucket sets the Bucket field's value. | ||
9976 | func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput { | ||
9977 | s.Bucket = &v | ||
9978 | return s | ||
9979 | } | ||
9980 | |||
9981 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingOutput | ||
9982 | type GetBucketLoggingOutput struct { | ||
9983 | _ struct{} `type:"structure"` | ||
9984 | |||
9985 | LoggingEnabled *LoggingEnabled `type:"structure"` | ||
9986 | } | ||
9987 | |||
9988 | // String returns the string representation | ||
9989 | func (s GetBucketLoggingOutput) String() string { | ||
9990 | return awsutil.Prettify(s) | ||
9991 | } | ||
9992 | |||
9993 | // GoString returns the string representation | ||
9994 | func (s GetBucketLoggingOutput) GoString() string { | ||
9995 | return s.String() | ||
9996 | } | ||
9997 | |||
9998 | // SetLoggingEnabled sets the LoggingEnabled field's value. | ||
9999 | func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput { | ||
10000 | s.LoggingEnabled = v | ||
10001 | return s | ||
10002 | } | ||
10003 | |||
10004 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationRequest | ||
10005 | type GetBucketMetricsConfigurationInput struct { | ||
10006 | _ struct{} `type:"structure"` | ||
10007 | |||
10008 | // The name of the bucket containing the metrics configuration to retrieve. | ||
10009 | // | ||
10010 | // Bucket is a required field | ||
10011 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10012 | |||
10013 | // The ID used to identify the metrics configuration. | ||
10014 | // | ||
10015 | // Id is a required field | ||
10016 | Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` | ||
10017 | } | ||
10018 | |||
10019 | // String returns the string representation | ||
10020 | func (s GetBucketMetricsConfigurationInput) String() string { | ||
10021 | return awsutil.Prettify(s) | ||
10022 | } | ||
10023 | |||
10024 | // GoString returns the string representation | ||
10025 | func (s GetBucketMetricsConfigurationInput) GoString() string { | ||
10026 | return s.String() | ||
10027 | } | ||
10028 | |||
10029 | // Validate inspects the fields of the type to determine if they are valid. | ||
10030 | func (s *GetBucketMetricsConfigurationInput) Validate() error { | ||
10031 | invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"} | ||
10032 | if s.Bucket == nil { | ||
10033 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10034 | } | ||
10035 | if s.Id == nil { | ||
10036 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
10037 | } | ||
10038 | |||
10039 | if invalidParams.Len() > 0 { | ||
10040 | return invalidParams | ||
10041 | } | ||
10042 | return nil | ||
10043 | } | ||
10044 | |||
10045 | // SetBucket sets the Bucket field's value. | ||
10046 | func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput { | ||
10047 | s.Bucket = &v | ||
10048 | return s | ||
10049 | } | ||
10050 | |||
10051 | // SetId sets the Id field's value. | ||
10052 | func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput { | ||
10053 | s.Id = &v | ||
10054 | return s | ||
10055 | } | ||
10056 | |||
10057 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationOutput | ||
10058 | type GetBucketMetricsConfigurationOutput struct { | ||
10059 | _ struct{} `type:"structure" payload:"MetricsConfiguration"` | ||
10060 | |||
10061 | // Specifies the metrics configuration. | ||
10062 | MetricsConfiguration *MetricsConfiguration `type:"structure"` | ||
10063 | } | ||
10064 | |||
10065 | // String returns the string representation | ||
10066 | func (s GetBucketMetricsConfigurationOutput) String() string { | ||
10067 | return awsutil.Prettify(s) | ||
10068 | } | ||
10069 | |||
10070 | // GoString returns the string representation | ||
10071 | func (s GetBucketMetricsConfigurationOutput) GoString() string { | ||
10072 | return s.String() | ||
10073 | } | ||
10074 | |||
10075 | // SetMetricsConfiguration sets the MetricsConfiguration field's value. | ||
10076 | func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput { | ||
10077 | s.MetricsConfiguration = v | ||
10078 | return s | ||
10079 | } | ||
10080 | |||
10081 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfigurationRequest | ||
10082 | type GetBucketNotificationConfigurationRequest struct { | ||
10083 | _ struct{} `type:"structure"` | ||
10084 | |||
10085 | // Name of the bucket to get the notification configuration for. | ||
10086 | // | ||
10087 | // Bucket is a required field | ||
10088 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10089 | } | ||
10090 | |||
10091 | // String returns the string representation | ||
10092 | func (s GetBucketNotificationConfigurationRequest) String() string { | ||
10093 | return awsutil.Prettify(s) | ||
10094 | } | ||
10095 | |||
10096 | // GoString returns the string representation | ||
10097 | func (s GetBucketNotificationConfigurationRequest) GoString() string { | ||
10098 | return s.String() | ||
10099 | } | ||
10100 | |||
10101 | // Validate inspects the fields of the type to determine if they are valid. | ||
10102 | func (s *GetBucketNotificationConfigurationRequest) Validate() error { | ||
10103 | invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"} | ||
10104 | if s.Bucket == nil { | ||
10105 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10106 | } | ||
10107 | |||
10108 | if invalidParams.Len() > 0 { | ||
10109 | return invalidParams | ||
10110 | } | ||
10111 | return nil | ||
10112 | } | ||
10113 | |||
10114 | // SetBucket sets the Bucket field's value. | ||
10115 | func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest { | ||
10116 | s.Bucket = &v | ||
10117 | return s | ||
10118 | } | ||
10119 | |||
10120 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyRequest | ||
10121 | type GetBucketPolicyInput struct { | ||
10122 | _ struct{} `type:"structure"` | ||
10123 | |||
10124 | // Bucket is a required field | ||
10125 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10126 | } | ||
10127 | |||
10128 | // String returns the string representation | ||
10129 | func (s GetBucketPolicyInput) String() string { | ||
10130 | return awsutil.Prettify(s) | ||
10131 | } | ||
10132 | |||
10133 | // GoString returns the string representation | ||
10134 | func (s GetBucketPolicyInput) GoString() string { | ||
10135 | return s.String() | ||
10136 | } | ||
10137 | |||
10138 | // Validate inspects the fields of the type to determine if they are valid. | ||
10139 | func (s *GetBucketPolicyInput) Validate() error { | ||
10140 | invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"} | ||
10141 | if s.Bucket == nil { | ||
10142 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10143 | } | ||
10144 | |||
10145 | if invalidParams.Len() > 0 { | ||
10146 | return invalidParams | ||
10147 | } | ||
10148 | return nil | ||
10149 | } | ||
10150 | |||
10151 | // SetBucket sets the Bucket field's value. | ||
10152 | func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput { | ||
10153 | s.Bucket = &v | ||
10154 | return s | ||
10155 | } | ||
10156 | |||
10157 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyOutput | ||
10158 | type GetBucketPolicyOutput struct { | ||
10159 | _ struct{} `type:"structure" payload:"Policy"` | ||
10160 | |||
10161 | // The bucket policy as a JSON document. | ||
10162 | Policy *string `type:"string"` | ||
10163 | } | ||
10164 | |||
10165 | // String returns the string representation | ||
10166 | func (s GetBucketPolicyOutput) String() string { | ||
10167 | return awsutil.Prettify(s) | ||
10168 | } | ||
10169 | |||
10170 | // GoString returns the string representation | ||
10171 | func (s GetBucketPolicyOutput) GoString() string { | ||
10172 | return s.String() | ||
10173 | } | ||
10174 | |||
10175 | // SetPolicy sets the Policy field's value. | ||
10176 | func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput { | ||
10177 | s.Policy = &v | ||
10178 | return s | ||
10179 | } | ||
10180 | |||
10181 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationRequest | ||
10182 | type GetBucketReplicationInput struct { | ||
10183 | _ struct{} `type:"structure"` | ||
10184 | |||
10185 | // Bucket is a required field | ||
10186 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10187 | } | ||
10188 | |||
10189 | // String returns the string representation | ||
10190 | func (s GetBucketReplicationInput) String() string { | ||
10191 | return awsutil.Prettify(s) | ||
10192 | } | ||
10193 | |||
10194 | // GoString returns the string representation | ||
10195 | func (s GetBucketReplicationInput) GoString() string { | ||
10196 | return s.String() | ||
10197 | } | ||
10198 | |||
10199 | // Validate inspects the fields of the type to determine if they are valid. | ||
10200 | func (s *GetBucketReplicationInput) Validate() error { | ||
10201 | invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"} | ||
10202 | if s.Bucket == nil { | ||
10203 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10204 | } | ||
10205 | |||
10206 | if invalidParams.Len() > 0 { | ||
10207 | return invalidParams | ||
10208 | } | ||
10209 | return nil | ||
10210 | } | ||
10211 | |||
10212 | // SetBucket sets the Bucket field's value. | ||
10213 | func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput { | ||
10214 | s.Bucket = &v | ||
10215 | return s | ||
10216 | } | ||
10217 | |||
10218 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationOutput | ||
10219 | type GetBucketReplicationOutput struct { | ||
10220 | _ struct{} `type:"structure" payload:"ReplicationConfiguration"` | ||
10221 | |||
10222 | // Container for replication rules. You can add as many as 1,000 rules. Total | ||
10223 | // replication configuration size can be up to 2 MB. | ||
10224 | ReplicationConfiguration *ReplicationConfiguration `type:"structure"` | ||
10225 | } | ||
10226 | |||
10227 | // String returns the string representation | ||
10228 | func (s GetBucketReplicationOutput) String() string { | ||
10229 | return awsutil.Prettify(s) | ||
10230 | } | ||
10231 | |||
10232 | // GoString returns the string representation | ||
10233 | func (s GetBucketReplicationOutput) GoString() string { | ||
10234 | return s.String() | ||
10235 | } | ||
10236 | |||
10237 | // SetReplicationConfiguration sets the ReplicationConfiguration field's value. | ||
10238 | func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput { | ||
10239 | s.ReplicationConfiguration = v | ||
10240 | return s | ||
10241 | } | ||
10242 | |||
10243 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentRequest | ||
10244 | type GetBucketRequestPaymentInput struct { | ||
10245 | _ struct{} `type:"structure"` | ||
10246 | |||
10247 | // Bucket is a required field | ||
10248 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10249 | } | ||
10250 | |||
10251 | // String returns the string representation | ||
10252 | func (s GetBucketRequestPaymentInput) String() string { | ||
10253 | return awsutil.Prettify(s) | ||
10254 | } | ||
10255 | |||
10256 | // GoString returns the string representation | ||
10257 | func (s GetBucketRequestPaymentInput) GoString() string { | ||
10258 | return s.String() | ||
10259 | } | ||
10260 | |||
10261 | // Validate inspects the fields of the type to determine if they are valid. | ||
10262 | func (s *GetBucketRequestPaymentInput) Validate() error { | ||
10263 | invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"} | ||
10264 | if s.Bucket == nil { | ||
10265 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10266 | } | ||
10267 | |||
10268 | if invalidParams.Len() > 0 { | ||
10269 | return invalidParams | ||
10270 | } | ||
10271 | return nil | ||
10272 | } | ||
10273 | |||
10274 | // SetBucket sets the Bucket field's value. | ||
10275 | func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput { | ||
10276 | s.Bucket = &v | ||
10277 | return s | ||
10278 | } | ||
10279 | |||
10280 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentOutput | ||
10281 | type GetBucketRequestPaymentOutput struct { | ||
10282 | _ struct{} `type:"structure"` | ||
10283 | |||
10284 | // Specifies who pays for the download and request fees. | ||
10285 | Payer *string `type:"string" enum:"Payer"` | ||
10286 | } | ||
10287 | |||
10288 | // String returns the string representation | ||
10289 | func (s GetBucketRequestPaymentOutput) String() string { | ||
10290 | return awsutil.Prettify(s) | ||
10291 | } | ||
10292 | |||
10293 | // GoString returns the string representation | ||
10294 | func (s GetBucketRequestPaymentOutput) GoString() string { | ||
10295 | return s.String() | ||
10296 | } | ||
10297 | |||
10298 | // SetPayer sets the Payer field's value. | ||
10299 | func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput { | ||
10300 | s.Payer = &v | ||
10301 | return s | ||
10302 | } | ||
10303 | |||
10304 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingRequest | ||
10305 | type GetBucketTaggingInput struct { | ||
10306 | _ struct{} `type:"structure"` | ||
10307 | |||
10308 | // Bucket is a required field | ||
10309 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10310 | } | ||
10311 | |||
10312 | // String returns the string representation | ||
10313 | func (s GetBucketTaggingInput) String() string { | ||
10314 | return awsutil.Prettify(s) | ||
10315 | } | ||
10316 | |||
10317 | // GoString returns the string representation | ||
10318 | func (s GetBucketTaggingInput) GoString() string { | ||
10319 | return s.String() | ||
10320 | } | ||
10321 | |||
10322 | // Validate inspects the fields of the type to determine if they are valid. | ||
10323 | func (s *GetBucketTaggingInput) Validate() error { | ||
10324 | invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"} | ||
10325 | if s.Bucket == nil { | ||
10326 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10327 | } | ||
10328 | |||
10329 | if invalidParams.Len() > 0 { | ||
10330 | return invalidParams | ||
10331 | } | ||
10332 | return nil | ||
10333 | } | ||
10334 | |||
10335 | // SetBucket sets the Bucket field's value. | ||
10336 | func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput { | ||
10337 | s.Bucket = &v | ||
10338 | return s | ||
10339 | } | ||
10340 | |||
10341 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingOutput | ||
10342 | type GetBucketTaggingOutput struct { | ||
10343 | _ struct{} `type:"structure"` | ||
10344 | |||
10345 | // TagSet is a required field | ||
10346 | TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"` | ||
10347 | } | ||
10348 | |||
10349 | // String returns the string representation | ||
10350 | func (s GetBucketTaggingOutput) String() string { | ||
10351 | return awsutil.Prettify(s) | ||
10352 | } | ||
10353 | |||
10354 | // GoString returns the string representation | ||
10355 | func (s GetBucketTaggingOutput) GoString() string { | ||
10356 | return s.String() | ||
10357 | } | ||
10358 | |||
10359 | // SetTagSet sets the TagSet field's value. | ||
10360 | func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput { | ||
10361 | s.TagSet = v | ||
10362 | return s | ||
10363 | } | ||
10364 | |||
10365 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningRequest | ||
10366 | type GetBucketVersioningInput struct { | ||
10367 | _ struct{} `type:"structure"` | ||
10368 | |||
10369 | // Bucket is a required field | ||
10370 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10371 | } | ||
10372 | |||
10373 | // String returns the string representation | ||
10374 | func (s GetBucketVersioningInput) String() string { | ||
10375 | return awsutil.Prettify(s) | ||
10376 | } | ||
10377 | |||
10378 | // GoString returns the string representation | ||
10379 | func (s GetBucketVersioningInput) GoString() string { | ||
10380 | return s.String() | ||
10381 | } | ||
10382 | |||
10383 | // Validate inspects the fields of the type to determine if they are valid. | ||
10384 | func (s *GetBucketVersioningInput) Validate() error { | ||
10385 | invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"} | ||
10386 | if s.Bucket == nil { | ||
10387 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10388 | } | ||
10389 | |||
10390 | if invalidParams.Len() > 0 { | ||
10391 | return invalidParams | ||
10392 | } | ||
10393 | return nil | ||
10394 | } | ||
10395 | |||
10396 | // SetBucket sets the Bucket field's value. | ||
10397 | func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput { | ||
10398 | s.Bucket = &v | ||
10399 | return s | ||
10400 | } | ||
10401 | |||
10402 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningOutput | ||
10403 | type GetBucketVersioningOutput struct { | ||
10404 | _ struct{} `type:"structure"` | ||
10405 | |||
10406 | // Specifies whether MFA delete is enabled in the bucket versioning configuration. | ||
10407 | // This element is only returned if the bucket has been configured with MFA | ||
10408 | // delete. If the bucket has never been so configured, this element is not returned. | ||
10409 | MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"` | ||
10410 | |||
10411 | // The versioning state of the bucket. | ||
10412 | Status *string `type:"string" enum:"BucketVersioningStatus"` | ||
10413 | } | ||
10414 | |||
10415 | // String returns the string representation | ||
10416 | func (s GetBucketVersioningOutput) String() string { | ||
10417 | return awsutil.Prettify(s) | ||
10418 | } | ||
10419 | |||
10420 | // GoString returns the string representation | ||
10421 | func (s GetBucketVersioningOutput) GoString() string { | ||
10422 | return s.String() | ||
10423 | } | ||
10424 | |||
10425 | // SetMFADelete sets the MFADelete field's value. | ||
10426 | func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput { | ||
10427 | s.MFADelete = &v | ||
10428 | return s | ||
10429 | } | ||
10430 | |||
10431 | // SetStatus sets the Status field's value. | ||
10432 | func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput { | ||
10433 | s.Status = &v | ||
10434 | return s | ||
10435 | } | ||
10436 | |||
10437 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteRequest | ||
10438 | type GetBucketWebsiteInput struct { | ||
10439 | _ struct{} `type:"structure"` | ||
10440 | |||
10441 | // Bucket is a required field | ||
10442 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10443 | } | ||
10444 | |||
10445 | // String returns the string representation | ||
10446 | func (s GetBucketWebsiteInput) String() string { | ||
10447 | return awsutil.Prettify(s) | ||
10448 | } | ||
10449 | |||
10450 | // GoString returns the string representation | ||
10451 | func (s GetBucketWebsiteInput) GoString() string { | ||
10452 | return s.String() | ||
10453 | } | ||
10454 | |||
10455 | // Validate inspects the fields of the type to determine if they are valid. | ||
10456 | func (s *GetBucketWebsiteInput) Validate() error { | ||
10457 | invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"} | ||
10458 | if s.Bucket == nil { | ||
10459 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10460 | } | ||
10461 | |||
10462 | if invalidParams.Len() > 0 { | ||
10463 | return invalidParams | ||
10464 | } | ||
10465 | return nil | ||
10466 | } | ||
10467 | |||
10468 | // SetBucket sets the Bucket field's value. | ||
10469 | func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput { | ||
10470 | s.Bucket = &v | ||
10471 | return s | ||
10472 | } | ||
10473 | |||
10474 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteOutput | ||
10475 | type GetBucketWebsiteOutput struct { | ||
10476 | _ struct{} `type:"structure"` | ||
10477 | |||
10478 | ErrorDocument *ErrorDocument `type:"structure"` | ||
10479 | |||
10480 | IndexDocument *IndexDocument `type:"structure"` | ||
10481 | |||
10482 | RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"` | ||
10483 | |||
10484 | RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"` | ||
10485 | } | ||
10486 | |||
10487 | // String returns the string representation | ||
10488 | func (s GetBucketWebsiteOutput) String() string { | ||
10489 | return awsutil.Prettify(s) | ||
10490 | } | ||
10491 | |||
10492 | // GoString returns the string representation | ||
10493 | func (s GetBucketWebsiteOutput) GoString() string { | ||
10494 | return s.String() | ||
10495 | } | ||
10496 | |||
10497 | // SetErrorDocument sets the ErrorDocument field's value. | ||
10498 | func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput { | ||
10499 | s.ErrorDocument = v | ||
10500 | return s | ||
10501 | } | ||
10502 | |||
10503 | // SetIndexDocument sets the IndexDocument field's value. | ||
10504 | func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput { | ||
10505 | s.IndexDocument = v | ||
10506 | return s | ||
10507 | } | ||
10508 | |||
10509 | // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value. | ||
10510 | func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput { | ||
10511 | s.RedirectAllRequestsTo = v | ||
10512 | return s | ||
10513 | } | ||
10514 | |||
10515 | // SetRoutingRules sets the RoutingRules field's value. | ||
10516 | func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput { | ||
10517 | s.RoutingRules = v | ||
10518 | return s | ||
10519 | } | ||
10520 | |||
10521 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclRequest | ||
10522 | type GetObjectAclInput struct { | ||
10523 | _ struct{} `type:"structure"` | ||
10524 | |||
10525 | // Bucket is a required field | ||
10526 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10527 | |||
10528 | // Key is a required field | ||
10529 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
10530 | |||
10531 | // Confirms that the requester knows that she or he will be charged for the | ||
10532 | // request. Bucket owners need not specify this parameter in their requests. | ||
10533 | // Documentation on downloading objects from requester pays buckets can be found | ||
10534 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
10535 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
10536 | |||
10537 | // VersionId used to reference a specific version of the object. | ||
10538 | VersionId *string `location:"querystring" locationName:"versionId" type:"string"` | ||
10539 | } | ||
10540 | |||
10541 | // String returns the string representation | ||
10542 | func (s GetObjectAclInput) String() string { | ||
10543 | return awsutil.Prettify(s) | ||
10544 | } | ||
10545 | |||
10546 | // GoString returns the string representation | ||
10547 | func (s GetObjectAclInput) GoString() string { | ||
10548 | return s.String() | ||
10549 | } | ||
10550 | |||
10551 | // Validate inspects the fields of the type to determine if they are valid. | ||
10552 | func (s *GetObjectAclInput) Validate() error { | ||
10553 | invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"} | ||
10554 | if s.Bucket == nil { | ||
10555 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10556 | } | ||
10557 | if s.Key == nil { | ||
10558 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
10559 | } | ||
10560 | if s.Key != nil && len(*s.Key) < 1 { | ||
10561 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
10562 | } | ||
10563 | |||
10564 | if invalidParams.Len() > 0 { | ||
10565 | return invalidParams | ||
10566 | } | ||
10567 | return nil | ||
10568 | } | ||
10569 | |||
10570 | // SetBucket sets the Bucket field's value. | ||
10571 | func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput { | ||
10572 | s.Bucket = &v | ||
10573 | return s | ||
10574 | } | ||
10575 | |||
10576 | // SetKey sets the Key field's value. | ||
10577 | func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput { | ||
10578 | s.Key = &v | ||
10579 | return s | ||
10580 | } | ||
10581 | |||
10582 | // SetRequestPayer sets the RequestPayer field's value. | ||
10583 | func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput { | ||
10584 | s.RequestPayer = &v | ||
10585 | return s | ||
10586 | } | ||
10587 | |||
10588 | // SetVersionId sets the VersionId field's value. | ||
10589 | func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput { | ||
10590 | s.VersionId = &v | ||
10591 | return s | ||
10592 | } | ||
10593 | |||
10594 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclOutput | ||
10595 | type GetObjectAclOutput struct { | ||
10596 | _ struct{} `type:"structure"` | ||
10597 | |||
10598 | // A list of grants. | ||
10599 | Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"` | ||
10600 | |||
10601 | Owner *Owner `type:"structure"` | ||
10602 | |||
10603 | // If present, indicates that the requester was successfully charged for the | ||
10604 | // request. | ||
10605 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
10606 | } | ||
10607 | |||
10608 | // String returns the string representation | ||
10609 | func (s GetObjectAclOutput) String() string { | ||
10610 | return awsutil.Prettify(s) | ||
10611 | } | ||
10612 | |||
10613 | // GoString returns the string representation | ||
10614 | func (s GetObjectAclOutput) GoString() string { | ||
10615 | return s.String() | ||
10616 | } | ||
10617 | |||
10618 | // SetGrants sets the Grants field's value. | ||
10619 | func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput { | ||
10620 | s.Grants = v | ||
10621 | return s | ||
10622 | } | ||
10623 | |||
10624 | // SetOwner sets the Owner field's value. | ||
10625 | func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput { | ||
10626 | s.Owner = v | ||
10627 | return s | ||
10628 | } | ||
10629 | |||
10630 | // SetRequestCharged sets the RequestCharged field's value. | ||
10631 | func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput { | ||
10632 | s.RequestCharged = &v | ||
10633 | return s | ||
10634 | } | ||
10635 | |||
10636 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRequest | ||
10637 | type GetObjectInput struct { | ||
10638 | _ struct{} `type:"structure"` | ||
10639 | |||
10640 | // Bucket is a required field | ||
10641 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
10642 | |||
10643 | // Return the object only if its entity tag (ETag) is the same as the one specified, | ||
10644 | // otherwise return a 412 (precondition failed). | ||
10645 | IfMatch *string `location:"header" locationName:"If-Match" type:"string"` | ||
10646 | |||
10647 | // Return the object only if it has been modified since the specified time, | ||
10648 | // otherwise return a 304 (not modified). | ||
10649 | IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"` | ||
10650 | |||
10651 | // Return the object only if its entity tag (ETag) is different from the one | ||
10652 | // specified, otherwise return a 304 (not modified). | ||
10653 | IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"` | ||
10654 | |||
10655 | // Return the object only if it has not been modified since the specified time, | ||
10656 | // otherwise return a 412 (precondition failed). | ||
10657 | IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"` | ||
10658 | |||
10659 | // Key is a required field | ||
10660 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
10661 | |||
10662 | // Part number of the object being read. This is a positive integer between | ||
10663 | // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. | ||
10664 | // Useful for downloading just a part of an object. | ||
10665 | PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"` | ||
10666 | |||
10667 | // Downloads the specified range bytes of an object. For more information about | ||
10668 | // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. | ||
10669 | Range *string `location:"header" locationName:"Range" type:"string"` | ||
10670 | |||
10671 | // Confirms that the requester knows that she or he will be charged for the | ||
10672 | // request. Bucket owners need not specify this parameter in their requests. | ||
10673 | // Documentation on downloading objects from requester pays buckets can be found | ||
10674 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
10675 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
10676 | |||
10677 | // Sets the Cache-Control header of the response. | ||
10678 | ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"` | ||
10679 | |||
10680 | // Sets the Content-Disposition header of the response | ||
10681 | ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"` | ||
10682 | |||
10683 | // Sets the Content-Encoding header of the response. | ||
10684 | ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"` | ||
10685 | |||
10686 | // Sets the Content-Language header of the response. | ||
10687 | ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"` | ||
10688 | |||
10689 | // Sets the Content-Type header of the response. | ||
10690 | ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"` | ||
10691 | |||
10692 | // Sets the Expires header of the response. | ||
10693 | ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"` | ||
10694 | |||
10695 | // Specifies the algorithm to use to when encrypting the object (e.g., AES256). | ||
10696 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
10697 | |||
10698 | // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting | ||
10699 | // data. This value is used to store the object and then it is discarded; Amazon | ||
10700 | // does not store the encryption key. The key must be appropriate for use with | ||
10701 | // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm | ||
10702 | // header. | ||
10703 | SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` | ||
10704 | |||
10705 | // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | ||
10706 | // Amazon S3 uses this header for a message integrity check to ensure the encryption | ||
10707 | // key was transmitted without error. | ||
10708 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
10709 | |||
10710 | // VersionId used to reference a specific version of the object. | ||
10711 | VersionId *string `location:"querystring" locationName:"versionId" type:"string"` | ||
10712 | } | ||
10713 | |||
10714 | // String returns the string representation | ||
10715 | func (s GetObjectInput) String() string { | ||
10716 | return awsutil.Prettify(s) | ||
10717 | } | ||
10718 | |||
10719 | // GoString returns the string representation | ||
10720 | func (s GetObjectInput) GoString() string { | ||
10721 | return s.String() | ||
10722 | } | ||
10723 | |||
10724 | // Validate inspects the fields of the type to determine if they are valid. | ||
10725 | func (s *GetObjectInput) Validate() error { | ||
10726 | invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"} | ||
10727 | if s.Bucket == nil { | ||
10728 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
10729 | } | ||
10730 | if s.Key == nil { | ||
10731 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
10732 | } | ||
10733 | if s.Key != nil && len(*s.Key) < 1 { | ||
10734 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
10735 | } | ||
10736 | |||
10737 | if invalidParams.Len() > 0 { | ||
10738 | return invalidParams | ||
10739 | } | ||
10740 | return nil | ||
10741 | } | ||
10742 | |||
10743 | // SetBucket sets the Bucket field's value. | ||
10744 | func (s *GetObjectInput) SetBucket(v string) *GetObjectInput { | ||
10745 | s.Bucket = &v | ||
10746 | return s | ||
10747 | } | ||
10748 | |||
10749 | // SetIfMatch sets the IfMatch field's value. | ||
10750 | func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput { | ||
10751 | s.IfMatch = &v | ||
10752 | return s | ||
10753 | } | ||
10754 | |||
10755 | // SetIfModifiedSince sets the IfModifiedSince field's value. | ||
10756 | func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput { | ||
10757 | s.IfModifiedSince = &v | ||
10758 | return s | ||
10759 | } | ||
10760 | |||
10761 | // SetIfNoneMatch sets the IfNoneMatch field's value. | ||
10762 | func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput { | ||
10763 | s.IfNoneMatch = &v | ||
10764 | return s | ||
10765 | } | ||
10766 | |||
10767 | // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value. | ||
10768 | func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput { | ||
10769 | s.IfUnmodifiedSince = &v | ||
10770 | return s | ||
10771 | } | ||
10772 | |||
10773 | // SetKey sets the Key field's value. | ||
10774 | func (s *GetObjectInput) SetKey(v string) *GetObjectInput { | ||
10775 | s.Key = &v | ||
10776 | return s | ||
10777 | } | ||
10778 | |||
10779 | // SetPartNumber sets the PartNumber field's value. | ||
10780 | func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput { | ||
10781 | s.PartNumber = &v | ||
10782 | return s | ||
10783 | } | ||
10784 | |||
10785 | // SetRange sets the Range field's value. | ||
10786 | func (s *GetObjectInput) SetRange(v string) *GetObjectInput { | ||
10787 | s.Range = &v | ||
10788 | return s | ||
10789 | } | ||
10790 | |||
10791 | // SetRequestPayer sets the RequestPayer field's value. | ||
10792 | func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput { | ||
10793 | s.RequestPayer = &v | ||
10794 | return s | ||
10795 | } | ||
10796 | |||
10797 | // SetResponseCacheControl sets the ResponseCacheControl field's value. | ||
10798 | func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput { | ||
10799 | s.ResponseCacheControl = &v | ||
10800 | return s | ||
10801 | } | ||
10802 | |||
10803 | // SetResponseContentDisposition sets the ResponseContentDisposition field's value. | ||
10804 | func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput { | ||
10805 | s.ResponseContentDisposition = &v | ||
10806 | return s | ||
10807 | } | ||
10808 | |||
10809 | // SetResponseContentEncoding sets the ResponseContentEncoding field's value. | ||
10810 | func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput { | ||
10811 | s.ResponseContentEncoding = &v | ||
10812 | return s | ||
10813 | } | ||
10814 | |||
10815 | // SetResponseContentLanguage sets the ResponseContentLanguage field's value. | ||
10816 | func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput { | ||
10817 | s.ResponseContentLanguage = &v | ||
10818 | return s | ||
10819 | } | ||
10820 | |||
10821 | // SetResponseContentType sets the ResponseContentType field's value. | ||
10822 | func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput { | ||
10823 | s.ResponseContentType = &v | ||
10824 | return s | ||
10825 | } | ||
10826 | |||
10827 | // SetResponseExpires sets the ResponseExpires field's value. | ||
10828 | func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput { | ||
10829 | s.ResponseExpires = &v | ||
10830 | return s | ||
10831 | } | ||
10832 | |||
10833 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
10834 | func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput { | ||
10835 | s.SSECustomerAlgorithm = &v | ||
10836 | return s | ||
10837 | } | ||
10838 | |||
10839 | // SetSSECustomerKey sets the SSECustomerKey field's value. | ||
10840 | func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput { | ||
10841 | s.SSECustomerKey = &v | ||
10842 | return s | ||
10843 | } | ||
10844 | |||
10845 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
10846 | func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput { | ||
10847 | s.SSECustomerKeyMD5 = &v | ||
10848 | return s | ||
10849 | } | ||
10850 | |||
10851 | // SetVersionId sets the VersionId field's value. | ||
10852 | func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput { | ||
10853 | s.VersionId = &v | ||
10854 | return s | ||
10855 | } | ||
10856 | |||
10857 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectOutput | ||
10858 | type GetObjectOutput struct { | ||
10859 | _ struct{} `type:"structure" payload:"Body"` | ||
10860 | |||
10861 | AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"` | ||
10862 | |||
10863 | // Object data. | ||
10864 | Body io.ReadCloser `type:"blob"` | ||
10865 | |||
10866 | // Specifies caching behavior along the request/reply chain. | ||
10867 | CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` | ||
10868 | |||
10869 | // Specifies presentational information for the object. | ||
10870 | ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` | ||
10871 | |||
10872 | // Specifies what content encodings have been applied to the object and thus | ||
10873 | // what decoding mechanisms must be applied to obtain the media-type referenced | ||
10874 | // by the Content-Type header field. | ||
10875 | ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` | ||
10876 | |||
10877 | // The language the content is in. | ||
10878 | ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` | ||
10879 | |||
10880 | // Size of the body in bytes. | ||
10881 | ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` | ||
10882 | |||
10883 | // The portion of the object returned in the response. | ||
10884 | ContentRange *string `location:"header" locationName:"Content-Range" type:"string"` | ||
10885 | |||
10886 | // A standard MIME type describing the format of the object data. | ||
10887 | ContentType *string `location:"header" locationName:"Content-Type" type:"string"` | ||
10888 | |||
10889 | // Specifies whether the object retrieved was (true) or was not (false) a Delete | ||
10890 | // Marker. If false, this response header does not appear in the response. | ||
10891 | DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"` | ||
10892 | |||
10893 | // An ETag is an opaque identifier assigned by a web server to a specific version | ||
10894 | // of a resource found at a URL | ||
10895 | ETag *string `location:"header" locationName:"ETag" type:"string"` | ||
10896 | |||
10897 | // If the object expiration is configured (see PUT Bucket lifecycle), the response | ||
10898 | // includes this header. It includes the expiry-date and rule-id key value pairs | ||
10899 | // providing object expiration information. The value of the rule-id is URL | ||
10900 | // encoded. | ||
10901 | Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` | ||
10902 | |||
10903 | // The date and time at which the object is no longer cacheable. | ||
10904 | Expires *string `location:"header" locationName:"Expires" type:"string"` | ||
10905 | |||
10906 | // Last modified date of the object | ||
10907 | LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"` | ||
10908 | |||
10909 | // A map of metadata to store with the object in S3. | ||
10910 | Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` | ||
10911 | |||
10912 | // This is set to the number of metadata entries not returned in x-amz-meta | ||
10913 | // headers. This can happen if you create metadata using an API like SOAP that | ||
10914 | // supports more flexible metadata than the REST API. For example, using SOAP, | ||
10915 | // you can create metadata whose values are not legal HTTP headers. | ||
10916 | MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"` | ||
10917 | |||
10918 | // The count of parts this object has. | ||
10919 | PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"` | ||
10920 | |||
10921 | ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"` | ||
10922 | |||
10923 | // If present, indicates that the requester was successfully charged for the | ||
10924 | // request. | ||
10925 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
10926 | |||
10927 | // Provides information about object restoration operation and expiration time | ||
10928 | // of the restored object copy. | ||
10929 | Restore *string `location:"header" locationName:"x-amz-restore" type:"string"` | ||
10930 | |||
10931 | // If server-side encryption with a customer-provided encryption key was requested, | ||
10932 | // the response will include this header confirming the encryption algorithm | ||
10933 | // used. | ||
10934 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
10935 | |||
10936 | // If server-side encryption with a customer-provided encryption key was requested, | ||
10937 | // the response will include this header to provide round trip message integrity | ||
10938 | // verification of the customer-provided encryption key. | ||
10939 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
10940 | |||
10941 | // If present, specifies the ID of the AWS Key Management Service (KMS) master | ||
10942 | // encryption key that was used for the object. | ||
10943 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
10944 | |||
10945 | // The Server-side encryption algorithm used when storing this object in S3 | ||
10946 | // (e.g., AES256, aws:kms). | ||
10947 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
10948 | |||
10949 | StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` | ||
10950 | |||
10951 | // The number of tags, if any, on the object. | ||
10952 | TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"` | ||
10953 | |||
10954 | // Version of the object. | ||
10955 | VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` | ||
10956 | |||
10957 | // If the bucket is configured as a website, redirects requests for this object | ||
10958 | // to another object in the same bucket or to an external URL. Amazon S3 stores | ||
10959 | // the value of this header in the object metadata. | ||
10960 | WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"` | ||
10961 | } | ||
10962 | |||
10963 | // String returns the string representation | ||
10964 | func (s GetObjectOutput) String() string { | ||
10965 | return awsutil.Prettify(s) | ||
10966 | } | ||
10967 | |||
10968 | // GoString returns the string representation | ||
10969 | func (s GetObjectOutput) GoString() string { | ||
10970 | return s.String() | ||
10971 | } | ||
10972 | |||
10973 | // SetAcceptRanges sets the AcceptRanges field's value. | ||
10974 | func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput { | ||
10975 | s.AcceptRanges = &v | ||
10976 | return s | ||
10977 | } | ||
10978 | |||
10979 | // SetBody sets the Body field's value. | ||
10980 | func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput { | ||
10981 | s.Body = v | ||
10982 | return s | ||
10983 | } | ||
10984 | |||
10985 | // SetCacheControl sets the CacheControl field's value. | ||
10986 | func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput { | ||
10987 | s.CacheControl = &v | ||
10988 | return s | ||
10989 | } | ||
10990 | |||
10991 | // SetContentDisposition sets the ContentDisposition field's value. | ||
10992 | func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput { | ||
10993 | s.ContentDisposition = &v | ||
10994 | return s | ||
10995 | } | ||
10996 | |||
10997 | // SetContentEncoding sets the ContentEncoding field's value. | ||
10998 | func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput { | ||
10999 | s.ContentEncoding = &v | ||
11000 | return s | ||
11001 | } | ||
11002 | |||
11003 | // SetContentLanguage sets the ContentLanguage field's value. | ||
11004 | func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput { | ||
11005 | s.ContentLanguage = &v | ||
11006 | return s | ||
11007 | } | ||
11008 | |||
11009 | // SetContentLength sets the ContentLength field's value. | ||
11010 | func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput { | ||
11011 | s.ContentLength = &v | ||
11012 | return s | ||
11013 | } | ||
11014 | |||
11015 | // SetContentRange sets the ContentRange field's value. | ||
11016 | func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput { | ||
11017 | s.ContentRange = &v | ||
11018 | return s | ||
11019 | } | ||
11020 | |||
11021 | // SetContentType sets the ContentType field's value. | ||
11022 | func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput { | ||
11023 | s.ContentType = &v | ||
11024 | return s | ||
11025 | } | ||
11026 | |||
11027 | // SetDeleteMarker sets the DeleteMarker field's value. | ||
11028 | func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput { | ||
11029 | s.DeleteMarker = &v | ||
11030 | return s | ||
11031 | } | ||
11032 | |||
11033 | // SetETag sets the ETag field's value. | ||
11034 | func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput { | ||
11035 | s.ETag = &v | ||
11036 | return s | ||
11037 | } | ||
11038 | |||
11039 | // SetExpiration sets the Expiration field's value. | ||
11040 | func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput { | ||
11041 | s.Expiration = &v | ||
11042 | return s | ||
11043 | } | ||
11044 | |||
11045 | // SetExpires sets the Expires field's value. | ||
11046 | func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput { | ||
11047 | s.Expires = &v | ||
11048 | return s | ||
11049 | } | ||
11050 | |||
11051 | // SetLastModified sets the LastModified field's value. | ||
11052 | func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput { | ||
11053 | s.LastModified = &v | ||
11054 | return s | ||
11055 | } | ||
11056 | |||
11057 | // SetMetadata sets the Metadata field's value. | ||
11058 | func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput { | ||
11059 | s.Metadata = v | ||
11060 | return s | ||
11061 | } | ||
11062 | |||
11063 | // SetMissingMeta sets the MissingMeta field's value. | ||
11064 | func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput { | ||
11065 | s.MissingMeta = &v | ||
11066 | return s | ||
11067 | } | ||
11068 | |||
11069 | // SetPartsCount sets the PartsCount field's value. | ||
11070 | func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput { | ||
11071 | s.PartsCount = &v | ||
11072 | return s | ||
11073 | } | ||
11074 | |||
11075 | // SetReplicationStatus sets the ReplicationStatus field's value. | ||
11076 | func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput { | ||
11077 | s.ReplicationStatus = &v | ||
11078 | return s | ||
11079 | } | ||
11080 | |||
11081 | // SetRequestCharged sets the RequestCharged field's value. | ||
11082 | func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput { | ||
11083 | s.RequestCharged = &v | ||
11084 | return s | ||
11085 | } | ||
11086 | |||
11087 | // SetRestore sets the Restore field's value. | ||
11088 | func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput { | ||
11089 | s.Restore = &v | ||
11090 | return s | ||
11091 | } | ||
11092 | |||
11093 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
11094 | func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput { | ||
11095 | s.SSECustomerAlgorithm = &v | ||
11096 | return s | ||
11097 | } | ||
11098 | |||
11099 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
11100 | func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput { | ||
11101 | s.SSECustomerKeyMD5 = &v | ||
11102 | return s | ||
11103 | } | ||
11104 | |||
11105 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
11106 | func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput { | ||
11107 | s.SSEKMSKeyId = &v | ||
11108 | return s | ||
11109 | } | ||
11110 | |||
11111 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
11112 | func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput { | ||
11113 | s.ServerSideEncryption = &v | ||
11114 | return s | ||
11115 | } | ||
11116 | |||
11117 | // SetStorageClass sets the StorageClass field's value. | ||
11118 | func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput { | ||
11119 | s.StorageClass = &v | ||
11120 | return s | ||
11121 | } | ||
11122 | |||
11123 | // SetTagCount sets the TagCount field's value. | ||
11124 | func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput { | ||
11125 | s.TagCount = &v | ||
11126 | return s | ||
11127 | } | ||
11128 | |||
11129 | // SetVersionId sets the VersionId field's value. | ||
11130 | func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput { | ||
11131 | s.VersionId = &v | ||
11132 | return s | ||
11133 | } | ||
11134 | |||
11135 | // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. | ||
11136 | func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput { | ||
11137 | s.WebsiteRedirectLocation = &v | ||
11138 | return s | ||
11139 | } | ||
11140 | |||
11141 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingRequest | ||
11142 | type GetObjectTaggingInput struct { | ||
11143 | _ struct{} `type:"structure"` | ||
11144 | |||
11145 | // Bucket is a required field | ||
11146 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
11147 | |||
11148 | // Key is a required field | ||
11149 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
11150 | |||
11151 | VersionId *string `location:"querystring" locationName:"versionId" type:"string"` | ||
11152 | } | ||
11153 | |||
11154 | // String returns the string representation | ||
11155 | func (s GetObjectTaggingInput) String() string { | ||
11156 | return awsutil.Prettify(s) | ||
11157 | } | ||
11158 | |||
11159 | // GoString returns the string representation | ||
11160 | func (s GetObjectTaggingInput) GoString() string { | ||
11161 | return s.String() | ||
11162 | } | ||
11163 | |||
11164 | // Validate inspects the fields of the type to determine if they are valid. | ||
11165 | func (s *GetObjectTaggingInput) Validate() error { | ||
11166 | invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"} | ||
11167 | if s.Bucket == nil { | ||
11168 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
11169 | } | ||
11170 | if s.Key == nil { | ||
11171 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
11172 | } | ||
11173 | if s.Key != nil && len(*s.Key) < 1 { | ||
11174 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
11175 | } | ||
11176 | |||
11177 | if invalidParams.Len() > 0 { | ||
11178 | return invalidParams | ||
11179 | } | ||
11180 | return nil | ||
11181 | } | ||
11182 | |||
11183 | // SetBucket sets the Bucket field's value. | ||
11184 | func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput { | ||
11185 | s.Bucket = &v | ||
11186 | return s | ||
11187 | } | ||
11188 | |||
11189 | // SetKey sets the Key field's value. | ||
11190 | func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput { | ||
11191 | s.Key = &v | ||
11192 | return s | ||
11193 | } | ||
11194 | |||
11195 | // SetVersionId sets the VersionId field's value. | ||
11196 | func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput { | ||
11197 | s.VersionId = &v | ||
11198 | return s | ||
11199 | } | ||
11200 | |||
11201 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingOutput | ||
11202 | type GetObjectTaggingOutput struct { | ||
11203 | _ struct{} `type:"structure"` | ||
11204 | |||
11205 | // TagSet is a required field | ||
11206 | TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"` | ||
11207 | |||
11208 | VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` | ||
11209 | } | ||
11210 | |||
11211 | // String returns the string representation | ||
11212 | func (s GetObjectTaggingOutput) String() string { | ||
11213 | return awsutil.Prettify(s) | ||
11214 | } | ||
11215 | |||
11216 | // GoString returns the string representation | ||
11217 | func (s GetObjectTaggingOutput) GoString() string { | ||
11218 | return s.String() | ||
11219 | } | ||
11220 | |||
11221 | // SetTagSet sets the TagSet field's value. | ||
11222 | func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput { | ||
11223 | s.TagSet = v | ||
11224 | return s | ||
11225 | } | ||
11226 | |||
11227 | // SetVersionId sets the VersionId field's value. | ||
11228 | func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput { | ||
11229 | s.VersionId = &v | ||
11230 | return s | ||
11231 | } | ||
11232 | |||
11233 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentRequest | ||
11234 | type GetObjectTorrentInput struct { | ||
11235 | _ struct{} `type:"structure"` | ||
11236 | |||
11237 | // Bucket is a required field | ||
11238 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
11239 | |||
11240 | // Key is a required field | ||
11241 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
11242 | |||
11243 | // Confirms that the requester knows that she or he will be charged for the | ||
11244 | // request. Bucket owners need not specify this parameter in their requests. | ||
11245 | // Documentation on downloading objects from requester pays buckets can be found | ||
11246 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
11247 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
11248 | } | ||
11249 | |||
11250 | // String returns the string representation | ||
11251 | func (s GetObjectTorrentInput) String() string { | ||
11252 | return awsutil.Prettify(s) | ||
11253 | } | ||
11254 | |||
11255 | // GoString returns the string representation | ||
11256 | func (s GetObjectTorrentInput) GoString() string { | ||
11257 | return s.String() | ||
11258 | } | ||
11259 | |||
11260 | // Validate inspects the fields of the type to determine if they are valid. | ||
11261 | func (s *GetObjectTorrentInput) Validate() error { | ||
11262 | invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"} | ||
11263 | if s.Bucket == nil { | ||
11264 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
11265 | } | ||
11266 | if s.Key == nil { | ||
11267 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
11268 | } | ||
11269 | if s.Key != nil && len(*s.Key) < 1 { | ||
11270 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
11271 | } | ||
11272 | |||
11273 | if invalidParams.Len() > 0 { | ||
11274 | return invalidParams | ||
11275 | } | ||
11276 | return nil | ||
11277 | } | ||
11278 | |||
11279 | // SetBucket sets the Bucket field's value. | ||
11280 | func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput { | ||
11281 | s.Bucket = &v | ||
11282 | return s | ||
11283 | } | ||
11284 | |||
11285 | // SetKey sets the Key field's value. | ||
11286 | func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput { | ||
11287 | s.Key = &v | ||
11288 | return s | ||
11289 | } | ||
11290 | |||
11291 | // SetRequestPayer sets the RequestPayer field's value. | ||
11292 | func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput { | ||
11293 | s.RequestPayer = &v | ||
11294 | return s | ||
11295 | } | ||
11296 | |||
11297 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentOutput | ||
11298 | type GetObjectTorrentOutput struct { | ||
11299 | _ struct{} `type:"structure" payload:"Body"` | ||
11300 | |||
11301 | Body io.ReadCloser `type:"blob"` | ||
11302 | |||
11303 | // If present, indicates that the requester was successfully charged for the | ||
11304 | // request. | ||
11305 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
11306 | } | ||
11307 | |||
11308 | // String returns the string representation | ||
11309 | func (s GetObjectTorrentOutput) String() string { | ||
11310 | return awsutil.Prettify(s) | ||
11311 | } | ||
11312 | |||
11313 | // GoString returns the string representation | ||
11314 | func (s GetObjectTorrentOutput) GoString() string { | ||
11315 | return s.String() | ||
11316 | } | ||
11317 | |||
11318 | // SetBody sets the Body field's value. | ||
11319 | func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput { | ||
11320 | s.Body = v | ||
11321 | return s | ||
11322 | } | ||
11323 | |||
11324 | // SetRequestCharged sets the RequestCharged field's value. | ||
11325 | func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput { | ||
11326 | s.RequestCharged = &v | ||
11327 | return s | ||
11328 | } | ||
11329 | |||
11330 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GlacierJobParameters | ||
11331 | type GlacierJobParameters struct { | ||
11332 | _ struct{} `type:"structure"` | ||
11333 | |||
11334 | // Glacier retrieval tier at which the restore will be processed. | ||
11335 | // | ||
11336 | // Tier is a required field | ||
11337 | Tier *string `type:"string" required:"true" enum:"Tier"` | ||
11338 | } | ||
11339 | |||
11340 | // String returns the string representation | ||
11341 | func (s GlacierJobParameters) String() string { | ||
11342 | return awsutil.Prettify(s) | ||
11343 | } | ||
11344 | |||
11345 | // GoString returns the string representation | ||
11346 | func (s GlacierJobParameters) GoString() string { | ||
11347 | return s.String() | ||
11348 | } | ||
11349 | |||
11350 | // Validate inspects the fields of the type to determine if they are valid. | ||
11351 | func (s *GlacierJobParameters) Validate() error { | ||
11352 | invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"} | ||
11353 | if s.Tier == nil { | ||
11354 | invalidParams.Add(request.NewErrParamRequired("Tier")) | ||
11355 | } | ||
11356 | |||
11357 | if invalidParams.Len() > 0 { | ||
11358 | return invalidParams | ||
11359 | } | ||
11360 | return nil | ||
11361 | } | ||
11362 | |||
11363 | // SetTier sets the Tier field's value. | ||
11364 | func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters { | ||
11365 | s.Tier = &v | ||
11366 | return s | ||
11367 | } | ||
11368 | |||
11369 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grant | ||
11370 | type Grant struct { | ||
11371 | _ struct{} `type:"structure"` | ||
11372 | |||
11373 | Grantee *Grantee `type:"structure"` | ||
11374 | |||
11375 | // Specifies the permission given to the grantee. | ||
11376 | Permission *string `type:"string" enum:"Permission"` | ||
11377 | } | ||
11378 | |||
11379 | // String returns the string representation | ||
11380 | func (s Grant) String() string { | ||
11381 | return awsutil.Prettify(s) | ||
11382 | } | ||
11383 | |||
11384 | // GoString returns the string representation | ||
11385 | func (s Grant) GoString() string { | ||
11386 | return s.String() | ||
11387 | } | ||
11388 | |||
11389 | // Validate inspects the fields of the type to determine if they are valid. | ||
11390 | func (s *Grant) Validate() error { | ||
11391 | invalidParams := request.ErrInvalidParams{Context: "Grant"} | ||
11392 | if s.Grantee != nil { | ||
11393 | if err := s.Grantee.Validate(); err != nil { | ||
11394 | invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams)) | ||
11395 | } | ||
11396 | } | ||
11397 | |||
11398 | if invalidParams.Len() > 0 { | ||
11399 | return invalidParams | ||
11400 | } | ||
11401 | return nil | ||
11402 | } | ||
11403 | |||
11404 | // SetGrantee sets the Grantee field's value. | ||
11405 | func (s *Grant) SetGrantee(v *Grantee) *Grant { | ||
11406 | s.Grantee = v | ||
11407 | return s | ||
11408 | } | ||
11409 | |||
11410 | // SetPermission sets the Permission field's value. | ||
11411 | func (s *Grant) SetPermission(v string) *Grant { | ||
11412 | s.Permission = &v | ||
11413 | return s | ||
11414 | } | ||
11415 | |||
11416 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grantee | ||
11417 | type Grantee struct { | ||
11418 | _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` | ||
11419 | |||
11420 | // Screen name of the grantee. | ||
11421 | DisplayName *string `type:"string"` | ||
11422 | |||
11423 | // Email address of the grantee. | ||
11424 | EmailAddress *string `type:"string"` | ||
11425 | |||
11426 | // The canonical user ID of the grantee. | ||
11427 | ID *string `type:"string"` | ||
11428 | |||
11429 | // Type of grantee | ||
11430 | // | ||
11431 | // Type is a required field | ||
11432 | Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"` | ||
11433 | |||
11434 | // URI of the grantee group. | ||
11435 | URI *string `type:"string"` | ||
11436 | } | ||
11437 | |||
11438 | // String returns the string representation | ||
11439 | func (s Grantee) String() string { | ||
11440 | return awsutil.Prettify(s) | ||
11441 | } | ||
11442 | |||
11443 | // GoString returns the string representation | ||
11444 | func (s Grantee) GoString() string { | ||
11445 | return s.String() | ||
11446 | } | ||
11447 | |||
11448 | // Validate inspects the fields of the type to determine if they are valid. | ||
11449 | func (s *Grantee) Validate() error { | ||
11450 | invalidParams := request.ErrInvalidParams{Context: "Grantee"} | ||
11451 | if s.Type == nil { | ||
11452 | invalidParams.Add(request.NewErrParamRequired("Type")) | ||
11453 | } | ||
11454 | |||
11455 | if invalidParams.Len() > 0 { | ||
11456 | return invalidParams | ||
11457 | } | ||
11458 | return nil | ||
11459 | } | ||
11460 | |||
11461 | // SetDisplayName sets the DisplayName field's value. | ||
11462 | func (s *Grantee) SetDisplayName(v string) *Grantee { | ||
11463 | s.DisplayName = &v | ||
11464 | return s | ||
11465 | } | ||
11466 | |||
11467 | // SetEmailAddress sets the EmailAddress field's value. | ||
11468 | func (s *Grantee) SetEmailAddress(v string) *Grantee { | ||
11469 | s.EmailAddress = &v | ||
11470 | return s | ||
11471 | } | ||
11472 | |||
11473 | // SetID sets the ID field's value. | ||
11474 | func (s *Grantee) SetID(v string) *Grantee { | ||
11475 | s.ID = &v | ||
11476 | return s | ||
11477 | } | ||
11478 | |||
11479 | // SetType sets the Type field's value. | ||
11480 | func (s *Grantee) SetType(v string) *Grantee { | ||
11481 | s.Type = &v | ||
11482 | return s | ||
11483 | } | ||
11484 | |||
11485 | // SetURI sets the URI field's value. | ||
11486 | func (s *Grantee) SetURI(v string) *Grantee { | ||
11487 | s.URI = &v | ||
11488 | return s | ||
11489 | } | ||
11490 | |||
11491 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketRequest | ||
11492 | type HeadBucketInput struct { | ||
11493 | _ struct{} `type:"structure"` | ||
11494 | |||
11495 | // Bucket is a required field | ||
11496 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
11497 | } | ||
11498 | |||
11499 | // String returns the string representation | ||
11500 | func (s HeadBucketInput) String() string { | ||
11501 | return awsutil.Prettify(s) | ||
11502 | } | ||
11503 | |||
11504 | // GoString returns the string representation | ||
11505 | func (s HeadBucketInput) GoString() string { | ||
11506 | return s.String() | ||
11507 | } | ||
11508 | |||
11509 | // Validate inspects the fields of the type to determine if they are valid. | ||
11510 | func (s *HeadBucketInput) Validate() error { | ||
11511 | invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"} | ||
11512 | if s.Bucket == nil { | ||
11513 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
11514 | } | ||
11515 | |||
11516 | if invalidParams.Len() > 0 { | ||
11517 | return invalidParams | ||
11518 | } | ||
11519 | return nil | ||
11520 | } | ||
11521 | |||
11522 | // SetBucket sets the Bucket field's value. | ||
11523 | func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput { | ||
11524 | s.Bucket = &v | ||
11525 | return s | ||
11526 | } | ||
11527 | |||
11528 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketOutput | ||
11529 | type HeadBucketOutput struct { | ||
11530 | _ struct{} `type:"structure"` | ||
11531 | } | ||
11532 | |||
11533 | // String returns the string representation | ||
11534 | func (s HeadBucketOutput) String() string { | ||
11535 | return awsutil.Prettify(s) | ||
11536 | } | ||
11537 | |||
11538 | // GoString returns the string representation | ||
11539 | func (s HeadBucketOutput) GoString() string { | ||
11540 | return s.String() | ||
11541 | } | ||
11542 | |||
11543 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectRequest | ||
11544 | type HeadObjectInput struct { | ||
11545 | _ struct{} `type:"structure"` | ||
11546 | |||
11547 | // Bucket is a required field | ||
11548 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
11549 | |||
11550 | // Return the object only if its entity tag (ETag) is the same as the one specified, | ||
11551 | // otherwise return a 412 (precondition failed). | ||
11552 | IfMatch *string `location:"header" locationName:"If-Match" type:"string"` | ||
11553 | |||
11554 | // Return the object only if it has been modified since the specified time, | ||
11555 | // otherwise return a 304 (not modified). | ||
11556 | IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"` | ||
11557 | |||
11558 | // Return the object only if its entity tag (ETag) is different from the one | ||
11559 | // specified, otherwise return a 304 (not modified). | ||
11560 | IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"` | ||
11561 | |||
11562 | // Return the object only if it has not been modified since the specified time, | ||
11563 | // otherwise return a 412 (precondition failed). | ||
11564 | IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"` | ||
11565 | |||
11566 | // Key is a required field | ||
11567 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
11568 | |||
11569 | // Part number of the object being read. This is a positive integer between | ||
11570 | // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. | ||
11571 | // Useful querying about the size of the part and the number of parts in this | ||
11572 | // object. | ||
11573 | PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"` | ||
11574 | |||
11575 | // Downloads the specified range bytes of an object. For more information about | ||
11576 | // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35. | ||
11577 | Range *string `location:"header" locationName:"Range" type:"string"` | ||
11578 | |||
11579 | // Confirms that the requester knows that she or he will be charged for the | ||
11580 | // request. Bucket owners need not specify this parameter in their requests. | ||
11581 | // Documentation on downloading objects from requester pays buckets can be found | ||
11582 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
11583 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
11584 | |||
11585 | // Specifies the algorithm to use to when encrypting the object (e.g., AES256). | ||
11586 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
11587 | |||
11588 | // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting | ||
11589 | // data. This value is used to store the object and then it is discarded; Amazon | ||
11590 | // does not store the encryption key. The key must be appropriate for use with | ||
11591 | // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm | ||
11592 | // header. | ||
11593 | SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` | ||
11594 | |||
11595 | // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | ||
11596 | // Amazon S3 uses this header for a message integrity check to ensure the encryption | ||
11597 | // key was transmitted without error. | ||
11598 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
11599 | |||
11600 | // VersionId used to reference a specific version of the object. | ||
11601 | VersionId *string `location:"querystring" locationName:"versionId" type:"string"` | ||
11602 | } | ||
11603 | |||
11604 | // String returns the string representation | ||
11605 | func (s HeadObjectInput) String() string { | ||
11606 | return awsutil.Prettify(s) | ||
11607 | } | ||
11608 | |||
11609 | // GoString returns the string representation | ||
11610 | func (s HeadObjectInput) GoString() string { | ||
11611 | return s.String() | ||
11612 | } | ||
11613 | |||
11614 | // Validate inspects the fields of the type to determine if they are valid. | ||
11615 | func (s *HeadObjectInput) Validate() error { | ||
11616 | invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"} | ||
11617 | if s.Bucket == nil { | ||
11618 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
11619 | } | ||
11620 | if s.Key == nil { | ||
11621 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
11622 | } | ||
11623 | if s.Key != nil && len(*s.Key) < 1 { | ||
11624 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
11625 | } | ||
11626 | |||
11627 | if invalidParams.Len() > 0 { | ||
11628 | return invalidParams | ||
11629 | } | ||
11630 | return nil | ||
11631 | } | ||
11632 | |||
11633 | // SetBucket sets the Bucket field's value. | ||
11634 | func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput { | ||
11635 | s.Bucket = &v | ||
11636 | return s | ||
11637 | } | ||
11638 | |||
11639 | // SetIfMatch sets the IfMatch field's value. | ||
11640 | func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput { | ||
11641 | s.IfMatch = &v | ||
11642 | return s | ||
11643 | } | ||
11644 | |||
11645 | // SetIfModifiedSince sets the IfModifiedSince field's value. | ||
11646 | func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput { | ||
11647 | s.IfModifiedSince = &v | ||
11648 | return s | ||
11649 | } | ||
11650 | |||
11651 | // SetIfNoneMatch sets the IfNoneMatch field's value. | ||
11652 | func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput { | ||
11653 | s.IfNoneMatch = &v | ||
11654 | return s | ||
11655 | } | ||
11656 | |||
11657 | // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value. | ||
11658 | func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput { | ||
11659 | s.IfUnmodifiedSince = &v | ||
11660 | return s | ||
11661 | } | ||
11662 | |||
11663 | // SetKey sets the Key field's value. | ||
11664 | func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput { | ||
11665 | s.Key = &v | ||
11666 | return s | ||
11667 | } | ||
11668 | |||
11669 | // SetPartNumber sets the PartNumber field's value. | ||
11670 | func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput { | ||
11671 | s.PartNumber = &v | ||
11672 | return s | ||
11673 | } | ||
11674 | |||
11675 | // SetRange sets the Range field's value. | ||
11676 | func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput { | ||
11677 | s.Range = &v | ||
11678 | return s | ||
11679 | } | ||
11680 | |||
11681 | // SetRequestPayer sets the RequestPayer field's value. | ||
11682 | func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput { | ||
11683 | s.RequestPayer = &v | ||
11684 | return s | ||
11685 | } | ||
11686 | |||
11687 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
11688 | func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput { | ||
11689 | s.SSECustomerAlgorithm = &v | ||
11690 | return s | ||
11691 | } | ||
11692 | |||
11693 | // SetSSECustomerKey sets the SSECustomerKey field's value. | ||
11694 | func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput { | ||
11695 | s.SSECustomerKey = &v | ||
11696 | return s | ||
11697 | } | ||
11698 | |||
11699 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
11700 | func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput { | ||
11701 | s.SSECustomerKeyMD5 = &v | ||
11702 | return s | ||
11703 | } | ||
11704 | |||
11705 | // SetVersionId sets the VersionId field's value. | ||
11706 | func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput { | ||
11707 | s.VersionId = &v | ||
11708 | return s | ||
11709 | } | ||
11710 | |||
11711 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectOutput | ||
11712 | type HeadObjectOutput struct { | ||
11713 | _ struct{} `type:"structure"` | ||
11714 | |||
11715 | AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"` | ||
11716 | |||
11717 | // Specifies caching behavior along the request/reply chain. | ||
11718 | CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` | ||
11719 | |||
11720 | // Specifies presentational information for the object. | ||
11721 | ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` | ||
11722 | |||
11723 | // Specifies what content encodings have been applied to the object and thus | ||
11724 | // what decoding mechanisms must be applied to obtain the media-type referenced | ||
11725 | // by the Content-Type header field. | ||
11726 | ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` | ||
11727 | |||
11728 | // The language the content is in. | ||
11729 | ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` | ||
11730 | |||
11731 | // Size of the body in bytes. | ||
11732 | ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` | ||
11733 | |||
11734 | // A standard MIME type describing the format of the object data. | ||
11735 | ContentType *string `location:"header" locationName:"Content-Type" type:"string"` | ||
11736 | |||
11737 | // Specifies whether the object retrieved was (true) or was not (false) a Delete | ||
11738 | // Marker. If false, this response header does not appear in the response. | ||
11739 | DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"` | ||
11740 | |||
11741 | // An ETag is an opaque identifier assigned by a web server to a specific version | ||
11742 | // of a resource found at a URL | ||
11743 | ETag *string `location:"header" locationName:"ETag" type:"string"` | ||
11744 | |||
11745 | // If the object expiration is configured (see PUT Bucket lifecycle), the response | ||
11746 | // includes this header. It includes the expiry-date and rule-id key value pairs | ||
11747 | // providing object expiration information. The value of the rule-id is URL | ||
11748 | // encoded. | ||
11749 | Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` | ||
11750 | |||
11751 | // The date and time at which the object is no longer cacheable. | ||
11752 | Expires *string `location:"header" locationName:"Expires" type:"string"` | ||
11753 | |||
11754 | // Last modified date of the object | ||
11755 | LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"` | ||
11756 | |||
11757 | // A map of metadata to store with the object in S3. | ||
11758 | Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` | ||
11759 | |||
11760 | // This is set to the number of metadata entries not returned in x-amz-meta | ||
11761 | // headers. This can happen if you create metadata using an API like SOAP that | ||
11762 | // supports more flexible metadata than the REST API. For example, using SOAP, | ||
11763 | // you can create metadata whose values are not legal HTTP headers. | ||
11764 | MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"` | ||
11765 | |||
11766 | // The count of parts this object has. | ||
11767 | PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"` | ||
11768 | |||
11769 | ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"` | ||
11770 | |||
11771 | // If present, indicates that the requester was successfully charged for the | ||
11772 | // request. | ||
11773 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
11774 | |||
11775 | // Provides information about object restoration operation and expiration time | ||
11776 | // of the restored object copy. | ||
11777 | Restore *string `location:"header" locationName:"x-amz-restore" type:"string"` | ||
11778 | |||
11779 | // If server-side encryption with a customer-provided encryption key was requested, | ||
11780 | // the response will include this header confirming the encryption algorithm | ||
11781 | // used. | ||
11782 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
11783 | |||
11784 | // If server-side encryption with a customer-provided encryption key was requested, | ||
11785 | // the response will include this header to provide round trip message integrity | ||
11786 | // verification of the customer-provided encryption key. | ||
11787 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
11788 | |||
11789 | // If present, specifies the ID of the AWS Key Management Service (KMS) master | ||
11790 | // encryption key that was used for the object. | ||
11791 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
11792 | |||
11793 | // The Server-side encryption algorithm used when storing this object in S3 | ||
11794 | // (e.g., AES256, aws:kms). | ||
11795 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
11796 | |||
11797 | StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` | ||
11798 | |||
11799 | // Version of the object. | ||
11800 | VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` | ||
11801 | |||
11802 | // If the bucket is configured as a website, redirects requests for this object | ||
11803 | // to another object in the same bucket or to an external URL. Amazon S3 stores | ||
11804 | // the value of this header in the object metadata. | ||
11805 | WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"` | ||
11806 | } | ||
11807 | |||
11808 | // String returns the string representation | ||
11809 | func (s HeadObjectOutput) String() string { | ||
11810 | return awsutil.Prettify(s) | ||
11811 | } | ||
11812 | |||
11813 | // GoString returns the string representation | ||
11814 | func (s HeadObjectOutput) GoString() string { | ||
11815 | return s.String() | ||
11816 | } | ||
11817 | |||
11818 | // SetAcceptRanges sets the AcceptRanges field's value. | ||
11819 | func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput { | ||
11820 | s.AcceptRanges = &v | ||
11821 | return s | ||
11822 | } | ||
11823 | |||
11824 | // SetCacheControl sets the CacheControl field's value. | ||
11825 | func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput { | ||
11826 | s.CacheControl = &v | ||
11827 | return s | ||
11828 | } | ||
11829 | |||
11830 | // SetContentDisposition sets the ContentDisposition field's value. | ||
11831 | func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput { | ||
11832 | s.ContentDisposition = &v | ||
11833 | return s | ||
11834 | } | ||
11835 | |||
11836 | // SetContentEncoding sets the ContentEncoding field's value. | ||
11837 | func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput { | ||
11838 | s.ContentEncoding = &v | ||
11839 | return s | ||
11840 | } | ||
11841 | |||
11842 | // SetContentLanguage sets the ContentLanguage field's value. | ||
11843 | func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput { | ||
11844 | s.ContentLanguage = &v | ||
11845 | return s | ||
11846 | } | ||
11847 | |||
11848 | // SetContentLength sets the ContentLength field's value. | ||
11849 | func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput { | ||
11850 | s.ContentLength = &v | ||
11851 | return s | ||
11852 | } | ||
11853 | |||
11854 | // SetContentType sets the ContentType field's value. | ||
11855 | func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput { | ||
11856 | s.ContentType = &v | ||
11857 | return s | ||
11858 | } | ||
11859 | |||
11860 | // SetDeleteMarker sets the DeleteMarker field's value. | ||
11861 | func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput { | ||
11862 | s.DeleteMarker = &v | ||
11863 | return s | ||
11864 | } | ||
11865 | |||
11866 | // SetETag sets the ETag field's value. | ||
11867 | func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput { | ||
11868 | s.ETag = &v | ||
11869 | return s | ||
11870 | } | ||
11871 | |||
11872 | // SetExpiration sets the Expiration field's value. | ||
11873 | func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput { | ||
11874 | s.Expiration = &v | ||
11875 | return s | ||
11876 | } | ||
11877 | |||
11878 | // SetExpires sets the Expires field's value. | ||
11879 | func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput { | ||
11880 | s.Expires = &v | ||
11881 | return s | ||
11882 | } | ||
11883 | |||
11884 | // SetLastModified sets the LastModified field's value. | ||
11885 | func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput { | ||
11886 | s.LastModified = &v | ||
11887 | return s | ||
11888 | } | ||
11889 | |||
11890 | // SetMetadata sets the Metadata field's value. | ||
11891 | func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput { | ||
11892 | s.Metadata = v | ||
11893 | return s | ||
11894 | } | ||
11895 | |||
11896 | // SetMissingMeta sets the MissingMeta field's value. | ||
11897 | func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput { | ||
11898 | s.MissingMeta = &v | ||
11899 | return s | ||
11900 | } | ||
11901 | |||
11902 | // SetPartsCount sets the PartsCount field's value. | ||
11903 | func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput { | ||
11904 | s.PartsCount = &v | ||
11905 | return s | ||
11906 | } | ||
11907 | |||
11908 | // SetReplicationStatus sets the ReplicationStatus field's value. | ||
11909 | func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput { | ||
11910 | s.ReplicationStatus = &v | ||
11911 | return s | ||
11912 | } | ||
11913 | |||
11914 | // SetRequestCharged sets the RequestCharged field's value. | ||
11915 | func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput { | ||
11916 | s.RequestCharged = &v | ||
11917 | return s | ||
11918 | } | ||
11919 | |||
11920 | // SetRestore sets the Restore field's value. | ||
11921 | func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput { | ||
11922 | s.Restore = &v | ||
11923 | return s | ||
11924 | } | ||
11925 | |||
11926 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
11927 | func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput { | ||
11928 | s.SSECustomerAlgorithm = &v | ||
11929 | return s | ||
11930 | } | ||
11931 | |||
11932 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
11933 | func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput { | ||
11934 | s.SSECustomerKeyMD5 = &v | ||
11935 | return s | ||
11936 | } | ||
11937 | |||
11938 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
11939 | func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput { | ||
11940 | s.SSEKMSKeyId = &v | ||
11941 | return s | ||
11942 | } | ||
11943 | |||
11944 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
11945 | func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput { | ||
11946 | s.ServerSideEncryption = &v | ||
11947 | return s | ||
11948 | } | ||
11949 | |||
11950 | // SetStorageClass sets the StorageClass field's value. | ||
11951 | func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput { | ||
11952 | s.StorageClass = &v | ||
11953 | return s | ||
11954 | } | ||
11955 | |||
11956 | // SetVersionId sets the VersionId field's value. | ||
11957 | func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput { | ||
11958 | s.VersionId = &v | ||
11959 | return s | ||
11960 | } | ||
11961 | |||
11962 | // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. | ||
11963 | func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput { | ||
11964 | s.WebsiteRedirectLocation = &v | ||
11965 | return s | ||
11966 | } | ||
11967 | |||
11968 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/IndexDocument | ||
11969 | type IndexDocument struct { | ||
11970 | _ struct{} `type:"structure"` | ||
11971 | |||
11972 | // A suffix that is appended to a request that is for a directory on the website | ||
11973 | // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/ | ||
11974 | // the data that is returned will be for the object with the key name images/index.html) | ||
11975 | // The suffix must not be empty and must not include a slash character. | ||
11976 | // | ||
11977 | // Suffix is a required field | ||
11978 | Suffix *string `type:"string" required:"true"` | ||
11979 | } | ||
11980 | |||
11981 | // String returns the string representation | ||
11982 | func (s IndexDocument) String() string { | ||
11983 | return awsutil.Prettify(s) | ||
11984 | } | ||
11985 | |||
11986 | // GoString returns the string representation | ||
11987 | func (s IndexDocument) GoString() string { | ||
11988 | return s.String() | ||
11989 | } | ||
11990 | |||
11991 | // Validate inspects the fields of the type to determine if they are valid. | ||
11992 | func (s *IndexDocument) Validate() error { | ||
11993 | invalidParams := request.ErrInvalidParams{Context: "IndexDocument"} | ||
11994 | if s.Suffix == nil { | ||
11995 | invalidParams.Add(request.NewErrParamRequired("Suffix")) | ||
11996 | } | ||
11997 | |||
11998 | if invalidParams.Len() > 0 { | ||
11999 | return invalidParams | ||
12000 | } | ||
12001 | return nil | ||
12002 | } | ||
12003 | |||
12004 | // SetSuffix sets the Suffix field's value. | ||
12005 | func (s *IndexDocument) SetSuffix(v string) *IndexDocument { | ||
12006 | s.Suffix = &v | ||
12007 | return s | ||
12008 | } | ||
12009 | |||
12010 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Initiator | ||
12011 | type Initiator struct { | ||
12012 | _ struct{} `type:"structure"` | ||
12013 | |||
12014 | // Name of the Principal. | ||
12015 | DisplayName *string `type:"string"` | ||
12016 | |||
12017 | // If the principal is an AWS account, it provides the Canonical User ID. If | ||
12018 | // the principal is an IAM User, it provides a user ARN value. | ||
12019 | ID *string `type:"string"` | ||
12020 | } | ||
12021 | |||
12022 | // String returns the string representation | ||
12023 | func (s Initiator) String() string { | ||
12024 | return awsutil.Prettify(s) | ||
12025 | } | ||
12026 | |||
12027 | // GoString returns the string representation | ||
12028 | func (s Initiator) GoString() string { | ||
12029 | return s.String() | ||
12030 | } | ||
12031 | |||
12032 | // SetDisplayName sets the DisplayName field's value. | ||
12033 | func (s *Initiator) SetDisplayName(v string) *Initiator { | ||
12034 | s.DisplayName = &v | ||
12035 | return s | ||
12036 | } | ||
12037 | |||
12038 | // SetID sets the ID field's value. | ||
12039 | func (s *Initiator) SetID(v string) *Initiator { | ||
12040 | s.ID = &v | ||
12041 | return s | ||
12042 | } | ||
12043 | |||
12044 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryConfiguration | ||
12045 | type InventoryConfiguration struct { | ||
12046 | _ struct{} `type:"structure"` | ||
12047 | |||
12048 | // Contains information about where to publish the inventory results. | ||
12049 | // | ||
12050 | // Destination is a required field | ||
12051 | Destination *InventoryDestination `type:"structure" required:"true"` | ||
12052 | |||
12053 | // Specifies an inventory filter. The inventory only includes objects that meet | ||
12054 | // the filter's criteria. | ||
12055 | Filter *InventoryFilter `type:"structure"` | ||
12056 | |||
12057 | // The ID used to identify the inventory configuration. | ||
12058 | // | ||
12059 | // Id is a required field | ||
12060 | Id *string `type:"string" required:"true"` | ||
12061 | |||
12062 | // Specifies which object version(s) to included in the inventory results. | ||
12063 | // | ||
12064 | // IncludedObjectVersions is a required field | ||
12065 | IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"` | ||
12066 | |||
12067 | // Specifies whether the inventory is enabled or disabled. | ||
12068 | // | ||
12069 | // IsEnabled is a required field | ||
12070 | IsEnabled *bool `type:"boolean" required:"true"` | ||
12071 | |||
12072 | // Contains the optional fields that are included in the inventory results. | ||
12073 | OptionalFields []*string `locationNameList:"Field" type:"list"` | ||
12074 | |||
12075 | // Specifies the schedule for generating inventory results. | ||
12076 | // | ||
12077 | // Schedule is a required field | ||
12078 | Schedule *InventorySchedule `type:"structure" required:"true"` | ||
12079 | } | ||
12080 | |||
12081 | // String returns the string representation | ||
12082 | func (s InventoryConfiguration) String() string { | ||
12083 | return awsutil.Prettify(s) | ||
12084 | } | ||
12085 | |||
12086 | // GoString returns the string representation | ||
12087 | func (s InventoryConfiguration) GoString() string { | ||
12088 | return s.String() | ||
12089 | } | ||
12090 | |||
12091 | // Validate inspects the fields of the type to determine if they are valid. | ||
12092 | func (s *InventoryConfiguration) Validate() error { | ||
12093 | invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"} | ||
12094 | if s.Destination == nil { | ||
12095 | invalidParams.Add(request.NewErrParamRequired("Destination")) | ||
12096 | } | ||
12097 | if s.Id == nil { | ||
12098 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
12099 | } | ||
12100 | if s.IncludedObjectVersions == nil { | ||
12101 | invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions")) | ||
12102 | } | ||
12103 | if s.IsEnabled == nil { | ||
12104 | invalidParams.Add(request.NewErrParamRequired("IsEnabled")) | ||
12105 | } | ||
12106 | if s.Schedule == nil { | ||
12107 | invalidParams.Add(request.NewErrParamRequired("Schedule")) | ||
12108 | } | ||
12109 | if s.Destination != nil { | ||
12110 | if err := s.Destination.Validate(); err != nil { | ||
12111 | invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) | ||
12112 | } | ||
12113 | } | ||
12114 | if s.Filter != nil { | ||
12115 | if err := s.Filter.Validate(); err != nil { | ||
12116 | invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) | ||
12117 | } | ||
12118 | } | ||
12119 | if s.Schedule != nil { | ||
12120 | if err := s.Schedule.Validate(); err != nil { | ||
12121 | invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams)) | ||
12122 | } | ||
12123 | } | ||
12124 | |||
12125 | if invalidParams.Len() > 0 { | ||
12126 | return invalidParams | ||
12127 | } | ||
12128 | return nil | ||
12129 | } | ||
12130 | |||
12131 | // SetDestination sets the Destination field's value. | ||
12132 | func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration { | ||
12133 | s.Destination = v | ||
12134 | return s | ||
12135 | } | ||
12136 | |||
12137 | // SetFilter sets the Filter field's value. | ||
12138 | func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration { | ||
12139 | s.Filter = v | ||
12140 | return s | ||
12141 | } | ||
12142 | |||
12143 | // SetId sets the Id field's value. | ||
12144 | func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration { | ||
12145 | s.Id = &v | ||
12146 | return s | ||
12147 | } | ||
12148 | |||
12149 | // SetIncludedObjectVersions sets the IncludedObjectVersions field's value. | ||
12150 | func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration { | ||
12151 | s.IncludedObjectVersions = &v | ||
12152 | return s | ||
12153 | } | ||
12154 | |||
12155 | // SetIsEnabled sets the IsEnabled field's value. | ||
12156 | func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration { | ||
12157 | s.IsEnabled = &v | ||
12158 | return s | ||
12159 | } | ||
12160 | |||
12161 | // SetOptionalFields sets the OptionalFields field's value. | ||
12162 | func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration { | ||
12163 | s.OptionalFields = v | ||
12164 | return s | ||
12165 | } | ||
12166 | |||
12167 | // SetSchedule sets the Schedule field's value. | ||
12168 | func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration { | ||
12169 | s.Schedule = v | ||
12170 | return s | ||
12171 | } | ||
12172 | |||
12173 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryDestination | ||
12174 | type InventoryDestination struct { | ||
12175 | _ struct{} `type:"structure"` | ||
12176 | |||
12177 | // Contains the bucket name, file format, bucket owner (optional), and prefix | ||
12178 | // (optional) where inventory results are published. | ||
12179 | // | ||
12180 | // S3BucketDestination is a required field | ||
12181 | S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"` | ||
12182 | } | ||
12183 | |||
12184 | // String returns the string representation | ||
12185 | func (s InventoryDestination) String() string { | ||
12186 | return awsutil.Prettify(s) | ||
12187 | } | ||
12188 | |||
12189 | // GoString returns the string representation | ||
12190 | func (s InventoryDestination) GoString() string { | ||
12191 | return s.String() | ||
12192 | } | ||
12193 | |||
12194 | // Validate inspects the fields of the type to determine if they are valid. | ||
12195 | func (s *InventoryDestination) Validate() error { | ||
12196 | invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"} | ||
12197 | if s.S3BucketDestination == nil { | ||
12198 | invalidParams.Add(request.NewErrParamRequired("S3BucketDestination")) | ||
12199 | } | ||
12200 | if s.S3BucketDestination != nil { | ||
12201 | if err := s.S3BucketDestination.Validate(); err != nil { | ||
12202 | invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams)) | ||
12203 | } | ||
12204 | } | ||
12205 | |||
12206 | if invalidParams.Len() > 0 { | ||
12207 | return invalidParams | ||
12208 | } | ||
12209 | return nil | ||
12210 | } | ||
12211 | |||
12212 | // SetS3BucketDestination sets the S3BucketDestination field's value. | ||
12213 | func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination { | ||
12214 | s.S3BucketDestination = v | ||
12215 | return s | ||
12216 | } | ||
12217 | |||
12218 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryFilter | ||
12219 | type InventoryFilter struct { | ||
12220 | _ struct{} `type:"structure"` | ||
12221 | |||
12222 | // The prefix that an object must have to be included in the inventory results. | ||
12223 | // | ||
12224 | // Prefix is a required field | ||
12225 | Prefix *string `type:"string" required:"true"` | ||
12226 | } | ||
12227 | |||
12228 | // String returns the string representation | ||
12229 | func (s InventoryFilter) String() string { | ||
12230 | return awsutil.Prettify(s) | ||
12231 | } | ||
12232 | |||
12233 | // GoString returns the string representation | ||
12234 | func (s InventoryFilter) GoString() string { | ||
12235 | return s.String() | ||
12236 | } | ||
12237 | |||
12238 | // Validate inspects the fields of the type to determine if they are valid. | ||
12239 | func (s *InventoryFilter) Validate() error { | ||
12240 | invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"} | ||
12241 | if s.Prefix == nil { | ||
12242 | invalidParams.Add(request.NewErrParamRequired("Prefix")) | ||
12243 | } | ||
12244 | |||
12245 | if invalidParams.Len() > 0 { | ||
12246 | return invalidParams | ||
12247 | } | ||
12248 | return nil | ||
12249 | } | ||
12250 | |||
12251 | // SetPrefix sets the Prefix field's value. | ||
12252 | func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter { | ||
12253 | s.Prefix = &v | ||
12254 | return s | ||
12255 | } | ||
12256 | |||
12257 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryS3BucketDestination | ||
12258 | type InventoryS3BucketDestination struct { | ||
12259 | _ struct{} `type:"structure"` | ||
12260 | |||
12261 | // The ID of the account that owns the destination bucket. | ||
12262 | AccountId *string `type:"string"` | ||
12263 | |||
12264 | // The Amazon resource name (ARN) of the bucket where inventory results will | ||
12265 | // be published. | ||
12266 | // | ||
12267 | // Bucket is a required field | ||
12268 | Bucket *string `type:"string" required:"true"` | ||
12269 | |||
12270 | // Specifies the output format of the inventory results. | ||
12271 | // | ||
12272 | // Format is a required field | ||
12273 | Format *string `type:"string" required:"true" enum:"InventoryFormat"` | ||
12274 | |||
12275 | // The prefix that is prepended to all inventory results. | ||
12276 | Prefix *string `type:"string"` | ||
12277 | } | ||
12278 | |||
12279 | // String returns the string representation | ||
12280 | func (s InventoryS3BucketDestination) String() string { | ||
12281 | return awsutil.Prettify(s) | ||
12282 | } | ||
12283 | |||
12284 | // GoString returns the string representation | ||
12285 | func (s InventoryS3BucketDestination) GoString() string { | ||
12286 | return s.String() | ||
12287 | } | ||
12288 | |||
12289 | // Validate inspects the fields of the type to determine if they are valid. | ||
12290 | func (s *InventoryS3BucketDestination) Validate() error { | ||
12291 | invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"} | ||
12292 | if s.Bucket == nil { | ||
12293 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
12294 | } | ||
12295 | if s.Format == nil { | ||
12296 | invalidParams.Add(request.NewErrParamRequired("Format")) | ||
12297 | } | ||
12298 | |||
12299 | if invalidParams.Len() > 0 { | ||
12300 | return invalidParams | ||
12301 | } | ||
12302 | return nil | ||
12303 | } | ||
12304 | |||
12305 | // SetAccountId sets the AccountId field's value. | ||
12306 | func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination { | ||
12307 | s.AccountId = &v | ||
12308 | return s | ||
12309 | } | ||
12310 | |||
12311 | // SetBucket sets the Bucket field's value. | ||
12312 | func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination { | ||
12313 | s.Bucket = &v | ||
12314 | return s | ||
12315 | } | ||
12316 | |||
12317 | // SetFormat sets the Format field's value. | ||
12318 | func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination { | ||
12319 | s.Format = &v | ||
12320 | return s | ||
12321 | } | ||
12322 | |||
12323 | // SetPrefix sets the Prefix field's value. | ||
12324 | func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination { | ||
12325 | s.Prefix = &v | ||
12326 | return s | ||
12327 | } | ||
12328 | |||
12329 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventorySchedule | ||
12330 | type InventorySchedule struct { | ||
12331 | _ struct{} `type:"structure"` | ||
12332 | |||
12333 | // Specifies how frequently inventory results are produced. | ||
12334 | // | ||
12335 | // Frequency is a required field | ||
12336 | Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"` | ||
12337 | } | ||
12338 | |||
12339 | // String returns the string representation | ||
12340 | func (s InventorySchedule) String() string { | ||
12341 | return awsutil.Prettify(s) | ||
12342 | } | ||
12343 | |||
12344 | // GoString returns the string representation | ||
12345 | func (s InventorySchedule) GoString() string { | ||
12346 | return s.String() | ||
12347 | } | ||
12348 | |||
12349 | // Validate inspects the fields of the type to determine if they are valid. | ||
12350 | func (s *InventorySchedule) Validate() error { | ||
12351 | invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"} | ||
12352 | if s.Frequency == nil { | ||
12353 | invalidParams.Add(request.NewErrParamRequired("Frequency")) | ||
12354 | } | ||
12355 | |||
12356 | if invalidParams.Len() > 0 { | ||
12357 | return invalidParams | ||
12358 | } | ||
12359 | return nil | ||
12360 | } | ||
12361 | |||
12362 | // SetFrequency sets the Frequency field's value. | ||
12363 | func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule { | ||
12364 | s.Frequency = &v | ||
12365 | return s | ||
12366 | } | ||
12367 | |||
12368 | // Container for object key name prefix and suffix filtering rules. | ||
12369 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/S3KeyFilter | ||
12370 | type KeyFilter struct { | ||
12371 | _ struct{} `type:"structure"` | ||
12372 | |||
12373 | // A list of containers for key value pair that defines the criteria for the | ||
12374 | // filter rule. | ||
12375 | FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"` | ||
12376 | } | ||
12377 | |||
12378 | // String returns the string representation | ||
12379 | func (s KeyFilter) String() string { | ||
12380 | return awsutil.Prettify(s) | ||
12381 | } | ||
12382 | |||
12383 | // GoString returns the string representation | ||
12384 | func (s KeyFilter) GoString() string { | ||
12385 | return s.String() | ||
12386 | } | ||
12387 | |||
12388 | // SetFilterRules sets the FilterRules field's value. | ||
12389 | func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter { | ||
12390 | s.FilterRules = v | ||
12391 | return s | ||
12392 | } | ||
12393 | |||
12394 | // Container for specifying the AWS Lambda notification configuration. | ||
12395 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LambdaFunctionConfiguration | ||
12396 | type LambdaFunctionConfiguration struct { | ||
12397 | _ struct{} `type:"structure"` | ||
12398 | |||
12399 | // Events is a required field | ||
12400 | Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"` | ||
12401 | |||
12402 | // Container for object key name filtering rules. For information about key | ||
12403 | // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) | ||
12404 | Filter *NotificationConfigurationFilter `type:"structure"` | ||
12405 | |||
12406 | // Optional unique identifier for configurations in a notification configuration. | ||
12407 | // If you don't provide one, Amazon S3 will assign an ID. | ||
12408 | Id *string `type:"string"` | ||
12409 | |||
12410 | // Lambda cloud function ARN that Amazon S3 can invoke when it detects events | ||
12411 | // of the specified type. | ||
12412 | // | ||
12413 | // LambdaFunctionArn is a required field | ||
12414 | LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"` | ||
12415 | } | ||
12416 | |||
12417 | // String returns the string representation | ||
12418 | func (s LambdaFunctionConfiguration) String() string { | ||
12419 | return awsutil.Prettify(s) | ||
12420 | } | ||
12421 | |||
12422 | // GoString returns the string representation | ||
12423 | func (s LambdaFunctionConfiguration) GoString() string { | ||
12424 | return s.String() | ||
12425 | } | ||
12426 | |||
12427 | // Validate inspects the fields of the type to determine if they are valid. | ||
12428 | func (s *LambdaFunctionConfiguration) Validate() error { | ||
12429 | invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"} | ||
12430 | if s.Events == nil { | ||
12431 | invalidParams.Add(request.NewErrParamRequired("Events")) | ||
12432 | } | ||
12433 | if s.LambdaFunctionArn == nil { | ||
12434 | invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn")) | ||
12435 | } | ||
12436 | |||
12437 | if invalidParams.Len() > 0 { | ||
12438 | return invalidParams | ||
12439 | } | ||
12440 | return nil | ||
12441 | } | ||
12442 | |||
12443 | // SetEvents sets the Events field's value. | ||
12444 | func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration { | ||
12445 | s.Events = v | ||
12446 | return s | ||
12447 | } | ||
12448 | |||
12449 | // SetFilter sets the Filter field's value. | ||
12450 | func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration { | ||
12451 | s.Filter = v | ||
12452 | return s | ||
12453 | } | ||
12454 | |||
12455 | // SetId sets the Id field's value. | ||
12456 | func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration { | ||
12457 | s.Id = &v | ||
12458 | return s | ||
12459 | } | ||
12460 | |||
12461 | // SetLambdaFunctionArn sets the LambdaFunctionArn field's value. | ||
12462 | func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration { | ||
12463 | s.LambdaFunctionArn = &v | ||
12464 | return s | ||
12465 | } | ||
12466 | |||
12467 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleConfiguration | ||
12468 | type LifecycleConfiguration struct { | ||
12469 | _ struct{} `type:"structure"` | ||
12470 | |||
12471 | // Rules is a required field | ||
12472 | Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"` | ||
12473 | } | ||
12474 | |||
12475 | // String returns the string representation | ||
12476 | func (s LifecycleConfiguration) String() string { | ||
12477 | return awsutil.Prettify(s) | ||
12478 | } | ||
12479 | |||
12480 | // GoString returns the string representation | ||
12481 | func (s LifecycleConfiguration) GoString() string { | ||
12482 | return s.String() | ||
12483 | } | ||
12484 | |||
12485 | // Validate inspects the fields of the type to determine if they are valid. | ||
12486 | func (s *LifecycleConfiguration) Validate() error { | ||
12487 | invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"} | ||
12488 | if s.Rules == nil { | ||
12489 | invalidParams.Add(request.NewErrParamRequired("Rules")) | ||
12490 | } | ||
12491 | if s.Rules != nil { | ||
12492 | for i, v := range s.Rules { | ||
12493 | if v == nil { | ||
12494 | continue | ||
12495 | } | ||
12496 | if err := v.Validate(); err != nil { | ||
12497 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) | ||
12498 | } | ||
12499 | } | ||
12500 | } | ||
12501 | |||
12502 | if invalidParams.Len() > 0 { | ||
12503 | return invalidParams | ||
12504 | } | ||
12505 | return nil | ||
12506 | } | ||
12507 | |||
12508 | // SetRules sets the Rules field's value. | ||
12509 | func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration { | ||
12510 | s.Rules = v | ||
12511 | return s | ||
12512 | } | ||
12513 | |||
12514 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleExpiration | ||
12515 | type LifecycleExpiration struct { | ||
12516 | _ struct{} `type:"structure"` | ||
12517 | |||
12518 | // Indicates at what date the object is to be moved or deleted. Should be in | ||
12519 | // GMT ISO 8601 Format. | ||
12520 | Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
12521 | |||
12522 | // Indicates the lifetime, in days, of the objects that are subject to the rule. | ||
12523 | // The value must be a non-zero positive integer. | ||
12524 | Days *int64 `type:"integer"` | ||
12525 | |||
12526 | // Indicates whether Amazon S3 will remove a delete marker with no noncurrent | ||
12527 | // versions. If set to true, the delete marker will be expired; if set to false | ||
12528 | // the policy takes no action. This cannot be specified with Days or Date in | ||
12529 | // a Lifecycle Expiration Policy. | ||
12530 | ExpiredObjectDeleteMarker *bool `type:"boolean"` | ||
12531 | } | ||
12532 | |||
12533 | // String returns the string representation | ||
12534 | func (s LifecycleExpiration) String() string { | ||
12535 | return awsutil.Prettify(s) | ||
12536 | } | ||
12537 | |||
12538 | // GoString returns the string representation | ||
12539 | func (s LifecycleExpiration) GoString() string { | ||
12540 | return s.String() | ||
12541 | } | ||
12542 | |||
12543 | // SetDate sets the Date field's value. | ||
12544 | func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration { | ||
12545 | s.Date = &v | ||
12546 | return s | ||
12547 | } | ||
12548 | |||
12549 | // SetDays sets the Days field's value. | ||
12550 | func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration { | ||
12551 | s.Days = &v | ||
12552 | return s | ||
12553 | } | ||
12554 | |||
12555 | // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value. | ||
12556 | func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration { | ||
12557 | s.ExpiredObjectDeleteMarker = &v | ||
12558 | return s | ||
12559 | } | ||
12560 | |||
12561 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRule | ||
12562 | type LifecycleRule struct { | ||
12563 | _ struct{} `type:"structure"` | ||
12564 | |||
12565 | // Specifies the days since the initiation of an Incomplete Multipart Upload | ||
12566 | // that Lifecycle will wait before permanently removing all parts of the upload. | ||
12567 | AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"` | ||
12568 | |||
12569 | Expiration *LifecycleExpiration `type:"structure"` | ||
12570 | |||
12571 | // The Filter is used to identify objects that a Lifecycle Rule applies to. | ||
12572 | // A Filter must have exactly one of Prefix, Tag, or And specified. | ||
12573 | Filter *LifecycleRuleFilter `type:"structure"` | ||
12574 | |||
12575 | // Unique identifier for the rule. The value cannot be longer than 255 characters. | ||
12576 | ID *string `type:"string"` | ||
12577 | |||
12578 | // Specifies when noncurrent object versions expire. Upon expiration, Amazon | ||
12579 | // S3 permanently deletes the noncurrent object versions. You set this lifecycle | ||
12580 | // configuration action on a bucket that has versioning enabled (or suspended) | ||
12581 | // to request that Amazon S3 delete noncurrent object versions at a specific | ||
12582 | // period in the object's lifetime. | ||
12583 | NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"` | ||
12584 | |||
12585 | NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"` | ||
12586 | |||
12587 | // Prefix identifying one or more objects to which the rule applies. This is | ||
12588 | // deprecated; use Filter instead. | ||
12589 | Prefix *string `deprecated:"true" type:"string"` | ||
12590 | |||
12591 | // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule | ||
12592 | // is not currently being applied. | ||
12593 | // | ||
12594 | // Status is a required field | ||
12595 | Status *string `type:"string" required:"true" enum:"ExpirationStatus"` | ||
12596 | |||
12597 | Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"` | ||
12598 | } | ||
12599 | |||
12600 | // String returns the string representation | ||
12601 | func (s LifecycleRule) String() string { | ||
12602 | return awsutil.Prettify(s) | ||
12603 | } | ||
12604 | |||
12605 | // GoString returns the string representation | ||
12606 | func (s LifecycleRule) GoString() string { | ||
12607 | return s.String() | ||
12608 | } | ||
12609 | |||
12610 | // Validate inspects the fields of the type to determine if they are valid. | ||
12611 | func (s *LifecycleRule) Validate() error { | ||
12612 | invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"} | ||
12613 | if s.Status == nil { | ||
12614 | invalidParams.Add(request.NewErrParamRequired("Status")) | ||
12615 | } | ||
12616 | if s.Filter != nil { | ||
12617 | if err := s.Filter.Validate(); err != nil { | ||
12618 | invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) | ||
12619 | } | ||
12620 | } | ||
12621 | |||
12622 | if invalidParams.Len() > 0 { | ||
12623 | return invalidParams | ||
12624 | } | ||
12625 | return nil | ||
12626 | } | ||
12627 | |||
12628 | // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value. | ||
12629 | func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule { | ||
12630 | s.AbortIncompleteMultipartUpload = v | ||
12631 | return s | ||
12632 | } | ||
12633 | |||
12634 | // SetExpiration sets the Expiration field's value. | ||
12635 | func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule { | ||
12636 | s.Expiration = v | ||
12637 | return s | ||
12638 | } | ||
12639 | |||
12640 | // SetFilter sets the Filter field's value. | ||
12641 | func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule { | ||
12642 | s.Filter = v | ||
12643 | return s | ||
12644 | } | ||
12645 | |||
12646 | // SetID sets the ID field's value. | ||
12647 | func (s *LifecycleRule) SetID(v string) *LifecycleRule { | ||
12648 | s.ID = &v | ||
12649 | return s | ||
12650 | } | ||
12651 | |||
12652 | // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value. | ||
12653 | func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule { | ||
12654 | s.NoncurrentVersionExpiration = v | ||
12655 | return s | ||
12656 | } | ||
12657 | |||
12658 | // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value. | ||
12659 | func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule { | ||
12660 | s.NoncurrentVersionTransitions = v | ||
12661 | return s | ||
12662 | } | ||
12663 | |||
12664 | // SetPrefix sets the Prefix field's value. | ||
12665 | func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule { | ||
12666 | s.Prefix = &v | ||
12667 | return s | ||
12668 | } | ||
12669 | |||
12670 | // SetStatus sets the Status field's value. | ||
12671 | func (s *LifecycleRule) SetStatus(v string) *LifecycleRule { | ||
12672 | s.Status = &v | ||
12673 | return s | ||
12674 | } | ||
12675 | |||
12676 | // SetTransitions sets the Transitions field's value. | ||
12677 | func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule { | ||
12678 | s.Transitions = v | ||
12679 | return s | ||
12680 | } | ||
12681 | |||
12682 | // This is used in a Lifecycle Rule Filter to apply a logical AND to two or | ||
12683 | // more predicates. The Lifecycle Rule will apply to any object matching all | ||
12684 | // of the predicates configured inside the And operator. | ||
12685 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleAndOperator | ||
12686 | type LifecycleRuleAndOperator struct { | ||
12687 | _ struct{} `type:"structure"` | ||
12688 | |||
12689 | Prefix *string `type:"string"` | ||
12690 | |||
12691 | // All of these tags must exist in the object's tag set in order for the rule | ||
12692 | // to apply. | ||
12693 | Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"` | ||
12694 | } | ||
12695 | |||
12696 | // String returns the string representation | ||
12697 | func (s LifecycleRuleAndOperator) String() string { | ||
12698 | return awsutil.Prettify(s) | ||
12699 | } | ||
12700 | |||
12701 | // GoString returns the string representation | ||
12702 | func (s LifecycleRuleAndOperator) GoString() string { | ||
12703 | return s.String() | ||
12704 | } | ||
12705 | |||
12706 | // Validate inspects the fields of the type to determine if they are valid. | ||
12707 | func (s *LifecycleRuleAndOperator) Validate() error { | ||
12708 | invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"} | ||
12709 | if s.Tags != nil { | ||
12710 | for i, v := range s.Tags { | ||
12711 | if v == nil { | ||
12712 | continue | ||
12713 | } | ||
12714 | if err := v.Validate(); err != nil { | ||
12715 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) | ||
12716 | } | ||
12717 | } | ||
12718 | } | ||
12719 | |||
12720 | if invalidParams.Len() > 0 { | ||
12721 | return invalidParams | ||
12722 | } | ||
12723 | return nil | ||
12724 | } | ||
12725 | |||
12726 | // SetPrefix sets the Prefix field's value. | ||
12727 | func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator { | ||
12728 | s.Prefix = &v | ||
12729 | return s | ||
12730 | } | ||
12731 | |||
12732 | // SetTags sets the Tags field's value. | ||
12733 | func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator { | ||
12734 | s.Tags = v | ||
12735 | return s | ||
12736 | } | ||
12737 | |||
12738 | // The Filter is used to identify objects that a Lifecycle Rule applies to. | ||
12739 | // A Filter must have exactly one of Prefix, Tag, or And specified. | ||
12740 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleFilter | ||
12741 | type LifecycleRuleFilter struct { | ||
12742 | _ struct{} `type:"structure"` | ||
12743 | |||
12744 | // This is used in a Lifecycle Rule Filter to apply a logical AND to two or | ||
12745 | // more predicates. The Lifecycle Rule will apply to any object matching all | ||
12746 | // of the predicates configured inside the And operator. | ||
12747 | And *LifecycleRuleAndOperator `type:"structure"` | ||
12748 | |||
12749 | // Prefix identifying one or more objects to which the rule applies. | ||
12750 | Prefix *string `type:"string"` | ||
12751 | |||
12752 | // This tag must exist in the object's tag set in order for the rule to apply. | ||
12753 | Tag *Tag `type:"structure"` | ||
12754 | } | ||
12755 | |||
12756 | // String returns the string representation | ||
12757 | func (s LifecycleRuleFilter) String() string { | ||
12758 | return awsutil.Prettify(s) | ||
12759 | } | ||
12760 | |||
12761 | // GoString returns the string representation | ||
12762 | func (s LifecycleRuleFilter) GoString() string { | ||
12763 | return s.String() | ||
12764 | } | ||
12765 | |||
12766 | // Validate inspects the fields of the type to determine if they are valid. | ||
12767 | func (s *LifecycleRuleFilter) Validate() error { | ||
12768 | invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"} | ||
12769 | if s.And != nil { | ||
12770 | if err := s.And.Validate(); err != nil { | ||
12771 | invalidParams.AddNested("And", err.(request.ErrInvalidParams)) | ||
12772 | } | ||
12773 | } | ||
12774 | if s.Tag != nil { | ||
12775 | if err := s.Tag.Validate(); err != nil { | ||
12776 | invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) | ||
12777 | } | ||
12778 | } | ||
12779 | |||
12780 | if invalidParams.Len() > 0 { | ||
12781 | return invalidParams | ||
12782 | } | ||
12783 | return nil | ||
12784 | } | ||
12785 | |||
12786 | // SetAnd sets the And field's value. | ||
12787 | func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter { | ||
12788 | s.And = v | ||
12789 | return s | ||
12790 | } | ||
12791 | |||
12792 | // SetPrefix sets the Prefix field's value. | ||
12793 | func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter { | ||
12794 | s.Prefix = &v | ||
12795 | return s | ||
12796 | } | ||
12797 | |||
12798 | // SetTag sets the Tag field's value. | ||
12799 | func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter { | ||
12800 | s.Tag = v | ||
12801 | return s | ||
12802 | } | ||
12803 | |||
12804 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsRequest | ||
12805 | type ListBucketAnalyticsConfigurationsInput struct { | ||
12806 | _ struct{} `type:"structure"` | ||
12807 | |||
12808 | // The name of the bucket from which analytics configurations are retrieved. | ||
12809 | // | ||
12810 | // Bucket is a required field | ||
12811 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
12812 | |||
12813 | // The ContinuationToken that represents a placeholder from where this request | ||
12814 | // should begin. | ||
12815 | ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` | ||
12816 | } | ||
12817 | |||
12818 | // String returns the string representation | ||
12819 | func (s ListBucketAnalyticsConfigurationsInput) String() string { | ||
12820 | return awsutil.Prettify(s) | ||
12821 | } | ||
12822 | |||
12823 | // GoString returns the string representation | ||
12824 | func (s ListBucketAnalyticsConfigurationsInput) GoString() string { | ||
12825 | return s.String() | ||
12826 | } | ||
12827 | |||
12828 | // Validate inspects the fields of the type to determine if they are valid. | ||
12829 | func (s *ListBucketAnalyticsConfigurationsInput) Validate() error { | ||
12830 | invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"} | ||
12831 | if s.Bucket == nil { | ||
12832 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
12833 | } | ||
12834 | |||
12835 | if invalidParams.Len() > 0 { | ||
12836 | return invalidParams | ||
12837 | } | ||
12838 | return nil | ||
12839 | } | ||
12840 | |||
12841 | // SetBucket sets the Bucket field's value. | ||
12842 | func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput { | ||
12843 | s.Bucket = &v | ||
12844 | return s | ||
12845 | } | ||
12846 | |||
12847 | // SetContinuationToken sets the ContinuationToken field's value. | ||
12848 | func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput { | ||
12849 | s.ContinuationToken = &v | ||
12850 | return s | ||
12851 | } | ||
12852 | |||
12853 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsOutput | ||
12854 | type ListBucketAnalyticsConfigurationsOutput struct { | ||
12855 | _ struct{} `type:"structure"` | ||
12856 | |||
12857 | // The list of analytics configurations for a bucket. | ||
12858 | AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"` | ||
12859 | |||
12860 | // The ContinuationToken that represents where this request began. | ||
12861 | ContinuationToken *string `type:"string"` | ||
12862 | |||
12863 | // Indicates whether the returned list of analytics configurations is complete. | ||
12864 | // A value of true indicates that the list is not complete and the NextContinuationToken | ||
12865 | // will be provided for a subsequent request. | ||
12866 | IsTruncated *bool `type:"boolean"` | ||
12867 | |||
12868 | // NextContinuationToken is sent when isTruncated is true, which indicates that | ||
12869 | // there are more analytics configurations to list. The next request must include | ||
12870 | // this NextContinuationToken. The token is obfuscated and is not a usable value. | ||
12871 | NextContinuationToken *string `type:"string"` | ||
12872 | } | ||
12873 | |||
12874 | // String returns the string representation | ||
12875 | func (s ListBucketAnalyticsConfigurationsOutput) String() string { | ||
12876 | return awsutil.Prettify(s) | ||
12877 | } | ||
12878 | |||
12879 | // GoString returns the string representation | ||
12880 | func (s ListBucketAnalyticsConfigurationsOutput) GoString() string { | ||
12881 | return s.String() | ||
12882 | } | ||
12883 | |||
12884 | // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value. | ||
12885 | func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput { | ||
12886 | s.AnalyticsConfigurationList = v | ||
12887 | return s | ||
12888 | } | ||
12889 | |||
12890 | // SetContinuationToken sets the ContinuationToken field's value. | ||
12891 | func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput { | ||
12892 | s.ContinuationToken = &v | ||
12893 | return s | ||
12894 | } | ||
12895 | |||
12896 | // SetIsTruncated sets the IsTruncated field's value. | ||
12897 | func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput { | ||
12898 | s.IsTruncated = &v | ||
12899 | return s | ||
12900 | } | ||
12901 | |||
12902 | // SetNextContinuationToken sets the NextContinuationToken field's value. | ||
12903 | func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput { | ||
12904 | s.NextContinuationToken = &v | ||
12905 | return s | ||
12906 | } | ||
12907 | |||
12908 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsRequest | ||
12909 | type ListBucketInventoryConfigurationsInput struct { | ||
12910 | _ struct{} `type:"structure"` | ||
12911 | |||
12912 | // The name of the bucket containing the inventory configurations to retrieve. | ||
12913 | // | ||
12914 | // Bucket is a required field | ||
12915 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
12916 | |||
12917 | // The marker used to continue an inventory configuration listing that has been | ||
12918 | // truncated. Use the NextContinuationToken from a previously truncated list | ||
12919 | // response to continue the listing. The continuation token is an opaque value | ||
12920 | // that Amazon S3 understands. | ||
12921 | ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` | ||
12922 | } | ||
12923 | |||
12924 | // String returns the string representation | ||
12925 | func (s ListBucketInventoryConfigurationsInput) String() string { | ||
12926 | return awsutil.Prettify(s) | ||
12927 | } | ||
12928 | |||
12929 | // GoString returns the string representation | ||
12930 | func (s ListBucketInventoryConfigurationsInput) GoString() string { | ||
12931 | return s.String() | ||
12932 | } | ||
12933 | |||
12934 | // Validate inspects the fields of the type to determine if they are valid. | ||
12935 | func (s *ListBucketInventoryConfigurationsInput) Validate() error { | ||
12936 | invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"} | ||
12937 | if s.Bucket == nil { | ||
12938 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
12939 | } | ||
12940 | |||
12941 | if invalidParams.Len() > 0 { | ||
12942 | return invalidParams | ||
12943 | } | ||
12944 | return nil | ||
12945 | } | ||
12946 | |||
12947 | // SetBucket sets the Bucket field's value. | ||
12948 | func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput { | ||
12949 | s.Bucket = &v | ||
12950 | return s | ||
12951 | } | ||
12952 | |||
12953 | // SetContinuationToken sets the ContinuationToken field's value. | ||
12954 | func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput { | ||
12955 | s.ContinuationToken = &v | ||
12956 | return s | ||
12957 | } | ||
12958 | |||
12959 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsOutput | ||
12960 | type ListBucketInventoryConfigurationsOutput struct { | ||
12961 | _ struct{} `type:"structure"` | ||
12962 | |||
12963 | // If sent in the request, the marker that is used as a starting point for this | ||
12964 | // inventory configuration list response. | ||
12965 | ContinuationToken *string `type:"string"` | ||
12966 | |||
12967 | // The list of inventory configurations for a bucket. | ||
12968 | InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"` | ||
12969 | |||
12970 | // Indicates whether the returned list of inventory configurations is truncated | ||
12971 | // in this response. A value of true indicates that the list is truncated. | ||
12972 | IsTruncated *bool `type:"boolean"` | ||
12973 | |||
12974 | // The marker used to continue this inventory configuration listing. Use the | ||
12975 | // NextContinuationToken from this response to continue the listing in a subsequent | ||
12976 | // request. The continuation token is an opaque value that Amazon S3 understands. | ||
12977 | NextContinuationToken *string `type:"string"` | ||
12978 | } | ||
12979 | |||
12980 | // String returns the string representation | ||
12981 | func (s ListBucketInventoryConfigurationsOutput) String() string { | ||
12982 | return awsutil.Prettify(s) | ||
12983 | } | ||
12984 | |||
12985 | // GoString returns the string representation | ||
12986 | func (s ListBucketInventoryConfigurationsOutput) GoString() string { | ||
12987 | return s.String() | ||
12988 | } | ||
12989 | |||
12990 | // SetContinuationToken sets the ContinuationToken field's value. | ||
12991 | func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput { | ||
12992 | s.ContinuationToken = &v | ||
12993 | return s | ||
12994 | } | ||
12995 | |||
12996 | // SetInventoryConfigurationList sets the InventoryConfigurationList field's value. | ||
12997 | func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput { | ||
12998 | s.InventoryConfigurationList = v | ||
12999 | return s | ||
13000 | } | ||
13001 | |||
13002 | // SetIsTruncated sets the IsTruncated field's value. | ||
13003 | func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput { | ||
13004 | s.IsTruncated = &v | ||
13005 | return s | ||
13006 | } | ||
13007 | |||
13008 | // SetNextContinuationToken sets the NextContinuationToken field's value. | ||
13009 | func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput { | ||
13010 | s.NextContinuationToken = &v | ||
13011 | return s | ||
13012 | } | ||
13013 | |||
13014 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsRequest | ||
13015 | type ListBucketMetricsConfigurationsInput struct { | ||
13016 | _ struct{} `type:"structure"` | ||
13017 | |||
13018 | // The name of the bucket containing the metrics configurations to retrieve. | ||
13019 | // | ||
13020 | // Bucket is a required field | ||
13021 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
13022 | |||
13023 | // The marker that is used to continue a metrics configuration listing that | ||
13024 | // has been truncated. Use the NextContinuationToken from a previously truncated | ||
13025 | // list response to continue the listing. The continuation token is an opaque | ||
13026 | // value that Amazon S3 understands. | ||
13027 | ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` | ||
13028 | } | ||
13029 | |||
13030 | // String returns the string representation | ||
13031 | func (s ListBucketMetricsConfigurationsInput) String() string { | ||
13032 | return awsutil.Prettify(s) | ||
13033 | } | ||
13034 | |||
13035 | // GoString returns the string representation | ||
13036 | func (s ListBucketMetricsConfigurationsInput) GoString() string { | ||
13037 | return s.String() | ||
13038 | } | ||
13039 | |||
13040 | // Validate inspects the fields of the type to determine if they are valid. | ||
13041 | func (s *ListBucketMetricsConfigurationsInput) Validate() error { | ||
13042 | invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"} | ||
13043 | if s.Bucket == nil { | ||
13044 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
13045 | } | ||
13046 | |||
13047 | if invalidParams.Len() > 0 { | ||
13048 | return invalidParams | ||
13049 | } | ||
13050 | return nil | ||
13051 | } | ||
13052 | |||
13053 | // SetBucket sets the Bucket field's value. | ||
13054 | func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput { | ||
13055 | s.Bucket = &v | ||
13056 | return s | ||
13057 | } | ||
13058 | |||
13059 | // SetContinuationToken sets the ContinuationToken field's value. | ||
13060 | func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput { | ||
13061 | s.ContinuationToken = &v | ||
13062 | return s | ||
13063 | } | ||
13064 | |||
13065 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsOutput | ||
13066 | type ListBucketMetricsConfigurationsOutput struct { | ||
13067 | _ struct{} `type:"structure"` | ||
13068 | |||
13069 | // The marker that is used as a starting point for this metrics configuration | ||
13070 | // list response. This value is present if it was sent in the request. | ||
13071 | ContinuationToken *string `type:"string"` | ||
13072 | |||
13073 | // Indicates whether the returned list of metrics configurations is complete. | ||
13074 | // A value of true indicates that the list is not complete and the NextContinuationToken | ||
13075 | // will be provided for a subsequent request. | ||
13076 | IsTruncated *bool `type:"boolean"` | ||
13077 | |||
13078 | // The list of metrics configurations for a bucket. | ||
13079 | MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"` | ||
13080 | |||
13081 | // The marker used to continue a metrics configuration listing that has been | ||
13082 | // truncated. Use the NextContinuationToken from a previously truncated list | ||
13083 | // response to continue the listing. The continuation token is an opaque value | ||
13084 | // that Amazon S3 understands. | ||
13085 | NextContinuationToken *string `type:"string"` | ||
13086 | } | ||
13087 | |||
13088 | // String returns the string representation | ||
13089 | func (s ListBucketMetricsConfigurationsOutput) String() string { | ||
13090 | return awsutil.Prettify(s) | ||
13091 | } | ||
13092 | |||
13093 | // GoString returns the string representation | ||
13094 | func (s ListBucketMetricsConfigurationsOutput) GoString() string { | ||
13095 | return s.String() | ||
13096 | } | ||
13097 | |||
13098 | // SetContinuationToken sets the ContinuationToken field's value. | ||
13099 | func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput { | ||
13100 | s.ContinuationToken = &v | ||
13101 | return s | ||
13102 | } | ||
13103 | |||
13104 | // SetIsTruncated sets the IsTruncated field's value. | ||
13105 | func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput { | ||
13106 | s.IsTruncated = &v | ||
13107 | return s | ||
13108 | } | ||
13109 | |||
13110 | // SetMetricsConfigurationList sets the MetricsConfigurationList field's value. | ||
13111 | func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput { | ||
13112 | s.MetricsConfigurationList = v | ||
13113 | return s | ||
13114 | } | ||
13115 | |||
13116 | // SetNextContinuationToken sets the NextContinuationToken field's value. | ||
13117 | func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput { | ||
13118 | s.NextContinuationToken = &v | ||
13119 | return s | ||
13120 | } | ||
13121 | |||
13122 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsInput | ||
13123 | type ListBucketsInput struct { | ||
13124 | _ struct{} `type:"structure"` | ||
13125 | } | ||
13126 | |||
13127 | // String returns the string representation | ||
13128 | func (s ListBucketsInput) String() string { | ||
13129 | return awsutil.Prettify(s) | ||
13130 | } | ||
13131 | |||
13132 | // GoString returns the string representation | ||
13133 | func (s ListBucketsInput) GoString() string { | ||
13134 | return s.String() | ||
13135 | } | ||
13136 | |||
13137 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsOutput | ||
13138 | type ListBucketsOutput struct { | ||
13139 | _ struct{} `type:"structure"` | ||
13140 | |||
13141 | Buckets []*Bucket `locationNameList:"Bucket" type:"list"` | ||
13142 | |||
13143 | Owner *Owner `type:"structure"` | ||
13144 | } | ||
13145 | |||
13146 | // String returns the string representation | ||
13147 | func (s ListBucketsOutput) String() string { | ||
13148 | return awsutil.Prettify(s) | ||
13149 | } | ||
13150 | |||
13151 | // GoString returns the string representation | ||
13152 | func (s ListBucketsOutput) GoString() string { | ||
13153 | return s.String() | ||
13154 | } | ||
13155 | |||
13156 | // SetBuckets sets the Buckets field's value. | ||
13157 | func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput { | ||
13158 | s.Buckets = v | ||
13159 | return s | ||
13160 | } | ||
13161 | |||
13162 | // SetOwner sets the Owner field's value. | ||
13163 | func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput { | ||
13164 | s.Owner = v | ||
13165 | return s | ||
13166 | } | ||
13167 | |||
13168 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsRequest | ||
13169 | type ListMultipartUploadsInput struct { | ||
13170 | _ struct{} `type:"structure"` | ||
13171 | |||
13172 | // Bucket is a required field | ||
13173 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
13174 | |||
13175 | // Character you use to group keys. | ||
13176 | Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` | ||
13177 | |||
13178 | // Requests Amazon S3 to encode the object keys in the response and specifies | ||
13179 | // the encoding method to use. An object key may contain any Unicode character; | ||
13180 | // however, XML 1.0 parser cannot parse some characters, such as characters | ||
13181 | // with an ASCII value from 0 to 10. For characters that are not supported in | ||
13182 | // XML 1.0, you can add this parameter to request that Amazon S3 encode the | ||
13183 | // keys in the response. | ||
13184 | EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` | ||
13185 | |||
13186 | // Together with upload-id-marker, this parameter specifies the multipart upload | ||
13187 | // after which listing should begin. | ||
13188 | KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"` | ||
13189 | |||
13190 | // Sets the maximum number of multipart uploads, from 1 to 1,000, to return | ||
13191 | // in the response body. 1,000 is the maximum number of uploads that can be | ||
13192 | // returned in a response. | ||
13193 | MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"` | ||
13194 | |||
13195 | // Lists in-progress uploads only for those keys that begin with the specified | ||
13196 | // prefix. | ||
13197 | Prefix *string `location:"querystring" locationName:"prefix" type:"string"` | ||
13198 | |||
13199 | // Together with key-marker, specifies the multipart upload after which listing | ||
13200 | // should begin. If key-marker is not specified, the upload-id-marker parameter | ||
13201 | // is ignored. | ||
13202 | UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"` | ||
13203 | } | ||
13204 | |||
13205 | // String returns the string representation | ||
13206 | func (s ListMultipartUploadsInput) String() string { | ||
13207 | return awsutil.Prettify(s) | ||
13208 | } | ||
13209 | |||
13210 | // GoString returns the string representation | ||
13211 | func (s ListMultipartUploadsInput) GoString() string { | ||
13212 | return s.String() | ||
13213 | } | ||
13214 | |||
13215 | // Validate inspects the fields of the type to determine if they are valid. | ||
13216 | func (s *ListMultipartUploadsInput) Validate() error { | ||
13217 | invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"} | ||
13218 | if s.Bucket == nil { | ||
13219 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
13220 | } | ||
13221 | |||
13222 | if invalidParams.Len() > 0 { | ||
13223 | return invalidParams | ||
13224 | } | ||
13225 | return nil | ||
13226 | } | ||
13227 | |||
13228 | // SetBucket sets the Bucket field's value. | ||
13229 | func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput { | ||
13230 | s.Bucket = &v | ||
13231 | return s | ||
13232 | } | ||
13233 | |||
13234 | // SetDelimiter sets the Delimiter field's value. | ||
13235 | func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput { | ||
13236 | s.Delimiter = &v | ||
13237 | return s | ||
13238 | } | ||
13239 | |||
13240 | // SetEncodingType sets the EncodingType field's value. | ||
13241 | func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput { | ||
13242 | s.EncodingType = &v | ||
13243 | return s | ||
13244 | } | ||
13245 | |||
13246 | // SetKeyMarker sets the KeyMarker field's value. | ||
13247 | func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput { | ||
13248 | s.KeyMarker = &v | ||
13249 | return s | ||
13250 | } | ||
13251 | |||
13252 | // SetMaxUploads sets the MaxUploads field's value. | ||
13253 | func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput { | ||
13254 | s.MaxUploads = &v | ||
13255 | return s | ||
13256 | } | ||
13257 | |||
13258 | // SetPrefix sets the Prefix field's value. | ||
13259 | func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput { | ||
13260 | s.Prefix = &v | ||
13261 | return s | ||
13262 | } | ||
13263 | |||
13264 | // SetUploadIdMarker sets the UploadIdMarker field's value. | ||
13265 | func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput { | ||
13266 | s.UploadIdMarker = &v | ||
13267 | return s | ||
13268 | } | ||
13269 | |||
13270 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsOutput | ||
13271 | type ListMultipartUploadsOutput struct { | ||
13272 | _ struct{} `type:"structure"` | ||
13273 | |||
13274 | // Name of the bucket to which the multipart upload was initiated. | ||
13275 | Bucket *string `type:"string"` | ||
13276 | |||
13277 | CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"` | ||
13278 | |||
13279 | Delimiter *string `type:"string"` | ||
13280 | |||
13281 | // Encoding type used by Amazon S3 to encode object keys in the response. | ||
13282 | EncodingType *string `type:"string" enum:"EncodingType"` | ||
13283 | |||
13284 | // Indicates whether the returned list of multipart uploads is truncated. A | ||
13285 | // value of true indicates that the list was truncated. The list can be truncated | ||
13286 | // if the number of multipart uploads exceeds the limit allowed or specified | ||
13287 | // by max uploads. | ||
13288 | IsTruncated *bool `type:"boolean"` | ||
13289 | |||
13290 | // The key at or after which the listing began. | ||
13291 | KeyMarker *string `type:"string"` | ||
13292 | |||
13293 | // Maximum number of multipart uploads that could have been included in the | ||
13294 | // response. | ||
13295 | MaxUploads *int64 `type:"integer"` | ||
13296 | |||
13297 | // When a list is truncated, this element specifies the value that should be | ||
13298 | // used for the key-marker request parameter in a subsequent request. | ||
13299 | NextKeyMarker *string `type:"string"` | ||
13300 | |||
13301 | // When a list is truncated, this element specifies the value that should be | ||
13302 | // used for the upload-id-marker request parameter in a subsequent request. | ||
13303 | NextUploadIdMarker *string `type:"string"` | ||
13304 | |||
13305 | // When a prefix is provided in the request, this field contains the specified | ||
13306 | // prefix. The result contains only keys starting with the specified prefix. | ||
13307 | Prefix *string `type:"string"` | ||
13308 | |||
13309 | // Upload ID after which listing began. | ||
13310 | UploadIdMarker *string `type:"string"` | ||
13311 | |||
13312 | Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"` | ||
13313 | } | ||
13314 | |||
13315 | // String returns the string representation | ||
13316 | func (s ListMultipartUploadsOutput) String() string { | ||
13317 | return awsutil.Prettify(s) | ||
13318 | } | ||
13319 | |||
13320 | // GoString returns the string representation | ||
13321 | func (s ListMultipartUploadsOutput) GoString() string { | ||
13322 | return s.String() | ||
13323 | } | ||
13324 | |||
13325 | // SetBucket sets the Bucket field's value. | ||
13326 | func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput { | ||
13327 | s.Bucket = &v | ||
13328 | return s | ||
13329 | } | ||
13330 | |||
13331 | // SetCommonPrefixes sets the CommonPrefixes field's value. | ||
13332 | func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput { | ||
13333 | s.CommonPrefixes = v | ||
13334 | return s | ||
13335 | } | ||
13336 | |||
13337 | // SetDelimiter sets the Delimiter field's value. | ||
13338 | func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput { | ||
13339 | s.Delimiter = &v | ||
13340 | return s | ||
13341 | } | ||
13342 | |||
13343 | // SetEncodingType sets the EncodingType field's value. | ||
13344 | func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput { | ||
13345 | s.EncodingType = &v | ||
13346 | return s | ||
13347 | } | ||
13348 | |||
13349 | // SetIsTruncated sets the IsTruncated field's value. | ||
13350 | func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput { | ||
13351 | s.IsTruncated = &v | ||
13352 | return s | ||
13353 | } | ||
13354 | |||
13355 | // SetKeyMarker sets the KeyMarker field's value. | ||
13356 | func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput { | ||
13357 | s.KeyMarker = &v | ||
13358 | return s | ||
13359 | } | ||
13360 | |||
13361 | // SetMaxUploads sets the MaxUploads field's value. | ||
13362 | func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput { | ||
13363 | s.MaxUploads = &v | ||
13364 | return s | ||
13365 | } | ||
13366 | |||
13367 | // SetNextKeyMarker sets the NextKeyMarker field's value. | ||
13368 | func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput { | ||
13369 | s.NextKeyMarker = &v | ||
13370 | return s | ||
13371 | } | ||
13372 | |||
13373 | // SetNextUploadIdMarker sets the NextUploadIdMarker field's value. | ||
13374 | func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput { | ||
13375 | s.NextUploadIdMarker = &v | ||
13376 | return s | ||
13377 | } | ||
13378 | |||
13379 | // SetPrefix sets the Prefix field's value. | ||
13380 | func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput { | ||
13381 | s.Prefix = &v | ||
13382 | return s | ||
13383 | } | ||
13384 | |||
13385 | // SetUploadIdMarker sets the UploadIdMarker field's value. | ||
13386 | func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput { | ||
13387 | s.UploadIdMarker = &v | ||
13388 | return s | ||
13389 | } | ||
13390 | |||
13391 | // SetUploads sets the Uploads field's value. | ||
13392 | func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput { | ||
13393 | s.Uploads = v | ||
13394 | return s | ||
13395 | } | ||
13396 | |||
13397 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsRequest | ||
13398 | type ListObjectVersionsInput struct { | ||
13399 | _ struct{} `type:"structure"` | ||
13400 | |||
13401 | // Bucket is a required field | ||
13402 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
13403 | |||
13404 | // A delimiter is a character you use to group keys. | ||
13405 | Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` | ||
13406 | |||
13407 | // Requests Amazon S3 to encode the object keys in the response and specifies | ||
13408 | // the encoding method to use. An object key may contain any Unicode character; | ||
13409 | // however, XML 1.0 parser cannot parse some characters, such as characters | ||
13410 | // with an ASCII value from 0 to 10. For characters that are not supported in | ||
13411 | // XML 1.0, you can add this parameter to request that Amazon S3 encode the | ||
13412 | // keys in the response. | ||
13413 | EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` | ||
13414 | |||
13415 | // Specifies the key to start with when listing objects in a bucket. | ||
13416 | KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"` | ||
13417 | |||
13418 | // Sets the maximum number of keys returned in the response. The response might | ||
13419 | // contain fewer keys but will never contain more. | ||
13420 | MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` | ||
13421 | |||
13422 | // Limits the response to keys that begin with the specified prefix. | ||
13423 | Prefix *string `location:"querystring" locationName:"prefix" type:"string"` | ||
13424 | |||
13425 | // Specifies the object version you want to start listing from. | ||
13426 | VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"` | ||
13427 | } | ||
13428 | |||
13429 | // String returns the string representation | ||
13430 | func (s ListObjectVersionsInput) String() string { | ||
13431 | return awsutil.Prettify(s) | ||
13432 | } | ||
13433 | |||
13434 | // GoString returns the string representation | ||
13435 | func (s ListObjectVersionsInput) GoString() string { | ||
13436 | return s.String() | ||
13437 | } | ||
13438 | |||
13439 | // Validate inspects the fields of the type to determine if they are valid. | ||
13440 | func (s *ListObjectVersionsInput) Validate() error { | ||
13441 | invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"} | ||
13442 | if s.Bucket == nil { | ||
13443 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
13444 | } | ||
13445 | |||
13446 | if invalidParams.Len() > 0 { | ||
13447 | return invalidParams | ||
13448 | } | ||
13449 | return nil | ||
13450 | } | ||
13451 | |||
13452 | // SetBucket sets the Bucket field's value. | ||
13453 | func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput { | ||
13454 | s.Bucket = &v | ||
13455 | return s | ||
13456 | } | ||
13457 | |||
13458 | // SetDelimiter sets the Delimiter field's value. | ||
13459 | func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput { | ||
13460 | s.Delimiter = &v | ||
13461 | return s | ||
13462 | } | ||
13463 | |||
13464 | // SetEncodingType sets the EncodingType field's value. | ||
13465 | func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput { | ||
13466 | s.EncodingType = &v | ||
13467 | return s | ||
13468 | } | ||
13469 | |||
13470 | // SetKeyMarker sets the KeyMarker field's value. | ||
13471 | func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput { | ||
13472 | s.KeyMarker = &v | ||
13473 | return s | ||
13474 | } | ||
13475 | |||
13476 | // SetMaxKeys sets the MaxKeys field's value. | ||
13477 | func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput { | ||
13478 | s.MaxKeys = &v | ||
13479 | return s | ||
13480 | } | ||
13481 | |||
13482 | // SetPrefix sets the Prefix field's value. | ||
13483 | func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput { | ||
13484 | s.Prefix = &v | ||
13485 | return s | ||
13486 | } | ||
13487 | |||
13488 | // SetVersionIdMarker sets the VersionIdMarker field's value. | ||
13489 | func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput { | ||
13490 | s.VersionIdMarker = &v | ||
13491 | return s | ||
13492 | } | ||
13493 | |||
13494 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsOutput | ||
13495 | type ListObjectVersionsOutput struct { | ||
13496 | _ struct{} `type:"structure"` | ||
13497 | |||
13498 | CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"` | ||
13499 | |||
13500 | DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"` | ||
13501 | |||
13502 | Delimiter *string `type:"string"` | ||
13503 | |||
13504 | // Encoding type used by Amazon S3 to encode object keys in the response. | ||
13505 | EncodingType *string `type:"string" enum:"EncodingType"` | ||
13506 | |||
13507 | // A flag that indicates whether or not Amazon S3 returned all of the results | ||
13508 | // that satisfied the search criteria. If your results were truncated, you can | ||
13509 | // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker | ||
13510 | // response parameters as a starting place in another request to return the | ||
13511 | // rest of the results. | ||
13512 | IsTruncated *bool `type:"boolean"` | ||
13513 | |||
13514 | // Marks the last Key returned in a truncated response. | ||
13515 | KeyMarker *string `type:"string"` | ||
13516 | |||
13517 | MaxKeys *int64 `type:"integer"` | ||
13518 | |||
13519 | Name *string `type:"string"` | ||
13520 | |||
13521 | // Use this value for the key marker request parameter in a subsequent request. | ||
13522 | NextKeyMarker *string `type:"string"` | ||
13523 | |||
13524 | // Use this value for the next version id marker parameter in a subsequent request. | ||
13525 | NextVersionIdMarker *string `type:"string"` | ||
13526 | |||
13527 | Prefix *string `type:"string"` | ||
13528 | |||
13529 | VersionIdMarker *string `type:"string"` | ||
13530 | |||
13531 | Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"` | ||
13532 | } | ||
13533 | |||
13534 | // String returns the string representation | ||
13535 | func (s ListObjectVersionsOutput) String() string { | ||
13536 | return awsutil.Prettify(s) | ||
13537 | } | ||
13538 | |||
13539 | // GoString returns the string representation | ||
13540 | func (s ListObjectVersionsOutput) GoString() string { | ||
13541 | return s.String() | ||
13542 | } | ||
13543 | |||
13544 | // SetCommonPrefixes sets the CommonPrefixes field's value. | ||
13545 | func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput { | ||
13546 | s.CommonPrefixes = v | ||
13547 | return s | ||
13548 | } | ||
13549 | |||
13550 | // SetDeleteMarkers sets the DeleteMarkers field's value. | ||
13551 | func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput { | ||
13552 | s.DeleteMarkers = v | ||
13553 | return s | ||
13554 | } | ||
13555 | |||
13556 | // SetDelimiter sets the Delimiter field's value. | ||
13557 | func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput { | ||
13558 | s.Delimiter = &v | ||
13559 | return s | ||
13560 | } | ||
13561 | |||
13562 | // SetEncodingType sets the EncodingType field's value. | ||
13563 | func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput { | ||
13564 | s.EncodingType = &v | ||
13565 | return s | ||
13566 | } | ||
13567 | |||
13568 | // SetIsTruncated sets the IsTruncated field's value. | ||
13569 | func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput { | ||
13570 | s.IsTruncated = &v | ||
13571 | return s | ||
13572 | } | ||
13573 | |||
13574 | // SetKeyMarker sets the KeyMarker field's value. | ||
13575 | func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput { | ||
13576 | s.KeyMarker = &v | ||
13577 | return s | ||
13578 | } | ||
13579 | |||
13580 | // SetMaxKeys sets the MaxKeys field's value. | ||
13581 | func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput { | ||
13582 | s.MaxKeys = &v | ||
13583 | return s | ||
13584 | } | ||
13585 | |||
13586 | // SetName sets the Name field's value. | ||
13587 | func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput { | ||
13588 | s.Name = &v | ||
13589 | return s | ||
13590 | } | ||
13591 | |||
13592 | // SetNextKeyMarker sets the NextKeyMarker field's value. | ||
13593 | func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput { | ||
13594 | s.NextKeyMarker = &v | ||
13595 | return s | ||
13596 | } | ||
13597 | |||
13598 | // SetNextVersionIdMarker sets the NextVersionIdMarker field's value. | ||
13599 | func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput { | ||
13600 | s.NextVersionIdMarker = &v | ||
13601 | return s | ||
13602 | } | ||
13603 | |||
13604 | // SetPrefix sets the Prefix field's value. | ||
13605 | func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput { | ||
13606 | s.Prefix = &v | ||
13607 | return s | ||
13608 | } | ||
13609 | |||
13610 | // SetVersionIdMarker sets the VersionIdMarker field's value. | ||
13611 | func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput { | ||
13612 | s.VersionIdMarker = &v | ||
13613 | return s | ||
13614 | } | ||
13615 | |||
13616 | // SetVersions sets the Versions field's value. | ||
13617 | func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput { | ||
13618 | s.Versions = v | ||
13619 | return s | ||
13620 | } | ||
13621 | |||
13622 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsRequest | ||
13623 | type ListObjectsInput struct { | ||
13624 | _ struct{} `type:"structure"` | ||
13625 | |||
13626 | // Bucket is a required field | ||
13627 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
13628 | |||
13629 | // A delimiter is a character you use to group keys. | ||
13630 | Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` | ||
13631 | |||
13632 | // Requests Amazon S3 to encode the object keys in the response and specifies | ||
13633 | // the encoding method to use. An object key may contain any Unicode character; | ||
13634 | // however, XML 1.0 parser cannot parse some characters, such as characters | ||
13635 | // with an ASCII value from 0 to 10. For characters that are not supported in | ||
13636 | // XML 1.0, you can add this parameter to request that Amazon S3 encode the | ||
13637 | // keys in the response. | ||
13638 | EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` | ||
13639 | |||
13640 | // Specifies the key to start with when listing objects in a bucket. | ||
13641 | Marker *string `location:"querystring" locationName:"marker" type:"string"` | ||
13642 | |||
13643 | // Sets the maximum number of keys returned in the response. The response might | ||
13644 | // contain fewer keys but will never contain more. | ||
13645 | MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` | ||
13646 | |||
13647 | // Limits the response to keys that begin with the specified prefix. | ||
13648 | Prefix *string `location:"querystring" locationName:"prefix" type:"string"` | ||
13649 | |||
13650 | // Confirms that the requester knows that she or he will be charged for the | ||
13651 | // list objects request. Bucket owners need not specify this parameter in their | ||
13652 | // requests. | ||
13653 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
13654 | } | ||
13655 | |||
13656 | // String returns the string representation | ||
13657 | func (s ListObjectsInput) String() string { | ||
13658 | return awsutil.Prettify(s) | ||
13659 | } | ||
13660 | |||
13661 | // GoString returns the string representation | ||
13662 | func (s ListObjectsInput) GoString() string { | ||
13663 | return s.String() | ||
13664 | } | ||
13665 | |||
13666 | // Validate inspects the fields of the type to determine if they are valid. | ||
13667 | func (s *ListObjectsInput) Validate() error { | ||
13668 | invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"} | ||
13669 | if s.Bucket == nil { | ||
13670 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
13671 | } | ||
13672 | |||
13673 | if invalidParams.Len() > 0 { | ||
13674 | return invalidParams | ||
13675 | } | ||
13676 | return nil | ||
13677 | } | ||
13678 | |||
13679 | // SetBucket sets the Bucket field's value. | ||
13680 | func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput { | ||
13681 | s.Bucket = &v | ||
13682 | return s | ||
13683 | } | ||
13684 | |||
13685 | // SetDelimiter sets the Delimiter field's value. | ||
13686 | func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput { | ||
13687 | s.Delimiter = &v | ||
13688 | return s | ||
13689 | } | ||
13690 | |||
13691 | // SetEncodingType sets the EncodingType field's value. | ||
13692 | func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput { | ||
13693 | s.EncodingType = &v | ||
13694 | return s | ||
13695 | } | ||
13696 | |||
13697 | // SetMarker sets the Marker field's value. | ||
13698 | func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput { | ||
13699 | s.Marker = &v | ||
13700 | return s | ||
13701 | } | ||
13702 | |||
13703 | // SetMaxKeys sets the MaxKeys field's value. | ||
13704 | func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput { | ||
13705 | s.MaxKeys = &v | ||
13706 | return s | ||
13707 | } | ||
13708 | |||
13709 | // SetPrefix sets the Prefix field's value. | ||
13710 | func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput { | ||
13711 | s.Prefix = &v | ||
13712 | return s | ||
13713 | } | ||
13714 | |||
13715 | // SetRequestPayer sets the RequestPayer field's value. | ||
13716 | func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput { | ||
13717 | s.RequestPayer = &v | ||
13718 | return s | ||
13719 | } | ||
13720 | |||
13721 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsOutput | ||
13722 | type ListObjectsOutput struct { | ||
13723 | _ struct{} `type:"structure"` | ||
13724 | |||
13725 | CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"` | ||
13726 | |||
13727 | Contents []*Object `type:"list" flattened:"true"` | ||
13728 | |||
13729 | Delimiter *string `type:"string"` | ||
13730 | |||
13731 | // Encoding type used by Amazon S3 to encode object keys in the response. | ||
13732 | EncodingType *string `type:"string" enum:"EncodingType"` | ||
13733 | |||
13734 | // A flag that indicates whether or not Amazon S3 returned all of the results | ||
13735 | // that satisfied the search criteria. | ||
13736 | IsTruncated *bool `type:"boolean"` | ||
13737 | |||
13738 | Marker *string `type:"string"` | ||
13739 | |||
13740 | MaxKeys *int64 `type:"integer"` | ||
13741 | |||
13742 | Name *string `type:"string"` | ||
13743 | |||
13744 | // When response is truncated (the IsTruncated element value in the response | ||
13745 | // is true), you can use the key name in this field as marker in the subsequent | ||
13746 | // request to get next set of objects. Amazon S3 lists objects in alphabetical | ||
13747 | // order Note: This element is returned only if you have delimiter request parameter | ||
13748 | // specified. If response does not include the NextMaker and it is truncated, | ||
13749 | // you can use the value of the last Key in the response as the marker in the | ||
13750 | // subsequent request to get the next set of object keys. | ||
13751 | NextMarker *string `type:"string"` | ||
13752 | |||
13753 | Prefix *string `type:"string"` | ||
13754 | } | ||
13755 | |||
13756 | // String returns the string representation | ||
13757 | func (s ListObjectsOutput) String() string { | ||
13758 | return awsutil.Prettify(s) | ||
13759 | } | ||
13760 | |||
13761 | // GoString returns the string representation | ||
13762 | func (s ListObjectsOutput) GoString() string { | ||
13763 | return s.String() | ||
13764 | } | ||
13765 | |||
13766 | // SetCommonPrefixes sets the CommonPrefixes field's value. | ||
13767 | func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput { | ||
13768 | s.CommonPrefixes = v | ||
13769 | return s | ||
13770 | } | ||
13771 | |||
13772 | // SetContents sets the Contents field's value. | ||
13773 | func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput { | ||
13774 | s.Contents = v | ||
13775 | return s | ||
13776 | } | ||
13777 | |||
13778 | // SetDelimiter sets the Delimiter field's value. | ||
13779 | func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput { | ||
13780 | s.Delimiter = &v | ||
13781 | return s | ||
13782 | } | ||
13783 | |||
13784 | // SetEncodingType sets the EncodingType field's value. | ||
13785 | func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput { | ||
13786 | s.EncodingType = &v | ||
13787 | return s | ||
13788 | } | ||
13789 | |||
13790 | // SetIsTruncated sets the IsTruncated field's value. | ||
13791 | func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput { | ||
13792 | s.IsTruncated = &v | ||
13793 | return s | ||
13794 | } | ||
13795 | |||
13796 | // SetMarker sets the Marker field's value. | ||
13797 | func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput { | ||
13798 | s.Marker = &v | ||
13799 | return s | ||
13800 | } | ||
13801 | |||
13802 | // SetMaxKeys sets the MaxKeys field's value. | ||
13803 | func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput { | ||
13804 | s.MaxKeys = &v | ||
13805 | return s | ||
13806 | } | ||
13807 | |||
13808 | // SetName sets the Name field's value. | ||
13809 | func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput { | ||
13810 | s.Name = &v | ||
13811 | return s | ||
13812 | } | ||
13813 | |||
13814 | // SetNextMarker sets the NextMarker field's value. | ||
13815 | func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput { | ||
13816 | s.NextMarker = &v | ||
13817 | return s | ||
13818 | } | ||
13819 | |||
13820 | // SetPrefix sets the Prefix field's value. | ||
13821 | func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput { | ||
13822 | s.Prefix = &v | ||
13823 | return s | ||
13824 | } | ||
13825 | |||
13826 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Request | ||
13827 | type ListObjectsV2Input struct { | ||
13828 | _ struct{} `type:"structure"` | ||
13829 | |||
13830 | // Name of the bucket to list. | ||
13831 | // | ||
13832 | // Bucket is a required field | ||
13833 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
13834 | |||
13835 | // ContinuationToken indicates Amazon S3 that the list is being continued on | ||
13836 | // this bucket with a token. ContinuationToken is obfuscated and is not a real | ||
13837 | // key | ||
13838 | ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"` | ||
13839 | |||
13840 | // A delimiter is a character you use to group keys. | ||
13841 | Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"` | ||
13842 | |||
13843 | // Encoding type used by Amazon S3 to encode object keys in the response. | ||
13844 | EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"` | ||
13845 | |||
13846 | // The owner field is not present in listV2 by default, if you want to return | ||
13847 | // owner field with each key in the result then set the fetch owner field to | ||
13848 | // true | ||
13849 | FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"` | ||
13850 | |||
13851 | // Sets the maximum number of keys returned in the response. The response might | ||
13852 | // contain fewer keys but will never contain more. | ||
13853 | MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"` | ||
13854 | |||
13855 | // Limits the response to keys that begin with the specified prefix. | ||
13856 | Prefix *string `location:"querystring" locationName:"prefix" type:"string"` | ||
13857 | |||
13858 | // Confirms that the requester knows that she or he will be charged for the | ||
13859 | // list objects request in V2 style. Bucket owners need not specify this parameter | ||
13860 | // in their requests. | ||
13861 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
13862 | |||
13863 | // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts | ||
13864 | // listing after this specified key. StartAfter can be any key in the bucket | ||
13865 | StartAfter *string `location:"querystring" locationName:"start-after" type:"string"` | ||
13866 | } | ||
13867 | |||
13868 | // String returns the string representation | ||
13869 | func (s ListObjectsV2Input) String() string { | ||
13870 | return awsutil.Prettify(s) | ||
13871 | } | ||
13872 | |||
13873 | // GoString returns the string representation | ||
13874 | func (s ListObjectsV2Input) GoString() string { | ||
13875 | return s.String() | ||
13876 | } | ||
13877 | |||
13878 | // Validate inspects the fields of the type to determine if they are valid. | ||
13879 | func (s *ListObjectsV2Input) Validate() error { | ||
13880 | invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"} | ||
13881 | if s.Bucket == nil { | ||
13882 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
13883 | } | ||
13884 | |||
13885 | if invalidParams.Len() > 0 { | ||
13886 | return invalidParams | ||
13887 | } | ||
13888 | return nil | ||
13889 | } | ||
13890 | |||
13891 | // SetBucket sets the Bucket field's value. | ||
13892 | func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input { | ||
13893 | s.Bucket = &v | ||
13894 | return s | ||
13895 | } | ||
13896 | |||
13897 | // SetContinuationToken sets the ContinuationToken field's value. | ||
13898 | func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input { | ||
13899 | s.ContinuationToken = &v | ||
13900 | return s | ||
13901 | } | ||
13902 | |||
13903 | // SetDelimiter sets the Delimiter field's value. | ||
13904 | func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input { | ||
13905 | s.Delimiter = &v | ||
13906 | return s | ||
13907 | } | ||
13908 | |||
13909 | // SetEncodingType sets the EncodingType field's value. | ||
13910 | func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input { | ||
13911 | s.EncodingType = &v | ||
13912 | return s | ||
13913 | } | ||
13914 | |||
13915 | // SetFetchOwner sets the FetchOwner field's value. | ||
13916 | func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input { | ||
13917 | s.FetchOwner = &v | ||
13918 | return s | ||
13919 | } | ||
13920 | |||
13921 | // SetMaxKeys sets the MaxKeys field's value. | ||
13922 | func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input { | ||
13923 | s.MaxKeys = &v | ||
13924 | return s | ||
13925 | } | ||
13926 | |||
13927 | // SetPrefix sets the Prefix field's value. | ||
13928 | func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input { | ||
13929 | s.Prefix = &v | ||
13930 | return s | ||
13931 | } | ||
13932 | |||
13933 | // SetRequestPayer sets the RequestPayer field's value. | ||
13934 | func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input { | ||
13935 | s.RequestPayer = &v | ||
13936 | return s | ||
13937 | } | ||
13938 | |||
13939 | // SetStartAfter sets the StartAfter field's value. | ||
13940 | func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input { | ||
13941 | s.StartAfter = &v | ||
13942 | return s | ||
13943 | } | ||
13944 | |||
13945 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Output | ||
13946 | type ListObjectsV2Output struct { | ||
13947 | _ struct{} `type:"structure"` | ||
13948 | |||
13949 | // CommonPrefixes contains all (if there are any) keys between Prefix and the | ||
13950 | // next occurrence of the string specified by delimiter | ||
13951 | CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"` | ||
13952 | |||
13953 | // Metadata about each object returned. | ||
13954 | Contents []*Object `type:"list" flattened:"true"` | ||
13955 | |||
13956 | // ContinuationToken indicates Amazon S3 that the list is being continued on | ||
13957 | // this bucket with a token. ContinuationToken is obfuscated and is not a real | ||
13958 | // key | ||
13959 | ContinuationToken *string `type:"string"` | ||
13960 | |||
13961 | // A delimiter is a character you use to group keys. | ||
13962 | Delimiter *string `type:"string"` | ||
13963 | |||
13964 | // Encoding type used by Amazon S3 to encode object keys in the response. | ||
13965 | EncodingType *string `type:"string" enum:"EncodingType"` | ||
13966 | |||
13967 | // A flag that indicates whether or not Amazon S3 returned all of the results | ||
13968 | // that satisfied the search criteria. | ||
13969 | IsTruncated *bool `type:"boolean"` | ||
13970 | |||
13971 | // KeyCount is the number of keys returned with this request. KeyCount will | ||
13972 | // always be less than equals to MaxKeys field. Say you ask for 50 keys, your | ||
13973 | // result will include less than equals 50 keys | ||
13974 | KeyCount *int64 `type:"integer"` | ||
13975 | |||
13976 | // Sets the maximum number of keys returned in the response. The response might | ||
13977 | // contain fewer keys but will never contain more. | ||
13978 | MaxKeys *int64 `type:"integer"` | ||
13979 | |||
13980 | // Name of the bucket to list. | ||
13981 | Name *string `type:"string"` | ||
13982 | |||
13983 | // NextContinuationToken is sent when isTruncated is true which means there | ||
13984 | // are more keys in the bucket that can be listed. The next list requests to | ||
13985 | // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken | ||
13986 | // is obfuscated and is not a real key | ||
13987 | NextContinuationToken *string `type:"string"` | ||
13988 | |||
13989 | // Limits the response to keys that begin with the specified prefix. | ||
13990 | Prefix *string `type:"string"` | ||
13991 | |||
13992 | // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts | ||
13993 | // listing after this specified key. StartAfter can be any key in the bucket | ||
13994 | StartAfter *string `type:"string"` | ||
13995 | } | ||
13996 | |||
13997 | // String returns the string representation | ||
13998 | func (s ListObjectsV2Output) String() string { | ||
13999 | return awsutil.Prettify(s) | ||
14000 | } | ||
14001 | |||
14002 | // GoString returns the string representation | ||
14003 | func (s ListObjectsV2Output) GoString() string { | ||
14004 | return s.String() | ||
14005 | } | ||
14006 | |||
14007 | // SetCommonPrefixes sets the CommonPrefixes field's value. | ||
14008 | func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output { | ||
14009 | s.CommonPrefixes = v | ||
14010 | return s | ||
14011 | } | ||
14012 | |||
14013 | // SetContents sets the Contents field's value. | ||
14014 | func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output { | ||
14015 | s.Contents = v | ||
14016 | return s | ||
14017 | } | ||
14018 | |||
14019 | // SetContinuationToken sets the ContinuationToken field's value. | ||
14020 | func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output { | ||
14021 | s.ContinuationToken = &v | ||
14022 | return s | ||
14023 | } | ||
14024 | |||
14025 | // SetDelimiter sets the Delimiter field's value. | ||
14026 | func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output { | ||
14027 | s.Delimiter = &v | ||
14028 | return s | ||
14029 | } | ||
14030 | |||
14031 | // SetEncodingType sets the EncodingType field's value. | ||
14032 | func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output { | ||
14033 | s.EncodingType = &v | ||
14034 | return s | ||
14035 | } | ||
14036 | |||
14037 | // SetIsTruncated sets the IsTruncated field's value. | ||
14038 | func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output { | ||
14039 | s.IsTruncated = &v | ||
14040 | return s | ||
14041 | } | ||
14042 | |||
14043 | // SetKeyCount sets the KeyCount field's value. | ||
14044 | func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output { | ||
14045 | s.KeyCount = &v | ||
14046 | return s | ||
14047 | } | ||
14048 | |||
14049 | // SetMaxKeys sets the MaxKeys field's value. | ||
14050 | func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output { | ||
14051 | s.MaxKeys = &v | ||
14052 | return s | ||
14053 | } | ||
14054 | |||
14055 | // SetName sets the Name field's value. | ||
14056 | func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output { | ||
14057 | s.Name = &v | ||
14058 | return s | ||
14059 | } | ||
14060 | |||
14061 | // SetNextContinuationToken sets the NextContinuationToken field's value. | ||
14062 | func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output { | ||
14063 | s.NextContinuationToken = &v | ||
14064 | return s | ||
14065 | } | ||
14066 | |||
14067 | // SetPrefix sets the Prefix field's value. | ||
14068 | func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output { | ||
14069 | s.Prefix = &v | ||
14070 | return s | ||
14071 | } | ||
14072 | |||
14073 | // SetStartAfter sets the StartAfter field's value. | ||
14074 | func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output { | ||
14075 | s.StartAfter = &v | ||
14076 | return s | ||
14077 | } | ||
14078 | |||
14079 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsRequest | ||
14080 | type ListPartsInput struct { | ||
14081 | _ struct{} `type:"structure"` | ||
14082 | |||
14083 | // Bucket is a required field | ||
14084 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
14085 | |||
14086 | // Key is a required field | ||
14087 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
14088 | |||
14089 | // Sets the maximum number of parts to return. | ||
14090 | MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"` | ||
14091 | |||
14092 | // Specifies the part after which listing should begin. Only parts with higher | ||
14093 | // part numbers will be listed. | ||
14094 | PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"` | ||
14095 | |||
14096 | // Confirms that the requester knows that she or he will be charged for the | ||
14097 | // request. Bucket owners need not specify this parameter in their requests. | ||
14098 | // Documentation on downloading objects from requester pays buckets can be found | ||
14099 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
14100 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
14101 | |||
14102 | // Upload ID identifying the multipart upload whose parts are being listed. | ||
14103 | // | ||
14104 | // UploadId is a required field | ||
14105 | UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"` | ||
14106 | } | ||
14107 | |||
14108 | // String returns the string representation | ||
14109 | func (s ListPartsInput) String() string { | ||
14110 | return awsutil.Prettify(s) | ||
14111 | } | ||
14112 | |||
14113 | // GoString returns the string representation | ||
14114 | func (s ListPartsInput) GoString() string { | ||
14115 | return s.String() | ||
14116 | } | ||
14117 | |||
14118 | // Validate inspects the fields of the type to determine if they are valid. | ||
14119 | func (s *ListPartsInput) Validate() error { | ||
14120 | invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"} | ||
14121 | if s.Bucket == nil { | ||
14122 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
14123 | } | ||
14124 | if s.Key == nil { | ||
14125 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
14126 | } | ||
14127 | if s.Key != nil && len(*s.Key) < 1 { | ||
14128 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
14129 | } | ||
14130 | if s.UploadId == nil { | ||
14131 | invalidParams.Add(request.NewErrParamRequired("UploadId")) | ||
14132 | } | ||
14133 | |||
14134 | if invalidParams.Len() > 0 { | ||
14135 | return invalidParams | ||
14136 | } | ||
14137 | return nil | ||
14138 | } | ||
14139 | |||
14140 | // SetBucket sets the Bucket field's value. | ||
14141 | func (s *ListPartsInput) SetBucket(v string) *ListPartsInput { | ||
14142 | s.Bucket = &v | ||
14143 | return s | ||
14144 | } | ||
14145 | |||
14146 | // SetKey sets the Key field's value. | ||
14147 | func (s *ListPartsInput) SetKey(v string) *ListPartsInput { | ||
14148 | s.Key = &v | ||
14149 | return s | ||
14150 | } | ||
14151 | |||
14152 | // SetMaxParts sets the MaxParts field's value. | ||
14153 | func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput { | ||
14154 | s.MaxParts = &v | ||
14155 | return s | ||
14156 | } | ||
14157 | |||
14158 | // SetPartNumberMarker sets the PartNumberMarker field's value. | ||
14159 | func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput { | ||
14160 | s.PartNumberMarker = &v | ||
14161 | return s | ||
14162 | } | ||
14163 | |||
14164 | // SetRequestPayer sets the RequestPayer field's value. | ||
14165 | func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput { | ||
14166 | s.RequestPayer = &v | ||
14167 | return s | ||
14168 | } | ||
14169 | |||
14170 | // SetUploadId sets the UploadId field's value. | ||
14171 | func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput { | ||
14172 | s.UploadId = &v | ||
14173 | return s | ||
14174 | } | ||
14175 | |||
14176 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsOutput | ||
14177 | type ListPartsOutput struct { | ||
14178 | _ struct{} `type:"structure"` | ||
14179 | |||
14180 | // Date when multipart upload will become eligible for abort operation by lifecycle. | ||
14181 | AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"` | ||
14182 | |||
14183 | // Id of the lifecycle rule that makes a multipart upload eligible for abort | ||
14184 | // operation. | ||
14185 | AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"` | ||
14186 | |||
14187 | // Name of the bucket to which the multipart upload was initiated. | ||
14188 | Bucket *string `type:"string"` | ||
14189 | |||
14190 | // Identifies who initiated the multipart upload. | ||
14191 | Initiator *Initiator `type:"structure"` | ||
14192 | |||
14193 | // Indicates whether the returned list of parts is truncated. | ||
14194 | IsTruncated *bool `type:"boolean"` | ||
14195 | |||
14196 | // Object key for which the multipart upload was initiated. | ||
14197 | Key *string `min:"1" type:"string"` | ||
14198 | |||
14199 | // Maximum number of parts that were allowed in the response. | ||
14200 | MaxParts *int64 `type:"integer"` | ||
14201 | |||
14202 | // When a list is truncated, this element specifies the last part in the list, | ||
14203 | // as well as the value to use for the part-number-marker request parameter | ||
14204 | // in a subsequent request. | ||
14205 | NextPartNumberMarker *int64 `type:"integer"` | ||
14206 | |||
14207 | Owner *Owner `type:"structure"` | ||
14208 | |||
14209 | // Part number after which listing begins. | ||
14210 | PartNumberMarker *int64 `type:"integer"` | ||
14211 | |||
14212 | Parts []*Part `locationName:"Part" type:"list" flattened:"true"` | ||
14213 | |||
14214 | // If present, indicates that the requester was successfully charged for the | ||
14215 | // request. | ||
14216 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
14217 | |||
14218 | // The class of storage used to store the object. | ||
14219 | StorageClass *string `type:"string" enum:"StorageClass"` | ||
14220 | |||
14221 | // Upload ID identifying the multipart upload whose parts are being listed. | ||
14222 | UploadId *string `type:"string"` | ||
14223 | } | ||
14224 | |||
14225 | // String returns the string representation | ||
14226 | func (s ListPartsOutput) String() string { | ||
14227 | return awsutil.Prettify(s) | ||
14228 | } | ||
14229 | |||
14230 | // GoString returns the string representation | ||
14231 | func (s ListPartsOutput) GoString() string { | ||
14232 | return s.String() | ||
14233 | } | ||
14234 | |||
14235 | // SetAbortDate sets the AbortDate field's value. | ||
14236 | func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput { | ||
14237 | s.AbortDate = &v | ||
14238 | return s | ||
14239 | } | ||
14240 | |||
14241 | // SetAbortRuleId sets the AbortRuleId field's value. | ||
14242 | func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput { | ||
14243 | s.AbortRuleId = &v | ||
14244 | return s | ||
14245 | } | ||
14246 | |||
14247 | // SetBucket sets the Bucket field's value. | ||
14248 | func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput { | ||
14249 | s.Bucket = &v | ||
14250 | return s | ||
14251 | } | ||
14252 | |||
14253 | // SetInitiator sets the Initiator field's value. | ||
14254 | func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput { | ||
14255 | s.Initiator = v | ||
14256 | return s | ||
14257 | } | ||
14258 | |||
14259 | // SetIsTruncated sets the IsTruncated field's value. | ||
14260 | func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput { | ||
14261 | s.IsTruncated = &v | ||
14262 | return s | ||
14263 | } | ||
14264 | |||
14265 | // SetKey sets the Key field's value. | ||
14266 | func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput { | ||
14267 | s.Key = &v | ||
14268 | return s | ||
14269 | } | ||
14270 | |||
14271 | // SetMaxParts sets the MaxParts field's value. | ||
14272 | func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput { | ||
14273 | s.MaxParts = &v | ||
14274 | return s | ||
14275 | } | ||
14276 | |||
14277 | // SetNextPartNumberMarker sets the NextPartNumberMarker field's value. | ||
14278 | func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput { | ||
14279 | s.NextPartNumberMarker = &v | ||
14280 | return s | ||
14281 | } | ||
14282 | |||
14283 | // SetOwner sets the Owner field's value. | ||
14284 | func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput { | ||
14285 | s.Owner = v | ||
14286 | return s | ||
14287 | } | ||
14288 | |||
14289 | // SetPartNumberMarker sets the PartNumberMarker field's value. | ||
14290 | func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput { | ||
14291 | s.PartNumberMarker = &v | ||
14292 | return s | ||
14293 | } | ||
14294 | |||
14295 | // SetParts sets the Parts field's value. | ||
14296 | func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput { | ||
14297 | s.Parts = v | ||
14298 | return s | ||
14299 | } | ||
14300 | |||
14301 | // SetRequestCharged sets the RequestCharged field's value. | ||
14302 | func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput { | ||
14303 | s.RequestCharged = &v | ||
14304 | return s | ||
14305 | } | ||
14306 | |||
14307 | // SetStorageClass sets the StorageClass field's value. | ||
14308 | func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput { | ||
14309 | s.StorageClass = &v | ||
14310 | return s | ||
14311 | } | ||
14312 | |||
14313 | // SetUploadId sets the UploadId field's value. | ||
14314 | func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput { | ||
14315 | s.UploadId = &v | ||
14316 | return s | ||
14317 | } | ||
14318 | |||
14319 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LoggingEnabled | ||
14320 | type LoggingEnabled struct { | ||
14321 | _ struct{} `type:"structure"` | ||
14322 | |||
14323 | // Specifies the bucket where you want Amazon S3 to store server access logs. | ||
14324 | // You can have your logs delivered to any bucket that you own, including the | ||
14325 | // same bucket that is being logged. You can also configure multiple buckets | ||
14326 | // to deliver their logs to the same target bucket. In this case you should | ||
14327 | // choose a different TargetPrefix for each source bucket so that the delivered | ||
14328 | // log files can be distinguished by key. | ||
14329 | TargetBucket *string `type:"string"` | ||
14330 | |||
14331 | TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"` | ||
14332 | |||
14333 | // This element lets you specify a prefix for the keys that the log files will | ||
14334 | // be stored under. | ||
14335 | TargetPrefix *string `type:"string"` | ||
14336 | } | ||
14337 | |||
14338 | // String returns the string representation | ||
14339 | func (s LoggingEnabled) String() string { | ||
14340 | return awsutil.Prettify(s) | ||
14341 | } | ||
14342 | |||
14343 | // GoString returns the string representation | ||
14344 | func (s LoggingEnabled) GoString() string { | ||
14345 | return s.String() | ||
14346 | } | ||
14347 | |||
14348 | // Validate inspects the fields of the type to determine if they are valid. | ||
14349 | func (s *LoggingEnabled) Validate() error { | ||
14350 | invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"} | ||
14351 | if s.TargetGrants != nil { | ||
14352 | for i, v := range s.TargetGrants { | ||
14353 | if v == nil { | ||
14354 | continue | ||
14355 | } | ||
14356 | if err := v.Validate(); err != nil { | ||
14357 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams)) | ||
14358 | } | ||
14359 | } | ||
14360 | } | ||
14361 | |||
14362 | if invalidParams.Len() > 0 { | ||
14363 | return invalidParams | ||
14364 | } | ||
14365 | return nil | ||
14366 | } | ||
14367 | |||
14368 | // SetTargetBucket sets the TargetBucket field's value. | ||
14369 | func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled { | ||
14370 | s.TargetBucket = &v | ||
14371 | return s | ||
14372 | } | ||
14373 | |||
14374 | // SetTargetGrants sets the TargetGrants field's value. | ||
14375 | func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled { | ||
14376 | s.TargetGrants = v | ||
14377 | return s | ||
14378 | } | ||
14379 | |||
14380 | // SetTargetPrefix sets the TargetPrefix field's value. | ||
14381 | func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled { | ||
14382 | s.TargetPrefix = &v | ||
14383 | return s | ||
14384 | } | ||
14385 | |||
14386 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsAndOperator | ||
14387 | type MetricsAndOperator struct { | ||
14388 | _ struct{} `type:"structure"` | ||
14389 | |||
14390 | // The prefix used when evaluating an AND predicate. | ||
14391 | Prefix *string `type:"string"` | ||
14392 | |||
14393 | // The list of tags used when evaluating an AND predicate. | ||
14394 | Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"` | ||
14395 | } | ||
14396 | |||
14397 | // String returns the string representation | ||
14398 | func (s MetricsAndOperator) String() string { | ||
14399 | return awsutil.Prettify(s) | ||
14400 | } | ||
14401 | |||
14402 | // GoString returns the string representation | ||
14403 | func (s MetricsAndOperator) GoString() string { | ||
14404 | return s.String() | ||
14405 | } | ||
14406 | |||
14407 | // Validate inspects the fields of the type to determine if they are valid. | ||
14408 | func (s *MetricsAndOperator) Validate() error { | ||
14409 | invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"} | ||
14410 | if s.Tags != nil { | ||
14411 | for i, v := range s.Tags { | ||
14412 | if v == nil { | ||
14413 | continue | ||
14414 | } | ||
14415 | if err := v.Validate(); err != nil { | ||
14416 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) | ||
14417 | } | ||
14418 | } | ||
14419 | } | ||
14420 | |||
14421 | if invalidParams.Len() > 0 { | ||
14422 | return invalidParams | ||
14423 | } | ||
14424 | return nil | ||
14425 | } | ||
14426 | |||
14427 | // SetPrefix sets the Prefix field's value. | ||
14428 | func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator { | ||
14429 | s.Prefix = &v | ||
14430 | return s | ||
14431 | } | ||
14432 | |||
14433 | // SetTags sets the Tags field's value. | ||
14434 | func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator { | ||
14435 | s.Tags = v | ||
14436 | return s | ||
14437 | } | ||
14438 | |||
14439 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsConfiguration | ||
14440 | type MetricsConfiguration struct { | ||
14441 | _ struct{} `type:"structure"` | ||
14442 | |||
14443 | // Specifies a metrics configuration filter. The metrics configuration will | ||
14444 | // only include objects that meet the filter's criteria. A filter must be a | ||
14445 | // prefix, a tag, or a conjunction (MetricsAndOperator). | ||
14446 | Filter *MetricsFilter `type:"structure"` | ||
14447 | |||
14448 | // The ID used to identify the metrics configuration. | ||
14449 | // | ||
14450 | // Id is a required field | ||
14451 | Id *string `type:"string" required:"true"` | ||
14452 | } | ||
14453 | |||
14454 | // String returns the string representation | ||
14455 | func (s MetricsConfiguration) String() string { | ||
14456 | return awsutil.Prettify(s) | ||
14457 | } | ||
14458 | |||
14459 | // GoString returns the string representation | ||
14460 | func (s MetricsConfiguration) GoString() string { | ||
14461 | return s.String() | ||
14462 | } | ||
14463 | |||
14464 | // Validate inspects the fields of the type to determine if they are valid. | ||
14465 | func (s *MetricsConfiguration) Validate() error { | ||
14466 | invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"} | ||
14467 | if s.Id == nil { | ||
14468 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
14469 | } | ||
14470 | if s.Filter != nil { | ||
14471 | if err := s.Filter.Validate(); err != nil { | ||
14472 | invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) | ||
14473 | } | ||
14474 | } | ||
14475 | |||
14476 | if invalidParams.Len() > 0 { | ||
14477 | return invalidParams | ||
14478 | } | ||
14479 | return nil | ||
14480 | } | ||
14481 | |||
14482 | // SetFilter sets the Filter field's value. | ||
14483 | func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration { | ||
14484 | s.Filter = v | ||
14485 | return s | ||
14486 | } | ||
14487 | |||
14488 | // SetId sets the Id field's value. | ||
14489 | func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration { | ||
14490 | s.Id = &v | ||
14491 | return s | ||
14492 | } | ||
14493 | |||
14494 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsFilter | ||
14495 | type MetricsFilter struct { | ||
14496 | _ struct{} `type:"structure"` | ||
14497 | |||
14498 | // A conjunction (logical AND) of predicates, which is used in evaluating a | ||
14499 | // metrics filter. The operator must have at least two predicates, and an object | ||
14500 | // must match all of the predicates in order for the filter to apply. | ||
14501 | And *MetricsAndOperator `type:"structure"` | ||
14502 | |||
14503 | // The prefix used when evaluating a metrics filter. | ||
14504 | Prefix *string `type:"string"` | ||
14505 | |||
14506 | // The tag used when evaluating a metrics filter. | ||
14507 | Tag *Tag `type:"structure"` | ||
14508 | } | ||
14509 | |||
14510 | // String returns the string representation | ||
14511 | func (s MetricsFilter) String() string { | ||
14512 | return awsutil.Prettify(s) | ||
14513 | } | ||
14514 | |||
14515 | // GoString returns the string representation | ||
14516 | func (s MetricsFilter) GoString() string { | ||
14517 | return s.String() | ||
14518 | } | ||
14519 | |||
14520 | // Validate inspects the fields of the type to determine if they are valid. | ||
14521 | func (s *MetricsFilter) Validate() error { | ||
14522 | invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"} | ||
14523 | if s.And != nil { | ||
14524 | if err := s.And.Validate(); err != nil { | ||
14525 | invalidParams.AddNested("And", err.(request.ErrInvalidParams)) | ||
14526 | } | ||
14527 | } | ||
14528 | if s.Tag != nil { | ||
14529 | if err := s.Tag.Validate(); err != nil { | ||
14530 | invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) | ||
14531 | } | ||
14532 | } | ||
14533 | |||
14534 | if invalidParams.Len() > 0 { | ||
14535 | return invalidParams | ||
14536 | } | ||
14537 | return nil | ||
14538 | } | ||
14539 | |||
14540 | // SetAnd sets the And field's value. | ||
14541 | func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter { | ||
14542 | s.And = v | ||
14543 | return s | ||
14544 | } | ||
14545 | |||
14546 | // SetPrefix sets the Prefix field's value. | ||
14547 | func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter { | ||
14548 | s.Prefix = &v | ||
14549 | return s | ||
14550 | } | ||
14551 | |||
14552 | // SetTag sets the Tag field's value. | ||
14553 | func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter { | ||
14554 | s.Tag = v | ||
14555 | return s | ||
14556 | } | ||
14557 | |||
14558 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MultipartUpload | ||
14559 | type MultipartUpload struct { | ||
14560 | _ struct{} `type:"structure"` | ||
14561 | |||
14562 | // Date and time at which the multipart upload was initiated. | ||
14563 | Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
14564 | |||
14565 | // Identifies who initiated the multipart upload. | ||
14566 | Initiator *Initiator `type:"structure"` | ||
14567 | |||
14568 | // Key of the object for which the multipart upload was initiated. | ||
14569 | Key *string `min:"1" type:"string"` | ||
14570 | |||
14571 | Owner *Owner `type:"structure"` | ||
14572 | |||
14573 | // The class of storage used to store the object. | ||
14574 | StorageClass *string `type:"string" enum:"StorageClass"` | ||
14575 | |||
14576 | // Upload ID that identifies the multipart upload. | ||
14577 | UploadId *string `type:"string"` | ||
14578 | } | ||
14579 | |||
14580 | // String returns the string representation | ||
14581 | func (s MultipartUpload) String() string { | ||
14582 | return awsutil.Prettify(s) | ||
14583 | } | ||
14584 | |||
14585 | // GoString returns the string representation | ||
14586 | func (s MultipartUpload) GoString() string { | ||
14587 | return s.String() | ||
14588 | } | ||
14589 | |||
14590 | // SetInitiated sets the Initiated field's value. | ||
14591 | func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload { | ||
14592 | s.Initiated = &v | ||
14593 | return s | ||
14594 | } | ||
14595 | |||
14596 | // SetInitiator sets the Initiator field's value. | ||
14597 | func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload { | ||
14598 | s.Initiator = v | ||
14599 | return s | ||
14600 | } | ||
14601 | |||
14602 | // SetKey sets the Key field's value. | ||
14603 | func (s *MultipartUpload) SetKey(v string) *MultipartUpload { | ||
14604 | s.Key = &v | ||
14605 | return s | ||
14606 | } | ||
14607 | |||
14608 | // SetOwner sets the Owner field's value. | ||
14609 | func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload { | ||
14610 | s.Owner = v | ||
14611 | return s | ||
14612 | } | ||
14613 | |||
14614 | // SetStorageClass sets the StorageClass field's value. | ||
14615 | func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload { | ||
14616 | s.StorageClass = &v | ||
14617 | return s | ||
14618 | } | ||
14619 | |||
14620 | // SetUploadId sets the UploadId field's value. | ||
14621 | func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload { | ||
14622 | s.UploadId = &v | ||
14623 | return s | ||
14624 | } | ||
14625 | |||
14626 | // Specifies when noncurrent object versions expire. Upon expiration, Amazon | ||
14627 | // S3 permanently deletes the noncurrent object versions. You set this lifecycle | ||
14628 | // configuration action on a bucket that has versioning enabled (or suspended) | ||
14629 | // to request that Amazon S3 delete noncurrent object versions at a specific | ||
14630 | // period in the object's lifetime. | ||
14631 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionExpiration | ||
14632 | type NoncurrentVersionExpiration struct { | ||
14633 | _ struct{} `type:"structure"` | ||
14634 | |||
14635 | // Specifies the number of days an object is noncurrent before Amazon S3 can | ||
14636 | // perform the associated action. For information about the noncurrent days | ||
14637 | // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent | ||
14638 | // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) | ||
14639 | NoncurrentDays *int64 `type:"integer"` | ||
14640 | } | ||
14641 | |||
14642 | // String returns the string representation | ||
14643 | func (s NoncurrentVersionExpiration) String() string { | ||
14644 | return awsutil.Prettify(s) | ||
14645 | } | ||
14646 | |||
14647 | // GoString returns the string representation | ||
14648 | func (s NoncurrentVersionExpiration) GoString() string { | ||
14649 | return s.String() | ||
14650 | } | ||
14651 | |||
14652 | // SetNoncurrentDays sets the NoncurrentDays field's value. | ||
14653 | func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration { | ||
14654 | s.NoncurrentDays = &v | ||
14655 | return s | ||
14656 | } | ||
14657 | |||
14658 | // Container for the transition rule that describes when noncurrent objects | ||
14659 | // transition to the STANDARD_IA or GLACIER storage class. If your bucket is | ||
14660 | // versioning-enabled (or versioning is suspended), you can set this action | ||
14661 | // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA | ||
14662 | // or GLACIER storage class at a specific period in the object's lifetime. | ||
14663 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionTransition | ||
14664 | type NoncurrentVersionTransition struct { | ||
14665 | _ struct{} `type:"structure"` | ||
14666 | |||
14667 | // Specifies the number of days an object is noncurrent before Amazon S3 can | ||
14668 | // perform the associated action. For information about the noncurrent days | ||
14669 | // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent | ||
14670 | // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) | ||
14671 | NoncurrentDays *int64 `type:"integer"` | ||
14672 | |||
14673 | // The class of storage used to store the object. | ||
14674 | StorageClass *string `type:"string" enum:"TransitionStorageClass"` | ||
14675 | } | ||
14676 | |||
14677 | // String returns the string representation | ||
14678 | func (s NoncurrentVersionTransition) String() string { | ||
14679 | return awsutil.Prettify(s) | ||
14680 | } | ||
14681 | |||
14682 | // GoString returns the string representation | ||
14683 | func (s NoncurrentVersionTransition) GoString() string { | ||
14684 | return s.String() | ||
14685 | } | ||
14686 | |||
14687 | // SetNoncurrentDays sets the NoncurrentDays field's value. | ||
14688 | func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition { | ||
14689 | s.NoncurrentDays = &v | ||
14690 | return s | ||
14691 | } | ||
14692 | |||
14693 | // SetStorageClass sets the StorageClass field's value. | ||
14694 | func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition { | ||
14695 | s.StorageClass = &v | ||
14696 | return s | ||
14697 | } | ||
14698 | |||
14699 | // Container for specifying the notification configuration of the bucket. If | ||
14700 | // this element is empty, notifications are turned off on the bucket. | ||
14701 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfiguration | ||
14702 | type NotificationConfiguration struct { | ||
14703 | _ struct{} `type:"structure"` | ||
14704 | |||
14705 | LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"` | ||
14706 | |||
14707 | QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"` | ||
14708 | |||
14709 | TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"` | ||
14710 | } | ||
14711 | |||
14712 | // String returns the string representation | ||
14713 | func (s NotificationConfiguration) String() string { | ||
14714 | return awsutil.Prettify(s) | ||
14715 | } | ||
14716 | |||
14717 | // GoString returns the string representation | ||
14718 | func (s NotificationConfiguration) GoString() string { | ||
14719 | return s.String() | ||
14720 | } | ||
14721 | |||
14722 | // Validate inspects the fields of the type to determine if they are valid. | ||
14723 | func (s *NotificationConfiguration) Validate() error { | ||
14724 | invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"} | ||
14725 | if s.LambdaFunctionConfigurations != nil { | ||
14726 | for i, v := range s.LambdaFunctionConfigurations { | ||
14727 | if v == nil { | ||
14728 | continue | ||
14729 | } | ||
14730 | if err := v.Validate(); err != nil { | ||
14731 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams)) | ||
14732 | } | ||
14733 | } | ||
14734 | } | ||
14735 | if s.QueueConfigurations != nil { | ||
14736 | for i, v := range s.QueueConfigurations { | ||
14737 | if v == nil { | ||
14738 | continue | ||
14739 | } | ||
14740 | if err := v.Validate(); err != nil { | ||
14741 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams)) | ||
14742 | } | ||
14743 | } | ||
14744 | } | ||
14745 | if s.TopicConfigurations != nil { | ||
14746 | for i, v := range s.TopicConfigurations { | ||
14747 | if v == nil { | ||
14748 | continue | ||
14749 | } | ||
14750 | if err := v.Validate(); err != nil { | ||
14751 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams)) | ||
14752 | } | ||
14753 | } | ||
14754 | } | ||
14755 | |||
14756 | if invalidParams.Len() > 0 { | ||
14757 | return invalidParams | ||
14758 | } | ||
14759 | return nil | ||
14760 | } | ||
14761 | |||
14762 | // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value. | ||
14763 | func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration { | ||
14764 | s.LambdaFunctionConfigurations = v | ||
14765 | return s | ||
14766 | } | ||
14767 | |||
14768 | // SetQueueConfigurations sets the QueueConfigurations field's value. | ||
14769 | func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration { | ||
14770 | s.QueueConfigurations = v | ||
14771 | return s | ||
14772 | } | ||
14773 | |||
14774 | // SetTopicConfigurations sets the TopicConfigurations field's value. | ||
14775 | func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration { | ||
14776 | s.TopicConfigurations = v | ||
14777 | return s | ||
14778 | } | ||
14779 | |||
14780 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationDeprecated | ||
14781 | type NotificationConfigurationDeprecated struct { | ||
14782 | _ struct{} `type:"structure"` | ||
14783 | |||
14784 | CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"` | ||
14785 | |||
14786 | QueueConfiguration *QueueConfigurationDeprecated `type:"structure"` | ||
14787 | |||
14788 | TopicConfiguration *TopicConfigurationDeprecated `type:"structure"` | ||
14789 | } | ||
14790 | |||
14791 | // String returns the string representation | ||
14792 | func (s NotificationConfigurationDeprecated) String() string { | ||
14793 | return awsutil.Prettify(s) | ||
14794 | } | ||
14795 | |||
14796 | // GoString returns the string representation | ||
14797 | func (s NotificationConfigurationDeprecated) GoString() string { | ||
14798 | return s.String() | ||
14799 | } | ||
14800 | |||
14801 | // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value. | ||
14802 | func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated { | ||
14803 | s.CloudFunctionConfiguration = v | ||
14804 | return s | ||
14805 | } | ||
14806 | |||
14807 | // SetQueueConfiguration sets the QueueConfiguration field's value. | ||
14808 | func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated { | ||
14809 | s.QueueConfiguration = v | ||
14810 | return s | ||
14811 | } | ||
14812 | |||
14813 | // SetTopicConfiguration sets the TopicConfiguration field's value. | ||
14814 | func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated { | ||
14815 | s.TopicConfiguration = v | ||
14816 | return s | ||
14817 | } | ||
14818 | |||
14819 | // Container for object key name filtering rules. For information about key | ||
14820 | // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) | ||
14821 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationFilter | ||
14822 | type NotificationConfigurationFilter struct { | ||
14823 | _ struct{} `type:"structure"` | ||
14824 | |||
14825 | // Container for object key name prefix and suffix filtering rules. | ||
14826 | Key *KeyFilter `locationName:"S3Key" type:"structure"` | ||
14827 | } | ||
14828 | |||
14829 | // String returns the string representation | ||
14830 | func (s NotificationConfigurationFilter) String() string { | ||
14831 | return awsutil.Prettify(s) | ||
14832 | } | ||
14833 | |||
14834 | // GoString returns the string representation | ||
14835 | func (s NotificationConfigurationFilter) GoString() string { | ||
14836 | return s.String() | ||
14837 | } | ||
14838 | |||
14839 | // SetKey sets the Key field's value. | ||
14840 | func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter { | ||
14841 | s.Key = v | ||
14842 | return s | ||
14843 | } | ||
14844 | |||
14845 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Object | ||
14846 | type Object struct { | ||
14847 | _ struct{} `type:"structure"` | ||
14848 | |||
14849 | ETag *string `type:"string"` | ||
14850 | |||
14851 | Key *string `min:"1" type:"string"` | ||
14852 | |||
14853 | LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
14854 | |||
14855 | Owner *Owner `type:"structure"` | ||
14856 | |||
14857 | Size *int64 `type:"integer"` | ||
14858 | |||
14859 | // The class of storage used to store the object. | ||
14860 | StorageClass *string `type:"string" enum:"ObjectStorageClass"` | ||
14861 | } | ||
14862 | |||
14863 | // String returns the string representation | ||
14864 | func (s Object) String() string { | ||
14865 | return awsutil.Prettify(s) | ||
14866 | } | ||
14867 | |||
14868 | // GoString returns the string representation | ||
14869 | func (s Object) GoString() string { | ||
14870 | return s.String() | ||
14871 | } | ||
14872 | |||
14873 | // SetETag sets the ETag field's value. | ||
14874 | func (s *Object) SetETag(v string) *Object { | ||
14875 | s.ETag = &v | ||
14876 | return s | ||
14877 | } | ||
14878 | |||
14879 | // SetKey sets the Key field's value. | ||
14880 | func (s *Object) SetKey(v string) *Object { | ||
14881 | s.Key = &v | ||
14882 | return s | ||
14883 | } | ||
14884 | |||
14885 | // SetLastModified sets the LastModified field's value. | ||
14886 | func (s *Object) SetLastModified(v time.Time) *Object { | ||
14887 | s.LastModified = &v | ||
14888 | return s | ||
14889 | } | ||
14890 | |||
14891 | // SetOwner sets the Owner field's value. | ||
14892 | func (s *Object) SetOwner(v *Owner) *Object { | ||
14893 | s.Owner = v | ||
14894 | return s | ||
14895 | } | ||
14896 | |||
14897 | // SetSize sets the Size field's value. | ||
14898 | func (s *Object) SetSize(v int64) *Object { | ||
14899 | s.Size = &v | ||
14900 | return s | ||
14901 | } | ||
14902 | |||
14903 | // SetStorageClass sets the StorageClass field's value. | ||
14904 | func (s *Object) SetStorageClass(v string) *Object { | ||
14905 | s.StorageClass = &v | ||
14906 | return s | ||
14907 | } | ||
14908 | |||
14909 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectIdentifier | ||
14910 | type ObjectIdentifier struct { | ||
14911 | _ struct{} `type:"structure"` | ||
14912 | |||
14913 | // Key name of the object to delete. | ||
14914 | // | ||
14915 | // Key is a required field | ||
14916 | Key *string `min:"1" type:"string" required:"true"` | ||
14917 | |||
14918 | // VersionId for the specific version of the object to delete. | ||
14919 | VersionId *string `type:"string"` | ||
14920 | } | ||
14921 | |||
14922 | // String returns the string representation | ||
14923 | func (s ObjectIdentifier) String() string { | ||
14924 | return awsutil.Prettify(s) | ||
14925 | } | ||
14926 | |||
14927 | // GoString returns the string representation | ||
14928 | func (s ObjectIdentifier) GoString() string { | ||
14929 | return s.String() | ||
14930 | } | ||
14931 | |||
14932 | // Validate inspects the fields of the type to determine if they are valid. | ||
14933 | func (s *ObjectIdentifier) Validate() error { | ||
14934 | invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"} | ||
14935 | if s.Key == nil { | ||
14936 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
14937 | } | ||
14938 | if s.Key != nil && len(*s.Key) < 1 { | ||
14939 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
14940 | } | ||
14941 | |||
14942 | if invalidParams.Len() > 0 { | ||
14943 | return invalidParams | ||
14944 | } | ||
14945 | return nil | ||
14946 | } | ||
14947 | |||
14948 | // SetKey sets the Key field's value. | ||
14949 | func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier { | ||
14950 | s.Key = &v | ||
14951 | return s | ||
14952 | } | ||
14953 | |||
14954 | // SetVersionId sets the VersionId field's value. | ||
14955 | func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier { | ||
14956 | s.VersionId = &v | ||
14957 | return s | ||
14958 | } | ||
14959 | |||
14960 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectVersion | ||
14961 | type ObjectVersion struct { | ||
14962 | _ struct{} `type:"structure"` | ||
14963 | |||
14964 | ETag *string `type:"string"` | ||
14965 | |||
14966 | // Specifies whether the object is (true) or is not (false) the latest version | ||
14967 | // of an object. | ||
14968 | IsLatest *bool `type:"boolean"` | ||
14969 | |||
14970 | // The object key. | ||
14971 | Key *string `min:"1" type:"string"` | ||
14972 | |||
14973 | // Date and time the object was last modified. | ||
14974 | LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
14975 | |||
14976 | Owner *Owner `type:"structure"` | ||
14977 | |||
14978 | // Size in bytes of the object. | ||
14979 | Size *int64 `type:"integer"` | ||
14980 | |||
14981 | // The class of storage used to store the object. | ||
14982 | StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"` | ||
14983 | |||
14984 | // Version ID of an object. | ||
14985 | VersionId *string `type:"string"` | ||
14986 | } | ||
14987 | |||
14988 | // String returns the string representation | ||
14989 | func (s ObjectVersion) String() string { | ||
14990 | return awsutil.Prettify(s) | ||
14991 | } | ||
14992 | |||
14993 | // GoString returns the string representation | ||
14994 | func (s ObjectVersion) GoString() string { | ||
14995 | return s.String() | ||
14996 | } | ||
14997 | |||
14998 | // SetETag sets the ETag field's value. | ||
14999 | func (s *ObjectVersion) SetETag(v string) *ObjectVersion { | ||
15000 | s.ETag = &v | ||
15001 | return s | ||
15002 | } | ||
15003 | |||
15004 | // SetIsLatest sets the IsLatest field's value. | ||
15005 | func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion { | ||
15006 | s.IsLatest = &v | ||
15007 | return s | ||
15008 | } | ||
15009 | |||
15010 | // SetKey sets the Key field's value. | ||
15011 | func (s *ObjectVersion) SetKey(v string) *ObjectVersion { | ||
15012 | s.Key = &v | ||
15013 | return s | ||
15014 | } | ||
15015 | |||
15016 | // SetLastModified sets the LastModified field's value. | ||
15017 | func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion { | ||
15018 | s.LastModified = &v | ||
15019 | return s | ||
15020 | } | ||
15021 | |||
15022 | // SetOwner sets the Owner field's value. | ||
15023 | func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion { | ||
15024 | s.Owner = v | ||
15025 | return s | ||
15026 | } | ||
15027 | |||
15028 | // SetSize sets the Size field's value. | ||
15029 | func (s *ObjectVersion) SetSize(v int64) *ObjectVersion { | ||
15030 | s.Size = &v | ||
15031 | return s | ||
15032 | } | ||
15033 | |||
15034 | // SetStorageClass sets the StorageClass field's value. | ||
15035 | func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion { | ||
15036 | s.StorageClass = &v | ||
15037 | return s | ||
15038 | } | ||
15039 | |||
15040 | // SetVersionId sets the VersionId field's value. | ||
15041 | func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion { | ||
15042 | s.VersionId = &v | ||
15043 | return s | ||
15044 | } | ||
15045 | |||
15046 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Owner | ||
15047 | type Owner struct { | ||
15048 | _ struct{} `type:"structure"` | ||
15049 | |||
15050 | DisplayName *string `type:"string"` | ||
15051 | |||
15052 | ID *string `type:"string"` | ||
15053 | } | ||
15054 | |||
15055 | // String returns the string representation | ||
15056 | func (s Owner) String() string { | ||
15057 | return awsutil.Prettify(s) | ||
15058 | } | ||
15059 | |||
15060 | // GoString returns the string representation | ||
15061 | func (s Owner) GoString() string { | ||
15062 | return s.String() | ||
15063 | } | ||
15064 | |||
15065 | // SetDisplayName sets the DisplayName field's value. | ||
15066 | func (s *Owner) SetDisplayName(v string) *Owner { | ||
15067 | s.DisplayName = &v | ||
15068 | return s | ||
15069 | } | ||
15070 | |||
15071 | // SetID sets the ID field's value. | ||
15072 | func (s *Owner) SetID(v string) *Owner { | ||
15073 | s.ID = &v | ||
15074 | return s | ||
15075 | } | ||
15076 | |||
15077 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Part | ||
15078 | type Part struct { | ||
15079 | _ struct{} `type:"structure"` | ||
15080 | |||
15081 | // Entity tag returned when the part was uploaded. | ||
15082 | ETag *string `type:"string"` | ||
15083 | |||
15084 | // Date and time at which the part was uploaded. | ||
15085 | LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
15086 | |||
15087 | // Part number identifying the part. This is a positive integer between 1 and | ||
15088 | // 10,000. | ||
15089 | PartNumber *int64 `type:"integer"` | ||
15090 | |||
15091 | // Size of the uploaded part data. | ||
15092 | Size *int64 `type:"integer"` | ||
15093 | } | ||
15094 | |||
15095 | // String returns the string representation | ||
15096 | func (s Part) String() string { | ||
15097 | return awsutil.Prettify(s) | ||
15098 | } | ||
15099 | |||
15100 | // GoString returns the string representation | ||
15101 | func (s Part) GoString() string { | ||
15102 | return s.String() | ||
15103 | } | ||
15104 | |||
15105 | // SetETag sets the ETag field's value. | ||
15106 | func (s *Part) SetETag(v string) *Part { | ||
15107 | s.ETag = &v | ||
15108 | return s | ||
15109 | } | ||
15110 | |||
15111 | // SetLastModified sets the LastModified field's value. | ||
15112 | func (s *Part) SetLastModified(v time.Time) *Part { | ||
15113 | s.LastModified = &v | ||
15114 | return s | ||
15115 | } | ||
15116 | |||
15117 | // SetPartNumber sets the PartNumber field's value. | ||
15118 | func (s *Part) SetPartNumber(v int64) *Part { | ||
15119 | s.PartNumber = &v | ||
15120 | return s | ||
15121 | } | ||
15122 | |||
15123 | // SetSize sets the Size field's value. | ||
15124 | func (s *Part) SetSize(v int64) *Part { | ||
15125 | s.Size = &v | ||
15126 | return s | ||
15127 | } | ||
15128 | |||
15129 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationRequest | ||
15130 | type PutBucketAccelerateConfigurationInput struct { | ||
15131 | _ struct{} `type:"structure" payload:"AccelerateConfiguration"` | ||
15132 | |||
15133 | // Specifies the Accelerate Configuration you want to set for the bucket. | ||
15134 | // | ||
15135 | // AccelerateConfiguration is a required field | ||
15136 | AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true"` | ||
15137 | |||
15138 | // Name of the bucket for which the accelerate configuration is set. | ||
15139 | // | ||
15140 | // Bucket is a required field | ||
15141 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15142 | } | ||
15143 | |||
15144 | // String returns the string representation | ||
15145 | func (s PutBucketAccelerateConfigurationInput) String() string { | ||
15146 | return awsutil.Prettify(s) | ||
15147 | } | ||
15148 | |||
15149 | // GoString returns the string representation | ||
15150 | func (s PutBucketAccelerateConfigurationInput) GoString() string { | ||
15151 | return s.String() | ||
15152 | } | ||
15153 | |||
15154 | // Validate inspects the fields of the type to determine if they are valid. | ||
15155 | func (s *PutBucketAccelerateConfigurationInput) Validate() error { | ||
15156 | invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"} | ||
15157 | if s.AccelerateConfiguration == nil { | ||
15158 | invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration")) | ||
15159 | } | ||
15160 | if s.Bucket == nil { | ||
15161 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15162 | } | ||
15163 | |||
15164 | if invalidParams.Len() > 0 { | ||
15165 | return invalidParams | ||
15166 | } | ||
15167 | return nil | ||
15168 | } | ||
15169 | |||
15170 | // SetAccelerateConfiguration sets the AccelerateConfiguration field's value. | ||
15171 | func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput { | ||
15172 | s.AccelerateConfiguration = v | ||
15173 | return s | ||
15174 | } | ||
15175 | |||
15176 | // SetBucket sets the Bucket field's value. | ||
15177 | func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput { | ||
15178 | s.Bucket = &v | ||
15179 | return s | ||
15180 | } | ||
15181 | |||
15182 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationOutput | ||
15183 | type PutBucketAccelerateConfigurationOutput struct { | ||
15184 | _ struct{} `type:"structure"` | ||
15185 | } | ||
15186 | |||
15187 | // String returns the string representation | ||
15188 | func (s PutBucketAccelerateConfigurationOutput) String() string { | ||
15189 | return awsutil.Prettify(s) | ||
15190 | } | ||
15191 | |||
15192 | // GoString returns the string representation | ||
15193 | func (s PutBucketAccelerateConfigurationOutput) GoString() string { | ||
15194 | return s.String() | ||
15195 | } | ||
15196 | |||
15197 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclRequest | ||
15198 | type PutBucketAclInput struct { | ||
15199 | _ struct{} `type:"structure" payload:"AccessControlPolicy"` | ||
15200 | |||
15201 | // The canned ACL to apply to the bucket. | ||
15202 | ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"` | ||
15203 | |||
15204 | AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"` | ||
15205 | |||
15206 | // Bucket is a required field | ||
15207 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15208 | |||
15209 | // Allows grantee the read, write, read ACP, and write ACP permissions on the | ||
15210 | // bucket. | ||
15211 | GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` | ||
15212 | |||
15213 | // Allows grantee to list the objects in the bucket. | ||
15214 | GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` | ||
15215 | |||
15216 | // Allows grantee to read the bucket ACL. | ||
15217 | GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` | ||
15218 | |||
15219 | // Allows grantee to create, overwrite, and delete any object in the bucket. | ||
15220 | GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"` | ||
15221 | |||
15222 | // Allows grantee to write the ACL for the applicable bucket. | ||
15223 | GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` | ||
15224 | } | ||
15225 | |||
15226 | // String returns the string representation | ||
15227 | func (s PutBucketAclInput) String() string { | ||
15228 | return awsutil.Prettify(s) | ||
15229 | } | ||
15230 | |||
15231 | // GoString returns the string representation | ||
15232 | func (s PutBucketAclInput) GoString() string { | ||
15233 | return s.String() | ||
15234 | } | ||
15235 | |||
15236 | // Validate inspects the fields of the type to determine if they are valid. | ||
15237 | func (s *PutBucketAclInput) Validate() error { | ||
15238 | invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"} | ||
15239 | if s.Bucket == nil { | ||
15240 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15241 | } | ||
15242 | if s.AccessControlPolicy != nil { | ||
15243 | if err := s.AccessControlPolicy.Validate(); err != nil { | ||
15244 | invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams)) | ||
15245 | } | ||
15246 | } | ||
15247 | |||
15248 | if invalidParams.Len() > 0 { | ||
15249 | return invalidParams | ||
15250 | } | ||
15251 | return nil | ||
15252 | } | ||
15253 | |||
15254 | // SetACL sets the ACL field's value. | ||
15255 | func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput { | ||
15256 | s.ACL = &v | ||
15257 | return s | ||
15258 | } | ||
15259 | |||
15260 | // SetAccessControlPolicy sets the AccessControlPolicy field's value. | ||
15261 | func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput { | ||
15262 | s.AccessControlPolicy = v | ||
15263 | return s | ||
15264 | } | ||
15265 | |||
15266 | // SetBucket sets the Bucket field's value. | ||
15267 | func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput { | ||
15268 | s.Bucket = &v | ||
15269 | return s | ||
15270 | } | ||
15271 | |||
15272 | // SetGrantFullControl sets the GrantFullControl field's value. | ||
15273 | func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput { | ||
15274 | s.GrantFullControl = &v | ||
15275 | return s | ||
15276 | } | ||
15277 | |||
15278 | // SetGrantRead sets the GrantRead field's value. | ||
15279 | func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput { | ||
15280 | s.GrantRead = &v | ||
15281 | return s | ||
15282 | } | ||
15283 | |||
15284 | // SetGrantReadACP sets the GrantReadACP field's value. | ||
15285 | func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput { | ||
15286 | s.GrantReadACP = &v | ||
15287 | return s | ||
15288 | } | ||
15289 | |||
15290 | // SetGrantWrite sets the GrantWrite field's value. | ||
15291 | func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput { | ||
15292 | s.GrantWrite = &v | ||
15293 | return s | ||
15294 | } | ||
15295 | |||
15296 | // SetGrantWriteACP sets the GrantWriteACP field's value. | ||
15297 | func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput { | ||
15298 | s.GrantWriteACP = &v | ||
15299 | return s | ||
15300 | } | ||
15301 | |||
15302 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclOutput | ||
15303 | type PutBucketAclOutput struct { | ||
15304 | _ struct{} `type:"structure"` | ||
15305 | } | ||
15306 | |||
15307 | // String returns the string representation | ||
15308 | func (s PutBucketAclOutput) String() string { | ||
15309 | return awsutil.Prettify(s) | ||
15310 | } | ||
15311 | |||
15312 | // GoString returns the string representation | ||
15313 | func (s PutBucketAclOutput) GoString() string { | ||
15314 | return s.String() | ||
15315 | } | ||
15316 | |||
15317 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationRequest | ||
15318 | type PutBucketAnalyticsConfigurationInput struct { | ||
15319 | _ struct{} `type:"structure" payload:"AnalyticsConfiguration"` | ||
15320 | |||
15321 | // The configuration and any analyses for the analytics filter. | ||
15322 | // | ||
15323 | // AnalyticsConfiguration is a required field | ||
15324 | AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true"` | ||
15325 | |||
15326 | // The name of the bucket to which an analytics configuration is stored. | ||
15327 | // | ||
15328 | // Bucket is a required field | ||
15329 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15330 | |||
15331 | // The identifier used to represent an analytics configuration. | ||
15332 | // | ||
15333 | // Id is a required field | ||
15334 | Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` | ||
15335 | } | ||
15336 | |||
15337 | // String returns the string representation | ||
15338 | func (s PutBucketAnalyticsConfigurationInput) String() string { | ||
15339 | return awsutil.Prettify(s) | ||
15340 | } | ||
15341 | |||
15342 | // GoString returns the string representation | ||
15343 | func (s PutBucketAnalyticsConfigurationInput) GoString() string { | ||
15344 | return s.String() | ||
15345 | } | ||
15346 | |||
15347 | // Validate inspects the fields of the type to determine if they are valid. | ||
15348 | func (s *PutBucketAnalyticsConfigurationInput) Validate() error { | ||
15349 | invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"} | ||
15350 | if s.AnalyticsConfiguration == nil { | ||
15351 | invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration")) | ||
15352 | } | ||
15353 | if s.Bucket == nil { | ||
15354 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15355 | } | ||
15356 | if s.Id == nil { | ||
15357 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
15358 | } | ||
15359 | if s.AnalyticsConfiguration != nil { | ||
15360 | if err := s.AnalyticsConfiguration.Validate(); err != nil { | ||
15361 | invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams)) | ||
15362 | } | ||
15363 | } | ||
15364 | |||
15365 | if invalidParams.Len() > 0 { | ||
15366 | return invalidParams | ||
15367 | } | ||
15368 | return nil | ||
15369 | } | ||
15370 | |||
15371 | // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value. | ||
15372 | func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput { | ||
15373 | s.AnalyticsConfiguration = v | ||
15374 | return s | ||
15375 | } | ||
15376 | |||
15377 | // SetBucket sets the Bucket field's value. | ||
15378 | func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput { | ||
15379 | s.Bucket = &v | ||
15380 | return s | ||
15381 | } | ||
15382 | |||
15383 | // SetId sets the Id field's value. | ||
15384 | func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput { | ||
15385 | s.Id = &v | ||
15386 | return s | ||
15387 | } | ||
15388 | |||
15389 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationOutput | ||
15390 | type PutBucketAnalyticsConfigurationOutput struct { | ||
15391 | _ struct{} `type:"structure"` | ||
15392 | } | ||
15393 | |||
15394 | // String returns the string representation | ||
15395 | func (s PutBucketAnalyticsConfigurationOutput) String() string { | ||
15396 | return awsutil.Prettify(s) | ||
15397 | } | ||
15398 | |||
15399 | // GoString returns the string representation | ||
15400 | func (s PutBucketAnalyticsConfigurationOutput) GoString() string { | ||
15401 | return s.String() | ||
15402 | } | ||
15403 | |||
15404 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsRequest | ||
15405 | type PutBucketCorsInput struct { | ||
15406 | _ struct{} `type:"structure" payload:"CORSConfiguration"` | ||
15407 | |||
15408 | // Bucket is a required field | ||
15409 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15410 | |||
15411 | // CORSConfiguration is a required field | ||
15412 | CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true"` | ||
15413 | } | ||
15414 | |||
15415 | // String returns the string representation | ||
15416 | func (s PutBucketCorsInput) String() string { | ||
15417 | return awsutil.Prettify(s) | ||
15418 | } | ||
15419 | |||
15420 | // GoString returns the string representation | ||
15421 | func (s PutBucketCorsInput) GoString() string { | ||
15422 | return s.String() | ||
15423 | } | ||
15424 | |||
15425 | // Validate inspects the fields of the type to determine if they are valid. | ||
15426 | func (s *PutBucketCorsInput) Validate() error { | ||
15427 | invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"} | ||
15428 | if s.Bucket == nil { | ||
15429 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15430 | } | ||
15431 | if s.CORSConfiguration == nil { | ||
15432 | invalidParams.Add(request.NewErrParamRequired("CORSConfiguration")) | ||
15433 | } | ||
15434 | if s.CORSConfiguration != nil { | ||
15435 | if err := s.CORSConfiguration.Validate(); err != nil { | ||
15436 | invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams)) | ||
15437 | } | ||
15438 | } | ||
15439 | |||
15440 | if invalidParams.Len() > 0 { | ||
15441 | return invalidParams | ||
15442 | } | ||
15443 | return nil | ||
15444 | } | ||
15445 | |||
15446 | // SetBucket sets the Bucket field's value. | ||
15447 | func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput { | ||
15448 | s.Bucket = &v | ||
15449 | return s | ||
15450 | } | ||
15451 | |||
15452 | // SetCORSConfiguration sets the CORSConfiguration field's value. | ||
15453 | func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput { | ||
15454 | s.CORSConfiguration = v | ||
15455 | return s | ||
15456 | } | ||
15457 | |||
15458 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsOutput | ||
15459 | type PutBucketCorsOutput struct { | ||
15460 | _ struct{} `type:"structure"` | ||
15461 | } | ||
15462 | |||
15463 | // String returns the string representation | ||
15464 | func (s PutBucketCorsOutput) String() string { | ||
15465 | return awsutil.Prettify(s) | ||
15466 | } | ||
15467 | |||
15468 | // GoString returns the string representation | ||
15469 | func (s PutBucketCorsOutput) GoString() string { | ||
15470 | return s.String() | ||
15471 | } | ||
15472 | |||
15473 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationRequest | ||
15474 | type PutBucketInventoryConfigurationInput struct { | ||
15475 | _ struct{} `type:"structure" payload:"InventoryConfiguration"` | ||
15476 | |||
15477 | // The name of the bucket where the inventory configuration will be stored. | ||
15478 | // | ||
15479 | // Bucket is a required field | ||
15480 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15481 | |||
15482 | // The ID used to identify the inventory configuration. | ||
15483 | // | ||
15484 | // Id is a required field | ||
15485 | Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` | ||
15486 | |||
15487 | // Specifies the inventory configuration. | ||
15488 | // | ||
15489 | // InventoryConfiguration is a required field | ||
15490 | InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true"` | ||
15491 | } | ||
15492 | |||
15493 | // String returns the string representation | ||
15494 | func (s PutBucketInventoryConfigurationInput) String() string { | ||
15495 | return awsutil.Prettify(s) | ||
15496 | } | ||
15497 | |||
15498 | // GoString returns the string representation | ||
15499 | func (s PutBucketInventoryConfigurationInput) GoString() string { | ||
15500 | return s.String() | ||
15501 | } | ||
15502 | |||
15503 | // Validate inspects the fields of the type to determine if they are valid. | ||
15504 | func (s *PutBucketInventoryConfigurationInput) Validate() error { | ||
15505 | invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"} | ||
15506 | if s.Bucket == nil { | ||
15507 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15508 | } | ||
15509 | if s.Id == nil { | ||
15510 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
15511 | } | ||
15512 | if s.InventoryConfiguration == nil { | ||
15513 | invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration")) | ||
15514 | } | ||
15515 | if s.InventoryConfiguration != nil { | ||
15516 | if err := s.InventoryConfiguration.Validate(); err != nil { | ||
15517 | invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams)) | ||
15518 | } | ||
15519 | } | ||
15520 | |||
15521 | if invalidParams.Len() > 0 { | ||
15522 | return invalidParams | ||
15523 | } | ||
15524 | return nil | ||
15525 | } | ||
15526 | |||
15527 | // SetBucket sets the Bucket field's value. | ||
15528 | func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput { | ||
15529 | s.Bucket = &v | ||
15530 | return s | ||
15531 | } | ||
15532 | |||
15533 | // SetId sets the Id field's value. | ||
15534 | func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput { | ||
15535 | s.Id = &v | ||
15536 | return s | ||
15537 | } | ||
15538 | |||
15539 | // SetInventoryConfiguration sets the InventoryConfiguration field's value. | ||
15540 | func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput { | ||
15541 | s.InventoryConfiguration = v | ||
15542 | return s | ||
15543 | } | ||
15544 | |||
15545 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationOutput | ||
15546 | type PutBucketInventoryConfigurationOutput struct { | ||
15547 | _ struct{} `type:"structure"` | ||
15548 | } | ||
15549 | |||
15550 | // String returns the string representation | ||
15551 | func (s PutBucketInventoryConfigurationOutput) String() string { | ||
15552 | return awsutil.Prettify(s) | ||
15553 | } | ||
15554 | |||
15555 | // GoString returns the string representation | ||
15556 | func (s PutBucketInventoryConfigurationOutput) GoString() string { | ||
15557 | return s.String() | ||
15558 | } | ||
15559 | |||
15560 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationRequest | ||
15561 | type PutBucketLifecycleConfigurationInput struct { | ||
15562 | _ struct{} `type:"structure" payload:"LifecycleConfiguration"` | ||
15563 | |||
15564 | // Bucket is a required field | ||
15565 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15566 | |||
15567 | LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"` | ||
15568 | } | ||
15569 | |||
15570 | // String returns the string representation | ||
15571 | func (s PutBucketLifecycleConfigurationInput) String() string { | ||
15572 | return awsutil.Prettify(s) | ||
15573 | } | ||
15574 | |||
15575 | // GoString returns the string representation | ||
15576 | func (s PutBucketLifecycleConfigurationInput) GoString() string { | ||
15577 | return s.String() | ||
15578 | } | ||
15579 | |||
15580 | // Validate inspects the fields of the type to determine if they are valid. | ||
15581 | func (s *PutBucketLifecycleConfigurationInput) Validate() error { | ||
15582 | invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"} | ||
15583 | if s.Bucket == nil { | ||
15584 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15585 | } | ||
15586 | if s.LifecycleConfiguration != nil { | ||
15587 | if err := s.LifecycleConfiguration.Validate(); err != nil { | ||
15588 | invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams)) | ||
15589 | } | ||
15590 | } | ||
15591 | |||
15592 | if invalidParams.Len() > 0 { | ||
15593 | return invalidParams | ||
15594 | } | ||
15595 | return nil | ||
15596 | } | ||
15597 | |||
15598 | // SetBucket sets the Bucket field's value. | ||
15599 | func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput { | ||
15600 | s.Bucket = &v | ||
15601 | return s | ||
15602 | } | ||
15603 | |||
15604 | // SetLifecycleConfiguration sets the LifecycleConfiguration field's value. | ||
15605 | func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput { | ||
15606 | s.LifecycleConfiguration = v | ||
15607 | return s | ||
15608 | } | ||
15609 | |||
15610 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationOutput | ||
15611 | type PutBucketLifecycleConfigurationOutput struct { | ||
15612 | _ struct{} `type:"structure"` | ||
15613 | } | ||
15614 | |||
15615 | // String returns the string representation | ||
15616 | func (s PutBucketLifecycleConfigurationOutput) String() string { | ||
15617 | return awsutil.Prettify(s) | ||
15618 | } | ||
15619 | |||
15620 | // GoString returns the string representation | ||
15621 | func (s PutBucketLifecycleConfigurationOutput) GoString() string { | ||
15622 | return s.String() | ||
15623 | } | ||
15624 | |||
15625 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleRequest | ||
15626 | type PutBucketLifecycleInput struct { | ||
15627 | _ struct{} `type:"structure" payload:"LifecycleConfiguration"` | ||
15628 | |||
15629 | // Bucket is a required field | ||
15630 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15631 | |||
15632 | LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"` | ||
15633 | } | ||
15634 | |||
15635 | // String returns the string representation | ||
15636 | func (s PutBucketLifecycleInput) String() string { | ||
15637 | return awsutil.Prettify(s) | ||
15638 | } | ||
15639 | |||
15640 | // GoString returns the string representation | ||
15641 | func (s PutBucketLifecycleInput) GoString() string { | ||
15642 | return s.String() | ||
15643 | } | ||
15644 | |||
15645 | // Validate inspects the fields of the type to determine if they are valid. | ||
15646 | func (s *PutBucketLifecycleInput) Validate() error { | ||
15647 | invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"} | ||
15648 | if s.Bucket == nil { | ||
15649 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15650 | } | ||
15651 | if s.LifecycleConfiguration != nil { | ||
15652 | if err := s.LifecycleConfiguration.Validate(); err != nil { | ||
15653 | invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams)) | ||
15654 | } | ||
15655 | } | ||
15656 | |||
15657 | if invalidParams.Len() > 0 { | ||
15658 | return invalidParams | ||
15659 | } | ||
15660 | return nil | ||
15661 | } | ||
15662 | |||
15663 | // SetBucket sets the Bucket field's value. | ||
15664 | func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput { | ||
15665 | s.Bucket = &v | ||
15666 | return s | ||
15667 | } | ||
15668 | |||
15669 | // SetLifecycleConfiguration sets the LifecycleConfiguration field's value. | ||
15670 | func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput { | ||
15671 | s.LifecycleConfiguration = v | ||
15672 | return s | ||
15673 | } | ||
15674 | |||
15675 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleOutput | ||
15676 | type PutBucketLifecycleOutput struct { | ||
15677 | _ struct{} `type:"structure"` | ||
15678 | } | ||
15679 | |||
15680 | // String returns the string representation | ||
15681 | func (s PutBucketLifecycleOutput) String() string { | ||
15682 | return awsutil.Prettify(s) | ||
15683 | } | ||
15684 | |||
15685 | // GoString returns the string representation | ||
15686 | func (s PutBucketLifecycleOutput) GoString() string { | ||
15687 | return s.String() | ||
15688 | } | ||
15689 | |||
15690 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingRequest | ||
15691 | type PutBucketLoggingInput struct { | ||
15692 | _ struct{} `type:"structure" payload:"BucketLoggingStatus"` | ||
15693 | |||
15694 | // Bucket is a required field | ||
15695 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15696 | |||
15697 | // BucketLoggingStatus is a required field | ||
15698 | BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true"` | ||
15699 | } | ||
15700 | |||
15701 | // String returns the string representation | ||
15702 | func (s PutBucketLoggingInput) String() string { | ||
15703 | return awsutil.Prettify(s) | ||
15704 | } | ||
15705 | |||
15706 | // GoString returns the string representation | ||
15707 | func (s PutBucketLoggingInput) GoString() string { | ||
15708 | return s.String() | ||
15709 | } | ||
15710 | |||
15711 | // Validate inspects the fields of the type to determine if they are valid. | ||
15712 | func (s *PutBucketLoggingInput) Validate() error { | ||
15713 | invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"} | ||
15714 | if s.Bucket == nil { | ||
15715 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15716 | } | ||
15717 | if s.BucketLoggingStatus == nil { | ||
15718 | invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus")) | ||
15719 | } | ||
15720 | if s.BucketLoggingStatus != nil { | ||
15721 | if err := s.BucketLoggingStatus.Validate(); err != nil { | ||
15722 | invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams)) | ||
15723 | } | ||
15724 | } | ||
15725 | |||
15726 | if invalidParams.Len() > 0 { | ||
15727 | return invalidParams | ||
15728 | } | ||
15729 | return nil | ||
15730 | } | ||
15731 | |||
15732 | // SetBucket sets the Bucket field's value. | ||
15733 | func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput { | ||
15734 | s.Bucket = &v | ||
15735 | return s | ||
15736 | } | ||
15737 | |||
15738 | // SetBucketLoggingStatus sets the BucketLoggingStatus field's value. | ||
15739 | func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput { | ||
15740 | s.BucketLoggingStatus = v | ||
15741 | return s | ||
15742 | } | ||
15743 | |||
15744 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingOutput | ||
15745 | type PutBucketLoggingOutput struct { | ||
15746 | _ struct{} `type:"structure"` | ||
15747 | } | ||
15748 | |||
15749 | // String returns the string representation | ||
15750 | func (s PutBucketLoggingOutput) String() string { | ||
15751 | return awsutil.Prettify(s) | ||
15752 | } | ||
15753 | |||
15754 | // GoString returns the string representation | ||
15755 | func (s PutBucketLoggingOutput) GoString() string { | ||
15756 | return s.String() | ||
15757 | } | ||
15758 | |||
15759 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationRequest | ||
15760 | type PutBucketMetricsConfigurationInput struct { | ||
15761 | _ struct{} `type:"structure" payload:"MetricsConfiguration"` | ||
15762 | |||
15763 | // The name of the bucket for which the metrics configuration is set. | ||
15764 | // | ||
15765 | // Bucket is a required field | ||
15766 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15767 | |||
15768 | // The ID used to identify the metrics configuration. | ||
15769 | // | ||
15770 | // Id is a required field | ||
15771 | Id *string `location:"querystring" locationName:"id" type:"string" required:"true"` | ||
15772 | |||
15773 | // Specifies the metrics configuration. | ||
15774 | // | ||
15775 | // MetricsConfiguration is a required field | ||
15776 | MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true"` | ||
15777 | } | ||
15778 | |||
15779 | // String returns the string representation | ||
15780 | func (s PutBucketMetricsConfigurationInput) String() string { | ||
15781 | return awsutil.Prettify(s) | ||
15782 | } | ||
15783 | |||
15784 | // GoString returns the string representation | ||
15785 | func (s PutBucketMetricsConfigurationInput) GoString() string { | ||
15786 | return s.String() | ||
15787 | } | ||
15788 | |||
15789 | // Validate inspects the fields of the type to determine if they are valid. | ||
15790 | func (s *PutBucketMetricsConfigurationInput) Validate() error { | ||
15791 | invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"} | ||
15792 | if s.Bucket == nil { | ||
15793 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15794 | } | ||
15795 | if s.Id == nil { | ||
15796 | invalidParams.Add(request.NewErrParamRequired("Id")) | ||
15797 | } | ||
15798 | if s.MetricsConfiguration == nil { | ||
15799 | invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration")) | ||
15800 | } | ||
15801 | if s.MetricsConfiguration != nil { | ||
15802 | if err := s.MetricsConfiguration.Validate(); err != nil { | ||
15803 | invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams)) | ||
15804 | } | ||
15805 | } | ||
15806 | |||
15807 | if invalidParams.Len() > 0 { | ||
15808 | return invalidParams | ||
15809 | } | ||
15810 | return nil | ||
15811 | } | ||
15812 | |||
15813 | // SetBucket sets the Bucket field's value. | ||
15814 | func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput { | ||
15815 | s.Bucket = &v | ||
15816 | return s | ||
15817 | } | ||
15818 | |||
15819 | // SetId sets the Id field's value. | ||
15820 | func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput { | ||
15821 | s.Id = &v | ||
15822 | return s | ||
15823 | } | ||
15824 | |||
15825 | // SetMetricsConfiguration sets the MetricsConfiguration field's value. | ||
15826 | func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput { | ||
15827 | s.MetricsConfiguration = v | ||
15828 | return s | ||
15829 | } | ||
15830 | |||
15831 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationOutput | ||
15832 | type PutBucketMetricsConfigurationOutput struct { | ||
15833 | _ struct{} `type:"structure"` | ||
15834 | } | ||
15835 | |||
15836 | // String returns the string representation | ||
15837 | func (s PutBucketMetricsConfigurationOutput) String() string { | ||
15838 | return awsutil.Prettify(s) | ||
15839 | } | ||
15840 | |||
15841 | // GoString returns the string representation | ||
15842 | func (s PutBucketMetricsConfigurationOutput) GoString() string { | ||
15843 | return s.String() | ||
15844 | } | ||
15845 | |||
15846 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationRequest | ||
15847 | type PutBucketNotificationConfigurationInput struct { | ||
15848 | _ struct{} `type:"structure" payload:"NotificationConfiguration"` | ||
15849 | |||
15850 | // Bucket is a required field | ||
15851 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15852 | |||
15853 | // Container for specifying the notification configuration of the bucket. If | ||
15854 | // this element is empty, notifications are turned off on the bucket. | ||
15855 | // | ||
15856 | // NotificationConfiguration is a required field | ||
15857 | NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true"` | ||
15858 | } | ||
15859 | |||
15860 | // String returns the string representation | ||
15861 | func (s PutBucketNotificationConfigurationInput) String() string { | ||
15862 | return awsutil.Prettify(s) | ||
15863 | } | ||
15864 | |||
15865 | // GoString returns the string representation | ||
15866 | func (s PutBucketNotificationConfigurationInput) GoString() string { | ||
15867 | return s.String() | ||
15868 | } | ||
15869 | |||
15870 | // Validate inspects the fields of the type to determine if they are valid. | ||
15871 | func (s *PutBucketNotificationConfigurationInput) Validate() error { | ||
15872 | invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"} | ||
15873 | if s.Bucket == nil { | ||
15874 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15875 | } | ||
15876 | if s.NotificationConfiguration == nil { | ||
15877 | invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration")) | ||
15878 | } | ||
15879 | if s.NotificationConfiguration != nil { | ||
15880 | if err := s.NotificationConfiguration.Validate(); err != nil { | ||
15881 | invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams)) | ||
15882 | } | ||
15883 | } | ||
15884 | |||
15885 | if invalidParams.Len() > 0 { | ||
15886 | return invalidParams | ||
15887 | } | ||
15888 | return nil | ||
15889 | } | ||
15890 | |||
15891 | // SetBucket sets the Bucket field's value. | ||
15892 | func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput { | ||
15893 | s.Bucket = &v | ||
15894 | return s | ||
15895 | } | ||
15896 | |||
15897 | // SetNotificationConfiguration sets the NotificationConfiguration field's value. | ||
15898 | func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput { | ||
15899 | s.NotificationConfiguration = v | ||
15900 | return s | ||
15901 | } | ||
15902 | |||
15903 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationOutput | ||
15904 | type PutBucketNotificationConfigurationOutput struct { | ||
15905 | _ struct{} `type:"structure"` | ||
15906 | } | ||
15907 | |||
15908 | // String returns the string representation | ||
15909 | func (s PutBucketNotificationConfigurationOutput) String() string { | ||
15910 | return awsutil.Prettify(s) | ||
15911 | } | ||
15912 | |||
15913 | // GoString returns the string representation | ||
15914 | func (s PutBucketNotificationConfigurationOutput) GoString() string { | ||
15915 | return s.String() | ||
15916 | } | ||
15917 | |||
15918 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationRequest | ||
15919 | type PutBucketNotificationInput struct { | ||
15920 | _ struct{} `type:"structure" payload:"NotificationConfiguration"` | ||
15921 | |||
15922 | // Bucket is a required field | ||
15923 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15924 | |||
15925 | // NotificationConfiguration is a required field | ||
15926 | NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true"` | ||
15927 | } | ||
15928 | |||
15929 | // String returns the string representation | ||
15930 | func (s PutBucketNotificationInput) String() string { | ||
15931 | return awsutil.Prettify(s) | ||
15932 | } | ||
15933 | |||
15934 | // GoString returns the string representation | ||
15935 | func (s PutBucketNotificationInput) GoString() string { | ||
15936 | return s.String() | ||
15937 | } | ||
15938 | |||
15939 | // Validate inspects the fields of the type to determine if they are valid. | ||
15940 | func (s *PutBucketNotificationInput) Validate() error { | ||
15941 | invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"} | ||
15942 | if s.Bucket == nil { | ||
15943 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
15944 | } | ||
15945 | if s.NotificationConfiguration == nil { | ||
15946 | invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration")) | ||
15947 | } | ||
15948 | |||
15949 | if invalidParams.Len() > 0 { | ||
15950 | return invalidParams | ||
15951 | } | ||
15952 | return nil | ||
15953 | } | ||
15954 | |||
15955 | // SetBucket sets the Bucket field's value. | ||
15956 | func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput { | ||
15957 | s.Bucket = &v | ||
15958 | return s | ||
15959 | } | ||
15960 | |||
15961 | // SetNotificationConfiguration sets the NotificationConfiguration field's value. | ||
15962 | func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput { | ||
15963 | s.NotificationConfiguration = v | ||
15964 | return s | ||
15965 | } | ||
15966 | |||
15967 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationOutput | ||
15968 | type PutBucketNotificationOutput struct { | ||
15969 | _ struct{} `type:"structure"` | ||
15970 | } | ||
15971 | |||
15972 | // String returns the string representation | ||
15973 | func (s PutBucketNotificationOutput) String() string { | ||
15974 | return awsutil.Prettify(s) | ||
15975 | } | ||
15976 | |||
15977 | // GoString returns the string representation | ||
15978 | func (s PutBucketNotificationOutput) GoString() string { | ||
15979 | return s.String() | ||
15980 | } | ||
15981 | |||
15982 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyRequest | ||
15983 | type PutBucketPolicyInput struct { | ||
15984 | _ struct{} `type:"structure" payload:"Policy"` | ||
15985 | |||
15986 | // Bucket is a required field | ||
15987 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
15988 | |||
15989 | // The bucket policy as a JSON document. | ||
15990 | // | ||
15991 | // Policy is a required field | ||
15992 | Policy *string `type:"string" required:"true"` | ||
15993 | } | ||
15994 | |||
15995 | // String returns the string representation | ||
15996 | func (s PutBucketPolicyInput) String() string { | ||
15997 | return awsutil.Prettify(s) | ||
15998 | } | ||
15999 | |||
16000 | // GoString returns the string representation | ||
16001 | func (s PutBucketPolicyInput) GoString() string { | ||
16002 | return s.String() | ||
16003 | } | ||
16004 | |||
16005 | // Validate inspects the fields of the type to determine if they are valid. | ||
16006 | func (s *PutBucketPolicyInput) Validate() error { | ||
16007 | invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"} | ||
16008 | if s.Bucket == nil { | ||
16009 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
16010 | } | ||
16011 | if s.Policy == nil { | ||
16012 | invalidParams.Add(request.NewErrParamRequired("Policy")) | ||
16013 | } | ||
16014 | |||
16015 | if invalidParams.Len() > 0 { | ||
16016 | return invalidParams | ||
16017 | } | ||
16018 | return nil | ||
16019 | } | ||
16020 | |||
16021 | // SetBucket sets the Bucket field's value. | ||
16022 | func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput { | ||
16023 | s.Bucket = &v | ||
16024 | return s | ||
16025 | } | ||
16026 | |||
16027 | // SetPolicy sets the Policy field's value. | ||
16028 | func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput { | ||
16029 | s.Policy = &v | ||
16030 | return s | ||
16031 | } | ||
16032 | |||
16033 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyOutput | ||
16034 | type PutBucketPolicyOutput struct { | ||
16035 | _ struct{} `type:"structure"` | ||
16036 | } | ||
16037 | |||
16038 | // String returns the string representation | ||
16039 | func (s PutBucketPolicyOutput) String() string { | ||
16040 | return awsutil.Prettify(s) | ||
16041 | } | ||
16042 | |||
16043 | // GoString returns the string representation | ||
16044 | func (s PutBucketPolicyOutput) GoString() string { | ||
16045 | return s.String() | ||
16046 | } | ||
16047 | |||
16048 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationRequest | ||
16049 | type PutBucketReplicationInput struct { | ||
16050 | _ struct{} `type:"structure" payload:"ReplicationConfiguration"` | ||
16051 | |||
16052 | // Bucket is a required field | ||
16053 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
16054 | |||
16055 | // Container for replication rules. You can add as many as 1,000 rules. Total | ||
16056 | // replication configuration size can be up to 2 MB. | ||
16057 | // | ||
16058 | // ReplicationConfiguration is a required field | ||
16059 | ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true"` | ||
16060 | } | ||
16061 | |||
16062 | // String returns the string representation | ||
16063 | func (s PutBucketReplicationInput) String() string { | ||
16064 | return awsutil.Prettify(s) | ||
16065 | } | ||
16066 | |||
16067 | // GoString returns the string representation | ||
16068 | func (s PutBucketReplicationInput) GoString() string { | ||
16069 | return s.String() | ||
16070 | } | ||
16071 | |||
16072 | // Validate inspects the fields of the type to determine if they are valid. | ||
16073 | func (s *PutBucketReplicationInput) Validate() error { | ||
16074 | invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"} | ||
16075 | if s.Bucket == nil { | ||
16076 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
16077 | } | ||
16078 | if s.ReplicationConfiguration == nil { | ||
16079 | invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration")) | ||
16080 | } | ||
16081 | if s.ReplicationConfiguration != nil { | ||
16082 | if err := s.ReplicationConfiguration.Validate(); err != nil { | ||
16083 | invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams)) | ||
16084 | } | ||
16085 | } | ||
16086 | |||
16087 | if invalidParams.Len() > 0 { | ||
16088 | return invalidParams | ||
16089 | } | ||
16090 | return nil | ||
16091 | } | ||
16092 | |||
16093 | // SetBucket sets the Bucket field's value. | ||
16094 | func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput { | ||
16095 | s.Bucket = &v | ||
16096 | return s | ||
16097 | } | ||
16098 | |||
16099 | // SetReplicationConfiguration sets the ReplicationConfiguration field's value. | ||
16100 | func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput { | ||
16101 | s.ReplicationConfiguration = v | ||
16102 | return s | ||
16103 | } | ||
16104 | |||
16105 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationOutput | ||
16106 | type PutBucketReplicationOutput struct { | ||
16107 | _ struct{} `type:"structure"` | ||
16108 | } | ||
16109 | |||
16110 | // String returns the string representation | ||
16111 | func (s PutBucketReplicationOutput) String() string { | ||
16112 | return awsutil.Prettify(s) | ||
16113 | } | ||
16114 | |||
16115 | // GoString returns the string representation | ||
16116 | func (s PutBucketReplicationOutput) GoString() string { | ||
16117 | return s.String() | ||
16118 | } | ||
16119 | |||
16120 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentRequest | ||
16121 | type PutBucketRequestPaymentInput struct { | ||
16122 | _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"` | ||
16123 | |||
16124 | // Bucket is a required field | ||
16125 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
16126 | |||
16127 | // RequestPaymentConfiguration is a required field | ||
16128 | RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true"` | ||
16129 | } | ||
16130 | |||
16131 | // String returns the string representation | ||
16132 | func (s PutBucketRequestPaymentInput) String() string { | ||
16133 | return awsutil.Prettify(s) | ||
16134 | } | ||
16135 | |||
16136 | // GoString returns the string representation | ||
16137 | func (s PutBucketRequestPaymentInput) GoString() string { | ||
16138 | return s.String() | ||
16139 | } | ||
16140 | |||
16141 | // Validate inspects the fields of the type to determine if they are valid. | ||
16142 | func (s *PutBucketRequestPaymentInput) Validate() error { | ||
16143 | invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"} | ||
16144 | if s.Bucket == nil { | ||
16145 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
16146 | } | ||
16147 | if s.RequestPaymentConfiguration == nil { | ||
16148 | invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration")) | ||
16149 | } | ||
16150 | if s.RequestPaymentConfiguration != nil { | ||
16151 | if err := s.RequestPaymentConfiguration.Validate(); err != nil { | ||
16152 | invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams)) | ||
16153 | } | ||
16154 | } | ||
16155 | |||
16156 | if invalidParams.Len() > 0 { | ||
16157 | return invalidParams | ||
16158 | } | ||
16159 | return nil | ||
16160 | } | ||
16161 | |||
16162 | // SetBucket sets the Bucket field's value. | ||
16163 | func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput { | ||
16164 | s.Bucket = &v | ||
16165 | return s | ||
16166 | } | ||
16167 | |||
16168 | // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value. | ||
16169 | func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput { | ||
16170 | s.RequestPaymentConfiguration = v | ||
16171 | return s | ||
16172 | } | ||
16173 | |||
16174 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentOutput | ||
16175 | type PutBucketRequestPaymentOutput struct { | ||
16176 | _ struct{} `type:"structure"` | ||
16177 | } | ||
16178 | |||
16179 | // String returns the string representation | ||
16180 | func (s PutBucketRequestPaymentOutput) String() string { | ||
16181 | return awsutil.Prettify(s) | ||
16182 | } | ||
16183 | |||
16184 | // GoString returns the string representation | ||
16185 | func (s PutBucketRequestPaymentOutput) GoString() string { | ||
16186 | return s.String() | ||
16187 | } | ||
16188 | |||
16189 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingRequest | ||
16190 | type PutBucketTaggingInput struct { | ||
16191 | _ struct{} `type:"structure" payload:"Tagging"` | ||
16192 | |||
16193 | // Bucket is a required field | ||
16194 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
16195 | |||
16196 | // Tagging is a required field | ||
16197 | Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"` | ||
16198 | } | ||
16199 | |||
16200 | // String returns the string representation | ||
16201 | func (s PutBucketTaggingInput) String() string { | ||
16202 | return awsutil.Prettify(s) | ||
16203 | } | ||
16204 | |||
16205 | // GoString returns the string representation | ||
16206 | func (s PutBucketTaggingInput) GoString() string { | ||
16207 | return s.String() | ||
16208 | } | ||
16209 | |||
16210 | // Validate inspects the fields of the type to determine if they are valid. | ||
16211 | func (s *PutBucketTaggingInput) Validate() error { | ||
16212 | invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"} | ||
16213 | if s.Bucket == nil { | ||
16214 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
16215 | } | ||
16216 | if s.Tagging == nil { | ||
16217 | invalidParams.Add(request.NewErrParamRequired("Tagging")) | ||
16218 | } | ||
16219 | if s.Tagging != nil { | ||
16220 | if err := s.Tagging.Validate(); err != nil { | ||
16221 | invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams)) | ||
16222 | } | ||
16223 | } | ||
16224 | |||
16225 | if invalidParams.Len() > 0 { | ||
16226 | return invalidParams | ||
16227 | } | ||
16228 | return nil | ||
16229 | } | ||
16230 | |||
16231 | // SetBucket sets the Bucket field's value. | ||
16232 | func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput { | ||
16233 | s.Bucket = &v | ||
16234 | return s | ||
16235 | } | ||
16236 | |||
16237 | // SetTagging sets the Tagging field's value. | ||
16238 | func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput { | ||
16239 | s.Tagging = v | ||
16240 | return s | ||
16241 | } | ||
16242 | |||
16243 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingOutput | ||
16244 | type PutBucketTaggingOutput struct { | ||
16245 | _ struct{} `type:"structure"` | ||
16246 | } | ||
16247 | |||
16248 | // String returns the string representation | ||
16249 | func (s PutBucketTaggingOutput) String() string { | ||
16250 | return awsutil.Prettify(s) | ||
16251 | } | ||
16252 | |||
16253 | // GoString returns the string representation | ||
16254 | func (s PutBucketTaggingOutput) GoString() string { | ||
16255 | return s.String() | ||
16256 | } | ||
16257 | |||
16258 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningRequest | ||
16259 | type PutBucketVersioningInput struct { | ||
16260 | _ struct{} `type:"structure" payload:"VersioningConfiguration"` | ||
16261 | |||
16262 | // Bucket is a required field | ||
16263 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
16264 | |||
16265 | // The concatenation of the authentication device's serial number, a space, | ||
16266 | // and the value that is displayed on your authentication device. | ||
16267 | MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"` | ||
16268 | |||
16269 | // VersioningConfiguration is a required field | ||
16270 | VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true"` | ||
16271 | } | ||
16272 | |||
16273 | // String returns the string representation | ||
16274 | func (s PutBucketVersioningInput) String() string { | ||
16275 | return awsutil.Prettify(s) | ||
16276 | } | ||
16277 | |||
16278 | // GoString returns the string representation | ||
16279 | func (s PutBucketVersioningInput) GoString() string { | ||
16280 | return s.String() | ||
16281 | } | ||
16282 | |||
16283 | // Validate inspects the fields of the type to determine if they are valid. | ||
16284 | func (s *PutBucketVersioningInput) Validate() error { | ||
16285 | invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"} | ||
16286 | if s.Bucket == nil { | ||
16287 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
16288 | } | ||
16289 | if s.VersioningConfiguration == nil { | ||
16290 | invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration")) | ||
16291 | } | ||
16292 | |||
16293 | if invalidParams.Len() > 0 { | ||
16294 | return invalidParams | ||
16295 | } | ||
16296 | return nil | ||
16297 | } | ||
16298 | |||
16299 | // SetBucket sets the Bucket field's value. | ||
16300 | func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput { | ||
16301 | s.Bucket = &v | ||
16302 | return s | ||
16303 | } | ||
16304 | |||
16305 | // SetMFA sets the MFA field's value. | ||
16306 | func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput { | ||
16307 | s.MFA = &v | ||
16308 | return s | ||
16309 | } | ||
16310 | |||
16311 | // SetVersioningConfiguration sets the VersioningConfiguration field's value. | ||
16312 | func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput { | ||
16313 | s.VersioningConfiguration = v | ||
16314 | return s | ||
16315 | } | ||
16316 | |||
16317 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningOutput | ||
16318 | type PutBucketVersioningOutput struct { | ||
16319 | _ struct{} `type:"structure"` | ||
16320 | } | ||
16321 | |||
16322 | // String returns the string representation | ||
16323 | func (s PutBucketVersioningOutput) String() string { | ||
16324 | return awsutil.Prettify(s) | ||
16325 | } | ||
16326 | |||
16327 | // GoString returns the string representation | ||
16328 | func (s PutBucketVersioningOutput) GoString() string { | ||
16329 | return s.String() | ||
16330 | } | ||
16331 | |||
16332 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteRequest | ||
16333 | type PutBucketWebsiteInput struct { | ||
16334 | _ struct{} `type:"structure" payload:"WebsiteConfiguration"` | ||
16335 | |||
16336 | // Bucket is a required field | ||
16337 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
16338 | |||
16339 | // WebsiteConfiguration is a required field | ||
16340 | WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true"` | ||
16341 | } | ||
16342 | |||
16343 | // String returns the string representation | ||
16344 | func (s PutBucketWebsiteInput) String() string { | ||
16345 | return awsutil.Prettify(s) | ||
16346 | } | ||
16347 | |||
16348 | // GoString returns the string representation | ||
16349 | func (s PutBucketWebsiteInput) GoString() string { | ||
16350 | return s.String() | ||
16351 | } | ||
16352 | |||
16353 | // Validate inspects the fields of the type to determine if they are valid. | ||
16354 | func (s *PutBucketWebsiteInput) Validate() error { | ||
16355 | invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"} | ||
16356 | if s.Bucket == nil { | ||
16357 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
16358 | } | ||
16359 | if s.WebsiteConfiguration == nil { | ||
16360 | invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration")) | ||
16361 | } | ||
16362 | if s.WebsiteConfiguration != nil { | ||
16363 | if err := s.WebsiteConfiguration.Validate(); err != nil { | ||
16364 | invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams)) | ||
16365 | } | ||
16366 | } | ||
16367 | |||
16368 | if invalidParams.Len() > 0 { | ||
16369 | return invalidParams | ||
16370 | } | ||
16371 | return nil | ||
16372 | } | ||
16373 | |||
16374 | // SetBucket sets the Bucket field's value. | ||
16375 | func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput { | ||
16376 | s.Bucket = &v | ||
16377 | return s | ||
16378 | } | ||
16379 | |||
16380 | // SetWebsiteConfiguration sets the WebsiteConfiguration field's value. | ||
16381 | func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput { | ||
16382 | s.WebsiteConfiguration = v | ||
16383 | return s | ||
16384 | } | ||
16385 | |||
16386 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteOutput | ||
16387 | type PutBucketWebsiteOutput struct { | ||
16388 | _ struct{} `type:"structure"` | ||
16389 | } | ||
16390 | |||
16391 | // String returns the string representation | ||
16392 | func (s PutBucketWebsiteOutput) String() string { | ||
16393 | return awsutil.Prettify(s) | ||
16394 | } | ||
16395 | |||
16396 | // GoString returns the string representation | ||
16397 | func (s PutBucketWebsiteOutput) GoString() string { | ||
16398 | return s.String() | ||
16399 | } | ||
16400 | |||
16401 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclRequest | ||
16402 | type PutObjectAclInput struct { | ||
16403 | _ struct{} `type:"structure" payload:"AccessControlPolicy"` | ||
16404 | |||
16405 | // The canned ACL to apply to the object. | ||
16406 | ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"` | ||
16407 | |||
16408 | AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"` | ||
16409 | |||
16410 | // Bucket is a required field | ||
16411 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
16412 | |||
16413 | // Allows grantee the read, write, read ACP, and write ACP permissions on the | ||
16414 | // bucket. | ||
16415 | GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` | ||
16416 | |||
16417 | // Allows grantee to list the objects in the bucket. | ||
16418 | GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` | ||
16419 | |||
16420 | // Allows grantee to read the bucket ACL. | ||
16421 | GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` | ||
16422 | |||
16423 | // Allows grantee to create, overwrite, and delete any object in the bucket. | ||
16424 | GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"` | ||
16425 | |||
16426 | // Allows grantee to write the ACL for the applicable bucket. | ||
16427 | GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` | ||
16428 | |||
16429 | // Key is a required field | ||
16430 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
16431 | |||
16432 | // Confirms that the requester knows that she or he will be charged for the | ||
16433 | // request. Bucket owners need not specify this parameter in their requests. | ||
16434 | // Documentation on downloading objects from requester pays buckets can be found | ||
16435 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
16436 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
16437 | |||
16438 | // VersionId used to reference a specific version of the object. | ||
16439 | VersionId *string `location:"querystring" locationName:"versionId" type:"string"` | ||
16440 | } | ||
16441 | |||
16442 | // String returns the string representation | ||
16443 | func (s PutObjectAclInput) String() string { | ||
16444 | return awsutil.Prettify(s) | ||
16445 | } | ||
16446 | |||
16447 | // GoString returns the string representation | ||
16448 | func (s PutObjectAclInput) GoString() string { | ||
16449 | return s.String() | ||
16450 | } | ||
16451 | |||
16452 | // Validate inspects the fields of the type to determine if they are valid. | ||
16453 | func (s *PutObjectAclInput) Validate() error { | ||
16454 | invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"} | ||
16455 | if s.Bucket == nil { | ||
16456 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
16457 | } | ||
16458 | if s.Key == nil { | ||
16459 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
16460 | } | ||
16461 | if s.Key != nil && len(*s.Key) < 1 { | ||
16462 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
16463 | } | ||
16464 | if s.AccessControlPolicy != nil { | ||
16465 | if err := s.AccessControlPolicy.Validate(); err != nil { | ||
16466 | invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams)) | ||
16467 | } | ||
16468 | } | ||
16469 | |||
16470 | if invalidParams.Len() > 0 { | ||
16471 | return invalidParams | ||
16472 | } | ||
16473 | return nil | ||
16474 | } | ||
16475 | |||
16476 | // SetACL sets the ACL field's value. | ||
16477 | func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput { | ||
16478 | s.ACL = &v | ||
16479 | return s | ||
16480 | } | ||
16481 | |||
16482 | // SetAccessControlPolicy sets the AccessControlPolicy field's value. | ||
16483 | func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput { | ||
16484 | s.AccessControlPolicy = v | ||
16485 | return s | ||
16486 | } | ||
16487 | |||
16488 | // SetBucket sets the Bucket field's value. | ||
16489 | func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput { | ||
16490 | s.Bucket = &v | ||
16491 | return s | ||
16492 | } | ||
16493 | |||
16494 | // SetGrantFullControl sets the GrantFullControl field's value. | ||
16495 | func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput { | ||
16496 | s.GrantFullControl = &v | ||
16497 | return s | ||
16498 | } | ||
16499 | |||
16500 | // SetGrantRead sets the GrantRead field's value. | ||
16501 | func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput { | ||
16502 | s.GrantRead = &v | ||
16503 | return s | ||
16504 | } | ||
16505 | |||
16506 | // SetGrantReadACP sets the GrantReadACP field's value. | ||
16507 | func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput { | ||
16508 | s.GrantReadACP = &v | ||
16509 | return s | ||
16510 | } | ||
16511 | |||
16512 | // SetGrantWrite sets the GrantWrite field's value. | ||
16513 | func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput { | ||
16514 | s.GrantWrite = &v | ||
16515 | return s | ||
16516 | } | ||
16517 | |||
16518 | // SetGrantWriteACP sets the GrantWriteACP field's value. | ||
16519 | func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput { | ||
16520 | s.GrantWriteACP = &v | ||
16521 | return s | ||
16522 | } | ||
16523 | |||
16524 | // SetKey sets the Key field's value. | ||
16525 | func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput { | ||
16526 | s.Key = &v | ||
16527 | return s | ||
16528 | } | ||
16529 | |||
16530 | // SetRequestPayer sets the RequestPayer field's value. | ||
16531 | func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput { | ||
16532 | s.RequestPayer = &v | ||
16533 | return s | ||
16534 | } | ||
16535 | |||
16536 | // SetVersionId sets the VersionId field's value. | ||
16537 | func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput { | ||
16538 | s.VersionId = &v | ||
16539 | return s | ||
16540 | } | ||
16541 | |||
16542 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclOutput | ||
16543 | type PutObjectAclOutput struct { | ||
16544 | _ struct{} `type:"structure"` | ||
16545 | |||
16546 | // If present, indicates that the requester was successfully charged for the | ||
16547 | // request. | ||
16548 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
16549 | } | ||
16550 | |||
16551 | // String returns the string representation | ||
16552 | func (s PutObjectAclOutput) String() string { | ||
16553 | return awsutil.Prettify(s) | ||
16554 | } | ||
16555 | |||
16556 | // GoString returns the string representation | ||
16557 | func (s PutObjectAclOutput) GoString() string { | ||
16558 | return s.String() | ||
16559 | } | ||
16560 | |||
16561 | // SetRequestCharged sets the RequestCharged field's value. | ||
16562 | func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput { | ||
16563 | s.RequestCharged = &v | ||
16564 | return s | ||
16565 | } | ||
16566 | |||
16567 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRequest | ||
16568 | type PutObjectInput struct { | ||
16569 | _ struct{} `type:"structure" payload:"Body"` | ||
16570 | |||
16571 | // The canned ACL to apply to the object. | ||
16572 | ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"` | ||
16573 | |||
16574 | // Object data. | ||
16575 | Body io.ReadSeeker `type:"blob"` | ||
16576 | |||
16577 | // Name of the bucket to which the PUT operation was initiated. | ||
16578 | // | ||
16579 | // Bucket is a required field | ||
16580 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
16581 | |||
16582 | // Specifies caching behavior along the request/reply chain. | ||
16583 | CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` | ||
16584 | |||
16585 | // Specifies presentational information for the object. | ||
16586 | ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"` | ||
16587 | |||
16588 | // Specifies what content encodings have been applied to the object and thus | ||
16589 | // what decoding mechanisms must be applied to obtain the media-type referenced | ||
16590 | // by the Content-Type header field. | ||
16591 | ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"` | ||
16592 | |||
16593 | // The language the content is in. | ||
16594 | ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"` | ||
16595 | |||
16596 | // Size of the body in bytes. This parameter is useful when the size of the | ||
16597 | // body cannot be determined automatically. | ||
16598 | ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` | ||
16599 | |||
16600 | // A standard MIME type describing the format of the object data. | ||
16601 | ContentType *string `location:"header" locationName:"Content-Type" type:"string"` | ||
16602 | |||
16603 | // The date and time at which the object is no longer cacheable. | ||
16604 | Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"` | ||
16605 | |||
16606 | // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. | ||
16607 | GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"` | ||
16608 | |||
16609 | // Allows grantee to read the object data and its metadata. | ||
16610 | GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"` | ||
16611 | |||
16612 | // Allows grantee to read the object ACL. | ||
16613 | GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"` | ||
16614 | |||
16615 | // Allows grantee to write the ACL for the applicable object. | ||
16616 | GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` | ||
16617 | |||
16618 | // Object key for which the PUT operation was initiated. | ||
16619 | // | ||
16620 | // Key is a required field | ||
16621 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
16622 | |||
16623 | // A map of metadata to store with the object in S3. | ||
16624 | Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` | ||
16625 | |||
16626 | // Confirms that the requester knows that she or he will be charged for the | ||
16627 | // request. Bucket owners need not specify this parameter in their requests. | ||
16628 | // Documentation on downloading objects from requester pays buckets can be found | ||
16629 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
16630 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
16631 | |||
16632 | // Specifies the algorithm to use to when encrypting the object (e.g., AES256). | ||
16633 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
16634 | |||
16635 | // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting | ||
16636 | // data. This value is used to store the object and then it is discarded; Amazon | ||
16637 | // does not store the encryption key. The key must be appropriate for use with | ||
16638 | // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm | ||
16639 | // header. | ||
16640 | SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` | ||
16641 | |||
16642 | // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | ||
16643 | // Amazon S3 uses this header for a message integrity check to ensure the encryption | ||
16644 | // key was transmitted without error. | ||
16645 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
16646 | |||
16647 | // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT | ||
16648 | // requests for an object protected by AWS KMS will fail if not made via SSL | ||
16649 | // or using SigV4. Documentation on configuring any of the officially supported | ||
16650 | // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version | ||
16651 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
16652 | |||
16653 | // The Server-side encryption algorithm used when storing this object in S3 | ||
16654 | // (e.g., AES256, aws:kms). | ||
16655 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
16656 | |||
16657 | // The type of storage to use for the object. Defaults to 'STANDARD'. | ||
16658 | StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` | ||
16659 | |||
16660 | // The tag-set for the object. The tag-set must be encoded as URL Query parameters | ||
16661 | Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"` | ||
16662 | |||
16663 | // If the bucket is configured as a website, redirects requests for this object | ||
16664 | // to another object in the same bucket or to an external URL. Amazon S3 stores | ||
16665 | // the value of this header in the object metadata. | ||
16666 | WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"` | ||
16667 | } | ||
16668 | |||
16669 | // String returns the string representation | ||
16670 | func (s PutObjectInput) String() string { | ||
16671 | return awsutil.Prettify(s) | ||
16672 | } | ||
16673 | |||
16674 | // GoString returns the string representation | ||
16675 | func (s PutObjectInput) GoString() string { | ||
16676 | return s.String() | ||
16677 | } | ||
16678 | |||
16679 | // Validate inspects the fields of the type to determine if they are valid. | ||
16680 | func (s *PutObjectInput) Validate() error { | ||
16681 | invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"} | ||
16682 | if s.Bucket == nil { | ||
16683 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
16684 | } | ||
16685 | if s.Key == nil { | ||
16686 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
16687 | } | ||
16688 | if s.Key != nil && len(*s.Key) < 1 { | ||
16689 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
16690 | } | ||
16691 | |||
16692 | if invalidParams.Len() > 0 { | ||
16693 | return invalidParams | ||
16694 | } | ||
16695 | return nil | ||
16696 | } | ||
16697 | |||
16698 | // SetACL sets the ACL field's value. | ||
16699 | func (s *PutObjectInput) SetACL(v string) *PutObjectInput { | ||
16700 | s.ACL = &v | ||
16701 | return s | ||
16702 | } | ||
16703 | |||
16704 | // SetBody sets the Body field's value. | ||
16705 | func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput { | ||
16706 | s.Body = v | ||
16707 | return s | ||
16708 | } | ||
16709 | |||
16710 | // SetBucket sets the Bucket field's value. | ||
16711 | func (s *PutObjectInput) SetBucket(v string) *PutObjectInput { | ||
16712 | s.Bucket = &v | ||
16713 | return s | ||
16714 | } | ||
16715 | |||
16716 | // SetCacheControl sets the CacheControl field's value. | ||
16717 | func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput { | ||
16718 | s.CacheControl = &v | ||
16719 | return s | ||
16720 | } | ||
16721 | |||
16722 | // SetContentDisposition sets the ContentDisposition field's value. | ||
16723 | func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput { | ||
16724 | s.ContentDisposition = &v | ||
16725 | return s | ||
16726 | } | ||
16727 | |||
16728 | // SetContentEncoding sets the ContentEncoding field's value. | ||
16729 | func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput { | ||
16730 | s.ContentEncoding = &v | ||
16731 | return s | ||
16732 | } | ||
16733 | |||
16734 | // SetContentLanguage sets the ContentLanguage field's value. | ||
16735 | func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput { | ||
16736 | s.ContentLanguage = &v | ||
16737 | return s | ||
16738 | } | ||
16739 | |||
16740 | // SetContentLength sets the ContentLength field's value. | ||
16741 | func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput { | ||
16742 | s.ContentLength = &v | ||
16743 | return s | ||
16744 | } | ||
16745 | |||
16746 | // SetContentType sets the ContentType field's value. | ||
16747 | func (s *PutObjectInput) SetContentType(v string) *PutObjectInput { | ||
16748 | s.ContentType = &v | ||
16749 | return s | ||
16750 | } | ||
16751 | |||
16752 | // SetExpires sets the Expires field's value. | ||
16753 | func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput { | ||
16754 | s.Expires = &v | ||
16755 | return s | ||
16756 | } | ||
16757 | |||
16758 | // SetGrantFullControl sets the GrantFullControl field's value. | ||
16759 | func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput { | ||
16760 | s.GrantFullControl = &v | ||
16761 | return s | ||
16762 | } | ||
16763 | |||
16764 | // SetGrantRead sets the GrantRead field's value. | ||
16765 | func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput { | ||
16766 | s.GrantRead = &v | ||
16767 | return s | ||
16768 | } | ||
16769 | |||
16770 | // SetGrantReadACP sets the GrantReadACP field's value. | ||
16771 | func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput { | ||
16772 | s.GrantReadACP = &v | ||
16773 | return s | ||
16774 | } | ||
16775 | |||
16776 | // SetGrantWriteACP sets the GrantWriteACP field's value. | ||
16777 | func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput { | ||
16778 | s.GrantWriteACP = &v | ||
16779 | return s | ||
16780 | } | ||
16781 | |||
16782 | // SetKey sets the Key field's value. | ||
16783 | func (s *PutObjectInput) SetKey(v string) *PutObjectInput { | ||
16784 | s.Key = &v | ||
16785 | return s | ||
16786 | } | ||
16787 | |||
16788 | // SetMetadata sets the Metadata field's value. | ||
16789 | func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput { | ||
16790 | s.Metadata = v | ||
16791 | return s | ||
16792 | } | ||
16793 | |||
16794 | // SetRequestPayer sets the RequestPayer field's value. | ||
16795 | func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput { | ||
16796 | s.RequestPayer = &v | ||
16797 | return s | ||
16798 | } | ||
16799 | |||
16800 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
16801 | func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput { | ||
16802 | s.SSECustomerAlgorithm = &v | ||
16803 | return s | ||
16804 | } | ||
16805 | |||
16806 | // SetSSECustomerKey sets the SSECustomerKey field's value. | ||
16807 | func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput { | ||
16808 | s.SSECustomerKey = &v | ||
16809 | return s | ||
16810 | } | ||
16811 | |||
16812 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
16813 | func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput { | ||
16814 | s.SSECustomerKeyMD5 = &v | ||
16815 | return s | ||
16816 | } | ||
16817 | |||
16818 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
16819 | func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput { | ||
16820 | s.SSEKMSKeyId = &v | ||
16821 | return s | ||
16822 | } | ||
16823 | |||
16824 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
16825 | func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput { | ||
16826 | s.ServerSideEncryption = &v | ||
16827 | return s | ||
16828 | } | ||
16829 | |||
16830 | // SetStorageClass sets the StorageClass field's value. | ||
16831 | func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput { | ||
16832 | s.StorageClass = &v | ||
16833 | return s | ||
16834 | } | ||
16835 | |||
16836 | // SetTagging sets the Tagging field's value. | ||
16837 | func (s *PutObjectInput) SetTagging(v string) *PutObjectInput { | ||
16838 | s.Tagging = &v | ||
16839 | return s | ||
16840 | } | ||
16841 | |||
16842 | // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. | ||
16843 | func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput { | ||
16844 | s.WebsiteRedirectLocation = &v | ||
16845 | return s | ||
16846 | } | ||
16847 | |||
16848 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectOutput | ||
16849 | type PutObjectOutput struct { | ||
16850 | _ struct{} `type:"structure"` | ||
16851 | |||
16852 | // Entity tag for the uploaded object. | ||
16853 | ETag *string `location:"header" locationName:"ETag" type:"string"` | ||
16854 | |||
16855 | // If the object expiration is configured, this will contain the expiration | ||
16856 | // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded. | ||
16857 | Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` | ||
16858 | |||
16859 | // If present, indicates that the requester was successfully charged for the | ||
16860 | // request. | ||
16861 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
16862 | |||
16863 | // If server-side encryption with a customer-provided encryption key was requested, | ||
16864 | // the response will include this header confirming the encryption algorithm | ||
16865 | // used. | ||
16866 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
16867 | |||
16868 | // If server-side encryption with a customer-provided encryption key was requested, | ||
16869 | // the response will include this header to provide round trip message integrity | ||
16870 | // verification of the customer-provided encryption key. | ||
16871 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
16872 | |||
16873 | // If present, specifies the ID of the AWS Key Management Service (KMS) master | ||
16874 | // encryption key that was used for the object. | ||
16875 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
16876 | |||
16877 | // The Server-side encryption algorithm used when storing this object in S3 | ||
16878 | // (e.g., AES256, aws:kms). | ||
16879 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
16880 | |||
16881 | // Version of the object. | ||
16882 | VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` | ||
16883 | } | ||
16884 | |||
16885 | // String returns the string representation | ||
16886 | func (s PutObjectOutput) String() string { | ||
16887 | return awsutil.Prettify(s) | ||
16888 | } | ||
16889 | |||
16890 | // GoString returns the string representation | ||
16891 | func (s PutObjectOutput) GoString() string { | ||
16892 | return s.String() | ||
16893 | } | ||
16894 | |||
16895 | // SetETag sets the ETag field's value. | ||
16896 | func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput { | ||
16897 | s.ETag = &v | ||
16898 | return s | ||
16899 | } | ||
16900 | |||
16901 | // SetExpiration sets the Expiration field's value. | ||
16902 | func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput { | ||
16903 | s.Expiration = &v | ||
16904 | return s | ||
16905 | } | ||
16906 | |||
16907 | // SetRequestCharged sets the RequestCharged field's value. | ||
16908 | func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput { | ||
16909 | s.RequestCharged = &v | ||
16910 | return s | ||
16911 | } | ||
16912 | |||
16913 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
16914 | func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput { | ||
16915 | s.SSECustomerAlgorithm = &v | ||
16916 | return s | ||
16917 | } | ||
16918 | |||
16919 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
16920 | func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput { | ||
16921 | s.SSECustomerKeyMD5 = &v | ||
16922 | return s | ||
16923 | } | ||
16924 | |||
16925 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
16926 | func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput { | ||
16927 | s.SSEKMSKeyId = &v | ||
16928 | return s | ||
16929 | } | ||
16930 | |||
16931 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
16932 | func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput { | ||
16933 | s.ServerSideEncryption = &v | ||
16934 | return s | ||
16935 | } | ||
16936 | |||
16937 | // SetVersionId sets the VersionId field's value. | ||
16938 | func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput { | ||
16939 | s.VersionId = &v | ||
16940 | return s | ||
16941 | } | ||
16942 | |||
16943 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingRequest | ||
16944 | type PutObjectTaggingInput struct { | ||
16945 | _ struct{} `type:"structure" payload:"Tagging"` | ||
16946 | |||
16947 | // Bucket is a required field | ||
16948 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
16949 | |||
16950 | // Key is a required field | ||
16951 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
16952 | |||
16953 | // Tagging is a required field | ||
16954 | Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"` | ||
16955 | |||
16956 | VersionId *string `location:"querystring" locationName:"versionId" type:"string"` | ||
16957 | } | ||
16958 | |||
16959 | // String returns the string representation | ||
16960 | func (s PutObjectTaggingInput) String() string { | ||
16961 | return awsutil.Prettify(s) | ||
16962 | } | ||
16963 | |||
16964 | // GoString returns the string representation | ||
16965 | func (s PutObjectTaggingInput) GoString() string { | ||
16966 | return s.String() | ||
16967 | } | ||
16968 | |||
16969 | // Validate inspects the fields of the type to determine if they are valid. | ||
16970 | func (s *PutObjectTaggingInput) Validate() error { | ||
16971 | invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"} | ||
16972 | if s.Bucket == nil { | ||
16973 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
16974 | } | ||
16975 | if s.Key == nil { | ||
16976 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
16977 | } | ||
16978 | if s.Key != nil && len(*s.Key) < 1 { | ||
16979 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
16980 | } | ||
16981 | if s.Tagging == nil { | ||
16982 | invalidParams.Add(request.NewErrParamRequired("Tagging")) | ||
16983 | } | ||
16984 | if s.Tagging != nil { | ||
16985 | if err := s.Tagging.Validate(); err != nil { | ||
16986 | invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams)) | ||
16987 | } | ||
16988 | } | ||
16989 | |||
16990 | if invalidParams.Len() > 0 { | ||
16991 | return invalidParams | ||
16992 | } | ||
16993 | return nil | ||
16994 | } | ||
16995 | |||
16996 | // SetBucket sets the Bucket field's value. | ||
16997 | func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput { | ||
16998 | s.Bucket = &v | ||
16999 | return s | ||
17000 | } | ||
17001 | |||
17002 | // SetKey sets the Key field's value. | ||
17003 | func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput { | ||
17004 | s.Key = &v | ||
17005 | return s | ||
17006 | } | ||
17007 | |||
17008 | // SetTagging sets the Tagging field's value. | ||
17009 | func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput { | ||
17010 | s.Tagging = v | ||
17011 | return s | ||
17012 | } | ||
17013 | |||
17014 | // SetVersionId sets the VersionId field's value. | ||
17015 | func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput { | ||
17016 | s.VersionId = &v | ||
17017 | return s | ||
17018 | } | ||
17019 | |||
17020 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingOutput | ||
17021 | type PutObjectTaggingOutput struct { | ||
17022 | _ struct{} `type:"structure"` | ||
17023 | |||
17024 | VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"` | ||
17025 | } | ||
17026 | |||
17027 | // String returns the string representation | ||
17028 | func (s PutObjectTaggingOutput) String() string { | ||
17029 | return awsutil.Prettify(s) | ||
17030 | } | ||
17031 | |||
17032 | // GoString returns the string representation | ||
17033 | func (s PutObjectTaggingOutput) GoString() string { | ||
17034 | return s.String() | ||
17035 | } | ||
17036 | |||
17037 | // SetVersionId sets the VersionId field's value. | ||
17038 | func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput { | ||
17039 | s.VersionId = &v | ||
17040 | return s | ||
17041 | } | ||
17042 | |||
17043 | // Container for specifying an configuration when you want Amazon S3 to publish | ||
17044 | // events to an Amazon Simple Queue Service (Amazon SQS) queue. | ||
17045 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfiguration | ||
17046 | type QueueConfiguration struct { | ||
17047 | _ struct{} `type:"structure"` | ||
17048 | |||
17049 | // Events is a required field | ||
17050 | Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"` | ||
17051 | |||
17052 | // Container for object key name filtering rules. For information about key | ||
17053 | // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) | ||
17054 | Filter *NotificationConfigurationFilter `type:"structure"` | ||
17055 | |||
17056 | // Optional unique identifier for configurations in a notification configuration. | ||
17057 | // If you don't provide one, Amazon S3 will assign an ID. | ||
17058 | Id *string `type:"string"` | ||
17059 | |||
17060 | // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects | ||
17061 | // events of specified type. | ||
17062 | // | ||
17063 | // QueueArn is a required field | ||
17064 | QueueArn *string `locationName:"Queue" type:"string" required:"true"` | ||
17065 | } | ||
17066 | |||
17067 | // String returns the string representation | ||
17068 | func (s QueueConfiguration) String() string { | ||
17069 | return awsutil.Prettify(s) | ||
17070 | } | ||
17071 | |||
17072 | // GoString returns the string representation | ||
17073 | func (s QueueConfiguration) GoString() string { | ||
17074 | return s.String() | ||
17075 | } | ||
17076 | |||
17077 | // Validate inspects the fields of the type to determine if they are valid. | ||
17078 | func (s *QueueConfiguration) Validate() error { | ||
17079 | invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"} | ||
17080 | if s.Events == nil { | ||
17081 | invalidParams.Add(request.NewErrParamRequired("Events")) | ||
17082 | } | ||
17083 | if s.QueueArn == nil { | ||
17084 | invalidParams.Add(request.NewErrParamRequired("QueueArn")) | ||
17085 | } | ||
17086 | |||
17087 | if invalidParams.Len() > 0 { | ||
17088 | return invalidParams | ||
17089 | } | ||
17090 | return nil | ||
17091 | } | ||
17092 | |||
17093 | // SetEvents sets the Events field's value. | ||
17094 | func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration { | ||
17095 | s.Events = v | ||
17096 | return s | ||
17097 | } | ||
17098 | |||
17099 | // SetFilter sets the Filter field's value. | ||
17100 | func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration { | ||
17101 | s.Filter = v | ||
17102 | return s | ||
17103 | } | ||
17104 | |||
17105 | // SetId sets the Id field's value. | ||
17106 | func (s *QueueConfiguration) SetId(v string) *QueueConfiguration { | ||
17107 | s.Id = &v | ||
17108 | return s | ||
17109 | } | ||
17110 | |||
17111 | // SetQueueArn sets the QueueArn field's value. | ||
17112 | func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration { | ||
17113 | s.QueueArn = &v | ||
17114 | return s | ||
17115 | } | ||
17116 | |||
17117 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfigurationDeprecated | ||
17118 | type QueueConfigurationDeprecated struct { | ||
17119 | _ struct{} `type:"structure"` | ||
17120 | |||
17121 | // Bucket event for which to send notifications. | ||
17122 | Event *string `deprecated:"true" type:"string" enum:"Event"` | ||
17123 | |||
17124 | Events []*string `locationName:"Event" type:"list" flattened:"true"` | ||
17125 | |||
17126 | // Optional unique identifier for configurations in a notification configuration. | ||
17127 | // If you don't provide one, Amazon S3 will assign an ID. | ||
17128 | Id *string `type:"string"` | ||
17129 | |||
17130 | Queue *string `type:"string"` | ||
17131 | } | ||
17132 | |||
17133 | // String returns the string representation | ||
17134 | func (s QueueConfigurationDeprecated) String() string { | ||
17135 | return awsutil.Prettify(s) | ||
17136 | } | ||
17137 | |||
17138 | // GoString returns the string representation | ||
17139 | func (s QueueConfigurationDeprecated) GoString() string { | ||
17140 | return s.String() | ||
17141 | } | ||
17142 | |||
17143 | // SetEvent sets the Event field's value. | ||
17144 | func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated { | ||
17145 | s.Event = &v | ||
17146 | return s | ||
17147 | } | ||
17148 | |||
17149 | // SetEvents sets the Events field's value. | ||
17150 | func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated { | ||
17151 | s.Events = v | ||
17152 | return s | ||
17153 | } | ||
17154 | |||
17155 | // SetId sets the Id field's value. | ||
17156 | func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated { | ||
17157 | s.Id = &v | ||
17158 | return s | ||
17159 | } | ||
17160 | |||
17161 | // SetQueue sets the Queue field's value. | ||
17162 | func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated { | ||
17163 | s.Queue = &v | ||
17164 | return s | ||
17165 | } | ||
17166 | |||
17167 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Redirect | ||
17168 | type Redirect struct { | ||
17169 | _ struct{} `type:"structure"` | ||
17170 | |||
17171 | // The host name to use in the redirect request. | ||
17172 | HostName *string `type:"string"` | ||
17173 | |||
17174 | // The HTTP redirect code to use on the response. Not required if one of the | ||
17175 | // siblings is present. | ||
17176 | HttpRedirectCode *string `type:"string"` | ||
17177 | |||
17178 | // Protocol to use (http, https) when redirecting requests. The default is the | ||
17179 | // protocol that is used in the original request. | ||
17180 | Protocol *string `type:"string" enum:"Protocol"` | ||
17181 | |||
17182 | // The object key prefix to use in the redirect request. For example, to redirect | ||
17183 | // requests for all pages with prefix docs/ (objects in the docs/ folder) to | ||
17184 | // documents/, you can set a condition block with KeyPrefixEquals set to docs/ | ||
17185 | // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required | ||
17186 | // if one of the siblings is present. Can be present only if ReplaceKeyWith | ||
17187 | // is not provided. | ||
17188 | ReplaceKeyPrefixWith *string `type:"string"` | ||
17189 | |||
17190 | // The specific object key to use in the redirect request. For example, redirect | ||
17191 | // request to error.html. Not required if one of the sibling is present. Can | ||
17192 | // be present only if ReplaceKeyPrefixWith is not provided. | ||
17193 | ReplaceKeyWith *string `type:"string"` | ||
17194 | } | ||
17195 | |||
17196 | // String returns the string representation | ||
17197 | func (s Redirect) String() string { | ||
17198 | return awsutil.Prettify(s) | ||
17199 | } | ||
17200 | |||
17201 | // GoString returns the string representation | ||
17202 | func (s Redirect) GoString() string { | ||
17203 | return s.String() | ||
17204 | } | ||
17205 | |||
17206 | // SetHostName sets the HostName field's value. | ||
17207 | func (s *Redirect) SetHostName(v string) *Redirect { | ||
17208 | s.HostName = &v | ||
17209 | return s | ||
17210 | } | ||
17211 | |||
17212 | // SetHttpRedirectCode sets the HttpRedirectCode field's value. | ||
17213 | func (s *Redirect) SetHttpRedirectCode(v string) *Redirect { | ||
17214 | s.HttpRedirectCode = &v | ||
17215 | return s | ||
17216 | } | ||
17217 | |||
17218 | // SetProtocol sets the Protocol field's value. | ||
17219 | func (s *Redirect) SetProtocol(v string) *Redirect { | ||
17220 | s.Protocol = &v | ||
17221 | return s | ||
17222 | } | ||
17223 | |||
17224 | // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value. | ||
17225 | func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect { | ||
17226 | s.ReplaceKeyPrefixWith = &v | ||
17227 | return s | ||
17228 | } | ||
17229 | |||
17230 | // SetReplaceKeyWith sets the ReplaceKeyWith field's value. | ||
17231 | func (s *Redirect) SetReplaceKeyWith(v string) *Redirect { | ||
17232 | s.ReplaceKeyWith = &v | ||
17233 | return s | ||
17234 | } | ||
17235 | |||
17236 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RedirectAllRequestsTo | ||
17237 | type RedirectAllRequestsTo struct { | ||
17238 | _ struct{} `type:"structure"` | ||
17239 | |||
17240 | // Name of the host where requests will be redirected. | ||
17241 | // | ||
17242 | // HostName is a required field | ||
17243 | HostName *string `type:"string" required:"true"` | ||
17244 | |||
17245 | // Protocol to use (http, https) when redirecting requests. The default is the | ||
17246 | // protocol that is used in the original request. | ||
17247 | Protocol *string `type:"string" enum:"Protocol"` | ||
17248 | } | ||
17249 | |||
17250 | // String returns the string representation | ||
17251 | func (s RedirectAllRequestsTo) String() string { | ||
17252 | return awsutil.Prettify(s) | ||
17253 | } | ||
17254 | |||
17255 | // GoString returns the string representation | ||
17256 | func (s RedirectAllRequestsTo) GoString() string { | ||
17257 | return s.String() | ||
17258 | } | ||
17259 | |||
17260 | // Validate inspects the fields of the type to determine if they are valid. | ||
17261 | func (s *RedirectAllRequestsTo) Validate() error { | ||
17262 | invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"} | ||
17263 | if s.HostName == nil { | ||
17264 | invalidParams.Add(request.NewErrParamRequired("HostName")) | ||
17265 | } | ||
17266 | |||
17267 | if invalidParams.Len() > 0 { | ||
17268 | return invalidParams | ||
17269 | } | ||
17270 | return nil | ||
17271 | } | ||
17272 | |||
17273 | // SetHostName sets the HostName field's value. | ||
17274 | func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo { | ||
17275 | s.HostName = &v | ||
17276 | return s | ||
17277 | } | ||
17278 | |||
17279 | // SetProtocol sets the Protocol field's value. | ||
17280 | func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo { | ||
17281 | s.Protocol = &v | ||
17282 | return s | ||
17283 | } | ||
17284 | |||
17285 | // Container for replication rules. You can add as many as 1,000 rules. Total | ||
17286 | // replication configuration size can be up to 2 MB. | ||
17287 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationConfiguration | ||
17288 | type ReplicationConfiguration struct { | ||
17289 | _ struct{} `type:"structure"` | ||
17290 | |||
17291 | // Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating | ||
17292 | // the objects. | ||
17293 | // | ||
17294 | // Role is a required field | ||
17295 | Role *string `type:"string" required:"true"` | ||
17296 | |||
17297 | // Container for information about a particular replication rule. Replication | ||
17298 | // configuration must have at least one rule and can contain up to 1,000 rules. | ||
17299 | // | ||
17300 | // Rules is a required field | ||
17301 | Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"` | ||
17302 | } | ||
17303 | |||
17304 | // String returns the string representation | ||
17305 | func (s ReplicationConfiguration) String() string { | ||
17306 | return awsutil.Prettify(s) | ||
17307 | } | ||
17308 | |||
17309 | // GoString returns the string representation | ||
17310 | func (s ReplicationConfiguration) GoString() string { | ||
17311 | return s.String() | ||
17312 | } | ||
17313 | |||
17314 | // Validate inspects the fields of the type to determine if they are valid. | ||
17315 | func (s *ReplicationConfiguration) Validate() error { | ||
17316 | invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"} | ||
17317 | if s.Role == nil { | ||
17318 | invalidParams.Add(request.NewErrParamRequired("Role")) | ||
17319 | } | ||
17320 | if s.Rules == nil { | ||
17321 | invalidParams.Add(request.NewErrParamRequired("Rules")) | ||
17322 | } | ||
17323 | if s.Rules != nil { | ||
17324 | for i, v := range s.Rules { | ||
17325 | if v == nil { | ||
17326 | continue | ||
17327 | } | ||
17328 | if err := v.Validate(); err != nil { | ||
17329 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) | ||
17330 | } | ||
17331 | } | ||
17332 | } | ||
17333 | |||
17334 | if invalidParams.Len() > 0 { | ||
17335 | return invalidParams | ||
17336 | } | ||
17337 | return nil | ||
17338 | } | ||
17339 | |||
17340 | // SetRole sets the Role field's value. | ||
17341 | func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration { | ||
17342 | s.Role = &v | ||
17343 | return s | ||
17344 | } | ||
17345 | |||
17346 | // SetRules sets the Rules field's value. | ||
17347 | func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration { | ||
17348 | s.Rules = v | ||
17349 | return s | ||
17350 | } | ||
17351 | |||
17352 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRule | ||
17353 | type ReplicationRule struct { | ||
17354 | _ struct{} `type:"structure"` | ||
17355 | |||
17356 | // Destination is a required field | ||
17357 | Destination *Destination `type:"structure" required:"true"` | ||
17358 | |||
17359 | // Unique identifier for the rule. The value cannot be longer than 255 characters. | ||
17360 | ID *string `type:"string"` | ||
17361 | |||
17362 | // Object keyname prefix identifying one or more objects to which the rule applies. | ||
17363 | // Maximum prefix length can be up to 1,024 characters. Overlapping prefixes | ||
17364 | // are not supported. | ||
17365 | // | ||
17366 | // Prefix is a required field | ||
17367 | Prefix *string `type:"string" required:"true"` | ||
17368 | |||
17369 | // The rule is ignored if status is not Enabled. | ||
17370 | // | ||
17371 | // Status is a required field | ||
17372 | Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"` | ||
17373 | } | ||
17374 | |||
17375 | // String returns the string representation | ||
17376 | func (s ReplicationRule) String() string { | ||
17377 | return awsutil.Prettify(s) | ||
17378 | } | ||
17379 | |||
17380 | // GoString returns the string representation | ||
17381 | func (s ReplicationRule) GoString() string { | ||
17382 | return s.String() | ||
17383 | } | ||
17384 | |||
17385 | // Validate inspects the fields of the type to determine if they are valid. | ||
17386 | func (s *ReplicationRule) Validate() error { | ||
17387 | invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"} | ||
17388 | if s.Destination == nil { | ||
17389 | invalidParams.Add(request.NewErrParamRequired("Destination")) | ||
17390 | } | ||
17391 | if s.Prefix == nil { | ||
17392 | invalidParams.Add(request.NewErrParamRequired("Prefix")) | ||
17393 | } | ||
17394 | if s.Status == nil { | ||
17395 | invalidParams.Add(request.NewErrParamRequired("Status")) | ||
17396 | } | ||
17397 | if s.Destination != nil { | ||
17398 | if err := s.Destination.Validate(); err != nil { | ||
17399 | invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) | ||
17400 | } | ||
17401 | } | ||
17402 | |||
17403 | if invalidParams.Len() > 0 { | ||
17404 | return invalidParams | ||
17405 | } | ||
17406 | return nil | ||
17407 | } | ||
17408 | |||
17409 | // SetDestination sets the Destination field's value. | ||
17410 | func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule { | ||
17411 | s.Destination = v | ||
17412 | return s | ||
17413 | } | ||
17414 | |||
17415 | // SetID sets the ID field's value. | ||
17416 | func (s *ReplicationRule) SetID(v string) *ReplicationRule { | ||
17417 | s.ID = &v | ||
17418 | return s | ||
17419 | } | ||
17420 | |||
17421 | // SetPrefix sets the Prefix field's value. | ||
17422 | func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule { | ||
17423 | s.Prefix = &v | ||
17424 | return s | ||
17425 | } | ||
17426 | |||
17427 | // SetStatus sets the Status field's value. | ||
17428 | func (s *ReplicationRule) SetStatus(v string) *ReplicationRule { | ||
17429 | s.Status = &v | ||
17430 | return s | ||
17431 | } | ||
17432 | |||
17433 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RequestPaymentConfiguration | ||
17434 | type RequestPaymentConfiguration struct { | ||
17435 | _ struct{} `type:"structure"` | ||
17436 | |||
17437 | // Specifies who pays for the download and request fees. | ||
17438 | // | ||
17439 | // Payer is a required field | ||
17440 | Payer *string `type:"string" required:"true" enum:"Payer"` | ||
17441 | } | ||
17442 | |||
17443 | // String returns the string representation | ||
17444 | func (s RequestPaymentConfiguration) String() string { | ||
17445 | return awsutil.Prettify(s) | ||
17446 | } | ||
17447 | |||
17448 | // GoString returns the string representation | ||
17449 | func (s RequestPaymentConfiguration) GoString() string { | ||
17450 | return s.String() | ||
17451 | } | ||
17452 | |||
17453 | // Validate inspects the fields of the type to determine if they are valid. | ||
17454 | func (s *RequestPaymentConfiguration) Validate() error { | ||
17455 | invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"} | ||
17456 | if s.Payer == nil { | ||
17457 | invalidParams.Add(request.NewErrParamRequired("Payer")) | ||
17458 | } | ||
17459 | |||
17460 | if invalidParams.Len() > 0 { | ||
17461 | return invalidParams | ||
17462 | } | ||
17463 | return nil | ||
17464 | } | ||
17465 | |||
17466 | // SetPayer sets the Payer field's value. | ||
17467 | func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration { | ||
17468 | s.Payer = &v | ||
17469 | return s | ||
17470 | } | ||
17471 | |||
17472 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectRequest | ||
17473 | type RestoreObjectInput struct { | ||
17474 | _ struct{} `type:"structure" payload:"RestoreRequest"` | ||
17475 | |||
17476 | // Bucket is a required field | ||
17477 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
17478 | |||
17479 | // Key is a required field | ||
17480 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
17481 | |||
17482 | // Confirms that the requester knows that she or he will be charged for the | ||
17483 | // request. Bucket owners need not specify this parameter in their requests. | ||
17484 | // Documentation on downloading objects from requester pays buckets can be found | ||
17485 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
17486 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
17487 | |||
17488 | RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure"` | ||
17489 | |||
17490 | VersionId *string `location:"querystring" locationName:"versionId" type:"string"` | ||
17491 | } | ||
17492 | |||
17493 | // String returns the string representation | ||
17494 | func (s RestoreObjectInput) String() string { | ||
17495 | return awsutil.Prettify(s) | ||
17496 | } | ||
17497 | |||
17498 | // GoString returns the string representation | ||
17499 | func (s RestoreObjectInput) GoString() string { | ||
17500 | return s.String() | ||
17501 | } | ||
17502 | |||
17503 | // Validate inspects the fields of the type to determine if they are valid. | ||
17504 | func (s *RestoreObjectInput) Validate() error { | ||
17505 | invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"} | ||
17506 | if s.Bucket == nil { | ||
17507 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
17508 | } | ||
17509 | if s.Key == nil { | ||
17510 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
17511 | } | ||
17512 | if s.Key != nil && len(*s.Key) < 1 { | ||
17513 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
17514 | } | ||
17515 | if s.RestoreRequest != nil { | ||
17516 | if err := s.RestoreRequest.Validate(); err != nil { | ||
17517 | invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams)) | ||
17518 | } | ||
17519 | } | ||
17520 | |||
17521 | if invalidParams.Len() > 0 { | ||
17522 | return invalidParams | ||
17523 | } | ||
17524 | return nil | ||
17525 | } | ||
17526 | |||
17527 | // SetBucket sets the Bucket field's value. | ||
17528 | func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput { | ||
17529 | s.Bucket = &v | ||
17530 | return s | ||
17531 | } | ||
17532 | |||
17533 | // SetKey sets the Key field's value. | ||
17534 | func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput { | ||
17535 | s.Key = &v | ||
17536 | return s | ||
17537 | } | ||
17538 | |||
17539 | // SetRequestPayer sets the RequestPayer field's value. | ||
17540 | func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput { | ||
17541 | s.RequestPayer = &v | ||
17542 | return s | ||
17543 | } | ||
17544 | |||
17545 | // SetRestoreRequest sets the RestoreRequest field's value. | ||
17546 | func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput { | ||
17547 | s.RestoreRequest = v | ||
17548 | return s | ||
17549 | } | ||
17550 | |||
17551 | // SetVersionId sets the VersionId field's value. | ||
17552 | func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput { | ||
17553 | s.VersionId = &v | ||
17554 | return s | ||
17555 | } | ||
17556 | |||
17557 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectOutput | ||
17558 | type RestoreObjectOutput struct { | ||
17559 | _ struct{} `type:"structure"` | ||
17560 | |||
17561 | // If present, indicates that the requester was successfully charged for the | ||
17562 | // request. | ||
17563 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
17564 | } | ||
17565 | |||
17566 | // String returns the string representation | ||
17567 | func (s RestoreObjectOutput) String() string { | ||
17568 | return awsutil.Prettify(s) | ||
17569 | } | ||
17570 | |||
17571 | // GoString returns the string representation | ||
17572 | func (s RestoreObjectOutput) GoString() string { | ||
17573 | return s.String() | ||
17574 | } | ||
17575 | |||
17576 | // SetRequestCharged sets the RequestCharged field's value. | ||
17577 | func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput { | ||
17578 | s.RequestCharged = &v | ||
17579 | return s | ||
17580 | } | ||
17581 | |||
17582 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreRequest | ||
17583 | type RestoreRequest struct { | ||
17584 | _ struct{} `type:"structure"` | ||
17585 | |||
17586 | // Lifetime of the active copy in days | ||
17587 | // | ||
17588 | // Days is a required field | ||
17589 | Days *int64 `type:"integer" required:"true"` | ||
17590 | |||
17591 | // Glacier related prameters pertaining to this job. | ||
17592 | GlacierJobParameters *GlacierJobParameters `type:"structure"` | ||
17593 | } | ||
17594 | |||
17595 | // String returns the string representation | ||
17596 | func (s RestoreRequest) String() string { | ||
17597 | return awsutil.Prettify(s) | ||
17598 | } | ||
17599 | |||
17600 | // GoString returns the string representation | ||
17601 | func (s RestoreRequest) GoString() string { | ||
17602 | return s.String() | ||
17603 | } | ||
17604 | |||
17605 | // Validate inspects the fields of the type to determine if they are valid. | ||
17606 | func (s *RestoreRequest) Validate() error { | ||
17607 | invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"} | ||
17608 | if s.Days == nil { | ||
17609 | invalidParams.Add(request.NewErrParamRequired("Days")) | ||
17610 | } | ||
17611 | if s.GlacierJobParameters != nil { | ||
17612 | if err := s.GlacierJobParameters.Validate(); err != nil { | ||
17613 | invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams)) | ||
17614 | } | ||
17615 | } | ||
17616 | |||
17617 | if invalidParams.Len() > 0 { | ||
17618 | return invalidParams | ||
17619 | } | ||
17620 | return nil | ||
17621 | } | ||
17622 | |||
17623 | // SetDays sets the Days field's value. | ||
17624 | func (s *RestoreRequest) SetDays(v int64) *RestoreRequest { | ||
17625 | s.Days = &v | ||
17626 | return s | ||
17627 | } | ||
17628 | |||
17629 | // SetGlacierJobParameters sets the GlacierJobParameters field's value. | ||
17630 | func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest { | ||
17631 | s.GlacierJobParameters = v | ||
17632 | return s | ||
17633 | } | ||
17634 | |||
17635 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RoutingRule | ||
17636 | type RoutingRule struct { | ||
17637 | _ struct{} `type:"structure"` | ||
17638 | |||
17639 | // A container for describing a condition that must be met for the specified | ||
17640 | // redirect to apply. For example, 1. If request is for pages in the /docs folder, | ||
17641 | // redirect to the /documents folder. 2. If request results in HTTP error 4xx, | ||
17642 | // redirect request to another host where you might process the error. | ||
17643 | Condition *Condition `type:"structure"` | ||
17644 | |||
17645 | // Container for redirect information. You can redirect requests to another | ||
17646 | // host, to another page, or with another protocol. In the event of an error, | ||
17647 | // you can can specify a different error code to return. | ||
17648 | // | ||
17649 | // Redirect is a required field | ||
17650 | Redirect *Redirect `type:"structure" required:"true"` | ||
17651 | } | ||
17652 | |||
17653 | // String returns the string representation | ||
17654 | func (s RoutingRule) String() string { | ||
17655 | return awsutil.Prettify(s) | ||
17656 | } | ||
17657 | |||
17658 | // GoString returns the string representation | ||
17659 | func (s RoutingRule) GoString() string { | ||
17660 | return s.String() | ||
17661 | } | ||
17662 | |||
17663 | // Validate inspects the fields of the type to determine if they are valid. | ||
17664 | func (s *RoutingRule) Validate() error { | ||
17665 | invalidParams := request.ErrInvalidParams{Context: "RoutingRule"} | ||
17666 | if s.Redirect == nil { | ||
17667 | invalidParams.Add(request.NewErrParamRequired("Redirect")) | ||
17668 | } | ||
17669 | |||
17670 | if invalidParams.Len() > 0 { | ||
17671 | return invalidParams | ||
17672 | } | ||
17673 | return nil | ||
17674 | } | ||
17675 | |||
17676 | // SetCondition sets the Condition field's value. | ||
17677 | func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule { | ||
17678 | s.Condition = v | ||
17679 | return s | ||
17680 | } | ||
17681 | |||
17682 | // SetRedirect sets the Redirect field's value. | ||
17683 | func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule { | ||
17684 | s.Redirect = v | ||
17685 | return s | ||
17686 | } | ||
17687 | |||
17688 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Rule | ||
17689 | type Rule struct { | ||
17690 | _ struct{} `type:"structure"` | ||
17691 | |||
17692 | // Specifies the days since the initiation of an Incomplete Multipart Upload | ||
17693 | // that Lifecycle will wait before permanently removing all parts of the upload. | ||
17694 | AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"` | ||
17695 | |||
17696 | Expiration *LifecycleExpiration `type:"structure"` | ||
17697 | |||
17698 | // Unique identifier for the rule. The value cannot be longer than 255 characters. | ||
17699 | ID *string `type:"string"` | ||
17700 | |||
17701 | // Specifies when noncurrent object versions expire. Upon expiration, Amazon | ||
17702 | // S3 permanently deletes the noncurrent object versions. You set this lifecycle | ||
17703 | // configuration action on a bucket that has versioning enabled (or suspended) | ||
17704 | // to request that Amazon S3 delete noncurrent object versions at a specific | ||
17705 | // period in the object's lifetime. | ||
17706 | NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"` | ||
17707 | |||
17708 | // Container for the transition rule that describes when noncurrent objects | ||
17709 | // transition to the STANDARD_IA or GLACIER storage class. If your bucket is | ||
17710 | // versioning-enabled (or versioning is suspended), you can set this action | ||
17711 | // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA | ||
17712 | // or GLACIER storage class at a specific period in the object's lifetime. | ||
17713 | NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"` | ||
17714 | |||
17715 | // Prefix identifying one or more objects to which the rule applies. | ||
17716 | // | ||
17717 | // Prefix is a required field | ||
17718 | Prefix *string `type:"string" required:"true"` | ||
17719 | |||
17720 | // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule | ||
17721 | // is not currently being applied. | ||
17722 | // | ||
17723 | // Status is a required field | ||
17724 | Status *string `type:"string" required:"true" enum:"ExpirationStatus"` | ||
17725 | |||
17726 | Transition *Transition `type:"structure"` | ||
17727 | } | ||
17728 | |||
17729 | // String returns the string representation | ||
17730 | func (s Rule) String() string { | ||
17731 | return awsutil.Prettify(s) | ||
17732 | } | ||
17733 | |||
17734 | // GoString returns the string representation | ||
17735 | func (s Rule) GoString() string { | ||
17736 | return s.String() | ||
17737 | } | ||
17738 | |||
17739 | // Validate inspects the fields of the type to determine if they are valid. | ||
17740 | func (s *Rule) Validate() error { | ||
17741 | invalidParams := request.ErrInvalidParams{Context: "Rule"} | ||
17742 | if s.Prefix == nil { | ||
17743 | invalidParams.Add(request.NewErrParamRequired("Prefix")) | ||
17744 | } | ||
17745 | if s.Status == nil { | ||
17746 | invalidParams.Add(request.NewErrParamRequired("Status")) | ||
17747 | } | ||
17748 | |||
17749 | if invalidParams.Len() > 0 { | ||
17750 | return invalidParams | ||
17751 | } | ||
17752 | return nil | ||
17753 | } | ||
17754 | |||
17755 | // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value. | ||
17756 | func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule { | ||
17757 | s.AbortIncompleteMultipartUpload = v | ||
17758 | return s | ||
17759 | } | ||
17760 | |||
17761 | // SetExpiration sets the Expiration field's value. | ||
17762 | func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule { | ||
17763 | s.Expiration = v | ||
17764 | return s | ||
17765 | } | ||
17766 | |||
17767 | // SetID sets the ID field's value. | ||
17768 | func (s *Rule) SetID(v string) *Rule { | ||
17769 | s.ID = &v | ||
17770 | return s | ||
17771 | } | ||
17772 | |||
17773 | // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value. | ||
17774 | func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule { | ||
17775 | s.NoncurrentVersionExpiration = v | ||
17776 | return s | ||
17777 | } | ||
17778 | |||
17779 | // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value. | ||
17780 | func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule { | ||
17781 | s.NoncurrentVersionTransition = v | ||
17782 | return s | ||
17783 | } | ||
17784 | |||
17785 | // SetPrefix sets the Prefix field's value. | ||
17786 | func (s *Rule) SetPrefix(v string) *Rule { | ||
17787 | s.Prefix = &v | ||
17788 | return s | ||
17789 | } | ||
17790 | |||
17791 | // SetStatus sets the Status field's value. | ||
17792 | func (s *Rule) SetStatus(v string) *Rule { | ||
17793 | s.Status = &v | ||
17794 | return s | ||
17795 | } | ||
17796 | |||
17797 | // SetTransition sets the Transition field's value. | ||
17798 | func (s *Rule) SetTransition(v *Transition) *Rule { | ||
17799 | s.Transition = v | ||
17800 | return s | ||
17801 | } | ||
17802 | |||
17803 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysis | ||
17804 | type StorageClassAnalysis struct { | ||
17805 | _ struct{} `type:"structure"` | ||
17806 | |||
17807 | // A container used to describe how data related to the storage class analysis | ||
17808 | // should be exported. | ||
17809 | DataExport *StorageClassAnalysisDataExport `type:"structure"` | ||
17810 | } | ||
17811 | |||
17812 | // String returns the string representation | ||
17813 | func (s StorageClassAnalysis) String() string { | ||
17814 | return awsutil.Prettify(s) | ||
17815 | } | ||
17816 | |||
17817 | // GoString returns the string representation | ||
17818 | func (s StorageClassAnalysis) GoString() string { | ||
17819 | return s.String() | ||
17820 | } | ||
17821 | |||
17822 | // Validate inspects the fields of the type to determine if they are valid. | ||
17823 | func (s *StorageClassAnalysis) Validate() error { | ||
17824 | invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"} | ||
17825 | if s.DataExport != nil { | ||
17826 | if err := s.DataExport.Validate(); err != nil { | ||
17827 | invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams)) | ||
17828 | } | ||
17829 | } | ||
17830 | |||
17831 | if invalidParams.Len() > 0 { | ||
17832 | return invalidParams | ||
17833 | } | ||
17834 | return nil | ||
17835 | } | ||
17836 | |||
17837 | // SetDataExport sets the DataExport field's value. | ||
17838 | func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis { | ||
17839 | s.DataExport = v | ||
17840 | return s | ||
17841 | } | ||
17842 | |||
17843 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysisDataExport | ||
17844 | type StorageClassAnalysisDataExport struct { | ||
17845 | _ struct{} `type:"structure"` | ||
17846 | |||
17847 | // The place to store the data for an analysis. | ||
17848 | // | ||
17849 | // Destination is a required field | ||
17850 | Destination *AnalyticsExportDestination `type:"structure" required:"true"` | ||
17851 | |||
17852 | // The version of the output schema to use when exporting data. Must be V_1. | ||
17853 | // | ||
17854 | // OutputSchemaVersion is a required field | ||
17855 | OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"` | ||
17856 | } | ||
17857 | |||
17858 | // String returns the string representation | ||
17859 | func (s StorageClassAnalysisDataExport) String() string { | ||
17860 | return awsutil.Prettify(s) | ||
17861 | } | ||
17862 | |||
17863 | // GoString returns the string representation | ||
17864 | func (s StorageClassAnalysisDataExport) GoString() string { | ||
17865 | return s.String() | ||
17866 | } | ||
17867 | |||
17868 | // Validate inspects the fields of the type to determine if they are valid. | ||
17869 | func (s *StorageClassAnalysisDataExport) Validate() error { | ||
17870 | invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"} | ||
17871 | if s.Destination == nil { | ||
17872 | invalidParams.Add(request.NewErrParamRequired("Destination")) | ||
17873 | } | ||
17874 | if s.OutputSchemaVersion == nil { | ||
17875 | invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion")) | ||
17876 | } | ||
17877 | if s.Destination != nil { | ||
17878 | if err := s.Destination.Validate(); err != nil { | ||
17879 | invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) | ||
17880 | } | ||
17881 | } | ||
17882 | |||
17883 | if invalidParams.Len() > 0 { | ||
17884 | return invalidParams | ||
17885 | } | ||
17886 | return nil | ||
17887 | } | ||
17888 | |||
17889 | // SetDestination sets the Destination field's value. | ||
17890 | func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport { | ||
17891 | s.Destination = v | ||
17892 | return s | ||
17893 | } | ||
17894 | |||
17895 | // SetOutputSchemaVersion sets the OutputSchemaVersion field's value. | ||
17896 | func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport { | ||
17897 | s.OutputSchemaVersion = &v | ||
17898 | return s | ||
17899 | } | ||
17900 | |||
17901 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tag | ||
17902 | type Tag struct { | ||
17903 | _ struct{} `type:"structure"` | ||
17904 | |||
17905 | // Name of the tag. | ||
17906 | // | ||
17907 | // Key is a required field | ||
17908 | Key *string `min:"1" type:"string" required:"true"` | ||
17909 | |||
17910 | // Value of the tag. | ||
17911 | // | ||
17912 | // Value is a required field | ||
17913 | Value *string `type:"string" required:"true"` | ||
17914 | } | ||
17915 | |||
17916 | // String returns the string representation | ||
17917 | func (s Tag) String() string { | ||
17918 | return awsutil.Prettify(s) | ||
17919 | } | ||
17920 | |||
17921 | // GoString returns the string representation | ||
17922 | func (s Tag) GoString() string { | ||
17923 | return s.String() | ||
17924 | } | ||
17925 | |||
17926 | // Validate inspects the fields of the type to determine if they are valid. | ||
17927 | func (s *Tag) Validate() error { | ||
17928 | invalidParams := request.ErrInvalidParams{Context: "Tag"} | ||
17929 | if s.Key == nil { | ||
17930 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
17931 | } | ||
17932 | if s.Key != nil && len(*s.Key) < 1 { | ||
17933 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
17934 | } | ||
17935 | if s.Value == nil { | ||
17936 | invalidParams.Add(request.NewErrParamRequired("Value")) | ||
17937 | } | ||
17938 | |||
17939 | if invalidParams.Len() > 0 { | ||
17940 | return invalidParams | ||
17941 | } | ||
17942 | return nil | ||
17943 | } | ||
17944 | |||
17945 | // SetKey sets the Key field's value. | ||
17946 | func (s *Tag) SetKey(v string) *Tag { | ||
17947 | s.Key = &v | ||
17948 | return s | ||
17949 | } | ||
17950 | |||
17951 | // SetValue sets the Value field's value. | ||
17952 | func (s *Tag) SetValue(v string) *Tag { | ||
17953 | s.Value = &v | ||
17954 | return s | ||
17955 | } | ||
17956 | |||
17957 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tagging | ||
17958 | type Tagging struct { | ||
17959 | _ struct{} `type:"structure"` | ||
17960 | |||
17961 | // TagSet is a required field | ||
17962 | TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"` | ||
17963 | } | ||
17964 | |||
17965 | // String returns the string representation | ||
17966 | func (s Tagging) String() string { | ||
17967 | return awsutil.Prettify(s) | ||
17968 | } | ||
17969 | |||
17970 | // GoString returns the string representation | ||
17971 | func (s Tagging) GoString() string { | ||
17972 | return s.String() | ||
17973 | } | ||
17974 | |||
17975 | // Validate inspects the fields of the type to determine if they are valid. | ||
17976 | func (s *Tagging) Validate() error { | ||
17977 | invalidParams := request.ErrInvalidParams{Context: "Tagging"} | ||
17978 | if s.TagSet == nil { | ||
17979 | invalidParams.Add(request.NewErrParamRequired("TagSet")) | ||
17980 | } | ||
17981 | if s.TagSet != nil { | ||
17982 | for i, v := range s.TagSet { | ||
17983 | if v == nil { | ||
17984 | continue | ||
17985 | } | ||
17986 | if err := v.Validate(); err != nil { | ||
17987 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams)) | ||
17988 | } | ||
17989 | } | ||
17990 | } | ||
17991 | |||
17992 | if invalidParams.Len() > 0 { | ||
17993 | return invalidParams | ||
17994 | } | ||
17995 | return nil | ||
17996 | } | ||
17997 | |||
17998 | // SetTagSet sets the TagSet field's value. | ||
17999 | func (s *Tagging) SetTagSet(v []*Tag) *Tagging { | ||
18000 | s.TagSet = v | ||
18001 | return s | ||
18002 | } | ||
18003 | |||
18004 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TargetGrant | ||
18005 | type TargetGrant struct { | ||
18006 | _ struct{} `type:"structure"` | ||
18007 | |||
18008 | Grantee *Grantee `type:"structure"` | ||
18009 | |||
18010 | // Logging permissions assigned to the Grantee for the bucket. | ||
18011 | Permission *string `type:"string" enum:"BucketLogsPermission"` | ||
18012 | } | ||
18013 | |||
18014 | // String returns the string representation | ||
18015 | func (s TargetGrant) String() string { | ||
18016 | return awsutil.Prettify(s) | ||
18017 | } | ||
18018 | |||
18019 | // GoString returns the string representation | ||
18020 | func (s TargetGrant) GoString() string { | ||
18021 | return s.String() | ||
18022 | } | ||
18023 | |||
18024 | // Validate inspects the fields of the type to determine if they are valid. | ||
18025 | func (s *TargetGrant) Validate() error { | ||
18026 | invalidParams := request.ErrInvalidParams{Context: "TargetGrant"} | ||
18027 | if s.Grantee != nil { | ||
18028 | if err := s.Grantee.Validate(); err != nil { | ||
18029 | invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams)) | ||
18030 | } | ||
18031 | } | ||
18032 | |||
18033 | if invalidParams.Len() > 0 { | ||
18034 | return invalidParams | ||
18035 | } | ||
18036 | return nil | ||
18037 | } | ||
18038 | |||
18039 | // SetGrantee sets the Grantee field's value. | ||
18040 | func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant { | ||
18041 | s.Grantee = v | ||
18042 | return s | ||
18043 | } | ||
18044 | |||
18045 | // SetPermission sets the Permission field's value. | ||
18046 | func (s *TargetGrant) SetPermission(v string) *TargetGrant { | ||
18047 | s.Permission = &v | ||
18048 | return s | ||
18049 | } | ||
18050 | |||
18051 | // Container for specifying the configuration when you want Amazon S3 to publish | ||
18052 | // events to an Amazon Simple Notification Service (Amazon SNS) topic. | ||
18053 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfiguration | ||
18054 | type TopicConfiguration struct { | ||
18055 | _ struct{} `type:"structure"` | ||
18056 | |||
18057 | // Events is a required field | ||
18058 | Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"` | ||
18059 | |||
18060 | // Container for object key name filtering rules. For information about key | ||
18061 | // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) | ||
18062 | Filter *NotificationConfigurationFilter `type:"structure"` | ||
18063 | |||
18064 | // Optional unique identifier for configurations in a notification configuration. | ||
18065 | // If you don't provide one, Amazon S3 will assign an ID. | ||
18066 | Id *string `type:"string"` | ||
18067 | |||
18068 | // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects | ||
18069 | // events of specified type. | ||
18070 | // | ||
18071 | // TopicArn is a required field | ||
18072 | TopicArn *string `locationName:"Topic" type:"string" required:"true"` | ||
18073 | } | ||
18074 | |||
18075 | // String returns the string representation | ||
18076 | func (s TopicConfiguration) String() string { | ||
18077 | return awsutil.Prettify(s) | ||
18078 | } | ||
18079 | |||
18080 | // GoString returns the string representation | ||
18081 | func (s TopicConfiguration) GoString() string { | ||
18082 | return s.String() | ||
18083 | } | ||
18084 | |||
18085 | // Validate inspects the fields of the type to determine if they are valid. | ||
18086 | func (s *TopicConfiguration) Validate() error { | ||
18087 | invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"} | ||
18088 | if s.Events == nil { | ||
18089 | invalidParams.Add(request.NewErrParamRequired("Events")) | ||
18090 | } | ||
18091 | if s.TopicArn == nil { | ||
18092 | invalidParams.Add(request.NewErrParamRequired("TopicArn")) | ||
18093 | } | ||
18094 | |||
18095 | if invalidParams.Len() > 0 { | ||
18096 | return invalidParams | ||
18097 | } | ||
18098 | return nil | ||
18099 | } | ||
18100 | |||
18101 | // SetEvents sets the Events field's value. | ||
18102 | func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration { | ||
18103 | s.Events = v | ||
18104 | return s | ||
18105 | } | ||
18106 | |||
18107 | // SetFilter sets the Filter field's value. | ||
18108 | func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration { | ||
18109 | s.Filter = v | ||
18110 | return s | ||
18111 | } | ||
18112 | |||
18113 | // SetId sets the Id field's value. | ||
18114 | func (s *TopicConfiguration) SetId(v string) *TopicConfiguration { | ||
18115 | s.Id = &v | ||
18116 | return s | ||
18117 | } | ||
18118 | |||
18119 | // SetTopicArn sets the TopicArn field's value. | ||
18120 | func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration { | ||
18121 | s.TopicArn = &v | ||
18122 | return s | ||
18123 | } | ||
18124 | |||
18125 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfigurationDeprecated | ||
18126 | type TopicConfigurationDeprecated struct { | ||
18127 | _ struct{} `type:"structure"` | ||
18128 | |||
18129 | // Bucket event for which to send notifications. | ||
18130 | Event *string `deprecated:"true" type:"string" enum:"Event"` | ||
18131 | |||
18132 | Events []*string `locationName:"Event" type:"list" flattened:"true"` | ||
18133 | |||
18134 | // Optional unique identifier for configurations in a notification configuration. | ||
18135 | // If you don't provide one, Amazon S3 will assign an ID. | ||
18136 | Id *string `type:"string"` | ||
18137 | |||
18138 | // Amazon SNS topic to which Amazon S3 will publish a message to report the | ||
18139 | // specified events for the bucket. | ||
18140 | Topic *string `type:"string"` | ||
18141 | } | ||
18142 | |||
18143 | // String returns the string representation | ||
18144 | func (s TopicConfigurationDeprecated) String() string { | ||
18145 | return awsutil.Prettify(s) | ||
18146 | } | ||
18147 | |||
18148 | // GoString returns the string representation | ||
18149 | func (s TopicConfigurationDeprecated) GoString() string { | ||
18150 | return s.String() | ||
18151 | } | ||
18152 | |||
18153 | // SetEvent sets the Event field's value. | ||
18154 | func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated { | ||
18155 | s.Event = &v | ||
18156 | return s | ||
18157 | } | ||
18158 | |||
18159 | // SetEvents sets the Events field's value. | ||
18160 | func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated { | ||
18161 | s.Events = v | ||
18162 | return s | ||
18163 | } | ||
18164 | |||
18165 | // SetId sets the Id field's value. | ||
18166 | func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated { | ||
18167 | s.Id = &v | ||
18168 | return s | ||
18169 | } | ||
18170 | |||
18171 | // SetTopic sets the Topic field's value. | ||
18172 | func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated { | ||
18173 | s.Topic = &v | ||
18174 | return s | ||
18175 | } | ||
18176 | |||
18177 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Transition | ||
18178 | type Transition struct { | ||
18179 | _ struct{} `type:"structure"` | ||
18180 | |||
18181 | // Indicates at what date the object is to be moved or deleted. Should be in | ||
18182 | // GMT ISO 8601 Format. | ||
18183 | Date *time.Time `type:"timestamp" timestampFormat:"iso8601"` | ||
18184 | |||
18185 | // Indicates the lifetime, in days, of the objects that are subject to the rule. | ||
18186 | // The value must be a non-zero positive integer. | ||
18187 | Days *int64 `type:"integer"` | ||
18188 | |||
18189 | // The class of storage used to store the object. | ||
18190 | StorageClass *string `type:"string" enum:"TransitionStorageClass"` | ||
18191 | } | ||
18192 | |||
18193 | // String returns the string representation | ||
18194 | func (s Transition) String() string { | ||
18195 | return awsutil.Prettify(s) | ||
18196 | } | ||
18197 | |||
18198 | // GoString returns the string representation | ||
18199 | func (s Transition) GoString() string { | ||
18200 | return s.String() | ||
18201 | } | ||
18202 | |||
18203 | // SetDate sets the Date field's value. | ||
18204 | func (s *Transition) SetDate(v time.Time) *Transition { | ||
18205 | s.Date = &v | ||
18206 | return s | ||
18207 | } | ||
18208 | |||
18209 | // SetDays sets the Days field's value. | ||
18210 | func (s *Transition) SetDays(v int64) *Transition { | ||
18211 | s.Days = &v | ||
18212 | return s | ||
18213 | } | ||
18214 | |||
18215 | // SetStorageClass sets the StorageClass field's value. | ||
18216 | func (s *Transition) SetStorageClass(v string) *Transition { | ||
18217 | s.StorageClass = &v | ||
18218 | return s | ||
18219 | } | ||
18220 | |||
18221 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyRequest | ||
18222 | type UploadPartCopyInput struct { | ||
18223 | _ struct{} `type:"structure"` | ||
18224 | |||
18225 | // Bucket is a required field | ||
18226 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
18227 | |||
18228 | // The name of the source bucket and key name of the source object, separated | ||
18229 | // by a slash (/). Must be URL-encoded. | ||
18230 | // | ||
18231 | // CopySource is a required field | ||
18232 | CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"` | ||
18233 | |||
18234 | // Copies the object if its entity tag (ETag) matches the specified tag. | ||
18235 | CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"` | ||
18236 | |||
18237 | // Copies the object if it has been modified since the specified time. | ||
18238 | CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"` | ||
18239 | |||
18240 | // Copies the object if its entity tag (ETag) is different than the specified | ||
18241 | // ETag. | ||
18242 | CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"` | ||
18243 | |||
18244 | // Copies the object if it hasn't been modified since the specified time. | ||
18245 | CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"` | ||
18246 | |||
18247 | // The range of bytes to copy from the source object. The range value must use | ||
18248 | // the form bytes=first-last, where the first and last are the zero-based byte | ||
18249 | // offsets to copy. For example, bytes=0-9 indicates that you want to copy the | ||
18250 | // first ten bytes of the source. You can copy a range only if the source object | ||
18251 | // is greater than 5 GB. | ||
18252 | CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"` | ||
18253 | |||
18254 | // Specifies the algorithm to use when decrypting the source object (e.g., AES256). | ||
18255 | CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"` | ||
18256 | |||
18257 | // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt | ||
18258 | // the source object. The encryption key provided in this header must be one | ||
18259 | // that was used when the source object was created. | ||
18260 | CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"` | ||
18261 | |||
18262 | // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | ||
18263 | // Amazon S3 uses this header for a message integrity check to ensure the encryption | ||
18264 | // key was transmitted without error. | ||
18265 | CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"` | ||
18266 | |||
18267 | // Key is a required field | ||
18268 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
18269 | |||
18270 | // Part number of part being copied. This is a positive integer between 1 and | ||
18271 | // 10,000. | ||
18272 | // | ||
18273 | // PartNumber is a required field | ||
18274 | PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"` | ||
18275 | |||
18276 | // Confirms that the requester knows that she or he will be charged for the | ||
18277 | // request. Bucket owners need not specify this parameter in their requests. | ||
18278 | // Documentation on downloading objects from requester pays buckets can be found | ||
18279 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
18280 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
18281 | |||
18282 | // Specifies the algorithm to use to when encrypting the object (e.g., AES256). | ||
18283 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
18284 | |||
18285 | // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting | ||
18286 | // data. This value is used to store the object and then it is discarded; Amazon | ||
18287 | // does not store the encryption key. The key must be appropriate for use with | ||
18288 | // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm | ||
18289 | // header. This must be the same encryption key specified in the initiate multipart | ||
18290 | // upload request. | ||
18291 | SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` | ||
18292 | |||
18293 | // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | ||
18294 | // Amazon S3 uses this header for a message integrity check to ensure the encryption | ||
18295 | // key was transmitted without error. | ||
18296 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
18297 | |||
18298 | // Upload ID identifying the multipart upload whose part is being copied. | ||
18299 | // | ||
18300 | // UploadId is a required field | ||
18301 | UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"` | ||
18302 | } | ||
18303 | |||
18304 | // String returns the string representation | ||
18305 | func (s UploadPartCopyInput) String() string { | ||
18306 | return awsutil.Prettify(s) | ||
18307 | } | ||
18308 | |||
18309 | // GoString returns the string representation | ||
18310 | func (s UploadPartCopyInput) GoString() string { | ||
18311 | return s.String() | ||
18312 | } | ||
18313 | |||
18314 | // Validate inspects the fields of the type to determine if they are valid. | ||
18315 | func (s *UploadPartCopyInput) Validate() error { | ||
18316 | invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"} | ||
18317 | if s.Bucket == nil { | ||
18318 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
18319 | } | ||
18320 | if s.CopySource == nil { | ||
18321 | invalidParams.Add(request.NewErrParamRequired("CopySource")) | ||
18322 | } | ||
18323 | if s.Key == nil { | ||
18324 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
18325 | } | ||
18326 | if s.Key != nil && len(*s.Key) < 1 { | ||
18327 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
18328 | } | ||
18329 | if s.PartNumber == nil { | ||
18330 | invalidParams.Add(request.NewErrParamRequired("PartNumber")) | ||
18331 | } | ||
18332 | if s.UploadId == nil { | ||
18333 | invalidParams.Add(request.NewErrParamRequired("UploadId")) | ||
18334 | } | ||
18335 | |||
18336 | if invalidParams.Len() > 0 { | ||
18337 | return invalidParams | ||
18338 | } | ||
18339 | return nil | ||
18340 | } | ||
18341 | |||
18342 | // SetBucket sets the Bucket field's value. | ||
18343 | func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput { | ||
18344 | s.Bucket = &v | ||
18345 | return s | ||
18346 | } | ||
18347 | |||
18348 | // SetCopySource sets the CopySource field's value. | ||
18349 | func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput { | ||
18350 | s.CopySource = &v | ||
18351 | return s | ||
18352 | } | ||
18353 | |||
18354 | // SetCopySourceIfMatch sets the CopySourceIfMatch field's value. | ||
18355 | func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput { | ||
18356 | s.CopySourceIfMatch = &v | ||
18357 | return s | ||
18358 | } | ||
18359 | |||
18360 | // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value. | ||
18361 | func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput { | ||
18362 | s.CopySourceIfModifiedSince = &v | ||
18363 | return s | ||
18364 | } | ||
18365 | |||
18366 | // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value. | ||
18367 | func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput { | ||
18368 | s.CopySourceIfNoneMatch = &v | ||
18369 | return s | ||
18370 | } | ||
18371 | |||
18372 | // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value. | ||
18373 | func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput { | ||
18374 | s.CopySourceIfUnmodifiedSince = &v | ||
18375 | return s | ||
18376 | } | ||
18377 | |||
18378 | // SetCopySourceRange sets the CopySourceRange field's value. | ||
18379 | func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput { | ||
18380 | s.CopySourceRange = &v | ||
18381 | return s | ||
18382 | } | ||
18383 | |||
18384 | // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value. | ||
18385 | func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput { | ||
18386 | s.CopySourceSSECustomerAlgorithm = &v | ||
18387 | return s | ||
18388 | } | ||
18389 | |||
18390 | // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value. | ||
18391 | func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput { | ||
18392 | s.CopySourceSSECustomerKey = &v | ||
18393 | return s | ||
18394 | } | ||
18395 | |||
18396 | // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value. | ||
18397 | func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput { | ||
18398 | s.CopySourceSSECustomerKeyMD5 = &v | ||
18399 | return s | ||
18400 | } | ||
18401 | |||
18402 | // SetKey sets the Key field's value. | ||
18403 | func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput { | ||
18404 | s.Key = &v | ||
18405 | return s | ||
18406 | } | ||
18407 | |||
18408 | // SetPartNumber sets the PartNumber field's value. | ||
18409 | func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput { | ||
18410 | s.PartNumber = &v | ||
18411 | return s | ||
18412 | } | ||
18413 | |||
18414 | // SetRequestPayer sets the RequestPayer field's value. | ||
18415 | func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput { | ||
18416 | s.RequestPayer = &v | ||
18417 | return s | ||
18418 | } | ||
18419 | |||
18420 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
18421 | func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput { | ||
18422 | s.SSECustomerAlgorithm = &v | ||
18423 | return s | ||
18424 | } | ||
18425 | |||
18426 | // SetSSECustomerKey sets the SSECustomerKey field's value. | ||
18427 | func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput { | ||
18428 | s.SSECustomerKey = &v | ||
18429 | return s | ||
18430 | } | ||
18431 | |||
18432 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
18433 | func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput { | ||
18434 | s.SSECustomerKeyMD5 = &v | ||
18435 | return s | ||
18436 | } | ||
18437 | |||
18438 | // SetUploadId sets the UploadId field's value. | ||
18439 | func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput { | ||
18440 | s.UploadId = &v | ||
18441 | return s | ||
18442 | } | ||
18443 | |||
18444 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyOutput | ||
18445 | type UploadPartCopyOutput struct { | ||
18446 | _ struct{} `type:"structure" payload:"CopyPartResult"` | ||
18447 | |||
18448 | CopyPartResult *CopyPartResult `type:"structure"` | ||
18449 | |||
18450 | // The version of the source object that was copied, if you have enabled versioning | ||
18451 | // on the source bucket. | ||
18452 | CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"` | ||
18453 | |||
18454 | // If present, indicates that the requester was successfully charged for the | ||
18455 | // request. | ||
18456 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
18457 | |||
18458 | // If server-side encryption with a customer-provided encryption key was requested, | ||
18459 | // the response will include this header confirming the encryption algorithm | ||
18460 | // used. | ||
18461 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
18462 | |||
18463 | // If server-side encryption with a customer-provided encryption key was requested, | ||
18464 | // the response will include this header to provide round trip message integrity | ||
18465 | // verification of the customer-provided encryption key. | ||
18466 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
18467 | |||
18468 | // If present, specifies the ID of the AWS Key Management Service (KMS) master | ||
18469 | // encryption key that was used for the object. | ||
18470 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
18471 | |||
18472 | // The Server-side encryption algorithm used when storing this object in S3 | ||
18473 | // (e.g., AES256, aws:kms). | ||
18474 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
18475 | } | ||
18476 | |||
18477 | // String returns the string representation | ||
18478 | func (s UploadPartCopyOutput) String() string { | ||
18479 | return awsutil.Prettify(s) | ||
18480 | } | ||
18481 | |||
18482 | // GoString returns the string representation | ||
18483 | func (s UploadPartCopyOutput) GoString() string { | ||
18484 | return s.String() | ||
18485 | } | ||
18486 | |||
18487 | // SetCopyPartResult sets the CopyPartResult field's value. | ||
18488 | func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput { | ||
18489 | s.CopyPartResult = v | ||
18490 | return s | ||
18491 | } | ||
18492 | |||
18493 | // SetCopySourceVersionId sets the CopySourceVersionId field's value. | ||
18494 | func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput { | ||
18495 | s.CopySourceVersionId = &v | ||
18496 | return s | ||
18497 | } | ||
18498 | |||
18499 | // SetRequestCharged sets the RequestCharged field's value. | ||
18500 | func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput { | ||
18501 | s.RequestCharged = &v | ||
18502 | return s | ||
18503 | } | ||
18504 | |||
18505 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
18506 | func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput { | ||
18507 | s.SSECustomerAlgorithm = &v | ||
18508 | return s | ||
18509 | } | ||
18510 | |||
18511 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
18512 | func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput { | ||
18513 | s.SSECustomerKeyMD5 = &v | ||
18514 | return s | ||
18515 | } | ||
18516 | |||
18517 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
18518 | func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput { | ||
18519 | s.SSEKMSKeyId = &v | ||
18520 | return s | ||
18521 | } | ||
18522 | |||
18523 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
18524 | func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput { | ||
18525 | s.ServerSideEncryption = &v | ||
18526 | return s | ||
18527 | } | ||
18528 | |||
18529 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartRequest | ||
18530 | type UploadPartInput struct { | ||
18531 | _ struct{} `type:"structure" payload:"Body"` | ||
18532 | |||
18533 | // Object data. | ||
18534 | Body io.ReadSeeker `type:"blob"` | ||
18535 | |||
18536 | // Name of the bucket to which the multipart upload was initiated. | ||
18537 | // | ||
18538 | // Bucket is a required field | ||
18539 | Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` | ||
18540 | |||
18541 | // Size of the body in bytes. This parameter is useful when the size of the | ||
18542 | // body cannot be determined automatically. | ||
18543 | ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` | ||
18544 | |||
18545 | // Object key for which the multipart upload was initiated. | ||
18546 | // | ||
18547 | // Key is a required field | ||
18548 | Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` | ||
18549 | |||
18550 | // Part number of part being uploaded. This is a positive integer between 1 | ||
18551 | // and 10,000. | ||
18552 | // | ||
18553 | // PartNumber is a required field | ||
18554 | PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"` | ||
18555 | |||
18556 | // Confirms that the requester knows that she or he will be charged for the | ||
18557 | // request. Bucket owners need not specify this parameter in their requests. | ||
18558 | // Documentation on downloading objects from requester pays buckets can be found | ||
18559 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
18560 | RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` | ||
18561 | |||
18562 | // Specifies the algorithm to use to when encrypting the object (e.g., AES256). | ||
18563 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
18564 | |||
18565 | // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting | ||
18566 | // data. This value is used to store the object and then it is discarded; Amazon | ||
18567 | // does not store the encryption key. The key must be appropriate for use with | ||
18568 | // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm | ||
18569 | // header. This must be the same encryption key specified in the initiate multipart | ||
18570 | // upload request. | ||
18571 | SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` | ||
18572 | |||
18573 | // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | ||
18574 | // Amazon S3 uses this header for a message integrity check to ensure the encryption | ||
18575 | // key was transmitted without error. | ||
18576 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
18577 | |||
18578 | // Upload ID identifying the multipart upload whose part is being uploaded. | ||
18579 | // | ||
18580 | // UploadId is a required field | ||
18581 | UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"` | ||
18582 | } | ||
18583 | |||
18584 | // String returns the string representation | ||
18585 | func (s UploadPartInput) String() string { | ||
18586 | return awsutil.Prettify(s) | ||
18587 | } | ||
18588 | |||
18589 | // GoString returns the string representation | ||
18590 | func (s UploadPartInput) GoString() string { | ||
18591 | return s.String() | ||
18592 | } | ||
18593 | |||
18594 | // Validate inspects the fields of the type to determine if they are valid. | ||
18595 | func (s *UploadPartInput) Validate() error { | ||
18596 | invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"} | ||
18597 | if s.Bucket == nil { | ||
18598 | invalidParams.Add(request.NewErrParamRequired("Bucket")) | ||
18599 | } | ||
18600 | if s.Key == nil { | ||
18601 | invalidParams.Add(request.NewErrParamRequired("Key")) | ||
18602 | } | ||
18603 | if s.Key != nil && len(*s.Key) < 1 { | ||
18604 | invalidParams.Add(request.NewErrParamMinLen("Key", 1)) | ||
18605 | } | ||
18606 | if s.PartNumber == nil { | ||
18607 | invalidParams.Add(request.NewErrParamRequired("PartNumber")) | ||
18608 | } | ||
18609 | if s.UploadId == nil { | ||
18610 | invalidParams.Add(request.NewErrParamRequired("UploadId")) | ||
18611 | } | ||
18612 | |||
18613 | if invalidParams.Len() > 0 { | ||
18614 | return invalidParams | ||
18615 | } | ||
18616 | return nil | ||
18617 | } | ||
18618 | |||
18619 | // SetBody sets the Body field's value. | ||
18620 | func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput { | ||
18621 | s.Body = v | ||
18622 | return s | ||
18623 | } | ||
18624 | |||
18625 | // SetBucket sets the Bucket field's value. | ||
18626 | func (s *UploadPartInput) SetBucket(v string) *UploadPartInput { | ||
18627 | s.Bucket = &v | ||
18628 | return s | ||
18629 | } | ||
18630 | |||
18631 | // SetContentLength sets the ContentLength field's value. | ||
18632 | func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput { | ||
18633 | s.ContentLength = &v | ||
18634 | return s | ||
18635 | } | ||
18636 | |||
18637 | // SetKey sets the Key field's value. | ||
18638 | func (s *UploadPartInput) SetKey(v string) *UploadPartInput { | ||
18639 | s.Key = &v | ||
18640 | return s | ||
18641 | } | ||
18642 | |||
18643 | // SetPartNumber sets the PartNumber field's value. | ||
18644 | func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput { | ||
18645 | s.PartNumber = &v | ||
18646 | return s | ||
18647 | } | ||
18648 | |||
18649 | // SetRequestPayer sets the RequestPayer field's value. | ||
18650 | func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput { | ||
18651 | s.RequestPayer = &v | ||
18652 | return s | ||
18653 | } | ||
18654 | |||
18655 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
18656 | func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput { | ||
18657 | s.SSECustomerAlgorithm = &v | ||
18658 | return s | ||
18659 | } | ||
18660 | |||
18661 | // SetSSECustomerKey sets the SSECustomerKey field's value. | ||
18662 | func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput { | ||
18663 | s.SSECustomerKey = &v | ||
18664 | return s | ||
18665 | } | ||
18666 | |||
18667 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
18668 | func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput { | ||
18669 | s.SSECustomerKeyMD5 = &v | ||
18670 | return s | ||
18671 | } | ||
18672 | |||
18673 | // SetUploadId sets the UploadId field's value. | ||
18674 | func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput { | ||
18675 | s.UploadId = &v | ||
18676 | return s | ||
18677 | } | ||
18678 | |||
18679 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartOutput | ||
18680 | type UploadPartOutput struct { | ||
18681 | _ struct{} `type:"structure"` | ||
18682 | |||
18683 | // Entity tag for the uploaded object. | ||
18684 | ETag *string `location:"header" locationName:"ETag" type:"string"` | ||
18685 | |||
18686 | // If present, indicates that the requester was successfully charged for the | ||
18687 | // request. | ||
18688 | RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` | ||
18689 | |||
18690 | // If server-side encryption with a customer-provided encryption key was requested, | ||
18691 | // the response will include this header confirming the encryption algorithm | ||
18692 | // used. | ||
18693 | SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` | ||
18694 | |||
18695 | // If server-side encryption with a customer-provided encryption key was requested, | ||
18696 | // the response will include this header to provide round trip message integrity | ||
18697 | // verification of the customer-provided encryption key. | ||
18698 | SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` | ||
18699 | |||
18700 | // If present, specifies the ID of the AWS Key Management Service (KMS) master | ||
18701 | // encryption key that was used for the object. | ||
18702 | SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` | ||
18703 | |||
18704 | // The Server-side encryption algorithm used when storing this object in S3 | ||
18705 | // (e.g., AES256, aws:kms). | ||
18706 | ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"` | ||
18707 | } | ||
18708 | |||
18709 | // String returns the string representation | ||
18710 | func (s UploadPartOutput) String() string { | ||
18711 | return awsutil.Prettify(s) | ||
18712 | } | ||
18713 | |||
18714 | // GoString returns the string representation | ||
18715 | func (s UploadPartOutput) GoString() string { | ||
18716 | return s.String() | ||
18717 | } | ||
18718 | |||
18719 | // SetETag sets the ETag field's value. | ||
18720 | func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput { | ||
18721 | s.ETag = &v | ||
18722 | return s | ||
18723 | } | ||
18724 | |||
18725 | // SetRequestCharged sets the RequestCharged field's value. | ||
18726 | func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput { | ||
18727 | s.RequestCharged = &v | ||
18728 | return s | ||
18729 | } | ||
18730 | |||
18731 | // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. | ||
18732 | func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput { | ||
18733 | s.SSECustomerAlgorithm = &v | ||
18734 | return s | ||
18735 | } | ||
18736 | |||
18737 | // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. | ||
18738 | func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput { | ||
18739 | s.SSECustomerKeyMD5 = &v | ||
18740 | return s | ||
18741 | } | ||
18742 | |||
18743 | // SetSSEKMSKeyId sets the SSEKMSKeyId field's value. | ||
18744 | func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput { | ||
18745 | s.SSEKMSKeyId = &v | ||
18746 | return s | ||
18747 | } | ||
18748 | |||
18749 | // SetServerSideEncryption sets the ServerSideEncryption field's value. | ||
18750 | func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput { | ||
18751 | s.ServerSideEncryption = &v | ||
18752 | return s | ||
18753 | } | ||
18754 | |||
18755 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/VersioningConfiguration | ||
18756 | type VersioningConfiguration struct { | ||
18757 | _ struct{} `type:"structure"` | ||
18758 | |||
18759 | // Specifies whether MFA delete is enabled in the bucket versioning configuration. | ||
18760 | // This element is only returned if the bucket has been configured with MFA | ||
18761 | // delete. If the bucket has never been so configured, this element is not returned. | ||
18762 | MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"` | ||
18763 | |||
18764 | // The versioning state of the bucket. | ||
18765 | Status *string `type:"string" enum:"BucketVersioningStatus"` | ||
18766 | } | ||
18767 | |||
18768 | // String returns the string representation | ||
18769 | func (s VersioningConfiguration) String() string { | ||
18770 | return awsutil.Prettify(s) | ||
18771 | } | ||
18772 | |||
18773 | // GoString returns the string representation | ||
18774 | func (s VersioningConfiguration) GoString() string { | ||
18775 | return s.String() | ||
18776 | } | ||
18777 | |||
18778 | // SetMFADelete sets the MFADelete field's value. | ||
18779 | func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration { | ||
18780 | s.MFADelete = &v | ||
18781 | return s | ||
18782 | } | ||
18783 | |||
18784 | // SetStatus sets the Status field's value. | ||
18785 | func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration { | ||
18786 | s.Status = &v | ||
18787 | return s | ||
18788 | } | ||
18789 | |||
18790 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WebsiteConfiguration | ||
18791 | type WebsiteConfiguration struct { | ||
18792 | _ struct{} `type:"structure"` | ||
18793 | |||
18794 | ErrorDocument *ErrorDocument `type:"structure"` | ||
18795 | |||
18796 | IndexDocument *IndexDocument `type:"structure"` | ||
18797 | |||
18798 | RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"` | ||
18799 | |||
18800 | RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"` | ||
18801 | } | ||
18802 | |||
18803 | // String returns the string representation | ||
18804 | func (s WebsiteConfiguration) String() string { | ||
18805 | return awsutil.Prettify(s) | ||
18806 | } | ||
18807 | |||
18808 | // GoString returns the string representation | ||
18809 | func (s WebsiteConfiguration) GoString() string { | ||
18810 | return s.String() | ||
18811 | } | ||
18812 | |||
18813 | // Validate inspects the fields of the type to determine if they are valid. | ||
18814 | func (s *WebsiteConfiguration) Validate() error { | ||
18815 | invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"} | ||
18816 | if s.ErrorDocument != nil { | ||
18817 | if err := s.ErrorDocument.Validate(); err != nil { | ||
18818 | invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams)) | ||
18819 | } | ||
18820 | } | ||
18821 | if s.IndexDocument != nil { | ||
18822 | if err := s.IndexDocument.Validate(); err != nil { | ||
18823 | invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams)) | ||
18824 | } | ||
18825 | } | ||
18826 | if s.RedirectAllRequestsTo != nil { | ||
18827 | if err := s.RedirectAllRequestsTo.Validate(); err != nil { | ||
18828 | invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams)) | ||
18829 | } | ||
18830 | } | ||
18831 | if s.RoutingRules != nil { | ||
18832 | for i, v := range s.RoutingRules { | ||
18833 | if v == nil { | ||
18834 | continue | ||
18835 | } | ||
18836 | if err := v.Validate(); err != nil { | ||
18837 | invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams)) | ||
18838 | } | ||
18839 | } | ||
18840 | } | ||
18841 | |||
18842 | if invalidParams.Len() > 0 { | ||
18843 | return invalidParams | ||
18844 | } | ||
18845 | return nil | ||
18846 | } | ||
18847 | |||
18848 | // SetErrorDocument sets the ErrorDocument field's value. | ||
18849 | func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration { | ||
18850 | s.ErrorDocument = v | ||
18851 | return s | ||
18852 | } | ||
18853 | |||
18854 | // SetIndexDocument sets the IndexDocument field's value. | ||
18855 | func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration { | ||
18856 | s.IndexDocument = v | ||
18857 | return s | ||
18858 | } | ||
18859 | |||
18860 | // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value. | ||
18861 | func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration { | ||
18862 | s.RedirectAllRequestsTo = v | ||
18863 | return s | ||
18864 | } | ||
18865 | |||
18866 | // SetRoutingRules sets the RoutingRules field's value. | ||
18867 | func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration { | ||
18868 | s.RoutingRules = v | ||
18869 | return s | ||
18870 | } | ||
18871 | |||
18872 | const ( | ||
18873 | // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value | ||
18874 | AnalyticsS3ExportFileFormatCsv = "CSV" | ||
18875 | ) | ||
18876 | |||
18877 | const ( | ||
18878 | // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value | ||
18879 | BucketAccelerateStatusEnabled = "Enabled" | ||
18880 | |||
18881 | // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value | ||
18882 | BucketAccelerateStatusSuspended = "Suspended" | ||
18883 | ) | ||
18884 | |||
18885 | const ( | ||
18886 | // BucketCannedACLPrivate is a BucketCannedACL enum value | ||
18887 | BucketCannedACLPrivate = "private" | ||
18888 | |||
18889 | // BucketCannedACLPublicRead is a BucketCannedACL enum value | ||
18890 | BucketCannedACLPublicRead = "public-read" | ||
18891 | |||
18892 | // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value | ||
18893 | BucketCannedACLPublicReadWrite = "public-read-write" | ||
18894 | |||
18895 | // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value | ||
18896 | BucketCannedACLAuthenticatedRead = "authenticated-read" | ||
18897 | ) | ||
18898 | |||
18899 | const ( | ||
18900 | // BucketLocationConstraintEu is a BucketLocationConstraint enum value | ||
18901 | BucketLocationConstraintEu = "EU" | ||
18902 | |||
18903 | // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value | ||
18904 | BucketLocationConstraintEuWest1 = "eu-west-1" | ||
18905 | |||
18906 | // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value | ||
18907 | BucketLocationConstraintUsWest1 = "us-west-1" | ||
18908 | |||
18909 | // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value | ||
18910 | BucketLocationConstraintUsWest2 = "us-west-2" | ||
18911 | |||
18912 | // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value | ||
18913 | BucketLocationConstraintApSouth1 = "ap-south-1" | ||
18914 | |||
18915 | // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value | ||
18916 | BucketLocationConstraintApSoutheast1 = "ap-southeast-1" | ||
18917 | |||
18918 | // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value | ||
18919 | BucketLocationConstraintApSoutheast2 = "ap-southeast-2" | ||
18920 | |||
18921 | // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value | ||
18922 | BucketLocationConstraintApNortheast1 = "ap-northeast-1" | ||
18923 | |||
18924 | // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value | ||
18925 | BucketLocationConstraintSaEast1 = "sa-east-1" | ||
18926 | |||
18927 | // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value | ||
18928 | BucketLocationConstraintCnNorth1 = "cn-north-1" | ||
18929 | |||
18930 | // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value | ||
18931 | BucketLocationConstraintEuCentral1 = "eu-central-1" | ||
18932 | ) | ||
18933 | |||
18934 | const ( | ||
18935 | // BucketLogsPermissionFullControl is a BucketLogsPermission enum value | ||
18936 | BucketLogsPermissionFullControl = "FULL_CONTROL" | ||
18937 | |||
18938 | // BucketLogsPermissionRead is a BucketLogsPermission enum value | ||
18939 | BucketLogsPermissionRead = "READ" | ||
18940 | |||
18941 | // BucketLogsPermissionWrite is a BucketLogsPermission enum value | ||
18942 | BucketLogsPermissionWrite = "WRITE" | ||
18943 | ) | ||
18944 | |||
18945 | const ( | ||
18946 | // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value | ||
18947 | BucketVersioningStatusEnabled = "Enabled" | ||
18948 | |||
18949 | // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value | ||
18950 | BucketVersioningStatusSuspended = "Suspended" | ||
18951 | ) | ||
18952 | |||
18953 | // Requests Amazon S3 to encode the object keys in the response and specifies | ||
18954 | // the encoding method to use. An object key may contain any Unicode character; | ||
18955 | // however, XML 1.0 parser cannot parse some characters, such as characters | ||
18956 | // with an ASCII value from 0 to 10. For characters that are not supported in | ||
18957 | // XML 1.0, you can add this parameter to request that Amazon S3 encode the | ||
18958 | // keys in the response. | ||
18959 | const ( | ||
18960 | // EncodingTypeUrl is a EncodingType enum value | ||
18961 | EncodingTypeUrl = "url" | ||
18962 | ) | ||
18963 | |||
18964 | // Bucket event for which to send notifications. | ||
18965 | const ( | ||
18966 | // EventS3ReducedRedundancyLostObject is a Event enum value | ||
18967 | EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject" | ||
18968 | |||
18969 | // EventS3ObjectCreated is a Event enum value | ||
18970 | EventS3ObjectCreated = "s3:ObjectCreated:*" | ||
18971 | |||
18972 | // EventS3ObjectCreatedPut is a Event enum value | ||
18973 | EventS3ObjectCreatedPut = "s3:ObjectCreated:Put" | ||
18974 | |||
18975 | // EventS3ObjectCreatedPost is a Event enum value | ||
18976 | EventS3ObjectCreatedPost = "s3:ObjectCreated:Post" | ||
18977 | |||
18978 | // EventS3ObjectCreatedCopy is a Event enum value | ||
18979 | EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy" | ||
18980 | |||
18981 | // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value | ||
18982 | EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload" | ||
18983 | |||
18984 | // EventS3ObjectRemoved is a Event enum value | ||
18985 | EventS3ObjectRemoved = "s3:ObjectRemoved:*" | ||
18986 | |||
18987 | // EventS3ObjectRemovedDelete is a Event enum value | ||
18988 | EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete" | ||
18989 | |||
18990 | // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value | ||
18991 | EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated" | ||
18992 | ) | ||
18993 | |||
18994 | const ( | ||
18995 | // ExpirationStatusEnabled is a ExpirationStatus enum value | ||
18996 | ExpirationStatusEnabled = "Enabled" | ||
18997 | |||
18998 | // ExpirationStatusDisabled is a ExpirationStatus enum value | ||
18999 | ExpirationStatusDisabled = "Disabled" | ||
19000 | ) | ||
19001 | |||
19002 | const ( | ||
19003 | // FilterRuleNamePrefix is a FilterRuleName enum value | ||
19004 | FilterRuleNamePrefix = "prefix" | ||
19005 | |||
19006 | // FilterRuleNameSuffix is a FilterRuleName enum value | ||
19007 | FilterRuleNameSuffix = "suffix" | ||
19008 | ) | ||
19009 | |||
19010 | const ( | ||
19011 | // InventoryFormatCsv is a InventoryFormat enum value | ||
19012 | InventoryFormatCsv = "CSV" | ||
19013 | ) | ||
19014 | |||
19015 | const ( | ||
19016 | // InventoryFrequencyDaily is a InventoryFrequency enum value | ||
19017 | InventoryFrequencyDaily = "Daily" | ||
19018 | |||
19019 | // InventoryFrequencyWeekly is a InventoryFrequency enum value | ||
19020 | InventoryFrequencyWeekly = "Weekly" | ||
19021 | ) | ||
19022 | |||
19023 | const ( | ||
19024 | // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value | ||
19025 | InventoryIncludedObjectVersionsAll = "All" | ||
19026 | |||
19027 | // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value | ||
19028 | InventoryIncludedObjectVersionsCurrent = "Current" | ||
19029 | ) | ||
19030 | |||
19031 | const ( | ||
19032 | // InventoryOptionalFieldSize is a InventoryOptionalField enum value | ||
19033 | InventoryOptionalFieldSize = "Size" | ||
19034 | |||
19035 | // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value | ||
19036 | InventoryOptionalFieldLastModifiedDate = "LastModifiedDate" | ||
19037 | |||
19038 | // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value | ||
19039 | InventoryOptionalFieldStorageClass = "StorageClass" | ||
19040 | |||
19041 | // InventoryOptionalFieldEtag is a InventoryOptionalField enum value | ||
19042 | InventoryOptionalFieldEtag = "ETag" | ||
19043 | |||
19044 | // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value | ||
19045 | InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded" | ||
19046 | |||
19047 | // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value | ||
19048 | InventoryOptionalFieldReplicationStatus = "ReplicationStatus" | ||
19049 | ) | ||
19050 | |||
19051 | const ( | ||
19052 | // MFADeleteEnabled is a MFADelete enum value | ||
19053 | MFADeleteEnabled = "Enabled" | ||
19054 | |||
19055 | // MFADeleteDisabled is a MFADelete enum value | ||
19056 | MFADeleteDisabled = "Disabled" | ||
19057 | ) | ||
19058 | |||
19059 | const ( | ||
19060 | // MFADeleteStatusEnabled is a MFADeleteStatus enum value | ||
19061 | MFADeleteStatusEnabled = "Enabled" | ||
19062 | |||
19063 | // MFADeleteStatusDisabled is a MFADeleteStatus enum value | ||
19064 | MFADeleteStatusDisabled = "Disabled" | ||
19065 | ) | ||
19066 | |||
19067 | const ( | ||
19068 | // MetadataDirectiveCopy is a MetadataDirective enum value | ||
19069 | MetadataDirectiveCopy = "COPY" | ||
19070 | |||
19071 | // MetadataDirectiveReplace is a MetadataDirective enum value | ||
19072 | MetadataDirectiveReplace = "REPLACE" | ||
19073 | ) | ||
19074 | |||
19075 | const ( | ||
19076 | // ObjectCannedACLPrivate is a ObjectCannedACL enum value | ||
19077 | ObjectCannedACLPrivate = "private" | ||
19078 | |||
19079 | // ObjectCannedACLPublicRead is a ObjectCannedACL enum value | ||
19080 | ObjectCannedACLPublicRead = "public-read" | ||
19081 | |||
19082 | // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value | ||
19083 | ObjectCannedACLPublicReadWrite = "public-read-write" | ||
19084 | |||
19085 | // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value | ||
19086 | ObjectCannedACLAuthenticatedRead = "authenticated-read" | ||
19087 | |||
19088 | // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value | ||
19089 | ObjectCannedACLAwsExecRead = "aws-exec-read" | ||
19090 | |||
19091 | // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value | ||
19092 | ObjectCannedACLBucketOwnerRead = "bucket-owner-read" | ||
19093 | |||
19094 | // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value | ||
19095 | ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control" | ||
19096 | ) | ||
19097 | |||
19098 | const ( | ||
19099 | // ObjectStorageClassStandard is a ObjectStorageClass enum value | ||
19100 | ObjectStorageClassStandard = "STANDARD" | ||
19101 | |||
19102 | // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value | ||
19103 | ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY" | ||
19104 | |||
19105 | // ObjectStorageClassGlacier is a ObjectStorageClass enum value | ||
19106 | ObjectStorageClassGlacier = "GLACIER" | ||
19107 | ) | ||
19108 | |||
19109 | const ( | ||
19110 | // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value | ||
19111 | ObjectVersionStorageClassStandard = "STANDARD" | ||
19112 | ) | ||
19113 | |||
19114 | const ( | ||
19115 | // PayerRequester is a Payer enum value | ||
19116 | PayerRequester = "Requester" | ||
19117 | |||
19118 | // PayerBucketOwner is a Payer enum value | ||
19119 | PayerBucketOwner = "BucketOwner" | ||
19120 | ) | ||
19121 | |||
19122 | const ( | ||
19123 | // PermissionFullControl is a Permission enum value | ||
19124 | PermissionFullControl = "FULL_CONTROL" | ||
19125 | |||
19126 | // PermissionWrite is a Permission enum value | ||
19127 | PermissionWrite = "WRITE" | ||
19128 | |||
19129 | // PermissionWriteAcp is a Permission enum value | ||
19130 | PermissionWriteAcp = "WRITE_ACP" | ||
19131 | |||
19132 | // PermissionRead is a Permission enum value | ||
19133 | PermissionRead = "READ" | ||
19134 | |||
19135 | // PermissionReadAcp is a Permission enum value | ||
19136 | PermissionReadAcp = "READ_ACP" | ||
19137 | ) | ||
19138 | |||
19139 | const ( | ||
19140 | // ProtocolHttp is a Protocol enum value | ||
19141 | ProtocolHttp = "http" | ||
19142 | |||
19143 | // ProtocolHttps is a Protocol enum value | ||
19144 | ProtocolHttps = "https" | ||
19145 | ) | ||
19146 | |||
19147 | const ( | ||
19148 | // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value | ||
19149 | ReplicationRuleStatusEnabled = "Enabled" | ||
19150 | |||
19151 | // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value | ||
19152 | ReplicationRuleStatusDisabled = "Disabled" | ||
19153 | ) | ||
19154 | |||
19155 | const ( | ||
19156 | // ReplicationStatusComplete is a ReplicationStatus enum value | ||
19157 | ReplicationStatusComplete = "COMPLETE" | ||
19158 | |||
19159 | // ReplicationStatusPending is a ReplicationStatus enum value | ||
19160 | ReplicationStatusPending = "PENDING" | ||
19161 | |||
19162 | // ReplicationStatusFailed is a ReplicationStatus enum value | ||
19163 | ReplicationStatusFailed = "FAILED" | ||
19164 | |||
19165 | // ReplicationStatusReplica is a ReplicationStatus enum value | ||
19166 | ReplicationStatusReplica = "REPLICA" | ||
19167 | ) | ||
19168 | |||
19169 | // If present, indicates that the requester was successfully charged for the | ||
19170 | // request. | ||
19171 | const ( | ||
19172 | // RequestChargedRequester is a RequestCharged enum value | ||
19173 | RequestChargedRequester = "requester" | ||
19174 | ) | ||
19175 | |||
19176 | // Confirms that the requester knows that she or he will be charged for the | ||
19177 | // request. Bucket owners need not specify this parameter in their requests. | ||
19178 | // Documentation on downloading objects from requester pays buckets can be found | ||
19179 | // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html | ||
19180 | const ( | ||
19181 | // RequestPayerRequester is a RequestPayer enum value | ||
19182 | RequestPayerRequester = "requester" | ||
19183 | ) | ||
19184 | |||
19185 | const ( | ||
19186 | // ServerSideEncryptionAes256 is a ServerSideEncryption enum value | ||
19187 | ServerSideEncryptionAes256 = "AES256" | ||
19188 | |||
19189 | // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value | ||
19190 | ServerSideEncryptionAwsKms = "aws:kms" | ||
19191 | ) | ||
19192 | |||
19193 | const ( | ||
19194 | // StorageClassStandard is a StorageClass enum value | ||
19195 | StorageClassStandard = "STANDARD" | ||
19196 | |||
19197 | // StorageClassReducedRedundancy is a StorageClass enum value | ||
19198 | StorageClassReducedRedundancy = "REDUCED_REDUNDANCY" | ||
19199 | |||
19200 | // StorageClassStandardIa is a StorageClass enum value | ||
19201 | StorageClassStandardIa = "STANDARD_IA" | ||
19202 | ) | ||
19203 | |||
19204 | const ( | ||
19205 | // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value | ||
19206 | StorageClassAnalysisSchemaVersionV1 = "V_1" | ||
19207 | ) | ||
19208 | |||
19209 | const ( | ||
19210 | // TaggingDirectiveCopy is a TaggingDirective enum value | ||
19211 | TaggingDirectiveCopy = "COPY" | ||
19212 | |||
19213 | // TaggingDirectiveReplace is a TaggingDirective enum value | ||
19214 | TaggingDirectiveReplace = "REPLACE" | ||
19215 | ) | ||
19216 | |||
19217 | const ( | ||
19218 | // TierStandard is a Tier enum value | ||
19219 | TierStandard = "Standard" | ||
19220 | |||
19221 | // TierBulk is a Tier enum value | ||
19222 | TierBulk = "Bulk" | ||
19223 | |||
19224 | // TierExpedited is a Tier enum value | ||
19225 | TierExpedited = "Expedited" | ||
19226 | ) | ||
19227 | |||
19228 | const ( | ||
19229 | // TransitionStorageClassGlacier is a TransitionStorageClass enum value | ||
19230 | TransitionStorageClassGlacier = "GLACIER" | ||
19231 | |||
19232 | // TransitionStorageClassStandardIa is a TransitionStorageClass enum value | ||
19233 | TransitionStorageClassStandardIa = "STANDARD_IA" | ||
19234 | ) | ||
19235 | |||
19236 | const ( | ||
19237 | // TypeCanonicalUser is a Type enum value | ||
19238 | TypeCanonicalUser = "CanonicalUser" | ||
19239 | |||
19240 | // TypeAmazonCustomerByEmail is a Type enum value | ||
19241 | TypeAmazonCustomerByEmail = "AmazonCustomerByEmail" | ||
19242 | |||
19243 | // TypeGroup is a Type enum value | ||
19244 | TypeGroup = "Group" | ||
19245 | ) | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go b/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go new file mode 100644 index 0000000..bc68a46 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go | |||
@@ -0,0 +1,106 @@ | |||
1 | package s3 | ||
2 | |||
3 | import ( | ||
4 | "io/ioutil" | ||
5 | "regexp" | ||
6 | |||
7 | "github.com/aws/aws-sdk-go/aws" | ||
8 | "github.com/aws/aws-sdk-go/aws/awserr" | ||
9 | "github.com/aws/aws-sdk-go/aws/awsutil" | ||
10 | "github.com/aws/aws-sdk-go/aws/request" | ||
11 | ) | ||
12 | |||
13 | var reBucketLocation = regexp.MustCompile(`>([^<>]+)<\/Location`) | ||
14 | |||
15 | // NormalizeBucketLocation is a utility function which will update the | ||
16 | // passed in value to always be a region ID. Generally this would be used | ||
17 | // with GetBucketLocation API operation. | ||
18 | // | ||
19 | // Replaces empty string with "us-east-1", and "EU" with "eu-west-1". | ||
20 | // | ||
21 | // See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html | ||
22 | // for more information on the values that can be returned. | ||
23 | func NormalizeBucketLocation(loc string) string { | ||
24 | switch loc { | ||
25 | case "": | ||
26 | loc = "us-east-1" | ||
27 | case "EU": | ||
28 | loc = "eu-west-1" | ||
29 | } | ||
30 | |||
31 | return loc | ||
32 | } | ||
33 | |||
34 | // NormalizeBucketLocationHandler is a request handler which will update the | ||
35 | // GetBucketLocation's result LocationConstraint value to always be a region ID. | ||
36 | // | ||
37 | // Replaces empty string with "us-east-1", and "EU" with "eu-west-1". | ||
38 | // | ||
39 | // See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html | ||
40 | // for more information on the values that can be returned. | ||
41 | // | ||
42 | // req, result := svc.GetBucketLocationRequest(&s3.GetBucketLocationInput{ | ||
43 | // Bucket: aws.String(bucket), | ||
44 | // }) | ||
45 | // req.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler) | ||
46 | // err := req.Send() | ||
47 | var NormalizeBucketLocationHandler = request.NamedHandler{ | ||
48 | Name: "awssdk.s3.NormalizeBucketLocation", | ||
49 | Fn: func(req *request.Request) { | ||
50 | if req.Error != nil { | ||
51 | return | ||
52 | } | ||
53 | |||
54 | out := req.Data.(*GetBucketLocationOutput) | ||
55 | loc := NormalizeBucketLocation(aws.StringValue(out.LocationConstraint)) | ||
56 | out.LocationConstraint = aws.String(loc) | ||
57 | }, | ||
58 | } | ||
59 | |||
60 | // WithNormalizeBucketLocation is a request option which will update the | ||
61 | // GetBucketLocation's result LocationConstraint value to always be a region ID. | ||
62 | // | ||
63 | // Replaces empty string with "us-east-1", and "EU" with "eu-west-1". | ||
64 | // | ||
65 | // See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html | ||
66 | // for more information on the values that can be returned. | ||
67 | // | ||
68 | // result, err := svc.GetBucketLocationWithContext(ctx, | ||
69 | // &s3.GetBucketLocationInput{ | ||
70 | // Bucket: aws.String(bucket), | ||
71 | // }, | ||
72 | // s3.WithNormalizeBucketLocation, | ||
73 | // ) | ||
74 | func WithNormalizeBucketLocation(r *request.Request) { | ||
75 | r.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler) | ||
76 | } | ||
77 | |||
78 | func buildGetBucketLocation(r *request.Request) { | ||
79 | if r.DataFilled() { | ||
80 | out := r.Data.(*GetBucketLocationOutput) | ||
81 | b, err := ioutil.ReadAll(r.HTTPResponse.Body) | ||
82 | if err != nil { | ||
83 | r.Error = awserr.New("SerializationError", "failed reading response body", err) | ||
84 | return | ||
85 | } | ||
86 | |||
87 | match := reBucketLocation.FindSubmatch(b) | ||
88 | if len(match) > 1 { | ||
89 | loc := string(match[1]) | ||
90 | out.LocationConstraint = aws.String(loc) | ||
91 | } | ||
92 | } | ||
93 | } | ||
94 | |||
95 | func populateLocationConstraint(r *request.Request) { | ||
96 | if r.ParamsFilled() && aws.StringValue(r.Config.Region) != "us-east-1" { | ||
97 | in := r.Params.(*CreateBucketInput) | ||
98 | if in.CreateBucketConfiguration == nil { | ||
99 | r.Params = awsutil.CopyOf(r.Params) | ||
100 | in = r.Params.(*CreateBucketInput) | ||
101 | in.CreateBucketConfiguration = &CreateBucketConfiguration{ | ||
102 | LocationConstraint: r.Config.Region, | ||
103 | } | ||
104 | } | ||
105 | } | ||
106 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/content_md5.go b/vendor/github.com/aws/aws-sdk-go/service/s3/content_md5.go new file mode 100644 index 0000000..9fc5df9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/content_md5.go | |||
@@ -0,0 +1,36 @@ | |||
1 | package s3 | ||
2 | |||
3 | import ( | ||
4 | "crypto/md5" | ||
5 | "encoding/base64" | ||
6 | "io" | ||
7 | |||
8 | "github.com/aws/aws-sdk-go/aws/awserr" | ||
9 | "github.com/aws/aws-sdk-go/aws/request" | ||
10 | ) | ||
11 | |||
12 | // contentMD5 computes and sets the HTTP Content-MD5 header for requests that | ||
13 | // require it. | ||
14 | func contentMD5(r *request.Request) { | ||
15 | h := md5.New() | ||
16 | |||
17 | // hash the body. seek back to the first position after reading to reset | ||
18 | // the body for transmission. copy errors may be assumed to be from the | ||
19 | // body. | ||
20 | _, err := io.Copy(h, r.Body) | ||
21 | if err != nil { | ||
22 | r.Error = awserr.New("ContentMD5", "failed to read body", err) | ||
23 | return | ||
24 | } | ||
25 | _, err = r.Body.Seek(0, 0) | ||
26 | if err != nil { | ||
27 | r.Error = awserr.New("ContentMD5", "failed to seek body", err) | ||
28 | return | ||
29 | } | ||
30 | |||
31 | // encode the md5 checksum in base64 and set the request header. | ||
32 | sum := h.Sum(nil) | ||
33 | sum64 := make([]byte, base64.StdEncoding.EncodedLen(len(sum))) | ||
34 | base64.StdEncoding.Encode(sum64, sum) | ||
35 | r.HTTPRequest.Header.Set("Content-MD5", string(sum64)) | ||
36 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go new file mode 100644 index 0000000..8463347 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go | |||
@@ -0,0 +1,46 @@ | |||
1 | package s3 | ||
2 | |||
3 | import ( | ||
4 | "github.com/aws/aws-sdk-go/aws/client" | ||
5 | "github.com/aws/aws-sdk-go/aws/request" | ||
6 | ) | ||
7 | |||
8 | func init() { | ||
9 | initClient = defaultInitClientFn | ||
10 | initRequest = defaultInitRequestFn | ||
11 | } | ||
12 | |||
13 | func defaultInitClientFn(c *client.Client) { | ||
14 | // Support building custom endpoints based on config | ||
15 | c.Handlers.Build.PushFront(updateEndpointForS3Config) | ||
16 | |||
17 | // Require SSL when using SSE keys | ||
18 | c.Handlers.Validate.PushBack(validateSSERequiresSSL) | ||
19 | c.Handlers.Build.PushBack(computeSSEKeys) | ||
20 | |||
21 | // S3 uses custom error unmarshaling logic | ||
22 | c.Handlers.UnmarshalError.Clear() | ||
23 | c.Handlers.UnmarshalError.PushBack(unmarshalError) | ||
24 | } | ||
25 | |||
26 | func defaultInitRequestFn(r *request.Request) { | ||
27 | // Add reuest handlers for specific platforms. | ||
28 | // e.g. 100-continue support for PUT requests using Go 1.6 | ||
29 | platformRequestHandlers(r) | ||
30 | |||
31 | switch r.Operation.Name { | ||
32 | case opPutBucketCors, opPutBucketLifecycle, opPutBucketPolicy, | ||
33 | opPutBucketTagging, opDeleteObjects, opPutBucketLifecycleConfiguration, | ||
34 | opPutBucketReplication: | ||
35 | // These S3 operations require Content-MD5 to be set | ||
36 | r.Handlers.Build.PushBack(contentMD5) | ||
37 | case opGetBucketLocation: | ||
38 | // GetBucketLocation has custom parsing logic | ||
39 | r.Handlers.Unmarshal.PushFront(buildGetBucketLocation) | ||
40 | case opCreateBucket: | ||
41 | // Auto-populate LocationConstraint with current region | ||
42 | r.Handlers.Validate.PushFront(populateLocationConstraint) | ||
43 | case opCopyObject, opUploadPartCopy, opCompleteMultipartUpload: | ||
44 | r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarhsalError) | ||
45 | } | ||
46 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go new file mode 100644 index 0000000..f045fd0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go | |||
@@ -0,0 +1,78 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | // Package s3 provides the client and types for making API | ||
4 | // requests to Amazon Simple Storage Service. | ||
5 | // | ||
6 | // See https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01 for more information on this service. | ||
7 | // | ||
8 | // See s3 package documentation for more information. | ||
9 | // https://docs.aws.amazon.com/sdk-for-go/api/service/s3/ | ||
10 | // | ||
11 | // Using the Client | ||
12 | // | ||
13 | // To use the client for Amazon Simple Storage Service you will first need | ||
14 | // to create a new instance of it. | ||
15 | // | ||
16 | // When creating a client for an AWS service you'll first need to have a Session | ||
17 | // already created. The Session provides configuration that can be shared | ||
18 | // between multiple service clients. Additional configuration can be applied to | ||
19 | // the Session and service's client when they are constructed. The aws package's | ||
20 | // Config type contains several fields such as Region for the AWS Region the | ||
21 | // client should make API requests too. The optional Config value can be provided | ||
22 | // as the variadic argument for Sessions and client creation. | ||
23 | // | ||
24 | // Once the service's client is created you can use it to make API requests the | ||
25 | // AWS service. These clients are safe to use concurrently. | ||
26 | // | ||
27 | // // Create a session to share configuration, and load external configuration. | ||
28 | // sess := session.Must(session.NewSession()) | ||
29 | // | ||
30 | // // Create the service's client with the session. | ||
31 | // svc := s3.New(sess) | ||
32 | // | ||
33 | // See the SDK's documentation for more information on how to use service clients. | ||
34 | // https://docs.aws.amazon.com/sdk-for-go/api/ | ||
35 | // | ||
36 | // See aws package's Config type for more information on configuration options. | ||
37 | // https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config | ||
38 | // | ||
39 | // See the Amazon Simple Storage Service client S3 for more | ||
40 | // information on creating the service's client. | ||
41 | // https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New | ||
42 | // | ||
43 | // Once the client is created you can make an API request to the service. | ||
44 | // Each API method takes a input parameter, and returns the service response | ||
45 | // and an error. | ||
46 | // | ||
47 | // The API method will document which error codes the service can be returned | ||
48 | // by the operation if the service models the API operation's errors. These | ||
49 | // errors will also be available as const strings prefixed with "ErrCode". | ||
50 | // | ||
51 | // result, err := svc.AbortMultipartUpload(params) | ||
52 | // if err != nil { | ||
53 | // // Cast err to awserr.Error to handle specific error codes. | ||
54 | // aerr, ok := err.(awserr.Error) | ||
55 | // if ok && aerr.Code() == <error code to check for> { | ||
56 | // // Specific error code handling | ||
57 | // } | ||
58 | // return err | ||
59 | // } | ||
60 | // | ||
61 | // fmt.Println("AbortMultipartUpload result:") | ||
62 | // fmt.Println(result) | ||
63 | // | ||
64 | // Using the Client with Context | ||
65 | // | ||
66 | // The service's client also provides methods to make API requests with a Context | ||
67 | // value. This allows you to control the timeout, and cancellation of pending | ||
68 | // requests. These methods also take request Option as variadic parameter to apply | ||
69 | // additional configuration to the API request. | ||
70 | // | ||
71 | // ctx := context.Background() | ||
72 | // | ||
73 | // result, err := svc.AbortMultipartUploadWithContext(ctx, params) | ||
74 | // | ||
75 | // See the request package documentation for more information on using Context pattern | ||
76 | // with the SDK. | ||
77 | // https://docs.aws.amazon.com/sdk-for-go/api/aws/request/ | ||
78 | package s3 | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go new file mode 100644 index 0000000..b794a63 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go | |||
@@ -0,0 +1,109 @@ | |||
1 | // Upload Managers | ||
2 | // | ||
3 | // The s3manager package's Uploader provides concurrent upload of content to S3 | ||
4 | // by taking advantage of S3's Multipart APIs. The Uploader also supports both | ||
5 | // io.Reader for streaming uploads, and will also take advantage of io.ReadSeeker | ||
6 | // for optimizations if the Body satisfies that type. Once the Uploader instance | ||
7 | // is created you can call Upload concurrently from multiple goroutines safely. | ||
8 | // | ||
9 | // // The session the S3 Uploader will use | ||
10 | // sess := session.Must(session.NewSession()) | ||
11 | // | ||
12 | // // Create an uploader with the session and default options | ||
13 | // uploader := s3manager.NewUploader(sess) | ||
14 | // | ||
15 | // f, err := os.Open(filename) | ||
16 | // if err != nil { | ||
17 | // return fmt.Errorf("failed to open file %q, %v", filename, err) | ||
18 | // } | ||
19 | // | ||
20 | // // Upload the file to S3. | ||
21 | // result, err := uploader.Upload(&s3manager.UploadInput{ | ||
22 | // Bucket: aws.String(myBucket), | ||
23 | // Key: aws.String(myString), | ||
24 | // Body: f, | ||
25 | // }) | ||
26 | // if err != nil { | ||
27 | // return fmt.Errorf("failed to upload file, %v", err) | ||
28 | // } | ||
29 | // fmt.Printf("file uploaded to, %s\n", aws.StringValue(result.Location)) | ||
30 | // | ||
31 | // See the s3manager package's Uploader type documentation for more information. | ||
32 | // https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Uploader | ||
33 | // | ||
34 | // Download Manager | ||
35 | // | ||
36 | // The s3manager package's Downloader provides concurrently downloading of Objects | ||
37 | // from S3. The Downloader will write S3 Object content with an io.WriterAt. | ||
38 | // Once the Downloader instance is created you can call Upload concurrently from | ||
39 | // multiple goroutines safely. | ||
40 | // | ||
41 | // // The session the S3 Downloader will use | ||
42 | // sess := session.Must(session.NewSession()) | ||
43 | // | ||
44 | // // Create a downloader with the session and default options | ||
45 | // downloader := s3manager.NewDownloader(sess) | ||
46 | // | ||
47 | // // Create a file to write the S3 Object contents to. | ||
48 | // f, err := os.Create(filename) | ||
49 | // if err != nil { | ||
50 | // return fmt.Errorf("failed to create file %q, %v", filename, err) | ||
51 | // } | ||
52 | // | ||
53 | // // Write the contents of S3 Object to the file | ||
54 | // n, err := downloader.Download(f, &s3.GetObjectInput{ | ||
55 | // Bucket: aws.String(myBucket), | ||
56 | // Key: aws.String(myString), | ||
57 | // }) | ||
58 | // if err != nil { | ||
59 | // return fmt.Errorf("failed to upload file, %v", err) | ||
60 | // } | ||
61 | // fmt.Printf("file downloaded, %d bytes\n", n) | ||
62 | // | ||
63 | // See the s3manager package's Downloader type documentation for more information. | ||
64 | // https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Downloader | ||
65 | // | ||
66 | // Get Bucket Region | ||
67 | // | ||
68 | // GetBucketRegion will attempt to get the region for a bucket using a region | ||
69 | // hint to determine which AWS partition to perform the query on. Use this utility | ||
70 | // to determine the region a bucket is in. | ||
71 | // | ||
72 | // sess := session.Must(session.NewSession()) | ||
73 | // | ||
74 | // bucket := "my-bucket" | ||
75 | // region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2") | ||
76 | // if err != nil { | ||
77 | // if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" { | ||
78 | // fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket) | ||
79 | // } | ||
80 | // return err | ||
81 | // } | ||
82 | // fmt.Printf("Bucket %s is in %s region\n", bucket, region) | ||
83 | // | ||
84 | // See the s3manager package's GetBucketRegion function documentation for more information | ||
85 | // https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#GetBucketRegion | ||
86 | // | ||
87 | // S3 Crypto Client | ||
88 | // | ||
89 | // The s3crypto package provides the tools to upload and download encrypted | ||
90 | // content from S3. The Encryption and Decryption clients can be used concurrently | ||
91 | // once the client is created. | ||
92 | // | ||
93 | // sess := session.Must(session.NewSession()) | ||
94 | // | ||
95 | // // Create the decryption client. | ||
96 | // svc := s3crypto.NewDecryptionClient(sess) | ||
97 | // | ||
98 | // // The object will be downloaded from S3 and decrypted locally. By metadata | ||
99 | // // about the object's encryption will instruct the decryption client how | ||
100 | // // decrypt the content of the object. By default KMS is used for keys. | ||
101 | // result, err := svc.GetObject(&s3.GetObjectInput { | ||
102 | // Bucket: aws.String(myBucket), | ||
103 | // Key: aws.String(myKey), | ||
104 | // }) | ||
105 | // | ||
106 | // See the s3crypto package documentation for more information. | ||
107 | // https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3crypto/ | ||
108 | // | ||
109 | package s3 | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go new file mode 100644 index 0000000..931cb17 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go | |||
@@ -0,0 +1,48 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | package s3 | ||
4 | |||
5 | const ( | ||
6 | |||
7 | // ErrCodeBucketAlreadyExists for service response error code | ||
8 | // "BucketAlreadyExists". | ||
9 | // | ||
10 | // The requested bucket name is not available. The bucket namespace is shared | ||
11 | // by all users of the system. Please select a different name and try again. | ||
12 | ErrCodeBucketAlreadyExists = "BucketAlreadyExists" | ||
13 | |||
14 | // ErrCodeBucketAlreadyOwnedByYou for service response error code | ||
15 | // "BucketAlreadyOwnedByYou". | ||
16 | ErrCodeBucketAlreadyOwnedByYou = "BucketAlreadyOwnedByYou" | ||
17 | |||
18 | // ErrCodeNoSuchBucket for service response error code | ||
19 | // "NoSuchBucket". | ||
20 | // | ||
21 | // The specified bucket does not exist. | ||
22 | ErrCodeNoSuchBucket = "NoSuchBucket" | ||
23 | |||
24 | // ErrCodeNoSuchKey for service response error code | ||
25 | // "NoSuchKey". | ||
26 | // | ||
27 | // The specified key does not exist. | ||
28 | ErrCodeNoSuchKey = "NoSuchKey" | ||
29 | |||
30 | // ErrCodeNoSuchUpload for service response error code | ||
31 | // "NoSuchUpload". | ||
32 | // | ||
33 | // The specified multipart upload does not exist. | ||
34 | ErrCodeNoSuchUpload = "NoSuchUpload" | ||
35 | |||
36 | // ErrCodeObjectAlreadyInActiveTierError for service response error code | ||
37 | // "ObjectAlreadyInActiveTierError". | ||
38 | // | ||
39 | // This operation is not allowed against this storage tier | ||
40 | ErrCodeObjectAlreadyInActiveTierError = "ObjectAlreadyInActiveTierError" | ||
41 | |||
42 | // ErrCodeObjectNotInActiveTierError for service response error code | ||
43 | // "ObjectNotInActiveTierError". | ||
44 | // | ||
45 | // The source object of the COPY operation is not in the active tier and is | ||
46 | // only stored in Amazon Glacier. | ||
47 | ErrCodeObjectNotInActiveTierError = "ObjectNotInActiveTierError" | ||
48 | ) | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go new file mode 100644 index 0000000..ec3ffe4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go | |||
@@ -0,0 +1,162 @@ | |||
1 | package s3 | ||
2 | |||
3 | import ( | ||
4 | "fmt" | ||
5 | "net/url" | ||
6 | "regexp" | ||
7 | "strings" | ||
8 | |||
9 | "github.com/aws/aws-sdk-go/aws" | ||
10 | "github.com/aws/aws-sdk-go/aws/awserr" | ||
11 | "github.com/aws/aws-sdk-go/aws/awsutil" | ||
12 | "github.com/aws/aws-sdk-go/aws/request" | ||
13 | ) | ||
14 | |||
15 | // an operationBlacklist is a list of operation names that should a | ||
16 | // request handler should not be executed with. | ||
17 | type operationBlacklist []string | ||
18 | |||
19 | // Continue will return true of the Request's operation name is not | ||
20 | // in the blacklist. False otherwise. | ||
21 | func (b operationBlacklist) Continue(r *request.Request) bool { | ||
22 | for i := 0; i < len(b); i++ { | ||
23 | if b[i] == r.Operation.Name { | ||
24 | return false | ||
25 | } | ||
26 | } | ||
27 | return true | ||
28 | } | ||
29 | |||
30 | var accelerateOpBlacklist = operationBlacklist{ | ||
31 | opListBuckets, opCreateBucket, opDeleteBucket, | ||
32 | } | ||
33 | |||
34 | // Request handler to automatically add the bucket name to the endpoint domain | ||
35 | // if possible. This style of bucket is valid for all bucket names which are | ||
36 | // DNS compatible and do not contain "." | ||
37 | func updateEndpointForS3Config(r *request.Request) { | ||
38 | forceHostStyle := aws.BoolValue(r.Config.S3ForcePathStyle) | ||
39 | accelerate := aws.BoolValue(r.Config.S3UseAccelerate) | ||
40 | |||
41 | if accelerate && accelerateOpBlacklist.Continue(r) { | ||
42 | if forceHostStyle { | ||
43 | if r.Config.Logger != nil { | ||
44 | r.Config.Logger.Log("ERROR: aws.Config.S3UseAccelerate is not compatible with aws.Config.S3ForcePathStyle, ignoring S3ForcePathStyle.") | ||
45 | } | ||
46 | } | ||
47 | updateEndpointForAccelerate(r) | ||
48 | } else if !forceHostStyle && r.Operation.Name != opGetBucketLocation { | ||
49 | updateEndpointForHostStyle(r) | ||
50 | } | ||
51 | } | ||
52 | |||
53 | func updateEndpointForHostStyle(r *request.Request) { | ||
54 | bucket, ok := bucketNameFromReqParams(r.Params) | ||
55 | if !ok { | ||
56 | // Ignore operation requests if the bucketname was not provided | ||
57 | // if this is an input validation error the validation handler | ||
58 | // will report it. | ||
59 | return | ||
60 | } | ||
61 | |||
62 | if !hostCompatibleBucketName(r.HTTPRequest.URL, bucket) { | ||
63 | // bucket name must be valid to put into the host | ||
64 | return | ||
65 | } | ||
66 | |||
67 | moveBucketToHost(r.HTTPRequest.URL, bucket) | ||
68 | } | ||
69 | |||
70 | var ( | ||
71 | accelElem = []byte("s3-accelerate.dualstack.") | ||
72 | ) | ||
73 | |||
74 | func updateEndpointForAccelerate(r *request.Request) { | ||
75 | bucket, ok := bucketNameFromReqParams(r.Params) | ||
76 | if !ok { | ||
77 | // Ignore operation requests if the bucketname was not provided | ||
78 | // if this is an input validation error the validation handler | ||
79 | // will report it. | ||
80 | return | ||
81 | } | ||
82 | |||
83 | if !hostCompatibleBucketName(r.HTTPRequest.URL, bucket) { | ||
84 | r.Error = awserr.New("InvalidParameterException", | ||
85 | fmt.Sprintf("bucket name %s is not compatible with S3 Accelerate", bucket), | ||
86 | nil) | ||
87 | return | ||
88 | } | ||
89 | |||
90 | parts := strings.Split(r.HTTPRequest.URL.Host, ".") | ||
91 | if len(parts) < 3 { | ||
92 | r.Error = awserr.New("InvalidParameterExecption", | ||
93 | fmt.Sprintf("unable to update endpoint host for S3 accelerate, hostname invalid, %s", | ||
94 | r.HTTPRequest.URL.Host), nil) | ||
95 | return | ||
96 | } | ||
97 | |||
98 | if parts[0] == "s3" || strings.HasPrefix(parts[0], "s3-") { | ||
99 | parts[0] = "s3-accelerate" | ||
100 | } | ||
101 | for i := 1; i+1 < len(parts); i++ { | ||
102 | if parts[i] == aws.StringValue(r.Config.Region) { | ||
103 | parts = append(parts[:i], parts[i+1:]...) | ||
104 | break | ||
105 | } | ||
106 | } | ||
107 | |||
108 | r.HTTPRequest.URL.Host = strings.Join(parts, ".") | ||
109 | |||
110 | moveBucketToHost(r.HTTPRequest.URL, bucket) | ||
111 | } | ||
112 | |||
113 | // Attempts to retrieve the bucket name from the request input parameters. | ||
114 | // If no bucket is found, or the field is empty "", false will be returned. | ||
115 | func bucketNameFromReqParams(params interface{}) (string, bool) { | ||
116 | b, _ := awsutil.ValuesAtPath(params, "Bucket") | ||
117 | if len(b) == 0 { | ||
118 | return "", false | ||
119 | } | ||
120 | |||
121 | if bucket, ok := b[0].(*string); ok { | ||
122 | if bucketStr := aws.StringValue(bucket); bucketStr != "" { | ||
123 | return bucketStr, true | ||
124 | } | ||
125 | } | ||
126 | |||
127 | return "", false | ||
128 | } | ||
129 | |||
130 | // hostCompatibleBucketName returns true if the request should | ||
131 | // put the bucket in the host. This is false if S3ForcePathStyle is | ||
132 | // explicitly set or if the bucket is not DNS compatible. | ||
133 | func hostCompatibleBucketName(u *url.URL, bucket string) bool { | ||
134 | // Bucket might be DNS compatible but dots in the hostname will fail | ||
135 | // certificate validation, so do not use host-style. | ||
136 | if u.Scheme == "https" && strings.Contains(bucket, ".") { | ||
137 | return false | ||
138 | } | ||
139 | |||
140 | // if the bucket is DNS compatible | ||
141 | return dnsCompatibleBucketName(bucket) | ||
142 | } | ||
143 | |||
144 | var reDomain = regexp.MustCompile(`^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$`) | ||
145 | var reIPAddress = regexp.MustCompile(`^(\d+\.){3}\d+$`) | ||
146 | |||
147 | // dnsCompatibleBucketName returns true if the bucket name is DNS compatible. | ||
148 | // Buckets created outside of the classic region MUST be DNS compatible. | ||
149 | func dnsCompatibleBucketName(bucket string) bool { | ||
150 | return reDomain.MatchString(bucket) && | ||
151 | !reIPAddress.MatchString(bucket) && | ||
152 | !strings.Contains(bucket, "..") | ||
153 | } | ||
154 | |||
155 | // moveBucketToHost moves the bucket name from the URI path to URL host. | ||
156 | func moveBucketToHost(u *url.URL, bucket string) { | ||
157 | u.Host = bucket + "." + u.Host | ||
158 | u.Path = strings.Replace(u.Path, "/{Bucket}", "", -1) | ||
159 | if u.Path == "" { | ||
160 | u.Path = "/" | ||
161 | } | ||
162 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go new file mode 100644 index 0000000..8e6f330 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go | |||
@@ -0,0 +1,8 @@ | |||
1 | // +build !go1.6 | ||
2 | |||
3 | package s3 | ||
4 | |||
5 | import "github.com/aws/aws-sdk-go/aws/request" | ||
6 | |||
7 | func platformRequestHandlers(r *request.Request) { | ||
8 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go new file mode 100644 index 0000000..14d05f7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go | |||
@@ -0,0 +1,28 @@ | |||
1 | // +build go1.6 | ||
2 | |||
3 | package s3 | ||
4 | |||
5 | import ( | ||
6 | "github.com/aws/aws-sdk-go/aws" | ||
7 | "github.com/aws/aws-sdk-go/aws/request" | ||
8 | ) | ||
9 | |||
10 | func platformRequestHandlers(r *request.Request) { | ||
11 | if r.Operation.HTTPMethod == "PUT" { | ||
12 | // 100-Continue should only be used on put requests. | ||
13 | r.Handlers.Sign.PushBack(add100Continue) | ||
14 | } | ||
15 | } | ||
16 | |||
17 | func add100Continue(r *request.Request) { | ||
18 | if aws.BoolValue(r.Config.S3Disable100Continue) { | ||
19 | return | ||
20 | } | ||
21 | if r.HTTPRequest.ContentLength < 1024*1024*2 { | ||
22 | // Ignore requests smaller than 2MB. This helps prevent delaying | ||
23 | // requests unnecessarily. | ||
24 | return | ||
25 | } | ||
26 | |||
27 | r.HTTPRequest.Header.Set("Expect", "100-Continue") | ||
28 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go new file mode 100644 index 0000000..614e477 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go | |||
@@ -0,0 +1,93 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | package s3 | ||
4 | |||
5 | import ( | ||
6 | "github.com/aws/aws-sdk-go/aws" | ||
7 | "github.com/aws/aws-sdk-go/aws/client" | ||
8 | "github.com/aws/aws-sdk-go/aws/client/metadata" | ||
9 | "github.com/aws/aws-sdk-go/aws/request" | ||
10 | "github.com/aws/aws-sdk-go/aws/signer/v4" | ||
11 | "github.com/aws/aws-sdk-go/private/protocol/restxml" | ||
12 | ) | ||
13 | |||
14 | // S3 provides the API operation methods for making requests to | ||
15 | // Amazon Simple Storage Service. See this package's package overview docs | ||
16 | // for details on the service. | ||
17 | // | ||
18 | // S3 methods are safe to use concurrently. It is not safe to | ||
19 | // modify mutate any of the struct's properties though. | ||
20 | type S3 struct { | ||
21 | *client.Client | ||
22 | } | ||
23 | |||
24 | // Used for custom client initialization logic | ||
25 | var initClient func(*client.Client) | ||
26 | |||
27 | // Used for custom request initialization logic | ||
28 | var initRequest func(*request.Request) | ||
29 | |||
30 | // Service information constants | ||
31 | const ( | ||
32 | ServiceName = "s3" // Service endpoint prefix API calls made to. | ||
33 | EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. | ||
34 | ) | ||
35 | |||
36 | // New creates a new instance of the S3 client with a session. | ||
37 | // If additional configuration is needed for the client instance use the optional | ||
38 | // aws.Config parameter to add your extra config. | ||
39 | // | ||
40 | // Example: | ||
41 | // // Create a S3 client from just a session. | ||
42 | // svc := s3.New(mySession) | ||
43 | // | ||
44 | // // Create a S3 client with additional configuration | ||
45 | // svc := s3.New(mySession, aws.NewConfig().WithRegion("us-west-2")) | ||
46 | func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3 { | ||
47 | c := p.ClientConfig(EndpointsID, cfgs...) | ||
48 | return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) | ||
49 | } | ||
50 | |||
51 | // newClient creates, initializes and returns a new service client instance. | ||
52 | func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *S3 { | ||
53 | svc := &S3{ | ||
54 | Client: client.New( | ||
55 | cfg, | ||
56 | metadata.ClientInfo{ | ||
57 | ServiceName: ServiceName, | ||
58 | SigningName: signingName, | ||
59 | SigningRegion: signingRegion, | ||
60 | Endpoint: endpoint, | ||
61 | APIVersion: "2006-03-01", | ||
62 | }, | ||
63 | handlers, | ||
64 | ), | ||
65 | } | ||
66 | |||
67 | // Handlers | ||
68 | svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) | ||
69 | svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) | ||
70 | svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) | ||
71 | svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) | ||
72 | svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) | ||
73 | |||
74 | // Run custom client initialization if present | ||
75 | if initClient != nil { | ||
76 | initClient(svc.Client) | ||
77 | } | ||
78 | |||
79 | return svc | ||
80 | } | ||
81 | |||
82 | // newRequest creates a new request for a S3 operation and runs any | ||
83 | // custom request initialization. | ||
84 | func (c *S3) newRequest(op *request.Operation, params, data interface{}) *request.Request { | ||
85 | req := c.NewRequest(op, params, data) | ||
86 | |||
87 | // Run custom request initialization if present | ||
88 | if initRequest != nil { | ||
89 | initRequest(req) | ||
90 | } | ||
91 | |||
92 | return req | ||
93 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go new file mode 100644 index 0000000..268ea2f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go | |||
@@ -0,0 +1,44 @@ | |||
1 | package s3 | ||
2 | |||
3 | import ( | ||
4 | "crypto/md5" | ||
5 | "encoding/base64" | ||
6 | |||
7 | "github.com/aws/aws-sdk-go/aws/awserr" | ||
8 | "github.com/aws/aws-sdk-go/aws/awsutil" | ||
9 | "github.com/aws/aws-sdk-go/aws/request" | ||
10 | ) | ||
11 | |||
12 | var errSSERequiresSSL = awserr.New("ConfigError", "cannot send SSE keys over HTTP.", nil) | ||
13 | |||
14 | func validateSSERequiresSSL(r *request.Request) { | ||
15 | if r.HTTPRequest.URL.Scheme != "https" { | ||
16 | p, _ := awsutil.ValuesAtPath(r.Params, "SSECustomerKey||CopySourceSSECustomerKey") | ||
17 | if len(p) > 0 { | ||
18 | r.Error = errSSERequiresSSL | ||
19 | } | ||
20 | } | ||
21 | } | ||
22 | |||
23 | func computeSSEKeys(r *request.Request) { | ||
24 | headers := []string{ | ||
25 | "x-amz-server-side-encryption-customer-key", | ||
26 | "x-amz-copy-source-server-side-encryption-customer-key", | ||
27 | } | ||
28 | |||
29 | for _, h := range headers { | ||
30 | md5h := h + "-md5" | ||
31 | if key := r.HTTPRequest.Header.Get(h); key != "" { | ||
32 | // Base64-encode the value | ||
33 | b64v := base64.StdEncoding.EncodeToString([]byte(key)) | ||
34 | r.HTTPRequest.Header.Set(h, b64v) | ||
35 | |||
36 | // Add MD5 if it wasn't computed | ||
37 | if r.HTTPRequest.Header.Get(md5h) == "" { | ||
38 | sum := md5.Sum([]byte(key)) | ||
39 | b64sum := base64.StdEncoding.EncodeToString(sum[:]) | ||
40 | r.HTTPRequest.Header.Set(md5h, b64sum) | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go new file mode 100644 index 0000000..5a78fd3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go | |||
@@ -0,0 +1,35 @@ | |||
1 | package s3 | ||
2 | |||
3 | import ( | ||
4 | "bytes" | ||
5 | "io/ioutil" | ||
6 | "net/http" | ||
7 | |||
8 | "github.com/aws/aws-sdk-go/aws/awserr" | ||
9 | "github.com/aws/aws-sdk-go/aws/request" | ||
10 | ) | ||
11 | |||
12 | func copyMultipartStatusOKUnmarhsalError(r *request.Request) { | ||
13 | b, err := ioutil.ReadAll(r.HTTPResponse.Body) | ||
14 | if err != nil { | ||
15 | r.Error = awserr.New("SerializationError", "unable to read response body", err) | ||
16 | return | ||
17 | } | ||
18 | body := bytes.NewReader(b) | ||
19 | r.HTTPResponse.Body = ioutil.NopCloser(body) | ||
20 | defer body.Seek(0, 0) | ||
21 | |||
22 | if body.Len() == 0 { | ||
23 | // If there is no body don't attempt to parse the body. | ||
24 | return | ||
25 | } | ||
26 | |||
27 | unmarshalError(r) | ||
28 | if err, ok := r.Error.(awserr.Error); ok && err != nil { | ||
29 | if err.Code() == "SerializationError" { | ||
30 | r.Error = nil | ||
31 | return | ||
32 | } | ||
33 | r.HTTPResponse.StatusCode = http.StatusServiceUnavailable | ||
34 | } | ||
35 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go new file mode 100644 index 0000000..bcca862 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go | |||
@@ -0,0 +1,103 @@ | |||
1 | package s3 | ||
2 | |||
3 | import ( | ||
4 | "encoding/xml" | ||
5 | "fmt" | ||
6 | "io" | ||
7 | "io/ioutil" | ||
8 | "net/http" | ||
9 | "strings" | ||
10 | |||
11 | "github.com/aws/aws-sdk-go/aws" | ||
12 | "github.com/aws/aws-sdk-go/aws/awserr" | ||
13 | "github.com/aws/aws-sdk-go/aws/request" | ||
14 | ) | ||
15 | |||
16 | type xmlErrorResponse struct { | ||
17 | XMLName xml.Name `xml:"Error"` | ||
18 | Code string `xml:"Code"` | ||
19 | Message string `xml:"Message"` | ||
20 | } | ||
21 | |||
22 | func unmarshalError(r *request.Request) { | ||
23 | defer r.HTTPResponse.Body.Close() | ||
24 | defer io.Copy(ioutil.Discard, r.HTTPResponse.Body) | ||
25 | |||
26 | hostID := r.HTTPResponse.Header.Get("X-Amz-Id-2") | ||
27 | |||
28 | // Bucket exists in a different region, and request needs | ||
29 | // to be made to the correct region. | ||
30 | if r.HTTPResponse.StatusCode == http.StatusMovedPermanently { | ||
31 | r.Error = requestFailure{ | ||
32 | RequestFailure: awserr.NewRequestFailure( | ||
33 | awserr.New("BucketRegionError", | ||
34 | fmt.Sprintf("incorrect region, the bucket is not in '%s' region", | ||
35 | aws.StringValue(r.Config.Region)), | ||
36 | nil), | ||
37 | r.HTTPResponse.StatusCode, | ||
38 | r.RequestID, | ||
39 | ), | ||
40 | hostID: hostID, | ||
41 | } | ||
42 | return | ||
43 | } | ||
44 | |||
45 | var errCode, errMsg string | ||
46 | |||
47 | // Attempt to parse error from body if it is known | ||
48 | resp := &xmlErrorResponse{} | ||
49 | err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp) | ||
50 | if err != nil && err != io.EOF { | ||
51 | errCode = "SerializationError" | ||
52 | errMsg = "failed to decode S3 XML error response" | ||
53 | } else { | ||
54 | errCode = resp.Code | ||
55 | errMsg = resp.Message | ||
56 | err = nil | ||
57 | } | ||
58 | |||
59 | // Fallback to status code converted to message if still no error code | ||
60 | if len(errCode) == 0 { | ||
61 | statusText := http.StatusText(r.HTTPResponse.StatusCode) | ||
62 | errCode = strings.Replace(statusText, " ", "", -1) | ||
63 | errMsg = statusText | ||
64 | } | ||
65 | |||
66 | r.Error = requestFailure{ | ||
67 | RequestFailure: awserr.NewRequestFailure( | ||
68 | awserr.New(errCode, errMsg, err), | ||
69 | r.HTTPResponse.StatusCode, | ||
70 | r.RequestID, | ||
71 | ), | ||
72 | hostID: hostID, | ||
73 | } | ||
74 | } | ||
75 | |||
76 | // A RequestFailure provides access to the S3 Request ID and Host ID values | ||
77 | // returned from API operation errors. Getting the error as a string will | ||
78 | // return the formated error with the same information as awserr.RequestFailure, | ||
79 | // while also adding the HostID value from the response. | ||
80 | type RequestFailure interface { | ||
81 | awserr.RequestFailure | ||
82 | |||
83 | // Host ID is the S3 Host ID needed for debug, and contacting support | ||
84 | HostID() string | ||
85 | } | ||
86 | |||
87 | type requestFailure struct { | ||
88 | awserr.RequestFailure | ||
89 | |||
90 | hostID string | ||
91 | } | ||
92 | |||
93 | func (r requestFailure) Error() string { | ||
94 | extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s", | ||
95 | r.StatusCode(), r.RequestID(), r.hostID) | ||
96 | return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr()) | ||
97 | } | ||
98 | func (r requestFailure) String() string { | ||
99 | return r.Error() | ||
100 | } | ||
101 | func (r requestFailure) HostID() string { | ||
102 | return r.hostID | ||
103 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go new file mode 100644 index 0000000..cccfa8c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go | |||
@@ -0,0 +1,214 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | package s3 | ||
4 | |||
5 | import ( | ||
6 | "time" | ||
7 | |||
8 | "github.com/aws/aws-sdk-go/aws" | ||
9 | "github.com/aws/aws-sdk-go/aws/request" | ||
10 | ) | ||
11 | |||
12 | // WaitUntilBucketExists uses the Amazon S3 API operation | ||
13 | // HeadBucket to wait for a condition to be met before returning. | ||
14 | // If the condition is not meet within the max attempt window an error will | ||
15 | // be returned. | ||
16 | func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error { | ||
17 | return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input) | ||
18 | } | ||
19 | |||
20 | // WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists. | ||
21 | // With the support for passing in a context and options to configure the | ||
22 | // Waiter and the underlying request options. | ||
23 | // | ||
24 | // The context must be non-nil and will be used for request cancellation. If | ||
25 | // the context is nil a panic will occur. In the future the SDK may create | ||
26 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
27 | // for more information on using Contexts. | ||
28 | func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error { | ||
29 | w := request.Waiter{ | ||
30 | Name: "WaitUntilBucketExists", | ||
31 | MaxAttempts: 20, | ||
32 | Delay: request.ConstantWaiterDelay(5 * time.Second), | ||
33 | Acceptors: []request.WaiterAcceptor{ | ||
34 | { | ||
35 | State: request.SuccessWaiterState, | ||
36 | Matcher: request.StatusWaiterMatch, | ||
37 | Expected: 200, | ||
38 | }, | ||
39 | { | ||
40 | State: request.SuccessWaiterState, | ||
41 | Matcher: request.StatusWaiterMatch, | ||
42 | Expected: 301, | ||
43 | }, | ||
44 | { | ||
45 | State: request.SuccessWaiterState, | ||
46 | Matcher: request.StatusWaiterMatch, | ||
47 | Expected: 403, | ||
48 | }, | ||
49 | { | ||
50 | State: request.RetryWaiterState, | ||
51 | Matcher: request.StatusWaiterMatch, | ||
52 | Expected: 404, | ||
53 | }, | ||
54 | }, | ||
55 | Logger: c.Config.Logger, | ||
56 | NewRequest: func(opts []request.Option) (*request.Request, error) { | ||
57 | var inCpy *HeadBucketInput | ||
58 | if input != nil { | ||
59 | tmp := *input | ||
60 | inCpy = &tmp | ||
61 | } | ||
62 | req, _ := c.HeadBucketRequest(inCpy) | ||
63 | req.SetContext(ctx) | ||
64 | req.ApplyOptions(opts...) | ||
65 | return req, nil | ||
66 | }, | ||
67 | } | ||
68 | w.ApplyOptions(opts...) | ||
69 | |||
70 | return w.WaitWithContext(ctx) | ||
71 | } | ||
72 | |||
73 | // WaitUntilBucketNotExists uses the Amazon S3 API operation | ||
74 | // HeadBucket to wait for a condition to be met before returning. | ||
75 | // If the condition is not meet within the max attempt window an error will | ||
76 | // be returned. | ||
77 | func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error { | ||
78 | return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input) | ||
79 | } | ||
80 | |||
81 | // WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists. | ||
82 | // With the support for passing in a context and options to configure the | ||
83 | // Waiter and the underlying request options. | ||
84 | // | ||
85 | // The context must be non-nil and will be used for request cancellation. If | ||
86 | // the context is nil a panic will occur. In the future the SDK may create | ||
87 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
88 | // for more information on using Contexts. | ||
89 | func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error { | ||
90 | w := request.Waiter{ | ||
91 | Name: "WaitUntilBucketNotExists", | ||
92 | MaxAttempts: 20, | ||
93 | Delay: request.ConstantWaiterDelay(5 * time.Second), | ||
94 | Acceptors: []request.WaiterAcceptor{ | ||
95 | { | ||
96 | State: request.SuccessWaiterState, | ||
97 | Matcher: request.StatusWaiterMatch, | ||
98 | Expected: 404, | ||
99 | }, | ||
100 | }, | ||
101 | Logger: c.Config.Logger, | ||
102 | NewRequest: func(opts []request.Option) (*request.Request, error) { | ||
103 | var inCpy *HeadBucketInput | ||
104 | if input != nil { | ||
105 | tmp := *input | ||
106 | inCpy = &tmp | ||
107 | } | ||
108 | req, _ := c.HeadBucketRequest(inCpy) | ||
109 | req.SetContext(ctx) | ||
110 | req.ApplyOptions(opts...) | ||
111 | return req, nil | ||
112 | }, | ||
113 | } | ||
114 | w.ApplyOptions(opts...) | ||
115 | |||
116 | return w.WaitWithContext(ctx) | ||
117 | } | ||
118 | |||
119 | // WaitUntilObjectExists uses the Amazon S3 API operation | ||
120 | // HeadObject to wait for a condition to be met before returning. | ||
121 | // If the condition is not meet within the max attempt window an error will | ||
122 | // be returned. | ||
123 | func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error { | ||
124 | return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input) | ||
125 | } | ||
126 | |||
127 | // WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists. | ||
128 | // With the support for passing in a context and options to configure the | ||
129 | // Waiter and the underlying request options. | ||
130 | // | ||
131 | // The context must be non-nil and will be used for request cancellation. If | ||
132 | // the context is nil a panic will occur. In the future the SDK may create | ||
133 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
134 | // for more information on using Contexts. | ||
135 | func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error { | ||
136 | w := request.Waiter{ | ||
137 | Name: "WaitUntilObjectExists", | ||
138 | MaxAttempts: 20, | ||
139 | Delay: request.ConstantWaiterDelay(5 * time.Second), | ||
140 | Acceptors: []request.WaiterAcceptor{ | ||
141 | { | ||
142 | State: request.SuccessWaiterState, | ||
143 | Matcher: request.StatusWaiterMatch, | ||
144 | Expected: 200, | ||
145 | }, | ||
146 | { | ||
147 | State: request.RetryWaiterState, | ||
148 | Matcher: request.StatusWaiterMatch, | ||
149 | Expected: 404, | ||
150 | }, | ||
151 | }, | ||
152 | Logger: c.Config.Logger, | ||
153 | NewRequest: func(opts []request.Option) (*request.Request, error) { | ||
154 | var inCpy *HeadObjectInput | ||
155 | if input != nil { | ||
156 | tmp := *input | ||
157 | inCpy = &tmp | ||
158 | } | ||
159 | req, _ := c.HeadObjectRequest(inCpy) | ||
160 | req.SetContext(ctx) | ||
161 | req.ApplyOptions(opts...) | ||
162 | return req, nil | ||
163 | }, | ||
164 | } | ||
165 | w.ApplyOptions(opts...) | ||
166 | |||
167 | return w.WaitWithContext(ctx) | ||
168 | } | ||
169 | |||
170 | // WaitUntilObjectNotExists uses the Amazon S3 API operation | ||
171 | // HeadObject to wait for a condition to be met before returning. | ||
172 | // If the condition is not meet within the max attempt window an error will | ||
173 | // be returned. | ||
174 | func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error { | ||
175 | return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input) | ||
176 | } | ||
177 | |||
178 | // WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists. | ||
179 | // With the support for passing in a context and options to configure the | ||
180 | // Waiter and the underlying request options. | ||
181 | // | ||
182 | // The context must be non-nil and will be used for request cancellation. If | ||
183 | // the context is nil a panic will occur. In the future the SDK may create | ||
184 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
185 | // for more information on using Contexts. | ||
186 | func (c *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error { | ||
187 | w := request.Waiter{ | ||
188 | Name: "WaitUntilObjectNotExists", | ||
189 | MaxAttempts: 20, | ||
190 | Delay: request.ConstantWaiterDelay(5 * time.Second), | ||
191 | Acceptors: []request.WaiterAcceptor{ | ||
192 | { | ||
193 | State: request.SuccessWaiterState, | ||
194 | Matcher: request.StatusWaiterMatch, | ||
195 | Expected: 404, | ||
196 | }, | ||
197 | }, | ||
198 | Logger: c.Config.Logger, | ||
199 | NewRequest: func(opts []request.Option) (*request.Request, error) { | ||
200 | var inCpy *HeadObjectInput | ||
201 | if input != nil { | ||
202 | tmp := *input | ||
203 | inCpy = &tmp | ||
204 | } | ||
205 | req, _ := c.HeadObjectRequest(inCpy) | ||
206 | req.SetContext(ctx) | ||
207 | req.ApplyOptions(opts...) | ||
208 | return req, nil | ||
209 | }, | ||
210 | } | ||
211 | w.ApplyOptions(opts...) | ||
212 | |||
213 | return w.WaitWithContext(ctx) | ||
214 | } | ||
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 new file mode 100644 index 0000000..2de6528 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go | |||
@@ -0,0 +1,2365 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | package sts | ||
4 | |||
5 | import ( | ||
6 | "time" | ||
7 | |||
8 | "github.com/aws/aws-sdk-go/aws" | ||
9 | "github.com/aws/aws-sdk-go/aws/awsutil" | ||
10 | "github.com/aws/aws-sdk-go/aws/request" | ||
11 | ) | ||
12 | |||
13 | const opAssumeRole = "AssumeRole" | ||
14 | |||
15 | // AssumeRoleRequest generates a "aws/request.Request" representing the | ||
16 | // client's request for the AssumeRole operation. The "output" return | ||
17 | // value can be used to capture response data after the request's "Send" method | ||
18 | // is called. | ||
19 | // | ||
20 | // See AssumeRole for usage and error information. | ||
21 | // | ||
22 | // Creating a request object using this method should be used when you want to inject | ||
23 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
24 | // access properties on the request object before or after sending the request. If | ||
25 | // you just want the service response, call the AssumeRole method directly | ||
26 | // instead. | ||
27 | // | ||
28 | // Note: You must call the "Send" method on the returned request object in order | ||
29 | // to execute the request. | ||
30 | // | ||
31 | // // Example sending a request using the AssumeRoleRequest method. | ||
32 | // req, resp := client.AssumeRoleRequest(params) | ||
33 | // | ||
34 | // err := req.Send() | ||
35 | // if err == nil { // resp is now filled | ||
36 | // fmt.Println(resp) | ||
37 | // } | ||
38 | // | ||
39 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole | ||
40 | func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, output *AssumeRoleOutput) { | ||
41 | op := &request.Operation{ | ||
42 | Name: opAssumeRole, | ||
43 | HTTPMethod: "POST", | ||
44 | HTTPPath: "/", | ||
45 | } | ||
46 | |||
47 | if input == nil { | ||
48 | input = &AssumeRoleInput{} | ||
49 | } | ||
50 | |||
51 | output = &AssumeRoleOutput{} | ||
52 | req = c.newRequest(op, input, output) | ||
53 | return | ||
54 | } | ||
55 | |||
56 | // AssumeRole API operation for AWS Security Token Service. | ||
57 | // | ||
58 | // Returns a set of temporary security credentials (consisting of an access | ||
59 | // key ID, a secret access key, and a security token) that you can use to access | ||
60 | // AWS resources that you might not normally have access to. Typically, you | ||
61 | // use AssumeRole for cross-account access or federation. For a comparison of | ||
62 | // AssumeRole with the other APIs that produce temporary credentials, see Requesting | ||
63 | // Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) | ||
64 | // and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) | ||
65 | // in the IAM User Guide. | ||
66 | // | ||
67 | // Important: You cannot call AssumeRole by using AWS root account credentials; | ||
68 | // access is denied. You must use credentials for an IAM user or an IAM role | ||
69 | // to call AssumeRole. | ||
70 | // | ||
71 | // For cross-account access, imagine that you own multiple accounts and need | ||
72 | // to access resources in each account. You could create long-term credentials | ||
73 | // in each account to access those resources. However, managing all those credentials | ||
74 | // and remembering which one can access which account can be time consuming. | ||
75 | // Instead, you can create one set of long-term credentials in one account and | ||
76 | // then use temporary security credentials to access all the other accounts | ||
77 | // by assuming roles in those accounts. For more information about roles, see | ||
78 | // IAM Roles (Delegation and Federation) (http://docs.aws.amazon.com/IAM/latest/UserGuide/roles-toplevel.html) | ||
79 | // in the IAM User Guide. | ||
80 | // | ||
81 | // For federation, you can, for example, grant single sign-on access to the | ||
82 | // AWS Management Console. If you already have an identity and authentication | ||
83 | // system in your corporate network, you don't have to recreate user identities | ||
84 | // in AWS in order to grant those user identities access to AWS. Instead, after | ||
85 | // a user has been authenticated, you call AssumeRole (and specify the role | ||
86 | // with the appropriate permissions) to get temporary security credentials for | ||
87 | // that user. With those temporary security credentials, you construct a sign-in | ||
88 | // URL that users can use to access the console. For more information, see Common | ||
89 | // Scenarios for Temporary Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html#sts-introduction) | ||
90 | // in the IAM User Guide. | ||
91 | // | ||
92 | // The temporary security credentials are valid for the duration that you specified | ||
93 | // when calling AssumeRole, which can be from 900 seconds (15 minutes) to a | ||
94 | // maximum of 3600 seconds (1 hour). The default is 1 hour. | ||
95 | // | ||
96 | // The temporary security credentials created by AssumeRole can be used to make | ||
97 | // API calls to any AWS service with the following exception: you cannot call | ||
98 | // the STS service's GetFederationToken or GetSessionToken APIs. | ||
99 | // | ||
100 | // Optionally, you can pass an IAM access policy to this operation. If you choose | ||
101 | // not to pass a policy, the temporary security credentials that are returned | ||
102 | // by the operation have the permissions that are defined in the access policy | ||
103 | // of the role that is being assumed. If you pass a policy to this operation, | ||
104 | // the temporary security credentials that are returned by the operation have | ||
105 | // the permissions that are allowed by both the access policy of the role that | ||
106 | // is being assumed, and the policy that you pass. This gives you a way to further | ||
107 | // restrict the permissions for the resulting temporary security credentials. | ||
108 | // You cannot use the passed policy to grant permissions that are in excess | ||
109 | // of those allowed by the access policy of the role that is being assumed. | ||
110 | // For more information, see Permissions for AssumeRole, AssumeRoleWithSAML, | ||
111 | // and AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) | ||
112 | // in the IAM User Guide. | ||
113 | // | ||
114 | // To assume a role, your AWS account must be trusted by the role. The trust | ||
115 | // relationship is defined in the role's trust policy when the role is created. | ||
116 | // That trust policy states which accounts are allowed to delegate access to | ||
117 | // this account's role. | ||
118 | // | ||
119 | // The user who wants to access the role must also have permissions delegated | ||
120 | // from the role's administrator. If the user is in a different account than | ||
121 | // the role, then the user's administrator must attach a policy that allows | ||
122 | // the user to call AssumeRole on the ARN of the role in the other account. | ||
123 | // If the user is in the same account as the role, then you can either attach | ||
124 | // a policy to the user (identical to the previous different account user), | ||
125 | // or you can add the user as a principal directly in the role's trust policy | ||
126 | // | ||
127 | // Using MFA with AssumeRole | ||
128 | // | ||
129 | // You can optionally include multi-factor authentication (MFA) information | ||
130 | // when you call AssumeRole. This is useful for cross-account scenarios in which | ||
131 | // you want to make sure that the user who is assuming the role has been authenticated | ||
132 | // using an AWS MFA device. In that scenario, the trust policy of the role being | ||
133 | // assumed includes a condition that tests for MFA authentication; if the caller | ||
134 | // does not include valid MFA information, the request to assume the role is | ||
135 | // denied. The condition in a trust policy that tests for MFA authentication | ||
136 | // might look like the following example. | ||
137 | // | ||
138 | // "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}} | ||
139 | // | ||
140 | // For more information, see Configuring MFA-Protected API Access (http://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html) | ||
141 | // in the IAM User Guide guide. | ||
142 | // | ||
143 | // To use MFA with AssumeRole, you pass values for the SerialNumber and TokenCode | ||
144 | // parameters. The SerialNumber value identifies the user's hardware or virtual | ||
145 | // MFA device. The TokenCode is the time-based one-time password (TOTP) that | ||
146 | // the MFA devices produces. | ||
147 | // | ||
148 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
149 | // with awserr.Error's Code and Message methods to get detailed information about | ||
150 | // the error. | ||
151 | // | ||
152 | // See the AWS API reference guide for AWS Security Token Service's | ||
153 | // API operation AssumeRole for usage and error information. | ||
154 | // | ||
155 | // Returned Error Codes: | ||
156 | // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" | ||
157 | // The request was rejected because the policy document was malformed. The error | ||
158 | // message describes the specific error. | ||
159 | // | ||
160 | // * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" | ||
161 | // The request was rejected because the policy document was too large. The error | ||
162 | // message describes how big the policy document is, in packed form, as a percentage | ||
163 | // of what the API allows. | ||
164 | // | ||
165 | // * ErrCodeRegionDisabledException "RegionDisabledException" | ||
166 | // STS is not activated in the requested region for the account that is being | ||
167 | // asked to generate credentials. The account administrator must use the IAM | ||
168 | // console to activate STS in that region. For more information, see Activating | ||
169 | // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) | ||
170 | // in the IAM User Guide. | ||
171 | // | ||
172 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole | ||
173 | func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) { | ||
174 | req, out := c.AssumeRoleRequest(input) | ||
175 | return out, req.Send() | ||
176 | } | ||
177 | |||
178 | // AssumeRoleWithContext is the same as AssumeRole with the addition of | ||
179 | // the ability to pass a context and additional request options. | ||
180 | // | ||
181 | // See AssumeRole for details on how to use this API operation. | ||
182 | // | ||
183 | // The context must be non-nil and will be used for request cancellation. If | ||
184 | // the context is nil a panic will occur. In the future the SDK may create | ||
185 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
186 | // for more information on using Contexts. | ||
187 | func (c *STS) AssumeRoleWithContext(ctx aws.Context, input *AssumeRoleInput, opts ...request.Option) (*AssumeRoleOutput, error) { | ||
188 | req, out := c.AssumeRoleRequest(input) | ||
189 | req.SetContext(ctx) | ||
190 | req.ApplyOptions(opts...) | ||
191 | return out, req.Send() | ||
192 | } | ||
193 | |||
194 | const opAssumeRoleWithSAML = "AssumeRoleWithSAML" | ||
195 | |||
196 | // AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the | ||
197 | // client's request for the AssumeRoleWithSAML operation. The "output" return | ||
198 | // value can be used to capture response data after the request's "Send" method | ||
199 | // is called. | ||
200 | // | ||
201 | // See AssumeRoleWithSAML for usage and error information. | ||
202 | // | ||
203 | // Creating a request object using this method should be used when you want to inject | ||
204 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
205 | // access properties on the request object before or after sending the request. If | ||
206 | // you just want the service response, call the AssumeRoleWithSAML method directly | ||
207 | // instead. | ||
208 | // | ||
209 | // Note: You must call the "Send" method on the returned request object in order | ||
210 | // to execute the request. | ||
211 | // | ||
212 | // // Example sending a request using the AssumeRoleWithSAMLRequest method. | ||
213 | // req, resp := client.AssumeRoleWithSAMLRequest(params) | ||
214 | // | ||
215 | // err := req.Send() | ||
216 | // if err == nil { // resp is now filled | ||
217 | // fmt.Println(resp) | ||
218 | // } | ||
219 | // | ||
220 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML | ||
221 | func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *request.Request, output *AssumeRoleWithSAMLOutput) { | ||
222 | op := &request.Operation{ | ||
223 | Name: opAssumeRoleWithSAML, | ||
224 | HTTPMethod: "POST", | ||
225 | HTTPPath: "/", | ||
226 | } | ||
227 | |||
228 | if input == nil { | ||
229 | input = &AssumeRoleWithSAMLInput{} | ||
230 | } | ||
231 | |||
232 | output = &AssumeRoleWithSAMLOutput{} | ||
233 | req = c.newRequest(op, input, output) | ||
234 | return | ||
235 | } | ||
236 | |||
237 | // AssumeRoleWithSAML API operation for AWS Security Token Service. | ||
238 | // | ||
239 | // Returns a set of temporary security credentials for users who have been authenticated | ||
240 | // via a SAML authentication response. This operation provides a mechanism for | ||
241 | // tying an enterprise identity store or directory to role-based AWS access | ||
242 | // without user-specific credentials or configuration. For a comparison of AssumeRoleWithSAML | ||
243 | // with the other APIs that produce temporary credentials, see Requesting Temporary | ||
244 | // Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) | ||
245 | // and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) | ||
246 | // in the IAM User Guide. | ||
247 | // | ||
248 | // The temporary security credentials returned by this operation consist of | ||
249 | // an access key ID, a secret access key, and a security token. Applications | ||
250 | // can use these temporary security credentials to sign calls to AWS services. | ||
251 | // | ||
252 | // The temporary security credentials are valid for the duration that you specified | ||
253 | // when calling AssumeRole, or until the time specified in the SAML authentication | ||
254 | // response's SessionNotOnOrAfter value, whichever is shorter. The duration | ||
255 | // can be from 900 seconds (15 minutes) to a maximum of 3600 seconds (1 hour). | ||
256 | // The default is 1 hour. | ||
257 | // | ||
258 | // The temporary security credentials created by AssumeRoleWithSAML can be used | ||
259 | // to make API calls to any AWS service with the following exception: you cannot | ||
260 | // call the STS service's GetFederationToken or GetSessionToken APIs. | ||
261 | // | ||
262 | // Optionally, you can pass an IAM access policy to this operation. If you choose | ||
263 | // not to pass a policy, the temporary security credentials that are returned | ||
264 | // by the operation have the permissions that are defined in the access policy | ||
265 | // of the role that is being assumed. If you pass a policy to this operation, | ||
266 | // the temporary security credentials that are returned by the operation have | ||
267 | // the permissions that are allowed by the intersection of both the access policy | ||
268 | // of the role that is being assumed, and the policy that you pass. This means | ||
269 | // that both policies must grant the permission for the action to be allowed. | ||
270 | // This gives you a way to further restrict the permissions for the resulting | ||
271 | // temporary security credentials. You cannot use the passed policy to grant | ||
272 | // permissions that are in excess of those allowed by the access policy of the | ||
273 | // role that is being assumed. For more information, see Permissions for AssumeRole, | ||
274 | // AssumeRoleWithSAML, and AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) | ||
275 | // in the IAM User Guide. | ||
276 | // | ||
277 | // Before your application can call AssumeRoleWithSAML, you must configure your | ||
278 | // SAML identity provider (IdP) to issue the claims required by AWS. Additionally, | ||
279 | // you must use AWS Identity and Access Management (IAM) to create a SAML provider | ||
280 | // entity in your AWS account that represents your identity provider, and create | ||
281 | // an IAM role that specifies this SAML provider in its trust policy. | ||
282 | // | ||
283 | // Calling AssumeRoleWithSAML does not require the use of AWS security credentials. | ||
284 | // The identity of the caller is validated by using keys in the metadata document | ||
285 | // that is uploaded for the SAML provider entity for your identity provider. | ||
286 | // | ||
287 | // Calling AssumeRoleWithSAML can result in an entry in your AWS CloudTrail | ||
288 | // logs. The entry includes the value in the NameID element of the SAML assertion. | ||
289 | // We recommend that you use a NameIDType that is not associated with any personally | ||
290 | // identifiable information (PII). For example, you could instead use the Persistent | ||
291 | // Identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent). | ||
292 | // | ||
293 | // For more information, see the following resources: | ||
294 | // | ||
295 | // * About SAML 2.0-based Federation (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html) | ||
296 | // in the IAM User Guide. | ||
297 | // | ||
298 | // * Creating SAML Identity Providers (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html) | ||
299 | // in the IAM User Guide. | ||
300 | // | ||
301 | // * Configuring a Relying Party and Claims (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html) | ||
302 | // in the IAM User Guide. | ||
303 | // | ||
304 | // * Creating a Role for SAML 2.0 Federation (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html) | ||
305 | // in the IAM User Guide. | ||
306 | // | ||
307 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
308 | // with awserr.Error's Code and Message methods to get detailed information about | ||
309 | // the error. | ||
310 | // | ||
311 | // See the AWS API reference guide for AWS Security Token Service's | ||
312 | // API operation AssumeRoleWithSAML for usage and error information. | ||
313 | // | ||
314 | // Returned Error Codes: | ||
315 | // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" | ||
316 | // The request was rejected because the policy document was malformed. The error | ||
317 | // message describes the specific error. | ||
318 | // | ||
319 | // * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" | ||
320 | // The request was rejected because the policy document was too large. The error | ||
321 | // message describes how big the policy document is, in packed form, as a percentage | ||
322 | // of what the API allows. | ||
323 | // | ||
324 | // * ErrCodeIDPRejectedClaimException "IDPRejectedClaim" | ||
325 | // The identity provider (IdP) reported that authentication failed. This might | ||
326 | // be because the claim is invalid. | ||
327 | // | ||
328 | // If this error is returned for the AssumeRoleWithWebIdentity operation, it | ||
329 | // can also mean that the claim has expired or has been explicitly revoked. | ||
330 | // | ||
331 | // * ErrCodeInvalidIdentityTokenException "InvalidIdentityToken" | ||
332 | // The web identity token that was passed could not be validated by AWS. Get | ||
333 | // a new identity token from the identity provider and then retry the request. | ||
334 | // | ||
335 | // * ErrCodeExpiredTokenException "ExpiredTokenException" | ||
336 | // The web identity token that was passed is expired or is not valid. Get a | ||
337 | // new identity token from the identity provider and then retry the request. | ||
338 | // | ||
339 | // * ErrCodeRegionDisabledException "RegionDisabledException" | ||
340 | // STS is not activated in the requested region for the account that is being | ||
341 | // asked to generate credentials. The account administrator must use the IAM | ||
342 | // console to activate STS in that region. For more information, see Activating | ||
343 | // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) | ||
344 | // in the IAM User Guide. | ||
345 | // | ||
346 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML | ||
347 | func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) { | ||
348 | req, out := c.AssumeRoleWithSAMLRequest(input) | ||
349 | return out, req.Send() | ||
350 | } | ||
351 | |||
352 | // AssumeRoleWithSAMLWithContext is the same as AssumeRoleWithSAML with the addition of | ||
353 | // the ability to pass a context and additional request options. | ||
354 | // | ||
355 | // See AssumeRoleWithSAML for details on how to use this API operation. | ||
356 | // | ||
357 | // The context must be non-nil and will be used for request cancellation. If | ||
358 | // the context is nil a panic will occur. In the future the SDK may create | ||
359 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
360 | // for more information on using Contexts. | ||
361 | func (c *STS) AssumeRoleWithSAMLWithContext(ctx aws.Context, input *AssumeRoleWithSAMLInput, opts ...request.Option) (*AssumeRoleWithSAMLOutput, error) { | ||
362 | req, out := c.AssumeRoleWithSAMLRequest(input) | ||
363 | req.SetContext(ctx) | ||
364 | req.ApplyOptions(opts...) | ||
365 | return out, req.Send() | ||
366 | } | ||
367 | |||
368 | const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity" | ||
369 | |||
370 | // AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the | ||
371 | // client's request for the AssumeRoleWithWebIdentity operation. The "output" return | ||
372 | // value can be used to capture response data after the request's "Send" method | ||
373 | // is called. | ||
374 | // | ||
375 | // See AssumeRoleWithWebIdentity for usage and error information. | ||
376 | // | ||
377 | // Creating a request object using this method should be used when you want to inject | ||
378 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
379 | // access properties on the request object before or after sending the request. If | ||
380 | // you just want the service response, call the AssumeRoleWithWebIdentity method directly | ||
381 | // instead. | ||
382 | // | ||
383 | // Note: You must call the "Send" method on the returned request object in order | ||
384 | // to execute the request. | ||
385 | // | ||
386 | // // Example sending a request using the AssumeRoleWithWebIdentityRequest method. | ||
387 | // req, resp := client.AssumeRoleWithWebIdentityRequest(params) | ||
388 | // | ||
389 | // err := req.Send() | ||
390 | // if err == nil { // resp is now filled | ||
391 | // fmt.Println(resp) | ||
392 | // } | ||
393 | // | ||
394 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity | ||
395 | func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityInput) (req *request.Request, output *AssumeRoleWithWebIdentityOutput) { | ||
396 | op := &request.Operation{ | ||
397 | Name: opAssumeRoleWithWebIdentity, | ||
398 | HTTPMethod: "POST", | ||
399 | HTTPPath: "/", | ||
400 | } | ||
401 | |||
402 | if input == nil { | ||
403 | input = &AssumeRoleWithWebIdentityInput{} | ||
404 | } | ||
405 | |||
406 | output = &AssumeRoleWithWebIdentityOutput{} | ||
407 | req = c.newRequest(op, input, output) | ||
408 | return | ||
409 | } | ||
410 | |||
411 | // AssumeRoleWithWebIdentity API operation for AWS Security Token Service. | ||
412 | // | ||
413 | // Returns a set of temporary security credentials for users who have been authenticated | ||
414 | // in a mobile or web application with a web identity provider, such as Amazon | ||
415 | // Cognito, Login with Amazon, Facebook, Google, or any OpenID Connect-compatible | ||
416 | // identity provider. | ||
417 | // | ||
418 | // For mobile applications, we recommend that you use Amazon Cognito. You can | ||
419 | // use Amazon Cognito with the AWS SDK for iOS (http://aws.amazon.com/sdkforios/) | ||
420 | // and the AWS SDK for Android (http://aws.amazon.com/sdkforandroid/) to uniquely | ||
421 | // identify a user and supply the user with a consistent identity throughout | ||
422 | // the lifetime of an application. | ||
423 | // | ||
424 | // To learn more about Amazon Cognito, see Amazon Cognito Overview (http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840) | ||
425 | // in the AWS SDK for Android Developer Guide guide and Amazon Cognito Overview | ||
426 | // (http://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664) | ||
427 | // in the AWS SDK for iOS Developer Guide. | ||
428 | // | ||
429 | // Calling AssumeRoleWithWebIdentity does not require the use of AWS security | ||
430 | // credentials. Therefore, you can distribute an application (for example, on | ||
431 | // mobile devices) that requests temporary security credentials without including | ||
432 | // long-term AWS credentials in the application, and without deploying server-based | ||
433 | // proxy services that use long-term AWS credentials. Instead, the identity | ||
434 | // of the caller is validated by using a token from the web identity provider. | ||
435 | // For a comparison of AssumeRoleWithWebIdentity with the other APIs that produce | ||
436 | // temporary credentials, see Requesting Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) | ||
437 | // and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) | ||
438 | // in the IAM User Guide. | ||
439 | // | ||
440 | // The temporary security credentials returned by this API consist of an access | ||
441 | // key ID, a secret access key, and a security token. Applications can use these | ||
442 | // temporary security credentials to sign calls to AWS service APIs. | ||
443 | // | ||
444 | // The credentials are valid for the duration that you specified when calling | ||
445 | // AssumeRoleWithWebIdentity, which can be from 900 seconds (15 minutes) to | ||
446 | // a maximum of 3600 seconds (1 hour). The default is 1 hour. | ||
447 | // | ||
448 | // The temporary security credentials created by AssumeRoleWithWebIdentity can | ||
449 | // be used to make API calls to any AWS service with the following exception: | ||
450 | // you cannot call the STS service's GetFederationToken or GetSessionToken APIs. | ||
451 | // | ||
452 | // Optionally, you can pass an IAM access policy to this operation. If you choose | ||
453 | // not to pass a policy, the temporary security credentials that are returned | ||
454 | // by the operation have the permissions that are defined in the access policy | ||
455 | // of the role that is being assumed. If you pass a policy to this operation, | ||
456 | // the temporary security credentials that are returned by the operation have | ||
457 | // the permissions that are allowed by both the access policy of the role that | ||
458 | // is being assumed, and the policy that you pass. This gives you a way to further | ||
459 | // restrict the permissions for the resulting temporary security credentials. | ||
460 | // You cannot use the passed policy to grant permissions that are in excess | ||
461 | // of those allowed by the access policy of the role that is being assumed. | ||
462 | // For more information, see Permissions for AssumeRole, AssumeRoleWithSAML, | ||
463 | // and AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) | ||
464 | // in the IAM User Guide. | ||
465 | // | ||
466 | // Before your application can call AssumeRoleWithWebIdentity, you must have | ||
467 | // an identity token from a supported identity provider and create a role that | ||
468 | // the application can assume. The role that your application assumes must trust | ||
469 | // the identity provider that is associated with the identity token. In other | ||
470 | // words, the identity provider must be specified in the role's trust policy. | ||
471 | // | ||
472 | // Calling AssumeRoleWithWebIdentity can result in an entry in your AWS CloudTrail | ||
473 | // logs. The entry includes the Subject (http://openid.net/specs/openid-connect-core-1_0.html#Claims) | ||
474 | // of the provided Web Identity Token. We recommend that you avoid using any | ||
475 | // personally identifiable information (PII) in this field. For example, you | ||
476 | // could instead use a GUID or a pairwise identifier, as suggested in the OIDC | ||
477 | // specification (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes). | ||
478 | // | ||
479 | // For more information about how to use web identity federation and the AssumeRoleWithWebIdentity | ||
480 | // API, see the following resources: | ||
481 | // | ||
482 | // * Using Web Identity Federation APIs for Mobile Apps (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html) | ||
483 | // and Federation Through a Web-based Identity Provider (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity). | ||
484 | // | ||
485 | // | ||
486 | // * Web Identity Federation Playground (https://web-identity-federation-playground.s3.amazonaws.com/index.html). | ||
487 | // This interactive website lets you walk through the process of authenticating | ||
488 | // via Login with Amazon, Facebook, or Google, getting temporary security | ||
489 | // credentials, and then using those credentials to make a request to AWS. | ||
490 | // | ||
491 | // | ||
492 | // * AWS SDK for iOS (http://aws.amazon.com/sdkforios/) and AWS SDK for Android | ||
493 | // (http://aws.amazon.com/sdkforandroid/). These toolkits contain sample | ||
494 | // apps that show how to invoke the identity providers, and then how to use | ||
495 | // the information from these providers to get and use temporary security | ||
496 | // credentials. | ||
497 | // | ||
498 | // * Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/4617974389850313). | ||
499 | // This article discusses web identity federation and shows an example of | ||
500 | // how to use web identity federation to get access to content in Amazon | ||
501 | // S3. | ||
502 | // | ||
503 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
504 | // with awserr.Error's Code and Message methods to get detailed information about | ||
505 | // the error. | ||
506 | // | ||
507 | // See the AWS API reference guide for AWS Security Token Service's | ||
508 | // API operation AssumeRoleWithWebIdentity for usage and error information. | ||
509 | // | ||
510 | // Returned Error Codes: | ||
511 | // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" | ||
512 | // The request was rejected because the policy document was malformed. The error | ||
513 | // message describes the specific error. | ||
514 | // | ||
515 | // * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" | ||
516 | // The request was rejected because the policy document was too large. The error | ||
517 | // message describes how big the policy document is, in packed form, as a percentage | ||
518 | // of what the API allows. | ||
519 | // | ||
520 | // * ErrCodeIDPRejectedClaimException "IDPRejectedClaim" | ||
521 | // The identity provider (IdP) reported that authentication failed. This might | ||
522 | // be because the claim is invalid. | ||
523 | // | ||
524 | // If this error is returned for the AssumeRoleWithWebIdentity operation, it | ||
525 | // can also mean that the claim has expired or has been explicitly revoked. | ||
526 | // | ||
527 | // * ErrCodeIDPCommunicationErrorException "IDPCommunicationError" | ||
528 | // The request could not be fulfilled because the non-AWS identity provider | ||
529 | // (IDP) that was asked to verify the incoming identity token could not be reached. | ||
530 | // This is often a transient error caused by network conditions. Retry the request | ||
531 | // a limited number of times so that you don't exceed the request rate. If the | ||
532 | // error persists, the non-AWS identity provider might be down or not responding. | ||
533 | // | ||
534 | // * ErrCodeInvalidIdentityTokenException "InvalidIdentityToken" | ||
535 | // The web identity token that was passed could not be validated by AWS. Get | ||
536 | // a new identity token from the identity provider and then retry the request. | ||
537 | // | ||
538 | // * ErrCodeExpiredTokenException "ExpiredTokenException" | ||
539 | // The web identity token that was passed is expired or is not valid. Get a | ||
540 | // new identity token from the identity provider and then retry the request. | ||
541 | // | ||
542 | // * ErrCodeRegionDisabledException "RegionDisabledException" | ||
543 | // STS is not activated in the requested region for the account that is being | ||
544 | // asked to generate credentials. The account administrator must use the IAM | ||
545 | // console to activate STS in that region. For more information, see Activating | ||
546 | // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) | ||
547 | // in the IAM User Guide. | ||
548 | // | ||
549 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity | ||
550 | func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) { | ||
551 | req, out := c.AssumeRoleWithWebIdentityRequest(input) | ||
552 | return out, req.Send() | ||
553 | } | ||
554 | |||
555 | // AssumeRoleWithWebIdentityWithContext is the same as AssumeRoleWithWebIdentity with the addition of | ||
556 | // the ability to pass a context and additional request options. | ||
557 | // | ||
558 | // See AssumeRoleWithWebIdentity for details on how to use this API operation. | ||
559 | // | ||
560 | // The context must be non-nil and will be used for request cancellation. If | ||
561 | // the context is nil a panic will occur. In the future the SDK may create | ||
562 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
563 | // for more information on using Contexts. | ||
564 | func (c *STS) AssumeRoleWithWebIdentityWithContext(ctx aws.Context, input *AssumeRoleWithWebIdentityInput, opts ...request.Option) (*AssumeRoleWithWebIdentityOutput, error) { | ||
565 | req, out := c.AssumeRoleWithWebIdentityRequest(input) | ||
566 | req.SetContext(ctx) | ||
567 | req.ApplyOptions(opts...) | ||
568 | return out, req.Send() | ||
569 | } | ||
570 | |||
571 | const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage" | ||
572 | |||
573 | // DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the | ||
574 | // client's request for the DecodeAuthorizationMessage operation. The "output" return | ||
575 | // value can be used to capture response data after the request's "Send" method | ||
576 | // is called. | ||
577 | // | ||
578 | // See DecodeAuthorizationMessage for usage and error information. | ||
579 | // | ||
580 | // Creating a request object using this method should be used when you want to inject | ||
581 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
582 | // access properties on the request object before or after sending the request. If | ||
583 | // you just want the service response, call the DecodeAuthorizationMessage method directly | ||
584 | // instead. | ||
585 | // | ||
586 | // Note: You must call the "Send" method on the returned request object in order | ||
587 | // to execute the request. | ||
588 | // | ||
589 | // // Example sending a request using the DecodeAuthorizationMessageRequest method. | ||
590 | // req, resp := client.DecodeAuthorizationMessageRequest(params) | ||
591 | // | ||
592 | // err := req.Send() | ||
593 | // if err == nil { // resp is now filled | ||
594 | // fmt.Println(resp) | ||
595 | // } | ||
596 | // | ||
597 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage | ||
598 | func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessageInput) (req *request.Request, output *DecodeAuthorizationMessageOutput) { | ||
599 | op := &request.Operation{ | ||
600 | Name: opDecodeAuthorizationMessage, | ||
601 | HTTPMethod: "POST", | ||
602 | HTTPPath: "/", | ||
603 | } | ||
604 | |||
605 | if input == nil { | ||
606 | input = &DecodeAuthorizationMessageInput{} | ||
607 | } | ||
608 | |||
609 | output = &DecodeAuthorizationMessageOutput{} | ||
610 | req = c.newRequest(op, input, output) | ||
611 | return | ||
612 | } | ||
613 | |||
614 | // DecodeAuthorizationMessage API operation for AWS Security Token Service. | ||
615 | // | ||
616 | // Decodes additional information about the authorization status of a request | ||
617 | // from an encoded message returned in response to an AWS request. | ||
618 | // | ||
619 | // For example, if a user is not authorized to perform an action that he or | ||
620 | // she has requested, the request returns a Client.UnauthorizedOperation response | ||
621 | // (an HTTP 403 response). Some AWS actions additionally return an encoded message | ||
622 | // that can provide details about this authorization failure. | ||
623 | // | ||
624 | // Only certain AWS actions return an encoded authorization message. The documentation | ||
625 | // for an individual action indicates whether that action returns an encoded | ||
626 | // message in addition to returning an HTTP code. | ||
627 | // | ||
628 | // The message is encoded because the details of the authorization status can | ||
629 | // constitute privileged information that the user who requested the action | ||
630 | // should not see. To decode an authorization status message, a user must be | ||
631 | // granted permissions via an IAM policy to request the DecodeAuthorizationMessage | ||
632 | // (sts:DecodeAuthorizationMessage) action. | ||
633 | // | ||
634 | // The decoded message includes the following type of information: | ||
635 | // | ||
636 | // * Whether the request was denied due to an explicit deny or due to the | ||
637 | // absence of an explicit allow. For more information, see Determining Whether | ||
638 | // a Request is Allowed or Denied (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow) | ||
639 | // in the IAM User Guide. | ||
640 | // | ||
641 | // * The principal who made the request. | ||
642 | // | ||
643 | // * The requested action. | ||
644 | // | ||
645 | // * The requested resource. | ||
646 | // | ||
647 | // * The values of condition keys in the context of the user's request. | ||
648 | // | ||
649 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
650 | // with awserr.Error's Code and Message methods to get detailed information about | ||
651 | // the error. | ||
652 | // | ||
653 | // See the AWS API reference guide for AWS Security Token Service's | ||
654 | // API operation DecodeAuthorizationMessage for usage and error information. | ||
655 | // | ||
656 | // Returned Error Codes: | ||
657 | // * ErrCodeInvalidAuthorizationMessageException "InvalidAuthorizationMessageException" | ||
658 | // The error returned if the message passed to DecodeAuthorizationMessage was | ||
659 | // invalid. This can happen if the token contains invalid characters, such as | ||
660 | // linebreaks. | ||
661 | // | ||
662 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage | ||
663 | func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) { | ||
664 | req, out := c.DecodeAuthorizationMessageRequest(input) | ||
665 | return out, req.Send() | ||
666 | } | ||
667 | |||
668 | // DecodeAuthorizationMessageWithContext is the same as DecodeAuthorizationMessage with the addition of | ||
669 | // the ability to pass a context and additional request options. | ||
670 | // | ||
671 | // See DecodeAuthorizationMessage for details on how to use this API operation. | ||
672 | // | ||
673 | // The context must be non-nil and will be used for request cancellation. If | ||
674 | // the context is nil a panic will occur. In the future the SDK may create | ||
675 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
676 | // for more information on using Contexts. | ||
677 | func (c *STS) DecodeAuthorizationMessageWithContext(ctx aws.Context, input *DecodeAuthorizationMessageInput, opts ...request.Option) (*DecodeAuthorizationMessageOutput, error) { | ||
678 | req, out := c.DecodeAuthorizationMessageRequest(input) | ||
679 | req.SetContext(ctx) | ||
680 | req.ApplyOptions(opts...) | ||
681 | return out, req.Send() | ||
682 | } | ||
683 | |||
684 | const opGetCallerIdentity = "GetCallerIdentity" | ||
685 | |||
686 | // GetCallerIdentityRequest generates a "aws/request.Request" representing the | ||
687 | // client's request for the GetCallerIdentity operation. The "output" return | ||
688 | // value can be used to capture response data after the request's "Send" method | ||
689 | // is called. | ||
690 | // | ||
691 | // See GetCallerIdentity for usage and error information. | ||
692 | // | ||
693 | // Creating a request object using this method should be used when you want to inject | ||
694 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
695 | // access properties on the request object before or after sending the request. If | ||
696 | // you just want the service response, call the GetCallerIdentity method directly | ||
697 | // instead. | ||
698 | // | ||
699 | // Note: You must call the "Send" method on the returned request object in order | ||
700 | // to execute the request. | ||
701 | // | ||
702 | // // Example sending a request using the GetCallerIdentityRequest method. | ||
703 | // req, resp := client.GetCallerIdentityRequest(params) | ||
704 | // | ||
705 | // err := req.Send() | ||
706 | // if err == nil { // resp is now filled | ||
707 | // fmt.Println(resp) | ||
708 | // } | ||
709 | // | ||
710 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity | ||
711 | func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *request.Request, output *GetCallerIdentityOutput) { | ||
712 | op := &request.Operation{ | ||
713 | Name: opGetCallerIdentity, | ||
714 | HTTPMethod: "POST", | ||
715 | HTTPPath: "/", | ||
716 | } | ||
717 | |||
718 | if input == nil { | ||
719 | input = &GetCallerIdentityInput{} | ||
720 | } | ||
721 | |||
722 | output = &GetCallerIdentityOutput{} | ||
723 | req = c.newRequest(op, input, output) | ||
724 | return | ||
725 | } | ||
726 | |||
727 | // GetCallerIdentity API operation for AWS Security Token Service. | ||
728 | // | ||
729 | // Returns details about the IAM identity whose credentials are used to call | ||
730 | // the API. | ||
731 | // | ||
732 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
733 | // with awserr.Error's Code and Message methods to get detailed information about | ||
734 | // the error. | ||
735 | // | ||
736 | // See the AWS API reference guide for AWS Security Token Service's | ||
737 | // API operation GetCallerIdentity for usage and error information. | ||
738 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity | ||
739 | func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCallerIdentityOutput, error) { | ||
740 | req, out := c.GetCallerIdentityRequest(input) | ||
741 | return out, req.Send() | ||
742 | } | ||
743 | |||
744 | // GetCallerIdentityWithContext is the same as GetCallerIdentity with the addition of | ||
745 | // the ability to pass a context and additional request options. | ||
746 | // | ||
747 | // See GetCallerIdentity for details on how to use this API operation. | ||
748 | // | ||
749 | // The context must be non-nil and will be used for request cancellation. If | ||
750 | // the context is nil a panic will occur. In the future the SDK may create | ||
751 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
752 | // for more information on using Contexts. | ||
753 | func (c *STS) GetCallerIdentityWithContext(ctx aws.Context, input *GetCallerIdentityInput, opts ...request.Option) (*GetCallerIdentityOutput, error) { | ||
754 | req, out := c.GetCallerIdentityRequest(input) | ||
755 | req.SetContext(ctx) | ||
756 | req.ApplyOptions(opts...) | ||
757 | return out, req.Send() | ||
758 | } | ||
759 | |||
760 | const opGetFederationToken = "GetFederationToken" | ||
761 | |||
762 | // GetFederationTokenRequest generates a "aws/request.Request" representing the | ||
763 | // client's request for the GetFederationToken operation. The "output" return | ||
764 | // value can be used to capture response data after the request's "Send" method | ||
765 | // is called. | ||
766 | // | ||
767 | // See GetFederationToken for usage and error information. | ||
768 | // | ||
769 | // Creating a request object using this method should be used when you want to inject | ||
770 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
771 | // access properties on the request object before or after sending the request. If | ||
772 | // you just want the service response, call the GetFederationToken method directly | ||
773 | // instead. | ||
774 | // | ||
775 | // Note: You must call the "Send" method on the returned request object in order | ||
776 | // to execute the request. | ||
777 | // | ||
778 | // // Example sending a request using the GetFederationTokenRequest method. | ||
779 | // req, resp := client.GetFederationTokenRequest(params) | ||
780 | // | ||
781 | // err := req.Send() | ||
782 | // if err == nil { // resp is now filled | ||
783 | // fmt.Println(resp) | ||
784 | // } | ||
785 | // | ||
786 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken | ||
787 | func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *request.Request, output *GetFederationTokenOutput) { | ||
788 | op := &request.Operation{ | ||
789 | Name: opGetFederationToken, | ||
790 | HTTPMethod: "POST", | ||
791 | HTTPPath: "/", | ||
792 | } | ||
793 | |||
794 | if input == nil { | ||
795 | input = &GetFederationTokenInput{} | ||
796 | } | ||
797 | |||
798 | output = &GetFederationTokenOutput{} | ||
799 | req = c.newRequest(op, input, output) | ||
800 | return | ||
801 | } | ||
802 | |||
803 | // GetFederationToken API operation for AWS Security Token Service. | ||
804 | // | ||
805 | // Returns a set of temporary security credentials (consisting of an access | ||
806 | // key ID, a secret access key, and a security token) for a federated user. | ||
807 | // A typical use is in a proxy application that gets temporary security credentials | ||
808 | // on behalf of distributed applications inside a corporate network. Because | ||
809 | // you must call the GetFederationToken action using the long-term security | ||
810 | // credentials of an IAM user, this call is appropriate in contexts where those | ||
811 | // credentials can be safely stored, usually in a server-based application. | ||
812 | // For a comparison of GetFederationToken with the other APIs that produce temporary | ||
813 | // credentials, see Requesting Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) | ||
814 | // and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) | ||
815 | // in the IAM User Guide. | ||
816 | // | ||
817 | // If you are creating a mobile-based or browser-based app that can authenticate | ||
818 | // users using a web identity provider like Login with Amazon, Facebook, Google, | ||
819 | // or an OpenID Connect-compatible identity provider, we recommend that you | ||
820 | // use Amazon Cognito (http://aws.amazon.com/cognito/) or AssumeRoleWithWebIdentity. | ||
821 | // For more information, see Federation Through a Web-based Identity Provider | ||
822 | // (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity). | ||
823 | // | ||
824 | // The GetFederationToken action must be called by using the long-term AWS security | ||
825 | // credentials of an IAM user. You can also call GetFederationToken using the | ||
826 | // security credentials of an AWS root account, but we do not recommended it. | ||
827 | // Instead, we recommend that you create an IAM user for the purpose of the | ||
828 | // proxy application and then attach a policy to the IAM user that limits federated | ||
829 | // users to only the actions and resources that they need access to. For more | ||
830 | // information, see IAM Best Practices (http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) | ||
831 | // in the IAM User Guide. | ||
832 | // | ||
833 | // The temporary security credentials that are obtained by using the long-term | ||
834 | // credentials of an IAM user are valid for the specified duration, from 900 | ||
835 | // seconds (15 minutes) up to a maximium of 129600 seconds (36 hours). The default | ||
836 | // is 43200 seconds (12 hours). Temporary credentials that are obtained by using | ||
837 | // AWS root account credentials have a maximum duration of 3600 seconds (1 hour). | ||
838 | // | ||
839 | // The temporary security credentials created by GetFederationToken can be used | ||
840 | // to make API calls to any AWS service with the following exceptions: | ||
841 | // | ||
842 | // * You cannot use these credentials to call any IAM APIs. | ||
843 | // | ||
844 | // * You cannot call any STS APIs except GetCallerIdentity. | ||
845 | // | ||
846 | // Permissions | ||
847 | // | ||
848 | // The permissions for the temporary security credentials returned by GetFederationToken | ||
849 | // are determined by a combination of the following: | ||
850 | // | ||
851 | // * The policy or policies that are attached to the IAM user whose credentials | ||
852 | // are used to call GetFederationToken. | ||
853 | // | ||
854 | // * The policy that is passed as a parameter in the call. | ||
855 | // | ||
856 | // The passed policy is attached to the temporary security credentials that | ||
857 | // result from the GetFederationToken API call--that is, to the federated user. | ||
858 | // When the federated user makes an AWS request, AWS evaluates the policy attached | ||
859 | // to the federated user in combination with the policy or policies attached | ||
860 | // to the IAM user whose credentials were used to call GetFederationToken. AWS | ||
861 | // allows the federated user's request only when both the federated user and | ||
862 | // the IAM user are explicitly allowed to perform the requested action. The | ||
863 | // passed policy cannot grant more permissions than those that are defined in | ||
864 | // the IAM user policy. | ||
865 | // | ||
866 | // A typical use case is that the permissions of the IAM user whose credentials | ||
867 | // are used to call GetFederationToken are designed to allow access to all the | ||
868 | // actions and resources that any federated user will need. Then, for individual | ||
869 | // users, you pass a policy to the operation that scopes down the permissions | ||
870 | // to a level that's appropriate to that individual user, using a policy that | ||
871 | // allows only a subset of permissions that are granted to the IAM user. | ||
872 | // | ||
873 | // If you do not pass a policy, the resulting temporary security credentials | ||
874 | // have no effective permissions. The only exception is when the temporary security | ||
875 | // credentials are used to access a resource that has a resource-based policy | ||
876 | // that specifically allows the federated user to access the resource. | ||
877 | // | ||
878 | // For more information about how permissions work, see Permissions for GetFederationToken | ||
879 | // (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getfederationtoken.html). | ||
880 | // For information about using GetFederationToken to create temporary security | ||
881 | // credentials, see GetFederationToken—Federation Through a Custom Identity | ||
882 | // Broker (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken). | ||
883 | // | ||
884 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
885 | // with awserr.Error's Code and Message methods to get detailed information about | ||
886 | // the error. | ||
887 | // | ||
888 | // See the AWS API reference guide for AWS Security Token Service's | ||
889 | // API operation GetFederationToken for usage and error information. | ||
890 | // | ||
891 | // Returned Error Codes: | ||
892 | // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" | ||
893 | // The request was rejected because the policy document was malformed. The error | ||
894 | // message describes the specific error. | ||
895 | // | ||
896 | // * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" | ||
897 | // The request was rejected because the policy document was too large. The error | ||
898 | // message describes how big the policy document is, in packed form, as a percentage | ||
899 | // of what the API allows. | ||
900 | // | ||
901 | // * ErrCodeRegionDisabledException "RegionDisabledException" | ||
902 | // STS is not activated in the requested region for the account that is being | ||
903 | // asked to generate credentials. The account administrator must use the IAM | ||
904 | // console to activate STS in that region. For more information, see Activating | ||
905 | // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) | ||
906 | // in the IAM User Guide. | ||
907 | // | ||
908 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken | ||
909 | func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) { | ||
910 | req, out := c.GetFederationTokenRequest(input) | ||
911 | return out, req.Send() | ||
912 | } | ||
913 | |||
914 | // GetFederationTokenWithContext is the same as GetFederationToken with the addition of | ||
915 | // the ability to pass a context and additional request options. | ||
916 | // | ||
917 | // See GetFederationToken for details on how to use this API operation. | ||
918 | // | ||
919 | // The context must be non-nil and will be used for request cancellation. If | ||
920 | // the context is nil a panic will occur. In the future the SDK may create | ||
921 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
922 | // for more information on using Contexts. | ||
923 | func (c *STS) GetFederationTokenWithContext(ctx aws.Context, input *GetFederationTokenInput, opts ...request.Option) (*GetFederationTokenOutput, error) { | ||
924 | req, out := c.GetFederationTokenRequest(input) | ||
925 | req.SetContext(ctx) | ||
926 | req.ApplyOptions(opts...) | ||
927 | return out, req.Send() | ||
928 | } | ||
929 | |||
930 | const opGetSessionToken = "GetSessionToken" | ||
931 | |||
932 | // GetSessionTokenRequest generates a "aws/request.Request" representing the | ||
933 | // client's request for the GetSessionToken operation. The "output" return | ||
934 | // value can be used to capture response data after the request's "Send" method | ||
935 | // is called. | ||
936 | // | ||
937 | // See GetSessionToken for usage and error information. | ||
938 | // | ||
939 | // Creating a request object using this method should be used when you want to inject | ||
940 | // custom logic into the request's lifecycle using a custom handler, or if you want to | ||
941 | // access properties on the request object before or after sending the request. If | ||
942 | // you just want the service response, call the GetSessionToken method directly | ||
943 | // instead. | ||
944 | // | ||
945 | // Note: You must call the "Send" method on the returned request object in order | ||
946 | // to execute the request. | ||
947 | // | ||
948 | // // Example sending a request using the GetSessionTokenRequest method. | ||
949 | // req, resp := client.GetSessionTokenRequest(params) | ||
950 | // | ||
951 | // err := req.Send() | ||
952 | // if err == nil { // resp is now filled | ||
953 | // fmt.Println(resp) | ||
954 | // } | ||
955 | // | ||
956 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken | ||
957 | func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.Request, output *GetSessionTokenOutput) { | ||
958 | op := &request.Operation{ | ||
959 | Name: opGetSessionToken, | ||
960 | HTTPMethod: "POST", | ||
961 | HTTPPath: "/", | ||
962 | } | ||
963 | |||
964 | if input == nil { | ||
965 | input = &GetSessionTokenInput{} | ||
966 | } | ||
967 | |||
968 | output = &GetSessionTokenOutput{} | ||
969 | req = c.newRequest(op, input, output) | ||
970 | return | ||
971 | } | ||
972 | |||
973 | // GetSessionToken API operation for AWS Security Token Service. | ||
974 | // | ||
975 | // Returns a set of temporary credentials for an AWS account or IAM user. The | ||
976 | // credentials consist of an access key ID, a secret access key, and a security | ||
977 | // token. Typically, you use GetSessionToken if you want to use MFA to protect | ||
978 | // programmatic calls to specific AWS APIs like Amazon EC2 StopInstances. MFA-enabled | ||
979 | // IAM users would need to call GetSessionToken and submit an MFA code that | ||
980 | // is associated with their MFA device. Using the temporary security credentials | ||
981 | // that are returned from the call, IAM users can then make programmatic calls | ||
982 | // to APIs that require MFA authentication. If you do not supply a correct MFA | ||
983 | // code, then the API returns an access denied error. For a comparison of GetSessionToken | ||
984 | // with the other APIs that produce temporary credentials, see Requesting Temporary | ||
985 | // Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) | ||
986 | // and Comparing the AWS STS APIs (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) | ||
987 | // in the IAM User Guide. | ||
988 | // | ||
989 | // The GetSessionToken action must be called by using the long-term AWS security | ||
990 | // credentials of the AWS account or an IAM user. Credentials that are created | ||
991 | // by IAM users are valid for the duration that you specify, from 900 seconds | ||
992 | // (15 minutes) up to a maximum of 129600 seconds (36 hours), with a default | ||
993 | // of 43200 seconds (12 hours); credentials that are created by using account | ||
994 | // credentials can range from 900 seconds (15 minutes) up to a maximum of 3600 | ||
995 | // seconds (1 hour), with a default of 1 hour. | ||
996 | // | ||
997 | // The temporary security credentials created by GetSessionToken can be used | ||
998 | // to make API calls to any AWS service with the following exceptions: | ||
999 | // | ||
1000 | // * You cannot call any IAM APIs unless MFA authentication information is | ||
1001 | // included in the request. | ||
1002 | // | ||
1003 | // * You cannot call any STS API exceptAssumeRole or GetCallerIdentity. | ||
1004 | // | ||
1005 | // We recommend that you do not call GetSessionToken with root account credentials. | ||
1006 | // Instead, follow our best practices (http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users) | ||
1007 | // by creating one or more IAM users, giving them the necessary permissions, | ||
1008 | // and using IAM users for everyday interaction with AWS. | ||
1009 | // | ||
1010 | // The permissions associated with the temporary security credentials returned | ||
1011 | // by GetSessionToken are based on the permissions associated with account or | ||
1012 | // IAM user whose credentials are used to call the action. If GetSessionToken | ||
1013 | // is called using root account credentials, the temporary credentials have | ||
1014 | // root account permissions. Similarly, if GetSessionToken is called using the | ||
1015 | // credentials of an IAM user, the temporary credentials have the same permissions | ||
1016 | // as the IAM user. | ||
1017 | // | ||
1018 | // For more information about using GetSessionToken to create temporary credentials, | ||
1019 | // go to Temporary Credentials for Users in Untrusted Environments (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken) | ||
1020 | // in the IAM User Guide. | ||
1021 | // | ||
1022 | // Returns awserr.Error for service API and SDK errors. Use runtime type assertions | ||
1023 | // with awserr.Error's Code and Message methods to get detailed information about | ||
1024 | // the error. | ||
1025 | // | ||
1026 | // See the AWS API reference guide for AWS Security Token Service's | ||
1027 | // API operation GetSessionToken for usage and error information. | ||
1028 | // | ||
1029 | // Returned Error Codes: | ||
1030 | // * ErrCodeRegionDisabledException "RegionDisabledException" | ||
1031 | // STS is not activated in the requested region for the account that is being | ||
1032 | // asked to generate credentials. The account administrator must use the IAM | ||
1033 | // console to activate STS in that region. For more information, see Activating | ||
1034 | // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) | ||
1035 | // in the IAM User Guide. | ||
1036 | // | ||
1037 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken | ||
1038 | func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) { | ||
1039 | req, out := c.GetSessionTokenRequest(input) | ||
1040 | return out, req.Send() | ||
1041 | } | ||
1042 | |||
1043 | // GetSessionTokenWithContext is the same as GetSessionToken with the addition of | ||
1044 | // the ability to pass a context and additional request options. | ||
1045 | // | ||
1046 | // See GetSessionToken for details on how to use this API operation. | ||
1047 | // | ||
1048 | // The context must be non-nil and will be used for request cancellation. If | ||
1049 | // the context is nil a panic will occur. In the future the SDK may create | ||
1050 | // sub-contexts for http.Requests. See https://golang.org/pkg/context/ | ||
1051 | // for more information on using Contexts. | ||
1052 | func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionTokenInput, opts ...request.Option) (*GetSessionTokenOutput, error) { | ||
1053 | req, out := c.GetSessionTokenRequest(input) | ||
1054 | req.SetContext(ctx) | ||
1055 | req.ApplyOptions(opts...) | ||
1056 | return out, req.Send() | ||
1057 | } | ||
1058 | |||
1059 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest | ||
1060 | type AssumeRoleInput struct { | ||
1061 | _ struct{} `type:"structure"` | ||
1062 | |||
1063 | // The duration, in seconds, of the role session. The value can range from 900 | ||
1064 | // seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set | ||
1065 | // to 3600 seconds. | ||
1066 | // | ||
1067 | // This is separate from the duration of a console session that you might request | ||
1068 | // using the returned credentials. The request to the federation endpoint for | ||
1069 | // a console sign-in token takes a SessionDuration parameter that specifies | ||
1070 | // the maximum length of the console session, separately from the DurationSeconds | ||
1071 | // parameter on this API. For more information, see Creating a URL that Enables | ||
1072 | // Federated Users to Access the AWS Management Console (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) | ||
1073 | // in the IAM User Guide. | ||
1074 | DurationSeconds *int64 `min:"900" type:"integer"` | ||
1075 | |||
1076 | // A unique identifier that is used by third parties when assuming roles in | ||
1077 | // their customers' accounts. For each role that the third party can assume, | ||
1078 | // they should instruct their customers to ensure the role's trust policy checks | ||
1079 | // for the external ID that the third party generated. Each time the third party | ||
1080 | // assumes the role, they should pass the customer's external ID. The external | ||
1081 | // ID is useful in order to help third parties bind a role to the customer who | ||
1082 | // created it. For more information about the external ID, see How to Use an | ||
1083 | // External ID When Granting Access to Your AWS Resources to a Third Party (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) | ||
1084 | // in the IAM User Guide. | ||
1085 | // | ||
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 | ||
1088 | // also include underscores or any of the following characters: =,.@:\/- | ||
1089 | ExternalId *string `min:"2" type:"string"` | ||
1090 | |||
1091 | // An IAM policy in JSON format. | ||
1092 | // | ||
1093 | // This parameter is optional. If you pass a policy, the temporary security | ||
1094 | // credentials that are returned by the operation have the permissions that | ||
1095 | // are allowed by both (the intersection of) the access policy of the role that | ||
1096 | // is being assumed, and the policy that you pass. This gives you a way to further | ||
1097 | // restrict the permissions for the resulting temporary security credentials. | ||
1098 | // You cannot use the passed policy to grant permissions that are in excess | ||
1099 | // of those allowed by the access policy of the role that is being assumed. | ||
1100 | // For more information, see Permissions for AssumeRole, AssumeRoleWithSAML, | ||
1101 | // and AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) | ||
1102 | // in the IAM User Guide. | ||
1103 | // | ||
1104 | // The format for this parameter, as described by its regex pattern, is a string | ||
1105 | // of characters up to 2048 characters in length. The characters can be any | ||
1106 | // ASCII character from the space character to the end of the valid character | ||
1107 | // list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), | ||
1108 | // and carriage return (\u000D) characters. | ||
1109 | // | ||
1110 | // The policy plain text must be 2048 bytes or shorter. However, an internal | ||
1111 | // conversion compresses it into a packed binary format with a separate limit. | ||
1112 | // The PackedPolicySize response element indicates by percentage how close to | ||
1113 | // the upper size limit the policy is, with 100% equaling the maximum allowed | ||
1114 | // size. | ||
1115 | Policy *string `min:"1" type:"string"` | ||
1116 | |||
1117 | // The Amazon Resource Name (ARN) of the role to assume. | ||
1118 | // | ||
1119 | // RoleArn is a required field | ||
1120 | RoleArn *string `min:"20" type:"string" required:"true"` | ||
1121 | |||
1122 | // An identifier for the assumed role session. | ||
1123 | // | ||
1124 | // Use the role session name to uniquely identify a session when the same role | ||
1125 | // is assumed by different principals or for different reasons. In cross-account | ||
1126 | // scenarios, the role session name is visible to, and can be logged by the | ||
1127 | // account that owns the role. The role session name is also used in the ARN | ||
1128 | // of the assumed role principal. This means that subsequent cross-account API | ||
1129 | // requests using the temporary security credentials will expose the role session | ||
1130 | // name to the external account in their CloudTrail logs. | ||
1131 | // | ||
1132 | // The regex used to validate this parameter is a string of characters consisting | ||
1133 | // of upper- and lower-case alphanumeric characters with no spaces. You can | ||
1134 | // also include underscores or any of the following characters: =,.@- | ||
1135 | // | ||
1136 | // RoleSessionName is a required field | ||
1137 | RoleSessionName *string `min:"2" type:"string" required:"true"` | ||
1138 | |||
1139 | // The identification number of the MFA device that is associated with the user | ||
1140 | // who is making the AssumeRole call. Specify this value if the trust policy | ||
1141 | // of the role being assumed includes a condition that requires MFA authentication. | ||
1142 | // The value is either the serial number for a hardware device (such as GAHT12345678) | ||
1143 | // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). | ||
1144 | // | ||
1145 | // The regex used to validate this parameter is a string of characters consisting | ||
1146 | // of upper- and lower-case alphanumeric characters with no spaces. You can | ||
1147 | // also include underscores or any of the following characters: =,.@- | ||
1148 | SerialNumber *string `min:"9" type:"string"` | ||
1149 | |||
1150 | // The value provided by the MFA device, if the trust policy of the role being | ||
1151 | // assumed requires MFA (that is, if the policy includes a condition that tests | ||
1152 | // for MFA). If the role being assumed requires MFA and if the TokenCode value | ||
1153 | // is missing or expired, the AssumeRole call returns an "access denied" error. | ||
1154 | // | ||
1155 | // The format for this parameter, as described by its regex pattern, is a sequence | ||
1156 | // of six numeric digits. | ||
1157 | TokenCode *string `min:"6" type:"string"` | ||
1158 | } | ||
1159 | |||
1160 | // String returns the string representation | ||
1161 | func (s AssumeRoleInput) String() string { | ||
1162 | return awsutil.Prettify(s) | ||
1163 | } | ||
1164 | |||
1165 | // GoString returns the string representation | ||
1166 | func (s AssumeRoleInput) GoString() string { | ||
1167 | return s.String() | ||
1168 | } | ||
1169 | |||
1170 | // Validate inspects the fields of the type to determine if they are valid. | ||
1171 | func (s *AssumeRoleInput) Validate() error { | ||
1172 | invalidParams := request.ErrInvalidParams{Context: "AssumeRoleInput"} | ||
1173 | if s.DurationSeconds != nil && *s.DurationSeconds < 900 { | ||
1174 | invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) | ||
1175 | } | ||
1176 | if s.ExternalId != nil && len(*s.ExternalId) < 2 { | ||
1177 | invalidParams.Add(request.NewErrParamMinLen("ExternalId", 2)) | ||
1178 | } | ||
1179 | if s.Policy != nil && len(*s.Policy) < 1 { | ||
1180 | invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) | ||
1181 | } | ||
1182 | if s.RoleArn == nil { | ||
1183 | invalidParams.Add(request.NewErrParamRequired("RoleArn")) | ||
1184 | } | ||
1185 | if s.RoleArn != nil && len(*s.RoleArn) < 20 { | ||
1186 | invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) | ||
1187 | } | ||
1188 | if s.RoleSessionName == nil { | ||
1189 | invalidParams.Add(request.NewErrParamRequired("RoleSessionName")) | ||
1190 | } | ||
1191 | if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 { | ||
1192 | invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2)) | ||
1193 | } | ||
1194 | if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { | ||
1195 | invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) | ||
1196 | } | ||
1197 | if s.TokenCode != nil && len(*s.TokenCode) < 6 { | ||
1198 | invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6)) | ||
1199 | } | ||
1200 | |||
1201 | if invalidParams.Len() > 0 { | ||
1202 | return invalidParams | ||
1203 | } | ||
1204 | return nil | ||
1205 | } | ||
1206 | |||
1207 | // SetDurationSeconds sets the DurationSeconds field's value. | ||
1208 | func (s *AssumeRoleInput) SetDurationSeconds(v int64) *AssumeRoleInput { | ||
1209 | s.DurationSeconds = &v | ||
1210 | return s | ||
1211 | } | ||
1212 | |||
1213 | // SetExternalId sets the ExternalId field's value. | ||
1214 | func (s *AssumeRoleInput) SetExternalId(v string) *AssumeRoleInput { | ||
1215 | s.ExternalId = &v | ||
1216 | return s | ||
1217 | } | ||
1218 | |||
1219 | // SetPolicy sets the Policy field's value. | ||
1220 | func (s *AssumeRoleInput) SetPolicy(v string) *AssumeRoleInput { | ||
1221 | s.Policy = &v | ||
1222 | return s | ||
1223 | } | ||
1224 | |||
1225 | // SetRoleArn sets the RoleArn field's value. | ||
1226 | func (s *AssumeRoleInput) SetRoleArn(v string) *AssumeRoleInput { | ||
1227 | s.RoleArn = &v | ||
1228 | return s | ||
1229 | } | ||
1230 | |||
1231 | // SetRoleSessionName sets the RoleSessionName field's value. | ||
1232 | func (s *AssumeRoleInput) SetRoleSessionName(v string) *AssumeRoleInput { | ||
1233 | s.RoleSessionName = &v | ||
1234 | return s | ||
1235 | } | ||
1236 | |||
1237 | // SetSerialNumber sets the SerialNumber field's value. | ||
1238 | func (s *AssumeRoleInput) SetSerialNumber(v string) *AssumeRoleInput { | ||
1239 | s.SerialNumber = &v | ||
1240 | return s | ||
1241 | } | ||
1242 | |||
1243 | // SetTokenCode sets the TokenCode field's value. | ||
1244 | func (s *AssumeRoleInput) SetTokenCode(v string) *AssumeRoleInput { | ||
1245 | s.TokenCode = &v | ||
1246 | return s | ||
1247 | } | ||
1248 | |||
1249 | // Contains the response to a successful AssumeRole request, including temporary | ||
1250 | // AWS credentials that can be used to make AWS requests. | ||
1251 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleResponse | ||
1252 | type AssumeRoleOutput struct { | ||
1253 | _ struct{} `type:"structure"` | ||
1254 | |||
1255 | // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers | ||
1256 | // that you can use to refer to the resulting temporary security credentials. | ||
1257 | // For example, you can reference these credentials as a principal in a resource-based | ||
1258 | // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName | ||
1259 | // that you specified when you called AssumeRole. | ||
1260 | AssumedRoleUser *AssumedRoleUser `type:"structure"` | ||
1261 | |||
1262 | // The temporary security credentials, which include an access key ID, a secret | ||
1263 | // access key, and a security (or session) token. | ||
1264 | // | ||
1265 | // Note: The size of the security token that STS APIs return is not fixed. We | ||
1266 | // strongly recommend that you make no assumptions about the maximum size. As | ||
1267 | // of this writing, the typical size is less than 4096 bytes, but that can vary. | ||
1268 | // Also, future updates to AWS might require larger sizes. | ||
1269 | Credentials *Credentials `type:"structure"` | ||
1270 | |||
1271 | // A percentage value that indicates the size of the policy in packed form. | ||
1272 | // The service rejects any policy with a packed size greater than 100 percent, | ||
1273 | // which means the policy exceeded the allowed space. | ||
1274 | PackedPolicySize *int64 `type:"integer"` | ||
1275 | } | ||
1276 | |||
1277 | // String returns the string representation | ||
1278 | func (s AssumeRoleOutput) String() string { | ||
1279 | return awsutil.Prettify(s) | ||
1280 | } | ||
1281 | |||
1282 | // GoString returns the string representation | ||
1283 | func (s AssumeRoleOutput) GoString() string { | ||
1284 | return s.String() | ||
1285 | } | ||
1286 | |||
1287 | // SetAssumedRoleUser sets the AssumedRoleUser field's value. | ||
1288 | func (s *AssumeRoleOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleOutput { | ||
1289 | s.AssumedRoleUser = v | ||
1290 | return s | ||
1291 | } | ||
1292 | |||
1293 | // SetCredentials sets the Credentials field's value. | ||
1294 | func (s *AssumeRoleOutput) SetCredentials(v *Credentials) *AssumeRoleOutput { | ||
1295 | s.Credentials = v | ||
1296 | return s | ||
1297 | } | ||
1298 | |||
1299 | // SetPackedPolicySize sets the PackedPolicySize field's value. | ||
1300 | func (s *AssumeRoleOutput) SetPackedPolicySize(v int64) *AssumeRoleOutput { | ||
1301 | s.PackedPolicySize = &v | ||
1302 | return s | ||
1303 | } | ||
1304 | |||
1305 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLRequest | ||
1306 | type AssumeRoleWithSAMLInput struct { | ||
1307 | _ struct{} `type:"structure"` | ||
1308 | |||
1309 | // The duration, in seconds, of the role session. The value can range from 900 | ||
1310 | // seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set | ||
1311 | // to 3600 seconds. An expiration can also be specified in the SAML authentication | ||
1312 | // response's SessionNotOnOrAfter value. The actual expiration time is whichever | ||
1313 | // value is shorter. | ||
1314 | // | ||
1315 | // This is separate from the duration of a console session that you might request | ||
1316 | // using the returned credentials. The request to the federation endpoint for | ||
1317 | // a console sign-in token takes a SessionDuration parameter that specifies | ||
1318 | // the maximum length of the console session, separately from the DurationSeconds | ||
1319 | // parameter on this API. For more information, see Enabling SAML 2.0 Federated | ||
1320 | // Users to Access the AWS Management Console (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html) | ||
1321 | // in the IAM User Guide. | ||
1322 | DurationSeconds *int64 `min:"900" type:"integer"` | ||
1323 | |||
1324 | // An IAM policy in JSON format. | ||
1325 | // | ||
1326 | // The policy parameter is optional. If you pass a policy, the temporary security | ||
1327 | // credentials that are returned by the operation have the permissions that | ||
1328 | // are allowed by both the access policy of the role that is being assumed, | ||
1329 | // and the policy that you pass. This gives you a way to further restrict the | ||
1330 | // permissions for the resulting temporary security credentials. You cannot | ||
1331 | // use the passed policy to grant permissions that are in excess of those allowed | ||
1332 | // by the access policy of the role that is being assumed. For more information, | ||
1333 | // Permissions for AssumeRole, AssumeRoleWithSAML, and AssumeRoleWithWebIdentity | ||
1334 | // (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) | ||
1335 | // in the IAM User Guide. | ||
1336 | // | ||
1337 | // The format for this parameter, as described by its regex pattern, is a string | ||
1338 | // of characters up to 2048 characters in length. The characters can be any | ||
1339 | // ASCII character from the space character to the end of the valid character | ||
1340 | // list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), | ||
1341 | // and carriage return (\u000D) characters. | ||
1342 | // | ||
1343 | // The policy plain text must be 2048 bytes or shorter. However, an internal | ||
1344 | // conversion compresses it into a packed binary format with a separate limit. | ||
1345 | // The PackedPolicySize response element indicates by percentage how close to | ||
1346 | // the upper size limit the policy is, with 100% equaling the maximum allowed | ||
1347 | // size. | ||
1348 | Policy *string `min:"1" type:"string"` | ||
1349 | |||
1350 | // The Amazon Resource Name (ARN) of the SAML provider in IAM that describes | ||
1351 | // the IdP. | ||
1352 | // | ||
1353 | // PrincipalArn is a required field | ||
1354 | PrincipalArn *string `min:"20" type:"string" required:"true"` | ||
1355 | |||
1356 | // The Amazon Resource Name (ARN) of the role that the caller is assuming. | ||
1357 | // | ||
1358 | // RoleArn is a required field | ||
1359 | RoleArn *string `min:"20" type:"string" required:"true"` | ||
1360 | |||
1361 | // The base-64 encoded SAML authentication response provided by the IdP. | ||
1362 | // | ||
1363 | // For more information, see Configuring a Relying Party and Adding Claims (http://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html) | ||
1364 | // in the Using IAM guide. | ||
1365 | // | ||
1366 | // SAMLAssertion is a required field | ||
1367 | SAMLAssertion *string `min:"4" type:"string" required:"true"` | ||
1368 | } | ||
1369 | |||
1370 | // String returns the string representation | ||
1371 | func (s AssumeRoleWithSAMLInput) String() string { | ||
1372 | return awsutil.Prettify(s) | ||
1373 | } | ||
1374 | |||
1375 | // GoString returns the string representation | ||
1376 | func (s AssumeRoleWithSAMLInput) GoString() string { | ||
1377 | return s.String() | ||
1378 | } | ||
1379 | |||
1380 | // Validate inspects the fields of the type to determine if they are valid. | ||
1381 | func (s *AssumeRoleWithSAMLInput) Validate() error { | ||
1382 | invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithSAMLInput"} | ||
1383 | if s.DurationSeconds != nil && *s.DurationSeconds < 900 { | ||
1384 | invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) | ||
1385 | } | ||
1386 | if s.Policy != nil && len(*s.Policy) < 1 { | ||
1387 | invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) | ||
1388 | } | ||
1389 | if s.PrincipalArn == nil { | ||
1390 | invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) | ||
1391 | } | ||
1392 | if s.PrincipalArn != nil && len(*s.PrincipalArn) < 20 { | ||
1393 | invalidParams.Add(request.NewErrParamMinLen("PrincipalArn", 20)) | ||
1394 | } | ||
1395 | if s.RoleArn == nil { | ||
1396 | invalidParams.Add(request.NewErrParamRequired("RoleArn")) | ||
1397 | } | ||
1398 | if s.RoleArn != nil && len(*s.RoleArn) < 20 { | ||
1399 | invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) | ||
1400 | } | ||
1401 | if s.SAMLAssertion == nil { | ||
1402 | invalidParams.Add(request.NewErrParamRequired("SAMLAssertion")) | ||
1403 | } | ||
1404 | if s.SAMLAssertion != nil && len(*s.SAMLAssertion) < 4 { | ||
1405 | invalidParams.Add(request.NewErrParamMinLen("SAMLAssertion", 4)) | ||
1406 | } | ||
1407 | |||
1408 | if invalidParams.Len() > 0 { | ||
1409 | return invalidParams | ||
1410 | } | ||
1411 | return nil | ||
1412 | } | ||
1413 | |||
1414 | // SetDurationSeconds sets the DurationSeconds field's value. | ||
1415 | func (s *AssumeRoleWithSAMLInput) SetDurationSeconds(v int64) *AssumeRoleWithSAMLInput { | ||
1416 | s.DurationSeconds = &v | ||
1417 | return s | ||
1418 | } | ||
1419 | |||
1420 | // SetPolicy sets the Policy field's value. | ||
1421 | func (s *AssumeRoleWithSAMLInput) SetPolicy(v string) *AssumeRoleWithSAMLInput { | ||
1422 | s.Policy = &v | ||
1423 | return s | ||
1424 | } | ||
1425 | |||
1426 | // SetPrincipalArn sets the PrincipalArn field's value. | ||
1427 | func (s *AssumeRoleWithSAMLInput) SetPrincipalArn(v string) *AssumeRoleWithSAMLInput { | ||
1428 | s.PrincipalArn = &v | ||
1429 | return s | ||
1430 | } | ||
1431 | |||
1432 | // SetRoleArn sets the RoleArn field's value. | ||
1433 | func (s *AssumeRoleWithSAMLInput) SetRoleArn(v string) *AssumeRoleWithSAMLInput { | ||
1434 | s.RoleArn = &v | ||
1435 | return s | ||
1436 | } | ||
1437 | |||
1438 | // SetSAMLAssertion sets the SAMLAssertion field's value. | ||
1439 | func (s *AssumeRoleWithSAMLInput) SetSAMLAssertion(v string) *AssumeRoleWithSAMLInput { | ||
1440 | s.SAMLAssertion = &v | ||
1441 | return s | ||
1442 | } | ||
1443 | |||
1444 | // Contains the response to a successful AssumeRoleWithSAML request, including | ||
1445 | // temporary AWS credentials that can be used to make AWS requests. | ||
1446 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAMLResponse | ||
1447 | type AssumeRoleWithSAMLOutput struct { | ||
1448 | _ struct{} `type:"structure"` | ||
1449 | |||
1450 | // The identifiers for the temporary security credentials that the operation | ||
1451 | // returns. | ||
1452 | AssumedRoleUser *AssumedRoleUser `type:"structure"` | ||
1453 | |||
1454 | // The value of the Recipient attribute of the SubjectConfirmationData element | ||
1455 | // of the SAML assertion. | ||
1456 | Audience *string `type:"string"` | ||
1457 | |||
1458 | // The temporary security credentials, which include an access key ID, a secret | ||
1459 | // access key, and a security (or session) token. | ||
1460 | // | ||
1461 | // Note: The size of the security token that STS APIs return is not fixed. We | ||
1462 | // strongly recommend that you make no assumptions about the maximum size. As | ||
1463 | // of this writing, the typical size is less than 4096 bytes, but that can vary. | ||
1464 | // Also, future updates to AWS might require larger sizes. | ||
1465 | Credentials *Credentials `type:"structure"` | ||
1466 | |||
1467 | // The value of the Issuer element of the SAML assertion. | ||
1468 | Issuer *string `type:"string"` | ||
1469 | |||
1470 | // A hash value based on the concatenation of the Issuer response value, the | ||
1471 | // AWS account ID, and the friendly name (the last part of the ARN) of the SAML | ||
1472 | // provider in IAM. The combination of NameQualifier and Subject can be used | ||
1473 | // to uniquely identify a federated user. | ||
1474 | // | ||
1475 | // The following pseudocode shows how the hash value is calculated: | ||
1476 | // | ||
1477 | // BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" | ||
1478 | // ) ) | ||
1479 | NameQualifier *string `type:"string"` | ||
1480 | |||
1481 | // A percentage value that indicates the size of the policy in packed form. | ||
1482 | // The service rejects any policy with a packed size greater than 100 percent, | ||
1483 | // which means the policy exceeded the allowed space. | ||
1484 | PackedPolicySize *int64 `type:"integer"` | ||
1485 | |||
1486 | // The value of the NameID element in the Subject element of the SAML assertion. | ||
1487 | Subject *string `type:"string"` | ||
1488 | |||
1489 | // The format of the name ID, as defined by the Format attribute in the NameID | ||
1490 | // element of the SAML assertion. Typical examples of the format are transient | ||
1491 | // or persistent. | ||
1492 | // | ||
1493 | // If the format includes the prefix urn:oasis:names:tc:SAML:2.0:nameid-format, | ||
1494 | // that prefix is removed. For example, urn:oasis:names:tc:SAML:2.0:nameid-format:transient | ||
1495 | // is returned as transient. If the format includes any other prefix, the format | ||
1496 | // is returned with no modifications. | ||
1497 | SubjectType *string `type:"string"` | ||
1498 | } | ||
1499 | |||
1500 | // String returns the string representation | ||
1501 | func (s AssumeRoleWithSAMLOutput) String() string { | ||
1502 | return awsutil.Prettify(s) | ||
1503 | } | ||
1504 | |||
1505 | // GoString returns the string representation | ||
1506 | func (s AssumeRoleWithSAMLOutput) GoString() string { | ||
1507 | return s.String() | ||
1508 | } | ||
1509 | |||
1510 | // SetAssumedRoleUser sets the AssumedRoleUser field's value. | ||
1511 | func (s *AssumeRoleWithSAMLOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleWithSAMLOutput { | ||
1512 | s.AssumedRoleUser = v | ||
1513 | return s | ||
1514 | } | ||
1515 | |||
1516 | // SetAudience sets the Audience field's value. | ||
1517 | func (s *AssumeRoleWithSAMLOutput) SetAudience(v string) *AssumeRoleWithSAMLOutput { | ||
1518 | s.Audience = &v | ||
1519 | return s | ||
1520 | } | ||
1521 | |||
1522 | // SetCredentials sets the Credentials field's value. | ||
1523 | func (s *AssumeRoleWithSAMLOutput) SetCredentials(v *Credentials) *AssumeRoleWithSAMLOutput { | ||
1524 | s.Credentials = v | ||
1525 | return s | ||
1526 | } | ||
1527 | |||
1528 | // SetIssuer sets the Issuer field's value. | ||
1529 | func (s *AssumeRoleWithSAMLOutput) SetIssuer(v string) *AssumeRoleWithSAMLOutput { | ||
1530 | s.Issuer = &v | ||
1531 | return s | ||
1532 | } | ||
1533 | |||
1534 | // SetNameQualifier sets the NameQualifier field's value. | ||
1535 | func (s *AssumeRoleWithSAMLOutput) SetNameQualifier(v string) *AssumeRoleWithSAMLOutput { | ||
1536 | s.NameQualifier = &v | ||
1537 | return s | ||
1538 | } | ||
1539 | |||
1540 | // SetPackedPolicySize sets the PackedPolicySize field's value. | ||
1541 | func (s *AssumeRoleWithSAMLOutput) SetPackedPolicySize(v int64) *AssumeRoleWithSAMLOutput { | ||
1542 | s.PackedPolicySize = &v | ||
1543 | return s | ||
1544 | } | ||
1545 | |||
1546 | // SetSubject sets the Subject field's value. | ||
1547 | func (s *AssumeRoleWithSAMLOutput) SetSubject(v string) *AssumeRoleWithSAMLOutput { | ||
1548 | s.Subject = &v | ||
1549 | return s | ||
1550 | } | ||
1551 | |||
1552 | // SetSubjectType sets the SubjectType field's value. | ||
1553 | func (s *AssumeRoleWithSAMLOutput) SetSubjectType(v string) *AssumeRoleWithSAMLOutput { | ||
1554 | s.SubjectType = &v | ||
1555 | return s | ||
1556 | } | ||
1557 | |||
1558 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityRequest | ||
1559 | type AssumeRoleWithWebIdentityInput struct { | ||
1560 | _ struct{} `type:"structure"` | ||
1561 | |||
1562 | // The duration, in seconds, of the role session. The value can range from 900 | ||
1563 | // seconds (15 minutes) to 3600 seconds (1 hour). By default, the value is set | ||
1564 | // to 3600 seconds. | ||
1565 | // | ||
1566 | // This is separate from the duration of a console session that you might request | ||
1567 | // using the returned credentials. The request to the federation endpoint for | ||
1568 | // a console sign-in token takes a SessionDuration parameter that specifies | ||
1569 | // the maximum length of the console session, separately from the DurationSeconds | ||
1570 | // parameter on this API. For more information, see Creating a URL that Enables | ||
1571 | // Federated Users to Access the AWS Management Console (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) | ||
1572 | // in the IAM User Guide. | ||
1573 | DurationSeconds *int64 `min:"900" type:"integer"` | ||
1574 | |||
1575 | // An IAM policy in JSON format. | ||
1576 | // | ||
1577 | // The policy parameter is optional. If you pass a policy, the temporary security | ||
1578 | // credentials that are returned by the operation have the permissions that | ||
1579 | // are allowed by both the access policy of the role that is being assumed, | ||
1580 | // and the policy that you pass. This gives you a way to further restrict the | ||
1581 | // permissions for the resulting temporary security credentials. You cannot | ||
1582 | // use the passed policy to grant permissions that are in excess of those allowed | ||
1583 | // by the access policy of the role that is being assumed. For more information, | ||
1584 | // see Permissions for AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_assumerole.html) | ||
1585 | // in the IAM User Guide. | ||
1586 | // | ||
1587 | // The format for this parameter, as described by its regex pattern, is a string | ||
1588 | // of characters up to 2048 characters in length. The characters can be any | ||
1589 | // ASCII character from the space character to the end of the valid character | ||
1590 | // list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), | ||
1591 | // and carriage return (\u000D) characters. | ||
1592 | // | ||
1593 | // The policy plain text must be 2048 bytes or shorter. However, an internal | ||
1594 | // conversion compresses it into a packed binary format with a separate limit. | ||
1595 | // The PackedPolicySize response element indicates by percentage how close to | ||
1596 | // the upper size limit the policy is, with 100% equaling the maximum allowed | ||
1597 | // size. | ||
1598 | Policy *string `min:"1" type:"string"` | ||
1599 | |||
1600 | // The fully qualified host component of the domain name of the identity provider. | ||
1601 | // | ||
1602 | // Specify this value only for OAuth 2.0 access tokens. Currently www.amazon.com | ||
1603 | // and graph.facebook.com are the only supported identity providers for OAuth | ||
1604 | // 2.0 access tokens. Do not include URL schemes and port numbers. | ||
1605 | // | ||
1606 | // Do not specify this value for OpenID Connect ID tokens. | ||
1607 | ProviderId *string `min:"4" type:"string"` | ||
1608 | |||
1609 | // The Amazon Resource Name (ARN) of the role that the caller is assuming. | ||
1610 | // | ||
1611 | // RoleArn is a required field | ||
1612 | RoleArn *string `min:"20" type:"string" required:"true"` | ||
1613 | |||
1614 | // An identifier for the assumed role session. Typically, you pass the name | ||
1615 | // or identifier that is associated with the user who is using your application. | ||
1616 | // That way, the temporary security credentials that your application will use | ||
1617 | // are associated with that user. This session name is included as part of the | ||
1618 | // ARN and assumed role ID in the AssumedRoleUser response element. | ||
1619 | // | ||
1620 | // The regex used to validate this parameter is a string of characters consisting | ||
1621 | // of upper- and lower-case alphanumeric characters with no spaces. You can | ||
1622 | // also include underscores or any of the following characters: =,.@- | ||
1623 | // | ||
1624 | // RoleSessionName is a required field | ||
1625 | RoleSessionName *string `min:"2" type:"string" required:"true"` | ||
1626 | |||
1627 | // The OAuth 2.0 access token or OpenID Connect ID token that is provided by | ||
1628 | // the identity provider. Your application must get this token by authenticating | ||
1629 | // the user who is using your application with a web identity provider before | ||
1630 | // the application makes an AssumeRoleWithWebIdentity call. | ||
1631 | // | ||
1632 | // WebIdentityToken is a required field | ||
1633 | WebIdentityToken *string `min:"4" type:"string" required:"true"` | ||
1634 | } | ||
1635 | |||
1636 | // String returns the string representation | ||
1637 | func (s AssumeRoleWithWebIdentityInput) String() string { | ||
1638 | return awsutil.Prettify(s) | ||
1639 | } | ||
1640 | |||
1641 | // GoString returns the string representation | ||
1642 | func (s AssumeRoleWithWebIdentityInput) GoString() string { | ||
1643 | return s.String() | ||
1644 | } | ||
1645 | |||
1646 | // Validate inspects the fields of the type to determine if they are valid. | ||
1647 | func (s *AssumeRoleWithWebIdentityInput) Validate() error { | ||
1648 | invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithWebIdentityInput"} | ||
1649 | if s.DurationSeconds != nil && *s.DurationSeconds < 900 { | ||
1650 | invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) | ||
1651 | } | ||
1652 | if s.Policy != nil && len(*s.Policy) < 1 { | ||
1653 | invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) | ||
1654 | } | ||
1655 | if s.ProviderId != nil && len(*s.ProviderId) < 4 { | ||
1656 | invalidParams.Add(request.NewErrParamMinLen("ProviderId", 4)) | ||
1657 | } | ||
1658 | if s.RoleArn == nil { | ||
1659 | invalidParams.Add(request.NewErrParamRequired("RoleArn")) | ||
1660 | } | ||
1661 | if s.RoleArn != nil && len(*s.RoleArn) < 20 { | ||
1662 | invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) | ||
1663 | } | ||
1664 | if s.RoleSessionName == nil { | ||
1665 | invalidParams.Add(request.NewErrParamRequired("RoleSessionName")) | ||
1666 | } | ||
1667 | if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 { | ||
1668 | invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2)) | ||
1669 | } | ||
1670 | if s.WebIdentityToken == nil { | ||
1671 | invalidParams.Add(request.NewErrParamRequired("WebIdentityToken")) | ||
1672 | } | ||
1673 | if s.WebIdentityToken != nil && len(*s.WebIdentityToken) < 4 { | ||
1674 | invalidParams.Add(request.NewErrParamMinLen("WebIdentityToken", 4)) | ||
1675 | } | ||
1676 | |||
1677 | if invalidParams.Len() > 0 { | ||
1678 | return invalidParams | ||
1679 | } | ||
1680 | return nil | ||
1681 | } | ||
1682 | |||
1683 | // SetDurationSeconds sets the DurationSeconds field's value. | ||
1684 | func (s *AssumeRoleWithWebIdentityInput) SetDurationSeconds(v int64) *AssumeRoleWithWebIdentityInput { | ||
1685 | s.DurationSeconds = &v | ||
1686 | return s | ||
1687 | } | ||
1688 | |||
1689 | // SetPolicy sets the Policy field's value. | ||
1690 | func (s *AssumeRoleWithWebIdentityInput) SetPolicy(v string) *AssumeRoleWithWebIdentityInput { | ||
1691 | s.Policy = &v | ||
1692 | return s | ||
1693 | } | ||
1694 | |||
1695 | // SetProviderId sets the ProviderId field's value. | ||
1696 | func (s *AssumeRoleWithWebIdentityInput) SetProviderId(v string) *AssumeRoleWithWebIdentityInput { | ||
1697 | s.ProviderId = &v | ||
1698 | return s | ||
1699 | } | ||
1700 | |||
1701 | // SetRoleArn sets the RoleArn field's value. | ||
1702 | func (s *AssumeRoleWithWebIdentityInput) SetRoleArn(v string) *AssumeRoleWithWebIdentityInput { | ||
1703 | s.RoleArn = &v | ||
1704 | return s | ||
1705 | } | ||
1706 | |||
1707 | // SetRoleSessionName sets the RoleSessionName field's value. | ||
1708 | func (s *AssumeRoleWithWebIdentityInput) SetRoleSessionName(v string) *AssumeRoleWithWebIdentityInput { | ||
1709 | s.RoleSessionName = &v | ||
1710 | return s | ||
1711 | } | ||
1712 | |||
1713 | // SetWebIdentityToken sets the WebIdentityToken field's value. | ||
1714 | func (s *AssumeRoleWithWebIdentityInput) SetWebIdentityToken(v string) *AssumeRoleWithWebIdentityInput { | ||
1715 | s.WebIdentityToken = &v | ||
1716 | return s | ||
1717 | } | ||
1718 | |||
1719 | // Contains the response to a successful AssumeRoleWithWebIdentity request, | ||
1720 | // including temporary AWS credentials that can be used to make AWS requests. | ||
1721 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentityResponse | ||
1722 | type AssumeRoleWithWebIdentityOutput struct { | ||
1723 | _ struct{} `type:"structure"` | ||
1724 | |||
1725 | // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers | ||
1726 | // that you can use to refer to the resulting temporary security credentials. | ||
1727 | // For example, you can reference these credentials as a principal in a resource-based | ||
1728 | // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName | ||
1729 | // that you specified when you called AssumeRole. | ||
1730 | AssumedRoleUser *AssumedRoleUser `type:"structure"` | ||
1731 | |||
1732 | // The intended audience (also known as client ID) of the web identity token. | ||
1733 | // This is traditionally the client identifier issued to the application that | ||
1734 | // requested the web identity token. | ||
1735 | Audience *string `type:"string"` | ||
1736 | |||
1737 | // The temporary security credentials, which include an access key ID, a secret | ||
1738 | // access key, and a security token. | ||
1739 | // | ||
1740 | // Note: The size of the security token that STS APIs return is not fixed. We | ||
1741 | // strongly recommend that you make no assumptions about the maximum size. As | ||
1742 | // of this writing, the typical size is less than 4096 bytes, but that can vary. | ||
1743 | // Also, future updates to AWS might require larger sizes. | ||
1744 | Credentials *Credentials `type:"structure"` | ||
1745 | |||
1746 | // A percentage value that indicates the size of the policy in packed form. | ||
1747 | // The service rejects any policy with a packed size greater than 100 percent, | ||
1748 | // which means the policy exceeded the allowed space. | ||
1749 | PackedPolicySize *int64 `type:"integer"` | ||
1750 | |||
1751 | // The issuing authority of the web identity token presented. For OpenID Connect | ||
1752 | // ID Tokens this contains the value of the iss field. For OAuth 2.0 access | ||
1753 | // tokens, this contains the value of the ProviderId parameter that was passed | ||
1754 | // in the AssumeRoleWithWebIdentity request. | ||
1755 | Provider *string `type:"string"` | ||
1756 | |||
1757 | // The unique user identifier that is returned by the identity provider. This | ||
1758 | // identifier is associated with the WebIdentityToken that was submitted with | ||
1759 | // the AssumeRoleWithWebIdentity call. The identifier is typically unique to | ||
1760 | // the user and the application that acquired the WebIdentityToken (pairwise | ||
1761 | // identifier). For OpenID Connect ID tokens, this field contains the value | ||
1762 | // returned by the identity provider as the token's sub (Subject) claim. | ||
1763 | SubjectFromWebIdentityToken *string `min:"6" type:"string"` | ||
1764 | } | ||
1765 | |||
1766 | // String returns the string representation | ||
1767 | func (s AssumeRoleWithWebIdentityOutput) String() string { | ||
1768 | return awsutil.Prettify(s) | ||
1769 | } | ||
1770 | |||
1771 | // GoString returns the string representation | ||
1772 | func (s AssumeRoleWithWebIdentityOutput) GoString() string { | ||
1773 | return s.String() | ||
1774 | } | ||
1775 | |||
1776 | // SetAssumedRoleUser sets the AssumedRoleUser field's value. | ||
1777 | func (s *AssumeRoleWithWebIdentityOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleWithWebIdentityOutput { | ||
1778 | s.AssumedRoleUser = v | ||
1779 | return s | ||
1780 | } | ||
1781 | |||
1782 | // SetAudience sets the Audience field's value. | ||
1783 | func (s *AssumeRoleWithWebIdentityOutput) SetAudience(v string) *AssumeRoleWithWebIdentityOutput { | ||
1784 | s.Audience = &v | ||
1785 | return s | ||
1786 | } | ||
1787 | |||
1788 | // SetCredentials sets the Credentials field's value. | ||
1789 | func (s *AssumeRoleWithWebIdentityOutput) SetCredentials(v *Credentials) *AssumeRoleWithWebIdentityOutput { | ||
1790 | s.Credentials = v | ||
1791 | return s | ||
1792 | } | ||
1793 | |||
1794 | // SetPackedPolicySize sets the PackedPolicySize field's value. | ||
1795 | func (s *AssumeRoleWithWebIdentityOutput) SetPackedPolicySize(v int64) *AssumeRoleWithWebIdentityOutput { | ||
1796 | s.PackedPolicySize = &v | ||
1797 | return s | ||
1798 | } | ||
1799 | |||
1800 | // SetProvider sets the Provider field's value. | ||
1801 | func (s *AssumeRoleWithWebIdentityOutput) SetProvider(v string) *AssumeRoleWithWebIdentityOutput { | ||
1802 | s.Provider = &v | ||
1803 | return s | ||
1804 | } | ||
1805 | |||
1806 | // SetSubjectFromWebIdentityToken sets the SubjectFromWebIdentityToken field's value. | ||
1807 | func (s *AssumeRoleWithWebIdentityOutput) SetSubjectFromWebIdentityToken(v string) *AssumeRoleWithWebIdentityOutput { | ||
1808 | s.SubjectFromWebIdentityToken = &v | ||
1809 | return s | ||
1810 | } | ||
1811 | |||
1812 | // The identifiers for the temporary security credentials that the operation | ||
1813 | // returns. | ||
1814 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumedRoleUser | ||
1815 | type AssumedRoleUser struct { | ||
1816 | _ struct{} `type:"structure"` | ||
1817 | |||
1818 | // The ARN of the temporary security credentials that are returned from the | ||
1819 | // AssumeRole action. For more information about ARNs and how to use them in | ||
1820 | // policies, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) | ||
1821 | // in Using IAM. | ||
1822 | // | ||
1823 | // Arn is a required field | ||
1824 | Arn *string `min:"20" type:"string" required:"true"` | ||
1825 | |||
1826 | // A unique identifier that contains the role ID and the role session name of | ||
1827 | // the role that is being assumed. The role ID is generated by AWS when the | ||
1828 | // role is created. | ||
1829 | // | ||
1830 | // AssumedRoleId is a required field | ||
1831 | AssumedRoleId *string `min:"2" type:"string" required:"true"` | ||
1832 | } | ||
1833 | |||
1834 | // String returns the string representation | ||
1835 | func (s AssumedRoleUser) String() string { | ||
1836 | return awsutil.Prettify(s) | ||
1837 | } | ||
1838 | |||
1839 | // GoString returns the string representation | ||
1840 | func (s AssumedRoleUser) GoString() string { | ||
1841 | return s.String() | ||
1842 | } | ||
1843 | |||
1844 | // SetArn sets the Arn field's value. | ||
1845 | func (s *AssumedRoleUser) SetArn(v string) *AssumedRoleUser { | ||
1846 | s.Arn = &v | ||
1847 | return s | ||
1848 | } | ||
1849 | |||
1850 | // SetAssumedRoleId sets the AssumedRoleId field's value. | ||
1851 | func (s *AssumedRoleUser) SetAssumedRoleId(v string) *AssumedRoleUser { | ||
1852 | s.AssumedRoleId = &v | ||
1853 | return s | ||
1854 | } | ||
1855 | |||
1856 | // AWS credentials for API authentication. | ||
1857 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/Credentials | ||
1858 | type Credentials struct { | ||
1859 | _ struct{} `type:"structure"` | ||
1860 | |||
1861 | // The access key ID that identifies the temporary security credentials. | ||
1862 | // | ||
1863 | // AccessKeyId is a required field | ||
1864 | AccessKeyId *string `min:"16" type:"string" required:"true"` | ||
1865 | |||
1866 | // The date on which the current credentials expire. | ||
1867 | // | ||
1868 | // Expiration is a required field | ||
1869 | Expiration *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"` | ||
1870 | |||
1871 | // The secret access key that can be used to sign requests. | ||
1872 | // | ||
1873 | // SecretAccessKey is a required field | ||
1874 | SecretAccessKey *string `type:"string" required:"true"` | ||
1875 | |||
1876 | // The token that users must pass to the service API to use the temporary credentials. | ||
1877 | // | ||
1878 | // SessionToken is a required field | ||
1879 | SessionToken *string `type:"string" required:"true"` | ||
1880 | } | ||
1881 | |||
1882 | // String returns the string representation | ||
1883 | func (s Credentials) String() string { | ||
1884 | return awsutil.Prettify(s) | ||
1885 | } | ||
1886 | |||
1887 | // GoString returns the string representation | ||
1888 | func (s Credentials) GoString() string { | ||
1889 | return s.String() | ||
1890 | } | ||
1891 | |||
1892 | // SetAccessKeyId sets the AccessKeyId field's value. | ||
1893 | func (s *Credentials) SetAccessKeyId(v string) *Credentials { | ||
1894 | s.AccessKeyId = &v | ||
1895 | return s | ||
1896 | } | ||
1897 | |||
1898 | // SetExpiration sets the Expiration field's value. | ||
1899 | func (s *Credentials) SetExpiration(v time.Time) *Credentials { | ||
1900 | s.Expiration = &v | ||
1901 | return s | ||
1902 | } | ||
1903 | |||
1904 | // SetSecretAccessKey sets the SecretAccessKey field's value. | ||
1905 | func (s *Credentials) SetSecretAccessKey(v string) *Credentials { | ||
1906 | s.SecretAccessKey = &v | ||
1907 | return s | ||
1908 | } | ||
1909 | |||
1910 | // SetSessionToken sets the SessionToken field's value. | ||
1911 | func (s *Credentials) SetSessionToken(v string) *Credentials { | ||
1912 | s.SessionToken = &v | ||
1913 | return s | ||
1914 | } | ||
1915 | |||
1916 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageRequest | ||
1917 | type DecodeAuthorizationMessageInput struct { | ||
1918 | _ struct{} `type:"structure"` | ||
1919 | |||
1920 | // The encoded message that was returned with the response. | ||
1921 | // | ||
1922 | // EncodedMessage is a required field | ||
1923 | EncodedMessage *string `min:"1" type:"string" required:"true"` | ||
1924 | } | ||
1925 | |||
1926 | // String returns the string representation | ||
1927 | func (s DecodeAuthorizationMessageInput) String() string { | ||
1928 | return awsutil.Prettify(s) | ||
1929 | } | ||
1930 | |||
1931 | // GoString returns the string representation | ||
1932 | func (s DecodeAuthorizationMessageInput) GoString() string { | ||
1933 | return s.String() | ||
1934 | } | ||
1935 | |||
1936 | // Validate inspects the fields of the type to determine if they are valid. | ||
1937 | func (s *DecodeAuthorizationMessageInput) Validate() error { | ||
1938 | invalidParams := request.ErrInvalidParams{Context: "DecodeAuthorizationMessageInput"} | ||
1939 | if s.EncodedMessage == nil { | ||
1940 | invalidParams.Add(request.NewErrParamRequired("EncodedMessage")) | ||
1941 | } | ||
1942 | if s.EncodedMessage != nil && len(*s.EncodedMessage) < 1 { | ||
1943 | invalidParams.Add(request.NewErrParamMinLen("EncodedMessage", 1)) | ||
1944 | } | ||
1945 | |||
1946 | if invalidParams.Len() > 0 { | ||
1947 | return invalidParams | ||
1948 | } | ||
1949 | return nil | ||
1950 | } | ||
1951 | |||
1952 | // SetEncodedMessage sets the EncodedMessage field's value. | ||
1953 | func (s *DecodeAuthorizationMessageInput) SetEncodedMessage(v string) *DecodeAuthorizationMessageInput { | ||
1954 | s.EncodedMessage = &v | ||
1955 | return s | ||
1956 | } | ||
1957 | |||
1958 | // A document that contains additional information about the authorization status | ||
1959 | // of a request from an encoded message that is returned in response to an AWS | ||
1960 | // request. | ||
1961 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessageResponse | ||
1962 | type DecodeAuthorizationMessageOutput struct { | ||
1963 | _ struct{} `type:"structure"` | ||
1964 | |||
1965 | // An XML document that contains the decoded message. | ||
1966 | DecodedMessage *string `type:"string"` | ||
1967 | } | ||
1968 | |||
1969 | // String returns the string representation | ||
1970 | func (s DecodeAuthorizationMessageOutput) String() string { | ||
1971 | return awsutil.Prettify(s) | ||
1972 | } | ||
1973 | |||
1974 | // GoString returns the string representation | ||
1975 | func (s DecodeAuthorizationMessageOutput) GoString() string { | ||
1976 | return s.String() | ||
1977 | } | ||
1978 | |||
1979 | // SetDecodedMessage sets the DecodedMessage field's value. | ||
1980 | func (s *DecodeAuthorizationMessageOutput) SetDecodedMessage(v string) *DecodeAuthorizationMessageOutput { | ||
1981 | s.DecodedMessage = &v | ||
1982 | return s | ||
1983 | } | ||
1984 | |||
1985 | // Identifiers for the federated user that is associated with the credentials. | ||
1986 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/FederatedUser | ||
1987 | type FederatedUser struct { | ||
1988 | _ struct{} `type:"structure"` | ||
1989 | |||
1990 | // The ARN that specifies the federated user that is associated with the credentials. | ||
1991 | // For more information about ARNs and how to use them in policies, see IAM | ||
1992 | // Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) | ||
1993 | // in Using IAM. | ||
1994 | // | ||
1995 | // Arn is a required field | ||
1996 | Arn *string `min:"20" type:"string" required:"true"` | ||
1997 | |||
1998 | // The string that identifies the federated user associated with the credentials, | ||
1999 | // similar to the unique ID of an IAM user. | ||
2000 | // | ||
2001 | // FederatedUserId is a required field | ||
2002 | FederatedUserId *string `min:"2" type:"string" required:"true"` | ||
2003 | } | ||
2004 | |||
2005 | // String returns the string representation | ||
2006 | func (s FederatedUser) String() string { | ||
2007 | return awsutil.Prettify(s) | ||
2008 | } | ||
2009 | |||
2010 | // GoString returns the string representation | ||
2011 | func (s FederatedUser) GoString() string { | ||
2012 | return s.String() | ||
2013 | } | ||
2014 | |||
2015 | // SetArn sets the Arn field's value. | ||
2016 | func (s *FederatedUser) SetArn(v string) *FederatedUser { | ||
2017 | s.Arn = &v | ||
2018 | return s | ||
2019 | } | ||
2020 | |||
2021 | // SetFederatedUserId sets the FederatedUserId field's value. | ||
2022 | func (s *FederatedUser) SetFederatedUserId(v string) *FederatedUser { | ||
2023 | s.FederatedUserId = &v | ||
2024 | return s | ||
2025 | } | ||
2026 | |||
2027 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityRequest | ||
2028 | type GetCallerIdentityInput struct { | ||
2029 | _ struct{} `type:"structure"` | ||
2030 | } | ||
2031 | |||
2032 | // String returns the string representation | ||
2033 | func (s GetCallerIdentityInput) String() string { | ||
2034 | return awsutil.Prettify(s) | ||
2035 | } | ||
2036 | |||
2037 | // GoString returns the string representation | ||
2038 | func (s GetCallerIdentityInput) GoString() string { | ||
2039 | return s.String() | ||
2040 | } | ||
2041 | |||
2042 | // Contains the response to a successful GetCallerIdentity request, including | ||
2043 | // information about the entity making the request. | ||
2044 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentityResponse | ||
2045 | type GetCallerIdentityOutput struct { | ||
2046 | _ struct{} `type:"structure"` | ||
2047 | |||
2048 | // The AWS account ID number of the account that owns or contains the calling | ||
2049 | // entity. | ||
2050 | Account *string `type:"string"` | ||
2051 | |||
2052 | // The AWS ARN associated with the calling entity. | ||
2053 | Arn *string `min:"20" type:"string"` | ||
2054 | |||
2055 | // The unique identifier of the calling entity. The exact value depends on the | ||
2056 | // type of entity making the call. The values returned are those listed in the | ||
2057 | // aws:userid column in the Principal table (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable) | ||
2058 | // found on the Policy Variables reference page in the IAM User Guide. | ||
2059 | UserId *string `type:"string"` | ||
2060 | } | ||
2061 | |||
2062 | // String returns the string representation | ||
2063 | func (s GetCallerIdentityOutput) String() string { | ||
2064 | return awsutil.Prettify(s) | ||
2065 | } | ||
2066 | |||
2067 | // GoString returns the string representation | ||
2068 | func (s GetCallerIdentityOutput) GoString() string { | ||
2069 | return s.String() | ||
2070 | } | ||
2071 | |||
2072 | // SetAccount sets the Account field's value. | ||
2073 | func (s *GetCallerIdentityOutput) SetAccount(v string) *GetCallerIdentityOutput { | ||
2074 | s.Account = &v | ||
2075 | return s | ||
2076 | } | ||
2077 | |||
2078 | // SetArn sets the Arn field's value. | ||
2079 | func (s *GetCallerIdentityOutput) SetArn(v string) *GetCallerIdentityOutput { | ||
2080 | s.Arn = &v | ||
2081 | return s | ||
2082 | } | ||
2083 | |||
2084 | // SetUserId sets the UserId field's value. | ||
2085 | func (s *GetCallerIdentityOutput) SetUserId(v string) *GetCallerIdentityOutput { | ||
2086 | s.UserId = &v | ||
2087 | return s | ||
2088 | } | ||
2089 | |||
2090 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenRequest | ||
2091 | type GetFederationTokenInput struct { | ||
2092 | _ struct{} `type:"structure"` | ||
2093 | |||
2094 | // The duration, in seconds, that the session should last. Acceptable durations | ||
2095 | // for federation sessions range from 900 seconds (15 minutes) to 129600 seconds | ||
2096 | // (36 hours), with 43200 seconds (12 hours) as the default. Sessions obtained | ||
2097 | // using AWS account (root) credentials are restricted to a maximum of 3600 | ||
2098 | // seconds (one hour). If the specified duration is longer than one hour, the | ||
2099 | // session obtained by using AWS account (root) credentials defaults to one | ||
2100 | // hour. | ||
2101 | DurationSeconds *int64 `min:"900" type:"integer"` | ||
2102 | |||
2103 | // The name of the federated user. The name is used as an identifier for the | ||
2104 | // temporary security credentials (such as Bob). For example, you can reference | ||
2105 | // the federated user name in a resource-based policy, such as in an Amazon | ||
2106 | // S3 bucket policy. | ||
2107 | // | ||
2108 | // The regex used to validate this parameter is a string of characters consisting | ||
2109 | // of upper- and lower-case alphanumeric characters with no spaces. You can | ||
2110 | // also include underscores or any of the following characters: =,.@- | ||
2111 | // | ||
2112 | // Name is a required field | ||
2113 | Name *string `min:"2" type:"string" required:"true"` | ||
2114 | |||
2115 | // An IAM policy in JSON format that is passed with the GetFederationToken call | ||
2116 | // and evaluated along with the policy or policies that are attached to the | ||
2117 | // IAM user whose credentials are used to call GetFederationToken. The passed | ||
2118 | // policy is used to scope down the permissions that are available to the IAM | ||
2119 | // user, by allowing only a subset of the permissions that are granted to the | ||
2120 | // IAM user. The passed policy cannot grant more permissions than those granted | ||
2121 | // to the IAM user. The final permissions for the federated user are the most | ||
2122 | // restrictive set based on the intersection of the passed policy and the IAM | ||
2123 | // user policy. | ||
2124 | // | ||
2125 | // If you do not pass a policy, the resulting temporary security credentials | ||
2126 | // have no effective permissions. The only exception is when the temporary security | ||
2127 | // credentials are used to access a resource that has a resource-based policy | ||
2128 | // that specifically allows the federated user to access the resource. | ||
2129 | // | ||
2130 | // The format for this parameter, as described by its regex pattern, is a string | ||
2131 | // of characters up to 2048 characters in length. The characters can be any | ||
2132 | // ASCII character from the space character to the end of the valid character | ||
2133 | // list (\u0020-\u00FF). It can also include the tab (\u0009), linefeed (\u000A), | ||
2134 | // and carriage return (\u000D) characters. | ||
2135 | // | ||
2136 | // The policy plain text must be 2048 bytes or shorter. However, an internal | ||
2137 | // conversion compresses it into a packed binary format with a separate limit. | ||
2138 | // The PackedPolicySize response element indicates by percentage how close to | ||
2139 | // the upper size limit the policy is, with 100% equaling the maximum allowed | ||
2140 | // size. | ||
2141 | // | ||
2142 | // For more information about how permissions work, see Permissions for GetFederationToken | ||
2143 | // (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getfederationtoken.html). | ||
2144 | Policy *string `min:"1" type:"string"` | ||
2145 | } | ||
2146 | |||
2147 | // String returns the string representation | ||
2148 | func (s GetFederationTokenInput) String() string { | ||
2149 | return awsutil.Prettify(s) | ||
2150 | } | ||
2151 | |||
2152 | // GoString returns the string representation | ||
2153 | func (s GetFederationTokenInput) GoString() string { | ||
2154 | return s.String() | ||
2155 | } | ||
2156 | |||
2157 | // Validate inspects the fields of the type to determine if they are valid. | ||
2158 | func (s *GetFederationTokenInput) Validate() error { | ||
2159 | invalidParams := request.ErrInvalidParams{Context: "GetFederationTokenInput"} | ||
2160 | if s.DurationSeconds != nil && *s.DurationSeconds < 900 { | ||
2161 | invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) | ||
2162 | } | ||
2163 | if s.Name == nil { | ||
2164 | invalidParams.Add(request.NewErrParamRequired("Name")) | ||
2165 | } | ||
2166 | if s.Name != nil && len(*s.Name) < 2 { | ||
2167 | invalidParams.Add(request.NewErrParamMinLen("Name", 2)) | ||
2168 | } | ||
2169 | if s.Policy != nil && len(*s.Policy) < 1 { | ||
2170 | invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) | ||
2171 | } | ||
2172 | |||
2173 | if invalidParams.Len() > 0 { | ||
2174 | return invalidParams | ||
2175 | } | ||
2176 | return nil | ||
2177 | } | ||
2178 | |||
2179 | // SetDurationSeconds sets the DurationSeconds field's value. | ||
2180 | func (s *GetFederationTokenInput) SetDurationSeconds(v int64) *GetFederationTokenInput { | ||
2181 | s.DurationSeconds = &v | ||
2182 | return s | ||
2183 | } | ||
2184 | |||
2185 | // SetName sets the Name field's value. | ||
2186 | func (s *GetFederationTokenInput) SetName(v string) *GetFederationTokenInput { | ||
2187 | s.Name = &v | ||
2188 | return s | ||
2189 | } | ||
2190 | |||
2191 | // SetPolicy sets the Policy field's value. | ||
2192 | func (s *GetFederationTokenInput) SetPolicy(v string) *GetFederationTokenInput { | ||
2193 | s.Policy = &v | ||
2194 | return s | ||
2195 | } | ||
2196 | |||
2197 | // Contains the response to a successful GetFederationToken request, including | ||
2198 | // temporary AWS credentials that can be used to make AWS requests. | ||
2199 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationTokenResponse | ||
2200 | type GetFederationTokenOutput struct { | ||
2201 | _ struct{} `type:"structure"` | ||
2202 | |||
2203 | // The temporary security credentials, which include an access key ID, a secret | ||
2204 | // access key, and a security (or session) token. | ||
2205 | // | ||
2206 | // Note: The size of the security token that STS APIs return is not fixed. We | ||
2207 | // strongly recommend that you make no assumptions about the maximum size. As | ||
2208 | // of this writing, the typical size is less than 4096 bytes, but that can vary. | ||
2209 | // Also, future updates to AWS might require larger sizes. | ||
2210 | Credentials *Credentials `type:"structure"` | ||
2211 | |||
2212 | // Identifiers for the federated user associated with the credentials (such | ||
2213 | // as arn:aws:sts::123456789012:federated-user/Bob or 123456789012:Bob). You | ||
2214 | // can use the federated user's ARN in your resource-based policies, such as | ||
2215 | // an Amazon S3 bucket policy. | ||
2216 | FederatedUser *FederatedUser `type:"structure"` | ||
2217 | |||
2218 | // A percentage value indicating the size of the policy in packed form. The | ||
2219 | // service rejects policies for which the packed size is greater than 100 percent | ||
2220 | // of the allowed value. | ||
2221 | PackedPolicySize *int64 `type:"integer"` | ||
2222 | } | ||
2223 | |||
2224 | // String returns the string representation | ||
2225 | func (s GetFederationTokenOutput) String() string { | ||
2226 | return awsutil.Prettify(s) | ||
2227 | } | ||
2228 | |||
2229 | // GoString returns the string representation | ||
2230 | func (s GetFederationTokenOutput) GoString() string { | ||
2231 | return s.String() | ||
2232 | } | ||
2233 | |||
2234 | // SetCredentials sets the Credentials field's value. | ||
2235 | func (s *GetFederationTokenOutput) SetCredentials(v *Credentials) *GetFederationTokenOutput { | ||
2236 | s.Credentials = v | ||
2237 | return s | ||
2238 | } | ||
2239 | |||
2240 | // SetFederatedUser sets the FederatedUser field's value. | ||
2241 | func (s *GetFederationTokenOutput) SetFederatedUser(v *FederatedUser) *GetFederationTokenOutput { | ||
2242 | s.FederatedUser = v | ||
2243 | return s | ||
2244 | } | ||
2245 | |||
2246 | // SetPackedPolicySize sets the PackedPolicySize field's value. | ||
2247 | func (s *GetFederationTokenOutput) SetPackedPolicySize(v int64) *GetFederationTokenOutput { | ||
2248 | s.PackedPolicySize = &v | ||
2249 | return s | ||
2250 | } | ||
2251 | |||
2252 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenRequest | ||
2253 | type GetSessionTokenInput struct { | ||
2254 | _ struct{} `type:"structure"` | ||
2255 | |||
2256 | // The duration, in seconds, that the credentials should remain valid. Acceptable | ||
2257 | // durations for IAM user sessions range from 900 seconds (15 minutes) to 129600 | ||
2258 | // seconds (36 hours), with 43200 seconds (12 hours) as the default. Sessions | ||
2259 | // for AWS account owners are restricted to a maximum of 3600 seconds (one hour). | ||
2260 | // If the duration is longer than one hour, the session for AWS account owners | ||
2261 | // defaults to one hour. | ||
2262 | DurationSeconds *int64 `min:"900" type:"integer"` | ||
2263 | |||
2264 | // The identification number of the MFA device that is associated with the IAM | ||
2265 | // user who is making the GetSessionToken call. Specify this value if the IAM | ||
2266 | // user has a policy that requires MFA authentication. The value is either the | ||
2267 | // serial number for a hardware device (such as GAHT12345678) or an Amazon Resource | ||
2268 | // Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). | ||
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. | ||
2271 | // | ||
2272 | // The regex used to validate this parameter is a string of characters consisting | ||
2273 | // of upper- and lower-case alphanumeric characters with no spaces. You can | ||
2274 | // also include underscores or any of the following characters: =,.@- | ||
2275 | SerialNumber *string `min:"9" type:"string"` | ||
2276 | |||
2277 | // The value provided by the MFA device, if MFA is required. If any policy requires | ||
2278 | // the IAM user to submit an MFA code, specify this value. If MFA authentication | ||
2279 | // is required, and the user does not provide a code when requesting a set of | ||
2280 | // temporary security credentials, the user will receive an "access denied" | ||
2281 | // response when requesting resources that require MFA authentication. | ||
2282 | // | ||
2283 | // The format for this parameter, as described by its regex pattern, is a sequence | ||
2284 | // of six numeric digits. | ||
2285 | TokenCode *string `min:"6" type:"string"` | ||
2286 | } | ||
2287 | |||
2288 | // String returns the string representation | ||
2289 | func (s GetSessionTokenInput) String() string { | ||
2290 | return awsutil.Prettify(s) | ||
2291 | } | ||
2292 | |||
2293 | // GoString returns the string representation | ||
2294 | func (s GetSessionTokenInput) GoString() string { | ||
2295 | return s.String() | ||
2296 | } | ||
2297 | |||
2298 | // Validate inspects the fields of the type to determine if they are valid. | ||
2299 | func (s *GetSessionTokenInput) Validate() error { | ||
2300 | invalidParams := request.ErrInvalidParams{Context: "GetSessionTokenInput"} | ||
2301 | if s.DurationSeconds != nil && *s.DurationSeconds < 900 { | ||
2302 | invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900)) | ||
2303 | } | ||
2304 | if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { | ||
2305 | invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) | ||
2306 | } | ||
2307 | if s.TokenCode != nil && len(*s.TokenCode) < 6 { | ||
2308 | invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6)) | ||
2309 | } | ||
2310 | |||
2311 | if invalidParams.Len() > 0 { | ||
2312 | return invalidParams | ||
2313 | } | ||
2314 | return nil | ||
2315 | } | ||
2316 | |||
2317 | // SetDurationSeconds sets the DurationSeconds field's value. | ||
2318 | func (s *GetSessionTokenInput) SetDurationSeconds(v int64) *GetSessionTokenInput { | ||
2319 | s.DurationSeconds = &v | ||
2320 | return s | ||
2321 | } | ||
2322 | |||
2323 | // SetSerialNumber sets the SerialNumber field's value. | ||
2324 | func (s *GetSessionTokenInput) SetSerialNumber(v string) *GetSessionTokenInput { | ||
2325 | s.SerialNumber = &v | ||
2326 | return s | ||
2327 | } | ||
2328 | |||
2329 | // SetTokenCode sets the TokenCode field's value. | ||
2330 | func (s *GetSessionTokenInput) SetTokenCode(v string) *GetSessionTokenInput { | ||
2331 | s.TokenCode = &v | ||
2332 | return s | ||
2333 | } | ||
2334 | |||
2335 | // Contains the response to a successful GetSessionToken request, including | ||
2336 | // temporary AWS credentials that can be used to make AWS requests. | ||
2337 | // Please also see https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionTokenResponse | ||
2338 | type GetSessionTokenOutput struct { | ||
2339 | _ struct{} `type:"structure"` | ||
2340 | |||
2341 | // The temporary security credentials, which include an access key ID, a secret | ||
2342 | // access key, and a security (or session) token. | ||
2343 | // | ||
2344 | // Note: The size of the security token that STS APIs return is not fixed. We | ||
2345 | // strongly recommend that you make no assumptions about the maximum size. As | ||
2346 | // of this writing, the typical size is less than 4096 bytes, but that can vary. | ||
2347 | // Also, future updates to AWS might require larger sizes. | ||
2348 | Credentials *Credentials `type:"structure"` | ||
2349 | } | ||
2350 | |||
2351 | // String returns the string representation | ||
2352 | func (s GetSessionTokenOutput) String() string { | ||
2353 | return awsutil.Prettify(s) | ||
2354 | } | ||
2355 | |||
2356 | // GoString returns the string representation | ||
2357 | func (s GetSessionTokenOutput) GoString() string { | ||
2358 | return s.String() | ||
2359 | } | ||
2360 | |||
2361 | // SetCredentials sets the Credentials field's value. | ||
2362 | func (s *GetSessionTokenOutput) SetCredentials(v *Credentials) *GetSessionTokenOutput { | ||
2363 | s.Credentials = v | ||
2364 | return s | ||
2365 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go new file mode 100644 index 0000000..4010cc7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go | |||
@@ -0,0 +1,12 @@ | |||
1 | package sts | ||
2 | |||
3 | import "github.com/aws/aws-sdk-go/aws/request" | ||
4 | |||
5 | func init() { | ||
6 | initRequest = func(r *request.Request) { | ||
7 | switch r.Operation.Name { | ||
8 | case opAssumeRoleWithSAML, opAssumeRoleWithWebIdentity: | ||
9 | r.Handlers.Sign.Clear() // these operations are unsigned | ||
10 | } | ||
11 | } | ||
12 | } | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go new file mode 100644 index 0000000..d2af518 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go | |||
@@ -0,0 +1,124 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | // Package sts provides the client and types for making API | ||
4 | // requests to AWS Security Token Service. | ||
5 | // | ||
6 | // The AWS Security Token Service (STS) is a web service that enables you to | ||
7 | // request temporary, limited-privilege credentials for AWS Identity and Access | ||
8 | // Management (IAM) users or for users that you authenticate (federated users). | ||
9 | // This guide provides descriptions of the STS API. For more detailed information | ||
10 | // about using this service, go to Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html). | ||
11 | // | ||
12 | // As an alternative to using the API, you can use one of the AWS SDKs, which | ||
13 | // consist of libraries and sample code for various programming languages and | ||
14 | // platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient | ||
15 | // way to create programmatic access to STS. For example, the SDKs take care | ||
16 | // of cryptographically signing requests, managing errors, and retrying requests | ||
17 | // automatically. For information about the AWS SDKs, including how to download | ||
18 | // and install them, see the Tools for Amazon Web Services page (http://aws.amazon.com/tools/). | ||
19 | // | ||
20 | // For information about setting up signatures and authorization through the | ||
21 | // API, go to Signing AWS API Requests (http://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) | ||
22 | // in the AWS General Reference. For general information about the Query API, | ||
23 | // go to Making Query Requests (http://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_UsingQueryAPI.html) | ||
24 | // in Using IAM. For information about using security tokens with other AWS | ||
25 | // products, go to AWS Services That Work with IAM (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) | ||
26 | // in the IAM User Guide. | ||
27 | // | ||
28 | // If you're new to AWS and need additional technical information about a specific | ||
29 | // AWS product, you can find the product's technical documentation at http://aws.amazon.com/documentation/ | ||
30 | // (http://aws.amazon.com/documentation/). | ||
31 | // | ||
32 | // Endpoints | ||
33 | // | ||
34 | // The AWS Security Token Service (STS) has a default endpoint of https://sts.amazonaws.com | ||
35 | // that maps to the US East (N. Virginia) region. Additional regions are available | ||
36 | // and are activated by default. For more information, see Activating and Deactivating | ||
37 | // AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) | ||
38 | // in the IAM User Guide. | ||
39 | // | ||
40 | // For information about STS endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#sts_region) | ||
41 | // in the AWS General Reference. | ||
42 | // | ||
43 | // Recording API requests | ||
44 | // | ||
45 | // STS supports AWS CloudTrail, which is a service that records AWS calls for | ||
46 | // your AWS account and delivers log files to an Amazon S3 bucket. By using | ||
47 | // information collected by CloudTrail, you can determine what requests were | ||
48 | // successfully made to STS, who made the request, when it was made, and so | ||
49 | // on. To learn more about CloudTrail, including how to turn it on and find | ||
50 | // your log files, see the AWS CloudTrail User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html). | ||
51 | // | ||
52 | // See https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15 for more information on this service. | ||
53 | // | ||
54 | // See sts package documentation for more information. | ||
55 | // https://docs.aws.amazon.com/sdk-for-go/api/service/sts/ | ||
56 | // | ||
57 | // Using the Client | ||
58 | // | ||
59 | // To use the client for AWS Security Token Service you will first need | ||
60 | // to create a new instance of it. | ||
61 | // | ||
62 | // When creating a client for an AWS service you'll first need to have a Session | ||
63 | // already created. The Session provides configuration that can be shared | ||
64 | // between multiple service clients. Additional configuration can be applied to | ||
65 | // the Session and service's client when they are constructed. The aws package's | ||
66 | // Config type contains several fields such as Region for the AWS Region the | ||
67 | // client should make API requests too. The optional Config value can be provided | ||
68 | // as the variadic argument for Sessions and client creation. | ||
69 | // | ||
70 | // Once the service's client is created you can use it to make API requests the | ||
71 | // AWS service. These clients are safe to use concurrently. | ||
72 | // | ||
73 | // // Create a session to share configuration, and load external configuration. | ||
74 | // sess := session.Must(session.NewSession()) | ||
75 | // | ||
76 | // // Create the service's client with the session. | ||
77 | // svc := sts.New(sess) | ||
78 | // | ||
79 | // See the SDK's documentation for more information on how to use service clients. | ||
80 | // https://docs.aws.amazon.com/sdk-for-go/api/ | ||
81 | // | ||
82 | // See aws package's Config type for more information on configuration options. | ||
83 | // https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config | ||
84 | // | ||
85 | // See the AWS Security Token Service client STS for more | ||
86 | // information on creating the service's client. | ||
87 | // https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#New | ||
88 | // | ||
89 | // Once the client is created you can make an API request to the service. | ||
90 | // Each API method takes a input parameter, and returns the service response | ||
91 | // and an error. | ||
92 | // | ||
93 | // The API method will document which error codes the service can be returned | ||
94 | // by the operation if the service models the API operation's errors. These | ||
95 | // errors will also be available as const strings prefixed with "ErrCode". | ||
96 | // | ||
97 | // result, err := svc.AssumeRole(params) | ||
98 | // if err != nil { | ||
99 | // // Cast err to awserr.Error to handle specific error codes. | ||
100 | // aerr, ok := err.(awserr.Error) | ||
101 | // if ok && aerr.Code() == <error code to check for> { | ||
102 | // // Specific error code handling | ||
103 | // } | ||
104 | // return err | ||
105 | // } | ||
106 | // | ||
107 | // fmt.Println("AssumeRole result:") | ||
108 | // fmt.Println(result) | ||
109 | // | ||
110 | // Using the Client with Context | ||
111 | // | ||
112 | // The service's client also provides methods to make API requests with a Context | ||
113 | // value. This allows you to control the timeout, and cancellation of pending | ||
114 | // requests. These methods also take request Option as variadic parameter to apply | ||
115 | // additional configuration to the API request. | ||
116 | // | ||
117 | // ctx := context.Background() | ||
118 | // | ||
119 | // result, err := svc.AssumeRoleWithContext(ctx, params) | ||
120 | // | ||
121 | // See the request package documentation for more information on using Context pattern | ||
122 | // with the SDK. | ||
123 | // https://docs.aws.amazon.com/sdk-for-go/api/aws/request/ | ||
124 | package sts | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go new file mode 100644 index 0000000..e24884e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go | |||
@@ -0,0 +1,73 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | package sts | ||
4 | |||
5 | const ( | ||
6 | |||
7 | // ErrCodeExpiredTokenException for service response error code | ||
8 | // "ExpiredTokenException". | ||
9 | // | ||
10 | // The web identity token that was passed is expired or is not valid. Get a | ||
11 | // new identity token from the identity provider and then retry the request. | ||
12 | ErrCodeExpiredTokenException = "ExpiredTokenException" | ||
13 | |||
14 | // ErrCodeIDPCommunicationErrorException for service response error code | ||
15 | // "IDPCommunicationError". | ||
16 | // | ||
17 | // The request could not be fulfilled because the non-AWS identity provider | ||
18 | // (IDP) that was asked to verify the incoming identity token could not be reached. | ||
19 | // This is often a transient error caused by network conditions. Retry the request | ||
20 | // a limited number of times so that you don't exceed the request rate. If the | ||
21 | // error persists, the non-AWS identity provider might be down or not responding. | ||
22 | ErrCodeIDPCommunicationErrorException = "IDPCommunicationError" | ||
23 | |||
24 | // ErrCodeIDPRejectedClaimException for service response error code | ||
25 | // "IDPRejectedClaim". | ||
26 | // | ||
27 | // The identity provider (IdP) reported that authentication failed. This might | ||
28 | // be because the claim is invalid. | ||
29 | // | ||
30 | // If this error is returned for the AssumeRoleWithWebIdentity operation, it | ||
31 | // can also mean that the claim has expired or has been explicitly revoked. | ||
32 | ErrCodeIDPRejectedClaimException = "IDPRejectedClaim" | ||
33 | |||
34 | // ErrCodeInvalidAuthorizationMessageException for service response error code | ||
35 | // "InvalidAuthorizationMessageException". | ||
36 | // | ||
37 | // The error returned if the message passed to DecodeAuthorizationMessage was | ||
38 | // invalid. This can happen if the token contains invalid characters, such as | ||
39 | // linebreaks. | ||
40 | ErrCodeInvalidAuthorizationMessageException = "InvalidAuthorizationMessageException" | ||
41 | |||
42 | // ErrCodeInvalidIdentityTokenException for service response error code | ||
43 | // "InvalidIdentityToken". | ||
44 | // | ||
45 | // The web identity token that was passed could not be validated by AWS. Get | ||
46 | // a new identity token from the identity provider and then retry the request. | ||
47 | ErrCodeInvalidIdentityTokenException = "InvalidIdentityToken" | ||
48 | |||
49 | // ErrCodeMalformedPolicyDocumentException for service response error code | ||
50 | // "MalformedPolicyDocument". | ||
51 | // | ||
52 | // The request was rejected because the policy document was malformed. The error | ||
53 | // message describes the specific error. | ||
54 | ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocument" | ||
55 | |||
56 | // ErrCodePackedPolicyTooLargeException for service response error code | ||
57 | // "PackedPolicyTooLarge". | ||
58 | // | ||
59 | // The request was rejected because the policy document was too large. The error | ||
60 | // message describes how big the policy document is, in packed form, as a percentage | ||
61 | // of what the API allows. | ||
62 | ErrCodePackedPolicyTooLargeException = "PackedPolicyTooLarge" | ||
63 | |||
64 | // ErrCodeRegionDisabledException for service response error code | ||
65 | // "RegionDisabledException". | ||
66 | // | ||
67 | // STS is not activated in the requested region for the account that is being | ||
68 | // asked to generate credentials. The account administrator must use the IAM | ||
69 | // console to activate STS in that region. For more information, see Activating | ||
70 | // and Deactivating AWS STS in an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) | ||
71 | // in the IAM User Guide. | ||
72 | ErrCodeRegionDisabledException = "RegionDisabledException" | ||
73 | ) | ||
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go new file mode 100644 index 0000000..1ee5839 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go | |||
@@ -0,0 +1,93 @@ | |||
1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. | ||
2 | |||
3 | package sts | ||
4 | |||
5 | import ( | ||
6 | "github.com/aws/aws-sdk-go/aws" | ||
7 | "github.com/aws/aws-sdk-go/aws/client" | ||
8 | "github.com/aws/aws-sdk-go/aws/client/metadata" | ||
9 | "github.com/aws/aws-sdk-go/aws/request" | ||
10 | "github.com/aws/aws-sdk-go/aws/signer/v4" | ||
11 | "github.com/aws/aws-sdk-go/private/protocol/query" | ||
12 | ) | ||
13 | |||
14 | // STS provides the API operation methods for making requests to | ||
15 | // AWS Security Token Service. See this package's package overview docs | ||
16 | // for details on the service. | ||
17 | // | ||
18 | // STS methods are safe to use concurrently. It is not safe to | ||
19 | // modify mutate any of the struct's properties though. | ||
20 | type STS struct { | ||
21 | *client.Client | ||
22 | } | ||
23 | |||
24 | // Used for custom client initialization logic | ||
25 | var initClient func(*client.Client) | ||
26 | |||
27 | // Used for custom request initialization logic | ||
28 | var initRequest func(*request.Request) | ||
29 | |||
30 | // Service information constants | ||
31 | const ( | ||
32 | ServiceName = "sts" // Service endpoint prefix API calls made to. | ||
33 | EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata. | ||
34 | ) | ||
35 | |||
36 | // New creates a new instance of the STS client with a session. | ||
37 | // If additional configuration is needed for the client instance use the optional | ||
38 | // aws.Config parameter to add your extra config. | ||
39 | // | ||
40 | // Example: | ||
41 | // // Create a STS client from just a session. | ||
42 | // svc := sts.New(mySession) | ||
43 | // | ||
44 | // // Create a STS client with additional configuration | ||
45 | // svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2")) | ||
46 | func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS { | ||
47 | c := p.ClientConfig(EndpointsID, cfgs...) | ||
48 | return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) | ||
49 | } | ||
50 | |||
51 | // newClient creates, initializes and returns a new service client instance. | ||
52 | func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *STS { | ||
53 | svc := &STS{ | ||
54 | Client: client.New( | ||
55 | cfg, | ||
56 | metadata.ClientInfo{ | ||
57 | ServiceName: ServiceName, | ||
58 | SigningName: signingName, | ||
59 | SigningRegion: signingRegion, | ||
60 | Endpoint: endpoint, | ||
61 | APIVersion: "2011-06-15", | ||
62 | }, | ||
63 | handlers, | ||
64 | ), | ||
65 | } | ||
66 | |||
67 | // Handlers | ||
68 | svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) | ||
69 | svc.Handlers.Build.PushBackNamed(query.BuildHandler) | ||
70 | svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) | ||
71 | svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) | ||
72 | svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) | ||
73 | |||
74 | // Run custom client initialization if present | ||
75 | if initClient != nil { | ||
76 | initClient(svc.Client) | ||
77 | } | ||
78 | |||
79 | return svc | ||
80 | } | ||
81 | |||
82 | // newRequest creates a new request for a STS operation and runs any | ||
83 | // custom request initialization. | ||
84 | func (c *STS) newRequest(op *request.Operation, params, data interface{}) *request.Request { | ||
85 | req := c.NewRequest(op, params, data) | ||
86 | |||
87 | // Run custom request initialization if present | ||
88 | if initRequest != nil { | ||
89 | initRequest(req) | ||
90 | } | ||
91 | |||
92 | return req | ||
93 | } | ||