Class CfnResolver
A CloudFormation AWS::AppSync::Resolver
.
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.AWS.AppSync.dll
Syntax (csharp)
public class CfnResolver : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnResolver
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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 .
CloudformationResource: AWS::AppSync::Resolver
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
var cfnResolver = new CfnResolver(this, "MyCfnResolver", new CfnResolverProps {
ApiId = "apiId",
FieldName = "fieldName",
TypeName = "typeName",
// the properties below are optional
CachingConfig = new CachingConfigProperty {
Ttl = 123,
// the properties below are optional
CachingKeys = new [] { "cachingKeys" }
},
Code = "code",
CodeS3Location = "codeS3Location",
DataSourceName = "dataSourceName",
Kind = "kind",
MaxBatchSize = 123,
PipelineConfig = new PipelineConfigProperty {
Functions = new [] { "functions" }
},
RequestMappingTemplate = "requestMappingTemplate",
RequestMappingTemplateS3Location = "requestMappingTemplateS3Location",
ResponseMappingTemplate = "responseMappingTemplate",
ResponseMappingTemplateS3Location = "responseMappingTemplateS3Location",
Runtime = new AppSyncRuntimeProperty {
Name = "name",
RuntimeVersion = "runtimeVersion"
},
SyncConfig = new SyncConfigProperty {
ConflictDetection = "conflictDetection",
// the properties below are optional
ConflictHandler = "conflictHandler",
LambdaConflictHandlerConfig = new LambdaConflictHandlerConfigProperty {
LambdaConflictHandlerArn = "lambdaConflictHandlerArn"
}
}
});
Synopsis
Constructors
CfnResolver(Construct, String, ICfnResolverProps) | Create a new |
CfnResolver(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnResolver(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
ApiId | The AWS AppSync GraphQL API to which you want to attach this resolver. |
AttrFieldName | The GraphQL field on a type that invokes the resolver. |
AttrResolverArn | ARN of the resolver, such as |
AttrTypeName | The GraphQL type that invokes this resolver. |
CachingConfig | The caching configuration for the resolver. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Code | The |
CodeS3Location | The Amazon S3 endpoint. |
DataSourceName | The resolver data source name. |
FieldName | The GraphQL field on a type that invokes the resolver. |
Kind | The resolver type. |
MaxBatchSize | The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a |
PipelineConfig | Functions linked with the pipeline resolver. |
RequestMappingTemplate | The request mapping template. |
RequestMappingTemplateS3Location | The location of a request mapping template in an Amazon S3 bucket. |
ResponseMappingTemplate | The response mapping template. |
ResponseMappingTemplateS3Location | The location of a response mapping template in an Amazon S3 bucket. |
Runtime | Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function. |
SyncConfig | The |
TypeName | The GraphQL type that invokes this resolver. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnResolver(Construct, String, ICfnResolverProps)
Create a new AWS::AppSync::Resolver
.
public CfnResolver(Construct scope, string id, ICfnResolverProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnResolverProps
- resource properties.
CfnResolver(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnResolver(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnResolver(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnResolver(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
ApiId
The AWS AppSync GraphQL API to which you want to attach this resolver.
public virtual string ApiId { get; set; }
Property Value
System.String
Remarks
AttrFieldName
The GraphQL field on a type that invokes the resolver.
public virtual string AttrFieldName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: FieldName
AttrResolverArn
ARN of the resolver, such as arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/types/typename/resolvers/resolvername
.
public virtual string AttrResolverArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: ResolverArn
AttrTypeName
The GraphQL type that invokes this resolver.
public virtual string AttrTypeName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: TypeName
CachingConfig
The caching configuration for the resolver.
public virtual object CachingConfig { get; set; }
Property Value
System.Object
Remarks
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Code
The resolver
code that contains the request and response functions.
public virtual string Code { get; set; }
Property Value
System.String
Remarks
When code is used, the runtime
is required. The runtime value must be APPSYNC_JS
.
CodeS3Location
The Amazon S3 endpoint.
public virtual string CodeS3Location { get; set; }
Property Value
System.String
Remarks
DataSourceName
The resolver data source name.
public virtual string DataSourceName { get; set; }
Property Value
System.String
Remarks
FieldName
The GraphQL field on a type that invokes the resolver.
public virtual string FieldName { get; set; }
Property Value
System.String
Remarks
Kind
The resolver type.
public virtual string Kind { get; set; }
Property Value
System.String
Remarks
MaxBatchSize
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke
operation.
public virtual Nullable<double> MaxBatchSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
PipelineConfig
Functions linked with the pipeline resolver.
public virtual object PipelineConfig { get; set; }
Property Value
System.Object
Remarks
RequestMappingTemplate
The request mapping template.
public virtual string RequestMappingTemplate { get; set; }
Property Value
System.String
Remarks
Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.
RequestMappingTemplateS3Location
The location of a request mapping template in an Amazon S3 bucket.
public virtual string RequestMappingTemplateS3Location { get; set; }
Property Value
System.String
Remarks
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
ResponseMappingTemplate
The response mapping template.
public virtual string ResponseMappingTemplate { get; set; }
Property Value
System.String
Remarks
ResponseMappingTemplateS3Location
The location of a response mapping template in an Amazon S3 bucket.
public virtual string ResponseMappingTemplateS3Location { get; set; }
Property Value
System.String
Remarks
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
Runtime
Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
public virtual object Runtime { get; set; }
Property Value
System.Object
Remarks
Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
SyncConfig
The SyncConfig
for a resolver attached to a versioned data source.
public virtual object SyncConfig { get; set; }
Property Value
System.Object
Remarks
TypeName
The GraphQL type that invokes this resolver.
public virtual string TypeName { get; set; }
Property Value
System.String
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>