aws-sdk-appsync 1.54.0 → 1.55.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccaf517cf44c0b4c457edcdb0c49b89adc1054388ba6a9bbcb25095f0a0425e7
4
- data.tar.gz: e02a12c93bea9f24dcf16f851afb5d5da157d295e6a67976ef27a5cca6790469
3
+ metadata.gz: 7afda6f6928ee3b39ff7d9afeba5d41574d681060ff951481394fc5764e3f9c3
4
+ data.tar.gz: efacad4a3bd6f7b6b87ae9364a0af4302975b1c1bfaf687c49d412794941c465
5
5
  SHA512:
6
- metadata.gz: 702bb146e201991ad285f53d64b47c15348b136f7cfd955ddbe1d060c25142511422e312bcf956f7d42df0cd8953fd81336c5628c6163f01040bd91d5aa53eab
7
- data.tar.gz: 1d089da1592c47f64f5712e41be7b899c6b770eee91a8905a2cd880d6afc2f998407e81b3a5960e65ce071f7bfc5239ed828c4da65a15f07147d2ab3ec7a03d2
6
+ metadata.gz: 64122af77659d98b4665391308d30bfc48b38b3366c65669e81031197f0b534306560180241068a594d43416c27c671cd2802252cf26d39ed6ce0b95dc0440c5
7
+ data.tar.gz: 39825b2ec0088328fd9728a7c520665ece841e9e7531f7bc4dcf8c41c7764b3e4ec0ebee72638811f13e54aad307c0fc5d66be20bf1650d72c90fed33dc05250
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.55.0 (2022-11-17)
5
+ ------------------
6
+
7
+ * Feature - This release introduces the APPSYNC_JS runtime, and adds support for JavaScript in AppSync functions and AppSync pipeline resolvers.
8
+
4
9
  1.54.0 (2022-10-25)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.54.0
1
+ 1.55.0
@@ -748,9 +748,10 @@ module Aws::AppSync
748
748
  # @option params [String] :response_mapping_template
749
749
  # The `Function` response mapping template.
750
750
  #
751
- # @option params [required, String] :function_version
751
+ # @option params [String] :function_version
752
752
  # The `version` of the request mapping template. Currently, the
753
- # supported value is 2018-05-29.
753
+ # supported value is 2018-05-29. Note that when using VTL and mapping
754
+ # templates, the `functionVersion` is required.
754
755
  #
755
756
  # @option params [Types::SyncConfig] :sync_config
756
757
  # Describes a Sync configuration for a resolver.
@@ -761,6 +762,16 @@ module Aws::AppSync
761
762
  # @option params [Integer] :max_batch_size
762
763
  # The maximum batching size for a resolver.
763
764
  #
765
+ # @option params [Types::AppSyncRuntime] :runtime
766
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
767
+ # AppSync function. Specifies the name and version of the runtime to
768
+ # use. Note that if a runtime is specified, code must also be specified.
769
+ #
770
+ # @option params [String] :code
771
+ # The `function` code that contains the request and response functions.
772
+ # When code is used, the `runtime` is required. The `runtime` value must
773
+ # be `APPSYNC_JS`.
774
+ #
764
775
  # @return [Types::CreateFunctionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
765
776
  #
766
777
  # * {Types::CreateFunctionResponse#function_configuration #function_configuration} => Types::FunctionConfiguration
@@ -774,7 +785,7 @@ module Aws::AppSync
774
785
  # data_source_name: "ResourceName", # required
775
786
  # request_mapping_template: "MappingTemplate",
776
787
  # response_mapping_template: "MappingTemplate",
777
- # function_version: "String", # required
788
+ # function_version: "String",
778
789
  # sync_config: {
779
790
  # conflict_handler: "OPTIMISTIC_CONCURRENCY", # accepts OPTIMISTIC_CONCURRENCY, LAMBDA, AUTOMERGE, NONE
780
791
  # conflict_detection: "VERSION", # accepts VERSION, NONE
@@ -783,6 +794,11 @@ module Aws::AppSync
783
794
  # },
784
795
  # },
785
796
  # max_batch_size: 1,
797
+ # runtime: {
798
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
799
+ # runtime_version: "String", # required
800
+ # },
801
+ # code: "Code",
786
802
  # })
787
803
  #
788
804
  # @example Response structure
@@ -799,6 +815,9 @@ module Aws::AppSync
799
815
  # resp.function_configuration.sync_config.conflict_detection #=> String, one of "VERSION", "NONE"
800
816
  # resp.function_configuration.sync_config.lambda_conflict_handler_config.lambda_conflict_handler_arn #=> String
801
817
  # resp.function_configuration.max_batch_size #=> Integer
818
+ # resp.function_configuration.runtime.name #=> String, one of "APPSYNC_JS"
819
+ # resp.function_configuration.runtime.runtime_version #=> String
820
+ # resp.function_configuration.code #=> String
802
821
  #
803
822
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateFunction AWS API Documentation
804
823
  #
@@ -1002,6 +1021,16 @@ module Aws::AppSync
1002
1021
  # @option params [Integer] :max_batch_size
1003
1022
  # The maximum batching size for a resolver.
1004
1023
  #
1024
+ # @option params [Types::AppSyncRuntime] :runtime
1025
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
1026
+ # AppSync function. Specifies the name and version of the runtime to
1027
+ # use. Note that if a runtime is specified, code must also be specified.
1028
+ #
1029
+ # @option params [String] :code
1030
+ # The `resolver` code that contains the request and response functions.
1031
+ # When code is used, the `runtime` is required. The `runtime` value must
1032
+ # be `APPSYNC_JS`.
1033
+ #
1005
1034
  # @return [Types::CreateResolverResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1006
1035
  #
1007
1036
  # * {Types::CreateResolverResponse#resolver #resolver} => Types::Resolver
@@ -1031,6 +1060,11 @@ module Aws::AppSync
1031
1060
  # caching_keys: ["String"],
1032
1061
  # },
1033
1062
  # max_batch_size: 1,
1063
+ # runtime: {
1064
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
1065
+ # runtime_version: "String", # required
1066
+ # },
1067
+ # code: "Code",
1034
1068
  # })
1035
1069
  #
1036
1070
  # @example Response structure
@@ -1051,6 +1085,9 @@ module Aws::AppSync
1051
1085
  # resp.resolver.caching_config.caching_keys #=> Array
1052
1086
  # resp.resolver.caching_config.caching_keys[0] #=> String
1053
1087
  # resp.resolver.max_batch_size #=> Integer
1088
+ # resp.resolver.runtime.name #=> String, one of "APPSYNC_JS"
1089
+ # resp.resolver.runtime.runtime_version #=> String
1090
+ # resp.resolver.code #=> String
1054
1091
  #
1055
1092
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateResolver AWS API Documentation
1056
1093
  #
@@ -1330,6 +1367,72 @@ module Aws::AppSync
1330
1367
  req.send_request(options)
1331
1368
  end
1332
1369
 
