aws-sdk-appsync 1.52.0 → 1.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8305b019344d7d276bb1fec66b081ffe0839c485965f1108bbbaabd44024643
4
- data.tar.gz: 40f2e3d8c3b06416f4de0f0c7e8736771d125541fa0d514f87d422424b4ceea0
3
+ metadata.gz: f6bb3b1213c9276ebaa27df3de7501459ffe5f3c59efe049d6a4fc70cf12837c
4
+ data.tar.gz: 349661d189e4505c276b3a7b93bb0c21d21d79eca547e6ad5da5f5b0a03d7786
5
5
  SHA512:
6
- metadata.gz: 7a7031121b69a61c27df7dfcc2b8c4d87a51b8ab284d5b0de7c0f3fafa27ef4c5264fc9a9816154a236ddab66ea84f26e17e9c3640ef96160fa4a3fff2359ee0
7
- data.tar.gz: f283e13b6cbec57d5c86820140711f2e8db93d8a2b1b9f6302bb6d9ae189685c7d4aaa397975cb1ad50b901ba310ee36da9c87530391888478f23083e7e6681c
6
+ metadata.gz: bc4e4858a3c3aa4e1f9097e286d02dccb6a7991e7ffdb5c6622e85b8c5045200503bff14dffa9f9eddb52c60a72928006f2b54b0f860c4ecda3e6b59512f4ac5
7
+ data.tar.gz: 4d1abe6238982bf4dde0a9a433e40c40d800b034caace6851970911c7f1f8a609fb99b6806a8d5ac828f83a0797c041bd4a4fd7571358a93a4c01177d4f43cce
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.53.0 (2022-07-26)
5
+ ------------------
6
+
7
+ * Feature - Adds support for a new API to evaluate mapping templates with mock data, allowing you to remotely unit test your AppSync resolvers and functions.
8
+
4
9
  1.52.0 (2022-02-24)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.52.0
1
+ 1.53.0
@@ -1010,7 +1010,7 @@ module Aws::AppSync
1010
1010
  # },
1011
1011
  # },
1012
1012
  # caching_config: {
1013
- # ttl: 1,
1013
+ # ttl: 1, # required
1014
1014
  # caching_keys: ["String"],
1015
1015
  # },
1016
1016
  # max_batch_size: 1,
@@ -1313,6 +1313,51 @@ module Aws::AppSync
1313
1313
  req.send_request(options)
1314
1314
  end
1315
1315
 
1316
+ # Evaluates a given template and returns the response. The mapping
1317
+ # template can be a request or response template.
1318
+ #
1319
+ # Request templates take the incoming request after a GraphQL operation
1320
+ # is parsed and convert it into a request configuration for the selected
1321
+ # data source operation. Response templates interpret responses from the
1322
+ # data source and map it to the shape of the GraphQL field output type.
1323
+ #
1324
+ # Mapping templates are written in the Apache Velocity Template Language
1325
+ # (VTL).
1326
+ #
1327
+ # @option params [required, String] :template
1328
+ # The mapping template; this can be a request or response template. A
1329
+ # `template` is required for this action.
1330
+ #
1331
+ # @option params [required, String] :context
1332
+ # The map that holds all of the contextual information for your resolver
1333
+ # invocation. A `context` is required for this action.
1334
+ #
1335
+ # @return [Types::EvaluateMappingTemplateResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1336
+ #
1337
+ # * {Types::EvaluateMappingTemplateResponse#evaluation_result #evaluation_result} => String
1338
+ # * {Types::EvaluateMappingTemplateResponse#error #error} => Types::ErrorDetail
1339
+ #
1340
+ # @example Request syntax with placeholder values
1341
+ #
1342
+ # resp = client.evaluate_mapping_template({
1343
+ # template: "Template", # required
1344
+ # context: "Context", # required
1345
+ # })
1346
+ #
1347
+ # @example Response structure
1348
+ #
1349
+ # resp.evaluation_result #=> String
1350
+ # resp.error.message #=> String
1351
+ #
1352
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/EvaluateMappingTemplate AWS API Documentation
1353
+ #
1354
+ # @overload evaluate_mapping_template(params = {})
1355
+ # @param [Hash] params ({})
1356
+ def evaluate_mapping_template(params = {}, options = {})
1357
+ req = build_request(:evaluate_mapping_template, params)
1358
+ req.send_request(options)
1359
+ end
1360
+
1316
1361
  # Flushes an `ApiCache` object.
