Class: AWSCDK::Lambda::LayerVersionPermission

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account_id:, organization_id: nil) ⇒ LayerVersionPermission

Returns a new instance of LayerVersionPermission.

Parameters:

  • account_id (String)

    The AWS Account id of the account that is authorized to use a Lambda Layer Version.

  • organization_id (String, nil) (defaults to: nil)

    The ID of the AWS Organization to which the grant is restricted.



9
10
11
12
13
14
# File 'lambda/layer_version_permission.rb', line 9

def initialize(account_id:, organization_id: nil)
  @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_idString (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).

Returns:

  • (String)


22
23
24
# File 'lambda/layer_version_permission.rb', line 22

def 
  @account_id
end

#organization_idString? (readonly)

The ID of the AWS Organization to which the grant is restricted.

Can only be specified if account_id is '*'

Returns:

  • (String, nil)


28
29
30
# File 'lambda/layer_version_permission.rb', line 28

def organization_id
  @organization_id
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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