Class CfnResolver
The AWS::AppSync::Resolver
resource defines the logical GraphQL resolver that you attach to fields in a schema.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnResolver : CfnResource, IInspectable
Syntax (vb)
Public Class CfnResolver
Inherits CfnResource
Implements IInspectable
Remarks
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 .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html
CloudformationResource: AWS::AppSync::Resolver
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,
MetricsConfig = "metricsConfig",
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(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 |
CfnResolver(Construct, String, ICfnResolverProps) |
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 |
MetricsConfig | Enables or disables enhanced resolver metrics for specified resolvers. |
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 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(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
CfnResolver(Construct, String, ICfnResolverProps)
public CfnResolver(Construct scope, string id, ICfnResolverProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnResolverProps
Resource properties.
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
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
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
CodeS3Location
The Amazon S3 endpoint.
public virtual string CodeS3Location { get; set; }
Property Value
System.String
DataSourceName
The resolver data source name.
public virtual string DataSourceName { get; set; }
Property Value
System.String
FieldName
The GraphQL field on a type that invokes the resolver.
public virtual string FieldName { get; set; }
Property Value
System.String
Kind
The resolver type.
public virtual string Kind { get; set; }
Property Value
System.String
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>
MetricsConfig
Enables or disables enhanced resolver metrics for specified resolvers.
public virtual string MetricsConfig { get; set; }
Property Value
System.String
PipelineConfig
Functions linked with the pipeline resolver.
public virtual object PipelineConfig { get; set; }
Property Value
System.Object
RequestMappingTemplate
The request mapping template.
public virtual string RequestMappingTemplate { get; set; }
Property Value
System.String
RequestMappingTemplateS3Location
The location of a request mapping template in an Amazon S3 bucket.
public virtual string RequestMappingTemplateS3Location { get; set; }
Property Value
System.String
ResponseMappingTemplate
The response mapping template.
public virtual string ResponseMappingTemplate { get; set; }
Property Value
System.String
ResponseMappingTemplateS3Location
The location of a response mapping template in an Amazon S3 bucket.
public virtual string ResponseMappingTemplateS3Location { get; set; }
Property Value
System.String
Runtime
Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.
public virtual object Runtime { get; set; }
Property Value
System.Object
SyncConfig
The SyncConfig
for a resolver attached to a versioned data source.
public virtual object SyncConfig { get; set; }
Property Value
System.Object
TypeName
The GraphQL type that invokes this resolver.
public virtual string TypeName { get; set; }
Property Value
System.String
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>