1370
+ # Evaluates the given code and returns the response. The code definition
1371
+ # requirements depend on the specified runtime. For `APPSYNC_JS`
1372
+ # runtimes, the code defines the request and response functions. The
1373
+ # request function takes the incoming request after a GraphQL operation
1374
+ # is parsed and converts it into a request configuration for the
1375
+ # selected data source operation. The response function interprets
1376
+ # responses from the data source and maps it to the shape of the GraphQL
1377
+ # field output type.
1378
+ #
1379
+ # @option params [required, Types::AppSyncRuntime] :runtime
1380
+ # The runtime to be used when evaluating the code. Currently, only the
1381
+ # `APPSYNC_JS` runtime is supported.
1382
+ #
1383
+ # @option params [required, String] :code
1384
+ # The code definition to be evaluated. Note that `code` and `runtime`
1385
+ # are both required for this action. The `runtime` value must be
1386
+ # `APPSYNC_JS`.
1387
+ #
1388
+ # @option params [required, String] :context
1389
+ # The map that holds all of the contextual information for your resolver
1390
+ # invocation. A `context` is required for this action.
1391
+ #
1392
+ # @option params [String] :function
1393
+ # The function within the code to be evaluated. If provided, the valid
1394
+ # values are `request` and `response`.
1395
+ #
1396
+ # @return [Types::EvaluateCodeResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1397
+ #
1398
+ # * {Types::EvaluateCodeResponse#evaluation_result #evaluation_result} => String
1399
+ # * {Types::EvaluateCodeResponse#error #error} => Types::EvaluateCodeErrorDetail
1400
+ # * {Types::EvaluateCodeResponse#logs #logs} => Array<String>
1401
+ #
1402
+ # @example Request syntax with placeholder values
1403
+ #
1404
+ # resp = client.evaluate_code({
1405
+ # runtime: { # required
1406
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
1407
+ # runtime_version: "String", # required
1408
+ # },
1409
+ # code: "Code", # required
1410
+ # context: "Context", # required
1411
+ # function: "String",
1412
+ # })
1413
+ #
1414
+ # @example Response structure
1415
+ #
1416
+ # resp.evaluation_result #=> String
1417
+ # resp.error.message #=> String
1418
+ # resp.error.code_errors #=> Array
1419
+ # resp.error.code_errors[0].error_type #=> String
1420
+ # resp.error.code_errors[0].value #=> String
1421
+ # resp.error.code_errors[0].location.line #=> Integer
1422
+ # resp.error.code_errors[0].location.column #=> Integer
1423
+ # resp.error.code_errors[0].location.span #=> Integer
1424
+ # resp.logs #=> Array
1425
+ # resp.logs[0] #=> String
1426
+ #
1427
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/EvaluateCode AWS API Documentation
1428
+ #
1429
+ # @overload evaluate_code(params = {})
1430
+ # @param [Hash] params ({})
1431
+ def evaluate_code(params = {}, options = {})
1432
+ req = build_request(:evaluate_code, params)
1433
+ req.send_request(options)
1434
+ end
1435
+
1333
1436
  # Evaluates a given template and returns the response. The mapping
1334
1437
  # template can be a request or response template.
1335
1438
  #
@@ -1353,6 +1456,7 @@ module Aws::AppSync
1353
1456
  #
1354
1457
  # * {Types::EvaluateMappingTemplateResponse#evaluation_result #evaluation_result} => String
1355
1458
  # * {Types::EvaluateMappingTemplateResponse#error #error} => Types::ErrorDetail
1459
+ # * {Types::EvaluateMappingTemplateResponse#logs #logs} => Array<String>
1356
1460
  #
1357
1461
  # @example Request syntax with placeholder values
1358
1462
  #
@@ -1365,6 +1469,8 @@ module Aws::AppSync
1365
1469
  #
1366
1470
  # resp.evaluation_result #=> String
1367
1471
  # resp.error.message #=> String
1472
+ # resp.logs #=> Array
1473
+ # resp.logs[0] #=> String
1368
1474
  #
1369
1475
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/EvaluateMappingTemplate AWS API Documentation
1370
1476
  #
@@ -1584,6 +1690,9 @@ module Aws::AppSync
1584
1690
  # resp.function_configuration.sync_config.conflict_detection #=> String, one of "VERSION", "NONE"
1585
1691
  # resp.function_configuration.sync_config.lambda_conflict_handler_config.lambda_conflict_handler_arn #=> String
1586
1692
  # resp.function_configuration.max_batch_size #=> Integer
1693
+ # resp.function_configuration.runtime.name #=> String, one of "APPSYNC_JS"
1694
+ # resp.function_configuration.runtime.runtime_version #=> String
1695
+ # resp.function_configuration.code #=> String
1587
1696
  #
1588
1697
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetFunction AWS API Documentation
1589
1698
  #
@@ -1735,6 +1844,9 @@ module Aws::AppSync
1735
1844
  # resp.resolver.caching_config.caching_keys #=> Array
1736
1845
  # resp.resolver.caching_config.caching_keys[0] #=> String
1737
1846
  # resp.resolver.max_batch_size #=> Integer
1847
+ # resp.resolver.runtime.name #=> String, one of "APPSYNC_JS"
1848
+ # resp.resolver.runtime.runtime_version #=> String
1849
+ # resp.resolver.code #=> String
1738
1850
  #
1739
1851
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetResolver AWS API Documentation
1740
1852
  #
@@ -2013,6 +2125,9 @@ module Aws::AppSync
2013
2125
  # resp.functions[0].sync_config.conflict_detection #=> String, one of "VERSION", "NONE"
2014
2126
  # resp.functions[0].sync_config.lambda_conflict_handler_config.lambda_conflict_handler_arn #=> String
2015
2127
  # resp.functions[0].max_batch_size #=> Integer
2128
+ # resp.functions[0].runtime.name #=> String, one of "APPSYNC_JS"
2129
+ # resp.functions[0].runtime.runtime_version #=> String
2130
+ # resp.functions[0].code #=> String
2016
2131
  # resp.next_token #=> String
2017
2132
  #
2018
2133
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListFunctions AWS API Documentation
@@ -2145,6 +2260,9 @@ module Aws::AppSync
2145
2260
  # resp.resolvers[0].caching_config.caching_keys #=> Array
2146
2261
  # resp.resolvers[0].caching_config.caching_keys[0] #=> String
2147
2262
  # resp.resolvers[0].max_batch_size #=> Integer
2263
+ # resp.resolvers[0].runtime.name #=> String, one of "APPSYNC_JS"
2264
+ # resp.resolvers[0].runtime.runtime_version #=> String
2265
+ # resp.resolvers[0].code #=> String
2148
2266
  # resp.next_token #=> String
2149
2267
  #
2150
2268
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolvers AWS API Documentation
@@ -2205,6 +2323,9 @@ module Aws::AppSync
2205
2323
  # resp.resolvers[0].caching_config.caching_keys #=> Array
2206
2324
  # resp.resolvers[0].caching_config.caching_keys[0] #=> String
2207
2325
  # resp.resolvers[0].max_batch_size #=> Integer
2326
+ # resp.resolvers[0].runtime.name #=> String, one of "APPSYNC_JS"
2327
+ # resp.resolvers[0].runtime.runtime_version #=> String
2328
+ # resp.resolvers[0].code #=> String
2208
2329
  # resp.next_token #=> String
2209
2330
  #
2210
2331
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolversByFunction AWS API Documentation
@@ -2713,9 +2834,10 @@ module Aws::AppSync
2713
2834
  # @option params [String] :response_mapping_template
2714
2835
  # The `Function` request mapping template.
2715
2836
  #
2716
- # @option params [required, String] :function_version
2837
+ # @option params [String] :function_version
2717
2838
  # The `version` of the request mapping template. Currently, the
2718
- # supported value is 2018-05-29.
2839
+ # supported value is 2018-05-29. Note that when using VTL and mapping
2840
+ # templates, the `functionVersion` is required.
2719
2841
  #
2720
2842
  # @option params [Types::SyncConfig] :sync_config
2721
2843
  # Describes a Sync configuration for a resolver.
@@ -2726,6 +2848,16 @@ module Aws::AppSync
2726
2848
  # @option params [Integer] :max_batch_size
2727
2849
  # The maximum batching size for a resolver.
2728
2850
  #
2851
+ # @option params [Types::AppSyncRuntime] :runtime
2852
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
2853
+ # AppSync function. Specifies the name and version of the runtime to
2854
+ # use. Note that if a runtime is specified, code must also be specified.
2855
+ #
2856
+ # @option params [String] :code
2857
+ # The `function` code that contains the request and response functions.
2858
+ # When code is used, the `runtime` is required. The `runtime` value must
2859
+ # be `APPSYNC_JS`.
2860
+ #
2729
2861
  # @return [Types::UpdateFunctionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2730
2862
  #
2731
2863
  # * {Types::UpdateFunctionResponse#function_configuration #function_configuration} => Types::FunctionConfiguration
@@ -2740,7 +2872,7 @@ module Aws::AppSync
2740
2872
  # data_source_name: "ResourceName", # required
2741
2873
  # request_mapping_template: "MappingTemplate",
2742
2874
  # response_mapping_template: "MappingTemplate",
2743
- # function_version: "String", # required
2875
+ # function_version: "String",
2744
2876
  # sync_config: {
2745
2877
  # conflict_handler: "OPTIMISTIC_CONCURRENCY", # accepts OPTIMISTIC_CONCURRENCY, LAMBDA, AUTOMERGE, NONE
