CfnResolverProps

class aws_cdk.aws_appsync.CfnResolverProps(*, api_id, field_name, type_name, caching_config=None, code=None, code_s3_location=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, runtime=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.

  • code (Optional[str]) – The resolver code that contains the request and response functions. When code is used, the runtime is required. The runtime value must be APPSYNC_JS .

  • code_s3_location (Optional[str]) – The Amazon S3 endpoint.

  • 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.

  • runtime (Union[IResolvable, AppSyncRuntimeProperty, Dict[str, Any], None]) – Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function. Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.

  • 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"]
    ),
    code="code",
    code_s3_location="codeS3Location",
    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",
    runtime=appsync.CfnResolver.AppSyncRuntimeProperty(
        name="name",
        runtime_version="runtimeVersion"
    ),
    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

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

code

The resolver code that contains the request and response functions.

When code is used, the runtime is required. The runtime value must be APPSYNC_JS .

Link:

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

code_s3_location

The Amazon S3 endpoint.

Link:

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

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

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

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

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

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

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

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

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

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

runtime

Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.

Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.

Link:

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

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

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