Class: AWSCDK::Lambda::CfnLayerVersionPermissionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::CfnLayerVersionPermissionProps
- Defined in:
- lambda/cfn_layer_version_permission_props.rb
Overview
Properties for defining a CfnLayerVersionPermission.
Instance Attribute Summary collapse
-
#action ⇒ String
readonly
The API action that grants access to the layer.
-
#layer_version_arn ⇒ String, AWSCDK::Interfaces::AWSLambda::ILayerVersionRef
readonly
The name or Amazon Resource Name (ARN) of the layer.
-
#organization_id ⇒ String?
readonly
With the principal set to
*, grant permission to all accounts in the specified organization. -
#principal ⇒ String
readonly
An account ID, or
*to grant layer usage permission to all accounts in an organization, or all AWS accounts (iforganizationIdis not specified).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action:, layer_version_arn:, principal:, organization_id: nil) ⇒ CfnLayerVersionPermissionProps
constructor
A new instance of CfnLayerVersionPermissionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action:, layer_version_arn:, principal:, organization_id: nil) ⇒ CfnLayerVersionPermissionProps
Returns a new instance of CfnLayerVersionPermissionProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'lambda/cfn_layer_version_permission_props.rb', line 13 def initialize(action:, layer_version_arn:, principal:, organization_id: nil) @action = action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action") @layer_version_arn = layer_version_arn Jsii::Type.check_type(@layer_version_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSUxheWVyVmVyc2lvblJlZiJ9XX19")), "layerVersionArn") @principal = principal Jsii::Type.check_type(@principal, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "principal") @organization_id = organization_id Jsii::Type.check_type(@organization_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "organizationId") unless @organization_id.nil? end |
Instance Attribute Details
#action ⇒ String (readonly)
The API action that grants access to the layer.
For example, lambda:GetLayerVersion .
30 31 32 |
# File 'lambda/cfn_layer_version_permission_props.rb', line 30 def action @action end |
#layer_version_arn ⇒ String, AWSCDK::Interfaces::AWSLambda::ILayerVersionRef (readonly)
The name or Amazon Resource Name (ARN) of the layer.
35 36 37 |
# File 'lambda/cfn_layer_version_permission_props.rb', line 35 def layer_version_arn @layer_version_arn end |
#organization_id ⇒ String? (readonly)
With the principal set to * , grant permission to all accounts in the specified organization.
47 48 49 |
# File 'lambda/cfn_layer_version_permission_props.rb', line 47 def organization_id @organization_id end |
#principal ⇒ String (readonly)
An account ID, or * to grant layer usage permission to all accounts in an organization, or all AWS accounts (if organizationId is not specified).
For the last case, make sure that you really do want all AWS accounts to have usage permission to this layer.
42 43 44 |
# File 'lambda/cfn_layer_version_permission_props.rb', line 42 def principal @principal end |
Class Method Details
.jsii_properties ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lambda/cfn_layer_version_permission_props.rb', line 49 def self.jsii_properties { :action => "action", :layer_version_arn => "layerVersionArn", :principal => "principal", :organization_id => "organizationId", } end |
Instance Method Details
#to_jsii ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'lambda/cfn_layer_version_permission_props.rb', line 58 def to_jsii result = {} result.merge!({ "action" => @action, "layerVersionArn" => @layer_version_arn, "principal" => @principal, "organizationId" => @organization_id, }) result.compact end |