@aws-sdk/client-pca-connector-ad 3.403.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/LICENSE +201 -0
- package/README.md +407 -0
- package/dist-cjs/PcaConnectorAd.js +61 -0
- package/dist-cjs/PcaConnectorAdClient.js +43 -0
- package/dist-cjs/commands/CreateConnectorCommand.js +46 -0
- package/dist-cjs/commands/CreateDirectoryRegistrationCommand.js +46 -0
- package/dist-cjs/commands/CreateServicePrincipalNameCommand.js +46 -0
- package/dist-cjs/commands/CreateTemplateCommand.js +46 -0
- package/dist-cjs/commands/CreateTemplateGroupAccessControlEntryCommand.js +46 -0
- package/dist-cjs/commands/DeleteConnectorCommand.js +46 -0
- package/dist-cjs/commands/DeleteDirectoryRegistrationCommand.js +46 -0
- package/dist-cjs/commands/DeleteServicePrincipalNameCommand.js +46 -0
- package/dist-cjs/commands/DeleteTemplateCommand.js +46 -0
- package/dist-cjs/commands/DeleteTemplateGroupAccessControlEntryCommand.js +46 -0
- package/dist-cjs/commands/GetConnectorCommand.js +46 -0
- package/dist-cjs/commands/GetDirectoryRegistrationCommand.js +46 -0
- package/dist-cjs/commands/GetServicePrincipalNameCommand.js +46 -0
- package/dist-cjs/commands/GetTemplateCommand.js +46 -0
- package/dist-cjs/commands/GetTemplateGroupAccessControlEntryCommand.js +46 -0
- package/dist-cjs/commands/ListConnectorsCommand.js +46 -0
- package/dist-cjs/commands/ListDirectoryRegistrationsCommand.js +46 -0
- package/dist-cjs/commands/ListServicePrincipalNamesCommand.js +46 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
- package/dist-cjs/commands/ListTemplateGroupAccessControlEntriesCommand.js +46 -0
- package/dist-cjs/commands/ListTemplatesCommand.js +46 -0
- package/dist-cjs/commands/TagResourceCommand.js +46 -0
- package/dist-cjs/commands/UntagResourceCommand.js +46 -0
- package/dist-cjs/commands/UpdateTemplateCommand.js +46 -0
- package/dist-cjs/commands/UpdateTemplateGroupAccessControlEntryCommand.js +46 -0
- package/dist-cjs/commands/index.js +28 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/PcaConnectorAdServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +324 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListConnectorsPaginator.js +29 -0
- package/dist-cjs/pagination/ListDirectoryRegistrationsPaginator.js +29 -0
- package/dist-cjs/pagination/ListServicePrincipalNamesPaginator.js +29 -0
- package/dist-cjs/pagination/ListTemplateGroupAccessControlEntriesPaginator.js +29 -0
- package/dist-cjs/pagination/ListTemplatesPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +9 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1985 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +48 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +22 -0
- package/dist-cjs/runtimeExtensions.js +16 -0
- package/dist-es/PcaConnectorAd.js +57 -0
- package/dist-es/PcaConnectorAdClient.js +39 -0
- package/dist-es/commands/CreateConnectorCommand.js +42 -0
- package/dist-es/commands/CreateDirectoryRegistrationCommand.js +42 -0
- package/dist-es/commands/CreateServicePrincipalNameCommand.js +42 -0
- package/dist-es/commands/CreateTemplateCommand.js +42 -0
- package/dist-es/commands/CreateTemplateGroupAccessControlEntryCommand.js +42 -0
- package/dist-es/commands/DeleteConnectorCommand.js +42 -0
- package/dist-es/commands/DeleteDirectoryRegistrationCommand.js +42 -0
- package/dist-es/commands/DeleteServicePrincipalNameCommand.js +42 -0
- package/dist-es/commands/DeleteTemplateCommand.js +42 -0
- package/dist-es/commands/DeleteTemplateGroupAccessControlEntryCommand.js +42 -0
- package/dist-es/commands/GetConnectorCommand.js +42 -0
- package/dist-es/commands/GetDirectoryRegistrationCommand.js +42 -0
- package/dist-es/commands/GetServicePrincipalNameCommand.js +42 -0
- package/dist-es/commands/GetTemplateCommand.js +42 -0
- package/dist-es/commands/GetTemplateGroupAccessControlEntryCommand.js +42 -0
- package/dist-es/commands/ListConnectorsCommand.js +42 -0
- package/dist-es/commands/ListDirectoryRegistrationsCommand.js +42 -0
- package/dist-es/commands/ListServicePrincipalNamesCommand.js +42 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
- package/dist-es/commands/ListTemplateGroupAccessControlEntriesCommand.js +42 -0
- package/dist-es/commands/ListTemplatesCommand.js +42 -0
- package/dist-es/commands/TagResourceCommand.js +42 -0
- package/dist-es/commands/UntagResourceCommand.js +42 -0
- package/dist-es/commands/UpdateTemplateCommand.js +42 -0
- package/dist-es/commands/UpdateTemplateGroupAccessControlEntryCommand.js +42 -0
- package/dist-es/commands/index.js +25 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/PcaConnectorAdServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +314 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListConnectorsPaginator.js +25 -0
- package/dist-es/pagination/ListDirectoryRegistrationsPaginator.js +25 -0
- package/dist-es/pagination/ListServicePrincipalNamesPaginator.js +25 -0
- package/dist-es/pagination/ListTemplateGroupAccessControlEntriesPaginator.js +25 -0
- package/dist-es/pagination/ListTemplatesPaginator.js +25 -0
- package/dist-es/pagination/index.js +6 -0
- package/dist-es/protocols/Aws_restJson1.js +1932 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +43 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +18 -0
- package/dist-es/runtimeExtensions.js +12 -0
- package/dist-types/PcaConnectorAd.d.ts +187 -0
- package/dist-types/PcaConnectorAdClient.d.ts +194 -0
- package/dist-types/commands/CreateConnectorCommand.d.ts +113 -0
- package/dist-types/commands/CreateDirectoryRegistrationCommand.d.ts +104 -0
- package/dist-types/commands/CreateServicePrincipalNameCommand.d.ts +101 -0
- package/dist-types/commands/CreateTemplateCommand.d.ts +344 -0
- package/dist-types/commands/CreateTemplateGroupAccessControlEntryCommand.d.ts +108 -0
- package/dist-types/commands/DeleteConnectorCommand.d.ts +101 -0
- package/dist-types/commands/DeleteDirectoryRegistrationCommand.d.ts +94 -0
- package/dist-types/commands/DeleteServicePrincipalNameCommand.d.ts +95 -0
- package/dist-types/commands/DeleteTemplateCommand.d.ts +98 -0
- package/dist-types/commands/DeleteTemplateGroupAccessControlEntryCommand.d.ts +98 -0
- package/dist-types/commands/GetConnectorCommand.d.ts +110 -0
- package/dist-types/commands/GetDirectoryRegistrationCommand.d.ts +102 -0
- package/dist-types/commands/GetServicePrincipalNameCommand.d.ts +104 -0
- package/dist-types/commands/GetTemplateCommand.d.ts +345 -0
- package/dist-types/commands/GetTemplateGroupAccessControlEntryCommand.d.ts +106 -0
- package/dist-types/commands/ListConnectorsCommand.d.ts +109 -0
- package/dist-types/commands/ListDirectoryRegistrationsCommand.d.ts +103 -0
- package/dist-types/commands/ListServicePrincipalNamesCommand.d.ts +108 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +97 -0
- package/dist-types/commands/ListTemplateGroupAccessControlEntriesCommand.d.ts +110 -0
- package/dist-types/commands/ListTemplatesCommand.d.ts +349 -0
- package/dist-types/commands/TagResourceCommand.d.ts +96 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +96 -0
- package/dist-types/commands/UpdateTemplateCommand.d.ts +334 -0
- package/dist-types/commands/UpdateTemplateGroupAccessControlEntryCommand.d.ts +103 -0
- package/dist-types/commands/index.d.ts +25 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +22 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +6 -0
- package/dist-types/index.d.ts +14 -0
- package/dist-types/models/PcaConnectorAdServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2690 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListConnectorsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListDirectoryRegistrationsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListServicePrincipalNamesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListTemplateGroupAccessControlEntriesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListTemplatesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +6 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +227 -0
- package/dist-types/runtimeConfig.browser.d.ts +43 -0
- package/dist-types/runtimeConfig.d.ts +43 -0
- package/dist-types/runtimeConfig.native.d.ts +42 -0
- package/dist-types/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/PcaConnectorAd.d.ts +462 -0
- package/dist-types/ts3.4/PcaConnectorAdClient.d.ts +269 -0
- package/dist-types/ts3.4/commands/CreateConnectorCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateDirectoryRegistrationCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/CreateServicePrincipalNameCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateTemplateCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/CreateTemplateGroupAccessControlEntryCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteConnectorCommand.d.ts +33 -0
- package/dist-types/ts3.4/commands/DeleteDirectoryRegistrationCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteServicePrincipalNameCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteTemplateCommand.d.ts +33 -0
- package/dist-types/ts3.4/commands/DeleteTemplateGroupAccessControlEntryCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetConnectorCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetDirectoryRegistrationCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetServicePrincipalNameCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/GetTemplateCommand.d.ts +35 -0
- package/dist-types/ts3.4/commands/GetTemplateGroupAccessControlEntryCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListConnectorsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListDirectoryRegistrationsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListServicePrincipalNamesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListTemplateGroupAccessControlEntriesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListTemplatesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +33 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +33 -0
- package/dist-types/ts3.4/commands/UpdateTemplateCommand.d.ts +33 -0
- package/dist-types/ts3.4/commands/UpdateTemplateGroupAccessControlEntryCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +25 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -0
- package/dist-types/ts3.4/index.d.ts +7 -0
- package/dist-types/ts3.4/models/PcaConnectorAdServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +812 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListConnectorsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListDirectoryRegistrationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListServicePrincipalNamesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListTemplateGroupAccessControlEntriesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListTemplatesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +6 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +305 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +90 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +90 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +81 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +101 -0
|
@@ -0,0 +1,1985 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.de_UpdateTemplateGroupAccessControlEntryCommand = exports.de_UpdateTemplateCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTemplatesCommand = exports.de_ListTemplateGroupAccessControlEntriesCommand = exports.de_ListTagsForResourceCommand = exports.de_ListServicePrincipalNamesCommand = exports.de_ListDirectoryRegistrationsCommand = exports.de_ListConnectorsCommand = exports.de_GetTemplateGroupAccessControlEntryCommand = exports.de_GetTemplateCommand = exports.de_GetServicePrincipalNameCommand = exports.de_GetDirectoryRegistrationCommand = exports.de_GetConnectorCommand = exports.de_DeleteTemplateGroupAccessControlEntryCommand = exports.de_DeleteTemplateCommand = exports.de_DeleteServicePrincipalNameCommand = exports.de_DeleteDirectoryRegistrationCommand = exports.de_DeleteConnectorCommand = exports.de_CreateTemplateGroupAccessControlEntryCommand = exports.de_CreateTemplateCommand = exports.de_CreateServicePrincipalNameCommand = exports.de_CreateDirectoryRegistrationCommand = exports.de_CreateConnectorCommand = exports.se_UpdateTemplateGroupAccessControlEntryCommand = exports.se_UpdateTemplateCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTemplatesCommand = exports.se_ListTemplateGroupAccessControlEntriesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListServicePrincipalNamesCommand = exports.se_ListDirectoryRegistrationsCommand = exports.se_ListConnectorsCommand = exports.se_GetTemplateGroupAccessControlEntryCommand = exports.se_GetTemplateCommand = exports.se_GetServicePrincipalNameCommand = exports.se_GetDirectoryRegistrationCommand = exports.se_GetConnectorCommand = exports.se_DeleteTemplateGroupAccessControlEntryCommand = exports.se_DeleteTemplateCommand = exports.se_DeleteServicePrincipalNameCommand = exports.se_DeleteDirectoryRegistrationCommand = exports.se_DeleteConnectorCommand = exports.se_CreateTemplateGroupAccessControlEntryCommand = exports.se_CreateTemplateCommand = exports.se_CreateServicePrincipalNameCommand = exports.se_CreateDirectoryRegistrationCommand = exports.se_CreateConnectorCommand = void 0;
|
|
4
|
+
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
+
const uuid_1 = require("uuid");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const PcaConnectorAdServiceException_1 = require("../models/PcaConnectorAdServiceException");
|
|
9
|
+
const se_CreateConnectorCommand = async (input, context) => {
|
|
10
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
11
|
+
const headers = {
|
|
12
|
+
"content-type": "application/json",
|
|
13
|
+
};
|
|
14
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connectors";
|
|
15
|
+
let body;
|
|
16
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
+
CertificateAuthorityArn: [],
|
|
18
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
19
|
+
DirectoryId: [],
|
|
20
|
+
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
21
|
+
VpcInformation: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
+
}));
|
|
23
|
+
return new protocol_http_1.HttpRequest({
|
|
24
|
+
protocol,
|
|
25
|
+
hostname,
|
|
26
|
+
port,
|
|
27
|
+
method: "POST",
|
|
28
|
+
headers,
|
|
29
|
+
path: resolvedPath,
|
|
30
|
+
body,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
exports.se_CreateConnectorCommand = se_CreateConnectorCommand;
|
|
34
|
+
const se_CreateDirectoryRegistrationCommand = async (input, context) => {
|
|
35
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
36
|
+
const headers = {
|
|
37
|
+
"content-type": "application/json",
|
|
38
|
+
};
|
|
39
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/directoryRegistrations";
|
|
40
|
+
let body;
|
|
41
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
42
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
43
|
+
DirectoryId: [],
|
|
44
|
+
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
45
|
+
}));
|
|
46
|
+
return new protocol_http_1.HttpRequest({
|
|
47
|
+
protocol,
|
|
48
|
+
hostname,
|
|
49
|
+
port,
|
|
50
|
+
method: "POST",
|
|
51
|
+
headers,
|
|
52
|
+
path: resolvedPath,
|
|
53
|
+
body,
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
exports.se_CreateDirectoryRegistrationCommand = se_CreateDirectoryRegistrationCommand;
|
|
57
|
+
const se_CreateServicePrincipalNameCommand = async (input, context) => {
|
|
58
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
59
|
+
const headers = {
|
|
60
|
+
"content-type": "application/json",
|
|
61
|
+
};
|
|
62
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
63
|
+
"/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}";
|
|
64
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
|
|
65
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
|
|
66
|
+
let body;
|
|
67
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
68
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
69
|
+
}));
|
|
70
|
+
return new protocol_http_1.HttpRequest({
|
|
71
|
+
protocol,
|
|
72
|
+
hostname,
|
|
73
|
+
port,
|
|
74
|
+
method: "POST",
|
|
75
|
+
headers,
|
|
76
|
+
path: resolvedPath,
|
|
77
|
+
body,
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
exports.se_CreateServicePrincipalNameCommand = se_CreateServicePrincipalNameCommand;
|
|
81
|
+
const se_CreateTemplateCommand = async (input, context) => {
|
|
82
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
83
|
+
const headers = {
|
|
84
|
+
"content-type": "application/json",
|
|
85
|
+
};
|
|
86
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates";
|
|
87
|
+
let body;
|
|
88
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
89
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
90
|
+
ConnectorArn: [],
|
|
91
|
+
Definition: (_) => (0, smithy_client_1._json)(_),
|
|
92
|
+
Name: [],
|
|
93
|
+
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
94
|
+
}));
|
|
95
|
+
return new protocol_http_1.HttpRequest({
|
|
96
|
+
protocol,
|
|
97
|
+
hostname,
|
|
98
|
+
port,
|
|
99
|
+
method: "POST",
|
|
100
|
+
headers,
|
|
101
|
+
path: resolvedPath,
|
|
102
|
+
body,
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
exports.se_CreateTemplateCommand = se_CreateTemplateCommand;
|
|
106
|
+
const se_CreateTemplateGroupAccessControlEntryCommand = async (input, context) => {
|
|
107
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
108
|
+
const headers = {
|
|
109
|
+
"content-type": "application/json",
|
|
110
|
+
};
|
|
111
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
112
|
+
"/templates/{TemplateArn}/accessControlEntries";
|
|
113
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
|
|
114
|
+
let body;
|
|
115
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
116
|
+
AccessRights: (_) => (0, smithy_client_1._json)(_),
|
|
117
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
118
|
+
GroupDisplayName: [],
|
|
119
|
+
GroupSecurityIdentifier: [],
|
|
120
|
+
}));
|
|
121
|
+
return new protocol_http_1.HttpRequest({
|
|
122
|
+
protocol,
|
|
123
|
+
hostname,
|
|
124
|
+
port,
|
|
125
|
+
method: "POST",
|
|
126
|
+
headers,
|
|
127
|
+
path: resolvedPath,
|
|
128
|
+
body,
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
exports.se_CreateTemplateGroupAccessControlEntryCommand = se_CreateTemplateGroupAccessControlEntryCommand;
|
|
132
|
+
const se_DeleteConnectorCommand = async (input, context) => {
|
|
133
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
134
|
+
const headers = {};
|
|
135
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connectors/{ConnectorArn}";
|
|
136
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
|
|
137
|
+
let body;
|
|
138
|
+
return new protocol_http_1.HttpRequest({
|
|
139
|
+
protocol,
|
|
140
|
+
hostname,
|
|
141
|
+
port,
|
|
142
|
+
method: "DELETE",
|
|
143
|
+
headers,
|
|
144
|
+
path: resolvedPath,
|
|
145
|
+
body,
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
exports.se_DeleteConnectorCommand = se_DeleteConnectorCommand;
|
|
149
|
+
const se_DeleteDirectoryRegistrationCommand = async (input, context) => {
|
|
150
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
151
|
+
const headers = {};
|
|
152
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
153
|
+
"/directoryRegistrations/{DirectoryRegistrationArn}";
|
|
154
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
|
|
155
|
+
let body;
|
|
156
|
+
return new protocol_http_1.HttpRequest({
|
|
157
|
+
protocol,
|
|
158
|
+
hostname,
|
|
159
|
+
port,
|
|
160
|
+
method: "DELETE",
|
|
161
|
+
headers,
|
|
162
|
+
path: resolvedPath,
|
|
163
|
+
body,
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
exports.se_DeleteDirectoryRegistrationCommand = se_DeleteDirectoryRegistrationCommand;
|
|
167
|
+
const se_DeleteServicePrincipalNameCommand = async (input, context) => {
|
|
168
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
169
|
+
const headers = {};
|
|
170
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
171
|
+
"/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}";
|
|
172
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
|
|
173
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
|
|
174
|
+
let body;
|
|
175
|
+
return new protocol_http_1.HttpRequest({
|
|
176
|
+
protocol,
|
|
177
|
+
hostname,
|
|
178
|
+
port,
|
|
179
|
+
method: "DELETE",
|
|
180
|
+
headers,
|
|
181
|
+
path: resolvedPath,
|
|
182
|
+
body,
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
exports.se_DeleteServicePrincipalNameCommand = se_DeleteServicePrincipalNameCommand;
|
|
186
|
+
const se_DeleteTemplateCommand = async (input, context) => {
|
|
187
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
188
|
+
const headers = {};
|
|
189
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates/{TemplateArn}";
|
|
190
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
|
|
191
|
+
let body;
|
|
192
|
+
return new protocol_http_1.HttpRequest({
|
|
193
|
+
protocol,
|
|
194
|
+
hostname,
|
|
195
|
+
port,
|
|
196
|
+
method: "DELETE",
|
|
197
|
+
headers,
|
|
198
|
+
path: resolvedPath,
|
|
199
|
+
body,
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
exports.se_DeleteTemplateCommand = se_DeleteTemplateCommand;
|
|
203
|
+
const se_DeleteTemplateGroupAccessControlEntryCommand = async (input, context) => {
|
|
204
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
205
|
+
const headers = {};
|
|
206
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
207
|
+
"/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}";
|
|
208
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
|
|
209
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GroupSecurityIdentifier", () => input.GroupSecurityIdentifier, "{GroupSecurityIdentifier}", false);
|
|
210
|
+
let body;
|
|
211
|
+
return new protocol_http_1.HttpRequest({
|
|
212
|
+
protocol,
|
|
213
|
+
hostname,
|
|
214
|
+
port,
|
|
215
|
+
method: "DELETE",
|
|
216
|
+
headers,
|
|
217
|
+
path: resolvedPath,
|
|
218
|
+
body,
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
exports.se_DeleteTemplateGroupAccessControlEntryCommand = se_DeleteTemplateGroupAccessControlEntryCommand;
|
|
222
|
+
const se_GetConnectorCommand = async (input, context) => {
|
|
223
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
224
|
+
const headers = {};
|
|
225
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connectors/{ConnectorArn}";
|
|
226
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
|
|
227
|
+
let body;
|
|
228
|
+
return new protocol_http_1.HttpRequest({
|
|
229
|
+
protocol,
|
|
230
|
+
hostname,
|
|
231
|
+
port,
|
|
232
|
+
method: "GET",
|
|
233
|
+
headers,
|
|
234
|
+
path: resolvedPath,
|
|
235
|
+
body,
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
exports.se_GetConnectorCommand = se_GetConnectorCommand;
|
|
239
|
+
const se_GetDirectoryRegistrationCommand = async (input, context) => {
|
|
240
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
241
|
+
const headers = {};
|
|
242
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
243
|
+
"/directoryRegistrations/{DirectoryRegistrationArn}";
|
|
244
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
|
|
245
|
+
let body;
|
|
246
|
+
return new protocol_http_1.HttpRequest({
|
|
247
|
+
protocol,
|
|
248
|
+
hostname,
|
|
249
|
+
port,
|
|
250
|
+
method: "GET",
|
|
251
|
+
headers,
|
|
252
|
+
path: resolvedPath,
|
|
253
|
+
body,
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
exports.se_GetDirectoryRegistrationCommand = se_GetDirectoryRegistrationCommand;
|
|
257
|
+
const se_GetServicePrincipalNameCommand = async (input, context) => {
|
|
258
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
259
|
+
const headers = {};
|
|
260
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
261
|
+
"/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames/{ConnectorArn}";
|
|
262
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
|
|
263
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectorArn", () => input.ConnectorArn, "{ConnectorArn}", false);
|
|
264
|
+
let body;
|
|
265
|
+
return new protocol_http_1.HttpRequest({
|
|
266
|
+
protocol,
|
|
267
|
+
hostname,
|
|
268
|
+
port,
|
|
269
|
+
method: "GET",
|
|
270
|
+
headers,
|
|
271
|
+
path: resolvedPath,
|
|
272
|
+
body,
|
|
273
|
+
});
|
|
274
|
+
};
|
|
275
|
+
exports.se_GetServicePrincipalNameCommand = se_GetServicePrincipalNameCommand;
|
|
276
|
+
const se_GetTemplateCommand = async (input, context) => {
|
|
277
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
278
|
+
const headers = {};
|
|
279
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates/{TemplateArn}";
|
|
280
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
|
|
281
|
+
let body;
|
|
282
|
+
return new protocol_http_1.HttpRequest({
|
|
283
|
+
protocol,
|
|
284
|
+
hostname,
|
|
285
|
+
port,
|
|
286
|
+
method: "GET",
|
|
287
|
+
headers,
|
|
288
|
+
path: resolvedPath,
|
|
289
|
+
body,
|
|
290
|
+
});
|
|
291
|
+
};
|
|
292
|
+
exports.se_GetTemplateCommand = se_GetTemplateCommand;
|
|
293
|
+
const se_GetTemplateGroupAccessControlEntryCommand = async (input, context) => {
|
|
294
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
295
|
+
const headers = {};
|
|
296
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
297
|
+
"/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}";
|
|
298
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
|
|
299
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GroupSecurityIdentifier", () => input.GroupSecurityIdentifier, "{GroupSecurityIdentifier}", false);
|
|
300
|
+
let body;
|
|
301
|
+
return new protocol_http_1.HttpRequest({
|
|
302
|
+
protocol,
|
|
303
|
+
hostname,
|
|
304
|
+
port,
|
|
305
|
+
method: "GET",
|
|
306
|
+
headers,
|
|
307
|
+
path: resolvedPath,
|
|
308
|
+
body,
|
|
309
|
+
});
|
|
310
|
+
};
|
|
311
|
+
exports.se_GetTemplateGroupAccessControlEntryCommand = se_GetTemplateGroupAccessControlEntryCommand;
|
|
312
|
+
const se_ListConnectorsCommand = async (input, context) => {
|
|
313
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
314
|
+
const headers = {};
|
|
315
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connectors";
|
|
316
|
+
const query = (0, smithy_client_1.map)({
|
|
317
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
318
|
+
NextToken: [, input.NextToken],
|
|
319
|
+
});
|
|
320
|
+
let body;
|
|
321
|
+
return new protocol_http_1.HttpRequest({
|
|
322
|
+
protocol,
|
|
323
|
+
hostname,
|
|
324
|
+
port,
|
|
325
|
+
method: "GET",
|
|
326
|
+
headers,
|
|
327
|
+
path: resolvedPath,
|
|
328
|
+
query,
|
|
329
|
+
body,
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
exports.se_ListConnectorsCommand = se_ListConnectorsCommand;
|
|
333
|
+
const se_ListDirectoryRegistrationsCommand = async (input, context) => {
|
|
334
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
335
|
+
const headers = {};
|
|
336
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/directoryRegistrations";
|
|
337
|
+
const query = (0, smithy_client_1.map)({
|
|
338
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
339
|
+
NextToken: [, input.NextToken],
|
|
340
|
+
});
|
|
341
|
+
let body;
|
|
342
|
+
return new protocol_http_1.HttpRequest({
|
|
343
|
+
protocol,
|
|
344
|
+
hostname,
|
|
345
|
+
port,
|
|
346
|
+
method: "GET",
|
|
347
|
+
headers,
|
|
348
|
+
path: resolvedPath,
|
|
349
|
+
query,
|
|
350
|
+
body,
|
|
351
|
+
});
|
|
352
|
+
};
|
|
353
|
+
exports.se_ListDirectoryRegistrationsCommand = se_ListDirectoryRegistrationsCommand;
|
|
354
|
+
const se_ListServicePrincipalNamesCommand = async (input, context) => {
|
|
355
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
356
|
+
const headers = {};
|
|
357
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
358
|
+
"/directoryRegistrations/{DirectoryRegistrationArn}/servicePrincipalNames";
|
|
359
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DirectoryRegistrationArn", () => input.DirectoryRegistrationArn, "{DirectoryRegistrationArn}", false);
|
|
360
|
+
const query = (0, smithy_client_1.map)({
|
|
361
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
362
|
+
NextToken: [, input.NextToken],
|
|
363
|
+
});
|
|
364
|
+
let body;
|
|
365
|
+
return new protocol_http_1.HttpRequest({
|
|
366
|
+
protocol,
|
|
367
|
+
hostname,
|
|
368
|
+
port,
|
|
369
|
+
method: "GET",
|
|
370
|
+
headers,
|
|
371
|
+
path: resolvedPath,
|
|
372
|
+
query,
|
|
373
|
+
body,
|
|
374
|
+
});
|
|
375
|
+
};
|
|
376
|
+
exports.se_ListServicePrincipalNamesCommand = se_ListServicePrincipalNamesCommand;
|
|
377
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
378
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
379
|
+
const headers = {};
|
|
380
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
381
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
382
|
+
let body;
|
|
383
|
+
return new protocol_http_1.HttpRequest({
|
|
384
|
+
protocol,
|
|
385
|
+
hostname,
|
|
386
|
+
port,
|
|
387
|
+
method: "GET",
|
|
388
|
+
headers,
|
|
389
|
+
path: resolvedPath,
|
|
390
|
+
body,
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
394
|
+
const se_ListTemplateGroupAccessControlEntriesCommand = async (input, context) => {
|
|
395
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
396
|
+
const headers = {};
|
|
397
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
398
|
+
"/templates/{TemplateArn}/accessControlEntries";
|
|
399
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
|
|
400
|
+
const query = (0, smithy_client_1.map)({
|
|
401
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
402
|
+
NextToken: [, input.NextToken],
|
|
403
|
+
});
|
|
404
|
+
let body;
|
|
405
|
+
return new protocol_http_1.HttpRequest({
|
|
406
|
+
protocol,
|
|
407
|
+
hostname,
|
|
408
|
+
port,
|
|
409
|
+
method: "GET",
|
|
410
|
+
headers,
|
|
411
|
+
path: resolvedPath,
|
|
412
|
+
query,
|
|
413
|
+
body,
|
|
414
|
+
});
|
|
415
|
+
};
|
|
416
|
+
exports.se_ListTemplateGroupAccessControlEntriesCommand = se_ListTemplateGroupAccessControlEntriesCommand;
|
|
417
|
+
const se_ListTemplatesCommand = async (input, context) => {
|
|
418
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
419
|
+
const headers = {};
|
|
420
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates";
|
|
421
|
+
const query = (0, smithy_client_1.map)({
|
|
422
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
423
|
+
NextToken: [, input.NextToken],
|
|
424
|
+
ConnectorArn: [, (0, smithy_client_1.expectNonNull)(input.ConnectorArn, `ConnectorArn`)],
|
|
425
|
+
});
|
|
426
|
+
let body;
|
|
427
|
+
return new protocol_http_1.HttpRequest({
|
|
428
|
+
protocol,
|
|
429
|
+
hostname,
|
|
430
|
+
port,
|
|
431
|
+
method: "GET",
|
|
432
|
+
headers,
|
|
433
|
+
path: resolvedPath,
|
|
434
|
+
query,
|
|
435
|
+
body,
|
|
436
|
+
});
|
|
437
|
+
};
|
|
438
|
+
exports.se_ListTemplatesCommand = se_ListTemplatesCommand;
|
|
439
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
440
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
441
|
+
const headers = {
|
|
442
|
+
"content-type": "application/json",
|
|
443
|
+
};
|
|
444
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
445
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
446
|
+
let body;
|
|
447
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
448
|
+
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
449
|
+
}));
|
|
450
|
+
return new protocol_http_1.HttpRequest({
|
|
451
|
+
protocol,
|
|
452
|
+
hostname,
|
|
453
|
+
port,
|
|
454
|
+
method: "POST",
|
|
455
|
+
headers,
|
|
456
|
+
path: resolvedPath,
|
|
457
|
+
body,
|
|
458
|
+
});
|
|
459
|
+
};
|
|
460
|
+
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
461
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
462
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
463
|
+
const headers = {};
|
|
464
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
465
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
466
|
+
const query = (0, smithy_client_1.map)({
|
|
467
|
+
tagKeys: [
|
|
468
|
+
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
469
|
+
() => (input.TagKeys || []).map((_entry) => _entry),
|
|
470
|
+
],
|
|
471
|
+
});
|
|
472
|
+
let body;
|
|
473
|
+
return new protocol_http_1.HttpRequest({
|
|
474
|
+
protocol,
|
|
475
|
+
hostname,
|
|
476
|
+
port,
|
|
477
|
+
method: "DELETE",
|
|
478
|
+
headers,
|
|
479
|
+
path: resolvedPath,
|
|
480
|
+
query,
|
|
481
|
+
body,
|
|
482
|
+
});
|
|
483
|
+
};
|
|
484
|
+
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
485
|
+
const se_UpdateTemplateCommand = async (input, context) => {
|
|
486
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
487
|
+
const headers = {
|
|
488
|
+
"content-type": "application/json",
|
|
489
|
+
};
|
|
490
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates/{TemplateArn}";
|
|
491
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
|
|
492
|
+
let body;
|
|
493
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
494
|
+
Definition: (_) => (0, smithy_client_1._json)(_),
|
|
495
|
+
ReenrollAllCertificateHolders: [],
|
|
496
|
+
}));
|
|
497
|
+
return new protocol_http_1.HttpRequest({
|
|
498
|
+
protocol,
|
|
499
|
+
hostname,
|
|
500
|
+
port,
|
|
501
|
+
method: "PATCH",
|
|
502
|
+
headers,
|
|
503
|
+
path: resolvedPath,
|
|
504
|
+
body,
|
|
505
|
+
});
|
|
506
|
+
};
|
|
507
|
+
exports.se_UpdateTemplateCommand = se_UpdateTemplateCommand;
|
|
508
|
+
const se_UpdateTemplateGroupAccessControlEntryCommand = async (input, context) => {
|
|
509
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
510
|
+
const headers = {
|
|
511
|
+
"content-type": "application/json",
|
|
512
|
+
};
|
|
513
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
514
|
+
"/templates/{TemplateArn}/accessControlEntries/{GroupSecurityIdentifier}";
|
|
515
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TemplateArn", () => input.TemplateArn, "{TemplateArn}", false);
|
|
516
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GroupSecurityIdentifier", () => input.GroupSecurityIdentifier, "{GroupSecurityIdentifier}", false);
|
|
517
|
+
let body;
|
|
518
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
519
|
+
AccessRights: (_) => (0, smithy_client_1._json)(_),
|
|
520
|
+
GroupDisplayName: [],
|
|
521
|
+
}));
|
|
522
|
+
return new protocol_http_1.HttpRequest({
|
|
523
|
+
protocol,
|
|
524
|
+
hostname,
|
|
525
|
+
port,
|
|
526
|
+
method: "PATCH",
|
|
527
|
+
headers,
|
|
528
|
+
path: resolvedPath,
|
|
529
|
+
body,
|
|
530
|
+
});
|
|
531
|
+
};
|
|
532
|
+
exports.se_UpdateTemplateGroupAccessControlEntryCommand = se_UpdateTemplateGroupAccessControlEntryCommand;
|
|
533
|
+
const de_CreateConnectorCommand = async (output, context) => {
|
|
534
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
535
|
+
return de_CreateConnectorCommandError(output, context);
|
|
536
|
+
}
|
|
537
|
+
const contents = (0, smithy_client_1.map)({
|
|
538
|
+
$metadata: deserializeMetadata(output),
|
|
539
|
+
});
|
|
540
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
541
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
542
|
+
ConnectorArn: smithy_client_1.expectString,
|
|
543
|
+
});
|
|
544
|
+
Object.assign(contents, doc);
|
|
545
|
+
return contents;
|
|
546
|
+
};
|
|
547
|
+
exports.de_CreateConnectorCommand = de_CreateConnectorCommand;
|
|
548
|
+
const de_CreateConnectorCommandError = async (output, context) => {
|
|
549
|
+
const parsedOutput = {
|
|
550
|
+
...output,
|
|
551
|
+
body: await parseErrorBody(output.body, context),
|
|
552
|
+
};
|
|
553
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
554
|
+
switch (errorCode) {
|
|
555
|
+
case "AccessDeniedException":
|
|
556
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
557
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
558
|
+
case "ConflictException":
|
|
559
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
560
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
561
|
+
case "InternalServerException":
|
|
562
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
563
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
564
|
+
case "ResourceNotFoundException":
|
|
565
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
566
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
567
|
+
case "ServiceQuotaExceededException":
|
|
568
|
+
case "com.amazonaws.pcaconnectorad#ServiceQuotaExceededException":
|
|
569
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
570
|
+
case "ThrottlingException":
|
|
571
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
572
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
573
|
+
case "ValidationException":
|
|
574
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
575
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
576
|
+
default:
|
|
577
|
+
const parsedBody = parsedOutput.body;
|
|
578
|
+
return throwDefaultError({
|
|
579
|
+
output,
|
|
580
|
+
parsedBody,
|
|
581
|
+
errorCode,
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
const de_CreateDirectoryRegistrationCommand = async (output, context) => {
|
|
586
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
587
|
+
return de_CreateDirectoryRegistrationCommandError(output, context);
|
|
588
|
+
}
|
|
589
|
+
const contents = (0, smithy_client_1.map)({
|
|
590
|
+
$metadata: deserializeMetadata(output),
|
|
591
|
+
});
|
|
592
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
593
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
594
|
+
DirectoryRegistrationArn: smithy_client_1.expectString,
|
|
595
|
+
});
|
|
596
|
+
Object.assign(contents, doc);
|
|
597
|
+
return contents;
|
|
598
|
+
};
|
|
599
|
+
exports.de_CreateDirectoryRegistrationCommand = de_CreateDirectoryRegistrationCommand;
|
|
600
|
+
const de_CreateDirectoryRegistrationCommandError = async (output, context) => {
|
|
601
|
+
const parsedOutput = {
|
|
602
|
+
...output,
|
|
603
|
+
body: await parseErrorBody(output.body, context),
|
|
604
|
+
};
|
|
605
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
606
|
+
switch (errorCode) {
|
|
607
|
+
case "AccessDeniedException":
|
|
608
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
609
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
610
|
+
case "ConflictException":
|
|
611
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
612
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
613
|
+
case "InternalServerException":
|
|
614
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
615
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
616
|
+
case "ResourceNotFoundException":
|
|
617
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
618
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
619
|
+
case "ThrottlingException":
|
|
620
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
621
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
622
|
+
case "ValidationException":
|
|
623
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
624
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
625
|
+
default:
|
|
626
|
+
const parsedBody = parsedOutput.body;
|
|
627
|
+
return throwDefaultError({
|
|
628
|
+
output,
|
|
629
|
+
parsedBody,
|
|
630
|
+
errorCode,
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
const de_CreateServicePrincipalNameCommand = async (output, context) => {
|
|
635
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
636
|
+
return de_CreateServicePrincipalNameCommandError(output, context);
|
|
637
|
+
}
|
|
638
|
+
const contents = (0, smithy_client_1.map)({
|
|
639
|
+
$metadata: deserializeMetadata(output),
|
|
640
|
+
});
|
|
641
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
642
|
+
return contents;
|
|
643
|
+
};
|
|
644
|
+
exports.de_CreateServicePrincipalNameCommand = de_CreateServicePrincipalNameCommand;
|
|
645
|
+
const de_CreateServicePrincipalNameCommandError = async (output, context) => {
|
|
646
|
+
const parsedOutput = {
|
|
647
|
+
...output,
|
|
648
|
+
body: await parseErrorBody(output.body, context),
|
|
649
|
+
};
|
|
650
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
651
|
+
switch (errorCode) {
|
|
652
|
+
case "AccessDeniedException":
|
|
653
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
654
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
655
|
+
case "ConflictException":
|
|
656
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
657
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
658
|
+
case "InternalServerException":
|
|
659
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
660
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
661
|
+
case "ResourceNotFoundException":
|
|
662
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
663
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
664
|
+
case "ThrottlingException":
|
|
665
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
666
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
667
|
+
case "ValidationException":
|
|
668
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
669
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
670
|
+
default:
|
|
671
|
+
const parsedBody = parsedOutput.body;
|
|
672
|
+
return throwDefaultError({
|
|
673
|
+
output,
|
|
674
|
+
parsedBody,
|
|
675
|
+
errorCode,
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
const de_CreateTemplateCommand = async (output, context) => {
|
|
680
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
681
|
+
return de_CreateTemplateCommandError(output, context);
|
|
682
|
+
}
|
|
683
|
+
const contents = (0, smithy_client_1.map)({
|
|
684
|
+
$metadata: deserializeMetadata(output),
|
|
685
|
+
});
|
|
686
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
687
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
688
|
+
TemplateArn: smithy_client_1.expectString,
|
|
689
|
+
});
|
|
690
|
+
Object.assign(contents, doc);
|
|
691
|
+
return contents;
|
|
692
|
+
};
|
|
693
|
+
exports.de_CreateTemplateCommand = de_CreateTemplateCommand;
|
|
694
|
+
const de_CreateTemplateCommandError = async (output, context) => {
|
|
695
|
+
const parsedOutput = {
|
|
696
|
+
...output,
|
|
697
|
+
body: await parseErrorBody(output.body, context),
|
|
698
|
+
};
|
|
699
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
700
|
+
switch (errorCode) {
|
|
701
|
+
case "AccessDeniedException":
|
|
702
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
703
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
704
|
+
case "ConflictException":
|
|
705
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
706
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
707
|
+
case "InternalServerException":
|
|
708
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
709
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
710
|
+
case "ResourceNotFoundException":
|
|
711
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
712
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
713
|
+
case "ServiceQuotaExceededException":
|
|
714
|
+
case "com.amazonaws.pcaconnectorad#ServiceQuotaExceededException":
|
|
715
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
716
|
+
case "ThrottlingException":
|
|
717
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
718
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
719
|
+
case "ValidationException":
|
|
720
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
721
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
722
|
+
default:
|
|
723
|
+
const parsedBody = parsedOutput.body;
|
|
724
|
+
return throwDefaultError({
|
|
725
|
+
output,
|
|
726
|
+
parsedBody,
|
|
727
|
+
errorCode,
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
const de_CreateTemplateGroupAccessControlEntryCommand = async (output, context) => {
|
|
732
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
733
|
+
return de_CreateTemplateGroupAccessControlEntryCommandError(output, context);
|
|
734
|
+
}
|
|
735
|
+
const contents = (0, smithy_client_1.map)({
|
|
736
|
+
$metadata: deserializeMetadata(output),
|
|
737
|
+
});
|
|
738
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
739
|
+
return contents;
|
|
740
|
+
};
|
|
741
|
+
exports.de_CreateTemplateGroupAccessControlEntryCommand = de_CreateTemplateGroupAccessControlEntryCommand;
|
|
742
|
+
const de_CreateTemplateGroupAccessControlEntryCommandError = async (output, context) => {
|
|
743
|
+
const parsedOutput = {
|
|
744
|
+
...output,
|
|
745
|
+
body: await parseErrorBody(output.body, context),
|
|
746
|
+
};
|
|
747
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
748
|
+
switch (errorCode) {
|
|
749
|
+
case "AccessDeniedException":
|
|
750
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
751
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
752
|
+
case "ConflictException":
|
|
753
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
754
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
755
|
+
case "InternalServerException":
|
|
756
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
757
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
758
|
+
case "ResourceNotFoundException":
|
|
759
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
760
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
761
|
+
case "ServiceQuotaExceededException":
|
|
762
|
+
case "com.amazonaws.pcaconnectorad#ServiceQuotaExceededException":
|
|
763
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
764
|
+
case "ThrottlingException":
|
|
765
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
766
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
767
|
+
case "ValidationException":
|
|
768
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
769
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
770
|
+
default:
|
|
771
|
+
const parsedBody = parsedOutput.body;
|
|
772
|
+
return throwDefaultError({
|
|
773
|
+
output,
|
|
774
|
+
parsedBody,
|
|
775
|
+
errorCode,
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
const de_DeleteConnectorCommand = async (output, context) => {
|
|
780
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
781
|
+
return de_DeleteConnectorCommandError(output, context);
|
|
782
|
+
}
|
|
783
|
+
const contents = (0, smithy_client_1.map)({
|
|
784
|
+
$metadata: deserializeMetadata(output),
|
|
785
|
+
});
|
|
786
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
787
|
+
return contents;
|
|
788
|
+
};
|
|
789
|
+
exports.de_DeleteConnectorCommand = de_DeleteConnectorCommand;
|
|
790
|
+
const de_DeleteConnectorCommandError = async (output, context) => {
|
|
791
|
+
const parsedOutput = {
|
|
792
|
+
...output,
|
|
793
|
+
body: await parseErrorBody(output.body, context),
|
|
794
|
+
};
|
|
795
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
796
|
+
switch (errorCode) {
|
|
797
|
+
case "AccessDeniedException":
|
|
798
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
799
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
800
|
+
case "ConflictException":
|
|
801
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
802
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
803
|
+
case "InternalServerException":
|
|
804
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
805
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
806
|
+
case "ResourceNotFoundException":
|
|
807
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
808
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
809
|
+
case "ThrottlingException":
|
|
810
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
811
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
812
|
+
case "ValidationException":
|
|
813
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
814
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
815
|
+
default:
|
|
816
|
+
const parsedBody = parsedOutput.body;
|
|
817
|
+
return throwDefaultError({
|
|
818
|
+
output,
|
|
819
|
+
parsedBody,
|
|
820
|
+
errorCode,
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
const de_DeleteDirectoryRegistrationCommand = async (output, context) => {
|
|
825
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
826
|
+
return de_DeleteDirectoryRegistrationCommandError(output, context);
|
|
827
|
+
}
|
|
828
|
+
const contents = (0, smithy_client_1.map)({
|
|
829
|
+
$metadata: deserializeMetadata(output),
|
|
830
|
+
});
|
|
831
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
832
|
+
return contents;
|
|
833
|
+
};
|
|
834
|
+
exports.de_DeleteDirectoryRegistrationCommand = de_DeleteDirectoryRegistrationCommand;
|
|
835
|
+
const de_DeleteDirectoryRegistrationCommandError = async (output, context) => {
|
|
836
|
+
const parsedOutput = {
|
|
837
|
+
...output,
|
|
838
|
+
body: await parseErrorBody(output.body, context),
|
|
839
|
+
};
|
|
840
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
841
|
+
switch (errorCode) {
|
|
842
|
+
case "AccessDeniedException":
|
|
843
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
844
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
845
|
+
case "ConflictException":
|
|
846
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
847
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
848
|
+
case "InternalServerException":
|
|
849
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
850
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
851
|
+
case "ThrottlingException":
|
|
852
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
853
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
854
|
+
case "ValidationException":
|
|
855
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
856
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
857
|
+
default:
|
|
858
|
+
const parsedBody = parsedOutput.body;
|
|
859
|
+
return throwDefaultError({
|
|
860
|
+
output,
|
|
861
|
+
parsedBody,
|
|
862
|
+
errorCode,
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
const de_DeleteServicePrincipalNameCommand = async (output, context) => {
|
|
867
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
868
|
+
return de_DeleteServicePrincipalNameCommandError(output, context);
|
|
869
|
+
}
|
|
870
|
+
const contents = (0, smithy_client_1.map)({
|
|
871
|
+
$metadata: deserializeMetadata(output),
|
|
872
|
+
});
|
|
873
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
874
|
+
return contents;
|
|
875
|
+
};
|
|
876
|
+
exports.de_DeleteServicePrincipalNameCommand = de_DeleteServicePrincipalNameCommand;
|
|
877
|
+
const de_DeleteServicePrincipalNameCommandError = async (output, context) => {
|
|
878
|
+
const parsedOutput = {
|
|
879
|
+
...output,
|
|
880
|
+
body: await parseErrorBody(output.body, context),
|
|
881
|
+
};
|
|
882
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
883
|
+
switch (errorCode) {
|
|
884
|
+
case "AccessDeniedException":
|
|
885
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
886
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
887
|
+
case "ConflictException":
|
|
888
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
889
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
890
|
+
case "InternalServerException":
|
|
891
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
892
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
893
|
+
case "ThrottlingException":
|
|
894
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
895
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
896
|
+
case "ValidationException":
|
|
897
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
898
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
899
|
+
default:
|
|
900
|
+
const parsedBody = parsedOutput.body;
|
|
901
|
+
return throwDefaultError({
|
|
902
|
+
output,
|
|
903
|
+
parsedBody,
|
|
904
|
+
errorCode,
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
const de_DeleteTemplateCommand = async (output, context) => {
|
|
909
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
910
|
+
return de_DeleteTemplateCommandError(output, context);
|
|
911
|
+
}
|
|
912
|
+
const contents = (0, smithy_client_1.map)({
|
|
913
|
+
$metadata: deserializeMetadata(output),
|
|
914
|
+
});
|
|
915
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
916
|
+
return contents;
|
|
917
|
+
};
|
|
918
|
+
exports.de_DeleteTemplateCommand = de_DeleteTemplateCommand;
|
|
919
|
+
const de_DeleteTemplateCommandError = async (output, context) => {
|
|
920
|
+
const parsedOutput = {
|
|
921
|
+
...output,
|
|
922
|
+
body: await parseErrorBody(output.body, context),
|
|
923
|
+
};
|
|
924
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
925
|
+
switch (errorCode) {
|
|
926
|
+
case "AccessDeniedException":
|
|
927
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
928
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
929
|
+
case "ConflictException":
|
|
930
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
931
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
932
|
+
case "InternalServerException":
|
|
933
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
934
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
935
|
+
case "ResourceNotFoundException":
|
|
936
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
937
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
938
|
+
case "ThrottlingException":
|
|
939
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
940
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
941
|
+
case "ValidationException":
|
|
942
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
943
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
944
|
+
default:
|
|
945
|
+
const parsedBody = parsedOutput.body;
|
|
946
|
+
return throwDefaultError({
|
|
947
|
+
output,
|
|
948
|
+
parsedBody,
|
|
949
|
+
errorCode,
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
};
|
|
953
|
+
const de_DeleteTemplateGroupAccessControlEntryCommand = async (output, context) => {
|
|
954
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
955
|
+
return de_DeleteTemplateGroupAccessControlEntryCommandError(output, context);
|
|
956
|
+
}
|
|
957
|
+
const contents = (0, smithy_client_1.map)({
|
|
958
|
+
$metadata: deserializeMetadata(output),
|
|
959
|
+
});
|
|
960
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
961
|
+
return contents;
|
|
962
|
+
};
|
|
963
|
+
exports.de_DeleteTemplateGroupAccessControlEntryCommand = de_DeleteTemplateGroupAccessControlEntryCommand;
|
|
964
|
+
const de_DeleteTemplateGroupAccessControlEntryCommandError = async (output, context) => {
|
|
965
|
+
const parsedOutput = {
|
|
966
|
+
...output,
|
|
967
|
+
body: await parseErrorBody(output.body, context),
|
|
968
|
+
};
|
|
969
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
970
|
+
switch (errorCode) {
|
|
971
|
+
case "AccessDeniedException":
|
|
972
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
973
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
974
|
+
case "ConflictException":
|
|
975
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
976
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
977
|
+
case "InternalServerException":
|
|
978
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
979
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
980
|
+
case "ResourceNotFoundException":
|
|
981
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
982
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
983
|
+
case "ThrottlingException":
|
|
984
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
985
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
986
|
+
case "ValidationException":
|
|
987
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
988
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
989
|
+
default:
|
|
990
|
+
const parsedBody = parsedOutput.body;
|
|
991
|
+
return throwDefaultError({
|
|
992
|
+
output,
|
|
993
|
+
parsedBody,
|
|
994
|
+
errorCode,
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
const de_GetConnectorCommand = async (output, context) => {
|
|
999
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1000
|
+
return de_GetConnectorCommandError(output, context);
|
|
1001
|
+
}
|
|
1002
|
+
const contents = (0, smithy_client_1.map)({
|
|
1003
|
+
$metadata: deserializeMetadata(output),
|
|
1004
|
+
});
|
|
1005
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1006
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1007
|
+
Connector: (_) => de_Connector(_, context),
|
|
1008
|
+
});
|
|
1009
|
+
Object.assign(contents, doc);
|
|
1010
|
+
return contents;
|
|
1011
|
+
};
|
|
1012
|
+
exports.de_GetConnectorCommand = de_GetConnectorCommand;
|
|
1013
|
+
const de_GetConnectorCommandError = async (output, context) => {
|
|
1014
|
+
const parsedOutput = {
|
|
1015
|
+
...output,
|
|
1016
|
+
body: await parseErrorBody(output.body, context),
|
|
1017
|
+
};
|
|
1018
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1019
|
+
switch (errorCode) {
|
|
1020
|
+
case "AccessDeniedException":
|
|
1021
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1022
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1023
|
+
case "InternalServerException":
|
|
1024
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1025
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1026
|
+
case "ResourceNotFoundException":
|
|
1027
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1028
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1029
|
+
case "ThrottlingException":
|
|
1030
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1031
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1032
|
+
case "ValidationException":
|
|
1033
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1034
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1035
|
+
default:
|
|
1036
|
+
const parsedBody = parsedOutput.body;
|
|
1037
|
+
return throwDefaultError({
|
|
1038
|
+
output,
|
|
1039
|
+
parsedBody,
|
|
1040
|
+
errorCode,
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
};
|
|
1044
|
+
const de_GetDirectoryRegistrationCommand = async (output, context) => {
|
|
1045
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1046
|
+
return de_GetDirectoryRegistrationCommandError(output, context);
|
|
1047
|
+
}
|
|
1048
|
+
const contents = (0, smithy_client_1.map)({
|
|
1049
|
+
$metadata: deserializeMetadata(output),
|
|
1050
|
+
});
|
|
1051
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1052
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1053
|
+
DirectoryRegistration: (_) => de_DirectoryRegistration(_, context),
|
|
1054
|
+
});
|
|
1055
|
+
Object.assign(contents, doc);
|
|
1056
|
+
return contents;
|
|
1057
|
+
};
|
|
1058
|
+
exports.de_GetDirectoryRegistrationCommand = de_GetDirectoryRegistrationCommand;
|
|
1059
|
+
const de_GetDirectoryRegistrationCommandError = async (output, context) => {
|
|
1060
|
+
const parsedOutput = {
|
|
1061
|
+
...output,
|
|
1062
|
+
body: await parseErrorBody(output.body, context),
|
|
1063
|
+
};
|
|
1064
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1065
|
+
switch (errorCode) {
|
|
1066
|
+
case "AccessDeniedException":
|
|
1067
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1068
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1069
|
+
case "InternalServerException":
|
|
1070
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1071
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1072
|
+
case "ResourceNotFoundException":
|
|
1073
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1074
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1075
|
+
case "ThrottlingException":
|
|
1076
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1077
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1078
|
+
case "ValidationException":
|
|
1079
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1080
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1081
|
+
default:
|
|
1082
|
+
const parsedBody = parsedOutput.body;
|
|
1083
|
+
return throwDefaultError({
|
|
1084
|
+
output,
|
|
1085
|
+
parsedBody,
|
|
1086
|
+
errorCode,
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
const de_GetServicePrincipalNameCommand = async (output, context) => {
|
|
1091
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1092
|
+
return de_GetServicePrincipalNameCommandError(output, context);
|
|
1093
|
+
}
|
|
1094
|
+
const contents = (0, smithy_client_1.map)({
|
|
1095
|
+
$metadata: deserializeMetadata(output),
|
|
1096
|
+
});
|
|
1097
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1098
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1099
|
+
ServicePrincipalName: (_) => de_ServicePrincipalName(_, context),
|
|
1100
|
+
});
|
|
1101
|
+
Object.assign(contents, doc);
|
|
1102
|
+
return contents;
|
|
1103
|
+
};
|
|
1104
|
+
exports.de_GetServicePrincipalNameCommand = de_GetServicePrincipalNameCommand;
|
|
1105
|
+
const de_GetServicePrincipalNameCommandError = async (output, context) => {
|
|
1106
|
+
const parsedOutput = {
|
|
1107
|
+
...output,
|
|
1108
|
+
body: await parseErrorBody(output.body, context),
|
|
1109
|
+
};
|
|
1110
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1111
|
+
switch (errorCode) {
|
|
1112
|
+
case "AccessDeniedException":
|
|
1113
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1114
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1115
|
+
case "InternalServerException":
|
|
1116
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1117
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1118
|
+
case "ResourceNotFoundException":
|
|
1119
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1120
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1121
|
+
case "ThrottlingException":
|
|
1122
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1123
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1124
|
+
case "ValidationException":
|
|
1125
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1126
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1127
|
+
default:
|
|
1128
|
+
const parsedBody = parsedOutput.body;
|
|
1129
|
+
return throwDefaultError({
|
|
1130
|
+
output,
|
|
1131
|
+
parsedBody,
|
|
1132
|
+
errorCode,
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
const de_GetTemplateCommand = async (output, context) => {
|
|
1137
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1138
|
+
return de_GetTemplateCommandError(output, context);
|
|
1139
|
+
}
|
|
1140
|
+
const contents = (0, smithy_client_1.map)({
|
|
1141
|
+
$metadata: deserializeMetadata(output),
|
|
1142
|
+
});
|
|
1143
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1144
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1145
|
+
Template: (_) => de_Template(_, context),
|
|
1146
|
+
});
|
|
1147
|
+
Object.assign(contents, doc);
|
|
1148
|
+
return contents;
|
|
1149
|
+
};
|
|
1150
|
+
exports.de_GetTemplateCommand = de_GetTemplateCommand;
|
|
1151
|
+
const de_GetTemplateCommandError = async (output, context) => {
|
|
1152
|
+
const parsedOutput = {
|
|
1153
|
+
...output,
|
|
1154
|
+
body: await parseErrorBody(output.body, context),
|
|
1155
|
+
};
|
|
1156
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1157
|
+
switch (errorCode) {
|
|
1158
|
+
case "AccessDeniedException":
|
|
1159
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1160
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1161
|
+
case "InternalServerException":
|
|
1162
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1163
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1164
|
+
case "ResourceNotFoundException":
|
|
1165
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1166
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1167
|
+
case "ThrottlingException":
|
|
1168
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1169
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1170
|
+
case "ValidationException":
|
|
1171
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1172
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1173
|
+
default:
|
|
1174
|
+
const parsedBody = parsedOutput.body;
|
|
1175
|
+
return throwDefaultError({
|
|
1176
|
+
output,
|
|
1177
|
+
parsedBody,
|
|
1178
|
+
errorCode,
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1182
|
+
const de_GetTemplateGroupAccessControlEntryCommand = async (output, context) => {
|
|
1183
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1184
|
+
return de_GetTemplateGroupAccessControlEntryCommandError(output, context);
|
|
1185
|
+
}
|
|
1186
|
+
const contents = (0, smithy_client_1.map)({
|
|
1187
|
+
$metadata: deserializeMetadata(output),
|
|
1188
|
+
});
|
|
1189
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1190
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1191
|
+
AccessControlEntry: (_) => de_AccessControlEntry(_, context),
|
|
1192
|
+
});
|
|
1193
|
+
Object.assign(contents, doc);
|
|
1194
|
+
return contents;
|
|
1195
|
+
};
|
|
1196
|
+
exports.de_GetTemplateGroupAccessControlEntryCommand = de_GetTemplateGroupAccessControlEntryCommand;
|
|
1197
|
+
const de_GetTemplateGroupAccessControlEntryCommandError = async (output, context) => {
|
|
1198
|
+
const parsedOutput = {
|
|
1199
|
+
...output,
|
|
1200
|
+
body: await parseErrorBody(output.body, context),
|
|
1201
|
+
};
|
|
1202
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1203
|
+
switch (errorCode) {
|
|
1204
|
+
case "AccessDeniedException":
|
|
1205
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1206
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1207
|
+
case "InternalServerException":
|
|
1208
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1209
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1210
|
+
case "ResourceNotFoundException":
|
|
1211
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1212
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1213
|
+
case "ThrottlingException":
|
|
1214
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1215
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1216
|
+
case "ValidationException":
|
|
1217
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1218
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1219
|
+
default:
|
|
1220
|
+
const parsedBody = parsedOutput.body;
|
|
1221
|
+
return throwDefaultError({
|
|
1222
|
+
output,
|
|
1223
|
+
parsedBody,
|
|
1224
|
+
errorCode,
|
|
1225
|
+
});
|
|
1226
|
+
}
|
|
1227
|
+
};
|
|
1228
|
+
const de_ListConnectorsCommand = async (output, context) => {
|
|
1229
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1230
|
+
return de_ListConnectorsCommandError(output, context);
|
|
1231
|
+
}
|
|
1232
|
+
const contents = (0, smithy_client_1.map)({
|
|
1233
|
+
$metadata: deserializeMetadata(output),
|
|
1234
|
+
});
|
|
1235
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1236
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1237
|
+
Connectors: (_) => de_ConnectorList(_, context),
|
|
1238
|
+
NextToken: smithy_client_1.expectString,
|
|
1239
|
+
});
|
|
1240
|
+
Object.assign(contents, doc);
|
|
1241
|
+
return contents;
|
|
1242
|
+
};
|
|
1243
|
+
exports.de_ListConnectorsCommand = de_ListConnectorsCommand;
|
|
1244
|
+
const de_ListConnectorsCommandError = async (output, context) => {
|
|
1245
|
+
const parsedOutput = {
|
|
1246
|
+
...output,
|
|
1247
|
+
body: await parseErrorBody(output.body, context),
|
|
1248
|
+
};
|
|
1249
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1250
|
+
switch (errorCode) {
|
|
1251
|
+
case "AccessDeniedException":
|
|
1252
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1253
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1254
|
+
case "InternalServerException":
|
|
1255
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1256
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1257
|
+
case "ThrottlingException":
|
|
1258
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1259
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1260
|
+
case "ValidationException":
|
|
1261
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1262
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1263
|
+
default:
|
|
1264
|
+
const parsedBody = parsedOutput.body;
|
|
1265
|
+
return throwDefaultError({
|
|
1266
|
+
output,
|
|
1267
|
+
parsedBody,
|
|
1268
|
+
errorCode,
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1271
|
+
};
|
|
1272
|
+
const de_ListDirectoryRegistrationsCommand = async (output, context) => {
|
|
1273
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1274
|
+
return de_ListDirectoryRegistrationsCommandError(output, context);
|
|
1275
|
+
}
|
|
1276
|
+
const contents = (0, smithy_client_1.map)({
|
|
1277
|
+
$metadata: deserializeMetadata(output),
|
|
1278
|
+
});
|
|
1279
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1280
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1281
|
+
DirectoryRegistrations: (_) => de_DirectoryRegistrationList(_, context),
|
|
1282
|
+
NextToken: smithy_client_1.expectString,
|
|
1283
|
+
});
|
|
1284
|
+
Object.assign(contents, doc);
|
|
1285
|
+
return contents;
|
|
1286
|
+
};
|
|
1287
|
+
exports.de_ListDirectoryRegistrationsCommand = de_ListDirectoryRegistrationsCommand;
|
|
1288
|
+
const de_ListDirectoryRegistrationsCommandError = async (output, context) => {
|
|
1289
|
+
const parsedOutput = {
|
|
1290
|
+
...output,
|
|
1291
|
+
body: await parseErrorBody(output.body, context),
|
|
1292
|
+
};
|
|
1293
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1294
|
+
switch (errorCode) {
|
|
1295
|
+
case "AccessDeniedException":
|
|
1296
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1297
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1298
|
+
case "InternalServerException":
|
|
1299
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1300
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1301
|
+
case "ThrottlingException":
|
|
1302
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1303
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1304
|
+
case "ValidationException":
|
|
1305
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1306
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1307
|
+
default:
|
|
1308
|
+
const parsedBody = parsedOutput.body;
|
|
1309
|
+
return throwDefaultError({
|
|
1310
|
+
output,
|
|
1311
|
+
parsedBody,
|
|
1312
|
+
errorCode,
|
|
1313
|
+
});
|
|
1314
|
+
}
|
|
1315
|
+
};
|
|
1316
|
+
const de_ListServicePrincipalNamesCommand = async (output, context) => {
|
|
1317
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1318
|
+
return de_ListServicePrincipalNamesCommandError(output, context);
|
|
1319
|
+
}
|
|
1320
|
+
const contents = (0, smithy_client_1.map)({
|
|
1321
|
+
$metadata: deserializeMetadata(output),
|
|
1322
|
+
});
|
|
1323
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1324
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1325
|
+
NextToken: smithy_client_1.expectString,
|
|
1326
|
+
ServicePrincipalNames: (_) => de_ServicePrincipalNameList(_, context),
|
|
1327
|
+
});
|
|
1328
|
+
Object.assign(contents, doc);
|
|
1329
|
+
return contents;
|
|
1330
|
+
};
|
|
1331
|
+
exports.de_ListServicePrincipalNamesCommand = de_ListServicePrincipalNamesCommand;
|
|
1332
|
+
const de_ListServicePrincipalNamesCommandError = async (output, context) => {
|
|
1333
|
+
const parsedOutput = {
|
|
1334
|
+
...output,
|
|
1335
|
+
body: await parseErrorBody(output.body, context),
|
|
1336
|
+
};
|
|
1337
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1338
|
+
switch (errorCode) {
|
|
1339
|
+
case "AccessDeniedException":
|
|
1340
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1341
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1342
|
+
case "InternalServerException":
|
|
1343
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1344
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1345
|
+
case "ResourceNotFoundException":
|
|
1346
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1347
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1348
|
+
case "ThrottlingException":
|
|
1349
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1350
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1351
|
+
case "ValidationException":
|
|
1352
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1353
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1354
|
+
default:
|
|
1355
|
+
const parsedBody = parsedOutput.body;
|
|
1356
|
+
return throwDefaultError({
|
|
1357
|
+
output,
|
|
1358
|
+
parsedBody,
|
|
1359
|
+
errorCode,
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1362
|
+
};
|
|
1363
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1364
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1365
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
1366
|
+
}
|
|
1367
|
+
const contents = (0, smithy_client_1.map)({
|
|
1368
|
+
$metadata: deserializeMetadata(output),
|
|
1369
|
+
});
|
|
1370
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1371
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1372
|
+
Tags: smithy_client_1._json,
|
|
1373
|
+
});
|
|
1374
|
+
Object.assign(contents, doc);
|
|
1375
|
+
return contents;
|
|
1376
|
+
};
|
|
1377
|
+
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
1378
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1379
|
+
const parsedOutput = {
|
|
1380
|
+
...output,
|
|
1381
|
+
body: await parseErrorBody(output.body, context),
|
|
1382
|
+
};
|
|
1383
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1384
|
+
switch (errorCode) {
|
|
1385
|
+
case "AccessDeniedException":
|
|
1386
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1387
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1388
|
+
case "InternalServerException":
|
|
1389
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1390
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1391
|
+
case "ResourceNotFoundException":
|
|
1392
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1393
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1394
|
+
case "ThrottlingException":
|
|
1395
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1396
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1397
|
+
case "ValidationException":
|
|
1398
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1399
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1400
|
+
default:
|
|
1401
|
+
const parsedBody = parsedOutput.body;
|
|
1402
|
+
return throwDefaultError({
|
|
1403
|
+
output,
|
|
1404
|
+
parsedBody,
|
|
1405
|
+
errorCode,
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
};
|
|
1409
|
+
const de_ListTemplateGroupAccessControlEntriesCommand = async (output, context) => {
|
|
1410
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1411
|
+
return de_ListTemplateGroupAccessControlEntriesCommandError(output, context);
|
|
1412
|
+
}
|
|
1413
|
+
const contents = (0, smithy_client_1.map)({
|
|
1414
|
+
$metadata: deserializeMetadata(output),
|
|
1415
|
+
});
|
|
1416
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1417
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1418
|
+
AccessControlEntries: (_) => de_AccessControlEntryList(_, context),
|
|
1419
|
+
NextToken: smithy_client_1.expectString,
|
|
1420
|
+
});
|
|
1421
|
+
Object.assign(contents, doc);
|
|
1422
|
+
return contents;
|
|
1423
|
+
};
|
|
1424
|
+
exports.de_ListTemplateGroupAccessControlEntriesCommand = de_ListTemplateGroupAccessControlEntriesCommand;
|
|
1425
|
+
const de_ListTemplateGroupAccessControlEntriesCommandError = async (output, context) => {
|
|
1426
|
+
const parsedOutput = {
|
|
1427
|
+
...output,
|
|
1428
|
+
body: await parseErrorBody(output.body, context),
|
|
1429
|
+
};
|
|
1430
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1431
|
+
switch (errorCode) {
|
|
1432
|
+
case "AccessDeniedException":
|
|
1433
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1434
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1435
|
+
case "InternalServerException":
|
|
1436
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1437
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1438
|
+
case "ResourceNotFoundException":
|
|
1439
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1440
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1441
|
+
case "ThrottlingException":
|
|
1442
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1443
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1444
|
+
case "ValidationException":
|
|
1445
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1446
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1447
|
+
default:
|
|
1448
|
+
const parsedBody = parsedOutput.body;
|
|
1449
|
+
return throwDefaultError({
|
|
1450
|
+
output,
|
|
1451
|
+
parsedBody,
|
|
1452
|
+
errorCode,
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
const de_ListTemplatesCommand = async (output, context) => {
|
|
1457
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1458
|
+
return de_ListTemplatesCommandError(output, context);
|
|
1459
|
+
}
|
|
1460
|
+
const contents = (0, smithy_client_1.map)({
|
|
1461
|
+
$metadata: deserializeMetadata(output),
|
|
1462
|
+
});
|
|
1463
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1464
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1465
|
+
NextToken: smithy_client_1.expectString,
|
|
1466
|
+
Templates: (_) => de_TemplateList(_, context),
|
|
1467
|
+
});
|
|
1468
|
+
Object.assign(contents, doc);
|
|
1469
|
+
return contents;
|
|
1470
|
+
};
|
|
1471
|
+
exports.de_ListTemplatesCommand = de_ListTemplatesCommand;
|
|
1472
|
+
const de_ListTemplatesCommandError = async (output, context) => {
|
|
1473
|
+
const parsedOutput = {
|
|
1474
|
+
...output,
|
|
1475
|
+
body: await parseErrorBody(output.body, context),
|
|
1476
|
+
};
|
|
1477
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1478
|
+
switch (errorCode) {
|
|
1479
|
+
case "AccessDeniedException":
|
|
1480
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1481
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1482
|
+
case "InternalServerException":
|
|
1483
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1484
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1485
|
+
case "ResourceNotFoundException":
|
|
1486
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1487
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1488
|
+
case "ThrottlingException":
|
|
1489
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1490
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1491
|
+
case "ValidationException":
|
|
1492
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1493
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1494
|
+
default:
|
|
1495
|
+
const parsedBody = parsedOutput.body;
|
|
1496
|
+
return throwDefaultError({
|
|
1497
|
+
output,
|
|
1498
|
+
parsedBody,
|
|
1499
|
+
errorCode,
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
};
|
|
1503
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
1504
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1505
|
+
return de_TagResourceCommandError(output, context);
|
|
1506
|
+
}
|
|
1507
|
+
const contents = (0, smithy_client_1.map)({
|
|
1508
|
+
$metadata: deserializeMetadata(output),
|
|
1509
|
+
});
|
|
1510
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1511
|
+
return contents;
|
|
1512
|
+
};
|
|
1513
|
+
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1514
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
1515
|
+
const parsedOutput = {
|
|
1516
|
+
...output,
|
|
1517
|
+
body: await parseErrorBody(output.body, context),
|
|
1518
|
+
};
|
|
1519
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1520
|
+
switch (errorCode) {
|
|
1521
|
+
case "AccessDeniedException":
|
|
1522
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1523
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1524
|
+
case "InternalServerException":
|
|
1525
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1526
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1527
|
+
case "ResourceNotFoundException":
|
|
1528
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1529
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1530
|
+
case "ThrottlingException":
|
|
1531
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1532
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1533
|
+
case "ValidationException":
|
|
1534
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1535
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1536
|
+
default:
|
|
1537
|
+
const parsedBody = parsedOutput.body;
|
|
1538
|
+
return throwDefaultError({
|
|
1539
|
+
output,
|
|
1540
|
+
parsedBody,
|
|
1541
|
+
errorCode,
|
|
1542
|
+
});
|
|
1543
|
+
}
|
|
1544
|
+
};
|
|
1545
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
1546
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1547
|
+
return de_UntagResourceCommandError(output, context);
|
|
1548
|
+
}
|
|
1549
|
+
const contents = (0, smithy_client_1.map)({
|
|
1550
|
+
$metadata: deserializeMetadata(output),
|
|
1551
|
+
});
|
|
1552
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1553
|
+
return contents;
|
|
1554
|
+
};
|
|
1555
|
+
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1556
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
1557
|
+
const parsedOutput = {
|
|
1558
|
+
...output,
|
|
1559
|
+
body: await parseErrorBody(output.body, context),
|
|
1560
|
+
};
|
|
1561
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1562
|
+
switch (errorCode) {
|
|
1563
|
+
case "AccessDeniedException":
|
|
1564
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1565
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1566
|
+
case "InternalServerException":
|
|
1567
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1568
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1569
|
+
case "ResourceNotFoundException":
|
|
1570
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1571
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1572
|
+
case "ThrottlingException":
|
|
1573
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1574
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1575
|
+
case "ValidationException":
|
|
1576
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1577
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1578
|
+
default:
|
|
1579
|
+
const parsedBody = parsedOutput.body;
|
|
1580
|
+
return throwDefaultError({
|
|
1581
|
+
output,
|
|
1582
|
+
parsedBody,
|
|
1583
|
+
errorCode,
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
const de_UpdateTemplateCommand = async (output, context) => {
|
|
1588
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1589
|
+
return de_UpdateTemplateCommandError(output, context);
|
|
1590
|
+
}
|
|
1591
|
+
const contents = (0, smithy_client_1.map)({
|
|
1592
|
+
$metadata: deserializeMetadata(output),
|
|
1593
|
+
});
|
|
1594
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1595
|
+
return contents;
|
|
1596
|
+
};
|
|
1597
|
+
exports.de_UpdateTemplateCommand = de_UpdateTemplateCommand;
|
|
1598
|
+
const de_UpdateTemplateCommandError = async (output, context) => {
|
|
1599
|
+
const parsedOutput = {
|
|
1600
|
+
...output,
|
|
1601
|
+
body: await parseErrorBody(output.body, context),
|
|
1602
|
+
};
|
|
1603
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1604
|
+
switch (errorCode) {
|
|
1605
|
+
case "AccessDeniedException":
|
|
1606
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1607
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1608
|
+
case "ConflictException":
|
|
1609
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
1610
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1611
|
+
case "InternalServerException":
|
|
1612
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1613
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1614
|
+
case "ResourceNotFoundException":
|
|
1615
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1616
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1617
|
+
case "ThrottlingException":
|
|
1618
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1619
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1620
|
+
case "ValidationException":
|
|
1621
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1622
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1623
|
+
default:
|
|
1624
|
+
const parsedBody = parsedOutput.body;
|
|
1625
|
+
return throwDefaultError({
|
|
1626
|
+
output,
|
|
1627
|
+
parsedBody,
|
|
1628
|
+
errorCode,
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
};
|
|
1632
|
+
const de_UpdateTemplateGroupAccessControlEntryCommand = async (output, context) => {
|
|
1633
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1634
|
+
return de_UpdateTemplateGroupAccessControlEntryCommandError(output, context);
|
|
1635
|
+
}
|
|
1636
|
+
const contents = (0, smithy_client_1.map)({
|
|
1637
|
+
$metadata: deserializeMetadata(output),
|
|
1638
|
+
});
|
|
1639
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1640
|
+
return contents;
|
|
1641
|
+
};
|
|
1642
|
+
exports.de_UpdateTemplateGroupAccessControlEntryCommand = de_UpdateTemplateGroupAccessControlEntryCommand;
|
|
1643
|
+
const de_UpdateTemplateGroupAccessControlEntryCommandError = async (output, context) => {
|
|
1644
|
+
const parsedOutput = {
|
|
1645
|
+
...output,
|
|
1646
|
+
body: await parseErrorBody(output.body, context),
|
|
1647
|
+
};
|
|
1648
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1649
|
+
switch (errorCode) {
|
|
1650
|
+
case "AccessDeniedException":
|
|
1651
|
+
case "com.amazonaws.pcaconnectorad#AccessDeniedException":
|
|
1652
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1653
|
+
case "ConflictException":
|
|
1654
|
+
case "com.amazonaws.pcaconnectorad#ConflictException":
|
|
1655
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1656
|
+
case "InternalServerException":
|
|
1657
|
+
case "com.amazonaws.pcaconnectorad#InternalServerException":
|
|
1658
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1659
|
+
case "ResourceNotFoundException":
|
|
1660
|
+
case "com.amazonaws.pcaconnectorad#ResourceNotFoundException":
|
|
1661
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1662
|
+
case "ThrottlingException":
|
|
1663
|
+
case "com.amazonaws.pcaconnectorad#ThrottlingException":
|
|
1664
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1665
|
+
case "ValidationException":
|
|
1666
|
+
case "com.amazonaws.pcaconnectorad#ValidationException":
|
|
1667
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1668
|
+
default:
|
|
1669
|
+
const parsedBody = parsedOutput.body;
|
|
1670
|
+
return throwDefaultError({
|
|
1671
|
+
output,
|
|
1672
|
+
parsedBody,
|
|
1673
|
+
errorCode,
|
|
1674
|
+
});
|
|
1675
|
+
}
|
|
1676
|
+
};
|
|
1677
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(PcaConnectorAdServiceException_1.PcaConnectorAdServiceException);
|
|
1678
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1679
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1680
|
+
const data = parsedOutput.body;
|
|
1681
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1682
|
+
Message: smithy_client_1.expectString,
|
|
1683
|
+
});
|
|
1684
|
+
Object.assign(contents, doc);
|
|
1685
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
1686
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1687
|
+
...contents,
|
|
1688
|
+
});
|
|
1689
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1690
|
+
};
|
|
1691
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1692
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1693
|
+
const data = parsedOutput.body;
|
|
1694
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1695
|
+
Message: smithy_client_1.expectString,
|
|
1696
|
+
ResourceId: smithy_client_1.expectString,
|
|
1697
|
+
ResourceType: smithy_client_1.expectString,
|
|
1698
|
+
});
|
|
1699
|
+
Object.assign(contents, doc);
|
|
1700
|
+
const exception = new models_0_1.ConflictException({
|
|
1701
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1702
|
+
...contents,
|
|
1703
|
+
});
|
|
1704
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1705
|
+
};
|
|
1706
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1707
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1708
|
+
const data = parsedOutput.body;
|
|
1709
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1710
|
+
Message: smithy_client_1.expectString,
|
|
1711
|
+
});
|
|
1712
|
+
Object.assign(contents, doc);
|
|
1713
|
+
const exception = new models_0_1.InternalServerException({
|
|
1714
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1715
|
+
...contents,
|
|
1716
|
+
});
|
|
1717
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1718
|
+
};
|
|
1719
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1720
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1721
|
+
const data = parsedOutput.body;
|
|
1722
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1723
|
+
Message: smithy_client_1.expectString,
|
|
1724
|
+
ResourceId: smithy_client_1.expectString,
|
|
1725
|
+
ResourceType: smithy_client_1.expectString,
|
|
1726
|
+
});
|
|
1727
|
+
Object.assign(contents, doc);
|
|
1728
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
1729
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1730
|
+
...contents,
|
|
1731
|
+
});
|
|
1732
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1733
|
+
};
|
|
1734
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1735
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1736
|
+
const data = parsedOutput.body;
|
|
1737
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1738
|
+
Message: smithy_client_1.expectString,
|
|
1739
|
+
QuotaCode: smithy_client_1.expectString,
|
|
1740
|
+
ResourceId: smithy_client_1.expectString,
|
|
1741
|
+
ResourceType: smithy_client_1.expectString,
|
|
1742
|
+
ServiceCode: smithy_client_1.expectString,
|
|
1743
|
+
});
|
|
1744
|
+
Object.assign(contents, doc);
|
|
1745
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1746
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1747
|
+
...contents,
|
|
1748
|
+
});
|
|
1749
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1750
|
+
};
|
|
1751
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1752
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1753
|
+
const data = parsedOutput.body;
|
|
1754
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1755
|
+
Message: smithy_client_1.expectString,
|
|
1756
|
+
QuotaCode: smithy_client_1.expectString,
|
|
1757
|
+
ServiceCode: smithy_client_1.expectString,
|
|
1758
|
+
});
|
|
1759
|
+
Object.assign(contents, doc);
|
|
1760
|
+
const exception = new models_0_1.ThrottlingException({
|
|
1761
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1762
|
+
...contents,
|
|
1763
|
+
});
|
|
1764
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1765
|
+
};
|
|
1766
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1767
|
+
const contents = (0, smithy_client_1.map)({});
|
|
1768
|
+
const data = parsedOutput.body;
|
|
1769
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
1770
|
+
Message: smithy_client_1.expectString,
|
|
1771
|
+
Reason: smithy_client_1.expectString,
|
|
1772
|
+
});
|
|
1773
|
+
Object.assign(contents, doc);
|
|
1774
|
+
const exception = new models_0_1.ValidationException({
|
|
1775
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1776
|
+
...contents,
|
|
1777
|
+
});
|
|
1778
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1779
|
+
};
|
|
1780
|
+
const de_AccessControlEntry = (output, context) => {
|
|
1781
|
+
return (0, smithy_client_1.take)(output, {
|
|
1782
|
+
AccessRights: smithy_client_1._json,
|
|
1783
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1784
|
+
GroupDisplayName: smithy_client_1.expectString,
|
|
1785
|
+
GroupSecurityIdentifier: smithy_client_1.expectString,
|
|
1786
|
+
TemplateArn: smithy_client_1.expectString,
|
|
1787
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1788
|
+
});
|
|
1789
|
+
};
|
|
1790
|
+
const de_AccessControlEntryList = (output, context) => {
|
|
1791
|
+
const retVal = (output || [])
|
|
1792
|
+
.filter((e) => e != null)
|
|
1793
|
+
.map((entry) => {
|
|
1794
|
+
return de_AccessControlEntrySummary(entry, context);
|
|
1795
|
+
});
|
|
1796
|
+
return retVal;
|
|
1797
|
+
};
|
|
1798
|
+
const de_AccessControlEntrySummary = (output, context) => {
|
|
1799
|
+
return (0, smithy_client_1.take)(output, {
|
|
1800
|
+
AccessRights: smithy_client_1._json,
|
|
1801
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1802
|
+
GroupDisplayName: smithy_client_1.expectString,
|
|
1803
|
+
GroupSecurityIdentifier: smithy_client_1.expectString,
|
|
1804
|
+
TemplateArn: smithy_client_1.expectString,
|
|
1805
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1806
|
+
});
|
|
1807
|
+
};
|
|
1808
|
+
const de_Connector = (output, context) => {
|
|
1809
|
+
return (0, smithy_client_1.take)(output, {
|
|
1810
|
+
Arn: smithy_client_1.expectString,
|
|
1811
|
+
CertificateAuthorityArn: smithy_client_1.expectString,
|
|
1812
|
+
CertificateEnrollmentPolicyServerEndpoint: smithy_client_1.expectString,
|
|
1813
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1814
|
+
DirectoryId: smithy_client_1.expectString,
|
|
1815
|
+
Status: smithy_client_1.expectString,
|
|
1816
|
+
StatusReason: smithy_client_1.expectString,
|
|
1817
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1818
|
+
VpcInformation: smithy_client_1._json,
|
|
1819
|
+
});
|
|
1820
|
+
};
|
|
1821
|
+
const de_ConnectorList = (output, context) => {
|
|
1822
|
+
const retVal = (output || [])
|
|
1823
|
+
.filter((e) => e != null)
|
|
1824
|
+
.map((entry) => {
|
|
1825
|
+
return de_ConnectorSummary(entry, context);
|
|
1826
|
+
});
|
|
1827
|
+
return retVal;
|
|
1828
|
+
};
|
|
1829
|
+
const de_ConnectorSummary = (output, context) => {
|
|
1830
|
+
return (0, smithy_client_1.take)(output, {
|
|
1831
|
+
Arn: smithy_client_1.expectString,
|
|
1832
|
+
CertificateAuthorityArn: smithy_client_1.expectString,
|
|
1833
|
+
CertificateEnrollmentPolicyServerEndpoint: smithy_client_1.expectString,
|
|
1834
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1835
|
+
DirectoryId: smithy_client_1.expectString,
|
|
1836
|
+
Status: smithy_client_1.expectString,
|
|
1837
|
+
StatusReason: smithy_client_1.expectString,
|
|
1838
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1839
|
+
VpcInformation: smithy_client_1._json,
|
|
1840
|
+
});
|
|
1841
|
+
};
|
|
1842
|
+
const de_DirectoryRegistration = (output, context) => {
|
|
1843
|
+
return (0, smithy_client_1.take)(output, {
|
|
1844
|
+
Arn: smithy_client_1.expectString,
|
|
1845
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1846
|
+
DirectoryId: smithy_client_1.expectString,
|
|
1847
|
+
Status: smithy_client_1.expectString,
|
|
1848
|
+
StatusReason: smithy_client_1.expectString,
|
|
1849
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1850
|
+
});
|
|
1851
|
+
};
|
|
1852
|
+
const de_DirectoryRegistrationList = (output, context) => {
|
|
1853
|
+
const retVal = (output || [])
|
|
1854
|
+
.filter((e) => e != null)
|
|
1855
|
+
.map((entry) => {
|
|
1856
|
+
return de_DirectoryRegistrationSummary(entry, context);
|
|
1857
|
+
});
|
|
1858
|
+
return retVal;
|
|
1859
|
+
};
|
|
1860
|
+
const de_DirectoryRegistrationSummary = (output, context) => {
|
|
1861
|
+
return (0, smithy_client_1.take)(output, {
|
|
1862
|
+
Arn: smithy_client_1.expectString,
|
|
1863
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1864
|
+
DirectoryId: smithy_client_1.expectString,
|
|
1865
|
+
Status: smithy_client_1.expectString,
|
|
1866
|
+
StatusReason: smithy_client_1.expectString,
|
|
1867
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1868
|
+
});
|
|
1869
|
+
};
|
|
1870
|
+
const de_ServicePrincipalName = (output, context) => {
|
|
1871
|
+
return (0, smithy_client_1.take)(output, {
|
|
1872
|
+
ConnectorArn: smithy_client_1.expectString,
|
|
1873
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1874
|
+
DirectoryRegistrationArn: smithy_client_1.expectString,
|
|
1875
|
+
Status: smithy_client_1.expectString,
|
|
1876
|
+
StatusReason: smithy_client_1.expectString,
|
|
1877
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1878
|
+
});
|
|
1879
|
+
};
|
|
1880
|
+
const de_ServicePrincipalNameList = (output, context) => {
|
|
1881
|
+
const retVal = (output || [])
|
|
1882
|
+
.filter((e) => e != null)
|
|
1883
|
+
.map((entry) => {
|
|
1884
|
+
return de_ServicePrincipalNameSummary(entry, context);
|
|
1885
|
+
});
|
|
1886
|
+
return retVal;
|
|
1887
|
+
};
|
|
1888
|
+
const de_ServicePrincipalNameSummary = (output, context) => {
|
|
1889
|
+
return (0, smithy_client_1.take)(output, {
|
|
1890
|
+
ConnectorArn: smithy_client_1.expectString,
|
|
1891
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1892
|
+
DirectoryRegistrationArn: smithy_client_1.expectString,
|
|
1893
|
+
Status: smithy_client_1.expectString,
|
|
1894
|
+
StatusReason: smithy_client_1.expectString,
|
|
1895
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1896
|
+
});
|
|
1897
|
+
};
|
|
1898
|
+
const de_Template = (output, context) => {
|
|
1899
|
+
return (0, smithy_client_1.take)(output, {
|
|
1900
|
+
Arn: smithy_client_1.expectString,
|
|
1901
|
+
ConnectorArn: smithy_client_1.expectString,
|
|
1902
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1903
|
+
Definition: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
|
|
1904
|
+
Name: smithy_client_1.expectString,
|
|
1905
|
+
ObjectIdentifier: smithy_client_1.expectString,
|
|
1906
|
+
PolicySchema: smithy_client_1.expectInt32,
|
|
1907
|
+
Revision: smithy_client_1._json,
|
|
1908
|
+
Status: smithy_client_1.expectString,
|
|
1909
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1910
|
+
});
|
|
1911
|
+
};
|
|
1912
|
+
const de_TemplateList = (output, context) => {
|
|
1913
|
+
const retVal = (output || [])
|
|
1914
|
+
.filter((e) => e != null)
|
|
1915
|
+
.map((entry) => {
|
|
1916
|
+
return de_TemplateSummary(entry, context);
|
|
1917
|
+
});
|
|
1918
|
+
return retVal;
|
|
1919
|
+
};
|
|
1920
|
+
const de_TemplateSummary = (output, context) => {
|
|
1921
|
+
return (0, smithy_client_1.take)(output, {
|
|
1922
|
+
Arn: smithy_client_1.expectString,
|
|
1923
|
+
ConnectorArn: smithy_client_1.expectString,
|
|
1924
|
+
CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1925
|
+
Definition: (_) => (0, smithy_client_1._json)((0, smithy_client_1.expectUnion)(_)),
|
|
1926
|
+
Name: smithy_client_1.expectString,
|
|
1927
|
+
ObjectIdentifier: smithy_client_1.expectString,
|
|
1928
|
+
PolicySchema: smithy_client_1.expectInt32,
|
|
1929
|
+
Revision: smithy_client_1._json,
|
|
1930
|
+
Status: smithy_client_1.expectString,
|
|
1931
|
+
UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1932
|
+
});
|
|
1933
|
+
};
|
|
1934
|
+
const deserializeMetadata = (output) => ({
|
|
1935
|
+
httpStatusCode: output.statusCode,
|
|
1936
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1937
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1938
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1939
|
+
});
|
|
1940
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1941
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1942
|
+
value !== null &&
|
|
1943
|
+
value !== "" &&
|
|
1944
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1945
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1946
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1947
|
+
if (encoded.length) {
|
|
1948
|
+
return JSON.parse(encoded);
|
|
1949
|
+
}
|
|
1950
|
+
return {};
|
|
1951
|
+
});
|
|
1952
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1953
|
+
const value = await parseBody(errorBody, context);
|
|
1954
|
+
value.message = value.message ?? value.Message;
|
|
1955
|
+
return value;
|
|
1956
|
+
};
|
|
1957
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1958
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1959
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1960
|
+
let cleanValue = rawValue;
|
|
1961
|
+
if (typeof cleanValue === "number") {
|
|
1962
|
+
cleanValue = cleanValue.toString();
|
|
1963
|
+
}
|
|
1964
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
1965
|
+
cleanValue = cleanValue.split(",")[0];
|
|
1966
|
+
}
|
|
1967
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1968
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1969
|
+
}
|
|
1970
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1971
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1972
|
+
}
|
|
1973
|
+
return cleanValue;
|
|
1974
|
+
};
|
|
1975
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1976
|
+
if (headerKey !== undefined) {
|
|
1977
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1978
|
+
}
|
|
1979
|
+
if (data.code !== undefined) {
|
|
1980
|
+
return sanitizeErrorCode(data.code);
|
|
1981
|
+
}
|
|
1982
|
+
if (data["__type"] !== undefined) {
|
|
1983
|
+
return sanitizeErrorCode(data["__type"]);
|
|
1984
|
+
}
|
|
1985
|
+
};
|