@aws-sdk/client-appsync 3.43.0 → 3.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +7 -7
- package/dist-cjs/AppSync.js +120 -0
- package/dist-cjs/commands/AssociateApiCommand.js +36 -0
- package/dist-cjs/commands/CreateDomainNameCommand.js +36 -0
- package/dist-cjs/commands/DeleteDomainNameCommand.js +36 -0
- package/dist-cjs/commands/DisassociateApiCommand.js +36 -0
- package/dist-cjs/commands/GetApiAssociationCommand.js +36 -0
- package/dist-cjs/commands/GetDomainNameCommand.js +36 -0
- package/dist-cjs/commands/ListDomainNamesCommand.js +36 -0
- package/dist-cjs/commands/UpdateDomainNameCommand.js +36 -0
- package/dist-cjs/commands/index.js +8 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +136 -21
- package/dist-cjs/protocols/Aws_restJson1.js +911 -93
- package/dist-es/AppSync.js +120 -0
- package/dist-es/commands/AssociateApiCommand.js +39 -0
- package/dist-es/commands/CreateDomainNameCommand.js +39 -0
- package/dist-es/commands/DeleteDomainNameCommand.js +39 -0
- package/dist-es/commands/DisassociateApiCommand.js +39 -0
- package/dist-es/commands/GetApiAssociationCommand.js +39 -0
- package/dist-es/commands/GetDomainNameCommand.js +39 -0
- package/dist-es/commands/ListDomainNamesCommand.js +39 -0
- package/dist-es/commands/UpdateDomainNameCommand.js +39 -0
- package/dist-es/commands/index.js +8 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +90 -12
- package/dist-es/protocols/Aws_restJson1.js +1039 -84
- package/dist-types/AppSync.d.ts +60 -5
- package/dist-types/AppSyncClient.d.ts +10 -2
- package/dist-types/commands/AssociateApiCommand.d.ts +35 -0
- package/dist-types/commands/CreateApiKeyCommand.d.ts +1 -2
- package/dist-types/commands/CreateDomainNameCommand.d.ts +35 -0
- package/dist-types/commands/CreateFunctionCommand.d.ts +1 -1
- package/dist-types/commands/CreateResolverCommand.d.ts +1 -1
- package/dist-types/commands/DeleteDomainNameCommand.d.ts +35 -0
- package/dist-types/commands/DisassociateApiCommand.d.ts +35 -0
- package/dist-types/commands/GetApiAssociationCommand.d.ts +35 -0
- package/dist-types/commands/GetDomainNameCommand.d.ts +35 -0
- package/dist-types/commands/ListDomainNamesCommand.d.ts +35 -0
- package/dist-types/commands/UpdateApiKeyCommand.d.ts +1 -1
- package/dist-types/commands/UpdateDomainNameCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +8 -0
- package/dist-types/models/models_0.d.ts +554 -255
- package/dist-types/protocols/Aws_restJson1.d.ts +24 -0
- package/dist-types/ts3.4/AppSync.d.ts +40 -0
- package/dist-types/ts3.4/AppSyncClient.d.ts +10 -2
- package/dist-types/ts3.4/commands/AssociateApiCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateDomainNameCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteDomainNameCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DisassociateApiCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetApiAssociationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDomainNameCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDomainNamesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateDomainNameCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +8 -0
- package/dist-types/ts3.4/models/models_0.d.ts +203 -30
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- package/package.json +5 -5
|
@@ -1,9 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.deserializeAws_restJson1UpdateTypeCommand = exports.deserializeAws_restJson1UpdateResolverCommand = exports.deserializeAws_restJson1UpdateGraphqlApiCommand = exports.deserializeAws_restJson1UpdateFunctionCommand = exports.deserializeAws_restJson1UpdateDataSourceCommand = exports.deserializeAws_restJson1UpdateApiKeyCommand = exports.deserializeAws_restJson1UpdateApiCacheCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartSchemaCreationCommand = exports.deserializeAws_restJson1ListTypesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListResolversByFunctionCommand = exports.deserializeAws_restJson1ListResolversCommand = exports.deserializeAws_restJson1ListGraphqlApisCommand = exports.deserializeAws_restJson1ListFunctionsCommand = exports.deserializeAws_restJson1ListDataSourcesCommand = exports.deserializeAws_restJson1ListApiKeysCommand = exports.deserializeAws_restJson1GetTypeCommand = exports.deserializeAws_restJson1GetSchemaCreationStatusCommand = exports.deserializeAws_restJson1GetResolverCommand = exports.deserializeAws_restJson1GetIntrospectionSchemaCommand = exports.deserializeAws_restJson1GetGraphqlApiCommand = exports.deserializeAws_restJson1GetFunctionCommand = exports.deserializeAws_restJson1GetDataSourceCommand = exports.deserializeAws_restJson1GetApiCacheCommand = exports.deserializeAws_restJson1FlushApiCacheCommand = exports.deserializeAws_restJson1DeleteTypeCommand = exports.deserializeAws_restJson1DeleteResolverCommand = exports.deserializeAws_restJson1DeleteGraphqlApiCommand = exports.deserializeAws_restJson1DeleteFunctionCommand = exports.deserializeAws_restJson1DeleteDataSourceCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1AssociateApiCommand = exports.serializeAws_restJson1UpdateTypeCommand = exports.serializeAws_restJson1UpdateResolverCommand = exports.serializeAws_restJson1UpdateGraphqlApiCommand = exports.serializeAws_restJson1UpdateFunctionCommand = exports.serializeAws_restJson1UpdateDomainNameCommand = exports.serializeAws_restJson1UpdateDataSourceCommand = exports.serializeAws_restJson1UpdateApiKeyCommand = exports.serializeAws_restJson1UpdateApiCacheCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartSchemaCreationCommand = exports.serializeAws_restJson1ListTypesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListResolversByFunctionCommand = exports.serializeAws_restJson1ListResolversCommand = exports.serializeAws_restJson1ListGraphqlApisCommand = exports.serializeAws_restJson1ListFunctionsCommand = exports.serializeAws_restJson1ListDomainNamesCommand = exports.serializeAws_restJson1ListDataSourcesCommand = exports.serializeAws_restJson1ListApiKeysCommand = exports.serializeAws_restJson1GetTypeCommand = exports.serializeAws_restJson1GetSchemaCreationStatusCommand = exports.serializeAws_restJson1GetResolverCommand = exports.serializeAws_restJson1GetIntrospectionSchemaCommand = exports.serializeAws_restJson1GetGraphqlApiCommand = exports.serializeAws_restJson1GetFunctionCommand = exports.serializeAws_restJson1GetDomainNameCommand = exports.serializeAws_restJson1GetDataSourceCommand = exports.serializeAws_restJson1GetApiCacheCommand = exports.serializeAws_restJson1GetApiAssociationCommand = exports.serializeAws_restJson1FlushApiCacheCommand = exports.serializeAws_restJson1DisassociateApiCommand = exports.serializeAws_restJson1DeleteTypeCommand = exports.serializeAws_restJson1DeleteResolverCommand = exports.serializeAws_restJson1DeleteGraphqlApiCommand = exports.serializeAws_restJson1DeleteFunctionCommand = exports.serializeAws_restJson1DeleteDomainNameCommand = exports.serializeAws_restJson1DeleteDataSourceCommand = exports.serializeAws_restJson1DeleteApiKeyCommand = exports.serializeAws_restJson1DeleteApiCacheCommand = exports.serializeAws_restJson1CreateTypeCommand = exports.serializeAws_restJson1CreateResolverCommand = exports.serializeAws_restJson1CreateGraphqlApiCommand = exports.serializeAws_restJson1CreateFunctionCommand = exports.serializeAws_restJson1CreateDomainNameCommand = exports.serializeAws_restJson1CreateDataSourceCommand = exports.serializeAws_restJson1CreateApiKeyCommand = exports.serializeAws_restJson1CreateApiCacheCommand = exports.serializeAws_restJson1AssociateApiCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1UpdateTypeCommand = exports.deserializeAws_restJson1UpdateResolverCommand = exports.deserializeAws_restJson1UpdateGraphqlApiCommand = exports.deserializeAws_restJson1UpdateFunctionCommand = exports.deserializeAws_restJson1UpdateDomainNameCommand = exports.deserializeAws_restJson1UpdateDataSourceCommand = exports.deserializeAws_restJson1UpdateApiKeyCommand = exports.deserializeAws_restJson1UpdateApiCacheCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartSchemaCreationCommand = exports.deserializeAws_restJson1ListTypesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListResolversByFunctionCommand = exports.deserializeAws_restJson1ListResolversCommand = exports.deserializeAws_restJson1ListGraphqlApisCommand = exports.deserializeAws_restJson1ListFunctionsCommand = exports.deserializeAws_restJson1ListDomainNamesCommand = exports.deserializeAws_restJson1ListDataSourcesCommand = exports.deserializeAws_restJson1ListApiKeysCommand = exports.deserializeAws_restJson1GetTypeCommand = exports.deserializeAws_restJson1GetSchemaCreationStatusCommand = exports.deserializeAws_restJson1GetResolverCommand = exports.deserializeAws_restJson1GetIntrospectionSchemaCommand = exports.deserializeAws_restJson1GetGraphqlApiCommand = exports.deserializeAws_restJson1GetFunctionCommand = exports.deserializeAws_restJson1GetDomainNameCommand = exports.deserializeAws_restJson1GetDataSourceCommand = exports.deserializeAws_restJson1GetApiCacheCommand = exports.deserializeAws_restJson1GetApiAssociationCommand = exports.deserializeAws_restJson1FlushApiCacheCommand = exports.deserializeAws_restJson1DisassociateApiCommand = exports.deserializeAws_restJson1DeleteTypeCommand = exports.deserializeAws_restJson1DeleteResolverCommand = exports.deserializeAws_restJson1DeleteGraphqlApiCommand = exports.deserializeAws_restJson1DeleteFunctionCommand = exports.deserializeAws_restJson1DeleteDomainNameCommand = exports.deserializeAws_restJson1DeleteDataSourceCommand = exports.deserializeAws_restJson1DeleteApiKeyCommand = exports.deserializeAws_restJson1DeleteApiCacheCommand = exports.deserializeAws_restJson1CreateTypeCommand = exports.deserializeAws_restJson1CreateResolverCommand = exports.deserializeAws_restJson1CreateGraphqlApiCommand = exports.deserializeAws_restJson1CreateFunctionCommand = exports.deserializeAws_restJson1CreateDomainNameCommand = exports.deserializeAws_restJson1CreateDataSourceCommand = exports.deserializeAws_restJson1CreateApiKeyCommand = exports.deserializeAws_restJson1CreateApiCacheCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const serializeAws_restJson1AssociateApiCommand = async (input, context) => {
|
|
8
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
9
|
+
const headers = {
|
|
10
|
+
"content-type": "application/json",
|
|
11
|
+
};
|
|
12
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}/apiassociation";
|
|
13
|
+
if (input.domainName !== undefined) {
|
|
14
|
+
const labelValue = input.domainName;
|
|
15
|
+
if (labelValue.length <= 0) {
|
|
16
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
17
|
+
}
|
|
18
|
+
resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
22
|
+
}
|
|
23
|
+
let body;
|
|
24
|
+
body = JSON.stringify({
|
|
25
|
+
...(input.apiId !== undefined && input.apiId !== null && { apiId: input.apiId }),
|
|
26
|
+
});
|
|
27
|
+
return new protocol_http_1.HttpRequest({
|
|
28
|
+
protocol,
|
|
29
|
+
hostname,
|
|
30
|
+
port,
|
|
31
|
+
method: "POST",
|
|
32
|
+
headers,
|
|
33
|
+
path: resolvedPath,
|
|
34
|
+
body,
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
exports.serializeAws_restJson1AssociateApiCommand = serializeAws_restJson1AssociateApiCommand;
|
|
7
38
|
const serializeAws_restJson1CreateApiCacheCommand = async (input, context) => {
|
|
8
39
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
9
40
|
const headers = {
|
|
@@ -133,6 +164,30 @@ const serializeAws_restJson1CreateDataSourceCommand = async (input, context) =>
|
|
|
133
164
|
});
|
|
134
165
|
};
|
|
135
166
|
exports.serializeAws_restJson1CreateDataSourceCommand = serializeAws_restJson1CreateDataSourceCommand;
|
|
167
|
+
const serializeAws_restJson1CreateDomainNameCommand = async (input, context) => {
|
|
168
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
169
|
+
const headers = {
|
|
170
|
+
"content-type": "application/json",
|
|
171
|
+
};
|
|
172
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames";
|
|
173
|
+
let body;
|
|
174
|
+
body = JSON.stringify({
|
|
175
|
+
...(input.certificateArn !== undefined &&
|
|
176
|
+
input.certificateArn !== null && { certificateArn: input.certificateArn }),
|
|
177
|
+
...(input.description !== undefined && input.description !== null && { description: input.description }),
|
|
178
|
+
...(input.domainName !== undefined && input.domainName !== null && { domainName: input.domainName }),
|
|
179
|
+
});
|
|
180
|
+
return new protocol_http_1.HttpRequest({
|
|
181
|
+
protocol,
|
|
182
|
+
hostname,
|
|
183
|
+
port,
|
|
184
|
+
method: "POST",
|
|
185
|
+
headers,
|
|
186
|
+
path: resolvedPath,
|
|
187
|
+
body,
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
exports.serializeAws_restJson1CreateDomainNameCommand = serializeAws_restJson1CreateDomainNameCommand;
|
|
136
191
|
const serializeAws_restJson1CreateFunctionCommand = async (input, context) => {
|
|
137
192
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
138
193
|
const headers = {
|
|
@@ -407,6 +462,32 @@ const serializeAws_restJson1DeleteDataSourceCommand = async (input, context) =>
|
|
|
407
462
|
});
|
|
408
463
|
};
|
|
409
464
|
exports.serializeAws_restJson1DeleteDataSourceCommand = serializeAws_restJson1DeleteDataSourceCommand;
|
|
465
|
+
const serializeAws_restJson1DeleteDomainNameCommand = async (input, context) => {
|
|
466
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
467
|
+
const headers = {};
|
|
468
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
|
|
469
|
+
if (input.domainName !== undefined) {
|
|
470
|
+
const labelValue = input.domainName;
|
|
471
|
+
if (labelValue.length <= 0) {
|
|
472
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
473
|
+
}
|
|
474
|
+
resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
478
|
+
}
|
|
479
|
+
let body;
|
|
480
|
+
return new protocol_http_1.HttpRequest({
|
|
481
|
+
protocol,
|
|
482
|
+
hostname,
|
|
483
|
+
port,
|
|
484
|
+
method: "DELETE",
|
|
485
|
+
headers,
|
|
486
|
+
path: resolvedPath,
|
|
487
|
+
body,
|
|
488
|
+
});
|
|
489
|
+
};
|
|
490
|
+
exports.serializeAws_restJson1DeleteDomainNameCommand = serializeAws_restJson1DeleteDomainNameCommand;
|
|
410
491
|
const serializeAws_restJson1DeleteFunctionCommand = async (input, context) => {
|
|
411
492
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
412
493
|
const headers = {};
|
|
@@ -552,6 +633,32 @@ const serializeAws_restJson1DeleteTypeCommand = async (input, context) => {
|
|
|
552
633
|
});
|
|
553
634
|
};
|
|
554
635
|
exports.serializeAws_restJson1DeleteTypeCommand = serializeAws_restJson1DeleteTypeCommand;
|
|
636
|
+
const serializeAws_restJson1DisassociateApiCommand = async (input, context) => {
|
|
637
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
638
|
+
const headers = {};
|
|
639
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}/apiassociation";
|
|
640
|
+
if (input.domainName !== undefined) {
|
|
641
|
+
const labelValue = input.domainName;
|
|
642
|
+
if (labelValue.length <= 0) {
|
|
643
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
644
|
+
}
|
|
645
|
+
resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
646
|
+
}
|
|
647
|
+
else {
|
|
648
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
649
|
+
}
|
|
650
|
+
let body;
|
|
651
|
+
return new protocol_http_1.HttpRequest({
|
|
652
|
+
protocol,
|
|
653
|
+
hostname,
|
|
654
|
+
port,
|
|
655
|
+
method: "DELETE",
|
|
656
|
+
headers,
|
|
657
|
+
path: resolvedPath,
|
|
658
|
+
body,
|
|
659
|
+
});
|
|
660
|
+
};
|
|
661
|
+
exports.serializeAws_restJson1DisassociateApiCommand = serializeAws_restJson1DisassociateApiCommand;
|
|
555
662
|
const serializeAws_restJson1FlushApiCacheCommand = async (input, context) => {
|
|
556
663
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
557
664
|
const headers = {};
|
|
@@ -578,6 +685,32 @@ const serializeAws_restJson1FlushApiCacheCommand = async (input, context) => {
|
|
|
578
685
|
});
|
|
579
686
|
};
|
|
580
687
|
exports.serializeAws_restJson1FlushApiCacheCommand = serializeAws_restJson1FlushApiCacheCommand;
|
|
688
|
+
const serializeAws_restJson1GetApiAssociationCommand = async (input, context) => {
|
|
689
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
690
|
+
const headers = {};
|
|
691
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}/apiassociation";
|
|
692
|
+
if (input.domainName !== undefined) {
|
|
693
|
+
const labelValue = input.domainName;
|
|
694
|
+
if (labelValue.length <= 0) {
|
|
695
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
696
|
+
}
|
|
697
|
+
resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
701
|
+
}
|
|
702
|
+
let body;
|
|
703
|
+
return new protocol_http_1.HttpRequest({
|
|
704
|
+
protocol,
|
|
705
|
+
hostname,
|
|
706
|
+
port,
|
|
707
|
+
method: "GET",
|
|
708
|
+
headers,
|
|
709
|
+
path: resolvedPath,
|
|
710
|
+
body,
|
|
711
|
+
});
|
|
712
|
+
};
|
|
713
|
+
exports.serializeAws_restJson1GetApiAssociationCommand = serializeAws_restJson1GetApiAssociationCommand;
|
|
581
714
|
const serializeAws_restJson1GetApiCacheCommand = async (input, context) => {
|
|
582
715
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
583
716
|
const headers = {};
|
|
@@ -640,6 +773,32 @@ const serializeAws_restJson1GetDataSourceCommand = async (input, context) => {
|
|
|
640
773
|
});
|
|
641
774
|
};
|
|
642
775
|
exports.serializeAws_restJson1GetDataSourceCommand = serializeAws_restJson1GetDataSourceCommand;
|
|
776
|
+
const serializeAws_restJson1GetDomainNameCommand = async (input, context) => {
|
|
777
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
778
|
+
const headers = {};
|
|
779
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
|
|
780
|
+
if (input.domainName !== undefined) {
|
|
781
|
+
const labelValue = input.domainName;
|
|
782
|
+
if (labelValue.length <= 0) {
|
|
783
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
784
|
+
}
|
|
785
|
+
resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
786
|
+
}
|
|
787
|
+
else {
|
|
788
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
789
|
+
}
|
|
790
|
+
let body;
|
|
791
|
+
return new protocol_http_1.HttpRequest({
|
|
792
|
+
protocol,
|
|
793
|
+
hostname,
|
|
794
|
+
port,
|
|
795
|
+
method: "GET",
|
|
796
|
+
headers,
|
|
797
|
+
path: resolvedPath,
|
|
798
|
+
body,
|
|
799
|
+
});
|
|
800
|
+
};
|
|
801
|
+
exports.serializeAws_restJson1GetDomainNameCommand = serializeAws_restJson1GetDomainNameCommand;
|
|
643
802
|
const serializeAws_restJson1GetFunctionCommand = async (input, context) => {
|
|
644
803
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
645
804
|
const headers = {};
|
|
@@ -908,6 +1067,27 @@ const serializeAws_restJson1ListDataSourcesCommand = async (input, context) => {
|
|
|
908
1067
|
});
|
|
909
1068
|
};
|
|
910
1069
|
exports.serializeAws_restJson1ListDataSourcesCommand = serializeAws_restJson1ListDataSourcesCommand;
|
|
1070
|
+
const serializeAws_restJson1ListDomainNamesCommand = async (input, context) => {
|
|
1071
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1072
|
+
const headers = {};
|
|
1073
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames";
|
|
1074
|
+
const query = {
|
|
1075
|
+
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
1076
|
+
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
|
|
1077
|
+
};
|
|
1078
|
+
let body;
|
|
1079
|
+
return new protocol_http_1.HttpRequest({
|
|
1080
|
+
protocol,
|
|
1081
|
+
hostname,
|
|
1082
|
+
port,
|
|
1083
|
+
method: "GET",
|
|
1084
|
+
headers,
|
|
1085
|
+
path: resolvedPath,
|
|
1086
|
+
query,
|
|
1087
|
+
body,
|
|
1088
|
+
});
|
|
1089
|
+
};
|
|
1090
|
+
exports.serializeAws_restJson1ListDomainNamesCommand = serializeAws_restJson1ListDomainNamesCommand;
|
|
911
1091
|
const serializeAws_restJson1ListFunctionsCommand = async (input, context) => {
|
|
912
1092
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
913
1093
|
const headers = {};
|
|
@@ -1339,6 +1519,37 @@ const serializeAws_restJson1UpdateDataSourceCommand = async (input, context) =>
|
|
|
1339
1519
|
});
|
|
1340
1520
|
};
|
|
1341
1521
|
exports.serializeAws_restJson1UpdateDataSourceCommand = serializeAws_restJson1UpdateDataSourceCommand;
|
|
1522
|
+
const serializeAws_restJson1UpdateDomainNameCommand = async (input, context) => {
|
|
1523
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1524
|
+
const headers = {
|
|
1525
|
+
"content-type": "application/json",
|
|
1526
|
+
};
|
|
1527
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
|
|
1528
|
+
if (input.domainName !== undefined) {
|
|
1529
|
+
const labelValue = input.domainName;
|
|
1530
|
+
if (labelValue.length <= 0) {
|
|
1531
|
+
throw new Error("Empty value provided for input HTTP label: domainName.");
|
|
1532
|
+
}
|
|
1533
|
+
resolvedPath = resolvedPath.replace("{domainName}", smithy_client_1.extendedEncodeURIComponent(labelValue));
|
|
1534
|
+
}
|
|
1535
|
+
else {
|
|
1536
|
+
throw new Error("No value provided for input HTTP label: domainName.");
|
|
1537
|
+
}
|
|
1538
|
+
let body;
|
|
1539
|
+
body = JSON.stringify({
|
|
1540
|
+
...(input.description !== undefined && input.description !== null && { description: input.description }),
|
|
1541
|
+
});
|
|
1542
|
+
return new protocol_http_1.HttpRequest({
|
|
1543
|
+
protocol,
|
|
1544
|
+
hostname,
|
|
1545
|
+
port,
|
|
1546
|
+
method: "POST",
|
|
1547
|
+
headers,
|
|
1548
|
+
path: resolvedPath,
|
|
1549
|
+
body,
|
|
1550
|
+
});
|
|
1551
|
+
};
|
|
1552
|
+
exports.serializeAws_restJson1UpdateDomainNameCommand = serializeAws_restJson1UpdateDomainNameCommand;
|
|
1342
1553
|
const serializeAws_restJson1UpdateFunctionCommand = async (input, context) => {
|
|
1343
1554
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1344
1555
|
const headers = {
|
|
@@ -1553,6 +1764,78 @@ const serializeAws_restJson1UpdateTypeCommand = async (input, context) => {
|
|
|
1553
1764
|
});
|
|
1554
1765
|
};
|
|
1555
1766
|
exports.serializeAws_restJson1UpdateTypeCommand = serializeAws_restJson1UpdateTypeCommand;
|
|
1767
|
+
const deserializeAws_restJson1AssociateApiCommand = async (output, context) => {
|
|
1768
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1769
|
+
return deserializeAws_restJson1AssociateApiCommandError(output, context);
|
|
1770
|
+
}
|
|
1771
|
+
const contents = {
|
|
1772
|
+
$metadata: deserializeMetadata(output),
|
|
1773
|
+
apiAssociation: undefined,
|
|
1774
|
+
};
|
|
1775
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1776
|
+
if (data.apiAssociation !== undefined && data.apiAssociation !== null) {
|
|
1777
|
+
contents.apiAssociation = deserializeAws_restJson1ApiAssociation(data.apiAssociation, context);
|
|
1778
|
+
}
|
|
1779
|
+
return Promise.resolve(contents);
|
|
1780
|
+
};
|
|
1781
|
+
exports.deserializeAws_restJson1AssociateApiCommand = deserializeAws_restJson1AssociateApiCommand;
|
|
1782
|
+
const deserializeAws_restJson1AssociateApiCommandError = async (output, context) => {
|
|
1783
|
+
const parsedOutput = {
|
|
1784
|
+
...output,
|
|
1785
|
+
body: await parseBody(output.body, context),
|
|
1786
|
+
};
|
|
1787
|
+
let response;
|
|
1788
|
+
let errorCode = "UnknownError";
|
|
1789
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1790
|
+
switch (errorCode) {
|
|
1791
|
+
case "AccessDeniedException":
|
|
1792
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
1793
|
+
response = {
|
|
1794
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1795
|
+
name: errorCode,
|
|
1796
|
+
$metadata: deserializeMetadata(output),
|
|
1797
|
+
};
|
|
1798
|
+
break;
|
|
1799
|
+
case "BadRequestException":
|
|
1800
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
1801
|
+
response = {
|
|
1802
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1803
|
+
name: errorCode,
|
|
1804
|
+
$metadata: deserializeMetadata(output),
|
|
1805
|
+
};
|
|
1806
|
+
break;
|
|
1807
|
+
case "InternalFailureException":
|
|
1808
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
1809
|
+
response = {
|
|
1810
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
1811
|
+
name: errorCode,
|
|
1812
|
+
$metadata: deserializeMetadata(output),
|
|
1813
|
+
};
|
|
1814
|
+
break;
|
|
1815
|
+
case "NotFoundException":
|
|
1816
|
+
case "com.amazonaws.appsync#NotFoundException":
|
|
1817
|
+
response = {
|
|
1818
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
1819
|
+
name: errorCode,
|
|
1820
|
+
$metadata: deserializeMetadata(output),
|
|
1821
|
+
};
|
|
1822
|
+
break;
|
|
1823
|
+
default:
|
|
1824
|
+
const parsedBody = parsedOutput.body;
|
|
1825
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1826
|
+
response = {
|
|
1827
|
+
...parsedBody,
|
|
1828
|
+
name: `${errorCode}`,
|
|
1829
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1830
|
+
$fault: "client",
|
|
1831
|
+
$metadata: deserializeMetadata(output),
|
|
1832
|
+
};
|
|
1833
|
+
}
|
|
1834
|
+
const message = response.message || response.Message || errorCode;
|
|
1835
|
+
response.message = message;
|
|
1836
|
+
delete response.Message;
|
|
1837
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1838
|
+
};
|
|
1556
1839
|
const deserializeAws_restJson1CreateApiCacheCommand = async (output, context) => {
|
|
1557
1840
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1558
1841
|
return deserializeAws_restJson1CreateApiCacheCommandError(output, context);
|
|
@@ -1809,22 +2092,22 @@ const deserializeAws_restJson1CreateDataSourceCommandError = async (output, cont
|
|
|
1809
2092
|
delete response.Message;
|
|
1810
2093
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1811
2094
|
};
|
|
1812
|
-
const
|
|
2095
|
+
const deserializeAws_restJson1CreateDomainNameCommand = async (output, context) => {
|
|
1813
2096
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1814
|
-
return
|
|
2097
|
+
return deserializeAws_restJson1CreateDomainNameCommandError(output, context);
|
|
1815
2098
|
}
|
|
1816
2099
|
const contents = {
|
|
1817
2100
|
$metadata: deserializeMetadata(output),
|
|
1818
|
-
|
|
2101
|
+
domainNameConfig: undefined,
|
|
1819
2102
|
};
|
|
1820
2103
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1821
|
-
if (data.
|
|
1822
|
-
contents.
|
|
2104
|
+
if (data.domainNameConfig !== undefined && data.domainNameConfig !== null) {
|
|
2105
|
+
contents.domainNameConfig = deserializeAws_restJson1DomainNameConfig(data.domainNameConfig, context);
|
|
1823
2106
|
}
|
|
1824
2107
|
return Promise.resolve(contents);
|
|
1825
2108
|
};
|
|
1826
|
-
exports.
|
|
1827
|
-
const
|
|
2109
|
+
exports.deserializeAws_restJson1CreateDomainNameCommand = deserializeAws_restJson1CreateDomainNameCommand;
|
|
2110
|
+
const deserializeAws_restJson1CreateDomainNameCommandError = async (output, context) => {
|
|
1828
2111
|
const parsedOutput = {
|
|
1829
2112
|
...output,
|
|
1830
2113
|
body: await parseBody(output.body, context),
|
|
@@ -1833,34 +2116,26 @@ const deserializeAws_restJson1CreateFunctionCommandError = async (output, contex
|
|
|
1833
2116
|
let errorCode = "UnknownError";
|
|
1834
2117
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1835
2118
|
switch (errorCode) {
|
|
1836
|
-
case "
|
|
1837
|
-
case "com.amazonaws.appsync#
|
|
1838
|
-
response = {
|
|
1839
|
-
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
1840
|
-
name: errorCode,
|
|
1841
|
-
$metadata: deserializeMetadata(output),
|
|
1842
|
-
};
|
|
1843
|
-
break;
|
|
1844
|
-
case "InternalFailureException":
|
|
1845
|
-
case "com.amazonaws.appsync#InternalFailureException":
|
|
2119
|
+
case "AccessDeniedException":
|
|
2120
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
1846
2121
|
response = {
|
|
1847
|
-
...(await
|
|
2122
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1848
2123
|
name: errorCode,
|
|
1849
2124
|
$metadata: deserializeMetadata(output),
|
|
1850
2125
|
};
|
|
1851
2126
|
break;
|
|
1852
|
-
case "
|
|
1853
|
-
case "com.amazonaws.appsync#
|
|
2127
|
+
case "BadRequestException":
|
|
2128
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
1854
2129
|
response = {
|
|
1855
|
-
...(await
|
|
2130
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1856
2131
|
name: errorCode,
|
|
1857
2132
|
$metadata: deserializeMetadata(output),
|
|
1858
2133
|
};
|
|
1859
2134
|
break;
|
|
1860
|
-
case "
|
|
1861
|
-
case "com.amazonaws.appsync#
|
|
2135
|
+
case "InternalFailureException":
|
|
2136
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
1862
2137
|
response = {
|
|
1863
|
-
...(await
|
|
2138
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
1864
2139
|
name: errorCode,
|
|
1865
2140
|
$metadata: deserializeMetadata(output),
|
|
1866
2141
|
};
|
|
@@ -1881,13 +2156,85 @@ const deserializeAws_restJson1CreateFunctionCommandError = async (output, contex
|
|
|
1881
2156
|
delete response.Message;
|
|
1882
2157
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1883
2158
|
};
|
|
1884
|
-
const
|
|
2159
|
+
const deserializeAws_restJson1CreateFunctionCommand = async (output, context) => {
|
|
1885
2160
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1886
|
-
return
|
|
2161
|
+
return deserializeAws_restJson1CreateFunctionCommandError(output, context);
|
|
1887
2162
|
}
|
|
1888
2163
|
const contents = {
|
|
1889
2164
|
$metadata: deserializeMetadata(output),
|
|
1890
|
-
|
|
2165
|
+
functionConfiguration: undefined,
|
|
2166
|
+
};
|
|
2167
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
2168
|
+
if (data.functionConfiguration !== undefined && data.functionConfiguration !== null) {
|
|
2169
|
+
contents.functionConfiguration = deserializeAws_restJson1FunctionConfiguration(data.functionConfiguration, context);
|
|
2170
|
+
}
|
|
2171
|
+
return Promise.resolve(contents);
|
|
2172
|
+
};
|
|
2173
|
+
exports.deserializeAws_restJson1CreateFunctionCommand = deserializeAws_restJson1CreateFunctionCommand;
|
|
2174
|
+
const deserializeAws_restJson1CreateFunctionCommandError = async (output, context) => {
|
|
2175
|
+
const parsedOutput = {
|
|
2176
|
+
...output,
|
|
2177
|
+
body: await parseBody(output.body, context),
|
|
2178
|
+
};
|
|
2179
|
+
let response;
|
|
2180
|
+
let errorCode = "UnknownError";
|
|
2181
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2182
|
+
switch (errorCode) {
|
|
2183
|
+
case "ConcurrentModificationException":
|
|
2184
|
+
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
2185
|
+
response = {
|
|
2186
|
+
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
2187
|
+
name: errorCode,
|
|
2188
|
+
$metadata: deserializeMetadata(output),
|
|
2189
|
+
};
|
|
2190
|
+
break;
|
|
2191
|
+
case "InternalFailureException":
|
|
2192
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
2193
|
+
response = {
|
|
2194
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
2195
|
+
name: errorCode,
|
|
2196
|
+
$metadata: deserializeMetadata(output),
|
|
2197
|
+
};
|
|
2198
|
+
break;
|
|
2199
|
+
case "NotFoundException":
|
|
2200
|
+
case "com.amazonaws.appsync#NotFoundException":
|
|
2201
|
+
response = {
|
|
2202
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2203
|
+
name: errorCode,
|
|
2204
|
+
$metadata: deserializeMetadata(output),
|
|
2205
|
+
};
|
|
2206
|
+
break;
|
|
2207
|
+
case "UnauthorizedException":
|
|
2208
|
+
case "com.amazonaws.appsync#UnauthorizedException":
|
|
2209
|
+
response = {
|
|
2210
|
+
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2211
|
+
name: errorCode,
|
|
2212
|
+
$metadata: deserializeMetadata(output),
|
|
2213
|
+
};
|
|
2214
|
+
break;
|
|
2215
|
+
default:
|
|
2216
|
+
const parsedBody = parsedOutput.body;
|
|
2217
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2218
|
+
response = {
|
|
2219
|
+
...parsedBody,
|
|
2220
|
+
name: `${errorCode}`,
|
|
2221
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2222
|
+
$fault: "client",
|
|
2223
|
+
$metadata: deserializeMetadata(output),
|
|
2224
|
+
};
|
|
2225
|
+
}
|
|
2226
|
+
const message = response.message || response.Message || errorCode;
|
|
2227
|
+
response.message = message;
|
|
2228
|
+
delete response.Message;
|
|
2229
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
2230
|
+
};
|
|
2231
|
+
const deserializeAws_restJson1CreateGraphqlApiCommand = async (output, context) => {
|
|
2232
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2233
|
+
return deserializeAws_restJson1CreateGraphqlApiCommandError(output, context);
|
|
2234
|
+
}
|
|
2235
|
+
const contents = {
|
|
2236
|
+
$metadata: deserializeMetadata(output),
|
|
2237
|
+
graphqlApi: undefined,
|
|
1891
2238
|
};
|
|
1892
2239
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
1893
2240
|
if (data.graphqlApi !== undefined && data.graphqlApi !== null) {
|
|
@@ -2341,6 +2688,82 @@ const deserializeAws_restJson1DeleteDataSourceCommandError = async (output, cont
|
|
|
2341
2688
|
delete response.Message;
|
|
2342
2689
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
2343
2690
|
};
|
|
2691
|
+
const deserializeAws_restJson1DeleteDomainNameCommand = async (output, context) => {
|
|
2692
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2693
|
+
return deserializeAws_restJson1DeleteDomainNameCommandError(output, context);
|
|
2694
|
+
}
|
|
2695
|
+
const contents = {
|
|
2696
|
+
$metadata: deserializeMetadata(output),
|
|
2697
|
+
};
|
|
2698
|
+
await collectBody(output.body, context);
|
|
2699
|
+
return Promise.resolve(contents);
|
|
2700
|
+
};
|
|
2701
|
+
exports.deserializeAws_restJson1DeleteDomainNameCommand = deserializeAws_restJson1DeleteDomainNameCommand;
|
|
2702
|
+
const deserializeAws_restJson1DeleteDomainNameCommandError = async (output, context) => {
|
|
2703
|
+
const parsedOutput = {
|
|
2704
|
+
...output,
|
|
2705
|
+
body: await parseBody(output.body, context),
|
|
2706
|
+
};
|
|
2707
|
+
let response;
|
|
2708
|
+
let errorCode = "UnknownError";
|
|
2709
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2710
|
+
switch (errorCode) {
|
|
2711
|
+
case "AccessDeniedException":
|
|
2712
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
2713
|
+
response = {
|
|
2714
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2715
|
+
name: errorCode,
|
|
2716
|
+
$metadata: deserializeMetadata(output),
|
|
2717
|
+
};
|
|
2718
|
+
break;
|
|
2719
|
+
case "BadRequestException":
|
|
2720
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
2721
|
+
response = {
|
|
2722
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2723
|
+
name: errorCode,
|
|
2724
|
+
$metadata: deserializeMetadata(output),
|
|
2725
|
+
};
|
|
2726
|
+
break;
|
|
2727
|
+
case "ConcurrentModificationException":
|
|
2728
|
+
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
2729
|
+
response = {
|
|
2730
|
+
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
2731
|
+
name: errorCode,
|
|
2732
|
+
$metadata: deserializeMetadata(output),
|
|
2733
|
+
};
|
|
2734
|
+
break;
|
|
2735
|
+
case "InternalFailureException":
|
|
2736
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
2737
|
+
response = {
|
|
2738
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
2739
|
+
name: errorCode,
|
|
2740
|
+
$metadata: deserializeMetadata(output),
|
|
2741
|
+
};
|
|
2742
|
+
break;
|
|
2743
|
+
case "NotFoundException":
|
|
2744
|
+
case "com.amazonaws.appsync#NotFoundException":
|
|
2745
|
+
response = {
|
|
2746
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2747
|
+
name: errorCode,
|
|
2748
|
+
$metadata: deserializeMetadata(output),
|
|
2749
|
+
};
|
|
2750
|
+
break;
|
|
2751
|
+
default:
|
|
2752
|
+
const parsedBody = parsedOutput.body;
|
|
2753
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2754
|
+
response = {
|
|
2755
|
+
...parsedBody,
|
|
2756
|
+
name: `${errorCode}`,
|
|
2757
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2758
|
+
$fault: "client",
|
|
2759
|
+
$metadata: deserializeMetadata(output),
|
|
2760
|
+
};
|
|
2761
|
+
}
|
|
2762
|
+
const message = response.message || response.Message || errorCode;
|
|
2763
|
+
response.message = message;
|
|
2764
|
+
delete response.Message;
|
|
2765
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
2766
|
+
};
|
|
2344
2767
|
const deserializeAws_restJson1DeleteFunctionCommand = async (output, context) => {
|
|
2345
2768
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2346
2769
|
return deserializeAws_restJson1DeleteFunctionCommandError(output, context);
|
|
@@ -2469,14 +2892,234 @@ const deserializeAws_restJson1DeleteGraphqlApiCommandError = async (output, cont
|
|
|
2469
2892
|
$metadata: deserializeMetadata(output),
|
|
2470
2893
|
};
|
|
2471
2894
|
break;
|
|
2472
|
-
case "UnauthorizedException":
|
|
2473
|
-
case "com.amazonaws.appsync#UnauthorizedException":
|
|
2474
|
-
response = {
|
|
2475
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2476
|
-
name: errorCode,
|
|
2477
|
-
$metadata: deserializeMetadata(output),
|
|
2478
|
-
};
|
|
2479
|
-
break;
|
|
2895
|
+
case "UnauthorizedException":
|
|
2896
|
+
case "com.amazonaws.appsync#UnauthorizedException":
|
|
2897
|
+
response = {
|
|
2898
|
+
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2899
|
+
name: errorCode,
|
|
2900
|
+
$metadata: deserializeMetadata(output),
|
|
2901
|
+
};
|
|
2902
|
+
break;
|
|
2903
|
+
default:
|
|
2904
|
+
const parsedBody = parsedOutput.body;
|
|
2905
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2906
|
+
response = {
|
|
2907
|
+
...parsedBody,
|
|
2908
|
+
name: `${errorCode}`,
|
|
2909
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2910
|
+
$fault: "client",
|
|
2911
|
+
$metadata: deserializeMetadata(output),
|
|
2912
|
+
};
|
|
2913
|
+
}
|
|
2914
|
+
const message = response.message || response.Message || errorCode;
|
|
2915
|
+
response.message = message;
|
|
2916
|
+
delete response.Message;
|
|
2917
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
2918
|
+
};
|
|
2919
|
+
const deserializeAws_restJson1DeleteResolverCommand = async (output, context) => {
|
|
2920
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2921
|
+
return deserializeAws_restJson1DeleteResolverCommandError(output, context);
|
|
2922
|
+
}
|
|
2923
|
+
const contents = {
|
|
2924
|
+
$metadata: deserializeMetadata(output),
|
|
2925
|
+
};
|
|
2926
|
+
await collectBody(output.body, context);
|
|
2927
|
+
return Promise.resolve(contents);
|
|
2928
|
+
};
|
|
2929
|
+
exports.deserializeAws_restJson1DeleteResolverCommand = deserializeAws_restJson1DeleteResolverCommand;
|
|
2930
|
+
const deserializeAws_restJson1DeleteResolverCommandError = async (output, context) => {
|
|
2931
|
+
const parsedOutput = {
|
|
2932
|
+
...output,
|
|
2933
|
+
body: await parseBody(output.body, context),
|
|
2934
|
+
};
|
|
2935
|
+
let response;
|
|
2936
|
+
let errorCode = "UnknownError";
|
|
2937
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2938
|
+
switch (errorCode) {
|
|
2939
|
+
case "ConcurrentModificationException":
|
|
2940
|
+
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
2941
|
+
response = {
|
|
2942
|
+
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
2943
|
+
name: errorCode,
|
|
2944
|
+
$metadata: deserializeMetadata(output),
|
|
2945
|
+
};
|
|
2946
|
+
break;
|
|
2947
|
+
case "InternalFailureException":
|
|
2948
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
2949
|
+
response = {
|
|
2950
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
2951
|
+
name: errorCode,
|
|
2952
|
+
$metadata: deserializeMetadata(output),
|
|
2953
|
+
};
|
|
2954
|
+
break;
|
|
2955
|
+
case "NotFoundException":
|
|
2956
|
+
case "com.amazonaws.appsync#NotFoundException":
|
|
2957
|
+
response = {
|
|
2958
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
2959
|
+
name: errorCode,
|
|
2960
|
+
$metadata: deserializeMetadata(output),
|
|
2961
|
+
};
|
|
2962
|
+
break;
|
|
2963
|
+
case "UnauthorizedException":
|
|
2964
|
+
case "com.amazonaws.appsync#UnauthorizedException":
|
|
2965
|
+
response = {
|
|
2966
|
+
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2967
|
+
name: errorCode,
|
|
2968
|
+
$metadata: deserializeMetadata(output),
|
|
2969
|
+
};
|
|
2970
|
+
break;
|
|
2971
|
+
default:
|
|
2972
|
+
const parsedBody = parsedOutput.body;
|
|
2973
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2974
|
+
response = {
|
|
2975
|
+
...parsedBody,
|
|
2976
|
+
name: `${errorCode}`,
|
|
2977
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2978
|
+
$fault: "client",
|
|
2979
|
+
$metadata: deserializeMetadata(output),
|
|
2980
|
+
};
|
|
2981
|
+
}
|
|
2982
|
+
const message = response.message || response.Message || errorCode;
|
|
2983
|
+
response.message = message;
|
|
2984
|
+
delete response.Message;
|
|
2985
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
2986
|
+
};
|
|
2987
|
+
const deserializeAws_restJson1DeleteTypeCommand = async (output, context) => {
|
|
2988
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2989
|
+
return deserializeAws_restJson1DeleteTypeCommandError(output, context);
|
|
2990
|
+
}
|
|
2991
|
+
const contents = {
|
|
2992
|
+
$metadata: deserializeMetadata(output),
|
|
2993
|
+
};
|
|
2994
|
+
await collectBody(output.body, context);
|
|
2995
|
+
return Promise.resolve(contents);
|
|
2996
|
+
};
|
|
2997
|
+
exports.deserializeAws_restJson1DeleteTypeCommand = deserializeAws_restJson1DeleteTypeCommand;
|
|
2998
|
+
const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) => {
|
|
2999
|
+
const parsedOutput = {
|
|
3000
|
+
...output,
|
|
3001
|
+
body: await parseBody(output.body, context),
|
|
3002
|
+
};
|
|
3003
|
+
let response;
|
|
3004
|
+
let errorCode = "UnknownError";
|
|
3005
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3006
|
+
switch (errorCode) {
|
|
3007
|
+
case "BadRequestException":
|
|
3008
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
3009
|
+
response = {
|
|
3010
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3011
|
+
name: errorCode,
|
|
3012
|
+
$metadata: deserializeMetadata(output),
|
|
3013
|
+
};
|
|
3014
|
+
break;
|
|
3015
|
+
case "ConcurrentModificationException":
|
|
3016
|
+
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
3017
|
+
response = {
|
|
3018
|
+
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
3019
|
+
name: errorCode,
|
|
3020
|
+
$metadata: deserializeMetadata(output),
|
|
3021
|
+
};
|
|
3022
|
+
break;
|
|
3023
|
+
case "InternalFailureException":
|
|
3024
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
3025
|
+
response = {
|
|
3026
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
3027
|
+
name: errorCode,
|
|
3028
|
+
$metadata: deserializeMetadata(output),
|
|
3029
|
+
};
|
|
3030
|
+
break;
|
|
3031
|
+
case "NotFoundException":
|
|
3032
|
+
case "com.amazonaws.appsync#NotFoundException":
|
|
3033
|
+
response = {
|
|
3034
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3035
|
+
name: errorCode,
|
|
3036
|
+
$metadata: deserializeMetadata(output),
|
|
3037
|
+
};
|
|
3038
|
+
break;
|
|
3039
|
+
case "UnauthorizedException":
|
|
3040
|
+
case "com.amazonaws.appsync#UnauthorizedException":
|
|
3041
|
+
response = {
|
|
3042
|
+
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
3043
|
+
name: errorCode,
|
|
3044
|
+
$metadata: deserializeMetadata(output),
|
|
3045
|
+
};
|
|
3046
|
+
break;
|
|
3047
|
+
default:
|
|
3048
|
+
const parsedBody = parsedOutput.body;
|
|
3049
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3050
|
+
response = {
|
|
3051
|
+
...parsedBody,
|
|
3052
|
+
name: `${errorCode}`,
|
|
3053
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3054
|
+
$fault: "client",
|
|
3055
|
+
$metadata: deserializeMetadata(output),
|
|
3056
|
+
};
|
|
3057
|
+
}
|
|
3058
|
+
const message = response.message || response.Message || errorCode;
|
|
3059
|
+
response.message = message;
|
|
3060
|
+
delete response.Message;
|
|
3061
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
3062
|
+
};
|
|
3063
|
+
const deserializeAws_restJson1DisassociateApiCommand = async (output, context) => {
|
|
3064
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3065
|
+
return deserializeAws_restJson1DisassociateApiCommandError(output, context);
|
|
3066
|
+
}
|
|
3067
|
+
const contents = {
|
|
3068
|
+
$metadata: deserializeMetadata(output),
|
|
3069
|
+
};
|
|
3070
|
+
await collectBody(output.body, context);
|
|
3071
|
+
return Promise.resolve(contents);
|
|
3072
|
+
};
|
|
3073
|
+
exports.deserializeAws_restJson1DisassociateApiCommand = deserializeAws_restJson1DisassociateApiCommand;
|
|
3074
|
+
const deserializeAws_restJson1DisassociateApiCommandError = async (output, context) => {
|
|
3075
|
+
const parsedOutput = {
|
|
3076
|
+
...output,
|
|
3077
|
+
body: await parseBody(output.body, context),
|
|
3078
|
+
};
|
|
3079
|
+
let response;
|
|
3080
|
+
let errorCode = "UnknownError";
|
|
3081
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3082
|
+
switch (errorCode) {
|
|
3083
|
+
case "AccessDeniedException":
|
|
3084
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
3085
|
+
response = {
|
|
3086
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3087
|
+
name: errorCode,
|
|
3088
|
+
$metadata: deserializeMetadata(output),
|
|
3089
|
+
};
|
|
3090
|
+
break;
|
|
3091
|
+
case "BadRequestException":
|
|
3092
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
3093
|
+
response = {
|
|
3094
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3095
|
+
name: errorCode,
|
|
3096
|
+
$metadata: deserializeMetadata(output),
|
|
3097
|
+
};
|
|
3098
|
+
break;
|
|
3099
|
+
case "ConcurrentModificationException":
|
|
3100
|
+
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
3101
|
+
response = {
|
|
3102
|
+
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
3103
|
+
name: errorCode,
|
|
3104
|
+
$metadata: deserializeMetadata(output),
|
|
3105
|
+
};
|
|
3106
|
+
break;
|
|
3107
|
+
case "InternalFailureException":
|
|
3108
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
3109
|
+
response = {
|
|
3110
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
3111
|
+
name: errorCode,
|
|
3112
|
+
$metadata: deserializeMetadata(output),
|
|
3113
|
+
};
|
|
3114
|
+
break;
|
|
3115
|
+
case "NotFoundException":
|
|
3116
|
+
case "com.amazonaws.appsync#NotFoundException":
|
|
3117
|
+
response = {
|
|
3118
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
3119
|
+
name: errorCode,
|
|
3120
|
+
$metadata: deserializeMetadata(output),
|
|
3121
|
+
};
|
|
3122
|
+
break;
|
|
2480
3123
|
default:
|
|
2481
3124
|
const parsedBody = parsedOutput.body;
|
|
2482
3125
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -2493,9 +3136,9 @@ const deserializeAws_restJson1DeleteGraphqlApiCommandError = async (output, cont
|
|
|
2493
3136
|
delete response.Message;
|
|
2494
3137
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
2495
3138
|
};
|
|
2496
|
-
const
|
|
3139
|
+
const deserializeAws_restJson1FlushApiCacheCommand = async (output, context) => {
|
|
2497
3140
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2498
|
-
return
|
|
3141
|
+
return deserializeAws_restJson1FlushApiCacheCommandError(output, context);
|
|
2499
3142
|
}
|
|
2500
3143
|
const contents = {
|
|
2501
3144
|
$metadata: deserializeMetadata(output),
|
|
@@ -2503,8 +3146,8 @@ const deserializeAws_restJson1DeleteResolverCommand = async (output, context) =>
|
|
|
2503
3146
|
await collectBody(output.body, context);
|
|
2504
3147
|
return Promise.resolve(contents);
|
|
2505
3148
|
};
|
|
2506
|
-
exports.
|
|
2507
|
-
const
|
|
3149
|
+
exports.deserializeAws_restJson1FlushApiCacheCommand = deserializeAws_restJson1FlushApiCacheCommand;
|
|
3150
|
+
const deserializeAws_restJson1FlushApiCacheCommandError = async (output, context) => {
|
|
2508
3151
|
const parsedOutput = {
|
|
2509
3152
|
...output,
|
|
2510
3153
|
body: await parseBody(output.body, context),
|
|
@@ -2513,6 +3156,14 @@ const deserializeAws_restJson1DeleteResolverCommandError = async (output, contex
|
|
|
2513
3156
|
let errorCode = "UnknownError";
|
|
2514
3157
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2515
3158
|
switch (errorCode) {
|
|
3159
|
+
case "BadRequestException":
|
|
3160
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
3161
|
+
response = {
|
|
3162
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
3163
|
+
name: errorCode,
|
|
3164
|
+
$metadata: deserializeMetadata(output),
|
|
3165
|
+
};
|
|
3166
|
+
break;
|
|
2516
3167
|
case "ConcurrentModificationException":
|
|
2517
3168
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
2518
3169
|
response = {
|
|
@@ -2561,18 +3212,22 @@ const deserializeAws_restJson1DeleteResolverCommandError = async (output, contex
|
|
|
2561
3212
|
delete response.Message;
|
|
2562
3213
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
2563
3214
|
};
|
|
2564
|
-
const
|
|
3215
|
+
const deserializeAws_restJson1GetApiAssociationCommand = async (output, context) => {
|
|
2565
3216
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2566
|
-
return
|
|
3217
|
+
return deserializeAws_restJson1GetApiAssociationCommandError(output, context);
|
|
2567
3218
|
}
|
|
2568
3219
|
const contents = {
|
|
2569
3220
|
$metadata: deserializeMetadata(output),
|
|
3221
|
+
apiAssociation: undefined,
|
|
2570
3222
|
};
|
|
2571
|
-
await
|
|
3223
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
3224
|
+
if (data.apiAssociation !== undefined && data.apiAssociation !== null) {
|
|
3225
|
+
contents.apiAssociation = deserializeAws_restJson1ApiAssociation(data.apiAssociation, context);
|
|
3226
|
+
}
|
|
2572
3227
|
return Promise.resolve(contents);
|
|
2573
3228
|
};
|
|
2574
|
-
exports.
|
|
2575
|
-
const
|
|
3229
|
+
exports.deserializeAws_restJson1GetApiAssociationCommand = deserializeAws_restJson1GetApiAssociationCommand;
|
|
3230
|
+
const deserializeAws_restJson1GetApiAssociationCommandError = async (output, context) => {
|
|
2576
3231
|
const parsedOutput = {
|
|
2577
3232
|
...output,
|
|
2578
3233
|
body: await parseBody(output.body, context),
|
|
@@ -2581,18 +3236,18 @@ const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) =
|
|
|
2581
3236
|
let errorCode = "UnknownError";
|
|
2582
3237
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2583
3238
|
switch (errorCode) {
|
|
2584
|
-
case "
|
|
2585
|
-
case "com.amazonaws.appsync#
|
|
3239
|
+
case "AccessDeniedException":
|
|
3240
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
2586
3241
|
response = {
|
|
2587
|
-
...(await
|
|
3242
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2588
3243
|
name: errorCode,
|
|
2589
3244
|
$metadata: deserializeMetadata(output),
|
|
2590
3245
|
};
|
|
2591
3246
|
break;
|
|
2592
|
-
case "
|
|
2593
|
-
case "com.amazonaws.appsync#
|
|
3247
|
+
case "BadRequestException":
|
|
3248
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
2594
3249
|
response = {
|
|
2595
|
-
...(await
|
|
3250
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2596
3251
|
name: errorCode,
|
|
2597
3252
|
$metadata: deserializeMetadata(output),
|
|
2598
3253
|
};
|
|
@@ -2613,14 +3268,6 @@ const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) =
|
|
|
2613
3268
|
$metadata: deserializeMetadata(output),
|
|
2614
3269
|
};
|
|
2615
3270
|
break;
|
|
2616
|
-
case "UnauthorizedException":
|
|
2617
|
-
case "com.amazonaws.appsync#UnauthorizedException":
|
|
2618
|
-
response = {
|
|
2619
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2620
|
-
name: errorCode,
|
|
2621
|
-
$metadata: deserializeMetadata(output),
|
|
2622
|
-
};
|
|
2623
|
-
break;
|
|
2624
3271
|
default:
|
|
2625
3272
|
const parsedBody = parsedOutput.body;
|
|
2626
3273
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -2637,18 +3284,22 @@ const deserializeAws_restJson1DeleteTypeCommandError = async (output, context) =
|
|
|
2637
3284
|
delete response.Message;
|
|
2638
3285
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
2639
3286
|
};
|
|
2640
|
-
const
|
|
3287
|
+
const deserializeAws_restJson1GetApiCacheCommand = async (output, context) => {
|
|
2641
3288
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2642
|
-
return
|
|
3289
|
+
return deserializeAws_restJson1GetApiCacheCommandError(output, context);
|
|
2643
3290
|
}
|
|
2644
3291
|
const contents = {
|
|
2645
3292
|
$metadata: deserializeMetadata(output),
|
|
3293
|
+
apiCache: undefined,
|
|
2646
3294
|
};
|
|
2647
|
-
await
|
|
3295
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
3296
|
+
if (data.apiCache !== undefined && data.apiCache !== null) {
|
|
3297
|
+
contents.apiCache = deserializeAws_restJson1ApiCache(data.apiCache, context);
|
|
3298
|
+
}
|
|
2648
3299
|
return Promise.resolve(contents);
|
|
2649
3300
|
};
|
|
2650
|
-
exports.
|
|
2651
|
-
const
|
|
3301
|
+
exports.deserializeAws_restJson1GetApiCacheCommand = deserializeAws_restJson1GetApiCacheCommand;
|
|
3302
|
+
const deserializeAws_restJson1GetApiCacheCommandError = async (output, context) => {
|
|
2652
3303
|
const parsedOutput = {
|
|
2653
3304
|
...output,
|
|
2654
3305
|
body: await parseBody(output.body, context),
|
|
@@ -2713,22 +3364,22 @@ const deserializeAws_restJson1FlushApiCacheCommandError = async (output, context
|
|
|
2713
3364
|
delete response.Message;
|
|
2714
3365
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
2715
3366
|
};
|
|
2716
|
-
const
|
|
3367
|
+
const deserializeAws_restJson1GetDataSourceCommand = async (output, context) => {
|
|
2717
3368
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2718
|
-
return
|
|
3369
|
+
return deserializeAws_restJson1GetDataSourceCommandError(output, context);
|
|
2719
3370
|
}
|
|
2720
3371
|
const contents = {
|
|
2721
3372
|
$metadata: deserializeMetadata(output),
|
|
2722
|
-
|
|
3373
|
+
dataSource: undefined,
|
|
2723
3374
|
};
|
|
2724
3375
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
2725
|
-
if (data.
|
|
2726
|
-
contents.
|
|
3376
|
+
if (data.dataSource !== undefined && data.dataSource !== null) {
|
|
3377
|
+
contents.dataSource = deserializeAws_restJson1DataSource(data.dataSource, context);
|
|
2727
3378
|
}
|
|
2728
3379
|
return Promise.resolve(contents);
|
|
2729
3380
|
};
|
|
2730
|
-
exports.
|
|
2731
|
-
const
|
|
3381
|
+
exports.deserializeAws_restJson1GetDataSourceCommand = deserializeAws_restJson1GetDataSourceCommand;
|
|
3382
|
+
const deserializeAws_restJson1GetDataSourceCommandError = async (output, context) => {
|
|
2732
3383
|
const parsedOutput = {
|
|
2733
3384
|
...output,
|
|
2734
3385
|
body: await parseBody(output.body, context),
|
|
@@ -2793,22 +3444,22 @@ const deserializeAws_restJson1GetApiCacheCommandError = async (output, context)
|
|
|
2793
3444
|
delete response.Message;
|
|
2794
3445
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
2795
3446
|
};
|
|
2796
|
-
const
|
|
3447
|
+
const deserializeAws_restJson1GetDomainNameCommand = async (output, context) => {
|
|
2797
3448
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2798
|
-
return
|
|
3449
|
+
return deserializeAws_restJson1GetDomainNameCommandError(output, context);
|
|
2799
3450
|
}
|
|
2800
3451
|
const contents = {
|
|
2801
3452
|
$metadata: deserializeMetadata(output),
|
|
2802
|
-
|
|
3453
|
+
domainNameConfig: undefined,
|
|
2803
3454
|
};
|
|
2804
3455
|
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
2805
|
-
if (data.
|
|
2806
|
-
contents.
|
|
3456
|
+
if (data.domainNameConfig !== undefined && data.domainNameConfig !== null) {
|
|
3457
|
+
contents.domainNameConfig = deserializeAws_restJson1DomainNameConfig(data.domainNameConfig, context);
|
|
2807
3458
|
}
|
|
2808
3459
|
return Promise.resolve(contents);
|
|
2809
3460
|
};
|
|
2810
|
-
exports.
|
|
2811
|
-
const
|
|
3461
|
+
exports.deserializeAws_restJson1GetDomainNameCommand = deserializeAws_restJson1GetDomainNameCommand;
|
|
3462
|
+
const deserializeAws_restJson1GetDomainNameCommandError = async (output, context) => {
|
|
2812
3463
|
const parsedOutput = {
|
|
2813
3464
|
...output,
|
|
2814
3465
|
body: await parseBody(output.body, context),
|
|
@@ -2817,18 +3468,18 @@ const deserializeAws_restJson1GetDataSourceCommandError = async (output, context
|
|
|
2817
3468
|
let errorCode = "UnknownError";
|
|
2818
3469
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2819
3470
|
switch (errorCode) {
|
|
2820
|
-
case "
|
|
2821
|
-
case "com.amazonaws.appsync#
|
|
3471
|
+
case "AccessDeniedException":
|
|
3472
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
2822
3473
|
response = {
|
|
2823
|
-
...(await
|
|
3474
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2824
3475
|
name: errorCode,
|
|
2825
3476
|
$metadata: deserializeMetadata(output),
|
|
2826
3477
|
};
|
|
2827
3478
|
break;
|
|
2828
|
-
case "
|
|
2829
|
-
case "com.amazonaws.appsync#
|
|
3479
|
+
case "BadRequestException":
|
|
3480
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
2830
3481
|
response = {
|
|
2831
|
-
...(await
|
|
3482
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2832
3483
|
name: errorCode,
|
|
2833
3484
|
$metadata: deserializeMetadata(output),
|
|
2834
3485
|
};
|
|
@@ -2849,14 +3500,6 @@ const deserializeAws_restJson1GetDataSourceCommandError = async (output, context
|
|
|
2849
3500
|
$metadata: deserializeMetadata(output),
|
|
2850
3501
|
};
|
|
2851
3502
|
break;
|
|
2852
|
-
case "UnauthorizedException":
|
|
2853
|
-
case "com.amazonaws.appsync#UnauthorizedException":
|
|
2854
|
-
response = {
|
|
2855
|
-
...(await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context)),
|
|
2856
|
-
name: errorCode,
|
|
2857
|
-
$metadata: deserializeMetadata(output),
|
|
2858
|
-
};
|
|
2859
|
-
break;
|
|
2860
3503
|
default:
|
|
2861
3504
|
const parsedBody = parsedOutput.body;
|
|
2862
3505
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -3459,6 +4102,74 @@ const deserializeAws_restJson1ListDataSourcesCommandError = async (output, conte
|
|
|
3459
4102
|
delete response.Message;
|
|
3460
4103
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
3461
4104
|
};
|
|
4105
|
+
const deserializeAws_restJson1ListDomainNamesCommand = async (output, context) => {
|
|
4106
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4107
|
+
return deserializeAws_restJson1ListDomainNamesCommandError(output, context);
|
|
4108
|
+
}
|
|
4109
|
+
const contents = {
|
|
4110
|
+
$metadata: deserializeMetadata(output),
|
|
4111
|
+
domainNameConfigs: undefined,
|
|
4112
|
+
nextToken: undefined,
|
|
4113
|
+
};
|
|
4114
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
4115
|
+
if (data.domainNameConfigs !== undefined && data.domainNameConfigs !== null) {
|
|
4116
|
+
contents.domainNameConfigs = deserializeAws_restJson1DomainNameConfigs(data.domainNameConfigs, context);
|
|
4117
|
+
}
|
|
4118
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
4119
|
+
contents.nextToken = smithy_client_1.expectString(data.nextToken);
|
|
4120
|
+
}
|
|
4121
|
+
return Promise.resolve(contents);
|
|
4122
|
+
};
|
|
4123
|
+
exports.deserializeAws_restJson1ListDomainNamesCommand = deserializeAws_restJson1ListDomainNamesCommand;
|
|
4124
|
+
const deserializeAws_restJson1ListDomainNamesCommandError = async (output, context) => {
|
|
4125
|
+
const parsedOutput = {
|
|
4126
|
+
...output,
|
|
4127
|
+
body: await parseBody(output.body, context),
|
|
4128
|
+
};
|
|
4129
|
+
let response;
|
|
4130
|
+
let errorCode = "UnknownError";
|
|
4131
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4132
|
+
switch (errorCode) {
|
|
4133
|
+
case "AccessDeniedException":
|
|
4134
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
4135
|
+
response = {
|
|
4136
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
4137
|
+
name: errorCode,
|
|
4138
|
+
$metadata: deserializeMetadata(output),
|
|
4139
|
+
};
|
|
4140
|
+
break;
|
|
4141
|
+
case "BadRequestException":
|
|
4142
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
4143
|
+
response = {
|
|
4144
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
4145
|
+
name: errorCode,
|
|
4146
|
+
$metadata: deserializeMetadata(output),
|
|
4147
|
+
};
|
|
4148
|
+
break;
|
|
4149
|
+
case "InternalFailureException":
|
|
4150
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
4151
|
+
response = {
|
|
4152
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
4153
|
+
name: errorCode,
|
|
4154
|
+
$metadata: deserializeMetadata(output),
|
|
4155
|
+
};
|
|
4156
|
+
break;
|
|
4157
|
+
default:
|
|
4158
|
+
const parsedBody = parsedOutput.body;
|
|
4159
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4160
|
+
response = {
|
|
4161
|
+
...parsedBody,
|
|
4162
|
+
name: `${errorCode}`,
|
|
4163
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
4164
|
+
$fault: "client",
|
|
4165
|
+
$metadata: deserializeMetadata(output),
|
|
4166
|
+
};
|
|
4167
|
+
}
|
|
4168
|
+
const message = response.message || response.Message || errorCode;
|
|
4169
|
+
response.message = message;
|
|
4170
|
+
delete response.Message;
|
|
4171
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
4172
|
+
};
|
|
3462
4173
|
const deserializeAws_restJson1ListFunctionsCommand = async (output, context) => {
|
|
3463
4174
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3464
4175
|
return deserializeAws_restJson1ListFunctionsCommandError(output, context);
|
|
@@ -4423,6 +5134,86 @@ const deserializeAws_restJson1UpdateDataSourceCommandError = async (output, cont
|
|
|
4423
5134
|
delete response.Message;
|
|
4424
5135
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
4425
5136
|
};
|
|
5137
|
+
const deserializeAws_restJson1UpdateDomainNameCommand = async (output, context) => {
|
|
5138
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
5139
|
+
return deserializeAws_restJson1UpdateDomainNameCommandError(output, context);
|
|
5140
|
+
}
|
|
5141
|
+
const contents = {
|
|
5142
|
+
$metadata: deserializeMetadata(output),
|
|
5143
|
+
domainNameConfig: undefined,
|
|
5144
|
+
};
|
|
5145
|
+
const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
|
|
5146
|
+
if (data.domainNameConfig !== undefined && data.domainNameConfig !== null) {
|
|
5147
|
+
contents.domainNameConfig = deserializeAws_restJson1DomainNameConfig(data.domainNameConfig, context);
|
|
5148
|
+
}
|
|
5149
|
+
return Promise.resolve(contents);
|
|
5150
|
+
};
|
|
5151
|
+
exports.deserializeAws_restJson1UpdateDomainNameCommand = deserializeAws_restJson1UpdateDomainNameCommand;
|
|
5152
|
+
const deserializeAws_restJson1UpdateDomainNameCommandError = async (output, context) => {
|
|
5153
|
+
const parsedOutput = {
|
|
5154
|
+
...output,
|
|
5155
|
+
body: await parseBody(output.body, context),
|
|
5156
|
+
};
|
|
5157
|
+
let response;
|
|
5158
|
+
let errorCode = "UnknownError";
|
|
5159
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
5160
|
+
switch (errorCode) {
|
|
5161
|
+
case "AccessDeniedException":
|
|
5162
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
5163
|
+
response = {
|
|
5164
|
+
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
5165
|
+
name: errorCode,
|
|
5166
|
+
$metadata: deserializeMetadata(output),
|
|
5167
|
+
};
|
|
5168
|
+
break;
|
|
5169
|
+
case "BadRequestException":
|
|
5170
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
5171
|
+
response = {
|
|
5172
|
+
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
5173
|
+
name: errorCode,
|
|
5174
|
+
$metadata: deserializeMetadata(output),
|
|
5175
|
+
};
|
|
5176
|
+
break;
|
|
5177
|
+
case "ConcurrentModificationException":
|
|
5178
|
+
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
5179
|
+
response = {
|
|
5180
|
+
...(await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context)),
|
|
5181
|
+
name: errorCode,
|
|
5182
|
+
$metadata: deserializeMetadata(output),
|
|
5183
|
+
};
|
|
5184
|
+
break;
|
|
5185
|
+
case "InternalFailureException":
|
|
5186
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
5187
|
+
response = {
|
|
5188
|
+
...(await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)),
|
|
5189
|
+
name: errorCode,
|
|
5190
|
+
$metadata: deserializeMetadata(output),
|
|
5191
|
+
};
|
|
5192
|
+
break;
|
|
5193
|
+
case "NotFoundException":
|
|
5194
|
+
case "com.amazonaws.appsync#NotFoundException":
|
|
5195
|
+
response = {
|
|
5196
|
+
...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
|
|
5197
|
+
name: errorCode,
|
|
5198
|
+
$metadata: deserializeMetadata(output),
|
|
5199
|
+
};
|
|
5200
|
+
break;
|
|
5201
|
+
default:
|
|
5202
|
+
const parsedBody = parsedOutput.body;
|
|
5203
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
5204
|
+
response = {
|
|
5205
|
+
...parsedBody,
|
|
5206
|
+
name: `${errorCode}`,
|
|
5207
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
5208
|
+
$fault: "client",
|
|
5209
|
+
$metadata: deserializeMetadata(output),
|
|
5210
|
+
};
|
|
5211
|
+
}
|
|
5212
|
+
const message = response.message || response.Message || errorCode;
|
|
5213
|
+
response.message = message;
|
|
5214
|
+
delete response.Message;
|
|
5215
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
5216
|
+
};
|
|
4426
5217
|
const deserializeAws_restJson1UpdateFunctionCommand = async (output, context) => {
|
|
4427
5218
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4428
5219
|
return deserializeAws_restJson1UpdateFunctionCommandError(output, context);
|
|
@@ -5126,6 +5917,14 @@ const deserializeAws_restJson1AdditionalAuthenticationProviders = (output, conte
|
|
|
5126
5917
|
return deserializeAws_restJson1AdditionalAuthenticationProvider(entry, context);
|
|
5127
5918
|
});
|
|
5128
5919
|
};
|
|
5920
|
+
const deserializeAws_restJson1ApiAssociation = (output, context) => {
|
|
5921
|
+
return {
|
|
5922
|
+
apiId: smithy_client_1.expectString(output.apiId),
|
|
5923
|
+
associationStatus: smithy_client_1.expectString(output.associationStatus),
|
|
5924
|
+
deploymentDetail: smithy_client_1.expectString(output.deploymentDetail),
|
|
5925
|
+
domainName: smithy_client_1.expectString(output.domainName),
|
|
5926
|
+
};
|
|
5927
|
+
};
|
|
5129
5928
|
const deserializeAws_restJson1ApiCache = (output, context) => {
|
|
5130
5929
|
return {
|
|
5131
5930
|
apiCachingBehavior: smithy_client_1.expectString(output.apiCachingBehavior),
|
|
@@ -5237,6 +6036,25 @@ const deserializeAws_restJson1DeltaSyncConfig = (output, context) => {
|
|
|
5237
6036
|
deltaSyncTableTTL: smithy_client_1.expectLong(output.deltaSyncTableTTL),
|
|
5238
6037
|
};
|
|
5239
6038
|
};
|
|
6039
|
+
const deserializeAws_restJson1DomainNameConfig = (output, context) => {
|
|
6040
|
+
return {
|
|
6041
|
+
appsyncDomainName: smithy_client_1.expectString(output.appsyncDomainName),
|
|
6042
|
+
certificateArn: smithy_client_1.expectString(output.certificateArn),
|
|
6043
|
+
description: smithy_client_1.expectString(output.description),
|
|
6044
|
+
domainName: smithy_client_1.expectString(output.domainName),
|
|
6045
|
+
hostedZoneId: smithy_client_1.expectString(output.hostedZoneId),
|
|
6046
|
+
};
|
|
6047
|
+
};
|
|
6048
|
+
const deserializeAws_restJson1DomainNameConfigs = (output, context) => {
|
|
6049
|
+
return (output || [])
|
|
6050
|
+
.filter((e) => e != null)
|
|
6051
|
+
.map((entry) => {
|
|
6052
|
+
if (entry === null) {
|
|
6053
|
+
return null;
|
|
6054
|
+
}
|
|
6055
|
+
return deserializeAws_restJson1DomainNameConfig(entry, context);
|
|
6056
|
+
});
|
|
6057
|
+
};
|
|
5240
6058
|
const deserializeAws_restJson1DynamodbDataSourceConfig = (output, context) => {
|
|
5241
6059
|
return {
|
|
5242
6060
|
awsRegion: smithy_client_1.expectString(output.awsRegion),
|