@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:30.727Z") 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();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnFunctionConfiguration.AppSyncRuntimeProperty
Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
|
static class |
CfnFunctionConfiguration.Builder
A fluent builder for
CfnFunctionConfiguration . |
static interface |
CfnFunctionConfiguration.LambdaConflictHandlerConfigProperty
The `LambdaConflictHandlerConfig` object when configuring `LAMBDA` as the Conflict Handler.
|
static interface |
CfnFunctionConfiguration.SyncConfigProperty
Describes a Sync configuration for a resolver.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnFunctionConfiguration(Construct scope,
java.lang.String id,
CfnFunctionConfigurationProps props)
Create a new `AWS::AppSync::FunctionConfiguration`.
|
protected |
CfnFunctionConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnFunctionConfiguration(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getApiId()
The AWS AppSync GraphQL API that you want to attach using this function.
|
java.lang.String |
getAttrDataSourceName()
The name of data source this function will attach.
|
java.lang.String |
getAttrFunctionArn()
ARN of the function, such as `arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/functions/functionId` .
|
java.lang.String |
getAttrFunctionId()
The unique ID of this function.
|
java.lang.String |
getAttrName()
The name of the function.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getCode()
The `resolver` code that contains the request and response functions.
|
java.lang.String |
getCodeS3Location()
The Amazon S3 endpoint.
|
java.lang.String |
getDataSourceName()
The name of data source this function will attach.
|
java.lang.String |
getDescription()
The `Function` description.
|
java.lang.String |
getFunctionVersion()
The version of the request mapping template.
|
java.lang.Number |
getMaxBatchSize()
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a `BatchInvoke` operation.
|
java.lang.String |
getName()
The name of the function.
|
java.lang.String |
getRequestMappingTemplate()
The `Function` request mapping template.
|
java.lang.String |
getRequestMappingTemplateS3Location()
Describes a Sync configuration for a resolver.
|
java.lang.String |
getResponseMappingTemplate()
The `Function` response mapping template.
|
java.lang.String |
getResponseMappingTemplateS3Location()
The location of a response mapping template in an Amazon S3 bucket.
|
java.lang.Object |
getRuntime()
Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
|
java.lang.Object |
getSyncConfig()
Describes a Sync configuration for a resolver.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setApiId(java.lang.String value)
The AWS AppSync GraphQL API that you want to attach using this function.
|
void |
setCode(java.lang.String value)
The `resolver` code that contains the request and response functions.
|
void |
setCodeS3Location(java.lang.String value)
The Amazon S3 endpoint.
|
void |
setDataSourceName(java.lang.String value)
The name of data source this function will attach.
|
void |
setDescription(java.lang.String value)
The `Function` description.
|
void |
setFunctionVersion(java.lang.String value)
The version of the request mapping template.
|
void |
setMaxBatchSize(java.lang.Number value)
The maximum number of resolver request inputs that will be sent to a single AWS Lambda function in a `BatchInvoke` operation.
|
void |
setName(java.lang.String value)
The name of the function.
|
void |
setRequestMappingTemplate(java.lang.String value)
The `Function` request mapping template.
|
void |
setRequestMappingTemplateS3Location(java.lang.String value)
Describes a Sync configuration for a resolver.
|
void |
setResponseMappingTemplate(java.lang.String value)
The `Function` response mapping template.
|
void |
setResponseMappingTemplateS3Location(java.lang.String value)
The location of a response mapping template in an Amazon S3 bucket.
|
void |
setRuntime(CfnFunctionConfiguration.AppSyncRuntimeProperty value)
Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
|
void |
setRuntime(IResolvable value)
Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync function.
|
void |
setSyncConfig(CfnFunctionConfiguration.SyncConfigProperty value)
Describes a Sync configuration for a resolver.
|
void |
setSyncConfig(IResolvable value)
Describes a Sync configuration for a resolver.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnFunctionConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnFunctionConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnFunctionConfiguration(Construct scope, java.lang.String id, CfnFunctionConfigurationProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrDataSourceName()
public java.lang.String getAttrFunctionArn()
public java.lang.String getAttrFunctionId()
public java.lang.String getAttrName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getApiId()
public void setApiId(java.lang.String value)
public java.lang.String getDataSourceName()
public void setDataSourceName(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getCode()
When code is used, the runtime
is required. The runtime value must be APPSYNC_JS
.
public void setCode(java.lang.String value)
When code is used, the runtime
is required. The runtime value must be APPSYNC_JS
.
public java.lang.String getCodeS3Location()
public void setCodeS3Location(java.lang.String value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getFunctionVersion()
Currently, only the 2018-05-29 version of the template is supported.
public void setFunctionVersion(java.lang.String value)
Currently, only the 2018-05-29 version of the template is supported.
public java.lang.Number getMaxBatchSize()
public void setMaxBatchSize(java.lang.Number value)
public java.lang.String getRequestMappingTemplate()
Functions support only the 2018-05-29 version of the request mapping template.
public void setRequestMappingTemplate(java.lang.String value)
Functions support only the 2018-05-29 version of the request mapping template.
public java.lang.String getRequestMappingTemplateS3Location()
Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.
public void setRequestMappingTemplateS3Location(java.lang.String value)
Contains information on which Conflict Detection, as well as Resolution strategy, should be performed when the resolver is invoked.
public java.lang.String getResponseMappingTemplate()
public void setResponseMappingTemplate(java.lang.String value)
public java.lang.String getResponseMappingTemplateS3Location()
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
public void setResponseMappingTemplateS3Location(java.lang.String value)
Use this if you want to provision with a template file in Amazon S3 rather than embedding it in your CloudFormation template.
public java.lang.Object getRuntime()
Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
public void setRuntime(IResolvable value)
Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
public void setRuntime(CfnFunctionConfiguration.AppSyncRuntimeProperty value)
Specifies the name and version of the runtime to use. Note that if a runtime is specified, code must also be specified.
public java.lang.Object getSyncConfig()
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
public void setSyncConfig(IResolvable value)
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.
public void setSyncConfig(CfnFunctionConfiguration.SyncConfigProperty value)
Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.