2746
2878
  # conflict_detection: "VERSION", # accepts VERSION, NONE
@@ -2749,6 +2881,11 @@ module Aws::AppSync
2749
2881
  # },
2750
2882
  # },
2751
2883
  # max_batch_size: 1,
2884
+ # runtime: {
2885
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
2886
+ # runtime_version: "String", # required
2887
+ # },
2888
+ # code: "Code",
2752
2889
  # })
2753
2890
  #
2754
2891
  # @example Response structure
@@ -2765,6 +2902,9 @@ module Aws::AppSync
2765
2902
  # resp.function_configuration.sync_config.conflict_detection #=> String, one of "VERSION", "NONE"
2766
2903
  # resp.function_configuration.sync_config.lambda_conflict_handler_config.lambda_conflict_handler_arn #=> String
2767
2904
  # resp.function_configuration.max_batch_size #=> Integer
2905
+ # resp.function_configuration.runtime.name #=> String, one of "APPSYNC_JS"
2906
+ # resp.function_configuration.runtime.runtime_version #=> String
2907
+ # resp.function_configuration.code #=> String
2768
2908
  #
2769
2909
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateFunction AWS API Documentation
2770
2910
  #
@@ -2962,6 +3102,16 @@ module Aws::AppSync
2962
3102
  # @option params [Integer] :max_batch_size
2963
3103
  # The maximum batching size for a resolver.
2964
3104
  #
3105
+ # @option params [Types::AppSyncRuntime] :runtime
3106
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
3107
+ # AppSync function. Specifies the name and version of the runtime to
3108
+ # use. Note that if a runtime is specified, code must also be specified.
3109
+ #
3110
+ # @option params [String] :code
3111
+ # The `resolver` code that contains the request and response functions.
3112
+ # When code is used, the `runtime` is required. The `runtime` value must
3113
+ # be `APPSYNC_JS`.
3114
+ #
2965
3115
  # @return [Types::UpdateResolverResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2966
3116
  #
2967
3117
  # * {Types::UpdateResolverResponse#resolver #resolver} => Types::Resolver
@@ -2991,6 +3141,11 @@ module Aws::AppSync
2991
3141
  # caching_keys: ["String"],
2992
3142
  # },
2993
3143
  # max_batch_size: 1,
3144
+ # runtime: {
3145
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
3146
+ # runtime_version: "String", # required
3147
+ # },
3148
+ # code: "Code",
2994
3149
  # })
2995
3150
  #
2996
3151
  # @example Response structure
@@ -3011,6 +3166,9 @@ module Aws::AppSync
3011
3166
  # resp.resolver.caching_config.caching_keys #=> Array
3012
3167
  # resp.resolver.caching_config.caching_keys[0] #=> String
3013
3168
  # resp.resolver.max_batch_size #=> Integer
3169
+ # resp.resolver.runtime.name #=> String, one of "APPSYNC_JS"
3170
+ # resp.resolver.runtime.runtime_version #=> String
3171
+ # resp.resolver.code #=> String
3014
3172
  #
3015
3173
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateResolver AWS API Documentation
3016
3174
  #
@@ -3078,7 +3236,7 @@ module Aws::AppSync
3078
3236
  params: params,
3079
3237
  config: config)
3080
3238
  context[:gem_name] = 'aws-sdk-appsync'
3081
- context[:gem_version] = '1.54.0'
3239
+ context[:gem_version] = '1.55.0'
3082
3240
  Seahorse::Client::Request.new(handlers, context)
3083
3241
  end
3084
3242
 
@@ -26,6 +26,7 @@ module Aws::AppSync
26
26
  ApiKeyValidityOutOfBoundsException = Shapes::StructureShape.new(name: 'ApiKeyValidityOutOfBoundsException')
27
27
  ApiKeys = Shapes::ListShape.new(name: 'ApiKeys')
28
28
  ApiLimitExceededException = Shapes::StructureShape.new(name: 'ApiLimitExceededException')
29
+ AppSyncRuntime = Shapes::StructureShape.new(name: 'AppSyncRuntime')
29
30
  AssociateApiRequest = Shapes::StructureShape.new(name: 'AssociateApiRequest')
30
31
  AssociateApiResponse = Shapes::StructureShape.new(name: 'AssociateApiResponse')
31
32
  AssociationStatus = Shapes::StringShape.new(name: 'AssociationStatus')
@@ -33,13 +34,22 @@ module Aws::AppSync
33
34
  AuthorizationConfig = Shapes::StructureShape.new(name: 'AuthorizationConfig')
34
35
  AuthorizationType = Shapes::StringShape.new(name: 'AuthorizationType')
35
36
  AwsIamConfig = Shapes::StructureShape.new(name: 'AwsIamConfig')
37
+ BadRequestDetail = Shapes::StructureShape.new(name: 'BadRequestDetail')
36
38
  BadRequestException = Shapes::StructureShape.new(name: 'BadRequestException')
39
+ BadRequestReason = Shapes::StringShape.new(name: 'BadRequestReason')
37
40
  Blob = Shapes::BlobShape.new(name: 'Blob')
38
41
  Boolean = Shapes::BooleanShape.new(name: 'Boolean')
39
42
  BooleanValue = Shapes::BooleanShape.new(name: 'BooleanValue')
40
43
  CachingConfig = Shapes::StructureShape.new(name: 'CachingConfig')
41
44
  CachingKeys = Shapes::ListShape.new(name: 'CachingKeys')
42
45
  CertificateArn = Shapes::StringShape.new(name: 'CertificateArn')
46
+ Code = Shapes::StringShape.new(name: 'Code')
47
+ CodeError = Shapes::StructureShape.new(name: 'CodeError')
48
+ CodeErrorColumn = Shapes::IntegerShape.new(name: 'CodeErrorColumn')
49
+ CodeErrorLine = Shapes::IntegerShape.new(name: 'CodeErrorLine')
50
+ CodeErrorLocation = Shapes::StructureShape.new(name: 'CodeErrorLocation')
51
+ CodeErrorSpan = Shapes::IntegerShape.new(name: 'CodeErrorSpan')
52
+ CodeErrors = Shapes::ListShape.new(name: 'CodeErrors')
43
53
  CognitoUserPoolConfig = Shapes::StructureShape.new(name: 'CognitoUserPoolConfig')
44
54
  ConcurrentModificationException = Shapes::StructureShape.new(name: 'ConcurrentModificationException')
45
55
  ConflictDetectionType = Shapes::StringShape.new(name: 'ConflictDetectionType')
@@ -92,6 +102,9 @@ module Aws::AppSync
92
102
  ElasticsearchDataSourceConfig = Shapes::StructureShape.new(name: 'ElasticsearchDataSourceConfig')
93
103
  ErrorDetail = Shapes::StructureShape.new(name: 'ErrorDetail')
94
104
  ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
105
+ EvaluateCodeErrorDetail = Shapes::StructureShape.new(name: 'EvaluateCodeErrorDetail')
106
+ EvaluateCodeRequest = Shapes::StructureShape.new(name: 'EvaluateCodeRequest')
107
+ EvaluateCodeResponse = Shapes::StructureShape.new(name: 'EvaluateCodeResponse')
95
108
  EvaluateMappingTemplateRequest = Shapes::StructureShape.new(name: 'EvaluateMappingTemplateRequest')
96
109
  EvaluateMappingTemplateResponse = Shapes::StructureShape.new(name: 'EvaluateMappingTemplateResponse')
97
110
  EvaluationResult = Shapes::StringShape.new(name: 'EvaluationResult')
@@ -149,6 +162,7 @@ module Aws::AppSync
149
162
  ListTypesRequest = Shapes::StructureShape.new(name: 'ListTypesRequest')
150
163
  ListTypesResponse = Shapes::StructureShape.new(name: 'ListTypesResponse')
151
164
  LogConfig = Shapes::StructureShape.new(name: 'LogConfig')
165
+ Logs = Shapes::ListShape.new(name: 'Logs')
152
166
  Long = Shapes::IntegerShape.new(name: 'Long')
153
167
  MapOfStringToString = Shapes::MapShape.new(name: 'MapOfStringToString')
