CfnResolverProps Struct
Properties for defining a CfnResolver.
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 cfnResolverProps: appsync.CfnResolverProps = {
apiId: 'apiId',
fieldName: 'fieldName',
typeName: 'typeName',
// the properties below are optional
cachingConfig: {
ttl: 123,
// the properties below are optional
cachingKeys: ['cachingKeys'],
},
code: 'code',
codeS3Location: 'codeS3Location',
dataSourceName: 'dataSourceName',
kind: 'kind',
maxBatchSize: 123,
metricsConfig: 'metricsConfig',
pipelineConfig: {
functions: ['functions'],
},
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',
},
},
};
Properties
cachingConfigIResolvable | CfnResolver.CachingConfigPropertycaching_configtyping.Union[IResolvable, CachingConfigProperty]cachingConfigIResolvableCachingConfigIResolvableCachingConfiginterface{}#When code is used, the runtime is required. The runtime value must be APPSYNC_JS .
codeS3Locationstringcode_s3_locationstrcodeS3LocationStringCodeS3LocationstringCodeS3Location*string#dataSourceNamestringdata_source_namestrdataSourceNameStringDataSourceNamestringDataSourceName*string#notes
- UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
- PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of
Functionobjects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
maxBatchSizenumbermax_batch_sizeint | floatmaxBatchSizeNumberMaxBatchSizedoubleMaxBatchSize*float64#notes
Note that MetricsConfig won't be used unless the resolverLevelMetricsBehavior value is set to PER_RESOLVER_METRICS . If the resolverLevelMetricsBehavior is set to FULL_REQUEST_RESOLVER_METRICS instead, MetricsConfig will be ignored. However, you can still set its value.
pipelineConfigIResolvable | CfnResolver.PipelineConfigPropertypipeline_configtyping.Union[IResolvable, PipelineConfigProperty]pipelineConfigIResolvablePipelineConfigIResolvablePipelineConfiginterface{}#requestMappingTemplatestringrequest_mapping_templatestrrequestMappingTemplateStringRequestMappingTemplatestringRequestMappingTemplate*string#Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.
requestMappingTemplateS3Locationstringrequest_mapping_template_s3_locationstrrequestMappingTemplateS3LocationStringRequestMappingTemplateS3LocationstringRequestMappingTemplateS3Location*string#Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
responseMappingTemplatestringresponse_mapping_templatestrresponseMappingTemplateStringResponseMappingTemplatestringResponseMappingTemplate*string#responseMappingTemplateS3Locationstringresponse_mapping_template_s3_locationstrresponseMappingTemplateS3LocationStringResponseMappingTemplateS3LocationstringResponseMappingTemplateS3Location*string#Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
runtimeIResolvable | CfnResolver.AppSyncRuntimePropertyruntimetyping.Union[IResolvable, AppSyncRuntimeProperty]runtimeIResolvableRuntimeIResolvableRuntimeinterface{}#Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
syncConfigIResolvable | CfnResolver.SyncConfigPropertysync_configtyping.Union[IResolvable, SyncConfigProperty]syncConfigIResolvableSyncConfigIResolvableSyncConfiginterface{}#