CfnFunctionProps

class aws_cdk.aws_sam.CfnFunctionProps(*, code_uri, handler, runtime, auto_publish_alias=None, dead_letter_queue=None, deployment_preference=None, description=None, environment=None, events=None, function_name=None, kms_key_arn=None, layers=None, memory_size=None, permissions_boundary=None, policies=None, reserved_concurrent_executions=None, role=None, tags=None, timeout=None, tracing=None, vpc_config=None)

Bases: object

__init__(*, code_uri, handler, runtime, auto_publish_alias=None, dead_letter_queue=None, deployment_preference=None, description=None, environment=None, events=None, function_name=None, kms_key_arn=None, layers=None, memory_size=None, permissions_boundary=None, policies=None, reserved_concurrent_executions=None, role=None, tags=None, timeout=None, tracing=None, vpc_config=None)

Properties for defining a AWS::Serverless::Function.

Parameters
  • code_uri (Union[str, IResolvable, S3LocationProperty]) – AWS::Serverless::Function.CodeUri.

  • handler (str) – AWS::Serverless::Function.Handler.

  • runtime (str) – AWS::Serverless::Function.Runtime.

  • auto_publish_alias (Optional[str]) – AWS::Serverless::Function.AutoPublishAlias.

  • dead_letter_queue (Union[IResolvable, None, DeadLetterQueueProperty]) – AWS::Serverless::Function.DeadLetterQueue.

  • deployment_preference (Union[IResolvable, None, DeploymentPreferenceProperty]) – AWS::Serverless::Function.DeploymentPreference.

  • description (Optional[str]) – AWS::Serverless::Function.Description.

  • environment (Union[IResolvable, None, FunctionEnvironmentProperty]) – AWS::Serverless::Function.Environment.

  • events (Union[IResolvable, None, Mapping[str, Union[IResolvable, EventSourceProperty]]]) – AWS::Serverless::Function.Events.

  • function_name (Optional[str]) – AWS::Serverless::Function.FunctionName.

  • kms_key_arn (Optional[str]) – AWS::Serverless::Function.KmsKeyArn.

  • layers (Optional[List[str]]) – AWS::Serverless::Function.Layers.

  • memory_size (Union[int, float, None]) – AWS::Serverless::Function.MemorySize.

  • permissions_boundary (Optional[str]) – AWS::Serverless::Function.PermissionsBoundary.

  • policies (Union[str, None, IResolvable, IAMPolicyDocumentProperty, List[Union[str, IResolvable, IAMPolicyDocumentProperty, SAMPolicyTemplateProperty]]]) – AWS::Serverless::Function.Policies.

  • reserved_concurrent_executions (Union[int, float, None]) – AWS::Serverless::Function.ReservedConcurrentExecutions.

  • role (Optional[str]) – AWS::Serverless::Function.Role.

  • tags (Optional[Mapping[str, str]]) – AWS::Serverless::Function.Tags.

  • timeout (Union[int, float, None]) – AWS::Serverless::Function.Timeout.

  • tracing (Optional[str]) – AWS::Serverless::Function.Tracing.

  • vpc_config (Union[IResolvable, None, VpcConfigProperty]) – AWS::Serverless::Function.VpcConfig.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Attributes

auto_publish_alias

AWS::Serverless::Function.AutoPublishAlias.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

code_uri

AWS::Serverless::Function.CodeUri.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[str, IResolvable, S3LocationProperty]

dead_letter_queue

AWS::Serverless::Function.DeadLetterQueue.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[IResolvable, None, DeadLetterQueueProperty]

deployment_preference

AWS::Serverless::Function.DeploymentPreference.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#deploymentpreference-object

Return type

Union[IResolvable, None, DeploymentPreferenceProperty]

description

AWS::Serverless::Function.Description.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

environment

AWS::Serverless::Function.Environment.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[IResolvable, None, FunctionEnvironmentProperty]

events

AWS::Serverless::Function.Events.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[IResolvable, None, Mapping[str, Union[IResolvable, EventSourceProperty]]]

function_name

AWS::Serverless::Function.FunctionName.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

handler

AWS::Serverless::Function.Handler.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

str

kms_key_arn

AWS::Serverless::Function.KmsKeyArn.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

layers

AWS::Serverless::Function.Layers.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[List[str]]

memory_size

AWS::Serverless::Function.MemorySize.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[int, float, None]

permissions_boundary

AWS::Serverless::Function.PermissionsBoundary.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

policies

AWS::Serverless::Function.Policies.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[str, None, IResolvable, IAMPolicyDocumentProperty, List[Union[str, IResolvable, IAMPolicyDocumentProperty, SAMPolicyTemplateProperty]]]

reserved_concurrent_executions

AWS::Serverless::Function.ReservedConcurrentExecutions.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[int, float, None]

role

AWS::Serverless::Function.Role.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

runtime

AWS::Serverless::Function.Runtime.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

str

tags

AWS::Serverless::Function.Tags.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[Mapping[str, str]]

timeout

AWS::Serverless::Function.Timeout.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[int, float, None]

tracing

AWS::Serverless::Function.Tracing.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

vpc_config

AWS::Serverless::Function.VpcConfig.

see :see: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[IResolvable, None, VpcConfigProperty]