1317
1362
  #
1318
1363
  # @option params [required, String] :api_id
@@ -2925,7 +2970,7 @@ module Aws::AppSync
2925
2970
  # },
2926
2971
  # },
2927
2972
  # caching_config: {
2928
- # ttl: 1,
2973
+ # ttl: 1, # required
2929
2974
  # caching_keys: ["String"],
2930
2975
  # },
2931
2976
  # max_batch_size: 1,
@@ -3016,7 +3061,7 @@ module Aws::AppSync
3016
3061
  params: params,
3017
3062
  config: config)
3018
3063
  context[:gem_name] = 'aws-sdk-appsync'
3019
- context[:gem_version] = '1.52.0'
3064
+ context[:gem_version] = '1.53.0'
3020
3065
  Seahorse::Client::Request.new(handlers, context)
3021
3066
  end
3022
3067
 
@@ -44,6 +44,7 @@ module Aws::AppSync
44
44
  ConcurrentModificationException = Shapes::StructureShape.new(name: 'ConcurrentModificationException')
45
45
  ConflictDetectionType = Shapes::StringShape.new(name: 'ConflictDetectionType')
46
46
  ConflictHandlerType = Shapes::StringShape.new(name: 'ConflictHandlerType')
47
+ Context = Shapes::StringShape.new(name: 'Context')
47
48
  CreateApiCacheRequest = Shapes::StructureShape.new(name: 'CreateApiCacheRequest')
48
49
  CreateApiCacheResponse = Shapes::StructureShape.new(name: 'CreateApiCacheResponse')
49
50
  CreateApiKeyRequest = Shapes::StructureShape.new(name: 'CreateApiKeyRequest')
@@ -89,7 +90,11 @@ module Aws::AppSync
89
90
  DomainNameConfigs = Shapes::ListShape.new(name: 'DomainNameConfigs')
90
91
  DynamodbDataSourceConfig = Shapes::StructureShape.new(name: 'DynamodbDataSourceConfig')
91
92
  ElasticsearchDataSourceConfig = Shapes::StructureShape.new(name: 'ElasticsearchDataSourceConfig')
93
+ ErrorDetail = Shapes::StructureShape.new(name: 'ErrorDetail')
92
94
  ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
95
+ EvaluateMappingTemplateRequest = Shapes::StructureShape.new(name: 'EvaluateMappingTemplateRequest')
96
+ EvaluateMappingTemplateResponse = Shapes::StructureShape.new(name: 'EvaluateMappingTemplateResponse')
97
+ EvaluationResult = Shapes::StringShape.new(name: 'EvaluationResult')
93
98
  FieldLogLevel = Shapes::StringShape.new(name: 'FieldLogLevel')
94
99
  FlushApiCacheRequest = Shapes::StructureShape.new(name: 'FlushApiCacheRequest')
95
100
  FlushApiCacheResponse = Shapes::StructureShape.new(name: 'FlushApiCacheResponse')
@@ -175,6 +180,7 @@ module Aws::AppSync
175
180
  TagResourceRequest = Shapes::StructureShape.new(name: 'TagResourceRequest')
176
181
  TagResourceResponse = Shapes::StructureShape.new(name: 'TagResourceResponse')
177
182
  TagValue = Shapes::StringShape.new(name: 'TagValue')
183
+ Template = Shapes::StringShape.new(name: 'Template')
178
184
  Type = Shapes::StructureShape.new(name: 'Type')
179
185
  TypeDefinitionFormat = Shapes::StringShape.new(name: 'TypeDefinitionFormat')
