aws-sdk-s3 1.0.0.rc2 → 1.0.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws-sdk-s3.rb +1 -1
- data/lib/aws-sdk-s3/bucket.rb +540 -542
- data/lib/aws-sdk-s3/bucket_acl.rb +144 -146
- data/lib/aws-sdk-s3/bucket_cors.rb +122 -124
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +140 -142
- data/lib/aws-sdk-s3/bucket_logging.rb +119 -121
- data/lib/aws-sdk-s3/bucket_notification.rb +162 -164
- data/lib/aws-sdk-s3/bucket_policy.rb +114 -116
- data/lib/aws-sdk-s3/bucket_request_payment.rb +105 -107
- data/lib/aws-sdk-s3/bucket_tagging.rb +119 -121
- data/lib/aws-sdk-s3/bucket_versioning.rb +162 -164
- data/lib/aws-sdk-s3/bucket_website.rb +150 -152
- data/lib/aws-sdk-s3/client.rb +4380 -3611
- data/lib/aws-sdk-s3/client_api.rb +2343 -2345
- data/lib/aws-sdk-s3/customizations/object.rb +3 -2
- data/lib/aws-sdk-s3/errors.rb +4 -13
- data/lib/aws-sdk-s3/multipart_upload.rb +240 -242
- data/lib/aws-sdk-s3/multipart_upload_part.rb +273 -275
- data/lib/aws-sdk-s3/object.rb +879 -881
- data/lib/aws-sdk-s3/object_acl.rb +186 -188
- data/lib/aws-sdk-s3/object_summary.rb +751 -753
- data/lib/aws-sdk-s3/object_version.rb +356 -358
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +1 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +1 -1
- data/lib/aws-sdk-s3/presigner.rb +6 -2
- data/lib/aws-sdk-s3/resource.rb +79 -78
- data/lib/aws-sdk-s3/types.rb +7678 -6939
- data/lib/aws-sdk-s3/waiters.rb +150 -151
- metadata +4 -4
@@ -1,188 +1,186 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
end
|
8
|
+
module Aws::S3
|
9
|
+
class BucketVersioning
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(bucket_name, options = {})
|
14
|
+
# @param [String] bucket_name
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :bucket_name
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@bucket_name = extract_bucket_name(args, options)
|
22
|
+
@data = options.delete(:data)
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
# @return [String]
|
29
|
+
def bucket_name
|
30
|
+
@bucket_name
|
31
|
+
end
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
# The versioning state of the bucket.
|
34
|
+
# @return [String]
|
35
|
+
def status
|
36
|
+
data.status
|
37
|
+
end
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
# Specifies whether MFA delete is enabled in the bucket versioning
|
40
|
+
# configuration. This element is only returned if the bucket has been
|
41
|
+
# configured with MFA delete. If the bucket has never been so
|
42
|
+
# configured, this element is not returned.
|
43
|
+
# @return [String]
|
44
|
+
def mfa_delete
|
45
|
+
data.mfa_delete
|
46
|
+
end
|
48
47
|
|
49
|
-
|
48
|
+
# @!endgroup
|
50
49
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
# @return [Client]
|
51
|
+
def client
|
52
|
+
@client
|
53
|
+
end
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
55
|
+
# Loads, or reloads {#data} for the current {BucketVersioning}.
|
56
|
+
# Returns `self` making it possible to chain methods.
|
57
|
+
#
|
58
|
+
# bucket_versioning.reload.data
|
59
|
+
#
|
60
|
+
# @return [self]
|
61
|
+
def load
|
62
|
+
resp = @client.get_bucket_versioning(bucket: @bucket_name)
|
63
|
+
@data = resp.data
|
64
|
+
self
|
65
|
+
end
|
66
|
+
alias :reload :load
|
67
|
+
|
68
|
+
# @return [Types::GetBucketVersioningOutput]
|
69
|
+
# Returns the data for this {BucketVersioning}. Calls
|
70
|
+
# {Client#get_bucket_versioning} if {#data_loaded?} is `false`.
|
71
|
+
def data
|
72
|
+
load unless @data
|
73
|
+
@data
|
74
|
+
end
|
76
75
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
76
|
+
# @return [Boolean]
|
77
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
78
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
79
|
+
def data_loaded?
|
80
|
+
!!@data
|
81
|
+
end
|
83
82
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
83
|
+
# @!group Actions
|
84
|
+
|
85
|
+
# @example Request syntax with placeholder values
|
86
|
+
#
|
87
|
+
# bucket_versioning.enable({
|
88
|
+
# content_md5: "ContentMD5",
|
89
|
+
# mfa: "MFA",
|
90
|
+
# })
|
91
|
+
# @param [Hash] options ({})
|
92
|
+
# @option options [String] :content_md5
|
93
|
+
# @option options [String] :mfa
|
94
|
+
# The concatenation of the authentication device's serial number, a
|
95
|
+
# space, and the value that is displayed on your authentication device.
|
96
|
+
# @return [EmptyStructure]
|
97
|
+
def enable(options = {})
|
98
|
+
options = Aws::Util.deep_merge(options,
|
99
|
+
bucket: @bucket_name,
|
100
|
+
versioning_configuration: {
|
101
|
+
status: "Enabled"
|
102
|
+
}
|
103
|
+
)
|
104
|
+
resp = @client.put_bucket_versioning(options)
|
105
|
+
resp.data
|
106
|
+
end
|
108
107
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
108
|
+
# @example Request syntax with placeholder values
|
109
|
+
#
|
110
|
+
# bucket_versioning.put({
|
111
|
+
# content_md5: "ContentMD5",
|
112
|
+
# mfa: "MFA",
|
113
|
+
# versioning_configuration: { # required
|
114
|
+
# mfa_delete: "Enabled", # accepts Enabled, Disabled
|
115
|
+
# status: "Enabled", # accepts Enabled, Suspended
|
116
|
+
# },
|
117
|
+
# })
|
118
|
+
# @param [Hash] options ({})
|
119
|
+
# @option options [String] :content_md5
|
120
|
+
# @option options [String] :mfa
|
121
|
+
# The concatenation of the authentication device's serial number, a
|
122
|
+
# space, and the value that is displayed on your authentication device.
|
123
|
+
# @option options [required, Types::VersioningConfiguration] :versioning_configuration
|
124
|
+
# @return [EmptyStructure]
|
125
|
+
def put(options = {})
|
126
|
+
options = options.merge(bucket: @bucket_name)
|
127
|
+
resp = @client.put_bucket_versioning(options)
|
128
|
+
resp.data
|
129
|
+
end
|
131
130
|
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
131
|
+
# @example Request syntax with placeholder values
|
132
|
+
#
|
133
|
+
# bucket_versioning.suspend({
|
134
|
+
# content_md5: "ContentMD5",
|
135
|
+
# mfa: "MFA",
|
136
|
+
# })
|
137
|
+
# @param [Hash] options ({})
|
138
|
+
# @option options [String] :content_md5
|
139
|
+
# @option options [String] :mfa
|
140
|
+
# The concatenation of the authentication device's serial number, a
|
141
|
+
# space, and the value that is displayed on your authentication device.
|
142
|
+
# @return [EmptyStructure]
|
143
|
+
def suspend(options = {})
|
144
|
+
options = Aws::Util.deep_merge(options,
|
145
|
+
bucket: @bucket_name,
|
146
|
+
versioning_configuration: {
|
147
|
+
status: "Suspended"
|
148
|
+
}
|
149
|
+
)
|
150
|
+
resp = @client.put_bucket_versioning(options)
|
151
|
+
resp.data
|
152
|
+
end
|
154
153
|
|
155
|
-
|
154
|
+
# @!group Associations
|
156
155
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
156
|
+
# @return [Bucket]
|
157
|
+
def bucket
|
158
|
+
Bucket.new(
|
159
|
+
name: @bucket_name,
|
160
|
+
client: @client
|
161
|
+
)
|
162
|
+
end
|
164
163
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
end
|
164
|
+
# @deprecated
|
165
|
+
# @api private
|
166
|
+
def identifiers
|
167
|
+
{ bucket_name: @bucket_name }
|
168
|
+
end
|
169
|
+
deprecated(:identifiers)
|
170
|
+
|
171
|
+
private
|
172
|
+
|
173
|
+
def extract_bucket_name(args, options)
|
174
|
+
value = args[0] || options.delete(:bucket_name)
|
175
|
+
case value
|
176
|
+
when String then value
|
177
|
+
when nil then raise ArgumentError, "missing required option :bucket_name"
|
178
|
+
else
|
179
|
+
msg = "expected :bucket_name to be a String, got #{value.class}"
|
180
|
+
raise ArgumentError, msg
|
183
181
|
end
|
184
|
-
|
185
|
-
class Collection < Aws::Resources::Collection; end
|
186
182
|
end
|
183
|
+
|
184
|
+
class Collection < Aws::Resources::Collection; end
|
187
185
|
end
|
188
186
|
end
|
@@ -1,177 +1,175 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
end
|
8
|
+
module Aws::S3
|
9
|
+
class BucketWebsite
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(bucket_name, options = {})
|
14
|
+
# @param [String] bucket_name
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :bucket_name
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@bucket_name = extract_bucket_name(args, options)
|
22
|
+
@data = options.delete(:data)
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
# @return [String]
|
29
|
+
def bucket_name
|
30
|
+
@bucket_name
|
31
|
+
end
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
# @return [Types::RedirectAllRequestsTo]
|
34
|
+
def redirect_all_requests_to
|
35
|
+
data.redirect_all_requests_to
|
36
|
+
end
|
38
37
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
# @return [Types::IndexDocument]
|
39
|
+
def index_document
|
40
|
+
data.index_document
|
41
|
+
end
|
43
42
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
43
|
+
# @return [Types::ErrorDocument]
|
44
|
+
def error_document
|
45
|
+
data.error_document
|
46
|
+
end
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
# @return [Array<Types::RoutingRule>]
|
49
|
+
def routing_rules
|
50
|
+
data.routing_rules
|
51
|
+
end
|
53
52
|
|
54
|
-
|
53
|
+
# @!endgroup
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
55
|
+
# @return [Client]
|
56
|
+
def client
|
57
|
+
@client
|
58
|
+
end
|
60
59
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
60
|
+
# Loads, or reloads {#data} for the current {BucketWebsite}.
|
61
|
+
# Returns `self` making it possible to chain methods.
|
62
|
+
#
|
63
|
+
# bucket_website.reload.data
|
64
|
+
#
|
65
|
+
# @return [self]
|
66
|
+
def load
|
67
|
+
resp = @client.get_bucket_website(bucket: @bucket_name)
|
68
|
+
@data = resp.data
|
69
|
+
self
|
70
|
+
end
|
71
|
+
alias :reload :load
|
72
|
+
|
73
|
+
# @return [Types::GetBucketWebsiteOutput]
|
74
|
+
# Returns the data for this {BucketWebsite}. Calls
|
75
|
+
# {Client#get_bucket_website} if {#data_loaded?} is `false`.
|
76
|
+
def data
|
77
|
+
load unless @data
|
78
|
+
@data
|
79
|
+
end
|
81
80
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
81
|
+
# @return [Boolean]
|
82
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
83
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
84
|
+
def data_loaded?
|
85
|
+
!!@data
|
86
|
+
end
|
88
87
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
88
|
+
# @!group Actions
|
89
|
+
|
90
|
+
# @example Request syntax with placeholder values
|
91
|
+
#
|
92
|
+
# bucket_website.delete()
|
93
|
+
# @param [Hash] options ({})
|
94
|
+
# @return [EmptyStructure]
|
95
|
+
def delete(options = {})
|
96
|
+
options = options.merge(bucket: @bucket_name)
|
97
|
+
resp = @client.delete_bucket_website(options)
|
98
|
+
resp.data
|
99
|
+
end
|
101
100
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
101
|
+
# @example Request syntax with placeholder values
|
102
|
+
#
|
103
|
+
# bucket_website.put({
|
104
|
+
# content_md5: "ContentMD5",
|
105
|
+
# website_configuration: { # required
|
106
|
+
# error_document: {
|
107
|
+
# key: "ObjectKey", # required
|
108
|
+
# },
|
109
|
+
# index_document: {
|
110
|
+
# suffix: "Suffix", # required
|
111
|
+
# },
|
112
|
+
# redirect_all_requests_to: {
|
113
|
+
# host_name: "HostName", # required
|
114
|
+
# protocol: "http", # accepts http, https
|
115
|
+
# },
|
116
|
+
# routing_rules: [
|
117
|
+
# {
|
118
|
+
# condition: {
|
119
|
+
# http_error_code_returned_equals: "HttpErrorCodeReturnedEquals",
|
120
|
+
# key_prefix_equals: "KeyPrefixEquals",
|
121
|
+
# },
|
122
|
+
# redirect: { # required
|
123
|
+
# host_name: "HostName",
|
124
|
+
# http_redirect_code: "HttpRedirectCode",
|
125
|
+
# protocol: "http", # accepts http, https
|
126
|
+
# replace_key_prefix_with: "ReplaceKeyPrefixWith",
|
127
|
+
# replace_key_with: "ReplaceKeyWith",
|
128
|
+
# },
|
129
|
+
# },
|
130
|
+
# ],
|
131
|
+
# },
|
132
|
+
# })
|
133
|
+
# @param [Hash] options ({})
|
134
|
+
# @option options [String] :content_md5
|
135
|
+
# @option options [required, Types::WebsiteConfiguration] :website_configuration
|
136
|
+
# @return [EmptyStructure]
|
137
|
+
def put(options = {})
|
138
|
+
options = options.merge(bucket: @bucket_name)
|
139
|
+
resp = @client.put_bucket_website(options)
|
140
|
+
resp.data
|
141
|
+
end
|
143
142
|
|
144
|
-
|
143
|
+
# @!group Associations
|
145
144
|
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
145
|
+
# @return [Bucket]
|
146
|
+
def bucket
|
147
|
+
Bucket.new(
|
148
|
+
name: @bucket_name,
|
149
|
+
client: @client
|
150
|
+
)
|
151
|
+
end
|
153
152
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
end
|
153
|
+
# @deprecated
|
154
|
+
# @api private
|
155
|
+
def identifiers
|
156
|
+
{ bucket_name: @bucket_name }
|
157
|
+
end
|
158
|
+
deprecated(:identifiers)
|
159
|
+
|
160
|
+
private
|
161
|
+
|
162
|
+
def extract_bucket_name(args, options)
|
163
|
+
value = args[0] || options.delete(:bucket_name)
|
164
|
+
case value
|
165
|
+
when String then value
|
166
|
+
when nil then raise ArgumentError, "missing required option :bucket_name"
|
167
|
+
else
|
168
|
+
msg = "expected :bucket_name to be a String, got #{value.class}"
|
169
|
+
raise ArgumentError, msg
|
172
170
|
end
|
173
|
-
|
174
|
-
class Collection < Aws::Resources::Collection; end
|
175
171
|
end
|
172
|
+
|
173
|
+
class Collection < Aws::Resources::Collection; end
|
176
174
|
end
|
177
175
|
end
|