CfnFunctionConfigurationProps

class aws_cdk.aws_appsync.CfnFunctionConfigurationProps(*, api_id, data_source_name, function_version, name, description=None, max_batch_size=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 CfnFunctionConfiguration.

Parameters
  • api_id (str) – The AWS AppSync GraphQL API that you want to attach using this function.

  • data_source_name (str) – The name of data source this function will attach.

  • function_version (str) – The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.

  • name (str) – The name of the function.

  • description (Optional[str]) – The Function description.

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

  • request_mapping_template (Optional[str]) – The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.

  • request_mapping_template_s3_location (Optional[str]) – Describes a Sync configuration for a resolver. Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.

  • response_mapping_template (Optional[str]) – The Function 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]) – Describes a Sync configuration for a resolver. Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-functionconfiguration.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_function_configuration_props = appsync.CfnFunctionConfigurationProps(
    api_id="apiId",
    data_source_name="dataSourceName",
    function_version="functionVersion",
    name="name",

    # the properties below are optional
    description="description",
    max_batch_size=123,
    request_mapping_template="requestMappingTemplate",
    request_mapping_template_s3_location="requestMappingTemplateS3Location",
    response_mapping_template="responseMappingTemplate",
    response_mapping_template_s3_location="responseMappingTemplateS3Location",
    sync_config=appsync.CfnFunctionConfiguration.SyncConfigProperty(
        conflict_detection="conflictDetection",

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

Attributes

api_id

The AWS AppSync GraphQL API that you want to attach using this function.

Link

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

Return type

str

data_source_name

The name of data source this function will attach.

Link

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

Return type

str

description

The Function description.

Link

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

Return type

Optional[str]

function_version

The version of the request mapping template.

Currently, only the 2018-05-29 version of the template is supported.

Link

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

Return type

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-functionconfiguration.html#cfn-appsync-functionconfiguration-maxbatchsize

Return type

Union[int, float, None]

name

The name of the function.

Link

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

Return type

str

request_mapping_template

The Function request mapping template.

Functions support only the 2018-05-29 version of the request mapping template.

Link

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

Return type

Optional[str]

request_mapping_template_s3_location

Describes a Sync configuration for a resolver.

Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.

Link

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

Return type

Optional[str]

response_mapping_template

The Function response mapping template.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-functionconfiguration.html#cfn-appsync-functionconfiguration-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-functionconfiguration.html#cfn-appsync-functionconfiguration-responsemappingtemplates3location

Return type

Optional[str]

sync_config

Describes a Sync configuration for a resolver.

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

Link

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

Return type

Union[IResolvable, SyncConfigProperty, None]