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.
@@ -1,188 +1,186 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
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
- module S3
10
- class BucketVersioning
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(bucket_name, options = {})
15
- # @param [String] bucket_name
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :bucket_name
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @bucket_name = extract_bucket_name(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
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
- # @!group Read-Only Attributes
26
+ # @!group Read-Only Attributes
28
27
 
29
- # @return [String]
30
- def bucket_name
31
- @bucket_name
32
- end
28
+ # @return [String]
29
+ def bucket_name
30
+ @bucket_name
31
+ end
33
32
 
34
- # The versioning state of the bucket.
35
- # @return [String]
36
- def status
37
- data.status
38
- end
33
+ # The versioning state of the bucket.
34
+ # @return [String]
35
+ def status
36
+ data.status
37
+ end
39
38
 
40
- # Specifies whether MFA delete is enabled in the bucket versioning
41
- # configuration. This element is only returned if the bucket has been
42
- # configured with MFA delete. If the bucket has never been so
43
- # configured, this element is not returned.
44
- # @return [String]
45
- def mfa_delete
46
- data.mfa_delete
47
- end
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
- # @!endgroup
48
+ # @!endgroup
50
49
 
51
- # @return [Client]
52
- def client
53
- @client
54
- end
50
+ # @return [Client]
51
+ def client
52
+ @client
53
+ end
55
54
 
56
- # Loads, or reloads {#data} for the current {BucketVersioning}.
57
- # Returns `self` making it possible to chain methods.
58
- #
59
- # bucket_versioning.reload.data
60
- #
61
- # @return [self]
62
- def load
63
- resp = @client.get_bucket_versioning(bucket: @bucket_name)
64
- @data = resp.data
65
- self
66
- end
67
- alias :reload :load
68
-
69
- # @return [Types::GetBucketVersioningOutput]
70
- # Returns the data for this {BucketVersioning}. Calls
71
- # {Client#get_bucket_versioning} if {#data_loaded?} is `false`.
72
- def data
73
- load unless @data
74
- @data
75
- end
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
- # @return [Boolean]
78
- # Returns `true` if this resource is loaded. Accessing attributes or
79
- # {#data} on an unloaded resource will trigger a call to {#load}.
80
- def data_loaded?
81
- !!@data
82
- end
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
- # @!group Actions
85
-
86
- # @example Request syntax with placeholder values
87
- #
88
- # bucket_versioning.enable({
89
- # content_md5: "ContentMD5",
90
- # mfa: "MFA",
91
- # })
92
- # @param [Hash] options ({})
93
- # @option options [String] :content_md5
94
- # @option options [String] :mfa
95
- # The concatenation of the authentication device's serial number, a
96
- # space, and the value that is displayed on your authentication device.
97
- # @return [EmptyStructure]
98
- def enable(options = {})
99
- options = Aws::Util.deep_merge(options,
100
- bucket: @bucket_name,
101
- versioning_configuration: {
102
- status: "Enabled"
103
- }
104
- )
105
- resp = @client.put_bucket_versioning(options)
106
- resp.data
107
- end
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
- # @example Request syntax with placeholder values
110
- #
111
- # bucket_versioning.put({
112
- # content_md5: "ContentMD5",
113
- # mfa: "MFA",
114
- # versioning_configuration: { # required
115
- # mfa_delete: "Enabled", # accepts Enabled, Disabled
116
- # status: "Enabled", # accepts Enabled, Suspended
117
- # },
118
- # })
119
- # @param [Hash] options ({})
120
- # @option options [String] :content_md5
121
- # @option options [String] :mfa
122
- # The concatenation of the authentication device's serial number, a
123
- # space, and the value that is displayed on your authentication device.
124
- # @option options [required, Types::VersioningConfiguration] :versioning_configuration
125
- # @return [EmptyStructure]
126
- def put(options = {})
127
- options = options.merge(bucket: @bucket_name)
128
- resp = @client.put_bucket_versioning(options)
129
- resp.data
130
- end
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
- # @example Request syntax with placeholder values
133
- #
134
- # bucket_versioning.suspend({
135
- # content_md5: "ContentMD5",
136
- # mfa: "MFA",
137
- # })
138
- # @param [Hash] options ({})
139
- # @option options [String] :content_md5
140
- # @option options [String] :mfa
141
- # The concatenation of the authentication device's serial number, a
142
- # space, and the value that is displayed on your authentication device.
143
- # @return [EmptyStructure]
144
- def suspend(options = {})
145
- options = Aws::Util.deep_merge(options,
146
- bucket: @bucket_name,
147
- versioning_configuration: {
148
- status: "Suspended"
149
- }
150
- )
151
- resp = @client.put_bucket_versioning(options)
152
- resp.data
153
- end
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
- # @!group Associations
154
+ # @!group Associations
156
155
 
157
- # @return [Bucket]
158
- def bucket
159
- Bucket.new(
160
- name: @bucket_name,
161
- client: @client
162
- )
163
- end
156
+ # @return [Bucket]
157
+ def bucket
158
+ Bucket.new(
159
+ name: @bucket_name,
160
+ client: @client
161
+ )
162
+ end
164
163
 
165
- # @deprecated
166
- # @api private
167
- def identifiers
168
- { bucket_name: @bucket_name }
169
- end
170
- deprecated(:identifiers)
171
-
172
- private
173
-
174
- def extract_bucket_name(args, options)
175
- value = args[0] || options.delete(:bucket_name)
176
- case value
177
- when String then value
178
- when nil then raise ArgumentError, "missing required option :bucket_name"
179
- else
180
- msg = "expected :bucket_name to be a String, got #{value.class}"
181
- raise ArgumentError, msg
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 info on making contributions:
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
- module S3
10
- class BucketWebsite
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(bucket_name, options = {})
15
- # @param [String] bucket_name
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :bucket_name
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @bucket_name = extract_bucket_name(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
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
- # @!group Read-Only Attributes
26
+ # @!group Read-Only Attributes
28
27
 
29
- # @return [String]
30
- def bucket_name
31
- @bucket_name
32
- end
28
+ # @return [String]
29
+ def bucket_name
30
+ @bucket_name
31
+ end
33
32
 
34
- # @return [Types::RedirectAllRequestsTo]
35
- def redirect_all_requests_to
36
- data.redirect_all_requests_to
37
- end
33
+ # @return [Types::RedirectAllRequestsTo]
34
+ def redirect_all_requests_to
35
+ data.redirect_all_requests_to
36
+ end
38
37
 
39
- # @return [Types::IndexDocument]
40
- def index_document
41
- data.index_document
42
- end
38
+ # @return [Types::IndexDocument]
39
+ def index_document
40
+ data.index_document
41
+ end
43
42
 
44
- # @return [Types::ErrorDocument]
45
- def error_document
46
- data.error_document
47
- end
43
+ # @return [Types::ErrorDocument]
44
+ def error_document
45
+ data.error_document
46
+ end
48
47
 
49
- # @return [Array<Types::RoutingRule>]
50
- def routing_rules
51
- data.routing_rules
52
- end
48
+ # @return [Array<Types::RoutingRule>]
49
+ def routing_rules
50
+ data.routing_rules
51
+ end
53
52
 
54
- # @!endgroup
53
+ # @!endgroup
55
54
 
56
- # @return [Client]
57
- def client
58
- @client
59
- end
55
+ # @return [Client]
56
+ def client
57
+ @client
58
+ end
60
59
 
61
- # Loads, or reloads {#data} for the current {BucketWebsite}.
62
- # Returns `self` making it possible to chain methods.
63
- #
64
- # bucket_website.reload.data
65
- #
66
- # @return [self]
67
- def load
68
- resp = @client.get_bucket_website(bucket: @bucket_name)
69
- @data = resp.data
70
- self
71
- end
72
- alias :reload :load
73
-
74
- # @return [Types::GetBucketWebsiteOutput]
75
- # Returns the data for this {BucketWebsite}. Calls
76
- # {Client#get_bucket_website} if {#data_loaded?} is `false`.
77
- def data
78
- load unless @data
79
- @data
80
- end
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
- # @return [Boolean]
83
- # Returns `true` if this resource is loaded. Accessing attributes or
84
- # {#data} on an unloaded resource will trigger a call to {#load}.
85
- def data_loaded?
86
- !!@data
87
- end
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
- # @!group Actions
90
-
91
- # @example Request syntax with placeholder values
92
- #
93
- # bucket_website.delete()
94
- # @param [Hash] options ({})
95
- # @return [EmptyStructure]
96
- def delete(options = {})
97
- options = options.merge(bucket: @bucket_name)
98
- resp = @client.delete_bucket_website(options)
99
- resp.data
100
- end
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
- # @example Request syntax with placeholder values
103
- #
104
- # bucket_website.put({
105
- # content_md5: "ContentMD5",
106
- # website_configuration: { # required
107
- # error_document: {
108
- # key: "ObjectKey", # required
109
- # },
110
- # index_document: {
111
- # suffix: "Suffix", # required
112
- # },
113
- # redirect_all_requests_to: {
114
- # host_name: "HostName", # required
115
- # protocol: "http", # accepts http, https
116
- # },
117
- # routing_rules: [
118
- # {
119
- # condition: {
120
- # http_error_code_returned_equals: "HttpErrorCodeReturnedEquals",
121
- # key_prefix_equals: "KeyPrefixEquals",
122
- # },
123
- # redirect: { # required
124
- # host_name: "HostName",
125
- # http_redirect_code: "HttpRedirectCode",
126
- # protocol: "http", # accepts http, https
127
- # replace_key_prefix_with: "ReplaceKeyPrefixWith",
128
- # replace_key_with: "ReplaceKeyWith",
129
- # },
130
- # },
131
- # ],
132
- # },
133
- # })
134
- # @param [Hash] options ({})
135
- # @option options [String] :content_md5
136
- # @option options [required, Types::WebsiteConfiguration] :website_configuration
137
- # @return [EmptyStructure]
138
- def put(options = {})
139
- options = options.merge(bucket: @bucket_name)
140
- resp = @client.put_bucket_website(options)
141
- resp.data
142
- end
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
- # @!group Associations
143
+ # @!group Associations
145
144
 
146
- # @return [Bucket]
147
- def bucket
148
- Bucket.new(
149
- name: @bucket_name,
150
- client: @client
151
- )
152
- end
145
+ # @return [Bucket]
146
+ def bucket
147
+ Bucket.new(
148
+ name: @bucket_name,
149
+ client: @client
150
+ )
151
+ end
153
152
 
154
- # @deprecated
155
- # @api private
156
- def identifiers
157
- { bucket_name: @bucket_name }
158
- end
159
- deprecated(:identifiers)
160
-
161
- private
162
-
163
- def extract_bucket_name(args, options)
164
- value = args[0] || options.delete(:bucket_name)
165
- case value
166
- when String then value
167
- when nil then raise ArgumentError, "missing required option :bucket_name"
168
- else
169
- msg = "expected :bucket_name to be a String, got #{value.class}"
170
- raise ArgumentError, msg
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