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,187 +1,185 @@
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 BucketNotification
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 BucketNotification
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 [Array<Types::TopicConfiguration>]
35
- def topic_configurations
36
- data.topic_configurations
37
- end
33
+ # @return [Array<Types::TopicConfiguration>]
34
+ def topic_configurations
35
+ data.topic_configurations
36
+ end
38
37
 
39
- # @return [Array<Types::QueueConfiguration>]
40
- def queue_configurations
41
- data.queue_configurations
42
- end
38
+ # @return [Array<Types::QueueConfiguration>]
39
+ def queue_configurations
40
+ data.queue_configurations
41
+ end
43
42
 
44
- # @return [Array<Types::LambdaFunctionConfiguration>]
45
- def lambda_function_configurations
46
- data.lambda_function_configurations
47
- end
43
+ # @return [Array<Types::LambdaFunctionConfiguration>]
44
+ def lambda_function_configurations
45
+ data.lambda_function_configurations
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 {BucketNotification}.
57
- # Returns `self` making it possible to chain methods.
58
- #
59
- # bucket_notification.reload.data
60
- #
61
- # @return [self]
62
- def load
63
- resp = @client.get_bucket_notification_configuration(bucket: @bucket_name)
64
- @data = resp.data
65
- self
66
- end
67
- alias :reload :load
68
-
69
- # @return [Types::NotificationConfiguration]
70
- # Returns the data for this {BucketNotification}. Calls
71
- # {Client#get_bucket_notification_configuration} if {#data_loaded?} is `false`.
72
- def data
73
- load unless @data
74
- @data
75
- end
55
+ # Loads, or reloads {#data} for the current {BucketNotification}.
56
+ # Returns `self` making it possible to chain methods.
57
+ #
58
+ # bucket_notification.reload.data
59
+ #
60
+ # @return [self]
61
+ def load
62
+ resp = @client.get_bucket_notification_configuration(bucket: @bucket_name)
63
+ @data = resp.data
64
+ self
65
+ end
66
+ alias :reload :load
67
+
68
+ # @return [Types::NotificationConfiguration]
69
+ # Returns the data for this {BucketNotification}. Calls
70
+ # {Client#get_bucket_notification_configuration} 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_notification.put({
89
- # notification_configuration: { # required
90
- # topic_configurations: [
91
- # {
92
- # id: "NotificationId",
93
- # topic_arn: "TopicArn", # required
94
- # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
95
- # filter: {
96
- # key: {
97
- # filter_rules: [
98
- # {
99
- # name: "prefix", # accepts prefix, suffix
100
- # value: "FilterRuleValue",
101
- # },
102
- # ],
103
- # },
104
- # },
105
- # },
106
- # ],
107
- # queue_configurations: [
108
- # {
109
- # id: "NotificationId",
110
- # queue_arn: "QueueArn", # required
111
- # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
112
- # filter: {
113
- # key: {
114
- # filter_rules: [
115
- # {
116
- # name: "prefix", # accepts prefix, suffix
117
- # value: "FilterRuleValue",
118
- # },
119
- # ],
120
- # },
121
- # },
122
- # },
123
- # ],
124
- # lambda_function_configurations: [
125
- # {
126
- # id: "NotificationId",
127
- # lambda_function_arn: "LambdaFunctionArn", # required
128
- # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
129
- # filter: {
130
- # key: {
131
- # filter_rules: [
132
- # {
133
- # name: "prefix", # accepts prefix, suffix
134
- # value: "FilterRuleValue",
135
- # },
136
- # ],
137
- # },
138
- # },
139
- # },
140
- # ],
141
- # },
142
- # })
143
- # @param [Hash] options ({})
144
- # @option options [required, Types::NotificationConfiguration] :notification_configuration
145
- # Container for specifying the notification configuration of the bucket.
146
- # If this element is empty, notifications are turned off on the bucket.
147
- # @return [EmptyStructure]
148
- def put(options = {})
149
- options = options.merge(bucket: @bucket_name)
150
- resp = @client.put_bucket_notification_configuration(options)
151
- resp.data
152
- end
83
+ # @!group Actions
84
+
85
+ # @example Request syntax with placeholder values
86
+ #
87
+ # bucket_notification.put({
88
+ # notification_configuration: { # required
89
+ # topic_configurations: [
90
+ # {
91
+ # id: "NotificationId",
92
+ # topic_arn: "TopicArn", # required
93
+ # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
94
+ # filter: {
95
+ # key: {
96
+ # filter_rules: [
97
+ # {
98
+ # name: "prefix", # accepts prefix, suffix
99
+ # value: "FilterRuleValue",
100
+ # },
101
+ # ],
102
+ # },
103
+ # },
104
+ # },
105
+ # ],
106
+ # queue_configurations: [
107
+ # {
108
+ # id: "NotificationId",
109
+ # queue_arn: "QueueArn", # required
110
+ # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
111
+ # filter: {
112
+ # key: {
113
+ # filter_rules: [
114
+ # {
115
+ # name: "prefix", # accepts prefix, suffix
116
+ # value: "FilterRuleValue",
117
+ # },
118
+ # ],
119
+ # },
120
+ # },
121
+ # },
122
+ # ],
123
+ # lambda_function_configurations: [
124
+ # {
125
+ # id: "NotificationId",
126
+ # lambda_function_arn: "LambdaFunctionArn", # required
127
+ # events: ["s3:ReducedRedundancyLostObject"], # required, accepts s3:ReducedRedundancyLostObject, s3:ObjectCreated:*, s3:ObjectCreated:Put, s3:ObjectCreated:Post, s3:ObjectCreated:Copy, s3:ObjectCreated:CompleteMultipartUpload, s3:ObjectRemoved:*, s3:ObjectRemoved:Delete, s3:ObjectRemoved:DeleteMarkerCreated
128
+ # filter: {
129
+ # key: {
130
+ # filter_rules: [
131
+ # {
132
+ # name: "prefix", # accepts prefix, suffix
133
+ # value: "FilterRuleValue",
134
+ # },
135
+ # ],
136
+ # },
137
+ # },
138
+ # },
139
+ # ],
140
+ # },
141
+ # })
142
+ # @param [Hash] options ({})
143
+ # @option options [required, Types::NotificationConfiguration] :notification_configuration
144
+ # Container for specifying the notification configuration of the bucket.
145
+ # If this element is empty, notifications are turned off on the bucket.
146
+ # @return [EmptyStructure]
147
+ def put(options = {})
148
+ options = options.merge(bucket: @bucket_name)
149
+ resp = @client.put_bucket_notification_configuration(options)
150
+ resp.data
151
+ end
153
152
 
