Class: AWSCDK::Lambda::LayerVersionPermission
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::LayerVersionPermission
- Defined in:
- lambda/layer_version_permission.rb
Overview
Identification of an account (or organization) that is allowed to access a Lambda Layer Version.
Instance Attribute Summary collapse
-
#account_id ⇒ String
readonly
The AWS Account id of the account that is authorized to use a Lambda Layer Version.
-
#organization_id ⇒ String?
readonly
The ID of the AWS Organization to which the grant is restricted.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(account_id:, organization_id: nil) ⇒ LayerVersionPermission
constructor
A new instance of LayerVersionPermission.
- #to_jsii ⇒ Object
Constructor Details
#initialize(account_id:, organization_id: nil) ⇒ LayerVersionPermission
Returns a new instance of LayerVersionPermission.
9 10 11 12 13 14 |
# File 'lambda/layer_version_permission.rb', line 9 def initialize(account_id:, organization_id: nil) @account_id = account_id Jsii::Type.check_type(@account_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "accountId") @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
#account_id ⇒ String (readonly)
The AWS Account id of the account that is authorized to use a Lambda Layer Version.
The wild-card '*' can be
used to grant access to "any" account (or any account in an organization when organization_id is specified).
22 23 24 |
# File 'lambda/layer_version_permission.rb', line 22 def account_id @account_id end |
#organization_id ⇒ String? (readonly)
The ID of the AWS Organization to which the grant is restricted.
Can only be specified if account_id is '*'
28 29 30 |
# File 'lambda/layer_version_permission.rb', line 28 def organization_id @organization_id end |
Class Method Details
.jsii_properties ⇒ Object
30 31 32 33 34 35 |
# File 'lambda/layer_version_permission.rb', line 30 def self.jsii_properties { :account_id => "accountId", :organization_id => "organizationId", } end |
Instance Method Details
#to_jsii ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lambda/layer_version_permission.rb', line 37 def to_jsii result = {} result.merge!({ "accountId" => @account_id, "organizationId" => @organization_id, }) result.compact end |