CfnFunctionProps
- class aws_cdk.aws_sam.CfnFunctionProps(*, architectures=None, assume_role_policy_document=None, auto_publish_alias=None, auto_publish_code_sha256=None, code_signing_config_arn=None, code_uri=None, dead_letter_queue=None, deployment_preference=None, description=None, environment=None, ephemeral_storage=None, event_invoke_config=None, events=None, file_system_configs=None, function_name=None, function_url_config=None, handler=None, image_config=None, image_uri=None, inline_code=None, kms_key_arn=None, layers=None, memory_size=None, package_type=None, permissions_boundary=None, policies=None, provisioned_concurrency_config=None, reserved_concurrent_executions=None, role=None, runtime=None, tags=None, timeout=None, tracing=None, version_description=None, vpc_config=None)
Bases:
object
Properties for defining a
CfnFunction
.- Parameters:
architectures (
Optional
[Sequence
[str
]]) –assume_role_policy_document (
Any
) –auto_publish_alias (
Optional
[str
]) –auto_publish_code_sha256 (
Optional
[str
]) –code_signing_config_arn (
Optional
[str
]) –code_uri (
Union
[str
,IResolvable
,S3LocationProperty
,Dict
[str
,Any
],None
]) –dead_letter_queue (
Union
[IResolvable
,DeadLetterQueueProperty
,Dict
[str
,Any
],None
]) –deployment_preference (
Union
[IResolvable
,DeploymentPreferenceProperty
,Dict
[str
,Any
],None
]) –description (
Optional
[str
]) –environment (
Union
[IResolvable
,FunctionEnvironmentProperty
,Dict
[str
,Any
],None
]) –ephemeral_storage (
Union
[IResolvable
,EphemeralStorageProperty
,Dict
[str
,Any
],None
]) –event_invoke_config (
Union
[IResolvable
,EventInvokeConfigProperty
,Dict
[str
,Any
],None
]) –events (
Union
[IResolvable
,Mapping
[str
,Union
[IResolvable
,EventSourceProperty
,Dict
[str
,Any
]]],None
]) –file_system_configs (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,FileSystemConfigProperty
,Dict
[str
,Any
]]],None
]) –function_name (
Optional
[str
]) –function_url_config (
Union
[IResolvable
,FunctionUrlConfigProperty
,Dict
[str
,Any
],None
]) –handler (
Optional
[str
]) –image_config (
Union
[IResolvable
,ImageConfigProperty
,Dict
[str
,Any
],None
]) –image_uri (
Optional
[str
]) –inline_code (
Optional
[str
]) –kms_key_arn (
Optional
[str
]) –layers (
Optional
[Sequence
[str
]]) –memory_size (
Union
[int
,float
,None
]) –package_type (
Optional
[str
]) –permissions_boundary (
Optional
[str
]) –policies (
Union
[str
,IResolvable
,IAMPolicyDocumentProperty
,Dict
[str
,Any
],Sequence
[Union
[str
,IResolvable
,IAMPolicyDocumentProperty
,Dict
[str
,Any
],SAMPolicyTemplateProperty
]],None
]) –provisioned_concurrency_config (
Union
[IResolvable
,ProvisionedConcurrencyConfigProperty
,Dict
[str
,Any
],None
]) –reserved_concurrent_executions (
Union
[int
,float
,None
]) –role (
Optional
[str
]) –runtime (
Optional
[str
]) –tags (
Optional
[Mapping
[str
,str
]]) –timeout (
Union
[int
,float
,None
]) –tracing (
Optional
[str
]) –version_description (
Optional
[str
]) –vpc_config (
Union
[IResolvable
,VpcConfigProperty
,Dict
[str
,Any
],None
]) –
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-serverless-function.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_sam as sam # assume_role_policy_document: Any cfn_function_props = sam.CfnFunctionProps( architectures=["architectures"], assume_role_policy_document=assume_role_policy_document, auto_publish_alias="autoPublishAlias", auto_publish_code_sha256="autoPublishCodeSha256", code_signing_config_arn="codeSigningConfigArn", code_uri="codeUri", dead_letter_queue=sam.CfnFunction.DeadLetterQueueProperty( target_arn="targetArn", type="type" ), deployment_preference=sam.CfnFunction.DeploymentPreferenceProperty( alarms=["alarms"], enabled=False, hooks=sam.CfnFunction.HooksProperty( post_traffic="postTraffic", pre_traffic="preTraffic" ), role="role", type="type" ), description="description", environment=sam.CfnFunction.FunctionEnvironmentProperty( variables={ "variables_key": "variables" } ), ephemeral_storage=sam.CfnFunction.EphemeralStorageProperty( size=123 ), event_invoke_config=sam.CfnFunction.EventInvokeConfigProperty( destination_config=sam.CfnFunction.EventInvokeDestinationConfigProperty( on_failure=sam.CfnFunction.DestinationProperty( destination="destination", # the properties below are optional type="type" ), on_success=sam.CfnFunction.DestinationProperty( destination="destination", # the properties below are optional type="type" ) ), maximum_event_age_in_seconds=123, maximum_retry_attempts=123 ), events={ "events_key": sam.CfnFunction.EventSourceProperty( properties=sam.CfnFunction.AlexaSkillEventProperty( skill_id="skillId" ), type="type" ) }, file_system_configs=[sam.CfnFunction.FileSystemConfigProperty( arn="arn", local_mount_path="localMountPath" )], function_name="functionName", function_url_config=sam.CfnFunction.FunctionUrlConfigProperty( auth_type="authType", # the properties below are optional cors="cors", invoke_mode="invokeMode" ), handler="handler", image_config=sam.CfnFunction.ImageConfigProperty( command=["command"], entry_point=["entryPoint"], working_directory="workingDirectory" ), image_uri="imageUri", inline_code="inlineCode", kms_key_arn="kmsKeyArn", layers=["layers"], memory_size=123, package_type="packageType", permissions_boundary="permissionsBoundary", policies="policies", provisioned_concurrency_config=sam.CfnFunction.ProvisionedConcurrencyConfigProperty( provisioned_concurrent_executions="provisionedConcurrentExecutions" ), reserved_concurrent_executions=123, role="role", runtime="runtime", tags={ "tags_key": "tags" }, timeout=123, tracing="tracing", version_description="versionDescription", vpc_config=sam.CfnFunction.VpcConfigProperty( security_group_ids=["securityGroupIds"], subnet_ids=["subnetIds"] ) )
Attributes
- architectures
-
- Type:
see
- assume_role_policy_document
-
- Type:
see
- auto_publish_alias
-
- Type:
see
- auto_publish_code_sha256
-
- Type:
see
- code_signing_config_arn
-
- Type:
see
- code_uri
-
- Type:
see
- dead_letter_queue
-
- Type:
see
- deployment_preference
-
- Type:
see
- description
-
- Type:
see
- environment
-
- Type:
see
- ephemeral_storage
-
- Type:
see
- event_invoke_config
-
- Type:
see
- events
-
- Type:
see
- file_system_configs
-
- Type:
see
- function_name
-
- Type:
see
- function_url_config
-
- Type:
see
- handler
-
- Type:
see
- image_config
-
- Type:
see
- image_uri
-
- Type:
see
- inline_code
-
- Type:
see
- kms_key_arn
-
- Type:
see
- layers
-
- Type:
see
- memory_size
-
- Type:
see
- package_type
-
- Type:
see
- permissions_boundary
-
- Type:
see
- policies
-
- Type:
see
- provisioned_concurrency_config
-
- Type:
see
- reserved_concurrent_executions
-
- Type:
see
- role
-
- Type:
see
- runtime
-
- Type:
see
- tags
-
- Type:
see
- timeout
-
- Type:
see
- tracing
-
- Type:
see
- version_description
-
- Type:
see