154
- # @!group Associations
153
+ # @!group Associations
155
154
 
156
- # @return [Bucket]
157
- def bucket
158
- Bucket.new(
159
- name: @bucket_name,
160
- client: @client
161
- )
162
- end
155
+ # @return [Bucket]
156
+ def bucket
157
+ Bucket.new(
158
+ name: @bucket_name,
159
+ client: @client
160
+ )
161
+ end
163
162
 
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
181
- end
163
+ # @deprecated
164
+ # @api private
165
+ def identifiers
166
+ { bucket_name: @bucket_name }
167
+ end
168
+ deprecated(:identifiers)
169
+
170
+ private
171
+
172
+ def extract_bucket_name(args, options)
173
+ value = args[0] || options.delete(:bucket_name)
174
+ case value
175
+ when String then value
176
+ when nil then raise ArgumentError, "missing required option :bucket_name"
177
+ else
178
+ msg = "expected :bucket_name to be a String, got #{value.class}"
179
+ raise ArgumentError, msg
182
180
  end
183
-
184
- class Collection < Aws::Resources::Collection; end
185
181
  end
182
+
183
+ class Collection < Aws::Resources::Collection; end
186
184
  end
187
185
  end
@@ -1,138 +1,136 @@
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 BucketPolicy
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 BucketPolicy
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 bucket policy as a JSON document.
35
- # @return [String]
36
- def policy
37
- data.policy
38
- end
33
+ # The bucket policy as a JSON document.
34
+ # @return [String]
35
+ def policy
36
+ data.policy
37
+ end
39
38
 
40
- # @!endgroup
39
+ # @!endgroup
41
40
 
42
- # @return [Client]
43
- def client
44
- @client
45
- end
41
+ # @return [Client]
42
+ def client
43
+ @client
44
+ end
46
45
 
47
- # Loads, or reloads {#data} for the current {BucketPolicy}.
48
- # Returns `self` making it possible to chain methods.
49
- #
50
- # bucket_policy.reload.data
51
- #
52
- # @return [self]
53
- def load
54
- resp = @client.get_bucket_policy(bucket: @bucket_name)
55
- @data = resp.data
56
- self
57
- end
58
- alias :reload :load
59
-
60
- # @return [Types::GetBucketPolicyOutput]
61
- # Returns the data for this {BucketPolicy}. Calls
62
- # {Client#get_bucket_policy} if {#data_loaded?} is `false`.
63
- def data
64
- load unless @data
65
- @data
66
- end
46
+ # Loads, or reloads {#data} for the current {BucketPolicy}.
47
+ # Returns `self` making it possible to chain methods.
48
+ #
49
+ # bucket_policy.reload.data
50
+ #
51
+ # @return [self]
52
+ def load
53
+ resp = @client.get_bucket_policy(bucket: @bucket_name)
54
+ @data = resp.data
55
+ self
56
+ end
57
+ alias :reload :load
58
+
59
+ # @return [Types::GetBucketPolicyOutput]
60
+ # Returns the data for this {BucketPolicy}. Calls
61
+ # {Client#get_bucket_policy} if {#data_loaded?} is `false`.
62
+ def data
63
+ load unless @data
64
+ @data
65
+ end
67
66
 
