Class: AWSCDK::CustomResourceProviderOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CustomResourceProviderOptions
- Defined in:
- custom_resource_provider_options.rb
Overview
Initialization options for custom resource providers.
Direct Known Subclasses
CustomResourceProviderBaseProps, CustomResourceProviderProps
Instance Attribute Summary collapse
-
#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.
-
#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) ⇒ CustomResourceProviderOptions
constructor
A new instance of CustomResourceProviderOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(description: nil, environment: nil, memory_size: nil, policy_statements: nil, timeout: nil, use_cfn_response_wrapper: nil) ⇒ CustomResourceProviderOptions
Returns a new instance of CustomResourceProviderOptions.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'custom_resource_provider_options.rb', line 13 def initialize(description: nil, environment: nil, memory_size: nil, policy_statements: nil, timeout: nil, use_cfn_response_wrapper: nil) @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? end |
Instance Attribute Details
#description ⇒ String? (readonly)
Default: - No description.
A description of the function.
32 33 34 |
# File 'custom_resource_provider_options.rb', line 32 def description @description end |
#environment ⇒ Hash{String => String}? (readonly)
Default: - No environment variables.
Key-value pairs that are passed to Lambda as Environment.
37 38 39 |
# File 'custom_resource_provider_options.rb', line 37 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.
45 46 47 |
# File 'custom_resource_provider_options.rb', line 45 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.
65 66 67 |
# File 'custom_resource_provider_options.rb', line 65 def policy_statements @policy_statements end |
#timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.minutes(15)
AWS Lambda timeout for the provider.
70 71 72 |
# File 'custom_resource_provider_options.rb', line 70 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.
75 76 77 |
# File 'custom_resource_provider_options.rb', line 75 def use_cfn_response_wrapper @use_cfn_response_wrapper end |
Class Method Details
.jsii_properties ⇒ Object
77 78 79 80 81 82 83 84 85 86 |
# File 'custom_resource_provider_options.rb', line 77 def self.jsii_properties { :description => "description", :environment => "environment", :memory_size => "memorySize", :policy_statements => "policyStatements", :timeout => "timeout", :use_cfn_response_wrapper => "useCfnResponseWrapper", } end |
Instance Method Details
#to_jsii ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'custom_resource_provider_options.rb', line 88 def to_jsii result = {} result.merge!({ "description" => @description, "environment" => @environment, "memorySize" => @memory_size, "policyStatements" => @policy_statements, "timeout" => @timeout, "useCfnResponseWrapper" => @use_cfn_response_wrapper, }) result.compact end |