@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-07T23:46:47.666Z") @Stability(value=Stable) public class CfnFunction extends CfnResource implements IInspectable
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()
.enabled(false)
.type("type")
// the properties below are optional
.alarms(List.of("alarms"))
.hooks(HooksProperty.builder()
.postTraffic("postTraffic")
.preTraffic("preTraffic")
.build())
.build())
.description("description")
.environment(FunctionEnvironmentProperty.builder()
.variables(Map.of(
"variablesKey", "variables"))
.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(S3EventProperty.builder()
.variables(Map.of(
"variablesKey", "variables"))
.build())
.type("type")
.build()))
.fileSystemConfigs(List.of(FileSystemConfigProperty.builder()
.arn("arn")
.localMountPath("localMountPath")
.build()))
.functionName("functionName")
.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();
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
static String |
REQUIRED_TRANSFORM
The `Transform` a template must use in order to use this resource.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnFunction(Construct scope,
String id)
Create a new `AWS::Serverless::Function`.
|
|
CfnFunction(Construct scope,
String id,
CfnFunctionProps props)
Create a new `AWS::Serverless::Function`.
|
protected |
CfnFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnFunction(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getArchitectures()
`AWS::Serverless::Function.Architectures`.
|
Object |
getAssumeRolePolicyDocument()
`AWS::Serverless::Function.AssumeRolePolicyDocument`.
|
String |
getAutoPublishAlias()
`AWS::Serverless::Function.AutoPublishAlias`.
|
String |
getAutoPublishCodeSha256()
`AWS::Serverless::Function.AutoPublishCodeSha256`.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getCodeSigningConfigArn()
`AWS::Serverless::Function.CodeSigningConfigArn`.
|
Object |
getCodeUri()
`AWS::Serverless::Function.CodeUri`.
|
Object |
getDeadLetterQueue()
`AWS::Serverless::Function.DeadLetterQueue`.
|
Object |
getDeploymentPreference()
`AWS::Serverless::Function.DeploymentPreference`.
|
String |
getDescription()
`AWS::Serverless::Function.Description`.
|
Object |
getEnvironment()
`AWS::Serverless::Function.Environment`.
|
Object |
getEventInvokeConfig()
`AWS::Serverless::Function.EventInvokeConfig`.
|
Object |
getEvents()
`AWS::Serverless::Function.Events`.
|
Object |
getFileSystemConfigs()
`AWS::Serverless::Function.FileSystemConfigs`.
|
String |
getFunctionName()
`AWS::Serverless::Function.FunctionName`.
|
String |
getHandler()
`AWS::Serverless::Function.Handler`.
|
Object |
getImageConfig()
`AWS::Serverless::Function.ImageConfig`.
|
String |
getImageUri()
`AWS::Serverless::Function.ImageUri`.
|
String |
getInlineCode()
`AWS::Serverless::Function.InlineCode`.
|
String |
getKmsKeyArn()
`AWS::Serverless::Function.KmsKeyArn`.
|
List<String> |
getLayers()
`AWS::Serverless::Function.Layers`.
|
Number |
getMemorySize()
`AWS::Serverless::Function.MemorySize`.
|
String |
getPackageType()
`AWS::Serverless::Function.PackageType`.
|
String |
getPermissionsBoundary()
`AWS::Serverless::Function.PermissionsBoundary`.
|
Object |
getPolicies()
`AWS::Serverless::Function.Policies`.
|
Object |
getProvisionedConcurrencyConfig()
`AWS::Serverless::Function.ProvisionedConcurrencyConfig`.
|
Number |
getReservedConcurrentExecutions()
`AWS::Serverless::Function.ReservedConcurrentExecutions`.
|
String |
getRole()
`AWS::Serverless::Function.Role`.
|
String |
getRuntime()
`AWS::Serverless::Function.Runtime`.
|
TagManager |
getTags()
`AWS::Serverless::Function.Tags`.
|
Number |
getTimeout()
`AWS::Serverless::Function.Timeout`.
|
String |
getTracing()
`AWS::Serverless::Function.Tracing`.
|
String |
getVersionDescription()
`AWS::Serverless::Function.VersionDescription`.
|
Object |
getVpcConfig()
`AWS::Serverless::Function.VpcConfig`.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setArchitectures(List<String> value)
`AWS::Serverless::Function.Architectures`.
|
void |
setAssumeRolePolicyDocument(Object value)
`AWS::Serverless::Function.AssumeRolePolicyDocument`.
|
void |
setAutoPublishAlias(String value)
`AWS::Serverless::Function.AutoPublishAlias`.
|
void |
setAutoPublishCodeSha256(String value)
`AWS::Serverless::Function.AutoPublishCodeSha256`.
|
void |
setCodeSigningConfigArn(String value)
`AWS::Serverless::Function.CodeSigningConfigArn`.
|
void |
setCodeUri(CfnFunction.S3LocationProperty value)
`AWS::Serverless::Function.CodeUri`.
|
void |
setCodeUri(IResolvable value)
`AWS::Serverless::Function.CodeUri`.
|
void |
setCodeUri(String value)
`AWS::Serverless::Function.CodeUri`.
|
void |
setDeadLetterQueue(CfnFunction.DeadLetterQueueProperty value)
`AWS::Serverless::Function.DeadLetterQueue`.
|
void |
setDeadLetterQueue(IResolvable value)
`AWS::Serverless::Function.DeadLetterQueue`.
|
void |
setDeploymentPreference(CfnFunction.DeploymentPreferenceProperty value)
`AWS::Serverless::Function.DeploymentPreference`.
|
void |
setDeploymentPreference(IResolvable value)
`AWS::Serverless::Function.DeploymentPreference`.
|
void |
setDescription(String value)
`AWS::Serverless::Function.Description`.
|
void |
setEnvironment(CfnFunction.FunctionEnvironmentProperty value)
`AWS::Serverless::Function.Environment`.
|
void |
setEnvironment(IResolvable value)
`AWS::Serverless::Function.Environment`.
|
void |
setEventInvokeConfig(CfnFunction.EventInvokeConfigProperty value)
`AWS::Serverless::Function.EventInvokeConfig`.
|
void |
setEventInvokeConfig(IResolvable value)
`AWS::Serverless::Function.EventInvokeConfig`.
|
void |
setEvents(IResolvable value)
`AWS::Serverless::Function.Events`.
|
void |
setEvents(Map<String,Object> value)
`AWS::Serverless::Function.Events`.
|
void |
setFileSystemConfigs(IResolvable value)
`AWS::Serverless::Function.FileSystemConfigs`.
|
void |
setFileSystemConfigs(List<Object> value)
`AWS::Serverless::Function.FileSystemConfigs`.
|
void |
setFunctionName(String value)
`AWS::Serverless::Function.FunctionName`.
|
void |
setHandler(String value)
`AWS::Serverless::Function.Handler`.
|
void |
setImageConfig(CfnFunction.ImageConfigProperty value)
`AWS::Serverless::Function.ImageConfig`.
|
void |
setImageConfig(IResolvable value)
`AWS::Serverless::Function.ImageConfig`.
|
void |
setImageUri(String value)
`AWS::Serverless::Function.ImageUri`.
|
void |
setInlineCode(String value)
`AWS::Serverless::Function.InlineCode`.
|
void |
setKmsKeyArn(String value)
`AWS::Serverless::Function.KmsKeyArn`.
|
void |
setLayers(List<String> value)
`AWS::Serverless::Function.Layers`.
|
void |
setMemorySize(Number value)
`AWS::Serverless::Function.MemorySize`.
|
void |
setPackageType(String value)
`AWS::Serverless::Function.PackageType`.
|
void |
setPermissionsBoundary(String value)
`AWS::Serverless::Function.PermissionsBoundary`.
|
void |
setPolicies(CfnFunction.IAMPolicyDocumentProperty value)
`AWS::Serverless::Function.Policies`.
|
void |
setPolicies(IResolvable value)
`AWS::Serverless::Function.Policies`.
|
void |
setPolicies(List<Object> value)
`AWS::Serverless::Function.Policies`.
|
void |
setPolicies(String value)
`AWS::Serverless::Function.Policies`.
|
void |
setProvisionedConcurrencyConfig(CfnFunction.ProvisionedConcurrencyConfigProperty value)
`AWS::Serverless::Function.ProvisionedConcurrencyConfig`.
|
void |
setProvisionedConcurrencyConfig(IResolvable value)
`AWS::Serverless::Function.ProvisionedConcurrencyConfig`.
|
void |
setReservedConcurrentExecutions(Number value)
`AWS::Serverless::Function.ReservedConcurrentExecutions`.
|
void |
setRole(String value)
`AWS::Serverless::Function.Role`.
|
void |
setRuntime(String value)
`AWS::Serverless::Function.Runtime`.
|
void |
setTimeout(Number value)
`AWS::Serverless::Function.Timeout`.
|
void |
setTracing(String value)
`AWS::Serverless::Function.Tracing`.
|
void |
setVersionDescription(String value)
`AWS::Serverless::Function.VersionDescription`.
|
void |
setVpcConfig(CfnFunction.VpcConfigProperty value)
`AWS::Serverless::Function.VpcConfig`.
|
void |
setVpcConfig(IResolvable value)
`AWS::Serverless::Function.VpcConfig`.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
@Stability(value=Stable) public static final String REQUIRED_TRANSFORM
protected CfnFunction(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnFunction(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnFunction(@NotNull
Construct scope,
@NotNull
String id,
@Nullable
CfnFunctionProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public Object getAssumeRolePolicyDocument()
@Stability(value=Stable)
public void setAssumeRolePolicyDocument(@NotNull
Object value)
@Stability(value=Stable) @Nullable public List<String> getArchitectures()
@Stability(value=Stable)
public void setArchitectures(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public String getAutoPublishAlias()
@Stability(value=Stable)
public void setAutoPublishAlias(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getAutoPublishCodeSha256()
@Stability(value=Stable)
public void setAutoPublishCodeSha256(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getCodeSigningConfigArn()
@Stability(value=Stable)
public void setCodeSigningConfigArn(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getCodeUri()
@Stability(value=Stable)
public void setCodeUri(@Nullable
String value)
@Stability(value=Stable)
public void setCodeUri(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setCodeUri(@Nullable
CfnFunction.S3LocationProperty value)
@Stability(value=Stable) @Nullable public Object getDeadLetterQueue()
@Stability(value=Stable)
public void setDeadLetterQueue(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setDeadLetterQueue(@Nullable
CfnFunction.DeadLetterQueueProperty value)
@Stability(value=Stable) @Nullable public Object getDeploymentPreference()
@Stability(value=Stable)
public void setDeploymentPreference(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setDeploymentPreference(@Nullable
CfnFunction.DeploymentPreferenceProperty value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getEnvironment()
@Stability(value=Stable)
public void setEnvironment(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setEnvironment(@Nullable
CfnFunction.FunctionEnvironmentProperty value)
@Stability(value=Stable) @Nullable public Object getEventInvokeConfig()
@Stability(value=Stable)
public void setEventInvokeConfig(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setEventInvokeConfig(@Nullable
CfnFunction.EventInvokeConfigProperty value)
@Stability(value=Stable) @Nullable public Object getEvents()
@Stability(value=Stable)
public void setEvents(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setEvents(@Nullable
Map<String,Object> value)
@Stability(value=Stable) @Nullable public Object getFileSystemConfigs()
@Stability(value=Stable)
public void setFileSystemConfigs(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setFileSystemConfigs(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public String getFunctionName()
@Stability(value=Stable)
public void setFunctionName(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getHandler()
@Stability(value=Stable)
public void setHandler(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getImageConfig()
@Stability(value=Stable)
public void setImageConfig(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setImageConfig(@Nullable
CfnFunction.ImageConfigProperty value)
@Stability(value=Stable) @Nullable public String getImageUri()
@Stability(value=Stable)
public void setImageUri(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getInlineCode()
@Stability(value=Stable)
public void setInlineCode(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getKmsKeyArn()
@Stability(value=Stable)
public void setKmsKeyArn(@Nullable
String value)
@Stability(value=Stable) @Nullable public List<String> getLayers()
@Stability(value=Stable)
public void setLayers(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public Number getMemorySize()
@Stability(value=Stable)
public void setMemorySize(@Nullable
Number value)
@Stability(value=Stable) @Nullable public String getPackageType()
@Stability(value=Stable)
public void setPackageType(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getPermissionsBoundary()
@Stability(value=Stable)
public void setPermissionsBoundary(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getPolicies()
@Stability(value=Stable)
public void setPolicies(@Nullable
String value)
@Stability(value=Stable)
public void setPolicies(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setPolicies(@Nullable
CfnFunction.IAMPolicyDocumentProperty value)
@Stability(value=Stable)
public void setPolicies(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public Object getProvisionedConcurrencyConfig()
@Stability(value=Stable)
public void setProvisionedConcurrencyConfig(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setProvisionedConcurrencyConfig(@Nullable
CfnFunction.ProvisionedConcurrencyConfigProperty value)
@Stability(value=Stable) @Nullable public Number getReservedConcurrentExecutions()
@Stability(value=Stable)
public void setReservedConcurrentExecutions(@Nullable
Number value)
@Stability(value=Stable) @Nullable public String getRole()
@Stability(value=Stable)
public void setRole(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getRuntime()
@Stability(value=Stable)
public void setRuntime(@Nullable
String value)
@Stability(value=Stable) @Nullable public Number getTimeout()
@Stability(value=Stable)
public void setTimeout(@Nullable
Number value)
@Stability(value=Stable) @Nullable public String getTracing()
@Stability(value=Stable)
public void setTracing(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getVersionDescription()
@Stability(value=Stable)
public void setVersionDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getVpcConfig()
@Stability(value=Stable)
public void setVpcConfig(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setVpcConfig(@Nullable
CfnFunction.VpcConfigProperty value)
Copyright © 2022. All rights reserved.