diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index d7a54f9887cc7..e562a0b267342 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -77,6 +77,8 @@ const demoTable = new dynamodb.Table(this, 'DemoTable', { const demoDS = api.addDynamoDbDataSource('demoDataSource', demoTable); // Resolver for the Query "getDemos" that scans the DynamoDb table and returns the entire list. +// Resolver Mapping Template Reference: +// https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-dynamodb.html demoDS.createResolver({ typeName: 'Query', fieldName: 'getDemos', @@ -94,8 +96,18 @@ demoDS.createResolver({ ), responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultItem(), }); + +//To enable DynamoDB read consistency with the `MappingTemplate`: +demoDS.createResolver({ + typeName: 'Query', + fieldName: 'getDemosConsistent', + requestMappingTemplate: appsync.MappingTemplate.dynamoDbScanTable(true), + responseMappingTemplate: appsync.MappingTemplate.dynamoDbResultList(), +}); ``` + + ### Aurora Serverless AppSync provides a data source for executing SQL commands against Amazon Aurora diff --git a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts index 09dcf53d8c775..338990d8a4b31 100644 --- a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts +++ b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts @@ -36,8 +36,8 @@ export abstract class MappingTemplate { /** * Mapping template to scan a DynamoDB table to fetch all entries */ - public static dynamoDbScanTable(): MappingTemplate { - return this.fromString('{"version" : "2017-02-28", "operation" : "Scan"}'); + public static dynamoDbScanTable(consistentRead: boolean = false): MappingTemplate { + return this.fromString(`{"version" : "2017-02-28", "operation" : "Scan", "consistentRead": ${consistentRead}}`); } /** @@ -45,8 +45,8 @@ export abstract class MappingTemplate { * * @param cond the key condition for the query */ - public static dynamoDbQuery(cond: KeyCondition, indexName?: string): MappingTemplate { - return this.fromString(`{"version" : "2017-02-28", "operation" : "Query", ${indexName ? `"index" : "${indexName}", ` : ''}${cond.renderTemplate()}}`); + public static dynamoDbQuery(cond: KeyCondition, indexName?: string, consistentRead: boolean = false): MappingTemplate { + return this.fromString(`{"version" : "2017-02-28", "operation" : "Query", "consistentRead": ${consistentRead}, ${indexName ? `"index" : "${indexName}", ` : ''}${cond.renderTemplate()}}`); } /** @@ -55,8 +55,8 @@ export abstract class MappingTemplate { * @param keyName the name of the hash key field * @param idArg the name of the Query argument */ - public static dynamoDbGetItem(keyName: string, idArg: string): MappingTemplate { - return this.fromString(`{"version": "2017-02-28", "operation": "GetItem", "key": {"${keyName}": $util.dynamodb.toDynamoDBJson($ctx.args.${idArg})}}`); + public static dynamoDbGetItem(keyName: string, idArg: string, consistentRead: boolean = false): MappingTemplate { + return this.fromString(`{"version": "2017-02-28", "operation": "GetItem", "consistentRead": ${consistentRead}, "key": {"${keyName}": $util.dynamodb.toDynamoDBJson($ctx.args.${idArg})}}`); } /** diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts index 657eecd9f9064..35ddd4e3cbb24 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts @@ -3,6 +3,7 @@ import { Template } from '@aws-cdk/assertions'; import * as db from '@aws-cdk/aws-dynamodb'; import * as cdk from '@aws-cdk/core'; import * as appsync from '../lib'; +import { KeyCondition } from '../lib'; function joined(str: string): string { return str.replace(/\s+/g, ''); @@ -80,6 +81,24 @@ describe('DynamoDb Data Source configuration', () => { }); describe('DynamoDB Mapping Templates', () => { + test('read consistency option for dynamoDbScanTable should render correctly', () => { + const template = appsync.MappingTemplate.dynamoDbScanTable(true); + const rendered = joined(template.renderTemplate()); + expect(rendered).toStrictEqual('{\"version\":\"2017-02-28\",\"operation\":\"Scan\",\"consistentRead\":true}'); + }); + + test('read consistency option for dynamoDbGetItem should render correctly', () => { + const template = appsync.MappingTemplate.dynamoDbGetItem('id', 'id', true); + const rendered = joined(template.renderTemplate()); + expect(rendered).toStrictEqual('{\"version\":\"2017-02-28\",\"operation\":\"GetItem\",\"consistentRead\":true,\"key\":{\"id\":$util.dynamodb.toDynamoDBJson($ctx.args.id)}}'); + }); + + test('read consistency option for dynamoDbQuery should render correctly', () => { + const template = appsync.MappingTemplate.dynamoDbQuery(KeyCondition.eq('order', 'order'), 'orderIndex', true); + const rendered = joined(template.renderTemplate()); + expect(rendered).toStrictEqual('{\"version\":\"2017-02-28\",\"operation\":\"Query\",\"consistentRead\":true,\"index\":\"orderIndex\",\"query\":{\"expression\":\"#order=:order\",\"expressionNames\":{\"#order\":\"order\"},\"expressionValues\":{\":order\":$util.dynamodb.toDynamoDBJson($ctx.args.order)}}}'); + }); + test('PutItem projecting all', () => { const template = appsync.MappingTemplate.dynamoDbPutItem( appsync.PrimaryKey.partition('id').is('id'), diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json index 4005224af858d..9006d39823f93 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "files": { - "edb3fd1d912b400f4857c41a3ff80bcc32d180595affcd6c017f72afd5959482": { + "7eaa4499d04a6696121796bb6e27fab5b4211517a6e0523260984e33c134f84f": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "edb3fd1d912b400f4857c41a3ff80bcc32d180595affcd6c017f72afd5959482.json", + "objectKey": "7eaa4499d04a6696121796bb6e27fab5b4211517a6e0523260984e33c134f84f.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json index 19f961a0f2321..cd0eacb51852c 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/aws-appsync-integ.template.json @@ -134,7 +134,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json index 24898e02252e6..3714bff83d3ce 100644 --- a/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/auth-apikey.integ.snapshot/tree.json @@ -31,7 +31,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnGraphQLApi", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, @@ -51,7 +51,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnGraphQLSchema", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, @@ -70,7 +70,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnApiKey", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, @@ -206,7 +206,7 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnDataSource", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } }, @@ -230,19 +230,19 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } }, "MutationaddTestResolver": { @@ -270,25 +270,25 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "fqn": "@aws-cdk/core.CfnResource", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.Resolver", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.33" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.GraphqlApi", + "fqn": "@aws-cdk/core.Resource", "version": "0.0.0" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json index a50b5e1f2e3aa..e11315031502f 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.assets.json @@ -14,7 +14,7 @@ } } }, - "4d9e950f40fbc075b913a37030dfd9c31de11a2230d2c5c7e45b8b9730faaa3f": { + "c06c582f69e71eae955ab50693deb45f0836b7837ef3184a737f87c4bf7952a4": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "4d9e950f40fbc075b913a37030dfd9c31de11a2230d2c5c7e45b8b9730faaa3f.json", + "objectKey": "c06c582f69e71eae955ab50693deb45f0836b7837ef3184a737f87c4bf7952a4.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json index b04cdfd5703cb..f5a5b4f3ba0dd 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/aws-appsync-integ.template.json @@ -166,7 +166,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -187,7 +187,7 @@ "TypeName": "Query", "DataSourceName": "testDataSource", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json index 4b239e8ce699e..7ead3eb9d1673 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-iam.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "aws-appsync-integ": { @@ -273,7 +273,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -308,7 +308,7 @@ "typeName": "Query", "dataSourceName": "testDataSource", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -714,13 +714,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "testFail": { diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json index 64895abc5e022..2154620746877 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.assets.json @@ -1,7 +1,7 @@ { - "version": "17.0.0", + "version": "20.0.0", "files": { - "13205a5206cf49ce1c9674807fa5b2c3315de95159c5c1c969664271edd96507": { + "56d1a7b725a78aa83ffacc3ba1d3ae4b4c2fa61c3caff19dafd5f77c1e0333c3": { "source": { "path": "code-first-schema.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "13205a5206cf49ce1c9674807fa5b2c3315de95159c5c1c969664271edd96507.json", + "objectKey": "56d1a7b725a78aa83ffacc3ba1d3ae4b4c2fa61c3caff19dafd5f77c1e0333c3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json index 9266e0f93d7fd..9bd2d92360b1a 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/code-first-schema.template.json @@ -134,7 +134,7 @@ "TypeName": "Query", "DataSourceName": "planets", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json index 6a4631d8d8424..0b009deecc70a 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json index f6cc9f377f9e0..969d960f688b5 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql-schema.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "code-first-schema": { @@ -236,7 +236,7 @@ "typeName": "Query", "dataSourceName": "planets", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json index 6d4ab4f20ea5e..ed6102bf128f4 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.assets.json @@ -1,7 +1,7 @@ { - "version": "17.0.0", + "version": "20.0.0", "files": { - "7b4937a061e73c53a8d1ae8eeb6c778db65cfc02df7a34947b816bcd1332f9c9": { + "410a11ff94f45720614bec412ef8a8f4aa68e8f98e181bbd4b98fb47cbb76284": { "source": { "path": "aws-appsync-integ.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "7b4937a061e73c53a8d1ae8eeb6c778db65cfc02df7a34947b816bcd1332f9c9.json", + "objectKey": "410a11ff94f45720614bec412ef8a8f4aa68e8f98e181bbd4b98fb47cbb76284.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json index a394e054ce118..e72b2a5388458 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/aws-appsync-integ.template.json @@ -62,7 +62,7 @@ "ApiId" ] }, - "Definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomer(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getOrderCustomersEq(order: String): [Customer]\n getOrderCustomersLt(order: String): [Customer]\n getOrderCustomersLe(order: String): [Customer]\n getOrderCustomersGt(order: String): [Customer]\n getOrderCustomersGe(order: String): [Customer]\n getOrderCustomersFilter(order: String, customer: String): [Customer]\n getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer]\n getPayment(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" + "Definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomersNotConsistent: [Customer]\n getCustomersConsistent: [Customer]\n getCustomer(id: String): Customer\n getCustomerNotConsistent(id: String): Customer\n getCustomerConsistent(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersNotConsistentEq(customer: String): Order\n getCustomerOrdersNotConsistentLt(customer: String): Order\n getCustomerOrdersNotConsistentLe(customer: String): Order\n getCustomerOrdersNotConsistentGt(customer: String): Order\n getCustomerOrdersNotConsistentGe(customer: String): Order\n getCustomerOrdersConsistentEq(customer: String): Order\n getCustomerOrdersConsistentLt(customer: String): Order\n getCustomerOrdersConsistentLe(customer: String): Order\n getCustomerOrdersConsistentGt(customer: String): Order\n getCustomerOrdersConsistentGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getOrderCustomersEq(order: String): [Customer]\n getOrderCustomersLt(order: String): [Customer]\n getOrderCustomersLe(order: String): [Customer]\n getOrderCustomersGt(order: String): [Customer]\n getOrderCustomersGe(order: String): [Customer]\n getOrderCustomersNotConsistentEq(order: String): [Customer]\n getOrderCustomersNotConsistentLt(order: String): [Customer]\n getOrderCustomersNotConsistentLe(order: String): [Customer]\n getOrderCustomersNotConsistentGt(order: String): [Customer]\n getOrderCustomersNotConsistentGe(order: String): [Customer]\n getOrderCustomersConsistentEq(order: String): [Customer]\n getOrderCustomersConsistentLt(order: String): [Customer]\n getOrderCustomersConsistentLe(order: String): [Customer]\n getOrderCustomersConsistentGt(order: String): [Customer]\n getOrderCustomersConsistentGe(order: String): [Customer]\n getOrderCustomersFilter(order: String, customer: String): [Customer]\n getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer]\n getPayment(id: String): Payment\n getPaymentConsistent(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" } }, "ApiDefaultApiKeyF991C37B": { @@ -214,7 +214,7 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -235,7 +235,91 @@ "TypeName": "Query", "DataSourceName": "Customer", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "ResponseMappingTemplate": "$util.toJson($ctx.result)" + }, + "DependsOn": [ + "ApicustomerDsFE73DAC5", + "ApiSchema510EECD7" + ] + }, + "ApicustomerDsQuerygetCustomersNotConsistentResolver66499326": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomersNotConsistent", + "TypeName": "Query", + "DataSourceName": "Customer", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApicustomerDsFE73DAC5", + "ApiSchema510EECD7" + ] + }, + "ApicustomerDsQuerygetCustomerNotConsistentResolverE173BDA3": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerNotConsistent", + "TypeName": "Query", + "DataSourceName": "Customer", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "ResponseMappingTemplate": "$util.toJson($ctx.result)" + }, + "DependsOn": [ + "ApicustomerDsFE73DAC5", + "ApiSchema510EECD7" + ] + }, + "ApicustomerDsQuerygetCustomersConsistentResolver302CA74B": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomersConsistent", + "TypeName": "Query", + "DataSourceName": "Customer", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": true}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApicustomerDsFE73DAC5", + "ApiSchema510EECD7" + ] + }, + "ApicustomerDsQuerygetCustomerConsistentResolver0A30CD6C": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerConsistent", + "TypeName": "Query", + "DataSourceName": "Customer", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ @@ -439,7 +523,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -460,7 +544,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -481,7 +565,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -502,7 +586,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -523,7 +607,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -544,7 +628,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -565,7 +649,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -586,7 +670,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -607,7 +691,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -628,7 +712,427 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentEqResolver242A8314": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentEq", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentEqResolver53CBADD9": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentEq", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentLtResolver5259538F": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentLt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentLtResolver322C467A": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentLt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentLeResolver2DB38FDE": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentLe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentLeResolver8A28C79C": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentLe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentGtResolverD7C416AD": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentGt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentGtResolver91BD36C9": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentGt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersNotConsistentGeResolver0E9FE662": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersNotConsistentGe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersNotConsistentGeResolver555023D7": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersNotConsistentGe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentEqResolver0A400223": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentEq", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentEqResolverF54BDAB4": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentEq", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentLtResolver73E118EE": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentLt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentLtResolver8B18EA77": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentLt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentLeResolverEA8D11EE": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentLe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentLeResolverB027B939": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentLe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentGtResolverD927E07A": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentGt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentGtResolver58B23E21": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentGt", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetCustomerOrdersConsistentGeResolverB8F83696": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getCustomerOrdersConsistentGe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" + }, + "DependsOn": [ + "ApiorderDsB50C8AAD", + "ApiSchema510EECD7" + ] + }, + "ApiorderDsQuerygetOrderCustomersConsistentGeResolver674A5CD5": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getOrderCustomersConsistentGe", + "TypeName": "Query", + "DataSourceName": "Order", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -649,7 +1153,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -670,7 +1174,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -691,7 +1195,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -712,7 +1216,7 @@ "TypeName": "Query", "DataSourceName": "Order", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "RequestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", "ResponseMappingTemplate": "$util.toJson($ctx.result.items)" }, "DependsOn": [ @@ -833,7 +1337,28 @@ "TypeName": "Query", "DataSourceName": "Payment", "Kind": "UNIT", - "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "ResponseMappingTemplate": "$util.toJson($ctx.result)" + }, + "DependsOn": [ + "ApipaymentDs95C7AC36", + "ApiSchema510EECD7" + ] + }, + "ApipaymentDsQuerygetPaymentConsistentResolver05C2ACB8": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "FieldName": "getPaymentConsistent", + "TypeName": "Query", + "DataSourceName": "Payment", + "Kind": "UNIT", + "RequestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "ResponseMappingTemplate": "$util.toJson($ctx.result)" }, "DependsOn": [ diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json index 3ed7d42cd0302..4d03a55ced158 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -81,6 +81,30 @@ "data": "ApicustomerDsQuerygetCustomerResolver3649A130" } ], + "/aws-appsync-integ/Api/customerDs/QuerygetCustomersNotConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomersNotConsistentResolver66499326" + } + ], + "/aws-appsync-integ/Api/customerDs/QuerygetCustomerNotConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomerNotConsistentResolverE173BDA3" + } + ], + "/aws-appsync-integ/Api/customerDs/QuerygetCustomersConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomersConsistentResolver302CA74B" + } + ], + "/aws-appsync-integ/Api/customerDs/QuerygetCustomerConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApicustomerDsQuerygetCustomerConsistentResolver0A30CD6C" + } + ], "/aws-appsync-integ/Api/customerDs/MutationaddCustomerResolver/Resource": [ { "type": "aws:cdk:logicalId", @@ -183,6 +207,126 @@ "data": "ApiorderDsQuerygetOrderCustomersGeResolver0B78B0B4" } ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentEqResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentEqResolver242A8314" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentEqResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentEqResolver53CBADD9" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentLtResolver5259538F" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentLtResolver322C467A" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentLeResolver2DB38FDE" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentLeResolver8A28C79C" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentGtResolverD7C416AD" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentGtResolver91BD36C9" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersNotConsistentGeResolver0E9FE662" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersNotConsistentGeResolver555023D7" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentEqResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentEqResolver0A400223" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentEqResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentEqResolverF54BDAB4" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentLtResolver73E118EE" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentLtResolver8B18EA77" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentLeResolverEA8D11EE" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentLeResolverB027B939" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentGtResolverD927E07A" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGtResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentGtResolver58B23E21" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetCustomerOrdersConsistentGeResolverB8F83696" + } + ], + "/aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGeResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApiorderDsQuerygetOrderCustomersConsistentGeResolver674A5CD5" + } + ], "/aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver/Resource": [ { "type": "aws:cdk:logicalId", @@ -231,6 +375,12 @@ "data": "ApipaymentDsQuerygetPaymentResolverD172BFC9" } ], + "/aws-appsync-integ/Api/paymentDs/QuerygetPaymentConsistentResolver/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "ApipaymentDsQuerygetPaymentConsistentResolver05C2ACB8" + } + ], "/aws-appsync-integ/Api/paymentDs/MutationsavePaymentResolver/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json index 247f5d512bf1e..5137a0e251007 100644 --- a/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/graphql.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.33" } }, "aws-appsync-integ": { @@ -109,7 +109,7 @@ "ApiId" ] }, - "definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomer(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getOrderCustomersEq(order: String): [Customer]\n getOrderCustomersLt(order: String): [Customer]\n getOrderCustomersLe(order: String): [Customer]\n getOrderCustomersGt(order: String): [Customer]\n getOrderCustomersGe(order: String): [Customer]\n getOrderCustomersFilter(order: String, customer: String): [Customer]\n getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer]\n getPayment(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" + "definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomersNotConsistent: [Customer]\n getCustomersConsistent: [Customer]\n getCustomer(id: String): Customer\n getCustomerNotConsistent(id: String): Customer\n getCustomerConsistent(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersNotConsistentEq(customer: String): Order\n getCustomerOrdersNotConsistentLt(customer: String): Order\n getCustomerOrdersNotConsistentLe(customer: String): Order\n getCustomerOrdersNotConsistentGt(customer: String): Order\n getCustomerOrdersNotConsistentGe(customer: String): Order\n getCustomerOrdersConsistentEq(customer: String): Order\n getCustomerOrdersConsistentLt(customer: String): Order\n getCustomerOrdersConsistentLe(customer: String): Order\n getCustomerOrdersConsistentGt(customer: String): Order\n getCustomerOrdersConsistentGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getOrderCustomersEq(order: String): [Customer]\n getOrderCustomersLt(order: String): [Customer]\n getOrderCustomersLe(order: String): [Customer]\n getOrderCustomersGt(order: String): [Customer]\n getOrderCustomersGe(order: String): [Customer]\n getOrderCustomersNotConsistentEq(order: String): [Customer]\n getOrderCustomersNotConsistentLt(order: String): [Customer]\n getOrderCustomersNotConsistentLe(order: String): [Customer]\n getOrderCustomersNotConsistentGt(order: String): [Customer]\n getOrderCustomersNotConsistentGe(order: String): [Customer]\n getOrderCustomersConsistentEq(order: String): [Customer]\n getOrderCustomersConsistentLt(order: String): [Customer]\n getOrderCustomersConsistentLe(order: String): [Customer]\n getOrderCustomersConsistentGt(order: String): [Customer]\n getOrderCustomersConsistentGe(order: String): [Customer]\n getOrderCustomersFilter(order: String, customer: String): [Customer]\n getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer]\n getPayment(id: String): Payment\n getPaymentConsistent(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" } }, "constructInfo": { @@ -358,7 +358,7 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\"}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -393,7 +393,147 @@ "typeName": "Query", "dataSourceName": "Customer", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "responseMappingTemplate": "$util.toJson($ctx.result)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomersNotConsistentResolver": { + "id": "QuerygetCustomersNotConsistentResolver", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersNotConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersNotConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomersNotConsistent", + "typeName": "Query", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": false}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerNotConsistentResolver": { + "id": "QuerygetCustomerNotConsistentResolver", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerNotConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerNotConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerNotConsistent", + "typeName": "Query", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "responseMappingTemplate": "$util.toJson($ctx.result)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomersConsistentResolver": { + "id": "QuerygetCustomersConsistentResolver", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomersConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomersConsistent", + "typeName": "Query", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Scan\", \"consistentRead\": true}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerConsistentResolver": { + "id": "QuerygetCustomerConsistentResolver", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/customerDs/QuerygetCustomerConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerConsistent", + "typeName": "Query", + "dataSourceName": "Customer", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, @@ -721,7 +861,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -756,7 +896,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -791,7 +931,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -826,7 +966,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -861,7 +1001,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -896,7 +1036,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -931,7 +1071,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -966,7 +1106,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1001,7 +1141,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1036,7 +1176,7 @@ "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1051,13 +1191,13 @@ "version": "0.0.0" } }, - "QuerygetCustomerOrdersFilterResolver": { - "id": "QuerygetCustomerOrdersFilterResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver", + "QuerygetCustomerOrdersNotConsistentEqResolver": { + "id": "QuerygetCustomerOrdersNotConsistentEqResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentEqResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentEqResolver/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { @@ -1067,11 +1207,11 @@ "ApiId" ] }, - "fieldName": "getCustomerOrdersFilter", + "fieldName": "getCustomerOrdersNotConsistentEq", "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1086,13 +1226,13 @@ "version": "0.0.0" } }, - "QuerygetCustomerOrdersBetweenResolver": { - "id": "QuerygetCustomerOrdersBetweenResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersBetweenResolver", + "QuerygetOrderCustomersNotConsistentEqResolver": { + "id": "QuerygetOrderCustomersNotConsistentEqResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentEqResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersBetweenResolver/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentEqResolver/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { @@ -1102,11 +1242,11 @@ "ApiId" ] }, - "fieldName": "getCustomerOrdersBetween", + "fieldName": "getOrderCustomersNotConsistentEq", "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1121,13 +1261,13 @@ "version": "0.0.0" } }, - "QuerygetOrderCustomersFilterResolver": { - "id": "QuerygetOrderCustomersFilterResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersFilterResolver", + "QuerygetCustomerOrdersNotConsistentLtResolver": { + "id": "QuerygetCustomerOrdersNotConsistentLtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLtResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersFilterResolver/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLtResolver/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { @@ -1137,11 +1277,11 @@ "ApiId" ] }, - "fieldName": "getOrderCustomersFilter", + "fieldName": "getCustomerOrdersNotConsistentLt", "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1156,13 +1296,13 @@ "version": "0.0.0" } }, - "QuerygetOrderCustomersBetweenResolver": { - "id": "QuerygetOrderCustomersBetweenResolver", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersBetweenResolver", + "QuerygetOrderCustomersNotConsistentLtResolver": { + "id": "QuerygetOrderCustomersNotConsistentLtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLtResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersBetweenResolver/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLtResolver/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { @@ -1172,11 +1312,11 @@ "ApiId" ] }, - "fieldName": "getOrderCustomersBetween", + "fieldName": "getOrderCustomersNotConsistentLt", "typeName": "Query", "dataSourceName": "Order", "kind": "UNIT", - "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, @@ -1190,130 +1330,830 @@ "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", - "version": "0.0.0" - } - }, - "paymentDs": { - "id": "paymentDs", - "path": "aws-appsync-integ/Api/paymentDs", - "children": { - "ServiceRole": { - "id": "ServiceRole", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole", + }, + "QuerygetCustomerOrdersNotConsistentLeResolver": { + "id": "QuerygetCustomerOrdersNotConsistentLeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLeResolver", "children": { "Resource": { "id": "Resource", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentLeResolver/Resource", "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", "aws:cdk:cloudformation:props": { - "assumeRolePolicyDocument": { - "Statement": [ - { - "Action": "sts:AssumeRole", - "Effect": "Allow", - "Principal": { - "Service": "appsync.amazonaws.com" - } - } - ], - "Version": "2012-10-17" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnRole", - "version": "0.0.0" - } - }, - "DefaultPolicy": { - "id": "DefaultPolicy", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy", - "children": { - "Resource": { - "id": "Resource", - "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy/Resource", - "attributes": { - "aws:cdk:cloudformation:type": "AWS::IAM::Policy", - "aws:cdk:cloudformation:props": { - "policyDocument": { - "Statement": [ - { - "Action": [ - "dynamodb:BatchGetItem", - "dynamodb:BatchWriteItem", - "dynamodb:ConditionCheckItem", - "dynamodb:DeleteItem", - "dynamodb:DescribeTable", - "dynamodb:GetItem", - "dynamodb:GetRecords", - "dynamodb:GetShardIterator", - "dynamodb:PutItem", - "dynamodb:Query", - "dynamodb:Scan", - "dynamodb:UpdateItem" - ], - "Effect": "Allow", - "Resource": [ - { - "Fn::Join": [ - "", - [ - "arn:", - { - "Ref": "AWS::Partition" - }, - ":dynamodb:", - { - "Ref": "AWS::Region" - }, - ":", - { - "Ref": "AWS::AccountId" - }, - ":table/PaymentTable" - ] - ] - }, - { - "Ref": "AWS::NoValue" - } - ] - } - ], - "Version": "2012-10-17" - }, - "policyName": "ApipaymentDsServiceRoleDefaultPolicy528E42B0", - "roles": [ - { - "Ref": "ApipaymentDsServiceRole0DAC58D6" - } - ] - } + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] }, - "constructInfo": { - "fqn": "@aws-cdk/aws-iam.CfnPolicy", - "version": "0.0.0" - } + "fieldName": "getCustomerOrdersNotConsistentLe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Policy", + "fqn": "@aws-cdk/aws-appsync.CfnResolver", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/aws-iam.Role", + "fqn": "@aws-cdk/aws-appsync.Resolver", "version": "0.0.0" } }, - "Resource": { - "id": "Resource", + "QuerygetOrderCustomersNotConsistentLeResolver": { + "id": "QuerygetOrderCustomersNotConsistentLeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentLeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersNotConsistentLe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersNotConsistentGtResolver": { + "id": "QuerygetCustomerOrdersNotConsistentGtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersNotConsistentGt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersNotConsistentGtResolver": { + "id": "QuerygetOrderCustomersNotConsistentGtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersNotConsistentGt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersNotConsistentGeResolver": { + "id": "QuerygetCustomerOrdersNotConsistentGeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersNotConsistentGeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersNotConsistentGe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersNotConsistentGeResolver": { + "id": "QuerygetOrderCustomersNotConsistentGeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersNotConsistentGeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersNotConsistentGe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentEqResolver": { + "id": "QuerygetCustomerOrdersConsistentEqResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentEqResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentEqResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentEq", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer = :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentEqResolver": { + "id": "QuerygetOrderCustomersConsistentEqResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentEqResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentEqResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentEq", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentLtResolver": { + "id": "QuerygetCustomerOrdersConsistentLtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentLt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer < :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentLtResolver": { + "id": "QuerygetOrderCustomersConsistentLtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentLt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order < :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentLeResolver": { + "id": "QuerygetCustomerOrdersConsistentLeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentLeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentLe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer <= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentLeResolver": { + "id": "QuerygetOrderCustomersConsistentLeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentLeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentLe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order <= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentGtResolver": { + "id": "QuerygetCustomerOrdersConsistentGtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentGt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer > :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentGtResolver": { + "id": "QuerygetOrderCustomersConsistentGtResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGtResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGtResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentGt", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order > :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersConsistentGeResolver": { + "id": "QuerygetCustomerOrdersConsistentGeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersConsistentGeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersConsistentGe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"query\" : {\n \"expression\" : \"#customer >= :customer\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersConsistentGeResolver": { + "id": "QuerygetOrderCustomersConsistentGeResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGeResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersConsistentGeResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersConsistentGe", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": true, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order >= :order\",\n \"expressionNames\" : {\n \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersFilterResolver": { + "id": "QuerygetCustomerOrdersFilterResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersFilterResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersFilter", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer AND begins_with(#order, :order)\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetCustomerOrdersBetweenResolver": { + "id": "QuerygetCustomerOrdersBetweenResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersBetweenResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetCustomerOrdersBetweenResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getCustomerOrdersBetween", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#customer = :customer AND #order BETWEEN :order1 AND :order2\",\n \"expressionNames\" : {\n \"#customer\" : \"customer\", \"#order\" : \"order\"\n },\n \"expressionValues\" : {\n \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer), \":order1\" : $util.dynamodb.toDynamoDBJson($ctx.args.order1), \":order2\" : $util.dynamodb.toDynamoDBJson($ctx.args.order2)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersFilterResolver": { + "id": "QuerygetOrderCustomersFilterResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersFilterResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersFilterResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersFilter", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"query\" : {\n \"expression\" : \"#order = :order AND begins_with(#customer, :customer)\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetOrderCustomersBetweenResolver": { + "id": "QuerygetOrderCustomersBetweenResolver", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersBetweenResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/orderDs/QuerygetOrderCustomersBetweenResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getOrderCustomersBetween", + "typeName": "Query", + "dataSourceName": "Order", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\" : \"2017-02-28\", \"operation\" : \"Query\", \"consistentRead\": false, \"index\" : \"orderIndex\", \"query\" : {\n \"expression\" : \"#order = :order AND #customer BETWEEN :customer1 AND :customer2\",\n \"expressionNames\" : {\n \"#order\" : \"order\", \"#customer\" : \"customer\"\n },\n \"expressionValues\" : {\n \":order\" : $util.dynamodb.toDynamoDBJson($ctx.args.order), \":customer1\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer1), \":customer2\" : $util.dynamodb.toDynamoDBJson($ctx.args.customer2)\n }\n }}", + "responseMappingTemplate": "$util.toJson($ctx.result.items)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.DynamoDbDataSource", + "version": "0.0.0" + } + }, + "paymentDs": { + "id": "paymentDs", + "path": "aws-appsync-integ/Api/paymentDs", + "children": { + "ServiceRole": { + "id": "ServiceRole", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnRole", + "version": "0.0.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/paymentDs/ServiceRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable", + "dynamodb:GetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:PutItem", + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:UpdateItem" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/PaymentTable" + ] + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "ApipaymentDsServiceRoleDefaultPolicy528E42B0", + "roles": [ + { + "Ref": "ApipaymentDsServiceRole0DAC58D6" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.CfnPolicy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.Policy", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-iam.Role", + "version": "0.0.0" + } + }, + "Resource": { + "id": "Resource", "path": "aws-appsync-integ/Api/paymentDs/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::AppSync::DataSource", @@ -1365,7 +2205,42 @@ "typeName": "Query", "dataSourceName": "Payment", "kind": "UNIT", - "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": false, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", + "responseMappingTemplate": "$util.toJson($ctx.result)" + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.CfnResolver", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-appsync.Resolver", + "version": "0.0.0" + } + }, + "QuerygetPaymentConsistentResolver": { + "id": "QuerygetPaymentConsistentResolver", + "path": "aws-appsync-integ/Api/paymentDs/QuerygetPaymentConsistentResolver", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-appsync-integ/Api/paymentDs/QuerygetPaymentConsistentResolver/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::AppSync::Resolver", + "aws:cdk:cloudformation:props": { + "apiId": { + "Fn::GetAtt": [ + "ApiF70053CD", + "ApiId" + ] + }, + "fieldName": "getPaymentConsistent", + "typeName": "Query", + "dataSourceName": "Payment", + "kind": "UNIT", + "requestMappingTemplate": "{\"version\": \"2017-02-28\", \"operation\": \"GetItem\", \"consistentRead\": true, \"key\": {\"id\": $util.dynamodb.toDynamoDBJson($ctx.args.id)}}", "responseMappingTemplate": "$util.toJson($ctx.result)" } }, diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.graphql b/packages/@aws-cdk/aws-appsync/test/integ.graphql.graphql index 345979e12f169..d418ab54de7a5 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.graphql +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.graphql @@ -28,12 +28,26 @@ input PaymentInput { type Query @aws_api_key { getServiceVersion: ServiceVersion getCustomers: [Customer] + getCustomersNotConsistent: [Customer] + getCustomersConsistent: [Customer] getCustomer(id: String): Customer + getCustomerNotConsistent(id: String): Customer + getCustomerConsistent(id: String): Customer getCustomerOrdersEq(customer: String): Order getCustomerOrdersLt(customer: String): Order getCustomerOrdersLe(customer: String): Order getCustomerOrdersGt(customer: String): Order getCustomerOrdersGe(customer: String): Order + getCustomerOrdersNotConsistentEq(customer: String): Order + getCustomerOrdersNotConsistentLt(customer: String): Order + getCustomerOrdersNotConsistentLe(customer: String): Order + getCustomerOrdersNotConsistentGt(customer: String): Order + getCustomerOrdersNotConsistentGe(customer: String): Order + getCustomerOrdersConsistentEq(customer: String): Order + getCustomerOrdersConsistentLt(customer: String): Order + getCustomerOrdersConsistentLe(customer: String): Order + getCustomerOrdersConsistentGt(customer: String): Order + getCustomerOrdersConsistentGe(customer: String): Order getCustomerOrdersFilter(customer: String, order: String): Order getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order getOrderCustomersEq(order: String): [Customer] @@ -41,9 +55,20 @@ type Query @aws_api_key { getOrderCustomersLe(order: String): [Customer] getOrderCustomersGt(order: String): [Customer] getOrderCustomersGe(order: String): [Customer] + getOrderCustomersNotConsistentEq(order: String): [Customer] + getOrderCustomersNotConsistentLt(order: String): [Customer] + getOrderCustomersNotConsistentLe(order: String): [Customer] + getOrderCustomersNotConsistentGt(order: String): [Customer] + getOrderCustomersNotConsistentGe(order: String): [Customer] + getOrderCustomersConsistentEq(order: String): [Customer] + getOrderCustomersConsistentLt(order: String): [Customer] + getOrderCustomersConsistentLe(order: String): [Customer] + getOrderCustomersConsistentGt(order: String): [Customer] + getOrderCustomersConsistentGe(order: String): [Customer] getOrderCustomersFilter(order: String, customer: String): [Customer] getOrderCustomersBetween(order: String, customer1: String, customer2: String): [Customer] getPayment(id: String): Payment + getPaymentConsistent(id: String): Payment } input FirstOrderInput { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts index b014043b05607..fa0feb5ae2921 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts @@ -123,6 +123,30 @@ customerDS.createResolver({ requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); +customerDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomersNotConsistent', + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(false), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), +}); +customerDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomerNotConsistent', + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', false), + responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), +}); +customerDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomersConsistent', + requestMappingTemplate: MappingTemplate.dynamoDbScanTable(true), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), +}); +customerDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomerConsistent', + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), + responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), +}); customerDS.createResolver({ typeName: 'Mutation', fieldName: 'addCustomer', @@ -175,6 +199,34 @@ for (const { suffix, op } of ops) { responseMappingTemplate: MappingTemplate.dynamoDbResultList(), }); } +for (const { suffix, op } of ops) { + orderDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomerOrdersNotConsistent' + suffix, + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer'), undefined, false), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), + }); + orderDS.createResolver({ + typeName: 'Query', + fieldName: 'getOrderCustomersNotConsistent' + suffix, + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), 'orderIndex', false), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), + }); +} +for (const { suffix, op } of ops) { + orderDS.createResolver({ + typeName: 'Query', + fieldName: 'getCustomerOrdersConsistent' + suffix, + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('customer', 'customer'), undefined, true), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), + }); + orderDS.createResolver({ + typeName: 'Query', + fieldName: 'getOrderCustomersConsistent' + suffix, + requestMappingTemplate: MappingTemplate.dynamoDbQuery(op('order', 'order'), 'orderIndex', true), + responseMappingTemplate: MappingTemplate.dynamoDbResultList(), + }); +} orderDS.createResolver({ typeName: 'Query', fieldName: 'getCustomerOrdersFilter', @@ -210,6 +262,12 @@ paymentDS.createResolver({ requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id'), responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), }); +paymentDS.createResolver({ + typeName: 'Query', + fieldName: 'getPaymentConsistent', + requestMappingTemplate: MappingTemplate.dynamoDbGetItem('id', 'id', true), + responseMappingTemplate: MappingTemplate.dynamoDbResultItem(), +}); paymentDS.createResolver({ typeName: 'Mutation', fieldName: 'savePayment', diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/aws-cdk-expose-metric-integ.template.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/aws-cdk-expose-metric-integ.template.json new file mode 100644 index 0000000000000..e7eb9a1d36239 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/aws-cdk-expose-metric-integ.template.json @@ -0,0 +1,40 @@ +{ + "Resources": { + "LogGroupF5B46931": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MetricFilter1B93B6E5": { + "Type": "AWS::Logs::MetricFilter", + "Properties": { + "FilterPattern": "{ $.latency = \"*\" }", + "LogGroupName": { + "Ref": "LogGroupF5B46931" + }, + "MetricTransformations": [ + { + "MetricName": "Latency", + "MetricNamespace": "MyApp", + "MetricValue": "$.latency" + } + ] + } + }, + "alarmfrommetricfilterF546D67D": { + "Type": "AWS::CloudWatch::Alarm", + "Properties": { + "ComparisonOperator": "GreaterThanOrEqualToThreshold", + "EvaluationPeriods": 2, + "MetricName": "Latency", + "Namespace": "MyApp", + "Period": 300, + "Statistic": "Average", + "Threshold": 100 + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/cdk.out b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/manifest.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/manifest.json new file mode 100644 index 0000000000000..cf68fc96288c3 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/manifest.json @@ -0,0 +1,40 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "aws-cdk-expose-metric-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-expose-metric-integ.template.json", + "validateOnSynth": false + }, + "metadata": { + "/aws-cdk-expose-metric-integ/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LogGroupF5B46931" + } + ], + "/aws-cdk-expose-metric-integ/MetricFilter/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MetricFilter1B93B6E5" + } + ], + "/aws-cdk-expose-metric-integ/alarm from metric filter/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "alarmfrommetricfilterF546D67D" + } + ] + }, + "displayName": "aws-cdk-expose-metric-integ" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/tree.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/tree.json new file mode 100644 index 0000000000000..eaedddae74834 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.expose-metric/tree.json @@ -0,0 +1,119 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "aws-cdk-expose-metric-integ": { + "id": "aws-cdk-expose-metric-integ", + "path": "aws-cdk-expose-metric-integ", + "children": { + "LogGroup": { + "id": "LogGroup", + "path": "aws-cdk-expose-metric-integ/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-expose-metric-integ/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": { + "retentionInDays": 731 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.LogGroup", + "version": "0.0.0" + } + }, + "MetricFilter": { + "id": "MetricFilter", + "path": "aws-cdk-expose-metric-integ/MetricFilter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-expose-metric-integ/MetricFilter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::MetricFilter", + "aws:cdk:cloudformation:props": { + "filterPattern": "{ $.latency = \"*\" }", + "logGroupName": { + "Ref": "LogGroupF5B46931" + }, + "metricTransformations": [ + { + "metricNamespace": "MyApp", + "metricName": "Latency", + "metricValue": "$.latency" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnMetricFilter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.MetricFilter", + "version": "0.0.0" + } + }, + "alarm from metric filter": { + "id": "alarm from metric filter", + "path": "aws-cdk-expose-metric-integ/alarm from metric filter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-expose-metric-integ/alarm from metric filter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudWatch::Alarm", + "aws:cdk:cloudformation:props": { + "comparisonOperator": "GreaterThanOrEqualToThreshold", + "evaluationPeriods": 2, + "metricName": "Latency", + "namespace": "MyApp", + "period": 300, + "statistic": "Average", + "threshold": 100 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.CfnAlarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-cloudwatch.Alarm", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/aws-cdk-metricfilter-integ.template.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/aws-cdk-metricfilter-integ.template.json new file mode 100644 index 0000000000000..0a270d5e39700 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/aws-cdk-metricfilter-integ.template.json @@ -0,0 +1,28 @@ +{ + "Resources": { + "LogGroupF5B46931": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "MetricFilter1B93B6E5": { + "Type": "AWS::Logs::MetricFilter", + "Properties": { + "FilterPattern": "{ $.latency = \"*\" }", + "LogGroupName": { + "Ref": "LogGroupF5B46931" + }, + "MetricTransformations": [ + { + "MetricName": "Latency", + "MetricNamespace": "MyApp", + "MetricValue": "$.latency" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/cdk.out b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/manifest.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/manifest.json new file mode 100644 index 0000000000000..db042c1273be6 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/manifest.json @@ -0,0 +1,34 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "aws-cdk-metricfilter-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-metricfilter-integ.template.json", + "validateOnSynth": false + }, + "metadata": { + "/aws-cdk-metricfilter-integ/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LogGroupF5B46931" + } + ], + "/aws-cdk-metricfilter-integ/MetricFilter/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "MetricFilter1B93B6E5" + } + ] + }, + "displayName": "aws-cdk-metricfilter-integ" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/tree.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/tree.json new file mode 100644 index 0000000000000..3fcb3aeff15c6 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.metricfilter.lit/tree.json @@ -0,0 +1,89 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "aws-cdk-metricfilter-integ": { + "id": "aws-cdk-metricfilter-integ", + "path": "aws-cdk-metricfilter-integ", + "children": { + "LogGroup": { + "id": "LogGroup", + "path": "aws-cdk-metricfilter-integ/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-metricfilter-integ/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": { + "retentionInDays": 731 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.LogGroup", + "version": "0.0.0" + } + }, + "MetricFilter": { + "id": "MetricFilter", + "path": "aws-cdk-metricfilter-integ/MetricFilter", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-metricfilter-integ/MetricFilter/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::MetricFilter", + "aws:cdk:cloudformation:props": { + "filterPattern": "{ $.latency = \"*\" }", + "logGroupName": { + "Ref": "LogGroupF5B46931" + }, + "metricTransformations": [ + { + "metricNamespace": "MyApp", + "metricName": "Latency", + "metricValue": "$.latency" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnMetricFilter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.MetricFilter", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/aws-cdk-logs-querydefinition-integ.template.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/aws-cdk-logs-querydefinition-integ.template.json new file mode 100644 index 0000000000000..3429e2b6319f6 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/aws-cdk-logs-querydefinition-integ.template.json @@ -0,0 +1,24 @@ +{ + "Resources": { + "LogGroupF5B46931": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "RetentionInDays": 731 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "QueryDefinition4190BC36": { + "Type": "AWS::Logs::QueryDefinition", + "Properties": { + "Name": "QueryDefinition", + "QueryString": "fields @timestamp, @message | parse @message \"[*] *\" as loggingType, loggingMessage | filter loggingType = \"ERROR\" | sort @timestamp desc | limit 20 | display loggingMessage", + "LogGroupNames": [ + { + "Ref": "LogGroupF5B46931" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/cdk.out b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/cdk.out new file mode 100644 index 0000000000000..588d7b269d34f --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/cdk.out @@ -0,0 +1 @@ +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/manifest.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/manifest.json new file mode 100644 index 0000000000000..f6c4f733a1113 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/manifest.json @@ -0,0 +1,34 @@ +{ + "version": "20.0.0", + "artifacts": { + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + }, + "aws-cdk-logs-querydefinition-integ": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-logs-querydefinition-integ.template.json", + "validateOnSynth": false + }, + "metadata": { + "/aws-cdk-logs-querydefinition-integ/LogGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "LogGroupF5B46931" + } + ], + "/aws-cdk-logs-querydefinition-integ/QueryDefinition/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "QueryDefinition4190BC36" + } + ] + }, + "displayName": "aws-cdk-logs-querydefinition-integ" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/tree.json b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/tree.json new file mode 100644 index 0000000000000..95f99f2d55cd7 --- /dev/null +++ b/packages/@aws-cdk/aws-logs/test/cdk-integ.out.save-logs-insights-query-definition/tree.json @@ -0,0 +1,85 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.33" + } + }, + "aws-cdk-logs-querydefinition-integ": { + "id": "aws-cdk-logs-querydefinition-integ", + "path": "aws-cdk-logs-querydefinition-integ", + "children": { + "LogGroup": { + "id": "LogGroup", + "path": "aws-cdk-logs-querydefinition-integ/LogGroup", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-logs-querydefinition-integ/LogGroup/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup", + "aws:cdk:cloudformation:props": { + "retentionInDays": 731 + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnLogGroup", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.LogGroup", + "version": "0.0.0" + } + }, + "QueryDefinition": { + "id": "QueryDefinition", + "path": "aws-cdk-logs-querydefinition-integ/QueryDefinition", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-logs-querydefinition-integ/QueryDefinition/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Logs::QueryDefinition", + "aws:cdk:cloudformation:props": { + "name": "QueryDefinition", + "queryString": "fields @timestamp, @message | parse @message \"[*] *\" as loggingType, loggingMessage | filter loggingType = \"ERROR\" | sort @timestamp desc | limit 20 | display loggingMessage", + "logGroupNames": [ + { + "Ref": "LogGroupF5B46931" + } + ] + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.CfnQueryDefinition", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/aws-logs.QueryDefinition", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/core.App", + "version": "0.0.0" + } + } +} \ No newline at end of file