CfnFunctionConfigurationProps Struct
Properties for defining a CfnFunctionConfiguration.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const cfnFunctionConfigurationProps: appsync.CfnFunctionConfigurationProps = {
apiId: 'apiId',
dataSourceName: 'dataSourceName',
name: 'name',
// the properties below are optional
code: 'code',
codeS3Location: 'codeS3Location',
description: 'description',
functionVersion: 'functionVersion',
maxBatchSize: 123,
requestMappingTemplate: 'requestMappingTemplate',
requestMappingTemplateS3Location: 'requestMappingTemplateS3Location',
responseMappingTemplate: 'responseMappingTemplate',
responseMappingTemplateS3Location: 'responseMappingTemplateS3Location',
runtime: {
name: 'name',
runtimeVersion: 'runtimeVersion',
},
syncConfig: {
conflictDetection: 'conflictDetection',
// the properties below are optional
conflictHandler: 'conflictHandler',
lambdaConflictHandlerConfig: {
lambdaConflictHandlerArn: 'lambdaConflictHandlerArn',
},
},
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync
cfn_function_configuration_props = appsync.CfnFunctionConfigurationProps(
api_id="apiId",
data_source_name="dataSourceName",
name="name",
# the properties below are optional
code="code",
code_s3_location="codeS3Location",
description="description",
function_version="functionVersion",
max_batch_size=123,
request_mapping_template="requestMappingTemplate",
request_mapping_template_s3_location="requestMappingTemplateS3Location",
response_mapping_template="responseMappingTemplate",
response_mapping_template_s3_location="responseMappingTemplateS3Location",
runtime=appsync.CfnFunctionConfiguration.AppSyncRuntimeProperty(
name="name",
runtime_version="runtimeVersion"
),
sync_config=appsync.CfnFunctionConfiguration.SyncConfigProperty(
conflict_detection="conflictDetection",
# the properties below are optional
conflict_handler="conflictHandler",
lambda_conflict_handler_config=appsync.CfnFunctionConfiguration.LambdaConflictHandlerConfigProperty(
lambda_conflict_handler_arn="lambdaConflictHandlerArn"
)
)
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;
CfnFunctionConfigurationProps cfnFunctionConfigurationProps = CfnFunctionConfigurationProps.builder()
.apiId("apiId")
.dataSourceName("dataSourceName")
.name("name")
// the properties below are optional
.code("code")
.codeS3Location("codeS3Location")
.description("description")
.functionVersion("functionVersion")
.maxBatchSize(123)
.requestMappingTemplate("requestMappingTemplate")
.requestMappingTemplateS3Location("requestMappingTemplateS3Location")
.responseMappingTemplate("responseMappingTemplate")
.responseMappingTemplateS3Location("responseMappingTemplateS3Location")
.runtime(AppSyncRuntimeProperty.builder()
.name("name")
.runtimeVersion("runtimeVersion")
.build())
.syncConfig(SyncConfigProperty.builder()
.conflictDetection("conflictDetection")
// the properties below are optional
.conflictHandler("conflictHandler")
.lambdaConflictHandlerConfig(LambdaConflictHandlerConfigProperty.builder()
.lambdaConflictHandlerArn("lambdaConflictHandlerArn")
.build())
.build())
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
var cfnFunctionConfigurationProps = new CfnFunctionConfigurationProps {
ApiId = "apiId",
DataSourceName = "dataSourceName",
Name = "name",
// the properties below are optional
Code = "code",
CodeS3Location = "codeS3Location",
Description = "description",
FunctionVersion = "functionVersion",
MaxBatchSize = 123,
RequestMappingTemplate = "requestMappingTemplate",
RequestMappingTemplateS3Location = "requestMappingTemplateS3Location",
ResponseMappingTemplate = "responseMappingTemplate",
ResponseMappingTemplateS3Location = "responseMappingTemplateS3Location",
Runtime = new AppSyncRuntimeProperty {
Name = "name",
RuntimeVersion = "runtimeVersion"
},
SyncConfig = new SyncConfigProperty {
ConflictDetection = "conflictDetection",
// the properties below are optional
ConflictHandler = "conflictHandler",
LambdaConflictHandlerConfig = new LambdaConflictHandlerConfigProperty {
LambdaConflictHandlerArn = "lambdaConflictHandlerArn"
}
}
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnFunctionConfigurationProps := &CfnFunctionConfigurationProps{
ApiId: jsii.String("apiId"),
DataSourceName: jsii.String("dataSourceName"),
Name: jsii.String("name"),
// the properties below are optional
Code: jsii.String("code"),
CodeS3Location: jsii.String("codeS3Location"),
Description: jsii.String("description"),
FunctionVersion: jsii.String("functionVersion"),
MaxBatchSize: jsii.Number(123),
RequestMappingTemplate: jsii.String("requestMappingTemplate"),
RequestMappingTemplateS3Location: jsii.String("requestMappingTemplateS3Location"),
ResponseMappingTemplate: jsii.String("responseMappingTemplate"),
ResponseMappingTemplateS3Location: jsii.String("responseMappingTemplateS3Location"),
Runtime: &AppSyncRuntimeProperty{
Name: jsii.String("name"),
RuntimeVersion: jsii.String("runtimeVersion"),
},
SyncConfig: &SyncConfigProperty{
ConflictDetection: jsii.String("conflictDetection"),
// the properties below are optional
ConflictHandler: jsii.String("conflictHandler"),
LambdaConflictHandlerConfig: &LambdaConflictHandlerConfigProperty{
LambdaConflictHandlerArn: jsii.String("lambdaConflictHandlerArn"),
},
},
}
Properties
When code is used, the runtime is required. The runtime value must be APPSYNC_JS .
codeS3Locationoptionalstringcode_s3_locationoptionalstrcodeS3LocationoptionalStringCodeS3LocationoptionalstringCodeS3Locationoptional*string #dataSourceNamestringdata_source_namestrdataSourceNameStringDataSourceNamestringDataSourceName*string required #descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #functionVersionoptionalstringfunction_versionoptionalstrfunctionVersionoptionalStringFunctionVersionoptionalstringFunctionVersionoptional*string #Currently, only the 2018-05-29 version of the template is supported.
maxBatchSizeoptionalnumbermax_batch_sizeoptionalint | floatmaxBatchSizeoptionalNumberMaxBatchSizeoptionaldoubleMaxBatchSizeoptional*float64 #requestMappingTemplateoptionalstringrequest_mapping_templateoptionalstrrequestMappingTemplateoptionalStringRequestMappingTemplateoptionalstringRequestMappingTemplateoptional*string #Functions support only the 2018-05-29 version of the request mapping template.
requestMappingTemplateS3Locationoptionalstringrequest_mapping_template_s3_locationoptionalstrrequestMappingTemplateS3LocationoptionalStringRequestMappingTemplateS3LocationoptionalstringRequestMappingTemplateS3Locationoptional*string #Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.
responseMappingTemplateoptionalstringresponse_mapping_templateoptionalstrresponseMappingTemplateoptionalStringResponseMappingTemplateoptionalstringResponseMappingTemplateoptional*string #responseMappingTemplateS3Locationoptionalstringresponse_mapping_template_s3_locationoptionalstrresponseMappingTemplateS3LocationoptionalStringResponseMappingTemplateS3LocationoptionalstringResponseMappingTemplateS3Locationoptional*string #Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
runtimeoptionalIResolvable | CfnFunctionConfiguration.runtimeoptionaltyping.Union[IResolvable, AppSyncRuntimeProperty]runtimeoptionalIResolvableRuntimeoptionalIResolvableRuntimeoptionalinterface{} #Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
syncConfigoptionalIResolvable | CfnFunctionConfiguration.sync_configoptionaltyping.Union[IResolvable, SyncConfigProperty]syncConfigoptionalIResolvableSyncConfigoptionalIResolvableSyncConfigoptionalinterface{} #Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.