Class CfnFunction
Inherited Members
Namespace: Amazon.CDK.AWS.SAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnFunction : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnFunction
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-serverless-function.html
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 {
Alarms = new [] { "alarms" },
Enabled = false,
Hooks = new HooksProperty {
PostTraffic = "postTraffic",
PreTraffic = "preTraffic"
},
Role = "role",
Type = "type"
},
Description = "description",
Environment = new FunctionEnvironmentProperty {
Variables = new Dictionary<string, string> {
{ "variablesKey", "variables" }
}
},
EphemeralStorage = new EphemeralStorageProperty {
Size = 123
},
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 AlexaSkillEventProperty {
SkillId = "skillId"
},
Type = "type"
} }
},
FileSystemConfigs = new [] { new FileSystemConfigProperty {
Arn = "arn",
LocalMountPath = "localMountPath"
} },
FunctionName = "functionName",
FunctionUrlConfig = new FunctionUrlConfigProperty {
AuthType = "authType",
// the properties below are optional
Cors = "cors",
InvokeMode = "invokeMode"
},
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(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 |
CfnFunction(Construct, String, ICfnFunctionProps) |
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 | |
EphemeralStorage | |
EventInvokeConfig | |
Events | |
FileSystemConfigs | |
FunctionName | |
FunctionUrlConfig | |
Handler | |
ImageConfig | |
ImageUri | |
InlineCode | |
KmsKeyArn | |
Layers | |
MemorySize | |
PackageType | |
PermissionsBoundary | |
Policies | |
ProvisionedConcurrencyConfig | |
REQUIRED_TRANSFORM | The |
ReservedConcurrentExecutions | |
Role | |
Runtime | |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | |
Timeout | |
Tracing | |
VersionDescription | |
VpcConfig |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
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
CfnFunction(Construct, String, ICfnFunctionProps)
public CfnFunction(Construct scope, string id, ICfnFunctionProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnFunctionProps
Resource properties.
Properties
Architectures
public virtual string[] Architectures { get; set; }
Property Value
System.String[]
AssumeRolePolicyDocument
public virtual object AssumeRolePolicyDocument { get; set; }
Property Value
System.Object
AutoPublishAlias
public virtual string AutoPublishAlias { get; set; }
Property Value
System.String
AutoPublishCodeSha256
public virtual string AutoPublishCodeSha256 { get; set; }
Property Value
System.String
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
public virtual string CodeSigningConfigArn { get; set; }
Property Value
System.String
CodeUri
public virtual object CodeUri { get; set; }
Property Value
System.Object
DeadLetterQueue
public virtual object DeadLetterQueue { get; set; }
Property Value
System.Object
DeploymentPreference
public virtual object DeploymentPreference { get; set; }
Property Value
System.Object
Description
public virtual string Description { get; set; }
Property Value
System.String
Environment
public virtual object Environment { get; set; }
Property Value
System.Object
EphemeralStorage
public virtual object EphemeralStorage { get; set; }
Property Value
System.Object
EventInvokeConfig
public virtual object EventInvokeConfig { get; set; }
Property Value
System.Object
Events
public virtual object Events { get; set; }
Property Value
System.Object
FileSystemConfigs
public virtual object FileSystemConfigs { get; set; }
Property Value
System.Object
FunctionName
public virtual string FunctionName { get; set; }
Property Value
System.String
FunctionUrlConfig
public virtual object FunctionUrlConfig { get; set; }
Property Value
System.Object
Handler
public virtual string Handler { get; set; }
Property Value
System.String
ImageConfig
public virtual object ImageConfig { get; set; }
Property Value
System.Object
ImageUri
public virtual string ImageUri { get; set; }
Property Value
System.String
InlineCode
public virtual string InlineCode { get; set; }
Property Value
System.String
KmsKeyArn
public virtual string KmsKeyArn { get; set; }
Property Value
System.String
Layers
public virtual string[] Layers { get; set; }
Property Value
System.String[]
MemorySize
public virtual Nullable<double> MemorySize { get; set; }
Property Value
System.Nullable<System.Double>
PackageType
public virtual string PackageType { get; set; }
Property Value
System.String
PermissionsBoundary
public virtual string PermissionsBoundary { get; set; }
Property Value
System.String
Policies
public virtual object Policies { get; set; }
Property Value
System.Object
ProvisionedConcurrencyConfig
public virtual object ProvisionedConcurrencyConfig { get; set; }
Property Value
System.Object
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
public virtual Nullable<double> ReservedConcurrentExecutions { get; set; }
Property Value
System.Nullable<System.Double>
Role
public virtual string Role { get; set; }
Property Value
System.String
Runtime
public virtual string Runtime { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
public virtual IDictionary<string, string> TagsRaw { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Timeout
public virtual Nullable<double> Timeout { get; set; }
Property Value
System.Nullable<System.Double>
Tracing
public virtual string Tracing { get; set; }
Property Value
System.String
VersionDescription
public virtual string VersionDescription { get; set; }
Property Value
System.String
VpcConfig
public virtual object VpcConfig { get; set; }
Property Value
System.Object
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>