Class: AWS::S3::Policy

Inherits:
Core::Policy show all
Defined in:
lib/aws/s3/policy.rb

Overview

Represents an access policy for AWS operations and resources. For example:

policy = Policy.new do |policy|
  policy.allow(:actions => ['s3:PutObject'],
               :resources => "arn:aws:s3:::mybucket/mykey/*",
               :principals => :any
  ).where(:acl).is("public-read")
end

policy.to_json               # => '{ "Version":"2008-10-17", ...'

Defined Under Namespace

Classes: Statement

Instance Attribute Summary

Attributes inherited from Core::Policy

#id, #statements, #version

Method Summary

Methods inherited from Core::Policy

#==, #allow, #deny, from_json, #initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from AWS::Core::Policy