Class: Fog::AWS::IAM::ManagedPolicy
- Inherits:
-
Model
- Object
- Model
- Fog::AWS::IAM::ManagedPolicy
- Defined in:
- lib/fog/aws/models/iam/managed_policy.rb
Instance Method Summary collapse
Instance Method Details
#attach(user_or_username) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/fog/aws/models/iam/managed_policy.rb', line 17 def attach(user_or_username) requires :arn username = if user_or_username.respond_to?(:identity) user_or_username.identity else user_or_username end service.attach_user_policy(username, self.arn) end |
#document ⇒ Object
29 30 31 32 33 34 |
# File 'lib/fog/aws/models/iam/managed_policy.rb', line 29 def document requires :arn, :default_version service.get_policy_version(self.arn, self.default_version). body['PolicyVersion']['Document'] end |