CfnResolverPropsMixin

class aws_cdk.mixins_preview.aws_appsync.mixins.CfnResolverPropsMixin(props, *, strategy=None)

Bases: Mixin

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

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 <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html>`_ in the *AWS CloudFormation User Guide* .
See:

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

CloudformationResource:

AWS::AppSync::Resolver

Mixin:

true

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_appsync import mixins as appsync_mixins

cfn_resolver_props_mixin = appsync_mixins.CfnResolverPropsMixin(appsync_mixins.CfnResolverMixinProps(
    api_id="apiId",
    caching_config=appsync_mixins.CfnResolverPropsMixin.CachingConfigProperty(
        caching_keys=["cachingKeys"],
        ttl=123
    ),
    code="code",
    code_s3_location="codeS3Location",
    data_source_name="dataSourceName",
    field_name="fieldName",
    kind="kind",
    max_batch_size=123,
    metrics_config="metricsConfig",
    pipeline_config=appsync_mixins.CfnResolverPropsMixin.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_mixins.CfnResolverPropsMixin.AppSyncRuntimeProperty(
        name="name",
        runtime_version="runtimeVersion"
    ),
    sync_config=appsync_mixins.CfnResolverPropsMixin.SyncConfigProperty(
        conflict_detection="conflictDetection",
        conflict_handler="conflictHandler",
        lambda_conflict_handler_config=appsync_mixins.CfnResolverPropsMixin.LambdaConflictHandlerConfigProperty(
            lambda_conflict_handler_arn="lambdaConflictHandlerArn"
        )
    ),
    type_name="typeName"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::AppSync::Resolver.

Parameters:
  • props (Union[CfnResolverMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['apiId', 'cachingConfig', 'code', 'codeS3Location', 'dataSourceName', 'fieldName', 'kind', 'maxBatchSize', 'metricsConfig', 'pipelineConfig', 'requestMappingTemplate', 'requestMappingTemplateS3Location', 'responseMappingTemplate', 'responseMappingTemplateS3Location', 'runtime', 'syncConfig', 'typeName']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

AppSyncRuntimeProperty

class CfnResolverPropsMixin.AppSyncRuntimeProperty(*, name=None, runtime_version=None)

Bases: object

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.

Parameters:
  • name (Optional[str]) – The name of the runtime to use. Currently, the only allowed value is APPSYNC_JS .

  • runtime_version (Optional[str]) – The version of the runtime to use. Currently, the only allowed version is 1.0.0 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-appsyncruntime.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.mixins_preview.aws_appsync import mixins as appsync_mixins

app_sync_runtime_property = appsync_mixins.CfnResolverPropsMixin.AppSyncRuntimeProperty(
    name="name",
    runtime_version="runtimeVersion"
)

Attributes

name

The name of the runtime to use.

Currently, the only allowed value is APPSYNC_JS .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-appsyncruntime.html#cfn-appsync-resolver-appsyncruntime-name

runtime_version

The version of the runtime to use.

Currently, the only allowed version is 1.0.0 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-appsyncruntime.html#cfn-appsync-resolver-appsyncruntime-runtimeversion

CachingConfigProperty

class CfnResolverPropsMixin.CachingConfigProperty(*, caching_keys=None, ttl=None)

Bases: object

The caching configuration for a resolver that has caching activated.

Parameters:
  • caching_keys (Optional[Sequence[str]]) – The caching keys for a resolver that has caching activated. Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

  • ttl (Union[int, float, None]) – The TTL in seconds for a resolver that has caching activated. Valid values are 1–3,600 seconds.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-cachingconfig.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.mixins_preview.aws_appsync import mixins as appsync_mixins

caching_config_property = appsync_mixins.CfnResolverPropsMixin.CachingConfigProperty(
    caching_keys=["cachingKeys"],
    ttl=123
)

Attributes

caching_keys

The caching keys for a resolver that has caching activated.

Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

See:

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

ttl

The TTL in seconds for a resolver that has caching activated.

Valid values are 1–3,600 seconds.

See:

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

LambdaConflictHandlerConfigProperty

class CfnResolverPropsMixin.LambdaConflictHandlerConfigProperty(*, lambda_conflict_handler_arn=None)

Bases: object

The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

Parameters:

lambda_conflict_handler_arn (Optional[str]) – The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-lambdaconflicthandlerconfig.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.mixins_preview.aws_appsync import mixins as appsync_mixins

lambda_conflict_handler_config_property = appsync_mixins.CfnResolverPropsMixin.LambdaConflictHandlerConfigProperty(
    lambda_conflict_handler_arn="lambdaConflictHandlerArn"
)

Attributes

lambda_conflict_handler_arn

The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-lambdaconflicthandlerconfig.html#cfn-appsync-resolver-lambdaconflicthandlerconfig-lambdaconflicthandlerarn

PipelineConfigProperty

class CfnResolverPropsMixin.PipelineConfigProperty(*, functions=None)

Bases: object

Use the PipelineConfig property type to specify PipelineConfig for an AWS AppSync resolver.

PipelineConfig is a property of the AWS::AppSync::Resolver resource.

Parameters:

functions (Optional[Sequence[str]]) – A list of Function objects.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-pipelineconfig.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.mixins_preview.aws_appsync import mixins as appsync_mixins

pipeline_config_property = appsync_mixins.CfnResolverPropsMixin.PipelineConfigProperty(
    functions=["functions"]
)

Attributes

functions

A list of Function objects.

See:

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

SyncConfigProperty

class CfnResolverPropsMixin.SyncConfigProperty(*, conflict_detection=None, conflict_handler=None, lambda_conflict_handler_config=None)

Bases: object

Describes a Sync configuration for a resolver.

Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

Parameters:
  • conflict_detection (Optional[str]) – The Conflict Detection strategy to use. - VERSION : Detect conflicts based on object versions for this resolver. - NONE : Do not detect conflicts when invoking this resolver.

  • conflict_handler (Optional[str]) – The Conflict Resolution strategy to perform in the event of a conflict. - OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don’t match the latest version at the server. - AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy. - LAMBDA : Resolve conflicts with an AWS Lambda function supplied in the LambdaConflictHandlerConfig .

  • lambda_conflict_handler_config (Union[IResolvable, LambdaConflictHandlerConfigProperty, Dict[str, Any], None]) – The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-syncconfig.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.mixins_preview.aws_appsync import mixins as appsync_mixins

sync_config_property = appsync_mixins.CfnResolverPropsMixin.SyncConfigProperty(
    conflict_detection="conflictDetection",
    conflict_handler="conflictHandler",
    lambda_conflict_handler_config=appsync_mixins.CfnResolverPropsMixin.LambdaConflictHandlerConfigProperty(
        lambda_conflict_handler_arn="lambdaConflictHandlerArn"
    )
)

Attributes

conflict_detection

The Conflict Detection strategy to use.

  • VERSION : Detect conflicts based on object versions for this resolver.

  • NONE : Do not detect conflicts when invoking this resolver.

See:

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

conflict_handler

The Conflict Resolution strategy to perform in the event of a conflict.

  • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don’t match the latest version at the server.

  • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.

  • LAMBDA : Resolve conflicts with an AWS Lambda function supplied in the LambdaConflictHandlerConfig .

See:

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

lambda_conflict_handler_config

The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

See:

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