Class: AWSCDK::IAM::CommonGrantOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IAM::CommonGrantOptions
- Defined in:
- iam/common_grant_options.rb
Overview
Basic options for a grant operation.
Direct Known Subclasses
GrantOnPrincipalAndResourceOptions, GrantOnPrincipalOptions, GrantWithResourceOptions
Instance Attribute Summary collapse
-
#actions ⇒ Array<String>
readonly
The actions to grant.
-
#conditions ⇒ Hash{String => Hash{String => Object}}?
readonly
Any conditions to attach to the grant.
-
#grantee ⇒ AWSCDK::IAM::IGrantable
readonly
The principal to grant to.
-
#resource_arns ⇒ Array<String>
readonly
The resource ARNs to grant to.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(actions:, grantee:, resource_arns:, conditions: nil) ⇒ CommonGrantOptions
constructor
A new instance of CommonGrantOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(actions:, grantee:, resource_arns:, conditions: nil) ⇒ CommonGrantOptions
Returns a new instance of CommonGrantOptions.
11 12 13 14 15 16 17 18 19 20 |
# File 'iam/common_grant_options.rb', line 11 def initialize(actions:, grantee:, resource_arns:, conditions: nil) @actions = actions Jsii::Type.check_type(@actions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "actions") @grantee = grantee Jsii::Type.check_type(@grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") @resource_arns = resource_arns Jsii::Type.check_type(@resource_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "resourceArns") @conditions = conditions Jsii::Type.check_type(@conditions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoiYW55In0sImtpbmQiOiJtYXAifX0sImtpbmQiOiJtYXAifX0=")), "conditions") unless @conditions.nil? end |
Instance Attribute Details
#actions ⇒ Array<String> (readonly)
The actions to grant.
25 26 27 |
# File 'iam/common_grant_options.rb', line 25 def actions @actions end |
#conditions ⇒ Hash{String => Hash{String => Object}}? (readonly)
Note:
Default: - No conditions
Any conditions to attach to the grant.
39 40 41 |
# File 'iam/common_grant_options.rb', line 39 def conditions @conditions end |
#grantee ⇒ AWSCDK::IAM::IGrantable (readonly)
Note:
Default: if principal is undefined, no work is done.
The principal to grant to.
30 31 32 |
# File 'iam/common_grant_options.rb', line 30 def grantee @grantee end |
#resource_arns ⇒ Array<String> (readonly)
The resource ARNs to grant to.
34 35 36 |
# File 'iam/common_grant_options.rb', line 34 def resource_arns @resource_arns end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'iam/common_grant_options.rb', line 41 def self.jsii_properties { :actions => "actions", :grantee => "grantee", :resource_arns => "resourceArns", :conditions => "conditions", } end |
Instance Method Details
#to_jsii ⇒ Object
50 51 52 53 54 55 56 57 58 59 |
# File 'iam/common_grant_options.rb', line 50 def to_jsii result = {} result.merge!({ "actions" => @actions, "grantee" => @grantee, "resourceArns" => @resource_arns, "conditions" => @conditions, }) result.compact end |