/
appsync.jl
2497 lines (2259 loc) · 77.3 KB
/
appsync.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: appsync
using AWS.Compat
using AWS.UUIDs
"""
associate_api(api_id, domain_name)
associate_api(api_id, domain_name, params::Dict{String,<:Any})
Maps an endpoint to your custom domain.
# Arguments
- `api_id`: The API ID. Private APIs can not be associated with custom domains.
- `domain_name`: The domain name.
"""
function associate_api(apiId, domainName; aws_config::AbstractAWSConfig=global_aws_config())
return appsync(
"POST",
"/v1/domainnames/$(domainName)/apiassociation",
Dict{String,Any}("apiId" => apiId);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function associate_api(
apiId,
domainName,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/domainnames/$(domainName)/apiassociation",
Dict{String,Any}(mergewith(_merge, Dict{String,Any}("apiId" => apiId), params));
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
associate_merged_graphql_api(merged_api_identifier, source_api_identifier)
associate_merged_graphql_api(merged_api_identifier, source_api_identifier, params::Dict{String,<:Any})
Creates an association between a Merged API and source API using the source API's
identifier.
# Arguments
- `merged_api_identifier`: The identifier of the AppSync Merged API. This is generated by
the AppSync service. In most cases, Merged APIs (especially in your account) only require
the API ID value or ARN of the merged API. However, Merged APIs in other accounts
(cross-account use cases) strictly require the full resource ARN of the merged API.
- `source_api_identifier`: The identifier of the AppSync Source API. This is generated by
the AppSync service. In most cases, source APIs (especially in your account) only require
the API ID value or ARN of the source API. However, source APIs from other accounts
(cross-account use cases) strictly require the full resource ARN of the source API.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`: The description field.
- `"sourceApiAssociationConfig"`: The SourceApiAssociationConfig object data.
"""
function associate_merged_graphql_api(
mergedApiIdentifier,
sourceApiIdentifier;
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/sourceApis/$(sourceApiIdentifier)/mergedApiAssociations",
Dict{String,Any}("mergedApiIdentifier" => mergedApiIdentifier);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function associate_merged_graphql_api(
mergedApiIdentifier,
sourceApiIdentifier,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/sourceApis/$(sourceApiIdentifier)/mergedApiAssociations",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}("mergedApiIdentifier" => mergedApiIdentifier),
params,
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
associate_source_graphql_api(merged_api_identifier, source_api_identifier)
associate_source_graphql_api(merged_api_identifier, source_api_identifier, params::Dict{String,<:Any})
Creates an association between a Merged API and source API using the Merged API's
identifier.
# Arguments
- `merged_api_identifier`: The identifier of the AppSync Merged API. This is generated by
the AppSync service. In most cases, Merged APIs (especially in your account) only require
the API ID value or ARN of the merged API. However, Merged APIs in other accounts
(cross-account use cases) strictly require the full resource ARN of the merged API.
- `source_api_identifier`: The identifier of the AppSync Source API. This is generated by
the AppSync service. In most cases, source APIs (especially in your account) only require
the API ID value or ARN of the source API. However, source APIs from other accounts
(cross-account use cases) strictly require the full resource ARN of the source API.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`: The description field.
- `"sourceApiAssociationConfig"`: The SourceApiAssociationConfig object data.
"""
function associate_source_graphql_api(
mergedApiIdentifier,
sourceApiIdentifier;
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/mergedApis/$(mergedApiIdentifier)/sourceApiAssociations",
Dict{String,Any}("sourceApiIdentifier" => sourceApiIdentifier);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function associate_source_graphql_api(
mergedApiIdentifier,
sourceApiIdentifier,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/mergedApis/$(mergedApiIdentifier)/sourceApiAssociations",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}("sourceApiIdentifier" => sourceApiIdentifier),
params,
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_api_cache(api_caching_behavior, api_id, ttl, type)
create_api_cache(api_caching_behavior, api_id, ttl, type, params::Dict{String,<:Any})
Creates a cache for the GraphQL API.
# Arguments
- `api_caching_behavior`: Caching behavior. FULL_REQUEST_CACHING: All requests are fully
cached. PER_RESOLVER_CACHING: Individual resolvers that you specify are cached.
- `api_id`: The GraphQL API ID.
- `ttl`: TTL in seconds for cache entries. Valid values are 1–3,600 seconds.
- `type`: The cache instance type. Valid values are SMALL MEDIUM LARGE
XLARGE LARGE_2X LARGE_4X LARGE_8X (not available in all regions) LARGE_12X
Historically, instance types were identified by an EC2-style value. As of July 2020, this
is deprecated, and the generic identifiers above should be used. The following legacy
instance types are available, but their use is discouraged: T2_SMALL: A t2.small
instance type. T2_MEDIUM: A t2.medium instance type. R4_LARGE: A r4.large instance
type. R4_XLARGE: A r4.xlarge instance type. R4_2XLARGE: A r4.2xlarge instance type.
R4_4XLARGE: A r4.4xlarge instance type. R4_8XLARGE: A r4.8xlarge instance type.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"atRestEncryptionEnabled"`: At-rest encryption flag for cache. You cannot update this
setting after creation.
- `"transitEncryptionEnabled"`: Transit encryption flag when connecting to cache. You
cannot update this setting after creation.
"""
function create_api_cache(
apiCachingBehavior, apiId, ttl, type; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"POST",
"/v1/apis/$(apiId)/ApiCaches",
Dict{String,Any}(
"apiCachingBehavior" => apiCachingBehavior, "ttl" => ttl, "type" => type
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_api_cache(
apiCachingBehavior,
apiId,
ttl,
type,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/apis/$(apiId)/ApiCaches",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}(
"apiCachingBehavior" => apiCachingBehavior, "ttl" => ttl, "type" => type
),
params,
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_api_key(api_id)
create_api_key(api_id, params::Dict{String,<:Any})
Creates a unique key that you can distribute to clients who invoke your API.
# Arguments
- `api_id`: The ID for your GraphQL API.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`: A description of the purpose of the API key.
- `"expires"`: From the creation time, the time after which the API key expires. The date
is represented as seconds since the epoch, rounded down to the nearest hour. The default
value for this parameter is 7 days from creation time. For more information, see .
"""
function create_api_key(apiId; aws_config::AbstractAWSConfig=global_aws_config())
return appsync(
"POST",
"/v1/apis/$(apiId)/apikeys";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_api_key(
apiId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"POST",
"/v1/apis/$(apiId)/apikeys",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_data_source(api_id, name, type)
create_data_source(api_id, name, type, params::Dict{String,<:Any})
Creates a DataSource object.
# Arguments
- `api_id`: The API ID for the GraphQL API for the DataSource.
- `name`: A user-supplied name for the DataSource.
- `type`: The type of the DataSource.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`: A description of the DataSource.
- `"dynamodbConfig"`: Amazon DynamoDB settings.
- `"elasticsearchConfig"`: Amazon OpenSearch Service settings. As of September 2021, Amazon
Elasticsearch service is Amazon OpenSearch Service. This configuration is deprecated. For
new data sources, use CreateDataSourceRequestopenSearchServiceConfig to create an
OpenSearch data source.
- `"eventBridgeConfig"`: Amazon EventBridge settings.
- `"httpConfig"`: HTTP endpoint settings.
- `"lambdaConfig"`: Lambda settings.
- `"openSearchServiceConfig"`: Amazon OpenSearch Service settings.
- `"relationalDatabaseConfig"`: Relational database settings.
- `"serviceRoleArn"`: The Identity and Access Management (IAM) service role Amazon Resource
Name (ARN) for the data source. The system assumes this role when accessing the data source.
"""
function create_data_source(
apiId, name, type; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"POST",
"/v1/apis/$(apiId)/datasources",
Dict{String,Any}("name" => name, "type" => type);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_data_source(
apiId,
name,
type,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/apis/$(apiId)/datasources",
Dict{String,Any}(
mergewith(_merge, Dict{String,Any}("name" => name, "type" => type), params)
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_domain_name(certificate_arn, domain_name)
create_domain_name(certificate_arn, domain_name, params::Dict{String,<:Any})
Creates a custom DomainName object.
# Arguments
- `certificate_arn`: The Amazon Resource Name (ARN) of the certificate. This can be an
Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server
certificate.
- `domain_name`: The domain name.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`: A description of the DomainName.
"""
function create_domain_name(
certificateArn, domainName; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"POST",
"/v1/domainnames",
Dict{String,Any}("certificateArn" => certificateArn, "domainName" => domainName);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_domain_name(
certificateArn,
domainName,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/domainnames",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}(
"certificateArn" => certificateArn, "domainName" => domainName
),
params,
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_function(api_id, data_source_name, name)
create_function(api_id, data_source_name, name, params::Dict{String,<:Any})
Creates a Function object. A function is a reusable entity. You can use multiple functions
to compose the resolver logic.
# Arguments
- `api_id`: The GraphQL API ID.
- `data_source_name`: The Function DataSource name.
- `name`: The Function name. The function name does not have to be unique.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"code"`: The function code that contains the request and response functions. When code
is used, the runtime is required. The runtime value must be APPSYNC_JS.
- `"description"`: The Function description.
- `"functionVersion"`: The version of the request mapping template. Currently, the
supported value is 2018-05-29. Note that when using VTL and mapping templates, the
functionVersion is required.
- `"maxBatchSize"`: The maximum batching size for a resolver.
- `"requestMappingTemplate"`: The Function request mapping template. Functions support only
the 2018-05-29 version of the request mapping template.
- `"responseMappingTemplate"`: The Function response mapping template.
- `"runtime"`:
- `"syncConfig"`:
"""
function create_function(
apiId, dataSourceName, name; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"POST",
"/v1/apis/$(apiId)/functions",
Dict{String,Any}("dataSourceName" => dataSourceName, "name" => name);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_function(
apiId,
dataSourceName,
name,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/apis/$(apiId)/functions",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}("dataSourceName" => dataSourceName, "name" => name),
params,
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_graphql_api(authentication_type, name)
create_graphql_api(authentication_type, name, params::Dict{String,<:Any})
Creates a GraphqlApi object.
# Arguments
- `authentication_type`: The authentication type: API key, Identity and Access Management
(IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.
- `name`: A user-supplied name for the GraphqlApi.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"additionalAuthenticationProviders"`: A list of additional authentication providers for
the GraphqlApi API.
- `"apiType"`: The value that indicates whether the GraphQL API is a standard API (GRAPHQL)
or merged API (MERGED).
- `"lambdaAuthorizerConfig"`: Configuration for Lambda function authorization.
- `"logConfig"`: The Amazon CloudWatch Logs configuration.
- `"mergedApiExecutionRoleArn"`: The Identity and Access Management service role ARN for a
merged API. The AppSync service assumes this role on behalf of the Merged API to validate
access to source APIs at runtime and to prompt the AUTO_MERGE to update the merged API
endpoint with the source API changes automatically.
- `"openIDConnectConfig"`: The OIDC configuration.
- `"ownerContact"`: The owner contact information for an API resource. This field accepts
any string input with a length of 0 - 256 characters.
- `"tags"`: A TagMap object.
- `"userPoolConfig"`: The Amazon Cognito user pool configuration.
- `"visibility"`: Sets the value of the GraphQL API to public (GLOBAL) or private
(PRIVATE). If no value is provided, the visibility will be set to GLOBAL by default. This
value cannot be changed once the API has been created.
- `"xrayEnabled"`: A flag indicating whether to use X-Ray tracing for the GraphqlApi.
"""
function create_graphql_api(
authenticationType, name; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"POST",
"/v1/apis",
Dict{String,Any}("authenticationType" => authenticationType, "name" => name);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_graphql_api(
authenticationType,
name,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/apis",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}(
"authenticationType" => authenticationType, "name" => name
),
params,
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_resolver(api_id, field_name, type_name)
create_resolver(api_id, field_name, type_name, params::Dict{String,<:Any})
Creates a Resolver object. A resolver converts incoming requests into a format that a data
source can understand, and converts the data source's responses into GraphQL.
# Arguments
- `api_id`: The ID for the GraphQL API for which the resolver is being created.
- `field_name`: The name of the field to attach the resolver to.
- `type_name`: The name of the Type.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"cachingConfig"`: The caching configuration for the resolver.
- `"code"`: The resolver code that contains the request and response functions. When code
is used, the runtime is required. The runtime value must be APPSYNC_JS.
- `"dataSourceName"`: The name of the data source for which the resolver is being created.
- `"kind"`: The resolver type. UNIT: A UNIT resolver type. A UNIT resolver is the
default resolver type. You can use a UNIT resolver to run a GraphQL query against a single
data source. PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to
invoke a series of Function objects in a serial manner. You can use a pipeline resolver to
run a GraphQL query against multiple data sources.
- `"maxBatchSize"`: The maximum batching size for a resolver.
- `"pipelineConfig"`: The PipelineConfig.
- `"requestMappingTemplate"`: The mapping template to use for requests. A resolver uses a
request mapping template to convert a GraphQL expression into a format that a data source
can understand. Mapping templates are written in Apache Velocity Template Language (VTL).
VTL request mapping templates are optional when using an Lambda data source. For all other
data sources, VTL request and response mapping templates are required.
- `"responseMappingTemplate"`: The mapping template to use for responses from the data
source.
- `"runtime"`:
- `"syncConfig"`: The SyncConfig for a resolver attached to a versioned data source.
"""
function create_resolver(
apiId, fieldName, typeName; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"POST",
"/v1/apis/$(apiId)/types/$(typeName)/resolvers",
Dict{String,Any}("fieldName" => fieldName);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_resolver(
apiId,
fieldName,
typeName,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/apis/$(apiId)/types/$(typeName)/resolvers",
Dict{String,Any}(
mergewith(_merge, Dict{String,Any}("fieldName" => fieldName), params)
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_type(api_id, definition, format)
create_type(api_id, definition, format, params::Dict{String,<:Any})
Creates a Type object.
# Arguments
- `api_id`: The API ID.
- `definition`: The type definition, in GraphQL Schema Definition Language (SDL) format.
For more information, see the GraphQL SDL documentation.
- `format`: The type format: SDL or JSON.
"""
function create_type(
apiId, definition, format; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"POST",
"/v1/apis/$(apiId)/types",
Dict{String,Any}("definition" => definition, "format" => format);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_type(
apiId,
definition,
format,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"POST",
"/v1/apis/$(apiId)/types",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}("definition" => definition, "format" => format),
params,
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_api_cache(api_id)
delete_api_cache(api_id, params::Dict{String,<:Any})
Deletes an ApiCache object.
# Arguments
- `api_id`: The API ID.
"""
function delete_api_cache(apiId; aws_config::AbstractAWSConfig=global_aws_config())
return appsync(
"DELETE",
"/v1/apis/$(apiId)/ApiCaches";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_api_cache(
apiId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"DELETE",
"/v1/apis/$(apiId)/ApiCaches",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_api_key(api_id, id)
delete_api_key(api_id, id, params::Dict{String,<:Any})
Deletes an API key.
# Arguments
- `api_id`: The API ID.
- `id`: The ID for the API key.
"""
function delete_api_key(apiId, id; aws_config::AbstractAWSConfig=global_aws_config())
return appsync(
"DELETE",
"/v1/apis/$(apiId)/apikeys/$(id)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_api_key(
apiId,
id,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"DELETE",
"/v1/apis/$(apiId)/apikeys/$(id)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_data_source(api_id, name)
delete_data_source(api_id, name, params::Dict{String,<:Any})
Deletes a DataSource object.
# Arguments
- `api_id`: The API ID.
- `name`: The name of the data source.
"""
function delete_data_source(apiId, name; aws_config::AbstractAWSConfig=global_aws_config())
return appsync(
"DELETE",
"/v1/apis/$(apiId)/datasources/$(name)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_data_source(
apiId,
name,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"DELETE",
"/v1/apis/$(apiId)/datasources/$(name)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_domain_name(domain_name)
delete_domain_name(domain_name, params::Dict{String,<:Any})
Deletes a custom DomainName object.
# Arguments
- `domain_name`: The domain name.
"""
function delete_domain_name(domainName; aws_config::AbstractAWSConfig=global_aws_config())
return appsync(
"DELETE",
"/v1/domainnames/$(domainName)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_domain_name(
domainName,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"DELETE",
"/v1/domainnames/$(domainName)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_function(api_id, function_id)
delete_function(api_id, function_id, params::Dict{String,<:Any})
Deletes a Function.
# Arguments
- `api_id`: The GraphQL API ID.
- `function_id`: The Function ID.
"""
function delete_function(
apiId, functionId; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"DELETE",
"/v1/apis/$(apiId)/functions/$(functionId)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_function(
apiId,
functionId,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"DELETE",
"/v1/apis/$(apiId)/functions/$(functionId)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_graphql_api(api_id)
delete_graphql_api(api_id, params::Dict{String,<:Any})
Deletes a GraphqlApi object.
# Arguments
- `api_id`: The API ID.
"""
function delete_graphql_api(apiId; aws_config::AbstractAWSConfig=global_aws_config())
return appsync(
"DELETE",
"/v1/apis/$(apiId)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_graphql_api(
apiId, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"DELETE",
"/v1/apis/$(apiId)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_resolver(api_id, field_name, type_name)
delete_resolver(api_id, field_name, type_name, params::Dict{String,<:Any})
Deletes a Resolver object.
# Arguments
- `api_id`: The API ID.
- `field_name`: The resolver field name.
- `type_name`: The name of the resolver type.
"""
function delete_resolver(
apiId, fieldName, typeName; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"DELETE",
"/v1/apis/$(apiId)/types/$(typeName)/resolvers/$(fieldName)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_resolver(
apiId,
fieldName,
typeName,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"DELETE",
"/v1/apis/$(apiId)/types/$(typeName)/resolvers/$(fieldName)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_type(api_id, type_name)
delete_type(api_id, type_name, params::Dict{String,<:Any})
Deletes a Type object.
# Arguments
- `api_id`: The API ID.
- `type_name`: The type name.
"""
function delete_type(apiId, typeName; aws_config::AbstractAWSConfig=global_aws_config())
return appsync(
"DELETE",
"/v1/apis/$(apiId)/types/$(typeName)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_type(
apiId,
typeName,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"DELETE",
"/v1/apis/$(apiId)/types/$(typeName)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
disassociate_api(domain_name)
disassociate_api(domain_name, params::Dict{String,<:Any})
Removes an ApiAssociation object from a custom domain.
# Arguments
- `domain_name`: The domain name.
"""
function disassociate_api(domainName; aws_config::AbstractAWSConfig=global_aws_config())
return appsync(
"DELETE",
"/v1/domainnames/$(domainName)/apiassociation";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function disassociate_api(
domainName,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"DELETE",
"/v1/domainnames/$(domainName)/apiassociation",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
disassociate_merged_graphql_api(association_id, source_api_identifier)
disassociate_merged_graphql_api(association_id, source_api_identifier, params::Dict{String,<:Any})
Deletes an association between a Merged API and source API using the source API's
identifier and the association ID.
# Arguments
- `association_id`: The ID generated by the AppSync service for the source API association.
- `source_api_identifier`: The identifier of the AppSync Source API. This is generated by
the AppSync service. In most cases, source APIs (especially in your account) only require
the API ID value or ARN of the source API. However, source APIs from other accounts
(cross-account use cases) strictly require the full resource ARN of the source API.
"""
function disassociate_merged_graphql_api(
associationId, sourceApiIdentifier; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"DELETE",
"/v1/sourceApis/$(sourceApiIdentifier)/mergedApiAssociations/$(associationId)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function disassociate_merged_graphql_api(
associationId,
sourceApiIdentifier,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"DELETE",
"/v1/sourceApis/$(sourceApiIdentifier)/mergedApiAssociations/$(associationId)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
disassociate_source_graphql_api(association_id, merged_api_identifier)
disassociate_source_graphql_api(association_id, merged_api_identifier, params::Dict{String,<:Any})
Deletes an association between a Merged API and source API using the Merged API's
identifier and the association ID.
# Arguments
- `association_id`: The ID generated by the AppSync service for the source API association.
- `merged_api_identifier`: The identifier of the AppSync Merged API. This is generated by
the AppSync service. In most cases, Merged APIs (especially in your account) only require
the API ID value or ARN of the merged API. However, Merged APIs in other accounts
(cross-account use cases) strictly require the full resource ARN of the merged API.
"""
function disassociate_source_graphql_api(
associationId, mergedApiIdentifier; aws_config::AbstractAWSConfig=global_aws_config()
)
return appsync(
"DELETE",
"/v1/mergedApis/$(mergedApiIdentifier)/sourceApiAssociations/$(associationId)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function disassociate_source_graphql_api(
associationId,
mergedApiIdentifier,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return appsync(
"DELETE",
"/v1/mergedApis/$(mergedApiIdentifier)/sourceApiAssociations/$(associationId)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
evaluate_code(code, context, runtime)
evaluate_code(code, context, runtime, params::Dict{String,<:Any})
Evaluates the given code and returns the response. The code definition requirements depend
on the specified runtime. For APPSYNC_JS runtimes, the code defines the request and
response functions. The request function takes the incoming request after a GraphQL
operation is parsed and converts it into a request configuration for the selected data
source operation. The response function interprets responses from the data source and maps
it to the shape of the GraphQL field output type.
# Arguments
- `code`: The code definition to be evaluated. Note that code and runtime are both required
for this action. The runtime value must be APPSYNC_JS.
- `context`: The map that holds all of the contextual information for your resolver
invocation. A context is required for this action.
- `runtime`: The runtime to be used when evaluating the code. Currently, only the
APPSYNC_JS runtime is supported.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"function"`: The function within the code to be evaluated. If provided, the valid values
are request and response.