@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-25T18:29:12.568Z") 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) .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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnResolver.AppSyncRuntimeProperty
Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
|
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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnResolver(Construct scope,
java.lang.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 |
---|---|
java.lang.String |
getApiId()
The AWS AppSync GraphQL API to which you want to attach this resolver.
|
java.lang.String |
getAttrFieldName()
The GraphQL field on a type that invokes the resolver.
|
java.lang.String |
getAttrResolverArn()
ARN of the resolver, such as `arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/types/typename/resolvers/resolvername` .
|
java.lang.String |
getAttrTypeName()
The GraphQL type that invokes this resolver.
|
java.lang.Object |
getCachingConfig()
The caching configuration for the resolver.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getCode()
The `resolver` code that contains the request and response functions.
|
java.lang.String |
getCodeS3Location()
The Amazon S3 endpoint.
|
java.lang.String |
getDataSourceName()
The resolver data source name.
|
java.lang.String |
getFieldName()
The GraphQL field on a type that invokes the resolver.
|
java.lang.String |
getKind()
The resolver type.
|
java.lang.Number |
getMaxBatchSize()
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a `BatchInvoke` operation.
|
java.lang.Object |
getPipelineConfig()
Functions linked with the pipeline resolver.
|
java.lang.String |
getRequestMappingTemplate()
The request mapping template.
|
java.lang.String |
getRequestMappingTemplateS3Location()
The location of a request mapping template in an Amazon S3 bucket.
|
java.lang.String |
getResponseMappingTemplate()
The response mapping template.
|
java.lang.String |
getResponseMappingTemplateS3Location()
The location of a response mapping template in an Amazon S3 bucket.
|
java.lang.Object |
getRuntime()
Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
|
java.lang.Object |
getSyncConfig()
The `SyncConfig` for a resolver attached to a versioned data source.
|
java.lang.String |
getTypeName()
The GraphQL type that invokes this resolver.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setApiId(java.lang.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 |
setCode(java.lang.String value)
The `resolver` code that contains the request and response functions.
|
void |
setCodeS3Location(java.lang.String value)
The Amazon S3 endpoint.
|
void |
setDataSourceName(java.lang.String value)
The resolver data source name.
|
void |
setFieldName(java.lang.String value)
The GraphQL field on a type that invokes the resolver.
|
void |
setKind(java.lang.String value)
The resolver type.
|
void |
setMaxBatchSize(java.lang.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(java.lang.String value)
The request mapping template.
|
void |
setRequestMappingTemplateS3Location(java.lang.String value)
The location of a request mapping template in an Amazon S3 bucket.
|
void |
setResponseMappingTemplate(java.lang.String value)
The response mapping template.
|
void |
setResponseMappingTemplateS3Location(java.lang.String value)
The location of a response mapping template in an Amazon S3 bucket.
|
void |
setRuntime(CfnResolver.AppSyncRuntimeProperty value)
Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
|
void |
setRuntime(IResolvable value)
Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
|
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(java.lang.String value)
The GraphQL type that invokes this resolver.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnResolver(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnResolver(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnResolver(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrFieldName()
public java.lang.String getAttrResolverArn()
public java.lang.String getAttrTypeName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getApiId()
public void setApiId(java.lang.String value)
public java.lang.String getFieldName()
public void setFieldName(java.lang.String value)
public java.lang.String getTypeName()
public void setTypeName(java.lang.String value)
public java.lang.Object getCachingConfig()
public void setCachingConfig(IResolvable value)
public void setCachingConfig(CfnResolver.CachingConfigProperty value)
public java.lang.String getCode()
When code is used, the runtime
is required. The runtime value must be APPSYNC_JS
.
public void setCode(java.lang.String value)
When code is used, the runtime
is required. The runtime value must be APPSYNC_JS
.
public java.lang.String getCodeS3Location()
public void setCodeS3Location(java.lang.String value)
public java.lang.String getDataSourceName()
public void setDataSourceName(java.lang.String value)
public java.lang.String getKind()
Function
objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.public void setKind(java.lang.String value)
Function
objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.public java.lang.Number getMaxBatchSize()
public void setMaxBatchSize(java.lang.Number value)
public java.lang.Object getPipelineConfig()
public void setPipelineConfig(IResolvable value)
public void setPipelineConfig(CfnResolver.PipelineConfigProperty value)
public java.lang.String getRequestMappingTemplate()
Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.
public void setRequestMappingTemplate(java.lang.String value)
Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.
public java.lang.String getRequestMappingTemplateS3Location()
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
public void setRequestMappingTemplateS3Location(java.lang.String value)
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
public java.lang.String getResponseMappingTemplate()
public void setResponseMappingTemplate(java.lang.String value)
public java.lang.String getResponseMappingTemplateS3Location()
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
public void setResponseMappingTemplateS3Location(java.lang.String value)
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
public java.lang.Object getRuntime()
Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
public void setRuntime(IResolvable value)
Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
public void setRuntime(CfnResolver.AppSyncRuntimeProperty value)
Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
public java.lang.Object getSyncConfig()
public void setSyncConfig(IResolvable value)
public void setSyncConfig(CfnResolver.SyncConfigProperty value)