Class: AWSCDK::CustomResources::SdkCallsPolicyOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
custom_resources/sdk_calls_policy_options.rb

Overview

Options for the auto-generation of policies based on the configured SDK calls.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resources:) ⇒ SdkCallsPolicyOptions

Returns a new instance of SdkCallsPolicyOptions.

Parameters:

  • resources (Array<String>)

    The resources that the calls will have access to.



8
9
10
11
# File 'custom_resources/sdk_calls_policy_options.rb', line 8

def initialize(resources:)
  @resources = resources
  Jsii::Type.check_type(@resources, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "resources")
end

Instance Attribute Details

#resourcesArray<String> (readonly)

The resources that the calls will have access to.

It is best to use specific resource ARN's when possible. However, you can also use AwsCustomResourcePolicy.ANY_RESOURCE to allow access to all resources. For example, when on_create is used to create a resource which you don't know the physical name of in advance.

Note that will apply to ALL SDK calls.

Returns:

  • (Array<String>)


22
23
24
# File 'custom_resources/sdk_calls_policy_options.rb', line 22

def resources
  @resources
end

Class Method Details

.jsii_propertiesObject



24
25
26
27
28
# File 'custom_resources/sdk_calls_policy_options.rb', line 24

def self.jsii_properties
  {
    :resources => "resources",
  }
end

Instance Method Details

#to_jsiiObject



30
31
32
33
34
35
36
# File 'custom_resources/sdk_calls_policy_options.rb', line 30

def to_jsii
  result = {}
  result.merge!({
    "resources" => @resources,
  })
  result.compact
end