154
168
  MappingTemplate = Shapes::StringShape.new(name: 'MappingTemplate')
@@ -168,6 +182,7 @@ module Aws::AppSync
168
182
  Resolvers = Shapes::ListShape.new(name: 'Resolvers')
169
183
  ResourceArn = Shapes::StringShape.new(name: 'ResourceArn')
170
184
  ResourceName = Shapes::StringShape.new(name: 'ResourceName')
185
+ RuntimeName = Shapes::StringShape.new(name: 'RuntimeName')
171
186
  SchemaStatus = Shapes::StringShape.new(name: 'SchemaStatus')
172
187
  StartSchemaCreationRequest = Shapes::StructureShape.new(name: 'StartSchemaCreationRequest')
173
188
  StartSchemaCreationResponse = Shapes::StructureShape.new(name: 'StartSchemaCreationResponse')
@@ -247,6 +262,10 @@ module Aws::AppSync
247
262
  ApiLimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "message"))
248
263
  ApiLimitExceededException.struct_class = Types::ApiLimitExceededException
249
264
 
265
+ AppSyncRuntime.add_member(:name, Shapes::ShapeRef.new(shape: RuntimeName, required: true, location_name: "name"))
266
+ AppSyncRuntime.add_member(:runtime_version, Shapes::ShapeRef.new(shape: String, required: true, location_name: "runtimeVersion"))
267
+ AppSyncRuntime.struct_class = Types::AppSyncRuntime
268
+
250
269
  AssociateApiRequest.add_member(:domain_name, Shapes::ShapeRef.new(shape: DomainName, required: true, location: "uri", location_name: "domainName"))
251
270
  AssociateApiRequest.add_member(:api_id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "apiId"))
252
271
  AssociateApiRequest.struct_class = Types::AssociateApiRequest
@@ -262,7 +281,12 @@ module Aws::AppSync
262
281
  AwsIamConfig.add_member(:signing_service_name, Shapes::ShapeRef.new(shape: String, location_name: "signingServiceName"))
263
282
  AwsIamConfig.struct_class = Types::AwsIamConfig
264
283
 
284
+ BadRequestDetail.add_member(:code_errors, Shapes::ShapeRef.new(shape: CodeErrors, location_name: "codeErrors"))
285
+ BadRequestDetail.struct_class = Types::BadRequestDetail
286
+
265
287
  BadRequestException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
288
+ BadRequestException.add_member(:reason, Shapes::ShapeRef.new(shape: BadRequestReason, location_name: "reason"))
289
+ BadRequestException.add_member(:detail, Shapes::ShapeRef.new(shape: BadRequestDetail, location_name: "detail"))
266
290
  BadRequestException.struct_class = Types::BadRequestException
267
291
 
268
292
  CachingConfig.add_member(:ttl, Shapes::ShapeRef.new(shape: Long, required: true, location_name: "ttl"))
@@ -271,6 +295,18 @@ module Aws::AppSync
271
295
 
272
296
  CachingKeys.member = Shapes::ShapeRef.new(shape: String)
273
297
 
298
+ CodeError.add_member(:error_type, Shapes::ShapeRef.new(shape: String, location_name: "errorType"))
299
+ CodeError.add_member(:value, Shapes::ShapeRef.new(shape: String, location_name: "value"))
300
+ CodeError.add_member(:location, Shapes::ShapeRef.new(shape: CodeErrorLocation, location_name: "location"))
301
+ CodeError.struct_class = Types::CodeError
302
+
303
+ CodeErrorLocation.add_member(:line, Shapes::ShapeRef.new(shape: CodeErrorLine, location_name: "line"))
304
+ CodeErrorLocation.add_member(:column, Shapes::ShapeRef.new(shape: CodeErrorColumn, location_name: "column"))
305
+ CodeErrorLocation.add_member(:span, Shapes::ShapeRef.new(shape: CodeErrorSpan, location_name: "span"))
306
+ CodeErrorLocation.struct_class = Types::CodeErrorLocation
307
+
308
+ CodeErrors.member = Shapes::ShapeRef.new(shape: CodeError)
309
+
274
310
  CognitoUserPoolConfig.add_member(:user_pool_id, Shapes::ShapeRef.new(shape: String, required: true, location_name: "userPoolId"))
275
311
  CognitoUserPoolConfig.add_member(:aws_region, Shapes::ShapeRef.new(shape: String, required: true, location_name: "awsRegion"))
276
312
  CognitoUserPoolConfig.add_member(:app_id_client_regex, Shapes::ShapeRef.new(shape: String, location_name: "appIdClientRegex"))
@@ -328,9 +364,11 @@ module Aws::AppSync
328
364
  CreateFunctionRequest.add_member(:data_source_name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "dataSourceName"))
329
365
  CreateFunctionRequest.add_member(:request_mapping_template, Shapes::ShapeRef.new(shape: MappingTemplate, location_name: "requestMappingTemplate"))
330
366
  CreateFunctionRequest.add_member(:response_mapping_template, Shapes::ShapeRef.new(shape: MappingTemplate, location_name: "responseMappingTemplate"))
331
- CreateFunctionRequest.add_member(:function_version, Shapes::ShapeRef.new(shape: String, required: true, location_name: "functionVersion"))
367
+ CreateFunctionRequest.add_member(:function_version, Shapes::ShapeRef.new(shape: String, location_name: "functionVersion"))
332
368
  CreateFunctionRequest.add_member(:sync_config, Shapes::ShapeRef.new(shape: SyncConfig, location_name: "syncConfig"))
333
369
  CreateFunctionRequest.add_member(:max_batch_size, Shapes::ShapeRef.new(shape: MaxBatchSize, location_name: "maxBatchSize"))
370
+ CreateFunctionRequest.add_member(:runtime, Shapes::ShapeRef.new(shape: AppSyncRuntime, location_name: "runtime"))
371
+ CreateFunctionRequest.add_member(:code, Shapes::ShapeRef.new(shape: Code, location_name: "code"))
334
372
  CreateFunctionRequest.struct_class = Types::CreateFunctionRequest
335
373
 
336
374
  CreateFunctionResponse.add_member(:function_configuration, Shapes::ShapeRef.new(shape: FunctionConfiguration, location_name: "functionConfiguration"))
@@ -361,6 +399,8 @@ module Aws::AppSync
361
399
  CreateResolverRequest.add_member(:sync_config, Shapes::ShapeRef.new(shape: SyncConfig, location_name: "syncConfig"))
362
400
  CreateResolverRequest.add_member(:caching_config, Shapes::ShapeRef.new(shape: CachingConfig, location_name: "cachingConfig"))
363
401
  CreateResolverRequest.add_member(:max_batch_size, Shapes::ShapeRef.new(shape: MaxBatchSize, location_name: "maxBatchSize"))
402
+ CreateResolverRequest.add_member(:runtime, Shapes::ShapeRef.new(shape: AppSyncRuntime, location_name: "runtime"))
403
+ CreateResolverRequest.add_member(:code, Shapes::ShapeRef.new(shape: Code, location_name: "code"))
364
404
  CreateResolverRequest.struct_class = Types::CreateResolverRequest
365
405
 
366
406
  CreateResolverResponse.add_member(:resolver, Shapes::ShapeRef.new(shape: Resolver, location_name: "resolver"))
@@ -468,12 +508,28 @@ module Aws::AppSync
468
508
  ErrorDetail.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
469
509
  ErrorDetail.struct_class = Types::ErrorDetail
470
510
 
