Class: AWSCDK::IAM::GrantOnPrincipalOptions
- Inherits:
-
CommonGrantOptions
- Object
- CommonGrantOptions
- AWSCDK::IAM::GrantOnPrincipalOptions
- Defined in:
- iam/grant_on_principal_options.rb
Overview
Options for a grant operation that only applies to principals.
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.
-
#scope ⇒ Constructs::IConstruct?
readonly
deprecated
Deprecated.
The scope argument is currently unused.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(actions:, grantee:, resource_arns:, conditions: nil, scope: nil) ⇒ GrantOnPrincipalOptions
constructor
A new instance of GrantOnPrincipalOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(actions:, grantee:, resource_arns:, conditions: nil, scope: nil) ⇒ GrantOnPrincipalOptions
Returns a new instance of GrantOnPrincipalOptions.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'iam/grant_on_principal_options.rb', line 12 def initialize(actions:, grantee:, resource_arns:, conditions: nil, scope: 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? @scope = scope Jsii::Type.check_type(@scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "scope") unless @scope.nil? end |
Instance Attribute Details
#actions ⇒ Array<String> (readonly)
The actions to grant.
28 29 30 |
# File 'iam/grant_on_principal_options.rb', line 28 def actions @actions end |
#conditions ⇒ Hash{String => Hash{String => Object}}? (readonly)
Note:
Default: - No conditions
Any conditions to attach to the grant.
42 43 44 |
# File 'iam/grant_on_principal_options.rb', line 42 def conditions @conditions end |
#grantee ⇒ AWSCDK::IAM::IGrantable (readonly)
Note:
Default: if principal is undefined, no work is done.
The principal to grant to.
33 34 35 |
# File 'iam/grant_on_principal_options.rb', line 33 def grantee @grantee end |
#resource_arns ⇒ Array<String> (readonly)
The resource ARNs to grant to.
37 38 39 |
# File 'iam/grant_on_principal_options.rb', line 37 def resource_arns @resource_arns end |
#scope ⇒ Constructs::IConstruct? (readonly)
Deprecated.
The scope argument is currently unused.
Note:
Default: - the construct in which this construct is defined
Construct to report warnings on in case grant could not be registered.
48 49 50 |
# File 'iam/grant_on_principal_options.rb', line 48 def scope @scope end |
Class Method Details
.jsii_properties ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'iam/grant_on_principal_options.rb', line 50 def self.jsii_properties { :actions => "actions", :grantee => "grantee", :resource_arns => "resourceArns", :conditions => "conditions", :scope => "scope", } end |
Instance Method Details
#to_jsii ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'iam/grant_on_principal_options.rb', line 60 def to_jsii result = {} result.merge!(super) result.merge!({ "actions" => @actions, "grantee" => @grantee, "resourceArns" => @resource_arns, "conditions" => @conditions, "scope" => @scope, }) result.compact end |