@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)",
date="2023-01-25T18:29:12.635Z")
public abstract class MappingTemplate
extends software.amazon.jsii.JsiiObject
Example:
GraphqlApi api; MappingTemplate dummyRequest; MappingTemplate dummyResponse; ObjectType info = ObjectType.Builder.create("Info") .definition(Map.of( "node", ResolvableField.Builder.create() .returnType(GraphqlType.string()) .args(Map.of( "id", GraphqlType.string())) .dataSource(api.addNoneDataSource("none")) .requestMappingTemplate(dummyRequest) .responseMappingTemplate(dummyResponse) .build())) .build();
Modifier | Constructor and Description |
---|---|
protected |
MappingTemplate() |
protected |
MappingTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
MappingTemplate(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static MappingTemplate |
dynamoDbDeleteItem(java.lang.String keyName,
java.lang.String idArg)
(experimental) Mapping template to delete a single item from a DynamoDB table.
|
static MappingTemplate |
dynamoDbGetItem(java.lang.String keyName,
java.lang.String idArg)
(experimental) Mapping template to get a single item from a DynamoDB table.
|
static MappingTemplate |
dynamoDbPutItem(PrimaryKey key,
AttributeValues values)
(experimental) Mapping template to save a single item to a DynamoDB table.
|
static MappingTemplate |
dynamoDbQuery(KeyCondition cond)
(experimental) Mapping template to query a set of items from a DynamoDB table.
|
static MappingTemplate |
dynamoDbQuery(KeyCondition cond,
java.lang.String indexName)
(experimental) Mapping template to query a set of items from a DynamoDB table.
|
static MappingTemplate |
dynamoDbResultItem()
(experimental) Mapping template for a single result item from DynamoDB.
|
static MappingTemplate |
dynamoDbResultList()
(experimental) Mapping template for a result list from DynamoDB.
|
static MappingTemplate |
dynamoDbScanTable()
(experimental) Mapping template to scan a DynamoDB table to fetch all entries.
|
static MappingTemplate |
fromFile(java.lang.String fileName)
(experimental) Create a mapping template from the given file.
|
static MappingTemplate |
fromString(java.lang.String template)
(experimental) Create a mapping template from the given string.
|
static MappingTemplate |
lambdaRequest()
(experimental) Mapping template to invoke a Lambda function.
|
static MappingTemplate |
lambdaRequest(java.lang.String payload)
(experimental) Mapping template to invoke a Lambda function.
|
static MappingTemplate |
lambdaRequest(java.lang.String payload,
java.lang.String operation)
(experimental) Mapping template to invoke a Lambda function.
|
static MappingTemplate |
lambdaResult()
(experimental) Mapping template to return the Lambda result to the caller.
|
abstract java.lang.String |
renderTemplate()
(experimental) this is called to render the mapping template to a VTL string.
|
protected MappingTemplate(software.amazon.jsii.JsiiObjectRef objRef)
protected MappingTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected MappingTemplate()
public static MappingTemplate dynamoDbDeleteItem(java.lang.String keyName, java.lang.String idArg)
keyName
- the name of the hash key field. This parameter is required.idArg
- the name of the Mutation argument. This parameter is required.public static MappingTemplate dynamoDbGetItem(java.lang.String keyName, java.lang.String idArg)
keyName
- the name of the hash key field. This parameter is required.idArg
- the name of the Query argument. This parameter is required.public static MappingTemplate dynamoDbPutItem(PrimaryKey key, AttributeValues values)
key
- the assigment of Mutation values to the primary key. This parameter is required.values
- the assignment of Mutation values to the table attributes. This parameter is required.public static MappingTemplate dynamoDbQuery(KeyCondition cond, java.lang.String indexName)
cond
- the key condition for the query. This parameter is required.indexName
- public static MappingTemplate dynamoDbQuery(KeyCondition cond)
cond
- the key condition for the query. This parameter is required.public static MappingTemplate dynamoDbResultItem()
public static MappingTemplate dynamoDbResultList()
public static MappingTemplate dynamoDbScanTable()
public static MappingTemplate fromFile(java.lang.String fileName)
fileName
- This parameter is required.public static MappingTemplate fromString(java.lang.String template)
template
- This parameter is required.public static MappingTemplate lambdaRequest(java.lang.String payload, java.lang.String operation)
payload
- the VTL template snippet of the payload to send to the lambda.operation
- the type of operation AppSync should perform on the data source.public static MappingTemplate lambdaRequest(java.lang.String payload)
payload
- the VTL template snippet of the payload to send to the lambda.public static MappingTemplate lambdaRequest()
public static MappingTemplate lambdaResult()
public abstract java.lang.String renderTemplate()