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, metrics_config=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.

  • metrics_config (Optional[str]) – Enables or disables enhanced resolver metrics for specified resolvers. Note that MetricsConfig won’t be used unless the resolverLevelMetricsBehavior value is set to PER_RESOLVER_METRICS . If the resolverLevelMetricsBehavior is set to FULL_REQUEST_RESOLVER_METRICS instead, MetricsConfig will be ignored. However, you can still set its value.

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

See:

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.
from aws_cdk import 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,
    metrics_config="metricsConfig",
    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.

See:

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.

See:

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 .

See:

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

code_s3_location

The Amazon S3 endpoint.

See:

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.

See:

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.

See:

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.

See:

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.

See:

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

metrics_config

Enables or disables enhanced resolver metrics for specified resolvers.

Note that MetricsConfig won’t be used unless the resolverLevelMetricsBehavior value is set to PER_RESOLVER_METRICS . If the resolverLevelMetricsBehavior is set to FULL_REQUEST_RESOLVER_METRICS instead, MetricsConfig will be ignored. However, you can still set its value.

See:

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

pipeline_config

Functions linked with the pipeline resolver.

See:

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.

See:

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.

See:

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

response_mapping_template

The response mapping template.

See:

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.

See:

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

See:

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.

See:

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.

See:

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