Class: AWSCDK::Greengrass::CfnFunctionDefinition::ResourceAccessPolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrass::CfnFunctionDefinition::ResourceAccessPolicyProperty
- Defined in:
- greengrass/cfn_function_definition.rb
Overview
A list of the resources in the group that the function can access, with the corresponding read-only or read-write permissions. The maximum is 10 resources.
This property applies only to Lambda functions that run in a Greengrass container.
In an CloudFormation template, ResourceAccessPolicy is a property of the Environment property type.
Instance Attribute Summary collapse
-
#permission ⇒ String?
readonly
The read-only or read-write access that the Lambda function has to the resource.
-
#resource_id ⇒ String
readonly
The ID of the resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(resource_id:, permission: nil) ⇒ ResourceAccessPolicyProperty
constructor
A new instance of ResourceAccessPolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(resource_id:, permission: nil) ⇒ ResourceAccessPolicyProperty
Returns a new instance of ResourceAccessPolicyProperty.
986 987 988 989 990 991 |
# File 'greengrass/cfn_function_definition.rb', line 986 def initialize(resource_id:, permission: nil) @resource_id = resource_id Jsii::Type.check_type(@resource_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceId") @permission = Jsii::Type.check_type(@permission, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "permission") unless @permission.nil? end |
Instance Attribute Details
#permission ⇒ String? (readonly)
The read-only or read-write access that the Lambda function has to the resource.
Valid values are ro or rw .
1006 1007 1008 |
# File 'greengrass/cfn_function_definition.rb', line 1006 def @permission end |
#resource_id ⇒ String (readonly)
The ID of the resource.
This ID is assigned to the resource when you create the resource definition.
999 1000 1001 |
# File 'greengrass/cfn_function_definition.rb', line 999 def resource_id @resource_id end |
Class Method Details
.jsii_properties ⇒ Object
1008 1009 1010 1011 1012 1013 |
# File 'greengrass/cfn_function_definition.rb', line 1008 def self.jsii_properties { :resource_id => "resourceId", :permission => "permission", } end |
Instance Method Details
#to_jsii ⇒ Object
1015 1016 1017 1018 1019 1020 1021 1022 |
# File 'greengrass/cfn_function_definition.rb', line 1015 def to_jsii result = {} result.merge!({ "resourceId" => @resource_id, "permission" => @permission, }) result.compact end |