Class CfnResolver
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.appsync.CfnResolver
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-06T14:43:14.350Z")
@Stability(Stable)
public class CfnResolver
extends CfnResource
implements IInspectable
The
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
Modifier and TypeClassDescriptionstatic interface
Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.static final class
A fluent builder forCfnResolver
.static interface
The caching configuration for a resolver that has caching activated.static interface
TheLambdaConflictHandlerConfig
when configuring LAMBDA as the Conflict Handler.static interface
Use thePipelineConfig
property type to specifyPipelineConfig
for an AWS AppSync resolver.static interface
Describes a Sync configuration for a resolver.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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnResolver
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnResolver
(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()
Theresolver
code 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 aBatchInvoke
operation.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.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.TheSyncConfig
for a resolver attached to a versioned data source.The GraphQL type that invokes this resolver.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
The AWS AppSync GraphQL API to which you want to attach this resolver.void
setCachingConfig
(IResolvable value) The caching configuration for the resolver.void
The caching configuration for the resolver.void
Theresolver
code that contains the request and response functions.void
setCodeS3Location
(String value) The Amazon S3 endpoint.void
setDataSourceName
(String value) The resolver data source name.void
setFieldName
(String value) The GraphQL field on a type that invokes the resolver.void
The resolver type.void
setMaxBatchSize
(Number value) The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvoke
operation.void
setMetricsConfig
(String value) Enables or disables enhanced resolver metrics for specified resolvers.void
setPipelineConfig
(IResolvable value) Functions linked with the pipeline resolver.void
Functions linked with the pipeline resolver.void
setRequestMappingTemplate
(String value) The request mapping template.void
The location of a request mapping template in an Amazon S3 bucket.void
setResponseMappingTemplate
(String value) The response mapping template.void
The location of a response mapping template in an Amazon S3 bucket.void
setRuntime
(IResolvable value) Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.void
Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.void
setSyncConfig
(IResolvable value) TheSyncConfig
for a resolver attached to a versioned data source.void
TheSyncConfig
for a resolver attached to a versioned data source.void
setTypeName
(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, 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.
-
-
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:
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.
-
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:
getCfnProperties
in classCfnResource
-
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. -
setCachingConfig
The caching configuration for the resolver. -
setCachingConfig
The caching configuration for the resolver. -
getCode
Theresolver
code that contains the request and response functions. -
setCode
Theresolver
code 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 aBatchInvoke
operation. -
setMaxBatchSize
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvoke
operation. -
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. -
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. -
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
TheSyncConfig
for a resolver attached to a versioned data source. -
setSyncConfig
TheSyncConfig
for a resolver attached to a versioned data source. -
setSyncConfig
TheSyncConfig
for a resolver attached to a versioned data source.
-