CfnFunctionConfigurationProps

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

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

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

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

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

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

  • 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]) – 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",
    name="name",

    # the properties below are optional
    code="code",
    code_s3_location="codeS3Location",
    description="description",
    function_version="functionVersion",
    max_batch_size=123,
    request_mapping_template="requestMappingTemplate",
    request_mapping_template_s3_location="requestMappingTemplateS3Location",
    response_mapping_template="responseMappingTemplate",
    response_mapping_template_s3_location="responseMappingTemplateS3Location",
    runtime=appsync.CfnFunctionConfiguration.AppSyncRuntimeProperty(
        name="name",
        runtime_version="runtimeVersion"
    ),
    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

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

code_s3_location

The Amazon S3 endpoint.

Link:

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

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

description

The Function description.

Link:

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

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

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

name

The name of the function.

Link:

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

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

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

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

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

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

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