@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.684Z") @Stability(value=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())
.dataSourceName("dataSourceName")
.kind("kind")
.maxBatchSize(123)
.pipelineConfig(PipelineConfigProperty.builder()
.functions(List.of("functions"))
.build())
.requestMappingTemplate("requestMappingTemplate")
.requestMappingTemplateS3Location("requestMappingTemplateS3Location")
.responseMappingTemplate("responseMappingTemplate")
.responseMappingTemplateS3Location("responseMappingTemplateS3Location")
.syncConfig(SyncConfigProperty.builder()
.conflictDetection("conflictDetection")
// the properties below are optional
.conflictHandler("conflictHandler")
.lambdaConflictHandlerConfig(LambdaConflictHandlerConfigProperty.builder()
.lambdaConflictHandlerArn("lambdaConflictHandlerArn")
.build())
.build())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnResolver.Builder
A fluent builder for
CfnResolver. |
static interface |
CfnResolver.CachingConfigProperty
The caching configuration for a resolver that has caching activated.
|
static interface |
CfnResolver.LambdaConflictHandlerConfigProperty
The `LambdaConflictHandlerConfig` when configuring LAMBDA as the Conflict Handler.
|
static interface |
CfnResolver.PipelineConfigProperty
Use the `PipelineConfig` property type to specify `PipelineConfig` for an AWS AppSync resolver.
|
static interface |
CfnResolver.SyncConfigProperty
Describes a Sync configuration for a resolver.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnResolver(software.constructs.Construct scope,
String id,
CfnResolverProps props)
Create a new `AWS::AppSync::Resolver`.
|
protected |
CfnResolver(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnResolver(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getApiId()
The AWS AppSync GraphQL API to which you want to attach this resolver.
|
String |
getAttrFieldName()
The GraphQL field on a type that invokes the resolver.
|
String |
getAttrResolverArn()
ARN of the resolver, such as `arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/types/typename/resolvers/resolvername` .
|
String |
getAttrTypeName()
The GraphQL type that invokes this resolver.
|
Object |
getCachingConfig()
The caching configuration for the resolver.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDataSourceName()
The resolver data source name.
|
String |
getFieldName()
The GraphQL field on a type that invokes the resolver.
|
String |
getKind()
The resolver type.
|
Number |
getMaxBatchSize()
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a `BatchInvoke` operation.
|
Object |
getPipelineConfig()
Functions linked with the pipeline resolver.
|
String |
getRequestMappingTemplate()
The request mapping template.
|
String |
getRequestMappingTemplateS3Location()
The location of a request mapping template in an Amazon S3 bucket.
|
String |
getResponseMappingTemplate()
The response mapping template.
|
String |
getResponseMappingTemplateS3Location()
The location of a response mapping template in an Amazon S3 bucket.
|
Object |
getSyncConfig()
The `SyncConfig` for a resolver attached to a versioned data source.
|
String |
getTypeName()
The GraphQL type that invokes this resolver.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setApiId(String value)
The AWS AppSync GraphQL API to which you want to attach this resolver.
|
void |
setCachingConfig(CfnResolver.CachingConfigProperty value)
The caching configuration for the resolver.
|
void |
setCachingConfig(IResolvable value)
The caching configuration for the resolver.
|
void |
setDataSourceName(String value)
The resolver data source name.
|
void |
setFieldName(String value)
The GraphQL field on a type that invokes the resolver.
|
void |
setKind(String value)
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 a `BatchInvoke` operation.
|
void |
setPipelineConfig(CfnResolver.PipelineConfigProperty value)
Functions linked with the pipeline resolver.
|
void |
setPipelineConfig(IResolvable value)
Functions linked with the pipeline resolver.
|
void |
setRequestMappingTemplate(String value)
The request mapping template.
|
void |
setRequestMappingTemplateS3Location(String value)
The location of a request mapping template in an Amazon S3 bucket.
|
void |
setResponseMappingTemplate(String value)
The response mapping template.
|
void |
setResponseMappingTemplateS3Location(String value)
The location of a response mapping template in an Amazon S3 bucket.
|
void |
setSyncConfig(CfnResolver.SyncConfigProperty value)
The `SyncConfig` for a resolver attached to a versioned data source.
|
void |
setSyncConfig(IResolvable value)
The `SyncConfig` for a resolver attached to a versioned data source.
|
void |
setTypeName(String value)
The GraphQL type that invokes this resolver.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnResolver(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnResolver(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnResolver(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnResolverProps 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. This parameter is required.@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 public String getAttrFieldName()
@Stability(value=Stable) @NotNull public String getAttrResolverArn()
@Stability(value=Stable) @NotNull public String getAttrTypeName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getApiId()
@Stability(value=Stable)
public void setApiId(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getFieldName()
@Stability(value=Stable)
public void setFieldName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getTypeName()
@Stability(value=Stable)
public void setTypeName(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getCachingConfig()
@Stability(value=Stable)
public void setCachingConfig(@Nullable
CfnResolver.CachingConfigProperty value)
@Stability(value=Stable)
public void setCachingConfig(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getDataSourceName()
@Stability(value=Stable)
public void setDataSourceName(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getKind()
Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.@Stability(value=Stable)
public void setKind(@Nullable
String value)
Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.@Stability(value=Stable) @Nullable public Number getMaxBatchSize()
@Stability(value=Stable)
public void setMaxBatchSize(@Nullable
Number value)
@Stability(value=Stable) @Nullable public Object getPipelineConfig()
@Stability(value=Stable)
public void setPipelineConfig(@Nullable
CfnResolver.PipelineConfigProperty value)
@Stability(value=Stable)
public void setPipelineConfig(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getRequestMappingTemplate()
Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.
@Stability(value=Stable)
public void setRequestMappingTemplate(@Nullable
String value)
Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.
@Stability(value=Stable) @Nullable public String getRequestMappingTemplateS3Location()
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
@Stability(value=Stable)
public void setRequestMappingTemplateS3Location(@Nullable
String value)
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
@Stability(value=Stable) @Nullable public String getResponseMappingTemplate()
@Stability(value=Stable)
public void setResponseMappingTemplate(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getResponseMappingTemplateS3Location()
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
@Stability(value=Stable)
public void setResponseMappingTemplateS3Location(@Nullable
String value)
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
@Stability(value=Stable) @Nullable public Object getSyncConfig()
@Stability(value=Stable)
public void setSyncConfig(@Nullable
CfnResolver.SyncConfigProperty value)
@Stability(value=Stable)
public void setSyncConfig(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.