Class CfnFunction
A CloudFormation AWS::Serverless::Function
.
Inherited Members
Namespace: Amazon.CDK.AWS.SAM
Assembly: Amazon.CDK.AWS.SAM.dll
Syntax (csharp)
public class CfnFunction : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnFunction
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
CloudformationResource: AWS::Serverless::Function
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SAM;
var assumeRolePolicyDocument;
var cfnFunction = new CfnFunction(this, "MyCfnFunction", new CfnFunctionProps {
Architectures = new [] { "architectures" },
AssumeRolePolicyDocument = assumeRolePolicyDocument,
AutoPublishAlias = "autoPublishAlias",
AutoPublishCodeSha256 = "autoPublishCodeSha256",
CodeSigningConfigArn = "codeSigningConfigArn",
CodeUri = "codeUri",
DeadLetterQueue = new DeadLetterQueueProperty {
TargetArn = "targetArn",
Type = "type"
},
DeploymentPreference = new DeploymentPreferenceProperty {
Enabled = false,
Type = "type",
// the properties below are optional
Alarms = new [] { "alarms" },
Hooks = new HooksProperty {
PostTraffic = "postTraffic",
PreTraffic = "preTraffic"
}
},
Description = "description",
Environment = new FunctionEnvironmentProperty {
Variables = new Dictionary<string, string> {
{ "variablesKey", "variables" }
}
},
EventInvokeConfig = new EventInvokeConfigProperty {
DestinationConfig = new EventInvokeDestinationConfigProperty {
OnFailure = new DestinationProperty {
Destination = "destination",
// the properties below are optional
Type = "type"
},
OnSuccess = new DestinationProperty {
Destination = "destination",
// the properties below are optional
Type = "type"
}
},
MaximumEventAgeInSeconds = 123,
MaximumRetryAttempts = 123
},
Events = new Dictionary<string, object> {
{ "eventsKey", new EventSourceProperty {
Properties = new S3EventProperty {
Variables = new Dictionary<string, string> {
{ "variablesKey", "variables" }
}
},
Type = "type"
} }
},
FileSystemConfigs = new [] { new FileSystemConfigProperty {
Arn = "arn",
LocalMountPath = "localMountPath"
} },
FunctionName = "functionName",
Handler = "handler",
ImageConfig = new ImageConfigProperty {
Command = new [] { "command" },
EntryPoint = new [] { "entryPoint" },
WorkingDirectory = "workingDirectory"
},
ImageUri = "imageUri",
InlineCode = "inlineCode",
KmsKeyArn = "kmsKeyArn",
Layers = new [] { "layers" },
MemorySize = 123,
PackageType = "packageType",
PermissionsBoundary = "permissionsBoundary",
Policies = "policies",
ProvisionedConcurrencyConfig = new ProvisionedConcurrencyConfigProperty {
ProvisionedConcurrentExecutions = "provisionedConcurrentExecutions"
},
ReservedConcurrentExecutions = 123,
Role = "role",
Runtime = "runtime",
Tags = new Dictionary<string, string> {
{ "tagsKey", "tags" }
},
Timeout = 123,
Tracing = "tracing",
VersionDescription = "versionDescription",
VpcConfig = new VpcConfigProperty {
SecurityGroupIds = new [] { "securityGroupIds" },
SubnetIds = new [] { "subnetIds" }
}
});
Synopsis
Constructors
CfnFunction(Construct, String, ICfnFunctionProps) | Create a new |
CfnFunction(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnFunction(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
Architectures |
|
AssumeRolePolicyDocument |
|
AutoPublishAlias |
|
AutoPublishCodeSha256 |
|
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
CodeSigningConfigArn |
|
CodeUri |
|
DeadLetterQueue |
|
DeploymentPreference |
|
Description |
|
Environment |
|
EventInvokeConfig |
|
Events |
|
FileSystemConfigs |
|
FunctionName |
|
Handler |
|
ImageConfig |
|
ImageUri |
|
InlineCode |
|
KmsKeyArn |
|
Layers |
|
MemorySize |
|
PackageType |
|
PermissionsBoundary |
|
Policies |
|
ProvisionedConcurrencyConfig |
|
REQUIRED_TRANSFORM | The |
ReservedConcurrentExecutions |
|
Role |
|
Runtime |
|
Tags |
|
Timeout |
|
Tracing |
|
VersionDescription |
|
VpcConfig |
|
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnFunction(Construct, String, ICfnFunctionProps)
Create a new AWS::Serverless::Function
.
public CfnFunction(Construct scope, string id, ICfnFunctionProps props = null)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnFunctionProps
- resource properties.
CfnFunction(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnFunction(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnFunction(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnFunction(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
Architectures
AWS::Serverless::Function.Architectures
.
public virtual string[] Architectures { get; set; }
Property Value
System.String[]
Remarks
AssumeRolePolicyDocument
AWS::Serverless::Function.AssumeRolePolicyDocument
.
public virtual object AssumeRolePolicyDocument { get; set; }
Property Value
System.Object
Remarks
AutoPublishAlias
AWS::Serverless::Function.AutoPublishAlias
.
public virtual string AutoPublishAlias { get; set; }
Property Value
System.String
Remarks
AutoPublishCodeSha256
AWS::Serverless::Function.AutoPublishCodeSha256
.
public virtual string AutoPublishCodeSha256 { get; set; }
Property Value
System.String
Remarks
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
CodeSigningConfigArn
AWS::Serverless::Function.CodeSigningConfigArn
.
public virtual string CodeSigningConfigArn { get; set; }
Property Value
System.String
Remarks
CodeUri
AWS::Serverless::Function.CodeUri
.
public virtual object CodeUri { get; set; }
Property Value
System.Object
Remarks
DeadLetterQueue
AWS::Serverless::Function.DeadLetterQueue
.
public virtual object DeadLetterQueue { get; set; }
Property Value
System.Object
Remarks
DeploymentPreference
AWS::Serverless::Function.DeploymentPreference
.
public virtual object DeploymentPreference { get; set; }
Property Value
System.Object
Remarks
Description
AWS::Serverless::Function.Description
.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
Environment
AWS::Serverless::Function.Environment
.
public virtual object Environment { get; set; }
Property Value
System.Object
Remarks
EventInvokeConfig
AWS::Serverless::Function.EventInvokeConfig
.
public virtual object EventInvokeConfig { get; set; }
Property Value
System.Object
Remarks
Events
AWS::Serverless::Function.Events
.
public virtual object Events { get; set; }
Property Value
System.Object
Remarks
FileSystemConfigs
AWS::Serverless::Function.FileSystemConfigs
.
public virtual object FileSystemConfigs { get; set; }
Property Value
System.Object
Remarks
FunctionName
AWS::Serverless::Function.FunctionName
.
public virtual string FunctionName { get; set; }
Property Value
System.String
Remarks
Handler
AWS::Serverless::Function.Handler
.
public virtual string Handler { get; set; }
Property Value
System.String
Remarks
ImageConfig
AWS::Serverless::Function.ImageConfig
.
public virtual object ImageConfig { get; set; }
Property Value
System.Object
Remarks
ImageUri
AWS::Serverless::Function.ImageUri
.
public virtual string ImageUri { get; set; }
Property Value
System.String
Remarks
InlineCode
AWS::Serverless::Function.InlineCode
.
public virtual string InlineCode { get; set; }
Property Value
System.String
Remarks
KmsKeyArn
AWS::Serverless::Function.KmsKeyArn
.
public virtual string KmsKeyArn { get; set; }
Property Value
System.String
Remarks
Layers
AWS::Serverless::Function.Layers
.
public virtual string[] Layers { get; set; }
Property Value
System.String[]
Remarks
MemorySize
AWS::Serverless::Function.MemorySize
.
public virtual Nullable<double> MemorySize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
PackageType
AWS::Serverless::Function.PackageType
.
public virtual string PackageType { get; set; }
Property Value
System.String
Remarks
PermissionsBoundary
AWS::Serverless::Function.PermissionsBoundary
.
public virtual string PermissionsBoundary { get; set; }
Property Value
System.String
Remarks
Policies
AWS::Serverless::Function.Policies
.
public virtual object Policies { get; set; }
Property Value
System.Object
Remarks
ProvisionedConcurrencyConfig
AWS::Serverless::Function.ProvisionedConcurrencyConfig
.
public virtual object ProvisionedConcurrencyConfig { get; set; }
Property Value
System.Object
Remarks
REQUIRED_TRANSFORM
The Transform
a template must use in order to use this resource.
public static string REQUIRED_TRANSFORM { get; }
Property Value
System.String
ReservedConcurrentExecutions
AWS::Serverless::Function.ReservedConcurrentExecutions
.
public virtual Nullable<double> ReservedConcurrentExecutions { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Role
AWS::Serverless::Function.Role
.
public virtual string Role { get; set; }
Property Value
System.String
Remarks
Runtime
AWS::Serverless::Function.Runtime
.
public virtual string Runtime { get; set; }
Property Value
System.String
Remarks
Tags
AWS::Serverless::Function.Tags
.
public virtual TagManager Tags { get; }
Property Value
Remarks
Timeout
AWS::Serverless::Function.Timeout
.
public virtual Nullable<double> Timeout { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Tracing
AWS::Serverless::Function.Tracing
.
public virtual string Tracing { get; set; }
Property Value
System.String
Remarks
VersionDescription
AWS::Serverless::Function.VersionDescription
.
public virtual string VersionDescription { get; set; }
Property Value
System.String
Remarks
VpcConfig
AWS::Serverless::Function.VpcConfig
.
public virtual object VpcConfig { get; set; }
Property Value
System.Object
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>