Class CfnFunctionConfiguration
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDescribes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.static final classA fluent builder forCfnFunctionConfiguration.static interfaceTheLambdaConflictHandlerConfigobject when configuringLAMBDAas the Conflict Handler.static interfaceDescribes a Sync configuration for a resolver.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnFunctionConfiguration(Construct scope, String id, CfnFunctionConfigurationProps props) Create a newAWS::AppSync::FunctionConfiguration.protectedCfnFunctionConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnFunctionConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptiongetApiId()The AWS AppSync GraphQL API that you want to attach using this function.The name of data source this function will attach.ARN of the function, such asarn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/functions/functionId.The unique ID of this function.The name of the function.getCode()Theresolvercode that contains the request and response functions.The Amazon S3 endpoint.The name of data source this function will attach.TheFunctiondescription.The version of the request mapping template.The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation.getName()The name of the function.TheFunctionrequest mapping template.Describes a Sync configuration for a resolver.TheFunctionresponse mapping template.The location of a response mapping template in an Amazon S3 bucket.Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.Describes a Sync configuration for a resolver.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidThe AWS AppSync GraphQL API that you want to attach using this function.voidTheresolvercode that contains the request and response functions.voidsetCodeS3Location(String value) The Amazon S3 endpoint.voidsetDataSourceName(String value) The name of data source this function will attach.voidsetDescription(String value) TheFunctiondescription.voidsetFunctionVersion(String value) The version of the request mapping template.voidsetMaxBatchSize(Number value) The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation.voidThe name of the function.voidsetRequestMappingTemplate(String value) TheFunctionrequest mapping template.voidDescribes a Sync configuration for a resolver.voidsetResponseMappingTemplate(String value) TheFunctionresponse mapping template.voidThe location of a response mapping template in an Amazon S3 bucket.voidsetRuntime(IResolvable value) Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.voidDescribes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.voidsetSyncConfig(IResolvable value) Describes a Sync configuration for a resolver.voidDescribes a Sync configuration for a resolver.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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 newAWS::AppSync::FunctionConfiguration.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrDataSourceName
The name of data source this function will attach. -
getAttrFunctionArn
ARN of the function, such asarn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/functions/functionId. -
getAttrFunctionId
The unique ID of this function. -
getAttrName
The name of the function. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getApiId
The AWS AppSync GraphQL API that you want to attach using this function. -
setApiId
The AWS AppSync GraphQL API that you want to attach using this function. -
getDataSourceName
The name of data source this function will attach. -
setDataSourceName
The name of data source this function will attach. -
getName
The name of the function. -
setName
The name of the function. -
getCode
Theresolvercode that contains the request and response functions.When code is used, the
runtimeis required. The runtime value must beAPPSYNC_JS. -
setCode
Theresolvercode that contains the request and response functions.When code is used, the
runtimeis required. The runtime value must beAPPSYNC_JS. -
getCodeS3Location
The Amazon S3 endpoint. -
setCodeS3Location
The Amazon S3 endpoint. -
getDescription
TheFunctiondescription. -
setDescription
TheFunctiondescription. -
getFunctionVersion
The version of the request mapping template.Currently, only the 2018-05-29 version of the template is supported.
-
setFunctionVersion
The version of the request mapping template.Currently, only the 2018-05-29 version of the template is supported.
-
getMaxBatchSize
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation. -
setMaxBatchSize
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in aBatchInvokeoperation. -
getRequestMappingTemplate
TheFunctionrequest mapping template.Functions support only the 2018-05-29 version of the request mapping template.
-
setRequestMappingTemplate
TheFunctionrequest mapping template.Functions support only the 2018-05-29 version of the request mapping template.
-
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
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
TheFunctionresponse mapping template. -
setResponseMappingTemplate
TheFunctionresponse mapping template. -
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
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
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
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
Describes a Sync configuration for a resolver.Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
-
setSyncConfig
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.
-