511
+ EvaluateCodeErrorDetail.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
512
+ EvaluateCodeErrorDetail.add_member(:code_errors, Shapes::ShapeRef.new(shape: CodeErrors, location_name: "codeErrors"))
513
+ EvaluateCodeErrorDetail.struct_class = Types::EvaluateCodeErrorDetail
514
+
515
+ EvaluateCodeRequest.add_member(:runtime, Shapes::ShapeRef.new(shape: AppSyncRuntime, required: true, location_name: "runtime"))
516
+ EvaluateCodeRequest.add_member(:code, Shapes::ShapeRef.new(shape: Code, required: true, location_name: "code"))
517
+ EvaluateCodeRequest.add_member(:context, Shapes::ShapeRef.new(shape: Context, required: true, location_name: "context"))
518
+ EvaluateCodeRequest.add_member(:function, Shapes::ShapeRef.new(shape: String, location_name: "function"))
519
+ EvaluateCodeRequest.struct_class = Types::EvaluateCodeRequest
520
+
521
+ EvaluateCodeResponse.add_member(:evaluation_result, Shapes::ShapeRef.new(shape: EvaluationResult, location_name: "evaluationResult"))
522
+ EvaluateCodeResponse.add_member(:error, Shapes::ShapeRef.new(shape: EvaluateCodeErrorDetail, location_name: "error"))
523
+ EvaluateCodeResponse.add_member(:logs, Shapes::ShapeRef.new(shape: Logs, location_name: "logs"))
524
+ EvaluateCodeResponse.struct_class = Types::EvaluateCodeResponse
525
+
471
526
  EvaluateMappingTemplateRequest.add_member(:template, Shapes::ShapeRef.new(shape: Template, required: true, location_name: "template"))
472
527
  EvaluateMappingTemplateRequest.add_member(:context, Shapes::ShapeRef.new(shape: Context, required: true, location_name: "context"))
473
528
  EvaluateMappingTemplateRequest.struct_class = Types::EvaluateMappingTemplateRequest
474
529
 
475
530
  EvaluateMappingTemplateResponse.add_member(:evaluation_result, Shapes::ShapeRef.new(shape: EvaluationResult, location_name: "evaluationResult"))
476
531
  EvaluateMappingTemplateResponse.add_member(:error, Shapes::ShapeRef.new(shape: ErrorDetail, location_name: "error"))
532
+ EvaluateMappingTemplateResponse.add_member(:logs, Shapes::ShapeRef.new(shape: Logs, location_name: "logs"))
477
533
  EvaluateMappingTemplateResponse.struct_class = Types::EvaluateMappingTemplateResponse
478
534
 
479
535
  FlushApiCacheRequest.add_member(:api_id, Shapes::ShapeRef.new(shape: String, required: true, location: "uri", location_name: "apiId"))
@@ -491,6 +547,8 @@ module Aws::AppSync
491
547
  FunctionConfiguration.add_member(:function_version, Shapes::ShapeRef.new(shape: String, location_name: "functionVersion"))
492
548
  FunctionConfiguration.add_member(:sync_config, Shapes::ShapeRef.new(shape: SyncConfig, location_name: "syncConfig"))
493
549
  FunctionConfiguration.add_member(:max_batch_size, Shapes::ShapeRef.new(shape: MaxBatchSize, location_name: "maxBatchSize"))
550
+ FunctionConfiguration.add_member(:runtime, Shapes::ShapeRef.new(shape: AppSyncRuntime, location_name: "runtime"))
551
+ FunctionConfiguration.add_member(:code, Shapes::ShapeRef.new(shape: Code, location_name: "code"))
494
552
  FunctionConfiguration.struct_class = Types::FunctionConfiguration
495
553
 
496
554
  Functions.member = Shapes::ShapeRef.new(shape: FunctionConfiguration)
@@ -693,6 +751,8 @@ module Aws::AppSync
693
751
  LogConfig.add_member(:exclude_verbose_content, Shapes::ShapeRef.new(shape: Boolean, location_name: "excludeVerboseContent"))
694
752
  LogConfig.struct_class = Types::LogConfig
695
753
 
754
+ Logs.member = Shapes::ShapeRef.new(shape: String)
755
+
696
756
  MapOfStringToString.key = Shapes::ShapeRef.new(shape: String)
697
757
  MapOfStringToString.value = Shapes::ShapeRef.new(shape: String)
698
758
 
@@ -734,6 +794,8 @@ module Aws::AppSync
734
794
  Resolver.add_member(:sync_config, Shapes::ShapeRef.new(shape: SyncConfig, location_name: "syncConfig"))
735
795
  Resolver.add_member(:caching_config, Shapes::ShapeRef.new(shape: CachingConfig, location_name: "cachingConfig"))
736
796
  Resolver.add_member(:max_batch_size, Shapes::ShapeRef.new(shape: MaxBatchSize, location_name: "maxBatchSize"))
797
+ Resolver.add_member(:runtime, Shapes::ShapeRef.new(shape: AppSyncRuntime, location_name: "runtime"))
798
+ Resolver.add_member(:code, Shapes::ShapeRef.new(shape: Code, location_name: "code"))
737
799
  Resolver.struct_class = Types::Resolver
738
800
 
739
801
  Resolvers.member = Shapes::ShapeRef.new(shape: Resolver)
@@ -827,9 +889,11 @@ module Aws::AppSync
827
889
  UpdateFunctionRequest.add_member(:data_source_name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "dataSourceName"))
828
890
  UpdateFunctionRequest.add_member(:request_mapping_template, Shapes::ShapeRef.new(shape: MappingTemplate, location_name: "requestMappingTemplate"))
829
891
  UpdateFunctionRequest.add_member(:response_mapping_template, Shapes::ShapeRef.new(shape: MappingTemplate, location_name: "responseMappingTemplate"))
830
- UpdateFunctionRequest.add_member(:function_version, Shapes::ShapeRef.new(shape: String, required: true, location_name: "functionVersion"))
892
+ UpdateFunctionRequest.add_member(:function_version, Shapes::ShapeRef.new(shape: String, location_name: "functionVersion"))
831
893
  UpdateFunctionRequest.add_member(:sync_config, Shapes::ShapeRef.new(shape: SyncConfig, location_name: "syncConfig"))
832
894
  UpdateFunctionRequest.add_member(:max_batch_size, Shapes::ShapeRef.new(shape: MaxBatchSize, location_name: "maxBatchSize"))
895
+ UpdateFunctionRequest.add_member(:runtime, Shapes::ShapeRef.new(shape: AppSyncRuntime, location_name: "runtime"))
896
+ UpdateFunctionRequest.add_member(:code, Shapes::ShapeRef.new(shape: Code, location_name: "code"))
833
897
  UpdateFunctionRequest.struct_class = Types::UpdateFunctionRequest
834
898
 
835
899
  UpdateFunctionResponse.add_member(:function_configuration, Shapes::ShapeRef.new(shape: FunctionConfiguration, location_name: "functionConfiguration"))
@@ -860,6 +924,8 @@ module Aws::AppSync
860
924
  UpdateResolverRequest.add_member(:sync_config, Shapes::ShapeRef.new(shape: SyncConfig, location_name: "syncConfig"))
861
925
  UpdateResolverRequest.add_member(:caching_config, Shapes::ShapeRef.new(shape: CachingConfig, location_name: "cachingConfig"))
862
926
  UpdateResolverRequest.add_member(:max_batch_size, Shapes::ShapeRef.new(shape: MaxBatchSize, location_name: "maxBatchSize"))
927
+ UpdateResolverRequest.add_member(:runtime, Shapes::ShapeRef.new(shape: AppSyncRuntime, location_name: "runtime"))
928
+ UpdateResolverRequest.add_member(:code, Shapes::ShapeRef.new(shape: Code, location_name: "code"))
863
929
  UpdateResolverRequest.struct_class = Types::UpdateResolverRequest
864
930
 
865
931
  UpdateResolverResponse.add_member(:resolver, Shapes::ShapeRef.new(shape: Resolver, location_name: "resolver"))
@@ -1000,6 +1066,7 @@ module Aws::AppSync
1000
1066
  o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1001
1067
  o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
1002
1068
  o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
1069
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
1003
1070
  end)
1004
1071
 
1005
1072
  api.add_operation(:create_type, Seahorse::Model::Operation.new.tap do |o|
@@ -1102,6 +1169,7 @@ module Aws::AppSync
1102
1169
  o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1103
1170
  o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
1104
1171
  o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
1172
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
1105
1173
  end)
1106
1174
 
1107
1175
  api.add_operation(:delete_type, Seahorse::Model::Operation.new.tap do |o|
@@ -1130,6 +1198,17 @@ module Aws::AppSync
1130
1198
  o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1131
1199
  end)
1132
1200
 
