Class CfnFunction
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.sam.CfnFunction
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-27T16:51:05.151Z")
@Stability(Stable)
public class CfnFunction
extends CfnResource
implements IInspectable, ITaggable
https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.sam.*; Object assumeRolePolicyDocument; CfnFunction cfnFunction = CfnFunction.Builder.create(this, "MyCfnFunction") .architectures(List.of("architectures")) .assumeRolePolicyDocument(assumeRolePolicyDocument) .autoPublishAlias("autoPublishAlias") .autoPublishCodeSha256("autoPublishCodeSha256") .codeSigningConfigArn("codeSigningConfigArn") .codeUri("codeUri") .deadLetterQueue(DeadLetterQueueProperty.builder() .targetArn("targetArn") .type("type") .build()) .deploymentPreference(DeploymentPreferenceProperty.builder() .alarms(List.of("alarms")) .enabled(false) .hooks(HooksProperty.builder() .postTraffic("postTraffic") .preTraffic("preTraffic") .build()) .role("role") .type("type") .build()) .description("description") .environment(FunctionEnvironmentProperty.builder() .variables(Map.of( "variablesKey", "variables")) .build()) .ephemeralStorage(EphemeralStorageProperty.builder() .size(123) .build()) .eventInvokeConfig(EventInvokeConfigProperty.builder() .destinationConfig(EventInvokeDestinationConfigProperty.builder() .onFailure(DestinationProperty.builder() .destination("destination") // the properties below are optional .type("type") .build()) .onSuccess(DestinationProperty.builder() .destination("destination") // the properties below are optional .type("type") .build()) .build()) .maximumEventAgeInSeconds(123) .maximumRetryAttempts(123) .build()) .events(Map.of( "eventsKey", EventSourceProperty.builder() .properties(AlexaSkillEventProperty.builder() .skillId("skillId") .build()) .type("type") .build())) .fileSystemConfigs(List.of(FileSystemConfigProperty.builder() .arn("arn") .localMountPath("localMountPath") .build())) .functionName("functionName") .functionUrlConfig(FunctionUrlConfigProperty.builder() .authType("authType") // the properties below are optional .cors("cors") .invokeMode("invokeMode") .build()) .handler("handler") .imageConfig(ImageConfigProperty.builder() .command(List.of("command")) .entryPoint(List.of("entryPoint")) .workingDirectory("workingDirectory") .build()) .imageUri("imageUri") .inlineCode("inlineCode") .kmsKeyArn("kmsKeyArn") .layers(List.of("layers")) .memorySize(123) .packageType("packageType") .permissionsBoundary("permissionsBoundary") .policies("policies") .provisionedConcurrencyConfig(ProvisionedConcurrencyConfigProperty.builder() .provisionedConcurrentExecutions("provisionedConcurrentExecutions") .build()) .reservedConcurrentExecutions(123) .role("role") .runtime("runtime") .tags(Map.of( "tagsKey", "tags")) .timeout(123) .tracing("tracing") .versionDescription("versionDescription") .vpcConfig(VpcConfigProperty.builder() .securityGroupIds(List.of("securityGroupIds")) .subnetIds(List.of("subnetIds")) .build()) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static final class
A fluent builder forCfnFunction
.static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
CfnFunction
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnFunction
(software.amazon.jsii.JsiiObjectRef objRef) CfnFunction
(software.constructs.Construct scope, String id) CfnFunction
(software.constructs.Construct scope, String id, CfnFunctionProps props) -
Method Summary
Modifier and TypeMethodDescriptiongetRole()
getTags()
Tag Manager which manages the tags for this resource.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setArchitectures
(List<String> value) void
void
setAutoPublishAlias
(String value) void
setAutoPublishCodeSha256
(String value) void
setCodeSigningConfigArn
(String value) void
setCodeUri
(String value) void
setCodeUri
(IResolvable value) void
void
setDeadLetterQueue
(IResolvable value) void
void
void
void
setDescription
(String value) void
setEnvironment
(IResolvable value) void
void
setEphemeralStorage
(IResolvable value) void
void
setEventInvokeConfig
(IResolvable value) void
void
void
setEvents
(IResolvable value) void
setFileSystemConfigs
(List<Object> value) void
setFileSystemConfigs
(IResolvable value) void
setFunctionName
(String value) void
setFunctionUrlConfig
(IResolvable value) void
void
setHandler
(String value) void
setImageConfig
(IResolvable value) void
void
setImageUri
(String value) void
setInlineCode
(String value) void
setKmsKeyArn
(String value) void
void
setMemorySize
(Number value) void
setPackageType
(String value) void
setPermissionsBoundary
(String value) void
setPolicies
(String value) void
setPolicies
(List<Object> value) void
setPolicies
(IResolvable value) void
void
void
void
void
void
setRuntime
(String value) void
setTagsRaw
(Map<String, String> value) void
setTimeout
(Number value) void
setTracing
(String value) void
setVersionDescription
(String value) void
setVpcConfig
(IResolvable value) void
Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class. -
REQUIRED_TRANSFORM
TheTransform
a template must use in order to use this resource.
-
-
Constructor Details
-
CfnFunction
protected CfnFunction(software.amazon.jsii.JsiiObjectRef objRef) -
CfnFunction
protected CfnFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnFunction
@Stability(Stable) public CfnFunction(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnFunctionProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties.
-
CfnFunction
@Stability(Stable) public CfnFunction(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getArchitectures
-
setArchitectures
-
getAssumeRolePolicyDocument
-
setAssumeRolePolicyDocument
-
getAutoPublishAlias
-
setAutoPublishAlias
-
getAutoPublishCodeSha256
-
setAutoPublishCodeSha256
-
getCodeSigningConfigArn
-
setCodeSigningConfigArn
-
getCodeUri
-
setCodeUri
-
setCodeUri
-
setCodeUri
-
getDeadLetterQueue
-
setDeadLetterQueue
-
setDeadLetterQueue
@Stability(Stable) public void setDeadLetterQueue(@Nullable CfnFunction.DeadLetterQueueProperty value) -
getDeploymentPreference
-
setDeploymentPreference
-
setDeploymentPreference
@Stability(Stable) public void setDeploymentPreference(@Nullable CfnFunction.DeploymentPreferenceProperty value) -
getDescription
-
setDescription
-
getEnvironment
-
setEnvironment
-
setEnvironment
@Stability(Stable) public void setEnvironment(@Nullable CfnFunction.FunctionEnvironmentProperty value) -
getEphemeralStorage
-
setEphemeralStorage
-
setEphemeralStorage
@Stability(Stable) public void setEphemeralStorage(@Nullable CfnFunction.EphemeralStorageProperty value) -
getEventInvokeConfig
-
setEventInvokeConfig
-
setEventInvokeConfig
@Stability(Stable) public void setEventInvokeConfig(@Nullable CfnFunction.EventInvokeConfigProperty value) -
getEvents
-
setEvents
-
setEvents
-
getFileSystemConfigs
-
setFileSystemConfigs
-
setFileSystemConfigs
-
getFunctionName
-
setFunctionName
-
getFunctionUrlConfig
-
setFunctionUrlConfig
-
setFunctionUrlConfig
@Stability(Stable) public void setFunctionUrlConfig(@Nullable CfnFunction.FunctionUrlConfigProperty value) -
getHandler
-
setHandler
-
getImageConfig
-
setImageConfig
-
setImageConfig
-
getImageUri
-
setImageUri
-
getInlineCode
-
setInlineCode
-
getKmsKeyArn
-
setKmsKeyArn
-
getLayers
-
setLayers
-
getMemorySize
-
setMemorySize
-
getPackageType
-
setPackageType
-
getPermissionsBoundary
-
setPermissionsBoundary
-
getPolicies
-
setPolicies
-
setPolicies
-
setPolicies
-
setPolicies
-
getProvisionedConcurrencyConfig
-
setProvisionedConcurrencyConfig
-
setProvisionedConcurrencyConfig
@Stability(Stable) public void setProvisionedConcurrencyConfig(@Nullable CfnFunction.ProvisionedConcurrencyConfigProperty value) -
getReservedConcurrentExecutions
-
setReservedConcurrentExecutions
-
getRole
-
setRole
-
getRuntime
-
setRuntime
-
getTagsRaw
-
setTagsRaw
-
getTimeout
-
setTimeout
-
getTracing
-
setTracing
-
getVersionDescription
-
setVersionDescription
-
getVpcConfig
-
setVpcConfig
-
setVpcConfig
-