CfnResolverPropsMixin
- class aws_cdk.mixins_preview.aws_appsync.mixins.CfnResolverPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::AppSync::Resolverresource 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:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AppSyncRuntimeProperty
- class CfnResolverPropsMixin.AppSyncRuntimeProperty(*, name=None, runtime_version=None)
Bases:
objectDescribes 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]) – Thenameof the runtime to use. Currently, the only allowed value isAPPSYNC_JS.runtime_version (
Optional[str]) – Theversionof the runtime to use. Currently, the only allowed version is1.0.0.
- See:
- 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
nameof the runtime to use.Currently, the only allowed value is
APPSYNC_JS.
- runtime_version
The
versionof the runtime to use.Currently, the only allowed version is
1.0.0.
CachingConfigProperty
- class CfnResolverPropsMixin.CachingConfigProperty(*, caching_keys=None, ttl=None)
Bases:
objectThe 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.identitymaps.ttl (
Union[int,float,None]) – The TTL in seconds for a resolver that has caching activated. Valid values are 1–3,600 seconds.
- See:
- 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.identitymaps.
- ttl
The TTL in seconds for a resolver that has caching activated.
Valid values are 1–3,600 seconds.
LambdaConflictHandlerConfigProperty
- class CfnResolverPropsMixin.LambdaConflictHandlerConfigProperty(*, lambda_conflict_handler_arn=None)
Bases:
objectThe
LambdaConflictHandlerConfigwhen 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:
- 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.
PipelineConfigProperty
- class CfnResolverPropsMixin.PipelineConfigProperty(*, functions=None)
Bases:
objectUse the
PipelineConfigproperty type to specifyPipelineConfigfor an AWS AppSync resolver.PipelineConfigis a property of the AWS::AppSync::Resolver resource.- Parameters:
functions (
Optional[Sequence[str]]) – A list ofFunctionobjects.- See:
- 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
Functionobjects.
SyncConfigProperty
- class CfnResolverPropsMixin.SyncConfigProperty(*, conflict_detection=None, conflict_handler=None, lambda_conflict_handler_config=None)
Bases:
objectDescribes 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 theLambdaConflictHandlerConfig.lambda_conflict_handler_config (
Union[IResolvable,LambdaConflictHandlerConfigProperty,Dict[str,Any],None]) – TheLambdaConflictHandlerConfigwhen configuringLAMBDAas the Conflict Handler.
- See:
- 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.
- 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.
- lambda_conflict_handler_config
The
LambdaConflictHandlerConfigwhen configuringLAMBDAas the Conflict Handler.