1201
+ api.add_operation(:evaluate_code, Seahorse::Model::Operation.new.tap do |o|
1202
+ o.name = "EvaluateCode"
1203
+ o.http_method = "POST"
1204
+ o.http_request_uri = "/v1/dataplane-evaluatecode"
1205
+ o.input = Shapes::ShapeRef.new(shape: EvaluateCodeRequest)
1206
+ o.output = Shapes::ShapeRef.new(shape: EvaluateCodeResponse)
1207
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
1208
+ o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
1209
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
1210
+ end)
1211
+
1133
1212
  api.add_operation(:evaluate_mapping_template, Seahorse::Model::Operation.new.tap do |o|
1134
1213
  o.name = "EvaluateMappingTemplate"
1135
1214
  o.http_method = "POST"
@@ -1515,6 +1594,7 @@ module Aws::AppSync
1515
1594
  o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1516
1595
  o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
1517
1596
  o.errors << Shapes::ShapeRef.new(shape: InternalFailureException)
1597
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
1518
1598
  end)
1519
1599
 
1520
1600
  api.add_operation(:update_type, Seahorse::Model::Operation.new.tap do |o|
@@ -263,6 +263,20 @@ module Aws::AppSync
263
263
  end
264
264
  end
265
265
 
266
+ class EvaluateCode
267
+ def self.build(context)
268
+ unless context.config.regional_endpoint
269
+ endpoint = context.config.endpoint.to_s
270
+ end
271
+ Aws::AppSync::EndpointParameters.new(
272
+ region: context.config.region,
273
+ use_dual_stack: context.config.use_dualstack_endpoint,
274
+ use_fips: context.config.use_fips_endpoint,
275
+ endpoint: endpoint,
276
+ )
277
+ end
278
+ end
279
+
266
280
  class EvaluateMappingTemplate
267
281
  def self.build(context)
268
282
  unless context.config.regional_endpoint
@@ -118,6 +118,16 @@ module Aws::AppSync
118
118
  def message
119
119
  @message || @data[:message]
120
120
  end
121
+
122
+ # @return [String]
123
+ def reason
124
+ @data[:reason]
125
+ end
126
+
127
+ # @return [String]
128
+ def detail
129
+ @data[:detail]
130
+ end
121
131
  end
122
132
 
123
133
  class ConcurrentModificationException < ServiceError
@@ -92,6 +92,8 @@ module Aws::AppSync
92
92
  Aws::AppSync::Endpoints::DeleteType.build(context)
93
93
  when :disassociate_api
94
94
  Aws::AppSync::Endpoints::DisassociateApi.build(context)
95
+ when :evaluate_code
96
+ Aws::AppSync::Endpoints::EvaluateCode.build(context)
95
97
  when :evaluate_mapping_template
96
98
  Aws::AppSync::Endpoints::EvaluateMappingTemplate.build(context)
97
99
  when :flush_api_cache
@@ -326,6 +326,37 @@ module Aws::AppSync
326
326
  include Aws::Structure
327
327
  end
328
328
 
329
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
330
+ # AppSync function. Specifies the name and version of the runtime to
331
+ # use. Note that if a runtime is specified, code must also be specified.
332
+ #
333
+ # @note When making an API call, you may pass AppSyncRuntime
334
+ # data as a hash:
335
+ #
336
+ # {
337
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
338
+ # runtime_version: "String", # required
339
+ # }
340
+ #
341
+ # @!attribute [rw] name
342
+ # The `name` of the runtime to use. Currently, the only allowed value
343
+ # is `APPSYNC_JS`.
344
+ # @return [String]
345
+ #
346
+ # @!attribute [rw] runtime_version
347
+ # The `version` of the runtime to use. Currently, the only allowed
348
+ # version is `1.0.0`.
349
+ # @return [String]
350
+ #
351
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/AppSyncRuntime AWS API Documentation
352
+ #
353
+ class AppSyncRuntime < Struct.new(
354
+ :name,
355
+ :runtime_version)
356
+ SENSITIVE = []
357
+ include Aws::Structure
358
+ end
359
+
329
360
  # @note When making an API call, you may pass AssociateApiRequest
330
361
  # data as a hash:
331
362
  #
@@ -426,16 +457,45 @@ module Aws::AppSync
426
457
  include Aws::Structure
427
458
  end
428
459
 
460
+ # Provides further details for the reason behind the bad request. For
461
+ # reason type `CODE_ERROR`, the detail will contain a list of code
462
+ # errors.
463
+ #
464
+ # @!attribute [rw] code_errors
465
+ # Contains the list of errors in the request.
466
+ # @return [Array<Types::CodeError>]
467
+ #
468
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/BadRequestDetail AWS API Documentation
469
+ #
470
+ class BadRequestDetail < Struct.new(
471
+ :code_errors)
472
+ SENSITIVE = []
473
+ include Aws::Structure
474
+ end
475
+
429
476
  # The request is not well formed. For example, a value is invalid or a
430
477
  # required field is missing. Check the field values, and then try again.
431
478
  #
432
479
  # @!attribute [rw] message
433
480
  # @return [String]
434
481
  #
482
+ # @!attribute [rw] reason
483
+ # Provides context for the cause of the bad request. The only
484
+ # supported value is `CODE_ERROR`.
485
+ # @return [String]
486
+ #
487
+ # @!attribute [rw] detail
488
+ # Provides further details for the reason behind the bad request. For
489
+ # reason type `CODE_ERROR`, the detail will contain a list of code
490
+ # errors.
491
+ # @return [Types::BadRequestDetail]
492
+ #
435
493
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/BadRequestException AWS API Documentation
436
494
  #
437
495
  class BadRequestException < Struct.new(
438
- :message)
496
+ :message,
497
+ :reason,
498
+ :detail)
439
499
  SENSITIVE = []
440
500
  include Aws::Structure
441
501
  end
@@ -472,6 +532,60 @@ module Aws::AppSync
472
532
  include Aws::Structure
473
533
  end
474
534
 
535
+ # Describes an AppSync error.
536
+ #
537
+ # @!attribute [rw] error_type
538
+ # The type of code error.
539
+ #
540
+ # Examples include, but aren't limited to: `LINT_ERROR`,
541
+ # `PARSER_ERROR`.
542
+ # @return [String]
543
+ #
544
+ # @!attribute [rw] value
545
+ # A user presentable error.
546
+ #
547
+ # Examples include, but aren't limited to: `Parsing error:
548
+ # Unterminated string literal`.
549
+ # @return [String]
550
+ #
551
+ # @!attribute [rw] location
552
+ # The line, column, and span location of the error in the code.
553
+ # @return [Types::CodeErrorLocation]
554
+ #
555
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CodeError AWS API Documentation
556
+ #
557
+ class CodeError < Struct.new(
558
+ :error_type,
559
+ :value,
560
+ :location)
561
+ SENSITIVE = []
562
+ include Aws::Structure
563
+ end
564
+
565
+ # Describes the location of the error in a code sample.
566
+ #
567
+ # @!attribute [rw] line
568
+ # The line number in the code. Defaults to `0` if unknown.
569
+ # @return [Integer]
570
+ #
571
+ # @!attribute [rw] column
572
+ # The column number in the code. Defaults to `0` if unknown.
573
+ # @return [Integer]
574
+ #
575
+ # @!attribute [rw] span
576
+ # The span/length of the error. Defaults to `-1` if unknown.
577
+ # @return [Integer]
578
+ #
579
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CodeErrorLocation AWS API Documentation
580
+ #
581
+ class CodeErrorLocation < Struct.new(
582
+ :line,
583
+ :column,
584
+ :span)
585
+ SENSITIVE = []
586
+ include Aws::Structure
587
+ end
588
+
475
589
  # Describes an Amazon Cognito user pool configuration.
476
590
  #
477
591
  # @note When making an API call, you may pass CognitoUserPoolConfig
@@ -867,7 +981,7 @@ module Aws::AppSync
867
981
  # data_source_name: "ResourceName", # required
868
982
  # request_mapping_template: "MappingTemplate",
869
983
  # response_mapping_template: "MappingTemplate",
870
- # function_version: "String", # required
984
+ # function_version: "String",
871
985
  # sync_config: {
872
986
  # conflict_handler: "OPTIMISTIC_CONCURRENCY", # accepts OPTIMISTIC_CONCURRENCY, LAMBDA, AUTOMERGE, NONE
