aws-sdk 1.3.4 → 1.3.5
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.
- data/lib/aws.rb +2 -0
- data/lib/aws/api_config/SimpleWorkflow-2012-01-25.yml +1163 -0
- data/lib/aws/core.rb +16 -11
- data/lib/aws/core/configuration.rb +65 -47
- data/lib/aws/dynamo_db/item_collection.rb +2 -3
- data/lib/aws/dynamo_db/table.rb +2 -2
- data/lib/aws/ec2/collection.rb +1 -1
- data/lib/aws/ec2/snapshot_collection.rb +1 -1
- data/lib/aws/ec2/tagged_collection.rb +6 -1
- data/lib/aws/elb/backend_server_policy_collection.rb +1 -11
- data/lib/aws/elb/load_balancer.rb +4 -4
- data/lib/aws/elb/load_balancer_collection.rb +1 -1
- data/lib/aws/iam/policy.rb +1 -1
- data/lib/aws/record.rb +10 -4
- data/lib/aws/record/hash_model/finder_methods.rb +2 -3
- data/lib/aws/s3/bucket_lifecycle_configuration.rb +2 -2
- data/lib/aws/s3/policy.rb +1 -1
- data/lib/aws/simple_email_service.rb +8 -2
- data/lib/aws/simple_workflow.rb +223 -0
- data/lib/aws/simple_workflow/activity_task.rb +173 -0
- data/lib/aws/simple_workflow/activity_task_collection.rb +112 -0
- data/lib/aws/simple_workflow/activity_type.rb +131 -0
- data/lib/aws/simple_workflow/activity_type_collection.rb +93 -0
- data/lib/aws/simple_workflow/client.rb +57 -0
- data/lib/aws/simple_workflow/config.rb +18 -0
- data/lib/aws/simple_workflow/count.rb +49 -0
- data/lib/aws/simple_workflow/decision_task.rb +603 -0
- data/lib/aws/simple_workflow/decision_task_collection.rb +213 -0
- data/lib/aws/simple_workflow/domain.rb +122 -0
- data/lib/aws/simple_workflow/domain_collection.rb +169 -0
- data/lib/aws/simple_workflow/errors.rb +57 -0
- data/lib/aws/simple_workflow/history_event.rb +276 -0
- data/lib/aws/simple_workflow/history_event_collection.rb +76 -0
- data/lib/aws/simple_workflow/option_formatters.rb +75 -0
- data/lib/aws/simple_workflow/request.rb +80 -0
- data/lib/aws/simple_workflow/resource.rb +94 -0
- data/lib/aws/simple_workflow/type.rb +89 -0
- data/lib/aws/simple_workflow/type_collection.rb +139 -0
- data/lib/aws/simple_workflow/workflow_execution.rb +386 -0
- data/lib/aws/simple_workflow/workflow_execution_collection.rb +617 -0
- data/lib/aws/simple_workflow/workflow_type.rb +177 -0
- data/lib/aws/simple_workflow/workflow_type_collection.rb +91 -0
- data/lib/aws/sns/policy.rb +1 -1
- data/lib/aws/sns/subscription.rb +2 -2
- data/lib/aws/sqs/errors.rb +2 -2
- data/lib/aws/sqs/policy.rb +1 -1
- metadata +111 -54
data/lib/aws/core.rb
CHANGED
@@ -27,6 +27,7 @@ require 'aws/core/autoloader'
|
|
27
27
|
# * {AWS::S3}
|
28
28
|
# * {AWS::SimpleDB}
|
29
29
|
# * {AWS::SimpleEmailService}
|
30
|
+
# * {AWS::SimpleWorkflow}
|
30
31
|
# * {AWS::SNS}
|
31
32
|
# * {AWS::SQS}
|
32
33
|
# * {AWS::STS}
|
@@ -58,7 +59,7 @@ require 'aws/core/autoloader'
|
|
58
59
|
module AWS
|
59
60
|
|
60
61
|
# Current version of the AWS SDK for Ruby
|
61
|
-
VERSION = "1.3.
|
62
|
+
VERSION = "1.3.5"
|
62
63
|
|
63
64
|
register_autoloads(self) do
|
64
65
|
autoload :Errors, 'errors'
|
@@ -159,13 +160,18 @@ module AWS
|
|
159
160
|
# @option options [String] :access_key_id (nil) AWS access key id
|
160
161
|
# credential.
|
161
162
|
#
|
163
|
+
# @option options [String] :secret_access_key (nil) AWS secret access
|
164
|
+
# key credential.
|
165
|
+
#
|
166
|
+
# @option options [String,nil] :session_token (nil) AWS secret token
|
167
|
+
# credential.
|
168
|
+
#
|
162
169
|
# @option options [String] :dynamo_db_endpoint ('dynamodb.amazonaws.com') The
|
163
170
|
# service endpoint for Amazon DynamoDB.
|
164
171
|
#
|
165
|
-
# @option options [String] :dynamo_db_retry_throughput_errors (
|
172
|
+
# @option options [String] :dynamo_db_retry_throughput_errors (true) When
|
166
173
|
# true, AWS::DynamoDB::Errors::ProvisionedThroughputExceededException
|
167
|
-
# errors will be retried.
|
168
|
-
# of retries if you have a low provisioned throughput.
|
174
|
+
# errors will be retried.
|
169
175
|
#
|
170
176
|
# @option options [String] :ec2_endpoint ('ec2.amazonaws.com') The
|
171
177
|
# service endpoint for Amazon EC2.
|
@@ -227,12 +233,6 @@ module AWS
|
|
227
233
|
# * {S3::S3Object#presigned_post}
|
228
234
|
# * {S3::Bucket#presigned_post}
|
229
235
|
#
|
230
|
-
# @option options [String] :secret_access_key (nil) AWS secret access
|
231
|
-
# key credential.
|
232
|
-
#
|
233
|
-
# @option options [String,nil] :session_token (nil) AWS secret token
|
234
|
-
# credential.
|
235
|
-
#
|
236
236
|
# @option options [String] :simple_db_endpoint ('sdb.amazonaws.com') The
|
237
237
|
# service endpoint for Amazon SimpleDB.
|
238
238
|
#
|
@@ -243,6 +243,9 @@ module AWS
|
|
243
243
|
# @option options [String] :simple_email_service_endpoint ('email.us-east-1.amazonaws.com')
|
244
244
|
# The service endpoint for Amazon Simple Email Service.
|
245
245
|
#
|
246
|
+
# @option options [String] :simple_workflow_service ('swf.us-east-1.amazonaws.com')
|
247
|
+
# The service endpoint for Amazon Simple Workflow Service.
|
248
|
+
#
|
246
249
|
# @option options [Object] :signer (AWS::DefaultSigner) The request signer. Defaults to
|
247
250
|
# a default request signer implementation.
|
248
251
|
#
|
@@ -254,7 +257,8 @@ module AWS
|
|
254
257
|
# The AWS SDK for Ruby ships with a CA cert bundle, which is the
|
255
258
|
# default value for this option.
|
256
259
|
#
|
257
|
-
# @option options [String] :ssl_ca_path
|
260
|
+
# @option options [String] :ssl_ca_path (nil)
|
261
|
+
# The path the a CA cert directory.
|
258
262
|
#
|
259
263
|
# @option options [Boolean] :ssl_verify_peer (true) When +true+
|
260
264
|
# the HTTP handler validate server certificates for HTTPS requests.
|
@@ -285,6 +289,7 @@ module AWS
|
|
285
289
|
# for clients and applications built ontop of the aws-sdk gem.
|
286
290
|
#
|
287
291
|
# @return [Core::Configuration] Returns the new configuration.
|
292
|
+
#
|
288
293
|
def config options = {}
|
289
294
|
@@config ||= Core::Configuration.new
|
290
295
|
@@config = @@config.with(options) unless options.empty?
|
@@ -55,41 +55,55 @@ module AWS
|
|
55
55
|
#
|
56
56
|
# The global default configuration can be found at {AWS.config}
|
57
57
|
#
|
58
|
-
# @attr_reader [String,nil] access_key_id
|
59
|
-
#
|
58
|
+
# @attr_reader [String,nil] access_key_id (nil)
|
59
|
+
# AWS access key id credential.
|
60
60
|
#
|
61
|
-
# @attr_reader [String]
|
62
|
-
#
|
61
|
+
# @attr_reader [String,nil] secret_access_key (nil)
|
62
|
+
# AWS secret access key credential.
|
63
|
+
#
|
64
|
+
# @attr_reader [String,nil] session_token (nil) AWS secret token credential.
|
65
|
+
#
|
66
|
+
# @attr_reader [String] dynamo_db_endpoint ('dynamodb.us-east-1.amazonaws.com')
|
67
|
+
# The service endpoint for Amazon DynamoDB.
|
68
|
+
#
|
69
|
+
# @attr_reader [String] dynamo_db_retry_throughput_errors (true) When
|
70
|
+
# true, AWS::DynamoDB::Errors::ProvisionedThroughputExceededException
|
71
|
+
# errors will be retried.
|
72
|
+
#
|
73
|
+
# @attr_reader [String] ec2_endpoint ('ec2.amazonaws.com')
|
74
|
+
# The service endpoint for Amazon EC2.
|
75
|
+
#
|
76
|
+
# @attr_reader [String] elb_endpoint ('elasticloadbalancing.us-east-1.amazonaws.com')
|
77
|
+
# The service endpoint for Elastic Load Balancing.
|
63
78
|
#
|
64
79
|
# @attr_reader [Object] http_handler The http handler that sends requests
|
65
80
|
# to AWS. Defaults to an HTTP handler built on net/http.
|
66
81
|
#
|
67
|
-
# @attr_reader [String] iam_endpoint
|
68
|
-
# Access Management (IAM).
|
82
|
+
# @attr_reader [String] iam_endpoint ('iam.amazonaws.com')
|
83
|
+
# The service endpoint for AWS Idenity Access Management (IAM).
|
69
84
|
#
|
70
|
-
# @attr_reader [Object,nil] logger A logger instance that
|
85
|
+
# @attr_reader [Object,nil] logger (nil) A logger instance that
|
71
86
|
# should receive log messages generated by service requets.
|
72
87
|
# A logger needs to respond to #log and must accept a
|
73
88
|
# severity (e.g. :info, :error, etc) and a string message.
|
74
|
-
# Defaults to +nil+.
|
75
89
|
#
|
76
|
-
# @attr_reader [Integer] max_retries The maximum number of times
|
90
|
+
# @attr_reader [Integer] max_retries (3) The maximum number of times
|
77
91
|
# service errors (500) should be retried. There is an exponential
|
78
92
|
# backoff in between service request retries, so the more retries the
|
79
|
-
# longer it can take to fail.
|
93
|
+
# longer it can take to fail.
|
80
94
|
#
|
81
|
-
# @attr_reader [String, URI, nil] proxy_uri The URI of the proxy
|
95
|
+
# @attr_reader [String, URI, nil] proxy_uri (nil) The URI of the proxy
|
82
96
|
# to send service requests through. You can pass a URI object or a
|
83
97
|
# URI string. Defautls to +nil+.
|
84
98
|
#
|
85
99
|
# AWS.config(:proxy_uri => 'https://user:pass@my.proxy:443')
|
86
100
|
#
|
87
|
-
# @attr_reader [String] s3_endpoint
|
88
|
-
#
|
101
|
+
# @attr_reader [String] s3_endpoint ('s3.amazonaws.com')
|
102
|
+
# The service endpoint for Amazon S3.
|
89
103
|
#
|
90
|
-
# @attr_reader [Integer] s3_multipart_max_parts
|
91
|
-
# parts to split a file into when uploading
|
92
|
-
#
|
104
|
+
# @attr_reader [Integer] s3_multipart_max_parts (1000)
|
105
|
+
# The maximum number of parts to split a file into when uploading
|
106
|
+
# in parts to S3.
|
93
107
|
#
|
94
108
|
# @attr_reader [Integer] s3_multipart_threshold (16777216) When uploading
|
95
109
|
# data to S3, if the number of bytes to send exceedes
|
@@ -98,9 +112,9 @@ module AWS
|
|
98
112
|
# is specified by +:s3_multipart_min_part_size+. Defaults to
|
99
113
|
# 16777216 (16MB).
|
100
114
|
#
|
101
|
-
# @attr_reader [Integer] s3_multipart_min_part_size
|
102
|
-
# size (in bytes) each S3 multipart
|
103
|
-
#
|
115
|
+
# @attr_reader [Integer] s3_multipart_min_part_size (5242880)
|
116
|
+
# The absolute minimum size (in bytes) each S3 multipart
|
117
|
+
# segment should be defaults to 5242880 (5MB).
|
104
118
|
#
|
105
119
|
# @attr_reader [Symbol] s3_server_side_encryption The algorithm to
|
106
120
|
# use when encrypting object data on the server side. The only
|
@@ -122,26 +136,21 @@ module AWS
|
|
122
136
|
#
|
123
137
|
# s3 = AWS::S3.new(:s3_server_side_encryption => :aes256)
|
124
138
|
#
|
125
|
-
# @attr_reader [String
|
126
|
-
#
|
127
|
-
#
|
128
|
-
# @attr_reader [String,nil] session_token AWS secret token credential.
|
129
|
-
# Defaults to +nil+.
|
139
|
+
# @attr_reader [String] simple_db_endpoint ('sdb.amazonaws.com')
|
140
|
+
# The service endpoint for Amazon SimpleDB.
|
130
141
|
#
|
131
|
-
# @attr_reader [
|
132
|
-
# SimpleDB. Defaults to 'sdb.amazonaws.com'.
|
133
|
-
#
|
134
|
-
# @attr_reader [Boolean] simple_db_consistent_reads Determines
|
142
|
+
# @attr_reader [Boolean] simple_db_consistent_reads (false) Determines
|
135
143
|
# if all SimpleDB read requests should be done consistently.
|
136
144
|
# Consistent reads are slower, but reflect all changes to SDB.
|
137
|
-
# Defaults to +false+.
|
138
145
|
#
|
139
|
-
# @attr_reader [String] simple_email_service_endpoint
|
140
|
-
# for Amazon Simple Email Service.
|
141
|
-
#
|
146
|
+
# @attr_reader [String] simple_email_service_endpoint ('email.us-east-1.amazonaws.com')
|
147
|
+
# The service endpoint for Amazon Simple Email Service.
|
148
|
+
#
|
149
|
+
# @attr_reader [String] simple_workflow_endpoint ('swf.us-east-1.amazonaws.com')
|
150
|
+
# The service endpoint for Amazon Simple Workflow Service.
|
142
151
|
#
|
143
|
-
# @attr_reader [Object] signer
|
144
|
-
# a default request signer implementation.
|
152
|
+
# @attr_reader [Object] signer
|
153
|
+
# The request signer. Defaults to a default request signer implementation.
|
145
154
|
#
|
146
155
|
# @attr_reader [String] ssl_ca_file The path to a CA cert bundle in
|
147
156
|
# PEM format.
|
@@ -151,36 +160,36 @@ module AWS
|
|
151
160
|
# The AWS SDK for Ruby ships with a CA cert bundle, which is the
|
152
161
|
# default value for this option.
|
153
162
|
#
|
154
|
-
# @attr_reader [
|
163
|
+
# @attr_reader [String] ssl_ca_path (nil)
|
164
|
+
# The path the a CA cert directory.
|
165
|
+
#
|
166
|
+
# @attr_reader [Boolean] ssl_verify_peer (true) When +true+
|
155
167
|
# the HTTP handler validate server certificates for HTTPS requests.
|
156
|
-
# Defaults to +true+.
|
157
168
|
#
|
158
169
|
# This option should only be disabled for diagnostic purposes;
|
159
170
|
# leaving this option set to +false+ exposes your application to
|
160
171
|
# man-in-the-middle attacks and can pose a serious security
|
161
172
|
# risk.
|
162
173
|
#
|
163
|
-
# @attr_reader [Boolean] stub_requests When +true+ requests are not
|
174
|
+
# @attr_reader [Boolean] stub_requests (false) When +true+ requests are not
|
164
175
|
# sent to AWS, instead empty reponses are generated and returned to
|
165
176
|
# each service request.
|
166
177
|
#
|
167
|
-
# @attr_reader [String] sns_endpoint
|
168
|
-
#
|
178
|
+
# @attr_reader [String] sns_endpoint ('sns.us-east-1.amazonaws.com')
|
179
|
+
# The service endpoint for Amazon SNS.
|
169
180
|
#
|
170
|
-
# @attr_reader [String] sqs_endpoint
|
171
|
-
#
|
181
|
+
# @attr_reader [String] sqs_endpoint ('sqs.us-east-1.amazonaws.com')
|
182
|
+
# The service endpoint for Amazon SQS.
|
172
183
|
#
|
173
|
-
# @attr_reader [String] sts_endpoint
|
174
|
-
# Security Token Service.
|
184
|
+
# @attr_reader [String] sts_endpoint ('sts.amazonaws.com')
|
185
|
+
# The service endpoint for AWS Security Token Service.
|
175
186
|
#
|
176
|
-
# @attr_reader [Boolean] use_ssl When +true+, all requests
|
187
|
+
# @attr_reader [Boolean] use_ssl (true) When +true+, all requests
|
177
188
|
# to AWS are sent using HTTPS instead vanilla HTTP.
|
178
|
-
# Defaults to +true+.
|
179
189
|
#
|
180
|
-
# @attr_reader [String] user_agent_prefix A string prefix to
|
190
|
+
# @attr_reader [String] user_agent_prefix (nil) A string prefix to
|
181
191
|
# append to all requets against AWS services. This should be set
|
182
192
|
# for clients and applications built ontop of the aws-sdk gem.
|
183
|
-
# Defaults to +nil+.
|
184
193
|
#
|
185
194
|
class Configuration
|
186
195
|
|
@@ -199,6 +208,15 @@ module AWS
|
|
199
208
|
end
|
200
209
|
|
201
210
|
end
|
211
|
+
|
212
|
+
# @return [Hash] Returns a hash with your configured credentials.
|
213
|
+
def credentials
|
214
|
+
credentials = {}
|
215
|
+
credentials[:access_key_id] = access_key_id
|
216
|
+
credentials[:secret_access_key] = secret_access_key
|
217
|
+
credentials[:session_token] = session_token if session_token
|
218
|
+
credentials
|
219
|
+
end
|
202
220
|
|
203
221
|
# Used to create a new Configuration object with the given modifications.
|
204
222
|
# The current configuration object is not modified.
|
@@ -465,9 +465,8 @@ module AWS
|
|
465
465
|
# are filtered). A scan can result in no table data meeting the
|
466
466
|
# filter criteria.
|
467
467
|
#
|
468
|
-
# For more information about filtering the collection
|
469
|
-
#
|
470
|
-
# {#limit} methods.
|
468
|
+
# For more information about filtering the collection
|
469
|
+
# see the {#where} method.
|
471
470
|
#
|
472
471
|
# @param [Hash] options Options for iterating the collection.
|
473
472
|
#
|
data/lib/aws/dynamo_db/table.rb
CHANGED
@@ -30,8 +30,8 @@ module AWS
|
|
30
30
|
# == Creating a Table
|
31
31
|
#
|
32
32
|
# To get started you can create a table by supplying a name
|
33
|
-
# and the read/write capacity. A default schema
|
34
|
-
#
|
33
|
+
# and the read/write capacity. A default schema with a hash_key
|
34
|
+
# of :id => :string will be provided.
|
35
35
|
#
|
36
36
|
# dynamo_db = AWS::DynamoDB.new
|
37
37
|
# dynamo_db.tables.create('mytable', 10, 5)
|
data/lib/aws/ec2/collection.rb
CHANGED
@@ -14,13 +14,13 @@
|
|
14
14
|
module AWS
|
15
15
|
class EC2
|
16
16
|
|
17
|
-
# @private
|
18
17
|
class Collection
|
19
18
|
|
20
19
|
include Core::Model
|
21
20
|
include Enumerable
|
22
21
|
include FilteredCollection
|
23
22
|
|
23
|
+
# @param [String] id Returns the collection member with the given id.
|
24
24
|
def [] id
|
25
25
|
member_class.new(id.to_s, :config => config)
|
26
26
|
end
|
@@ -14,7 +14,12 @@
|
|
14
14
|
module AWS
|
15
15
|
class EC2
|
16
16
|
|
17
|
-
#
|
17
|
+
# Most of the AWS::EC2 collections include TaggedCollection. This
|
18
|
+
# module provides methods for filtering the collection with
|
19
|
+
# tags.
|
20
|
+
#
|
21
|
+
# collecion.tagged('prod').each do {|obj| ... }
|
22
|
+
#
|
18
23
|
module TaggedCollection
|
19
24
|
|
20
25
|
# Filter the collection by one or more tag keys. If you pass multiple
|
@@ -30,17 +30,7 @@ module AWS
|
|
30
30
|
# public_key1 = <<-KEY
|
31
31
|
# -----BEGIN CERTIFICATE-----
|
32
32
|
# MIICaTCCAdICCQDuvCF4erLGSjANBgkqhkiG9w0BAQUFADB5MQswCQYDVQQGEwJa
|
33
|
-
#
|
34
|
-
# MAsGA1UECxMERkFLRTENMAsGA1UEAxMERkFLRTEfMB0GCSqGSIb3DQEJARYQZmFr
|
35
|
-
# ZUBleGFtcGxlLmNvbTAeFw0xMTA4MTAyMjE0NDVaFw0xMjA4MDkyMjE0NDVaMHkx
|
36
|
-
# CzAJBgNVBAYTAlpaMQ0wCwYDVQQIEwRGQUtFMQ0wCwYDVQQHEwRGQUtFMQ0wCwYD
|
37
|
-
# VQQKEwRGQUtFMQ0wCwYDVQQLEwRGQUtFMQ0wCwYDVQQDEwRGQUtFMR8wHQYJKoZI
|
38
|
-
# hvcNAQkBFhBmYWtlQGV4YW1wbGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
|
39
|
-
# iQKBgQC4vy7K2LCgYJs7AbxdanPEwL4KLC9gi1LqzkRWShEaz8COUZswcOkevLQy
|
40
|
-
# SMFTXAvmH1FVqNO97wVG6ydxi+LNE7Jub62QQnsK420y+nXRTytxrboH1eAiAIEt
|
41
|
-
# ZoUKaOymfAN8l/MJbcPH0rTYNdni99B+UMPWmFeRg/BeWiy2hwIDAQABMA0GCSqG
|
42
|
-
# SIb3DQEBBQUAA4GBAD+VNA6ia8TXa2lJgvmoGYCLGcCaccz7Nv/u4/oqv8qMPvdZ
|
43
|
-
# 5DZxDLIExOSHiFGwWg5m8NgcirH2diveyRBgNhgC6S6DntkEMvAV0yvaQgHtUO53
|
33
|
+
# ....
|
44
34
|
# o50MymfqtoVcebZcXbiDVAXW1cPEHKLBXecX6/LZ+GOzEsUOxgt7Xs9uabqp
|
45
35
|
# -----END CERTIFICATE-----
|
46
36
|
# KEY
|
@@ -205,17 +205,17 @@ module AWS
|
|
205
205
|
|
206
206
|
# Generally you don't need to call this method, rather you can
|
207
207
|
# just pass the load balancer as a source to the various
|
208
|
-
# authorize and revoke methods of {SecurityGroup}:
|
208
|
+
# authorize and revoke methods of {EC2::SecurityGroup}:
|
209
209
|
#
|
210
210
|
# security_group.authorize_ingress(load_balancer)
|
211
211
|
#
|
212
212
|
# security_group.revoke_ingress(load_balancer)
|
213
213
|
#
|
214
214
|
# @return [Hash] Returns a hash that can be passed to the following
|
215
|
-
# {SecurityGroup} methods as a source:
|
215
|
+
# {EC2::SecurityGroup} methods as a source:
|
216
216
|
#
|
217
|
-
# * {SecurityGroup#authorize_ingress}
|
218
|
-
# * {SecurityGroup#authorize_egress}
|
217
|
+
# * {EC2::SecurityGroup#authorize_ingress}
|
218
|
+
# * {EC2::SecurityGroup#authorize_egress}
|
219
219
|
#
|
220
220
|
def source_security_group
|
221
221
|
{
|
@@ -44,7 +44,7 @@ module AWS
|
|
44
44
|
#
|
45
45
|
# @option options [required,Array] :availability_zones An array of
|
46
46
|
# one or more availability zones. Values may be availability zone
|
47
|
-
# name strings, or {AWS::EC2::
|
47
|
+
# name strings, or {AWS::EC2::AvailabilityZone} objects.
|
48
48
|
#
|
49
49
|
# @option options [required,Array] :listeners An array of load balancer
|
50
50
|
# listener options. Each value must be an array with the following
|
data/lib/aws/iam/policy.rb
CHANGED
data/lib/aws/record.rb
CHANGED
@@ -33,13 +33,16 @@ module AWS
|
|
33
33
|
# AWS::Record.domain_prefix = 'production_'
|
34
34
|
#
|
35
35
|
# class Product < AWS::Record::Base
|
36
|
-
#
|
36
|
+
# set_shard_name 'products'
|
37
37
|
# end
|
38
38
|
#
|
39
|
-
# Product.
|
39
|
+
# p = Product.new
|
40
|
+
# p.shard #=> 'products'
|
41
|
+
# p.save # the product is persisted to the 'production-products' domain
|
40
42
|
#
|
41
43
|
# @param [String] A prefix to append to all domains. This is useful for
|
42
44
|
# grouping domains used by one application with a single prefix.
|
45
|
+
#
|
43
46
|
def self.domain_prefix= prefix
|
44
47
|
@domain_prefix = prefix
|
45
48
|
end
|
@@ -56,14 +59,17 @@ module AWS
|
|
56
59
|
# AWS::Record.table_prefix = 'production_'
|
57
60
|
#
|
58
61
|
# class Product < AWS::Record::HashModel
|
59
|
-
#
|
62
|
+
# set_shard_name 'products'
|
60
63
|
# end
|
61
64
|
#
|
62
|
-
# Product.
|
65
|
+
# p = Product.new
|
66
|
+
# p.shard #=> 'products'
|
67
|
+
# p.save # the product is persisted to the 'production-products' table
|
63
68
|
#
|
64
69
|
# @param [String] A prefix to append to all tables. This is
|
65
70
|
# useful for grouping tables used by one application with a
|
66
71
|
# single prefix.
|
72
|
+
#
|
67
73
|
def self.table_prefix= prefix
|
68
74
|
@table_prefix = prefix
|
69
75
|
end
|
@@ -98,8 +98,7 @@ module AWS
|
|
98
98
|
# end
|
99
99
|
#
|
100
100
|
# This method is equivalent to +find(:all)+, and therefore you can also
|
101
|
-
# pass aditional options.
|
102
|
-
# options you can pass.
|
101
|
+
# pass aditional options.
|
103
102
|
#
|
104
103
|
# Book.all(:where => { :author' => 'me' }).each do |my_book|
|
105
104
|
# # ...
|
@@ -143,7 +142,7 @@ module AWS
|
|
143
142
|
#
|
144
143
|
# @return [Integer] The count of records in the table.
|
145
144
|
#
|
146
|
-
def count
|
145
|
+
def count options = {}
|
147
146
|
new_scope.count(options)
|
148
147
|
end
|
149
148
|
alias_method :size, :count
|