lib/convection/model/mixin/policy.rb in convection-0.2.1 vs lib/convection/model/mixin/policy.rb in convection-0.2.2
- old
+ new
@@ -60,9 +60,17 @@
def s3_resource(bucket, path = nil)
return resource "arn:aws:s3:::#{ bucket }/#{ path }" unless path.nil?
resource "arn:aws:s3:::#{ bucket }"
end
+ def sqs_resource(region, account, queue)
+ resource "arn:aws:sqs:#{ region }:#{ account }:#{ queue }"
+ end
+
+ def sns_resource(region, account, topic)
+ resource "arn:aws:sns:#{ region }:#{ account }:#{ topic }"
+ end
+
def initialize(effect = 'Allow', template = nil)
@effect = effect
@action = []
@resource = []