Class: AWSCDK::CustomResourceProviderProps
- Inherits:
-
CustomResourceProviderOptions
- Object
- CustomResourceProviderOptions
- AWSCDK::CustomResourceProviderProps
- Defined in:
- custom_resource_provider_props.rb
Overview
Initialization properties for CustomResourceProvider.
Instance Attribute Summary collapse
-
#code_directory ⇒ String
readonly
A local file system directory with the provider's code.
-
#description ⇒ String?
readonly
A description of the function.
-
#environment ⇒ Hash{String => String}?
readonly
Key-value pairs that are passed to Lambda as Environment.
-
#memory_size ⇒ AWSCDK::Size?
readonly
The amount of memory that your function has access to.
-
#policy_statements ⇒ Array<Object>?
readonly
A set of IAM policy statements to include in the inline policy of the provider's lambda function.
-
#runtime ⇒ AWSCDK::CustomResourceProviderRuntime
readonly
The AWS Lambda runtime and version to use for the provider.
-
#timeout ⇒ AWSCDK::Duration?
readonly
AWS Lambda timeout for the provider.
-
#use_cfn_response_wrapper ⇒ Boolean?
readonly
Whether or not the cloudformation response wrapper (
nodejs-entrypoint.ts) is used.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(description: nil, environment: nil, memory_size: nil, policy_statements: nil, timeout: nil, use_cfn_response_wrapper: nil, code_directory:, runtime:) ⇒ CustomResourceProviderProps
constructor
A new instance of CustomResourceProviderProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description: nil, environment: nil, memory_size: nil, policy_statements: nil, timeout: nil, use_cfn_response_wrapper: nil, code_directory:, runtime:) ⇒ CustomResourceProviderProps
Returns a new instance of CustomResourceProviderProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'custom_resource_provider_props.rb', line 15 def initialize(description: nil, environment: nil, memory_size: nil, policy_statements: nil, timeout: nil, use_cfn_response_wrapper: nil, code_directory:, runtime:) @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @environment = environment Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "environment") unless @environment.nil? @memory_size = memory_size Jsii::Type.check_type(@memory_size, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "memorySize") unless @memory_size.nil? @policy_statements = policy_statements Jsii::Type.check_type(@policy_statements, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoiYXJyYXkifX0=")), "policyStatements") unless @policy_statements.nil? @timeout = timeout Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil? @use_cfn_response_wrapper = use_cfn_response_wrapper Jsii::Type.check_type(@use_cfn_response_wrapper, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "useCfnResponseWrapper") unless @use_cfn_response_wrapper.nil? @code_directory = code_directory Jsii::Type.check_type(@code_directory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "codeDirectory") @runtime = runtime Jsii::Type.check_type(@runtime, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DdXN0b21SZXNvdXJjZVByb3ZpZGVyUnVudGltZSJ9")), "runtime") end |
Instance Attribute Details
#code_directory ⇒ String (readonly)
A local file system directory with the provider's code.
The code will be bundled into a zip asset and wired to the provider's AWS Lambda function.
89 90 91 |
# File 'custom_resource_provider_props.rb', line 89 def code_directory @code_directory end |
#description ⇒ String? (readonly)
Default: - No description.
A description of the function.
38 39 40 |
# File 'custom_resource_provider_props.rb', line 38 def description @description end |
#environment ⇒ Hash{String => String}? (readonly)
Default: - No environment variables.
Key-value pairs that are passed to Lambda as Environment.
43 44 45 |
# File 'custom_resource_provider_props.rb', line 43 def environment @environment end |
#memory_size ⇒ AWSCDK::Size? (readonly)
Default: Size.mebibytes(128)
The amount of memory that your function has access to.
Increasing the function's memory also increases its CPU allocation.
51 52 53 |
# File 'custom_resource_provider_props.rb', line 51 def memory_size @memory_size end |
#policy_statements ⇒ Array<Object>? (readonly)
Default: - no additional inline policy
A set of IAM policy statements to include in the inline policy of the provider's lambda function.
Please note: these are direct IAM JSON policy blobs, not iam.PolicyStatement
objects like you will see in the rest of the CDK.
72 73 74 |
# File 'custom_resource_provider_props.rb', line 72 def policy_statements @policy_statements end |
#runtime ⇒ AWSCDK::CustomResourceProviderRuntime (readonly)
The AWS Lambda runtime and version to use for the provider.
93 94 95 |
# File 'custom_resource_provider_props.rb', line 93 def runtime @runtime end |
#timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.minutes(15)
AWS Lambda timeout for the provider.
77 78 79 |
# File 'custom_resource_provider_props.rb', line 77 def timeout @timeout end |
#use_cfn_response_wrapper ⇒ Boolean? (readonly)
Default: - true if inlineCode: false and false otherwise.
Whether or not the cloudformation response wrapper (nodejs-entrypoint.ts) is used. If set to true, nodejs-entrypoint.js is bundled in the same asset as the custom resource and set as the entrypoint. If set to false, the custom resource provided is the entrypoint.
82 83 84 |
# File 'custom_resource_provider_props.rb', line 82 def use_cfn_response_wrapper @use_cfn_response_wrapper end |
Class Method Details
.jsii_properties ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'custom_resource_provider_props.rb', line 95 def self.jsii_properties { :description => "description", :environment => "environment", :memory_size => "memorySize", :policy_statements => "policyStatements", :timeout => "timeout", :use_cfn_response_wrapper => "useCfnResponseWrapper", :code_directory => "codeDirectory", :runtime => "runtime", } end |
Instance Method Details
#to_jsii ⇒ Object
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'custom_resource_provider_props.rb', line 108 def to_jsii result = {} result.merge!(super) result.merge!({ "description" => @description, "environment" => @environment, "memorySize" => @memory_size, "policyStatements" => @policy_statements, "timeout" => @timeout, "useCfnResponseWrapper" => @use_cfn_response_wrapper, "codeDirectory" => @code_directory, "runtime" => @runtime, }) result.compact end |