873
987
  # conflict_detection: "VERSION", # accepts VERSION, NONE
@@ -876,6 +990,11 @@ module Aws::AppSync
876
990
  # },
877
991
  # },
878
992
  # max_batch_size: 1,
993
+ # runtime: {
994
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
995
+ # runtime_version: "String", # required
996
+ # },
997
+ # code: "Code",
879
998
  # }
880
999
  #
881
1000
  # @!attribute [rw] api_id
@@ -905,7 +1024,8 @@ module Aws::AppSync
905
1024
  #
906
1025
  # @!attribute [rw] function_version
907
1026
  # The `version` of the request mapping template. Currently, the
908
- # supported value is 2018-05-29.
1027
+ # supported value is 2018-05-29. Note that when using VTL and mapping
1028
+ # templates, the `functionVersion` is required.
909
1029
  # @return [String]
910
1030
  #
911
1031
  # @!attribute [rw] sync_config
@@ -919,6 +1039,19 @@ module Aws::AppSync
919
1039
  # The maximum batching size for a resolver.
920
1040
  # @return [Integer]
921
1041
  #
1042
+ # @!attribute [rw] runtime
1043
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
1044
+ # AppSync function. Specifies the name and version of the runtime to
1045
+ # use. Note that if a runtime is specified, code must also be
1046
+ # specified.
1047
+ # @return [Types::AppSyncRuntime]
1048
+ #
1049
+ # @!attribute [rw] code
1050
+ # The `function` code that contains the request and response
1051
+ # functions. When code is used, the `runtime` is required. The
1052
+ # `runtime` value must be `APPSYNC_JS`.
1053
+ # @return [String]
1054
+ #
922
1055
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateFunctionRequest AWS API Documentation
923
1056
  #
924
1057
  class CreateFunctionRequest < Struct.new(
@@ -930,7 +1063,9 @@ module Aws::AppSync
930
1063
  :response_mapping_template,
931
1064
  :function_version,
932
1065
  :sync_config,
933
- :max_batch_size)
1066
+ :max_batch_size,
1067
+ :runtime,
1068
+ :code)
934
1069
  SENSITIVE = []
935
1070
  include Aws::Structure
936
1071
  end
@@ -1094,6 +1229,11 @@ module Aws::AppSync
1094
1229
  # caching_keys: ["String"],
1095
1230
  # },
1096
1231
  # max_batch_size: 1,
1232
+ # runtime: {
1233
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
1234
+ # runtime_version: "String", # required
1235
+ # },
1236
+ # code: "Code",
1097
1237
  # }
1098
1238
  #
1099
1239
  # @!attribute [rw] api_id
@@ -1157,6 +1297,19 @@ module Aws::AppSync
1157
1297
  # The maximum batching size for a resolver.
1158
1298
  # @return [Integer]
1159
1299
  #
1300
+ # @!attribute [rw] runtime
1301
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
1302
+ # AppSync function. Specifies the name and version of the runtime to
1303
+ # use. Note that if a runtime is specified, code must also be
1304
+ # specified.
1305
+ # @return [Types::AppSyncRuntime]
1306
+ #
1307
+ # @!attribute [rw] code
1308
+ # The `resolver` code that contains the request and response
1309
+ # functions. When code is used, the `runtime` is required. The
1310
+ # `runtime` value must be `APPSYNC_JS`.
1311
+ # @return [String]
1312
+ #
1160
1313
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateResolverRequest AWS API Documentation
1161
1314
  #
1162
1315
  class CreateResolverRequest < Struct.new(
@@ -1170,7 +1323,9 @@ module Aws::AppSync
1170
1323
  :pipeline_config,
1171
1324
  :sync_config,
1172
1325
  :caching_config,
1173
- :max_batch_size)
1326
+ :max_batch_size,
1327
+ :runtime,
1328
+ :code)
1174
1329
  SENSITIVE = []
1175
1330
  include Aws::Structure
1176
1331
  end
@@ -1723,8 +1878,8 @@ module Aws::AppSync
1723
1878
  include Aws::Structure
1724
1879
  end
1725
1880
 
1726
- # Contains the list of errors generated when attempting to evaluate a
1727
- # mapping template.
1881
+ # Contains the list of errors generated. When using JavaScript, this
1882
+ # will apply to the request or response function evaluation.
1728
1883
  #
1729
1884
  # @!attribute [rw] message
1730
1885
  # The error payload.
@@ -1738,6 +1893,93 @@ module Aws::AppSync
1738
1893
  include Aws::Structure
1739
1894
  end
1740
1895
 
1896
+ # Contains the list of errors from a code evaluation response.
1897
+ #
1898
+ # @!attribute [rw] message
1899
+ # The error payload.
1900
+ # @return [String]
1901
+ #
1902
+ # @!attribute [rw] code_errors
1903
+ # Contains the list of `CodeError` objects.
1904
+ # @return [Array<Types::CodeError>]
1905
+ #
1906
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/EvaluateCodeErrorDetail AWS API Documentation
1907
+ #
1908
+ class EvaluateCodeErrorDetail < Struct.new(
1909
+ :message,
1910
+ :code_errors)
1911
+ SENSITIVE = []
1912
+ include Aws::Structure
1913
+ end
1914
+
1915
+ # @note When making an API call, you may pass EvaluateCodeRequest
1916
+ # data as a hash:
1917
+ #
1918
+ # {
1919
+ # runtime: { # required
1920
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
1921
+ # runtime_version: "String", # required
1922
+ # },
1923
+ # code: "Code", # required
1924
+ # context: "Context", # required
1925
+ # function: "String",
1926
+ # }
1927
+ #
1928
+ # @!attribute [rw] runtime
1929
+ # The runtime to be used when evaluating the code. Currently, only the
1930
+ # `APPSYNC_JS` runtime is supported.
1931
+ # @return [Types::AppSyncRuntime]
1932
+ #
1933
+ # @!attribute [rw] code
1934
+ # The code definition to be evaluated. Note that `code` and `runtime`
1935
+ # are both required for this action. The `runtime` value must be
1936
+ # `APPSYNC_JS`.
1937
+ # @return [String]
1938
+ #
1939
+ # @!attribute [rw] context
1940
+ # The map that holds all of the contextual information for your
1941
+ # resolver invocation. A `context` is required for this action.
1942
+ # @return [String]
1943
+ #
1944
+ # @!attribute [rw] function
1945
+ # The function within the code to be evaluated. If provided, the valid
1946
+ # values are `request` and `response`.
1947
+ # @return [String]
1948
+ #
1949
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/EvaluateCodeRequest AWS API Documentation
1950
+ #
1951
+ class EvaluateCodeRequest < Struct.new(
1952
+ :runtime,
1953
+ :code,
1954
+ :context,
1955
+ :function)
1956
+ SENSITIVE = []
1957
+ include Aws::Structure
1958
+ end
1959
+
1960
+ # @!attribute [rw] evaluation_result
1961
+ # The result of the evaluation operation.
1962
+ # @return [String]
1963
+ #
1964
+ # @!attribute [rw] error
1965
+ # Contains the payload of the response error.
1966
+ # @return [Types::EvaluateCodeErrorDetail]
1967
+ #
1968
+ # @!attribute [rw] logs
1969
+ # A list of logs that were generated by calls to `util.log.info` and
1970
+ # `util.log.error` in the evaluated code.
1971
+ # @return [Array<String>]
1972
+ #
1973
+ # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/EvaluateCodeResponse AWS API Documentation
1974
+ #
1975
+ class EvaluateCodeResponse < Struct.new(
1976
+ :evaluation_result,
1977
+ :error,
1978
+ :logs)
1979
+ SENSITIVE = []
1980
+ include Aws::Structure
1981
+ end
1982
+
1741
1983
  # @note When making an API call, you may pass EvaluateMappingTemplateRequest
1742
1984
  # data as a hash:
1743
1985
  #
@@ -1773,11 +2015,17 @@ module Aws::AppSync
1773
2015
  # The `ErrorDetail` object.
1774
2016
  # @return [Types::ErrorDetail]
1775
2017
  #