180
186
  TypeList = Shapes::ListShape.new(name: 'TypeList')
@@ -259,7 +265,7 @@ module Aws::AppSync
259
265
  BadRequestException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
260
266
  BadRequestException.struct_class = Types::BadRequestException
261
267
 
262
- CachingConfig.add_member(:ttl, Shapes::ShapeRef.new(shape: Long, location_name: "ttl"))
268
+ CachingConfig.add_member(:ttl, Shapes::ShapeRef.new(shape: Long, required: true, location_name: "ttl"))
263
269
  CachingConfig.add_member(:caching_keys, Shapes::ShapeRef.new(shape: CachingKeys, location_name: "cachingKeys"))
264
270
  CachingConfig.struct_class = Types::CachingConfig
265
271
 
@@ -459,6 +465,17 @@ module Aws::AppSync
459
465
  ElasticsearchDataSourceConfig.add_member(:aws_region, Shapes::ShapeRef.new(shape: String, required: true, location_name: "awsRegion"))
460
466
  ElasticsearchDataSourceConfig.struct_class = Types::ElasticsearchDataSourceConfig
461
467
 
468
+ ErrorDetail.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
469
+ ErrorDetail.struct_class = Types::ErrorDetail
470
+
471
+ EvaluateMappingTemplateRequest.add_member(:template, Shapes::ShapeRef.new(shape: Template, required: true, location_name: "template"))
472
+ EvaluateMappingTemplateRequest.add_member(:context, Shapes::ShapeRef.new(shape: Context, required: true, location_name: "context"))
473
+ EvaluateMappingTemplateRequest.struct_class = Types::EvaluateMappingTemplateRequest
474
+
475
+ EvaluateMappingTemplateResponse.add_member(:evaluation_result, Shapes::ShapeRef.new(shape: EvaluationResult, location_name: "evaluationResult"))
476
+ EvaluateMappingTemplateResponse.add_member(:error, Shapes::ShapeRef.new(shape: ErrorDetail, location_name: "error"))
477
+ EvaluateMappingTemplateResponse.struct_class = Types::EvaluateMappingTemplateResponse
478
+
462
479
  FlushApiCacheRequest.add_member(:api_id, Shapes::ShapeRef.new(shape: String, required: true, location: "uri", location_name: "apiId"))
463
480
  FlushApiCacheRequest.struct_class = Types::FlushApiCacheRequest
464
481
 
@@ -1113,6 +1130,17 @@ module Aws::AppSync
1113
1130
  o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1114
1131
  end)
1115
1132
 
