Class: AWSCDK::Lambda::CfnFunction
- Inherits:
-
CfnResource
- Object
- CfnResource
- AWSCDK::Lambda::CfnFunction
- Includes:
- IInspectable, ITaggable, Interfaces::AWSLambda::IFunctionRef
- Defined in:
- lambda/cfn_function.rb
Overview
The AWS::Lambda::Function resource creates a Lambda function.
To create a function, you need a deployment package and an execution role . The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use AWS services, such as Amazon CloudWatch Logs for log streaming and AWS X-Ray for request tracing.
You set the package type to Image if the deployment package is a container image . For these functions, include the URI of the container image in the Amazon ECR registry in the ImageUri property of the Code property . You do not need to specify the handler and runtime properties.
You set the package type to Zip if the deployment package is a .zip file archive . For these functions, specify the Amazon S3 location of your .zip file in the Code property. Alternatively, for Node.js and Python functions, you can define your function inline in the ZipFile property of the Code property . In both cases, you must also specify the handler and runtime properties.
You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with UpdateFunctionCode , Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.
When you update a AWS::Lambda::Function resource, CloudFormation calls the UpdateFunctionConfiguration and UpdateFunctionCode Lambda APIs under the hood. Because these calls happen sequentially, and invocations can happen between these calls, your function may encounter errors in the time between the calls. For example, if you remove an environment variable, and the code that references that environment variable in the same CloudFormation update, you may see invocation errors related to a missing environment variable. To work around this, you can invoke your function against a version or alias by default, rather than the $LATEST version.
Note that you configure provisioned concurrency on a AWS::Lambda::Version or a AWS::Lambda::Alias .
For a complete introduction to Lambda functions, see What is Lambda? in the Lambda developer guide.
Class Method Summary collapse
- .arn_for_function(resource) ⇒ String
-
.CFN_RESOURCE_TYPE_NAME ⇒ String
The CloudFormation resource type name for this resource class.
-
.from_function_arn(scope, id, arn) ⇒ AWSCDK::Interfaces::AWSLambda::IFunctionRef
Creates a new IFunctionRef from an ARN.
-
.from_function_name(scope, id, function_name) ⇒ AWSCDK::Interfaces::AWSLambda::IFunctionRef
Creates a new IFunctionRef from a functionName.
-
.is_cfn_function(x) ⇒ Boolean
Checks whether the given object is a CfnFunction.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#add_deletion_override(path) ⇒ void
Syntactic sugar for
addOverride(path, undefined). -
#add_dependency(target) ⇒ void
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
-
#add_depends_on(target) ⇒ void
deprecated
Deprecated.
use addDependency
-
#add_metadata(key, value) ⇒ void
Add a value to the CloudFormation Resource Metadata.
-
#add_override(path, value) ⇒ void
Adds an override to the synthesized CloudFormation resource.
-
#add_property_deletion_override(property_path) ⇒ void
Adds an override that deletes the value of a property from the resource definition.
-
#add_property_override(property_path, value) ⇒ void
Adds an override to a resource property.
-
#apply_cross_stack_reference_strength(strength) ⇒ void
Sets the cross-stack reference strength for this resource.
-
#apply_removal_policy(policy = nil, options = nil) ⇒ void
Sets the deletion policy of the resource based on the removal policy specified.
-
#architectures ⇒ Array<String>?
The instruction set architecture that the function supports.
- #architectures=(value) ⇒ Object
-
#attr_arn ⇒ String
The Amazon Resource Name (ARN) of the function.
-
#attr_snap_start_response ⇒ AWSCDK::IResolvable
The function's SnapStart setting.
-
#attr_snap_start_response_apply_on ⇒ String
When set to
PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version. -
#attr_snap_start_response_optimization_status ⇒ String
When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is activated for the specified function version.
-
#capacity_provider_config ⇒ AWSCDK::IResolvable, ...
Configuration for the capacity provider that manages compute resources for Lambda functions.
- #capacity_provider_config=(value) ⇒ Object
-
#cfn_options ⇒ AWSCDK::ICfnResourceOptions
Options for this resource, such as condition, update policy etc.
- #cfn_properties ⇒ Hash{String => Object}
- #cfn_property_name(cdk_property_name) ⇒ String?
- #cfn_property_names ⇒ Hash{String => String}
-
#cfn_resource_type ⇒ String
AWS resource type.
-
#code ⇒ AWSCDK::IResolvable, AWSCDK::Lambda::CfnFunction::CodeProperty
The code for the function.
- #code=(value) ⇒ Object
-
#code_signing_config_arn ⇒ String?
To enable code signing for this function, specify the ARN of a code-signing configuration.
- #code_signing_config_arn=(value) ⇒ Object
- #creation_stack ⇒ Array<String>
-
#dead_letter_config ⇒ AWSCDK::IResolvable, ...
A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
- #dead_letter_config=(value) ⇒ Object
-
#description ⇒ String?
A description of the function.
- #description=(value) ⇒ Object
-
#durable_config ⇒ AWSCDK::IResolvable, ...
Configuration settings for durable functions , including execution timeout and retention period for execution history.
- #durable_config=(value) ⇒ Object
- #env ⇒ AWSCDK::Interfaces::ResourceEnvironment
-
#environment ⇒ AWSCDK::IResolvable, ...
Environment variables that are accessible from function code during execution.
- #environment=(value) ⇒ Object
-
#ephemeral_storage ⇒ AWSCDK::IResolvable, ...
The size of the function's
/tmpdirectory in MB. - #ephemeral_storage=(value) ⇒ Object
-
#file_system_configs ⇒ AWSCDK::IResolvable, ...
Connection settings for an Amazon EFS file system.
- #file_system_configs=(value) ⇒ Object
-
#function_name ⇒ String?
The name of the Lambda function, up to 64 characters in length.
- #function_name=(value) ⇒ Object
-
#function_ref ⇒ AWSCDK::Interfaces::AWSLambda::FunctionReference
A reference to a Function resource.
-
#function_scaling_config ⇒ AWSCDK::IResolvable, ...
Configuration that defines the scaling behavior for a Lambda Managed Instances function, including the minimum and maximum number of execution environments that can be provisioned.
- #function_scaling_config=(value) ⇒ Object
-
#get_att(attribute_name, type_hint = nil) ⇒ AWSCDK::Reference
Returns a token for an runtime attribute of this resource.
-
#get_metadata(key) ⇒ Object
Retrieve a value value from the CloudFormation Resource Metadata.
-
#handler ⇒ String?
The name of the method within your code that Lambda calls to run your function.
- #handler=(value) ⇒ Object
-
#image_config ⇒ AWSCDK::IResolvable, ...
Configuration values that override the container image Dockerfile settings.
- #image_config=(value) ⇒ Object
-
#initialize(scope, id, props) ⇒ CfnFunction
constructor
Create a new
AWS::Lambda::Function. -
#inspect(inspector) ⇒ void
Examines the CloudFormation resource and discloses attributes.
-
#kms_key_arn ⇒ String?
The ARN of the AWS Key Management Service ( AWS ) customer managed key that's used to encrypt the following resources:.
- #kms_key_arn=(value) ⇒ Object
-
#layers ⇒ Array<String>?
A list of function layers to add to the function's execution environment.
- #layers=(value) ⇒ Object
-
#logging_config ⇒ AWSCDK::IResolvable, ...
The function's Amazon CloudWatch Logs configuration settings.
- #logging_config=(value) ⇒ Object
-
#logical_id ⇒ String
The logical ID for this CloudFormation stack element.
-
#memory_size ⇒ Numeric?
The amount of memory available to the function at runtime.
- #memory_size=(value) ⇒ Object
-
#node ⇒ Constructs::Node
The tree node.
-
#obtain_dependencies ⇒ Array<AWSCDK::CfnResource, AWSCDK::Stack>
Retrieves an array of resources this resource depends on.
-
#obtain_resource_dependencies ⇒ Array<AWSCDK::CfnResource>
Get a shallow copy of dependencies between this resource and other resources in the same stack.
-
#override_logical_id(new_logical_id) ⇒ void
Overrides the auto-generated logical ID with a specific ID.
-
#package_type ⇒ String?
The type of deployment package.
- #package_type=(value) ⇒ Object
- #publish_to_latest_published ⇒ Boolean, ...
- #publish_to_latest_published=(value) ⇒ Object
-
#recursive_loop ⇒ String?
The status of your function's recursive loop detection configuration.
- #recursive_loop=(value) ⇒ Object
-
#ref ⇒ String
Return a string that will be resolved to a CloudFormation
{ Ref }for this element. -
#remove_dependency(target) ⇒ void
Indicates that this resource no longer depends on another resource.
- #render_properties(props) ⇒ Hash{String => Object}
-
#replace_dependency(target, new_target) ⇒ void
Replaces one dependency with another.
-
#reserved_concurrent_executions ⇒ Numeric?
The number of simultaneous executions to reserve for the function.
- #reserved_concurrent_executions=(value) ⇒ Object
-
#role ⇒ String
The Amazon Resource Name (ARN) of the function's execution role.
- #role=(value) ⇒ Object
-
#runtime ⇒ String?
The identifier of the function's runtime .
- #runtime=(value) ⇒ Object
-
#runtime_management_config ⇒ AWSCDK::IResolvable, ...
Sets the runtime management configuration for a function's version.
- #runtime_management_config=(value) ⇒ Object
-
#should_synthesize ⇒ Boolean
Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
-
#snap_start ⇒ AWSCDK::IResolvable, ...
The function's AWS Lambda SnapStart setting.
- #snap_start=(value) ⇒ Object
-
#stack ⇒ AWSCDK::Stack
The stack in which this element is defined.
-
#tags ⇒ AWSCDK::TagManager
Tag Manager which manages the tags for this resource.
-
#tags_raw ⇒ Array<AWSCDK::CfnTag>?
A list of tags to apply to the function.
- #tags_raw=(value) ⇒ Object
-
#tenancy_config ⇒ AWSCDK::IResolvable, ...
The function's tenant isolation configuration settings.
- #tenancy_config=(value) ⇒ Object
-
#timeout ⇒ Numeric?
The amount of time (in seconds) that Lambda allows a function to run before stopping it.
- #timeout=(value) ⇒ Object
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#tracing_config ⇒ AWSCDK::IResolvable, ...
Set
ModetoActiveto sample and trace a subset of incoming requests with X-Ray . - #tracing_config=(value) ⇒ Object
-
#updated_properites ⇒ Hash{String => Object}
deprecated
Deprecated.
use
updatedPropertiesReturn properties modified after initiation Resources that expose mutable properties should override this function to collect and return the properties object for this resource. -
#updated_properties ⇒ Hash{String => Object}
Return properties modified after initiation.
- #validate_properties(_properties) ⇒ void
-
#vpc_config ⇒ AWSCDK::IResolvable, ...
For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.
- #vpc_config=(value) ⇒ Object
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ CfnFunction
Create a new AWS::Lambda::Function.
32 33 34 35 36 37 38 |
# File 'lambda/cfn_function.rb', line 32 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunctionProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkNmbkZ1bmN0aW9uUHJvcHMifQ==")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.arn_for_function(resource) ⇒ String
119 120 121 122 |
# File 'lambda/cfn_function.rb', line 119 def self.arn_for_function(resource) Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSUZ1bmN0aW9uUmVmIn0=")), "resource") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_lambda.CfnFunction", "arnForFunction", [resource]) end |
.CFN_RESOURCE_TYPE_NAME ⇒ String
The CloudFormation resource type name for this resource class.
252 253 254 |
# File 'lambda/cfn_function.rb', line 252 def self.CFN_RESOURCE_TYPE_NAME() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_lambda.CfnFunction", "CFN_RESOURCE_TYPE_NAME") end |
.from_function_arn(scope, id, arn) ⇒ AWSCDK::Interfaces::AWSLambda::IFunctionRef
Creates a new IFunctionRef from an ARN.
130 131 132 133 134 135 |
# File 'lambda/cfn_function.rb', line 130 def self.from_function_arn(scope, id, arn) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arn") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_lambda.CfnFunction", "fromFunctionArn", [scope, id, arn]) end |
.from_function_name(scope, id, function_name) ⇒ AWSCDK::Interfaces::AWSLambda::IFunctionRef
Creates a new IFunctionRef from a functionName.
143 144 145 146 147 148 |
# File 'lambda/cfn_function.rb', line 143 def self.from_function_name(scope, id, function_name) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(function_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionName") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_lambda.CfnFunction", "fromFunctionName", [scope, id, function_name]) end |
.is_cfn_function(x) ⇒ Boolean
Checks whether the given object is a CfnFunction.
154 155 156 157 |
# File 'lambda/cfn_function.rb', line 154 def self.is_cfn_function(x) Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "x") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_lambda.CfnFunction", "isCfnFunction", [x]) end |
.jsii_overridable_methods ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lambda/cfn_function.rb', line 40 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :creation_stack => { kind: :property, name: "creationStack", is_optional: false }, :logical_id => { kind: :property, name: "logicalId", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :ref => { kind: :property, name: "ref", is_optional: false }, :cfn_options => { kind: :property, name: "cfnOptions", is_optional: false }, :cfn_properties => { kind: :property, name: "cfnProperties", is_optional: false }, :cfn_property_names => { kind: :property, name: "cfnPropertyNames", is_optional: false }, :cfn_resource_type => { kind: :property, name: "cfnResourceType", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :updated_properites => { kind: :property, name: "updatedProperites", is_optional: false }, :updated_properties => { kind: :property, name: "updatedProperties", is_optional: false }, :attr_arn => { kind: :property, name: "attrArn", is_optional: false }, :attr_snap_start_response => { kind: :property, name: "attrSnapStartResponse", is_optional: false }, :attr_snap_start_response_apply_on => { kind: :property, name: "attrSnapStartResponseApplyOn", is_optional: false }, :attr_snap_start_response_optimization_status => { kind: :property, name: "attrSnapStartResponseOptimizationStatus", is_optional: false }, :function_ref => { kind: :property, name: "functionRef", is_optional: false }, :tags => { kind: :property, name: "tags", is_optional: false }, :code => { kind: :property, name: "code", is_optional: false }, :role => { kind: :property, name: "role", is_optional: false }, :architectures => { kind: :property, name: "architectures", is_optional: true }, :capacity_provider_config => { kind: :property, name: "capacityProviderConfig", is_optional: true }, :code_signing_config_arn => { kind: :property, name: "codeSigningConfigArn", is_optional: true }, :dead_letter_config => { kind: :property, name: "deadLetterConfig", is_optional: true }, :description => { kind: :property, name: "description", is_optional: true }, :durable_config => { kind: :property, name: "durableConfig", is_optional: true }, :environment => { kind: :property, name: "environment", is_optional: true }, :ephemeral_storage => { kind: :property, name: "ephemeralStorage", is_optional: true }, :file_system_configs => { kind: :property, name: "fileSystemConfigs", is_optional: true }, :function_name => { kind: :property, name: "functionName", is_optional: true }, :function_scaling_config => { kind: :property, name: "functionScalingConfig", is_optional: true }, :handler => { kind: :property, name: "handler", is_optional: true }, :image_config => { kind: :property, name: "imageConfig", is_optional: true }, :kms_key_arn => { kind: :property, name: "kmsKeyArn", is_optional: true }, :layers => { kind: :property, name: "layers", is_optional: true }, :logging_config => { kind: :property, name: "loggingConfig", is_optional: true }, :memory_size => { kind: :property, name: "memorySize", is_optional: true }, :package_type => { kind: :property, name: "packageType", is_optional: true }, :publish_to_latest_published => { kind: :property, name: "publishToLatestPublished", is_optional: true }, :recursive_loop => { kind: :property, name: "recursiveLoop", is_optional: true }, :reserved_concurrent_executions => { kind: :property, name: "reservedConcurrentExecutions", is_optional: true }, :runtime => { kind: :property, name: "runtime", is_optional: true }, :runtime_management_config => { kind: :property, name: "runtimeManagementConfig", is_optional: true }, :snap_start => { kind: :property, name: "snapStart", is_optional: true }, :tags_raw => { kind: :property, name: "tagsRaw", is_optional: true }, :tenancy_config => { kind: :property, name: "tenancyConfig", is_optional: true }, :timeout => { kind: :property, name: "timeout", is_optional: true }, :tracing_config => { kind: :property, name: "tracingConfig", is_optional: true }, :vpc_config => { kind: :property, name: "vpcConfig", is_optional: true }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :override_logical_id => { kind: :method, name: "overrideLogicalId", is_optional: false }, :add_deletion_override => { kind: :method, name: "addDeletionOverride", is_optional: false }, :add_dependency => { kind: :method, name: "addDependency", is_optional: false }, :add_depends_on => { kind: :method, name: "addDependsOn", is_optional: false }, :add_metadata => { kind: :method, name: "addMetadata", is_optional: false }, :add_override => { kind: :method, name: "addOverride", is_optional: false }, :add_property_deletion_override => { kind: :method, name: "addPropertyDeletionOverride", is_optional: false }, :add_property_override => { kind: :method, name: "addPropertyOverride", is_optional: false }, :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :cfn_property_name => { kind: :method, name: "cfnPropertyName", is_optional: false }, :get_att => { kind: :method, name: "getAtt", is_optional: false }, :get_metadata => { kind: :method, name: "getMetadata", is_optional: false }, :obtain_dependencies => { kind: :method, name: "obtainDependencies", is_optional: false }, :obtain_resource_dependencies => { kind: :method, name: "obtainResourceDependencies", is_optional: false }, :remove_dependency => { kind: :method, name: "removeDependency", is_optional: false }, :render_properties => { kind: :method, name: "renderProperties", is_optional: false }, :replace_dependency => { kind: :method, name: "replaceDependency", is_optional: false }, :should_synthesize => { kind: :method, name: "shouldSynthesize", is_optional: false }, :validate_properties => { kind: :method, name: "validateProperties", is_optional: false }, :inspect => { kind: :method, name: "inspect", is_optional: false }, } end |
Instance Method Details
#add_deletion_override(path) ⇒ void
This method returns an undefined value.
Syntactic sugar for addOverride(path, undefined).
721 722 723 724 |
# File 'lambda/cfn_function.rb', line 721 def add_deletion_override(path) Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") jsii_call_method("addDeletionOverride", [path]) end |
#add_dependency(target) ⇒ void
This method returns an undefined value.
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
733 734 735 736 |
# File 'lambda/cfn_function.rb', line 733 def add_dependency(target) Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target") jsii_call_method("addDependency", [target]) end |
#add_depends_on(target) ⇒ void
use addDependency
This method returns an undefined value.
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
743 744 745 746 |
# File 'lambda/cfn_function.rb', line 743 def add_depends_on(target) Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target") jsii_call_method("addDependsOn", [target]) end |
#add_metadata(key, value) ⇒ void
This method returns an undefined value.
Add a value to the CloudFormation Resource Metadata.
754 755 756 757 758 |
# File 'lambda/cfn_function.rb', line 754 def (key, value) Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value") jsii_call_method("addMetadata", [key, value]) end |
#add_override(path, value) ⇒ void
This method returns an undefined value.
Adds an override to the synthesized CloudFormation resource.
To add a
property override, either use add_property_override or prefix path with
"Properties." (i.e. Properties.TopicName).
If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal . in the property name, prefix with a \. In most
programming languages you will need to write this as "\\." because the
\ itself will need to be escaped.
For example,
# Example automatically generated from non-compiling source. May contain errors.
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides
"Properties": {
"GlobalSecondaryIndexes": [
{
"Projection": {
"NonKeyAttributes": [ "myattribute" ]
...
}
...
},
{
"ProjectionType": "INCLUDE"
...
},
]
...
}
The value argument to add_override will not be processed or translated
in any way. Pass raw JSON values in here with the correct capitalization
for CloudFormation. If you pass CDK classes or structs, they will be
rendered with lowercased key names, and CloudFormation will reject the
template.
811 812 813 814 815 |
# File 'lambda/cfn_function.rb', line 811 def add_override(path, value) Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value") jsii_call_method("addOverride", [path, value]) end |
#add_property_deletion_override(property_path) ⇒ void
This method returns an undefined value.
Adds an override that deletes the value of a property from the resource definition.
821 822 823 824 |
# File 'lambda/cfn_function.rb', line 821 def add_property_deletion_override(property_path) Jsii::Type.check_type(property_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propertyPath") jsii_call_method("addPropertyDeletionOverride", [property_path]) end |
#add_property_override(property_path, value) ⇒ void
This method returns an undefined value.
Adds an override to a resource property.
Syntactic sugar for addOverride("Properties.<...>", value).
833 834 835 836 837 |
# File 'lambda/cfn_function.rb', line 833 def add_property_override(property_path, value) Jsii::Type.check_type(property_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propertyPath") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value") jsii_call_method("addPropertyOverride", [property_path, value]) end |
#apply_cross_stack_reference_strength(strength) ⇒ void
This method returns an undefined value.
Sets the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.
846 847 848 849 |
# File 'lambda/cfn_function.rb', line 846 def apply_cross_stack_reference_strength(strength) Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength") jsii_call_method("applyCrossStackReferenceStrength", [strength]) end |
#apply_removal_policy(policy = nil, options = nil) ⇒ void
This method returns an undefined value.
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some
cases, a snapshot can be taken of the resource prior to deletion
(RemovalPolicy.SNAPSHOT). A list of resources that support this policy
can be found in the following link:
868 869 870 871 872 873 |
# File 'lambda/cfn_function.rb', line 868 def apply_removal_policy(policy = nil, = nil) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") unless policy.nil? = .is_a?(Hash) ? ::AWSCDK::RemovalPolicyOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5T3B0aW9ucyJ9")), "options") unless .nil? jsii_call_method("applyRemovalPolicy", [policy, ]) end |
#architectures ⇒ Array<String>?
The instruction set architecture that the function supports.
328 329 330 |
# File 'lambda/cfn_function.rb', line 328 def architectures() jsii_get_property("architectures") end |
#architectures=(value) ⇒ Object
332 333 334 335 |
# File 'lambda/cfn_function.rb', line 332 def architectures=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "architectures") unless value.nil? jsii_set_property("architectures", value) end |
#attr_arn ⇒ String
The Amazon Resource Name (ARN) of the function.
259 260 261 |
# File 'lambda/cfn_function.rb', line 259 def attr_arn() jsii_get_property("attrArn") end |
#attr_snap_start_response ⇒ AWSCDK::IResolvable
The function's SnapStart setting.
266 267 268 |
# File 'lambda/cfn_function.rb', line 266 def attr_snap_start_response() jsii_get_property("attrSnapStartResponse") end |
#attr_snap_start_response_apply_on ⇒ String
When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.
273 274 275 |
# File 'lambda/cfn_function.rb', line 273 def attr_snap_start_response_apply_on() jsii_get_property("attrSnapStartResponseApplyOn") end |
#attr_snap_start_response_optimization_status ⇒ String
When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is activated for the specified function version.
280 281 282 |
# File 'lambda/cfn_function.rb', line 280 def attr_snap_start_response_optimization_status() jsii_get_property("attrSnapStartResponseOptimizationStatus") end |
#capacity_provider_config ⇒ AWSCDK::IResolvable, ...
Configuration for the capacity provider that manages compute resources for Lambda functions.
340 341 342 |
# File 'lambda/cfn_function.rb', line 340 def capacity_provider_config() jsii_get_property("capacityProviderConfig") end |
#capacity_provider_config=(value) ⇒ Object
344 345 346 347 348 |
# File 'lambda/cfn_function.rb', line 344 def capacity_provider_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::CapacityProviderConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uQ2FwYWNpdHlQcm92aWRlckNvbmZpZ1Byb3BlcnR5In1dfX0=")), "capacityProviderConfig") unless value.nil? jsii_set_property("capacityProviderConfig", value) end |
#cfn_options ⇒ AWSCDK::ICfnResourceOptions
Options for this resource, such as condition, update policy etc.
205 206 207 |
# File 'lambda/cfn_function.rb', line 205 def () jsii_get_property("cfnOptions") end |
#cfn_properties ⇒ Hash{String => Object}
210 211 212 |
# File 'lambda/cfn_function.rb', line 210 def cfn_properties() jsii_get_property("cfnProperties") end |
#cfn_property_name(cdk_property_name) ⇒ String?
877 878 879 880 |
# File 'lambda/cfn_function.rb', line 877 def cfn_property_name(cdk_property_name) Jsii::Type.check_type(cdk_property_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cdkPropertyName") jsii_call_method("cfnPropertyName", [cdk_property_name]) end |
#cfn_property_names ⇒ Hash{String => String}
215 216 217 |
# File 'lambda/cfn_function.rb', line 215 def cfn_property_names() jsii_get_property("cfnPropertyNames") end |
#cfn_resource_type ⇒ String
AWS resource type.
222 223 224 |
# File 'lambda/cfn_function.rb', line 222 def cfn_resource_type() jsii_get_property("cfnResourceType") end |
#code ⇒ AWSCDK::IResolvable, AWSCDK::Lambda::CfnFunction::CodeProperty
The code for the function.
You can define your function code in multiple ways:.
303 304 305 |
# File 'lambda/cfn_function.rb', line 303 def code() jsii_get_property("code") end |
#code=(value) ⇒ Object
307 308 309 310 311 |
# File 'lambda/cfn_function.rb', line 307 def code=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::CodeProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uQ29kZVByb3BlcnR5In1dfX0=")), "code") jsii_set_property("code", value) end |
#code_signing_config_arn ⇒ String?
To enable code signing for this function, specify the ARN of a code-signing configuration.
353 354 355 |
# File 'lambda/cfn_function.rb', line 353 def code_signing_config_arn() jsii_get_property("codeSigningConfigArn") end |
#code_signing_config_arn=(value) ⇒ Object
357 358 359 360 |
# File 'lambda/cfn_function.rb', line 357 def code_signing_config_arn=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "codeSigningConfigArn") unless value.nil? jsii_set_property("codeSigningConfigArn", value) end |
#creation_stack ⇒ Array<String>
167 168 169 |
# File 'lambda/cfn_function.rb', line 167 def creation_stack() jsii_get_property("creationStack") end |
#dead_letter_config ⇒ AWSCDK::IResolvable, ...
A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
365 366 367 |
# File 'lambda/cfn_function.rb', line 365 def dead_letter_config() jsii_get_property("deadLetterConfig") end |
#dead_letter_config=(value) ⇒ Object
369 370 371 372 373 |
# File 'lambda/cfn_function.rb', line 369 def dead_letter_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::DeadLetterConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRGVhZExldHRlckNvbmZpZ1Byb3BlcnR5In1dfX0=")), "deadLetterConfig") unless value.nil? jsii_set_property("deadLetterConfig", value) end |
#description ⇒ String?
A description of the function.
378 379 380 |
# File 'lambda/cfn_function.rb', line 378 def description() jsii_get_property("description") end |
#description=(value) ⇒ Object
382 383 384 385 |
# File 'lambda/cfn_function.rb', line 382 def description=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless value.nil? jsii_set_property("description", value) end |
#durable_config ⇒ AWSCDK::IResolvable, ...
Configuration settings for durable functions , including execution timeout and retention period for execution history.
390 391 392 |
# File 'lambda/cfn_function.rb', line 390 def durable_config() jsii_get_property("durableConfig") end |
#durable_config=(value) ⇒ Object
394 395 396 397 398 |
# File 'lambda/cfn_function.rb', line 394 def durable_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::DurableConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRHVyYWJsZUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "durableConfig") unless value.nil? jsii_set_property("durableConfig", value) end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
227 228 229 |
# File 'lambda/cfn_function.rb', line 227 def env() jsii_get_property("env") end |
#environment ⇒ AWSCDK::IResolvable, ...
Environment variables that are accessible from function code during execution.
403 404 405 |
# File 'lambda/cfn_function.rb', line 403 def environment() jsii_get_property("environment") end |
#environment=(value) ⇒ Object
407 408 409 410 411 |
# File 'lambda/cfn_function.rb', line 407 def environment=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::EnvironmentProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRW52aXJvbm1lbnRQcm9wZXJ0eSJ9XX19")), "environment") unless value.nil? jsii_set_property("environment", value) end |
#ephemeral_storage ⇒ AWSCDK::IResolvable, ...
The size of the function's /tmp directory in MB.
416 417 418 |
# File 'lambda/cfn_function.rb', line 416 def ephemeral_storage() jsii_get_property("ephemeralStorage") end |
#ephemeral_storage=(value) ⇒ Object
420 421 422 423 424 |
# File 'lambda/cfn_function.rb', line 420 def ephemeral_storage=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::EphemeralStorageProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRXBoZW1lcmFsU3RvcmFnZVByb3BlcnR5In1dfX0=")), "ephemeralStorage") unless value.nil? jsii_set_property("ephemeralStorage", value) end |
#file_system_configs ⇒ AWSCDK::IResolvable, ...
Connection settings for an Amazon EFS file system.
429 430 431 |
# File 'lambda/cfn_function.rb', line 429 def file_system_configs() jsii_get_property("fileSystemConfigs") end |
#file_system_configs=(value) ⇒ Object
433 434 435 436 |
# File 'lambda/cfn_function.rb', line 433 def file_system_configs=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkNmbkZ1bmN0aW9uLkZpbGVTeXN0ZW1Db25maWdQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "fileSystemConfigs") unless value.nil? jsii_set_property("fileSystemConfigs", value) end |
#function_name ⇒ String?
The name of the Lambda function, up to 64 characters in length.
441 442 443 |
# File 'lambda/cfn_function.rb', line 441 def function_name() jsii_get_property("functionName") end |
#function_name=(value) ⇒ Object
445 446 447 448 |
# File 'lambda/cfn_function.rb', line 445 def function_name=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionName") unless value.nil? jsii_set_property("functionName", value) end |
#function_ref ⇒ AWSCDK::Interfaces::AWSLambda::FunctionReference
A reference to a Function resource.
287 288 289 |
# File 'lambda/cfn_function.rb', line 287 def function_ref() jsii_get_property("functionRef") end |
#function_scaling_config ⇒ AWSCDK::IResolvable, ...
Configuration that defines the scaling behavior for a Lambda Managed Instances function, including the minimum and maximum number of execution environments that can be provisioned.
453 454 455 |
# File 'lambda/cfn_function.rb', line 453 def function_scaling_config() jsii_get_property("functionScalingConfig") end |
#function_scaling_config=(value) ⇒ Object
457 458 459 460 461 |
# File 'lambda/cfn_function.rb', line 457 def function_scaling_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::FunctionScalingConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRnVuY3Rpb25TY2FsaW5nQ29uZmlnUHJvcGVydHkifV19fQ==")), "functionScalingConfig") unless value.nil? jsii_set_property("functionScalingConfig", value) end |
#get_att(attribute_name, type_hint = nil) ⇒ AWSCDK::Reference
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility
in case there is no generated attribute.
890 891 892 893 894 |
# File 'lambda/cfn_function.rb', line 890 def get_att(attribute_name, type_hint = nil) Jsii::Type.check_type(attribute_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attributeName") Jsii::Type.check_type(type_hint, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZXNvbHV0aW9uVHlwZUhpbnQifQ==")), "typeHint") unless type_hint.nil? jsii_call_method("getAtt", [attribute_name, type_hint]) end |
#get_metadata(key) ⇒ Object
Retrieve a value value from the CloudFormation Resource Metadata.
901 902 903 904 |
# File 'lambda/cfn_function.rb', line 901 def (key) Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") jsii_call_method("getMetadata", [key]) end |
#handler ⇒ String?
The name of the method within your code that Lambda calls to run your function.
466 467 468 |
# File 'lambda/cfn_function.rb', line 466 def handler() jsii_get_property("handler") end |
#handler=(value) ⇒ Object
470 471 472 473 |
# File 'lambda/cfn_function.rb', line 470 def handler=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "handler") unless value.nil? jsii_set_property("handler", value) end |
#image_config ⇒ AWSCDK::IResolvable, ...
Configuration values that override the container image Dockerfile settings.
478 479 480 |
# File 'lambda/cfn_function.rb', line 478 def image_config() jsii_get_property("imageConfig") end |
#image_config=(value) ⇒ Object
482 483 484 485 486 |
# File 'lambda/cfn_function.rb', line 482 def image_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::ImageConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uSW1hZ2VDb25maWdQcm9wZXJ0eSJ9XX19")), "imageConfig") unless value.nil? jsii_set_property("imageConfig", value) end |
#inspect(inspector) ⇒ void
This method returns an undefined value.
Examines the CloudFormation resource and discloses attributes.
971 972 973 974 |
# File 'lambda/cfn_function.rb', line 971 def inspect(inspector) Jsii::Type.check_type(inspector, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5UcmVlSW5zcGVjdG9yIn0=")), "inspector") jsii_call_method("inspect", [inspector]) end |
#kms_key_arn ⇒ String?
The ARN of the AWS Key Management Service ( AWS ) customer managed key that's used to encrypt the following resources:.
491 492 493 |
# File 'lambda/cfn_function.rb', line 491 def kms_key_arn() jsii_get_property("kmsKeyArn") end |
#kms_key_arn=(value) ⇒ Object
495 496 497 498 |
# File 'lambda/cfn_function.rb', line 495 def kms_key_arn=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyArn") unless value.nil? jsii_set_property("kmsKeyArn", value) end |
#layers ⇒ Array<String>?
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
503 504 505 |
# File 'lambda/cfn_function.rb', line 503 def layers() jsii_get_property("layers") end |
#layers=(value) ⇒ Object
507 508 509 510 |
# File 'lambda/cfn_function.rb', line 507 def layers=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "layers") unless value.nil? jsii_set_property("layers", value) end |
#logging_config ⇒ AWSCDK::IResolvable, ...
The function's Amazon CloudWatch Logs configuration settings.
515 516 517 |
# File 'lambda/cfn_function.rb', line 515 def logging_config() jsii_get_property("loggingConfig") end |
#logging_config=(value) ⇒ Object
519 520 521 522 523 |
# File 'lambda/cfn_function.rb', line 519 def logging_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::LoggingConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uTG9nZ2luZ0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "loggingConfig") unless value.nil? jsii_set_property("loggingConfig", value) end |
#logical_id ⇒ String
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use override_logical_id(new_logical_id).
179 180 181 |
# File 'lambda/cfn_function.rb', line 179 def logical_id() jsii_get_property("logicalId") end |
#memory_size ⇒ Numeric?
The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.
528 529 530 |
# File 'lambda/cfn_function.rb', line 528 def memory_size() jsii_get_property("memorySize") end |
#memory_size=(value) ⇒ Object
532 533 534 535 |
# File 'lambda/cfn_function.rb', line 532 def memory_size=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memorySize") unless value.nil? jsii_set_property("memorySize", value) end |
#node ⇒ Constructs::Node
The tree node.
162 163 164 |
# File 'lambda/cfn_function.rb', line 162 def node() jsii_get_property("node") end |
#obtain_dependencies ⇒ Array<AWSCDK::CfnResource, AWSCDK::Stack>
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
912 913 914 |
# File 'lambda/cfn_function.rb', line 912 def obtain_dependencies() jsii_call_method("obtainDependencies", []) end |
#obtain_resource_dependencies ⇒ Array<AWSCDK::CfnResource>
Get a shallow copy of dependencies between this resource and other resources in the same stack.
919 920 921 |
# File 'lambda/cfn_function.rb', line 919 def obtain_resource_dependencies() jsii_call_method("obtainResourceDependencies", []) end |
#override_logical_id(new_logical_id) ⇒ void
This method returns an undefined value.
Overrides the auto-generated logical ID with a specific ID.
712 713 714 715 |
# File 'lambda/cfn_function.rb', line 712 def override_logical_id(new_logical_id) Jsii::Type.check_type(new_logical_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "newLogicalId") jsii_call_method("overrideLogicalId", [new_logical_id]) end |
#package_type ⇒ String?
The type of deployment package.
540 541 542 |
# File 'lambda/cfn_function.rb', line 540 def package_type() jsii_get_property("packageType") end |
#package_type=(value) ⇒ Object
544 545 546 547 |
# File 'lambda/cfn_function.rb', line 544 def package_type=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "packageType") unless value.nil? jsii_set_property("packageType", value) end |
#publish_to_latest_published ⇒ Boolean, ...
550 551 552 |
# File 'lambda/cfn_function.rb', line 550 def publish_to_latest_published() jsii_get_property("publishToLatestPublished") end |
#publish_to_latest_published=(value) ⇒ Object
554 555 556 557 |
# File 'lambda/cfn_function.rb', line 554 def publish_to_latest_published=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "publishToLatestPublished") unless value.nil? jsii_set_property("publishToLatestPublished", value) end |
#recursive_loop ⇒ String?
The status of your function's recursive loop detection configuration.
562 563 564 |
# File 'lambda/cfn_function.rb', line 562 def recursive_loop() jsii_get_property("recursiveLoop") end |
#recursive_loop=(value) ⇒ Object
566 567 568 569 |
# File 'lambda/cfn_function.rb', line 566 def recursive_loop=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "recursiveLoop") unless value.nil? jsii_set_property("recursiveLoop", value) end |
#ref ⇒ String
Return a string that will be resolved to a CloudFormation { Ref } for this element.
If, by any chance, the intrinsic reference of a resource is not a string, you could
coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).
198 199 200 |
# File 'lambda/cfn_function.rb', line 198 def ref() jsii_get_property("ref") end |
#remove_dependency(target) ⇒ void
This method returns an undefined value.
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
930 931 932 933 |
# File 'lambda/cfn_function.rb', line 930 def remove_dependency(target) Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target") jsii_call_method("removeDependency", [target]) end |
#render_properties(props) ⇒ Hash{String => Object}
937 938 939 940 |
# File 'lambda/cfn_function.rb', line 937 def render_properties(props) Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "props") jsii_call_method("renderProperties", [props]) end |
#replace_dependency(target, new_target) ⇒ void
This method returns an undefined value.
Replaces one dependency with another.
947 948 949 950 951 |
# File 'lambda/cfn_function.rb', line 947 def replace_dependency(target, new_target) Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target") Jsii::Type.check_type(new_target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "newTarget") jsii_call_method("replaceDependency", [target, new_target]) end |
#reserved_concurrent_executions ⇒ Numeric?
The number of simultaneous executions to reserve for the function.
574 575 576 |
# File 'lambda/cfn_function.rb', line 574 def reserved_concurrent_executions() jsii_get_property("reservedConcurrentExecutions") end |
#reserved_concurrent_executions=(value) ⇒ Object
578 579 580 581 |
# File 'lambda/cfn_function.rb', line 578 def reserved_concurrent_executions=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "reservedConcurrentExecutions") unless value.nil? jsii_set_property("reservedConcurrentExecutions", value) end |
#role ⇒ String
The Amazon Resource Name (ARN) of the function's execution role.
316 317 318 |
# File 'lambda/cfn_function.rb', line 316 def role() jsii_get_property("role") end |
#role=(value) ⇒ Object
320 321 322 323 |
# File 'lambda/cfn_function.rb', line 320 def role=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "role") jsii_set_property("role", value) end |
#runtime ⇒ String?
The identifier of the function's runtime . Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.
586 587 588 |
# File 'lambda/cfn_function.rb', line 586 def runtime() jsii_get_property("runtime") end |
#runtime=(value) ⇒ Object
590 591 592 593 |
# File 'lambda/cfn_function.rb', line 590 def runtime=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "runtime") unless value.nil? jsii_set_property("runtime", value) end |
#runtime_management_config ⇒ AWSCDK::IResolvable, ...
Sets the runtime management configuration for a function's version.
598 599 600 |
# File 'lambda/cfn_function.rb', line 598 def runtime_management_config() jsii_get_property("runtimeManagementConfig") end |
#runtime_management_config=(value) ⇒ Object
602 603 604 605 606 |
# File 'lambda/cfn_function.rb', line 602 def runtime_management_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::RuntimeManagementConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uUnVudGltZU1hbmFnZW1lbnRDb25maWdQcm9wZXJ0eSJ9XX19")), "runtimeManagementConfig") unless value.nil? jsii_set_property("runtimeManagementConfig", value) end |
#should_synthesize ⇒ Boolean
Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
956 957 958 |
# File 'lambda/cfn_function.rb', line 956 def should_synthesize() jsii_call_method("shouldSynthesize", []) end |
#snap_start ⇒ AWSCDK::IResolvable, ...
The function's AWS Lambda SnapStart setting.
611 612 613 |
# File 'lambda/cfn_function.rb', line 611 def snap_start() jsii_get_property("snapStart") end |
#snap_start=(value) ⇒ Object
615 616 617 618 619 |
# File 'lambda/cfn_function.rb', line 615 def snap_start=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::SnapStartProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uU25hcFN0YXJ0UHJvcGVydHkifV19fQ==")), "snapStart") unless value.nil? jsii_set_property("snapStart", value) end |
#stack ⇒ AWSCDK::Stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
188 189 190 |
# File 'lambda/cfn_function.rb', line 188 def stack() jsii_get_property("stack") end |
#tags ⇒ AWSCDK::TagManager
Tag Manager which manages the tags for this resource.
294 295 296 |
# File 'lambda/cfn_function.rb', line 294 def () jsii_get_property("tags") end |
#tags_raw ⇒ Array<AWSCDK::CfnTag>?
A list of tags to apply to the function.
624 625 626 |
# File 'lambda/cfn_function.rb', line 624 def () jsii_get_property("tagsRaw") end |
#tags_raw=(value) ⇒ Object
628 629 630 631 632 |
# File 'lambda/cfn_function.rb', line 628 def (value) value = value.is_a?(Array) ? value.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tagsRaw") unless value.nil? jsii_set_property("tagsRaw", value) end |
#tenancy_config ⇒ AWSCDK::IResolvable, ...
The function's tenant isolation configuration settings.
637 638 639 |
# File 'lambda/cfn_function.rb', line 637 def tenancy_config() jsii_get_property("tenancyConfig") end |
#tenancy_config=(value) ⇒ Object
641 642 643 644 645 |
# File 'lambda/cfn_function.rb', line 641 def tenancy_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::TenancyConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uVGVuYW5jeUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "tenancyConfig") unless value.nil? jsii_set_property("tenancyConfig", value) end |
#timeout ⇒ Numeric?
The amount of time (in seconds) that Lambda allows a function to run before stopping it.
650 651 652 |
# File 'lambda/cfn_function.rb', line 650 def timeout() jsii_get_property("timeout") end |
#timeout=(value) ⇒ Object
654 655 656 657 |
# File 'lambda/cfn_function.rb', line 654 def timeout=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeout") unless value.nil? jsii_set_property("timeout", value) end |
#to_string ⇒ String
Returns a string representation of this construct.
688 689 690 |
# File 'lambda/cfn_function.rb', line 688 def to_string() jsii_call_method("toString", []) end |
#tracing_config ⇒ AWSCDK::IResolvable, ...
Set Mode to Active to sample and trace a subset of incoming requests with X-Ray .
662 663 664 |
# File 'lambda/cfn_function.rb', line 662 def tracing_config() jsii_get_property("tracingConfig") end |
#tracing_config=(value) ⇒ Object
666 667 668 669 670 |
# File 'lambda/cfn_function.rb', line 666 def tracing_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::TracingConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uVHJhY2luZ0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "tracingConfig") unless value.nil? jsii_set_property("tracingConfig", value) end |
#updated_properites ⇒ Hash{String => Object}
use updatedProperties Return properties modified after initiation Resources that expose mutable properties should override this function to collect and return the properties object for this resource.
Deprecated.
235 236 237 |
# File 'lambda/cfn_function.rb', line 235 def updated_properites() jsii_get_property("updatedProperites") end |
#updated_properties ⇒ Hash{String => Object}
Return properties modified after initiation.
Resources that expose mutable properties should override this function to collect and return the properties object for this resource.
245 246 247 |
# File 'lambda/cfn_function.rb', line 245 def updated_properties() jsii_get_property("updatedProperties") end |
#validate_properties(_properties) ⇒ void
This method returns an undefined value.
962 963 964 965 |
# File 'lambda/cfn_function.rb', line 962 def validate_properties(_properties) Jsii::Type.check_type(_properties, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "_properties") jsii_call_method("validateProperties", [_properties]) end |
#vpc_config ⇒ AWSCDK::IResolvable, ...
For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.
675 676 677 |
# File 'lambda/cfn_function.rb', line 675 def vpc_config() jsii_get_property("vpcConfig") end |
#vpc_config=(value) ⇒ Object
679 680 681 682 683 |
# File 'lambda/cfn_function.rb', line 679 def vpc_config=(value) value = value.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::VPCConfigProperty.new(**value.transform_keys(&:to_sym)) : value Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uVnBjQ29uZmlnUHJvcGVydHkifV19fQ==")), "vpcConfig") unless value.nil? jsii_set_property("vpcConfig", value) end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
701 702 703 704 705 706 |
# File 'lambda/cfn_function.rb', line 701 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |