Class CfnFunctionConfiguration

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.426Z") @Stability(Stable) public class CfnFunctionConfiguration extends CfnResource implements IInspectable
A CloudFormation AWS::AppSync::FunctionConfiguration.

The AWS::AppSync::FunctionConfiguration resource defines the functions in GraphQL APIs to perform certain operations. You can use pipeline resolvers to attach functions. For more information, see Pipeline Resolvers in the AWS AppSync Developer Guide .

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 AWS 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 in the AWS CloudFormation User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.appsync.*;
 CfnFunctionConfiguration cfnFunctionConfiguration = CfnFunctionConfiguration.Builder.create(this, "MyCfnFunctionConfiguration")
         .apiId("apiId")
         .dataSourceName("dataSourceName")
         .name("name")
         // the properties below are optional
         .code("code")
         .codeS3Location("codeS3Location")
         .description("description")
         .functionVersion("functionVersion")
         .maxBatchSize(123)
         .requestMappingTemplate("requestMappingTemplate")
         .requestMappingTemplateS3Location("requestMappingTemplateS3Location")
         .responseMappingTemplate("responseMappingTemplate")
         .responseMappingTemplateS3Location("responseMappingTemplateS3Location")
         .runtime(AppSyncRuntimeProperty.builder()
                 .name("name")
                 .runtimeVersion("runtimeVersion")
                 .build())
         .syncConfig(SyncConfigProperty.builder()
                 .conflictDetection("conflictDetection")
                 // the properties below are optional
                 .conflictHandler("conflictHandler")
                 .lambdaConflictHandlerConfig(LambdaConflictHandlerConfigProperty.builder()
                         .lambdaConflictHandlerArn("lambdaConflictHandlerArn")
                         .build())
                 .build())
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnFunctionConfiguration

      protected CfnFunctionConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnFunctionConfiguration

      protected CfnFunctionConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnFunctionConfiguration

      @Stability(Stable) public CfnFunctionConfiguration(@NotNull Construct scope, @NotNull String id, @NotNull CfnFunctionConfigurationProps props)
      Create a new AWS::AppSync::FunctionConfiguration.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrDataSourceName

      @Stability(Stable) @NotNull public String getAttrDataSourceName()
      The name of data source this function will attach.
    • getAttrFunctionArn

      @Stability(Stable) @NotNull public String getAttrFunctionArn()
      ARN of the function, such as arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/functions/functionId .
    • getAttrFunctionId

      @Stability(Stable) @NotNull public String getAttrFunctionId()
      The unique ID of this function.
    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      The name of the function.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getApiId

      @Stability(Stable) @NotNull public String getApiId()
      The AWS AppSync GraphQL API that you want to attach using this function.
    • setApiId

      @Stability(Stable) public void setApiId(@NotNull String value)
      The AWS AppSync GraphQL API that you want to attach using this function.
    • getDataSourceName

      @Stability(Stable) @NotNull public String getDataSourceName()
      The name of data source this function will attach.
    • setDataSourceName

      @Stability(Stable) public void setDataSourceName(@NotNull String value)
      The name of data source this function will attach.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the function.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the function.
    • getCode

      @Stability(Stable) @Nullable public String getCode()
      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 .

    • setCode

      @Stability(Stable) public void setCode(@Nullable String value)
      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 .

    • getCodeS3Location

      @Stability(Stable) @Nullable public String getCodeS3Location()
      The Amazon S3 endpoint.
    • setCodeS3Location

      @Stability(Stable) public void setCodeS3Location(@Nullable String value)
      The Amazon S3 endpoint.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The Function description.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The Function description.
    • getFunctionVersion

      @Stability(Stable) @Nullable public String getFunctionVersion()
      The version of the request mapping template.

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

    • setFunctionVersion

      @Stability(Stable) public void setFunctionVersion(@Nullable String value)
      The version of the request mapping template.

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

    • getMaxBatchSize

      @Stability(Stable) @Nullable public Number getMaxBatchSize()
      The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
    • setMaxBatchSize

      @Stability(Stable) public void setMaxBatchSize(@Nullable Number value)
      The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a BatchInvoke operation.
    • getRequestMappingTemplate

      @Stability(Stable) @Nullable public String getRequestMappingTemplate()
      The Function request mapping template.

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

    • setRequestMappingTemplate

      @Stability(Stable) public void setRequestMappingTemplate(@Nullable String value)
      The Function request mapping template.

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

    • getRequestMappingTemplateS3Location

      @Stability(Stable) @Nullable public String getRequestMappingTemplateS3Location()
      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.

    • setRequestMappingTemplateS3Location

      @Stability(Stable) public void setRequestMappingTemplateS3Location(@Nullable String value)
      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.

    • getResponseMappingTemplate

      @Stability(Stable) @Nullable public String getResponseMappingTemplate()
      The Function response mapping template.
    • setResponseMappingTemplate

      @Stability(Stable) public void setResponseMappingTemplate(@Nullable String value)
      The Function response mapping template.
    • getResponseMappingTemplateS3Location

      @Stability(Stable) @Nullable public String getResponseMappingTemplateS3Location()
      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.

    • setResponseMappingTemplateS3Location

      @Stability(Stable) public void setResponseMappingTemplateS3Location(@Nullable String value)
      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.

    • getRuntime

      @Stability(Stable) @Nullable public Object getRuntime()
      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.

    • setRuntime

      @Stability(Stable) public void setRuntime(@Nullable IResolvable value)
      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.

    • setRuntime

      @Stability(Stable) public void setRuntime(@Nullable CfnFunctionConfiguration.AppSyncRuntimeProperty value)
      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.

    • getSyncConfig

      @Stability(Stable) @Nullable public Object getSyncConfig()
      Describes a Sync configuration for a resolver.

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

    • setSyncConfig

      @Stability(Stable) public void setSyncConfig(@Nullable IResolvable value)
      Describes a Sync configuration for a resolver.

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

    • setSyncConfig

      @Stability(Stable) public void setSyncConfig(@Nullable CfnFunctionConfiguration.SyncConfigProperty value)
      Describes a Sync configuration for a resolver.

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