1133
+ api.add_operation(:evaluate_mapping_template, Seahorse::Model::Operation.new.tap do |o|
1134
+ o.name = "EvaluateMappingTemplate"
1135
+ o.http_method = "POST"
1136
+ o.http_request_uri = "/v1/dataplane-evaluatetemplate"
1137
+ o.input = Shapes::ShapeRef.new(shape: EvaluateMappingTemplateRequest)
1138
+ o.output = Shapes::ShapeRef.new(shape: EvaluateMappingTemplateResponse)
1139
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
1140
+ o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
1141
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
1142
+ end)
1143
+
1116
1144
  api.add_operation(:flush_api_cache, Seahorse::Model::Operation.new.tap do |o|
1117
1145
  o.name = "FlushApiCache"
1118
1146
  o.http_method = "DELETE"
@@ -446,7 +446,7 @@ module Aws::AppSync
446
446
  # data as a hash:
447
447
  #
448
448
  # {
449
- # ttl: 1,
449
+ # ttl: 1, # required
450
450
  # caching_keys: ["String"],
451
451
  # }
452
452
  #
@@ -493,7 +493,8 @@ module Aws::AppSync
493
493
  #
494
494
  # @!attribute [rw] app_id_client_regex
495
495
  # A regular expression for validating the incoming Amazon Cognito user
496
- # pool app client ID.
496
+ # pool app client ID. If this value isn't set, no filtering is
497
+ # applied.
497
498
  # @return [String]
498
499
  #
499
500
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CognitoUserPoolConfig AWS API Documentation
@@ -1089,7 +1090,7 @@ module Aws::AppSync
1089
1090
  # },
1090
1091
  # },
1091
1092
  # caching_config: {
1092
- # ttl: 1,
1093
+ # ttl: 1, # required
1093
1094
  # caching_keys: ["String"],
1094
1095
  # },
1095
1096
  # max_batch_size: 1,
@@ -1722,6 +1723,65 @@ module Aws::AppSync
1722
1723
  include Aws::Structure
1723
1724
  end
1724
1725
 
1726
+ # Contains the list of errors generated when attempting to evaluate a
1727
+ # mapping template.
1728
+ #
1729
+ # @!attribute [rw] message
1730
+ # The error payload.
1731
+ # @return [String]
1732
+ #
1733
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ErrorDetail AWS API Documentation
1734
+ #
1735
+ class ErrorDetail < Struct.new(
1736
+ :message)
1737
+ SENSITIVE = []
1738
+ include Aws::Structure
1739
+ end
1740
+
1741
+ # @note When making an API call, you may pass EvaluateMappingTemplateRequest
1742
+ # data as a hash:
1743
+ #
1744
+ # {
1745
+ # template: "Template", # required
1746
+ # context: "Context", # required
1747
+ # }
1748
+ #
1749
+ # @!attribute [rw] template
1750
+ # The mapping template; this can be a request or response template. A
1751
+ # `template` is required for this action.
1752
+ # @return [String]
1753
+ #
1754
+ # @!attribute [rw] context
1755
+ # The map that holds all of the contextual information for your
1756
+ # resolver invocation. A `context` is required for this action.
1757
+ # @return [String]
1758
+ #
1759
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/EvaluateMappingTemplateRequest AWS API Documentation
1760
+ #
1761
+ class EvaluateMappingTemplateRequest < Struct.new(
1762
+ :template,
1763
+ :context)
1764
+ SENSITIVE = []
1765
+ include Aws::Structure
1766
+ end
1767
+
1768
+ # @!attribute [rw] evaluation_result
1769
+ # The mapping template; this can be a request or response template.
1770
+ # @return [String]
1771
+ #
1772
+ # @!attribute [rw] error
1773
+ # The `ErrorDetail` object.
1774
+ # @return [Types::ErrorDetail]
1775
+ #
1776
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/EvaluateMappingTemplateResponse AWS API Documentation
1777
+ #
1778
+ class EvaluateMappingTemplateResponse < Struct.new(
1779
+ :evaluation_result,
1780
+ :error)
1781
+ SENSITIVE = []
1782
+ include Aws::Structure
1783
+ end
1784
+
1725
1785
  # Represents the input of a `FlushApiCache` operation.
1726
1786
  #
1727
1787
  # @note When making an API call, you may pass FlushApiCacheRequest
@@ -3960,7 +4020,7 @@ module Aws::AppSync
3960
4020
  # },
3961
4021
  # },
3962
4022
  # caching_config: {
3963
- # ttl: 1,
4023
+ # ttl: 1, # required
3964
4024
  # caching_keys: ["String"],
3965
4025
  # },
3966
4026
  # max_batch_size: 1,
@@ -4134,7 +4194,8 @@ module Aws::AppSync
4134
4194
  #
4135
4195
  # @!attribute [rw] app_id_client_regex
4136
4196
  # A regular expression for validating the incoming Amazon Cognito user
4137
- # pool app client ID.
4197
+ # pool app client ID. If this value isn't set, no filtering is
4198
+ # applied.
4138
4199
  # @return [String]
4139
4200
  #
4140
4201
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UserPoolConfig AWS API Documentation
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-appsync/customizations'
48
48
  # @!group service
49
49
  module Aws::AppSync
50
50
 
51
- GEM_VERSION = '1.52.0'
51
+ GEM_VERSION = '1.53.0'
52
52
 
53
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-appsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.52.0
4
+ version: 1.53.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-24 00:00:00.000000000 Z
11
+ date: 2022-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core