CfnResolverProps

class aws_cdk.aws_appsync.CfnResolverProps(*, api_id, field_name, type_name, caching_config=None, data_source_name=None, kind=None, max_batch_size=None, pipeline_config=None, request_mapping_template=None, request_mapping_template_s3_location=None, response_mapping_template=None, response_mapping_template_s3_location=None, sync_config=None)

Bases: object

Properties for defining a CfnResolver.

Parameters
  • api_id (str) – The AWS AppSync GraphQL API to which you want to attach this resolver.

  • field_name (str) – The GraphQL field on a type that invokes the resolver.

  • type_name (str) – The GraphQL type that invokes this resolver.

  • caching_config (Union[IResolvable, CachingConfigProperty, Dict[str, Any], None]) – The caching configuration for the resolver.

  • data_source_name (Optional[str]) – The resolver data source name.

  • kind (Optional[str]) – The resolver type. - UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source. - PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.

  • max_batch_size (Union[int, float, None]) – The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.

  • pipeline_config (Union[IResolvable, PipelineConfigProperty, Dict[str, Any], None]) – Functions linked with the pipeline resolver.

  • request_mapping_template (Optional[str]) – The request mapping template. Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.

  • request_mapping_template_s3_location (Optional[str]) – The location of a request mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.

  • response_mapping_template (Optional[str]) – The response mapping template.

  • response_mapping_template_s3_location (Optional[str]) – The location of a response mapping template in an Amazon S3 bucket. Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.

  • sync_config (Union[IResolvable, SyncConfigProperty, Dict[str, Any], None]) – The SyncConfig for a resolver attached to a versioned data source.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_appsync as appsync

cfn_resolver_props = appsync.CfnResolverProps(
    api_id="apiId",
    field_name="fieldName",
    type_name="typeName",

    # the properties below are optional
    caching_config=appsync.CfnResolver.CachingConfigProperty(
        ttl=123,

        # the properties below are optional
        caching_keys=["cachingKeys"]
    ),
    data_source_name="dataSourceName",
    kind="kind",
    max_batch_size=123,
    pipeline_config=appsync.CfnResolver.PipelineConfigProperty(
        functions=["functions"]
    ),
    request_mapping_template="requestMappingTemplate",
    request_mapping_template_s3_location="requestMappingTemplateS3Location",
    response_mapping_template="responseMappingTemplate",
    response_mapping_template_s3_location="responseMappingTemplateS3Location",
    sync_config=appsync.CfnResolver.SyncConfigProperty(
        conflict_detection="conflictDetection",

        # the properties below are optional
        conflict_handler="conflictHandler",
        lambda_conflict_handler_config=appsync.CfnResolver.LambdaConflictHandlerConfigProperty(
            lambda_conflict_handler_arn="lambdaConflictHandlerArn"
        )
    )
)

Attributes

api_id

The AWS AppSync GraphQL API to which you want to attach this resolver.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-apiid

Return type

str

caching_config

The caching configuration for the resolver.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-cachingconfig

Return type

Union[IResolvable, CachingConfigProperty, None]

data_source_name

The resolver data source name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-datasourcename

Return type

Optional[str]

field_name

The GraphQL field on a type that invokes the resolver.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-fieldname

Return type

str

kind

The resolver type.

  • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.

  • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-kind

Return type

Optional[str]

max_batch_size

The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-maxbatchsize

Return type

Union[int, float, None]

pipeline_config

Functions linked with the pipeline resolver.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-pipelineconfig

Return type

Union[IResolvable, PipelineConfigProperty, None]

request_mapping_template

The request mapping template.

Request mapping templates are optional when using a Lambda data source. For all other data sources, a request mapping template is required.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-requestmappingtemplate

Return type

Optional[str]

request_mapping_template_s3_location

The location of a request mapping template in an Amazon S3 bucket.

Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-requestmappingtemplates3location

Return type

Optional[str]

response_mapping_template

The response mapping template.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-responsemappingtemplate

Return type

Optional[str]

response_mapping_template_s3_location

The location of a response mapping template in an Amazon S3 bucket.

Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-responsemappingtemplates3location

Return type

Optional[str]

sync_config

The SyncConfig for a resolver attached to a versioned data source.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-syncconfig

Return type

Union[IResolvable, SyncConfigProperty, None]

type_name

The GraphQL type that invokes this resolver.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-resolver.html#cfn-appsync-resolver-typename

Return type

str