interface CfnFunctionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.SAM.CfnFunctionProps |
Java | software.amazon.awscdk.services.sam.CfnFunctionProps |
Python | aws_cdk.aws_sam.CfnFunctionProps |
TypeScript | @aws-cdk/aws-sam » CfnFunctionProps |
Properties for defining a CfnFunction
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as sam from '@aws-cdk/aws-sam';
declare const assumeRolePolicyDocument: any;
const cfnFunctionProps: sam.CfnFunctionProps = {
architectures: ['architectures'],
assumeRolePolicyDocument: assumeRolePolicyDocument,
autoPublishAlias: 'autoPublishAlias',
autoPublishCodeSha256: 'autoPublishCodeSha256',
codeSigningConfigArn: 'codeSigningConfigArn',
codeUri: 'codeUri',
deadLetterQueue: {
targetArn: 'targetArn',
type: 'type',
},
deploymentPreference: {
enabled: false,
type: 'type',
// the properties below are optional
alarms: ['alarms'],
hooks: {
postTraffic: 'postTraffic',
preTraffic: 'preTraffic',
},
},
description: 'description',
environment: {
variables: {
variablesKey: 'variables',
},
},
eventInvokeConfig: {
destinationConfig: {
onFailure: {
destination: 'destination',
// the properties below are optional
type: 'type',
},
onSuccess: {
destination: 'destination',
// the properties below are optional
type: 'type',
},
},
maximumEventAgeInSeconds: 123,
maximumRetryAttempts: 123,
},
events: {
eventsKey: {
properties: {
variables: {
variablesKey: 'variables',
},
},
type: 'type',
},
},
fileSystemConfigs: [{
arn: 'arn',
localMountPath: 'localMountPath',
}],
functionName: 'functionName',
handler: 'handler',
imageConfig: {
command: ['command'],
entryPoint: ['entryPoint'],
workingDirectory: 'workingDirectory',
},
imageUri: 'imageUri',
inlineCode: 'inlineCode',
kmsKeyArn: 'kmsKeyArn',
layers: ['layers'],
memorySize: 123,
packageType: 'packageType',
permissionsBoundary: 'permissionsBoundary',
policies: 'policies',
provisionedConcurrencyConfig: {
provisionedConcurrentExecutions: 'provisionedConcurrentExecutions',
},
reservedConcurrentExecutions: 123,
role: 'role',
runtime: 'runtime',
tags: {
tagsKey: 'tags',
},
timeout: 123,
tracing: 'tracing',
versionDescription: 'versionDescription',
vpcConfig: {
securityGroupIds: ['securityGroupIds'],
subnetIds: ['subnetIds'],
},
};
Properties
Name | Type | Description |
---|---|---|
architectures? | string[] | AWS::Serverless::Function.Architectures . |
assume | any | AWS::Serverless::Function.AssumeRolePolicyDocument . |
auto | string | AWS::Serverless::Function.AutoPublishAlias . |
auto | string | AWS::Serverless::Function.AutoPublishCodeSha256 . |
code | string | AWS::Serverless::Function.CodeSigningConfigArn . |
code | string | IResolvable | S3 | AWS::Serverless::Function.CodeUri . |
dead | IResolvable | Dead | AWS::Serverless::Function.DeadLetterQueue . |
deployment | IResolvable | Deployment | AWS::Serverless::Function.DeploymentPreference . |
description? | string | AWS::Serverless::Function.Description . |
environment? | IResolvable | Function | AWS::Serverless::Function.Environment . |
event | IResolvable | Event | AWS::Serverless::Function.EventInvokeConfig . |
events? | IResolvable | { [string]: IResolvable | Event } | AWS::Serverless::Function.Events . |
file | IResolvable | IResolvable | File [] | AWS::Serverless::Function.FileSystemConfigs . |
function | string | AWS::Serverless::Function.FunctionName . |
handler? | string | AWS::Serverless::Function.Handler . |
image | IResolvable | Image | AWS::Serverless::Function.ImageConfig . |
image | string | AWS::Serverless::Function.ImageUri . |
inline | string | AWS::Serverless::Function.InlineCode . |
kms | string | AWS::Serverless::Function.KmsKeyArn . |
layers? | string[] | AWS::Serverless::Function.Layers . |
memory | number | AWS::Serverless::Function.MemorySize . |
package | string | AWS::Serverless::Function.PackageType . |
permissions | string | AWS::Serverless::Function.PermissionsBoundary . |
policies? | string | IResolvable | IAMPolicy | string | IResolvable | IAMPolicy | SAMPolicy [] | AWS::Serverless::Function.Policies . |
provisioned | IResolvable | Provisioned | AWS::Serverless::Function.ProvisionedConcurrencyConfig . |
reserved | number | AWS::Serverless::Function.ReservedConcurrentExecutions . |
role? | string | AWS::Serverless::Function.Role . |
runtime? | string | AWS::Serverless::Function.Runtime . |
tags? | { [string]: string } | AWS::Serverless::Function.Tags . |
timeout? | number | AWS::Serverless::Function.Timeout . |
tracing? | string | AWS::Serverless::Function.Tracing . |
version | string | AWS::Serverless::Function.VersionDescription . |
vpc | IResolvable | Vpc | AWS::Serverless::Function.VpcConfig . |
architectures?
Type:
string[]
(optional)
AWS::Serverless::Function.Architectures
.
assumeRolePolicyDocument?
Type:
any
(optional)
AWS::Serverless::Function.AssumeRolePolicyDocument
.
autoPublishAlias?
Type:
string
(optional)
AWS::Serverless::Function.AutoPublishAlias
.
autoPublishCodeSha256?
Type:
string
(optional)
AWS::Serverless::Function.AutoPublishCodeSha256
.
codeSigningConfigArn?
Type:
string
(optional)
AWS::Serverless::Function.CodeSigningConfigArn
.
codeUri?
Type:
string |
IResolvable
|
S3
(optional)
AWS::Serverless::Function.CodeUri
.
deadLetterQueue?
Type:
IResolvable
|
Dead
(optional)
AWS::Serverless::Function.DeadLetterQueue
.
deploymentPreference?
Type:
IResolvable
|
Deployment
(optional)
AWS::Serverless::Function.DeploymentPreference
.
description?
Type:
string
(optional)
AWS::Serverless::Function.Description
.
environment?
Type:
IResolvable
|
Function
(optional)
AWS::Serverless::Function.Environment
.
eventInvokeConfig?
Type:
IResolvable
|
Event
(optional)
AWS::Serverless::Function.EventInvokeConfig
.
events?
Type:
IResolvable
| { [string]:
IResolvable
|
Event
}
(optional)
AWS::Serverless::Function.Events
.
fileSystemConfigs?
Type:
IResolvable
|
IResolvable
|
File
[]
(optional)
AWS::Serverless::Function.FileSystemConfigs
.
functionName?
Type:
string
(optional)
AWS::Serverless::Function.FunctionName
.
handler?
Type:
string
(optional)
AWS::Serverless::Function.Handler
.
imageConfig?
Type:
IResolvable
|
Image
(optional)
AWS::Serverless::Function.ImageConfig
.
imageUri?
Type:
string
(optional)
AWS::Serverless::Function.ImageUri
.
inlineCode?
Type:
string
(optional)
AWS::Serverless::Function.InlineCode
.
kmsKeyArn?
Type:
string
(optional)
AWS::Serverless::Function.KmsKeyArn
.
layers?
Type:
string[]
(optional)
AWS::Serverless::Function.Layers
.
memorySize?
Type:
number
(optional)
AWS::Serverless::Function.MemorySize
.
packageType?
Type:
string
(optional)
AWS::Serverless::Function.PackageType
.
permissionsBoundary?
Type:
string
(optional)
AWS::Serverless::Function.PermissionsBoundary
.
policies?
Type:
string |
IResolvable
|
IAMPolicy
| string |
IResolvable
|
IAMPolicy
|
SAMPolicy
[]
(optional)
AWS::Serverless::Function.Policies
.
provisionedConcurrencyConfig?
Type:
IResolvable
|
Provisioned
(optional)
AWS::Serverless::Function.ProvisionedConcurrencyConfig
.
reservedConcurrentExecutions?
Type:
number
(optional)
AWS::Serverless::Function.ReservedConcurrentExecutions
.
role?
Type:
string
(optional)
AWS::Serverless::Function.Role
.
runtime?
Type:
string
(optional)
AWS::Serverless::Function.Runtime
.
tags?
Type:
{ [string]: string }
(optional)
AWS::Serverless::Function.Tags
.
timeout?
Type:
number
(optional)
AWS::Serverless::Function.Timeout
.
tracing?
Type:
string
(optional)
AWS::Serverless::Function.Tracing
.
versionDescription?
Type:
string
(optional)
AWS::Serverless::Function.VersionDescription
.
vpcConfig?
Type:
IResolvable
|
Vpc
(optional)
AWS::Serverless::Function.VpcConfig
.