2018
+ # @!attribute [rw] logs
2019
+ # A list of logs that were generated by calls to `util.log.info` and
2020
+ # `util.log.error` in the evaluated code.
2021
+ # @return [Array<String>]
2022
+ #
1776
2023
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/EvaluateMappingTemplateResponse AWS API Documentation
1777
2024
  #
1778
2025
  class EvaluateMappingTemplateResponse < Struct.new(
1779
2026
  :evaluation_result,
1780
- :error)
2027
+ :error,
2028
+ :logs)
1781
2029
  SENSITIVE = []
1782
2030
  include Aws::Structure
1783
2031
  end
@@ -1857,6 +2105,19 @@ module Aws::AppSync
1857
2105
  # The maximum batching size for a resolver.
1858
2106
  # @return [Integer]
1859
2107
  #
2108
+ # @!attribute [rw] runtime
2109
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
2110
+ # AppSync function. Specifies the name and version of the runtime to
2111
+ # use. Note that if a runtime is specified, code must also be
2112
+ # specified.
2113
+ # @return [Types::AppSyncRuntime]
2114
+ #
2115
+ # @!attribute [rw] code
2116
+ # The `function` code that contains the request and response
2117
+ # functions. When code is used, the `runtime` is required. The
2118
+ # `runtime` value must be `APPSYNC_JS`.
2119
+ # @return [String]
2120
+ #
1860
2121
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/FunctionConfiguration AWS API Documentation
1861
2122
  #
1862
2123
  class FunctionConfiguration < Struct.new(
@@ -1869,7 +2130,9 @@ module Aws::AppSync
1869
2130
  :response_mapping_template,
1870
2131
  :function_version,
1871
2132
  :sync_config,
1872
- :max_batch_size)
2133
+ :max_batch_size,
2134
+ :runtime,
2135
+ :code)
1873
2136
  SENSITIVE = []
1874
2137
  include Aws::Structure
1875
2138
  end
@@ -3246,6 +3509,19 @@ module Aws::AppSync
3246
3509
  # The maximum batching size for a resolver.
3247
3510
  # @return [Integer]
3248
3511
  #
3512
+ # @!attribute [rw] runtime
3513
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
3514
+ # AppSync function. Specifies the name and version of the runtime to
3515
+ # use. Note that if a runtime is specified, code must also be
3516
+ # specified.
3517
+ # @return [Types::AppSyncRuntime]
3518
+ #
3519
+ # @!attribute [rw] code
3520
+ # The `resolver` code that contains the request and response
3521
+ # functions. When code is used, the `runtime` is required. The
3522
+ # `runtime` value must be `APPSYNC_JS`.
3523
+ # @return [String]
3524
+ #
3249
3525
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/Resolver AWS API Documentation
3250
3526
  #
3251
3527
  class Resolver < Struct.new(
@@ -3259,7 +3535,9 @@ module Aws::AppSync
3259
3535
  :pipeline_config,
3260
3536
  :sync_config,
3261
3537
  :caching_config,
3262
- :max_batch_size)
3538
+ :max_batch_size,
3539
+ :runtime,
3540
+ :code)
3263
3541
  SENSITIVE = []
3264
3542
  include Aws::Structure
3265
3543
  end
@@ -3793,7 +4071,7 @@ module Aws::AppSync
3793
4071
  # data_source_name: "ResourceName", # required
3794
4072
  # request_mapping_template: "MappingTemplate",
3795
4073
  # response_mapping_template: "MappingTemplate",
3796
- # function_version: "String", # required
4074
+ # function_version: "String",
3797
4075
  # sync_config: {
3798
4076
  # conflict_handler: "OPTIMISTIC_CONCURRENCY", # accepts OPTIMISTIC_CONCURRENCY, LAMBDA, AUTOMERGE, NONE
3799
4077
  # conflict_detection: "VERSION", # accepts VERSION, NONE
@@ -3802,6 +4080,11 @@ module Aws::AppSync
3802
4080
  # },
3803
4081
  # },
3804
4082
  # max_batch_size: 1,
4083
+ # runtime: {
4084
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
4085
+ # runtime_version: "String", # required
4086
+ # },
4087
+ # code: "Code",
3805
4088
  # }
3806
4089
  #
3807
4090
  # @!attribute [rw] api_id
@@ -3835,7 +4118,8 @@ module Aws::AppSync
3835
4118
  #
3836
4119
  # @!attribute [rw] function_version
3837
4120
  # The `version` of the request mapping template. Currently, the
3838
- # supported value is 2018-05-29.
4121
+ # supported value is 2018-05-29. Note that when using VTL and mapping
4122
+ # templates, the `functionVersion` is required.
3839
4123
  # @return [String]
3840
4124
  #
3841
4125
  # @!attribute [rw] sync_config
@@ -3849,6 +4133,19 @@ module Aws::AppSync
3849
4133
  # The maximum batching size for a resolver.
3850
4134
  # @return [Integer]
3851
4135
  #
4136
+ # @!attribute [rw] runtime
4137
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
4138
+ # AppSync function. Specifies the name and version of the runtime to
4139
+ # use. Note that if a runtime is specified, code must also be
4140
+ # specified.
4141
+ # @return [Types::AppSyncRuntime]
4142
+ #
4143
+ # @!attribute [rw] code
4144
+ # The `function` code that contains the request and response
4145
+ # functions. When code is used, the `runtime` is required. The
4146
+ # `runtime` value must be `APPSYNC_JS`.
4147
+ # @return [String]
4148
+ #
3852
4149
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateFunctionRequest AWS API Documentation
3853
4150
  #
3854
4151
  class UpdateFunctionRequest < Struct.new(
@@ -3861,7 +4158,9 @@ module Aws::AppSync
3861
4158
  :response_mapping_template,
3862
4159
  :function_version,
3863
4160
  :sync_config,
3864
- :max_batch_size)
4161
+ :max_batch_size,
4162
+ :runtime,
4163
+ :code)
3865
4164
  SENSITIVE = []
3866
4165
  include Aws::Structure
3867
4166
  end
@@ -4024,6 +4323,11 @@ module Aws::AppSync
4024
4323
  # caching_keys: ["String"],
4025
4324
  # },
4026
4325
  # max_batch_size: 1,
4326
+ # runtime: {
4327
+ # name: "APPSYNC_JS", # required, accepts APPSYNC_JS
4328
+ # runtime_version: "String", # required
4329
+ # },
4330
+ # code: "Code",
4027
4331
  # }
4028
4332
  #
4029
4333
  # @!attribute [rw] api_id
@@ -4087,6 +4391,19 @@ module Aws::AppSync
4087
4391
  # The maximum batching size for a resolver.
4088
4392
  # @return [Integer]
4089
4393
  #
4394
+ # @!attribute [rw] runtime
4395
+ # Describes a runtime used by an AWS AppSync pipeline resolver or AWS
4396
+ # AppSync function. Specifies the name and version of the runtime to
4397
+ # use. Note that if a runtime is specified, code must also be
4398
+ # specified.
4399
+ # @return [Types::AppSyncRuntime]
4400
+ #
4401
+ # @!attribute [rw] code
4402
+ # The `resolver` code that contains the request and response
4403
+ # functions. When code is used, the `runtime` is required. The
4404
+ # `runtime` value must be `APPSYNC_JS`.
4405
+ # @return [String]
4406
+ #
4090
4407
  # @see http://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateResolverRequest AWS API Documentation
4091
4408
  #
4092
4409
  class UpdateResolverRequest < Struct.new(
@@ -4100,7 +4417,9 @@ module Aws::AppSync
4100
4417
  :pipeline_config,
4101
4418
  :sync_config,
4102
4419
  :caching_config,
4103
- :max_batch_size)
4420
+ :max_batch_size,
4421
+ :runtime,
4422
+ :code)
4104
4423
  SENSITIVE = []
4105
4424
  include Aws::Structure
4106
4425
  end
@@ -52,6 +52,6 @@ require_relative 'aws-sdk-appsync/customizations'
52
52
  # @!group service
53
53
  module Aws::AppSync
54
54
 
55
- GEM_VERSION = '1.54.0'
55
+ GEM_VERSION = '1.55.0'
56
56
 
57
57
  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.54.0
4
+ version: 1.55.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-10-25 00:00:00.000000000 Z
11
+ date: 2022-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core