class CfnFunctionPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.SAM.Mixins.CfnFunctionPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awssam/mixins#CfnFunctionPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.sam.mixins.CfnFunctionPropsMixin |
Python | aws_cdk.mixins_preview.aws_sam.mixins.CfnFunctionPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_sam » mixins » CfnFunctionPropsMixin |
Implements
IMixin
Extends
Mixin
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 { mixins } from '@aws-cdk/mixins-preview';
import { mixins as sam_mixins } from '@aws-cdk/mixins-preview/aws-sam';
declare const assumeRolePolicyDocument: any;
const cfnFunctionPropsMixin = new sam_mixins.CfnFunctionPropsMixin({
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',
type: 'type',
},
onSuccess: {
destination: 'destination',
type: 'type',
},
},
maximumEventAgeInSeconds: 123,
maximumRetryAttempts: 123,
},
events: {
eventsKey: {
properties: {
skillId: 'skillId',
},
type: 'type',
},
},
fileSystemConfigs: [{
arn: 'arn',
localMountPath: 'localMountPath',
}],
functionName: 'functionName',
functionUrlConfig: {
authType: 'authType',
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'],
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnFunctionPropsMixin(props: CfnFunctionMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Function Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::Serverless::Function.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript