Class CfnResolver
- All Implemented Interfaces:
IInspectable,IResolverRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
AWS::AppSync::Resolver resource defines the logical GraphQL resolver that you attach to fields in a schema.
Request and response templates for resolvers are written in Apache Velocity Template Language (VTL) format. For more information about resolvers, see Resolver Mapping Template Reference .
When you submit an update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template. To cause this resource to be updated you must change a property value for this resource in the CloudFormation template. Changing the Amazon S3 file content without changing a property value will not result in an update operation.
See Update Behaviors of Stack Resources in the AWS CloudFormation User Guide .
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.appsync.*;
CfnResolver cfnResolver = CfnResolver.Builder.create(this, "MyCfnResolver")
.apiId("apiId")
.fieldName("fieldName")
.typeName("typeName")
// the properties below are optional
.cachingConfig(CachingConfigProperty.builder()
.ttl(123)
// the properties below are optional
.cachingKeys(List.of("cachingKeys"))
.build())
.code("code")
.codeS3Location("codeS3Location")
.dataSourceName("dataSourceName")
.kind("kind")
.maxBatchSize(123)
.metricsConfig("metricsConfig")
.pipelineConfig(PipelineConfigProperty.builder()
.functions(List.of("functions"))
.build())
.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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDescribes a runtime used by an AWS AppSync resolver or AWS AppSync function.static final classA fluent builder forCfnResolver.static interfaceThe caching configuration for a resolver that has caching activated.static interfaceTheLambdaConflictHandlerConfigwhen configuring LAMBDA as the Conflict Handler.static interfaceUse thePipelineConfigproperty type to specifyPipelineConfigfor an AWS AppSync resolver.static interfaceDescribes a Sync configuration for a resolver.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.appsync.IResolverRef
IResolverRef.Jsii$Default, IResolverRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnResolver(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnResolver(software.amazon.jsii.JsiiObjectRef objRef) CfnResolver(software.constructs.Construct scope, String id, CfnResolverProps props) -
Method Summary
Modifier and TypeMethodDescriptiongetApiId()The AWS AppSync GraphQL API to which you want to attach this resolver.The GraphQL field on a type that invokes the resolver.ARN of the resolver, such asarn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/types/typename/resolvers/resolvername.The GraphQL type that invokes this resolver.The caching configuration for the resolver.getCode()Theresolvercode that contains the request and response functions.The Amazon S3 endpoint.The resolver data source name.The GraphQL field on a type that invokes the resolver.getKind()The resolver type.The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation.Enables or disables enhanced resolver metrics for specified resolvers.Functions linked with the pipeline resolver.The request mapping template.The location of a request mapping template in an Amazon S3 bucket.A reference to a Resolver resource.The response mapping template.The location of a response mapping template in an Amazon S3 bucket.Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.TheSyncConfigfor a resolver attached to a versioned data source.The GraphQL type that invokes this resolver.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThe AWS AppSync GraphQL API to which you want to attach this resolver.voidsetCachingConfig(IResolvable value) The caching configuration for the resolver.voidThe caching configuration for the resolver.voidTheresolvercode that contains the request and response functions.voidsetCodeS3Location(String value) The Amazon S3 endpoint.voidsetDataSourceName(String value) The resolver data source name.voidsetFieldName(String value) The GraphQL field on a type that invokes the resolver.voidThe resolver type.voidsetMaxBatchSize(Number value) The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation.voidsetMetricsConfig(String value) Enables or disables enhanced resolver metrics for specified resolvers.voidsetPipelineConfig(IResolvable value) Functions linked with the pipeline resolver.voidFunctions linked with the pipeline resolver.voidsetRequestMappingTemplate(String value) The request mapping template.voidThe location of a request mapping template in an Amazon S3 bucket.voidsetResponseMappingTemplate(String value) The response mapping template.voidThe location of a response mapping template in an Amazon S3 bucket.voidsetRuntime(IResolvable value) Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.voidDescribes a runtime used by an AWS AppSync resolver or AWS AppSync function.voidsetSyncConfig(IResolvable value) TheSyncConfigfor a resolver attached to a versioned data source.voidTheSyncConfigfor a resolver attached to a versioned data source.voidsetTypeName(String value) The GraphQL type that invokes this resolver.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, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnResolver
protected CfnResolver(software.amazon.jsii.JsiiObjectRef objRef) -
CfnResolver
protected CfnResolver(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnResolver
@Stability(Stable) public CfnResolver(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnResolverProps 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. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrFieldName
The GraphQL field on a type that invokes the resolver. -
getAttrResolverArn
ARN of the resolver, such asarn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/types/typename/resolvers/resolvername. -
getAttrTypeName
The GraphQL type that invokes this resolver. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getResolverRef
A reference to a Resolver resource.- Specified by:
getResolverRefin interfaceIResolverRef
-
getApiId
The AWS AppSync GraphQL API to which you want to attach this resolver. -
setApiId
The AWS AppSync GraphQL API to which you want to attach this resolver. -
getFieldName
The GraphQL field on a type that invokes the resolver. -
setFieldName
The GraphQL field on a type that invokes the resolver. -
getTypeName
The GraphQL type that invokes this resolver. -
setTypeName
The GraphQL type that invokes this resolver. -
getCachingConfig
The caching configuration for the resolver.Returns union: either
IResolvableorCfnResolver.CachingConfigProperty -
setCachingConfig
The caching configuration for the resolver. -
setCachingConfig
The caching configuration for the resolver. -
getCode
Theresolvercode that contains the request and response functions. -
setCode
Theresolvercode that contains the request and response functions. -
getCodeS3Location
The Amazon S3 endpoint. -
setCodeS3Location
The Amazon S3 endpoint. -
getDataSourceName
The resolver data source name. -
setDataSourceName
The resolver data source name. -
getKind
The resolver type. -
setKind
The resolver type. -
getMaxBatchSize
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation. -
setMaxBatchSize
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation. -
getMetricsConfig
Enables or disables enhanced resolver metrics for specified resolvers. -
setMetricsConfig
Enables or disables enhanced resolver metrics for specified resolvers. -
getPipelineConfig
Functions linked with the pipeline resolver.Returns union: either
IResolvableorCfnResolver.PipelineConfigProperty -
setPipelineConfig
Functions linked with the pipeline resolver. -
setPipelineConfig
@Stability(Stable) public void setPipelineConfig(@Nullable CfnResolver.PipelineConfigProperty value) Functions linked with the pipeline resolver. -
getRequestMappingTemplate
The request mapping template. -
setRequestMappingTemplate
The request mapping template. -
getRequestMappingTemplateS3Location
The location of a request mapping template in an Amazon S3 bucket. -
setRequestMappingTemplateS3Location
The location of a request mapping template in an Amazon S3 bucket. -
getResponseMappingTemplate
The response mapping template. -
setResponseMappingTemplate
The response mapping template. -
getResponseMappingTemplateS3Location
The location of a response mapping template in an Amazon S3 bucket. -
setResponseMappingTemplateS3Location
The location of a response mapping template in an Amazon S3 bucket. -
getRuntime
Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.Returns union: either
IResolvableorCfnResolver.AppSyncRuntimeProperty -
setRuntime
Describes a runtime used by an AWS AppSync resolver or AWS AppSync function. -
setRuntime
Describes a runtime used by an AWS AppSync resolver or AWS AppSync function. -
getSyncConfig
TheSyncConfigfor a resolver attached to a versioned data source.Returns union: either
IResolvableorCfnResolver.SyncConfigProperty -
setSyncConfig
TheSyncConfigfor a resolver attached to a versioned data source. -
setSyncConfig
TheSyncConfigfor a resolver attached to a versioned data source.
-