Class CfnFunctionConfiguration

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:57.126Z") @Stability(Stable) public class CfnFunctionConfiguration extends CfnResource implements IInspectable
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();
 

See Also:
  • 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnFunctionConfigurationProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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.
    • setCode

      @Stability(Stable) public void setCode(@Nullable String value)
      The resolver code that contains the request and response functions.
    • 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.
    • setFunctionVersion

      @Stability(Stable) public void setFunctionVersion(@Nullable String value)
      The version of the request mapping template.
    • 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.
    • setRequestMappingTemplate

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

      @Stability(Stable) @Nullable public String getRequestMappingTemplateS3Location()
      Describes a Sync configuration for a resolver.
    • setRequestMappingTemplateS3Location

      @Stability(Stable) public void setRequestMappingTemplateS3Location(@Nullable String value)
      Describes a Sync configuration for a resolver.
    • 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.
    • setResponseMappingTemplateS3Location

      @Stability(Stable) public void setResponseMappingTemplateS3Location(@Nullable String value)
      The location of a response mapping template in an Amazon S3 bucket.
    • getRuntime

      @Stability(Stable) @Nullable public Object getRuntime()
      Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.
    • setRuntime

      @Stability(Stable) public void setRuntime(@Nullable IResolvable value)
      Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.
    • setRuntime

      @Stability(Stable) public void setRuntime(@Nullable CfnFunctionConfiguration.AppSyncRuntimeProperty value)
      Describes a runtime used by an AWS AppSync resolver or AWS AppSync function.
    • getSyncConfig

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

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

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