68
- # @return [Boolean]
69
- # Returns `true` if this resource is loaded. Accessing attributes or
70
- # {#data} on an unloaded resource will trigger a call to {#load}.
71
- def data_loaded?
72
- !!@data
73
- end
67
+ # @return [Boolean]
68
+ # Returns `true` if this resource is loaded. Accessing attributes or
69
+ # {#data} on an unloaded resource will trigger a call to {#load}.
70
+ def data_loaded?
71
+ !!@data
72
+ end
74
73
 
75
- # @!group Actions
76
-
77
- # @example Request syntax with placeholder values
78
- #
79
- # bucket_policy.delete()
80
- # @param [Hash] options ({})
81
- # @return [EmptyStructure]
82
- def delete(options = {})
83
- options = options.merge(bucket: @bucket_name)
84
- resp = @client.delete_bucket_policy(options)
85
- resp.data
86
- end
74
+ # @!group Actions
75
+
76
+ # @example Request syntax with placeholder values
77
+ #
78
+ # bucket_policy.delete()
79
+ # @param [Hash] options ({})
80
+ # @return [EmptyStructure]
81
+ def delete(options = {})
82
+ options = options.merge(bucket: @bucket_name)
83
+ resp = @client.delete_bucket_policy(options)
84
+ resp.data
85
+ end
87
86
 
88
- # @example Request syntax with placeholder values
89
- #
90
- # bucket_policy.put({
91
- # content_md5: "ContentMD5",
92
- # policy: "Policy", # required
93
- # })
94
- # @param [Hash] options ({})
95
- # @option options [String] :content_md5
96
- # @option options [required, String] :policy
97
- # The bucket policy as a JSON document.
98
- # @return [EmptyStructure]
99
- def put(options = {})
100
- options = options.merge(bucket: @bucket_name)
101
- resp = @client.put_bucket_policy(options)
102
- resp.data
103
- end
87
+ # @example Request syntax with placeholder values
88
+ #
89
+ # bucket_policy.put({
90
+ # content_md5: "ContentMD5",
91
+ # policy: "Policy", # required
92
+ # })
93
+ # @param [Hash] options ({})
94
+ # @option options [String] :content_md5
95
+ # @option options [required, String] :policy
96
+ # The bucket policy as a JSON document.
97
+ # @return [EmptyStructure]
98
+ def put(options = {})
99
+ options = options.merge(bucket: @bucket_name)
100
+ resp = @client.put_bucket_policy(options)
101
+ resp.data
102
+ end
104
103
 
105
- # @!group Associations
104
+ # @!group Associations
106
105
 
107
- # @return [Bucket]
108
- def bucket
109
- Bucket.new(
110
- name: @bucket_name,
111
- client: @client
112
- )
113
- end
106
+ # @return [Bucket]
107
+ def bucket
108
+ Bucket.new(
109
+ name: @bucket_name,
110
+ client: @client
111
+ )
112
+ end
114
113
 
115
- # @deprecated
116
- # @api private
117
- def identifiers
118
- { bucket_name: @bucket_name }
119
- end
120
- deprecated(:identifiers)
121
-
122
- private
123
-
124
- def extract_bucket_name(args, options)
125
- value = args[0] || options.delete(:bucket_name)
126
- case value
127
- when String then value
128
- when nil then raise ArgumentError, "missing required option :bucket_name"
129
- else
130
- msg = "expected :bucket_name to be a String, got #{value.class}"
131
- raise ArgumentError, msg
132
- end
114
+ # @deprecated
115
+ # @api private
116
+ def identifiers
117
+ { bucket_name: @bucket_name }
118
+ end
119
+ deprecated(:identifiers)
120
+
121
+ private
122
+
123
+ def extract_bucket_name(args, options)
124
+ value = args[0] || options.delete(:bucket_name)
125
+ case value
126
+ when String then value
127
+ when nil then raise ArgumentError, "missing required option :bucket_name"
128
+ else
129
+ msg = "expected :bucket_name to be a String, got #{value.class}"
130
+ raise ArgumentError, msg
133
131
  end
134
-
135
- class Collection < Aws::Resources::Collection; end
136
132
  end
133
+
134
+ class Collection < Aws::Resources::Collection; end
137
135
  end
138
136
  end