interface CfnFunctionProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.SAM.CfnFunctionProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awssam#CfnFunctionProps |
![]() | software.amazon.awscdk.services.sam.CfnFunctionProps |
![]() | aws_cdk.aws_sam.CfnFunctionProps |
![]() | aws-cdk-lib » aws_sam » CfnFunctionProps |
Properties for defining a CfnFunction
.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-serverless-function.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sam as sam } from 'aws-cdk-lib';
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: {
alarms: ['alarms'],
enabled: false,
hooks: {
postTraffic: 'postTraffic',
preTraffic: 'preTraffic',
},
role: 'role',
type: 'type',
},
description: 'description',
environment: {
variables: {
variablesKey: 'variables',
},
},
ephemeralStorage: {
size: 123,
},
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: {
skillId: 'skillId',
},
type: 'type',
},
},
fileSystemConfigs: [{
arn: 'arn',
localMountPath: 'localMountPath',
}],
functionName: 'functionName',
functionUrlConfig: {
authType: 'authType',
// the properties below are optional
cors: 'cors',
invokeMode: 'invokeMode',
},
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[] | |
assume | any | |
auto | string | |
auto | string | |
code | string | |
code | string | IResolvable | S3 | |
dead | IResolvable | Dead | |
deployment | IResolvable | Deployment | |
description? | string | |
environment? | IResolvable | Function | |
ephemeral | IResolvable | Ephemeral | |
event | IResolvable | Event | |
events? | IResolvable | { [string]: IResolvable | Event } | |
file | IResolvable | IResolvable | File [] | |
function | string | |
function | IResolvable | Function | |
handler? | string | |
image | IResolvable | Image | |
image | string | |
inline | string | |
kms | string | |
layers? | string[] | |
memory | number | |
package | string | |
permissions | string | |
policies? | string | IResolvable | IAMPolicy | string | IResolvable | IAMPolicy | SAMPolicy [] | |
provisioned | IResolvable | Provisioned | |
reserved | number | |
role? | string | |
runtime? | string | |
tags? | { [string]: string } | |
timeout? | number | |
tracing? | string | |
version | string | |
vpc | IResolvable | Vpc |
architectures?
Type:
string[]
(optional)
assumeRolePolicyDocument?
Type:
any
(optional)
autoPublishAlias?
Type:
string
(optional)
autoPublishCodeSha256?
Type:
string
(optional)
codeSigningConfigArn?
Type:
string
(optional)
codeUri?
Type:
string |
IResolvable
|
S3
(optional)
deadLetterQueue?
Type:
IResolvable
|
Dead
(optional)
deploymentPreference?
Type:
IResolvable
|
Deployment
(optional)
description?
Type:
string
(optional)
environment?
Type:
IResolvable
|
Function
(optional)
ephemeralStorage?
Type:
IResolvable
|
Ephemeral
(optional)
eventInvokeConfig?
Type:
IResolvable
|
Event
(optional)
events?
Type:
IResolvable
| { [string]:
IResolvable
|
Event
}
(optional)
fileSystemConfigs?
Type:
IResolvable
|
IResolvable
|
File
[]
(optional)
functionName?
Type:
string
(optional)
functionUrlConfig?
Type:
IResolvable
|
Function
(optional)
handler?
Type:
string
(optional)
imageConfig?
Type:
IResolvable
|
Image
(optional)
imageUri?
Type:
string
(optional)
inlineCode?
Type:
string
(optional)
kmsKeyArn?
Type:
string
(optional)
layers?
Type:
string[]
(optional)
memorySize?
Type:
number
(optional)
packageType?
Type:
string
(optional)
permissionsBoundary?
Type:
string
(optional)
policies?
Type:
string |
IResolvable
|
IAMPolicy
| string |
IResolvable
|
IAMPolicy
|
SAMPolicy
[]
(optional)
provisionedConcurrencyConfig?
Type:
IResolvable
|
Provisioned
(optional)
reservedConcurrentExecutions?
Type:
number
(optional)
role?
Type:
string
(optional)
runtime?
Type:
string
(optional)
tags?
Type:
{ [string]: string }
(optional)
timeout?
Type:
number
(optional)
tracing?
Type:
string
(optional)
versionDescription?
Type:
string
(optional)
vpcConfig?
Type:
IResolvable
|
Vpc
(optional)