@aws-sdk/client-aiops 3.832.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 +293 -0
- package/dist-cjs/AIOps.js +33 -0
- package/dist-cjs/AIOpsClient.js +52 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/CreateInvestigationGroupCommand.js +26 -0
- package/dist-cjs/commands/DeleteInvestigationGroupCommand.js +26 -0
- package/dist-cjs/commands/DeleteInvestigationGroupPolicyCommand.js +26 -0
- package/dist-cjs/commands/GetInvestigationGroupCommand.js +26 -0
- package/dist-cjs/commands/GetInvestigationGroupPolicyCommand.js +26 -0
- package/dist-cjs/commands/ListInvestigationGroupsCommand.js +27 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +26 -0
- package/dist-cjs/commands/PutInvestigationGroupPolicyCommand.js +26 -0
- package/dist-cjs/commands/TagResourceCommand.js +26 -0
- package/dist-cjs/commands/UntagResourceCommand.js +26 -0
- package/dist-cjs/commands/UpdateInvestigationGroupCommand.js +26 -0
- package/dist-cjs/commands/index.js +14 -0
- package/dist-cjs/endpoint/EndpointParameters.js +17 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -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/AIOpsServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +131 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListInvestigationGroupsPaginator.js +7 -0
- package/dist-cjs/pagination/index.js +5 -0
- package/dist-cjs/protocols/Aws_restJson1.js +471 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +56 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +34 -0
- package/dist-cjs/runtimeExtensions.js +13 -0
- package/dist-es/AIOps.js +29 -0
- package/dist-es/AIOpsClient.js +48 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/CreateInvestigationGroupCommand.js +22 -0
- package/dist-es/commands/DeleteInvestigationGroupCommand.js +22 -0
- package/dist-es/commands/DeleteInvestigationGroupPolicyCommand.js +22 -0
- package/dist-es/commands/GetInvestigationGroupCommand.js +22 -0
- package/dist-es/commands/GetInvestigationGroupPolicyCommand.js +22 -0
- package/dist-es/commands/ListInvestigationGroupsCommand.js +23 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +22 -0
- package/dist-es/commands/PutInvestigationGroupPolicyCommand.js +22 -0
- package/dist-es/commands/TagResourceCommand.js +22 -0
- package/dist-es/commands/UntagResourceCommand.js +22 -0
- package/dist-es/commands/UpdateInvestigationGroupCommand.js +22 -0
- package/dist-es/commands/index.js +11 -0
- package/dist-es/endpoint/EndpointParameters.js +13 -0
- package/dist-es/endpoint/endpointResolver.js +14 -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/AIOpsServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +118 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListInvestigationGroupsPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +446 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +51 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +30 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-types/AIOps.d.ts +88 -0
- package/dist-types/AIOpsClient.d.ts +198 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/CreateInvestigationGroupCommand.d.ts +114 -0
- package/dist-types/commands/DeleteInvestigationGroupCommand.d.ts +91 -0
- package/dist-types/commands/DeleteInvestigationGroupPolicyCommand.d.ts +91 -0
- package/dist-types/commands/GetInvestigationGroupCommand.d.ts +113 -0
- package/dist-types/commands/GetInvestigationGroupPolicyCommand.d.ts +94 -0
- package/dist-types/commands/ListInvestigationGroupsCommand.d.ts +100 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +95 -0
- package/dist-types/commands/PutInvestigationGroupPolicyCommand.d.ts +94 -0
- package/dist-types/commands/TagResourceCommand.d.ts +94 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +94 -0
- package/dist-types/commands/UpdateInvestigationGroupCommand.d.ts +105 -0
- package/dist-types/commands/index.d.ts +11 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +38 -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 +9 -0
- package/dist-types/index.d.ts +14 -0
- package/dist-types/models/AIOpsServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +505 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListInvestigationGroupsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +101 -0
- package/dist-types/runtimeConfig.browser.d.ts +50 -0
- package/dist-types/runtimeConfig.d.ts +50 -0
- package/dist-types/runtimeConfig.native.d.ts +49 -0
- package/dist-types/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/AIOps.d.ts +193 -0
- package/dist-types/ts3.4/AIOpsClient.d.ts +185 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/dist-types/ts3.4/commands/CreateInvestigationGroupCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeleteInvestigationGroupCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/DeleteInvestigationGroupPolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetInvestigationGroupCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetInvestigationGroupPolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListInvestigationGroupsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/PutInvestigationGroupPolicyCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/UpdateInvestigationGroupCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +11 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +48 -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 +9 -0
- package/dist-types/ts3.4/index.d.ts +9 -0
- package/dist-types/ts3.4/models/AIOpsServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +162 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
- package/dist-types/ts3.4/pagination/ListInvestigationGroupsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +137 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +92 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +89 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +96 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +99 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
+
import { AIOpsServiceException as __BaseException } from "../models/AIOpsServiceException";
|
|
5
|
+
import { AccessDeniedException, ConflictException, ForbiddenException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
+
export const se_CreateInvestigationGroupCommand = async (input, context) => {
|
|
7
|
+
const b = rb(input, context);
|
|
8
|
+
const headers = {
|
|
9
|
+
"content-type": "application/json",
|
|
10
|
+
};
|
|
11
|
+
b.bp("/investigationGroups");
|
|
12
|
+
let body;
|
|
13
|
+
body = JSON.stringify(take(input, {
|
|
14
|
+
chatbotNotificationChannel: (_) => _json(_),
|
|
15
|
+
encryptionConfiguration: (_) => _json(_),
|
|
16
|
+
isCloudTrailEventHistoryEnabled: [],
|
|
17
|
+
name: [],
|
|
18
|
+
retentionInDays: [],
|
|
19
|
+
roleArn: [],
|
|
20
|
+
tagKeyBoundaries: (_) => _json(_),
|
|
21
|
+
tags: (_) => _json(_),
|
|
22
|
+
}));
|
|
23
|
+
b.m("POST").h(headers).b(body);
|
|
24
|
+
return b.build();
|
|
25
|
+
};
|
|
26
|
+
export const se_DeleteInvestigationGroupCommand = async (input, context) => {
|
|
27
|
+
const b = rb(input, context);
|
|
28
|
+
const headers = {};
|
|
29
|
+
b.bp("/investigationGroups/{identifier}");
|
|
30
|
+
b.p("identifier", () => input.identifier, "{identifier}", false);
|
|
31
|
+
let body;
|
|
32
|
+
b.m("DELETE").h(headers).b(body);
|
|
33
|
+
return b.build();
|
|
34
|
+
};
|
|
35
|
+
export const se_DeleteInvestigationGroupPolicyCommand = async (input, context) => {
|
|
36
|
+
const b = rb(input, context);
|
|
37
|
+
const headers = {};
|
|
38
|
+
b.bp("/investigationGroups/{identifier}/policy");
|
|
39
|
+
b.p("identifier", () => input.identifier, "{identifier}", false);
|
|
40
|
+
let body;
|
|
41
|
+
b.m("DELETE").h(headers).b(body);
|
|
42
|
+
return b.build();
|
|
43
|
+
};
|
|
44
|
+
export const se_GetInvestigationGroupCommand = async (input, context) => {
|
|
45
|
+
const b = rb(input, context);
|
|
46
|
+
const headers = {};
|
|
47
|
+
b.bp("/investigationGroups/{identifier}");
|
|
48
|
+
b.p("identifier", () => input.identifier, "{identifier}", false);
|
|
49
|
+
let body;
|
|
50
|
+
b.m("GET").h(headers).b(body);
|
|
51
|
+
return b.build();
|
|
52
|
+
};
|
|
53
|
+
export const se_GetInvestigationGroupPolicyCommand = async (input, context) => {
|
|
54
|
+
const b = rb(input, context);
|
|
55
|
+
const headers = {};
|
|
56
|
+
b.bp("/investigationGroups/{identifier}/policy");
|
|
57
|
+
b.p("identifier", () => input.identifier, "{identifier}", false);
|
|
58
|
+
let body;
|
|
59
|
+
b.m("GET").h(headers).b(body);
|
|
60
|
+
return b.build();
|
|
61
|
+
};
|
|
62
|
+
export const se_ListInvestigationGroupsCommand = async (input, context) => {
|
|
63
|
+
const b = rb(input, context);
|
|
64
|
+
const headers = {};
|
|
65
|
+
b.bp("/investigationGroups");
|
|
66
|
+
const query = map({
|
|
67
|
+
[_nT]: [, input[_nT]],
|
|
68
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
69
|
+
});
|
|
70
|
+
let body;
|
|
71
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
72
|
+
return b.build();
|
|
73
|
+
};
|
|
74
|
+
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
75
|
+
const b = rb(input, context);
|
|
76
|
+
const headers = {};
|
|
77
|
+
b.bp("/tags/{resourceArn}");
|
|
78
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
79
|
+
let body;
|
|
80
|
+
b.m("GET").h(headers).b(body);
|
|
81
|
+
return b.build();
|
|
82
|
+
};
|
|
83
|
+
export const se_PutInvestigationGroupPolicyCommand = async (input, context) => {
|
|
84
|
+
const b = rb(input, context);
|
|
85
|
+
const headers = {
|
|
86
|
+
"content-type": "application/json",
|
|
87
|
+
};
|
|
88
|
+
b.bp("/investigationGroups/{identifier}/policy");
|
|
89
|
+
b.p("identifier", () => input.identifier, "{identifier}", false);
|
|
90
|
+
let body;
|
|
91
|
+
body = JSON.stringify(take(input, {
|
|
92
|
+
policy: [],
|
|
93
|
+
}));
|
|
94
|
+
b.m("POST").h(headers).b(body);
|
|
95
|
+
return b.build();
|
|
96
|
+
};
|
|
97
|
+
export const se_TagResourceCommand = async (input, context) => {
|
|
98
|
+
const b = rb(input, context);
|
|
99
|
+
const headers = {
|
|
100
|
+
"content-type": "application/json",
|
|
101
|
+
};
|
|
102
|
+
b.bp("/tags/{resourceArn}");
|
|
103
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
104
|
+
let body;
|
|
105
|
+
body = JSON.stringify(take(input, {
|
|
106
|
+
tags: (_) => _json(_),
|
|
107
|
+
}));
|
|
108
|
+
b.m("POST").h(headers).b(body);
|
|
109
|
+
return b.build();
|
|
110
|
+
};
|
|
111
|
+
export const se_UntagResourceCommand = async (input, context) => {
|
|
112
|
+
const b = rb(input, context);
|
|
113
|
+
const headers = {};
|
|
114
|
+
b.bp("/tags/{resourceArn}");
|
|
115
|
+
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
116
|
+
const query = map({
|
|
117
|
+
[_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
|
|
118
|
+
});
|
|
119
|
+
let body;
|
|
120
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
121
|
+
return b.build();
|
|
122
|
+
};
|
|
123
|
+
export const se_UpdateInvestigationGroupCommand = async (input, context) => {
|
|
124
|
+
const b = rb(input, context);
|
|
125
|
+
const headers = {
|
|
126
|
+
"content-type": "application/json",
|
|
127
|
+
};
|
|
128
|
+
b.bp("/investigationGroups/{identifier}");
|
|
129
|
+
b.p("identifier", () => input.identifier, "{identifier}", false);
|
|
130
|
+
let body;
|
|
131
|
+
body = JSON.stringify(take(input, {
|
|
132
|
+
chatbotNotificationChannel: (_) => _json(_),
|
|
133
|
+
encryptionConfiguration: (_) => _json(_),
|
|
134
|
+
isCloudTrailEventHistoryEnabled: [],
|
|
135
|
+
roleArn: [],
|
|
136
|
+
tagKeyBoundaries: (_) => _json(_),
|
|
137
|
+
}));
|
|
138
|
+
b.m("PATCH").h(headers).b(body);
|
|
139
|
+
return b.build();
|
|
140
|
+
};
|
|
141
|
+
export const de_CreateInvestigationGroupCommand = async (output, context) => {
|
|
142
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
143
|
+
return de_CommandError(output, context);
|
|
144
|
+
}
|
|
145
|
+
const contents = map({
|
|
146
|
+
$metadata: deserializeMetadata(output),
|
|
147
|
+
});
|
|
148
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
149
|
+
const doc = take(data, {
|
|
150
|
+
arn: __expectString,
|
|
151
|
+
});
|
|
152
|
+
Object.assign(contents, doc);
|
|
153
|
+
return contents;
|
|
154
|
+
};
|
|
155
|
+
export const de_DeleteInvestigationGroupCommand = async (output, context) => {
|
|
156
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
157
|
+
return de_CommandError(output, context);
|
|
158
|
+
}
|
|
159
|
+
const contents = map({
|
|
160
|
+
$metadata: deserializeMetadata(output),
|
|
161
|
+
});
|
|
162
|
+
await collectBody(output.body, context);
|
|
163
|
+
return contents;
|
|
164
|
+
};
|
|
165
|
+
export const de_DeleteInvestigationGroupPolicyCommand = async (output, context) => {
|
|
166
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
167
|
+
return de_CommandError(output, context);
|
|
168
|
+
}
|
|
169
|
+
const contents = map({
|
|
170
|
+
$metadata: deserializeMetadata(output),
|
|
171
|
+
});
|
|
172
|
+
await collectBody(output.body, context);
|
|
173
|
+
return contents;
|
|
174
|
+
};
|
|
175
|
+
export const de_GetInvestigationGroupCommand = async (output, context) => {
|
|
176
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
177
|
+
return de_CommandError(output, context);
|
|
178
|
+
}
|
|
179
|
+
const contents = map({
|
|
180
|
+
$metadata: deserializeMetadata(output),
|
|
181
|
+
});
|
|
182
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
183
|
+
const doc = take(data, {
|
|
184
|
+
arn: __expectString,
|
|
185
|
+
chatbotNotificationChannel: _json,
|
|
186
|
+
createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
187
|
+
createdBy: __expectString,
|
|
188
|
+
encryptionConfiguration: _json,
|
|
189
|
+
isCloudTrailEventHistoryEnabled: __expectBoolean,
|
|
190
|
+
lastModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
191
|
+
lastModifiedBy: __expectString,
|
|
192
|
+
name: __expectString,
|
|
193
|
+
retentionInDays: __expectLong,
|
|
194
|
+
roleArn: __expectString,
|
|
195
|
+
tagKeyBoundaries: _json,
|
|
196
|
+
});
|
|
197
|
+
Object.assign(contents, doc);
|
|
198
|
+
return contents;
|
|
199
|
+
};
|
|
200
|
+
export const de_GetInvestigationGroupPolicyCommand = async (output, context) => {
|
|
201
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
202
|
+
return de_CommandError(output, context);
|
|
203
|
+
}
|
|
204
|
+
const contents = map({
|
|
205
|
+
$metadata: deserializeMetadata(output),
|
|
206
|
+
});
|
|
207
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
208
|
+
const doc = take(data, {
|
|
209
|
+
investigationGroupArn: __expectString,
|
|
210
|
+
policy: __expectString,
|
|
211
|
+
});
|
|
212
|
+
Object.assign(contents, doc);
|
|
213
|
+
return contents;
|
|
214
|
+
};
|
|
215
|
+
export const de_ListInvestigationGroupsCommand = async (output, context) => {
|
|
216
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
217
|
+
return de_CommandError(output, context);
|
|
218
|
+
}
|
|
219
|
+
const contents = map({
|
|
220
|
+
$metadata: deserializeMetadata(output),
|
|
221
|
+
});
|
|
222
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
223
|
+
const doc = take(data, {
|
|
224
|
+
investigationGroups: _json,
|
|
225
|
+
nextToken: __expectString,
|
|
226
|
+
});
|
|
227
|
+
Object.assign(contents, doc);
|
|
228
|
+
return contents;
|
|
229
|
+
};
|
|
230
|
+
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
231
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
232
|
+
return de_CommandError(output, context);
|
|
233
|
+
}
|
|
234
|
+
const contents = map({
|
|
235
|
+
$metadata: deserializeMetadata(output),
|
|
236
|
+
});
|
|
237
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
238
|
+
const doc = take(data, {
|
|
239
|
+
tags: _json,
|
|
240
|
+
});
|
|
241
|
+
Object.assign(contents, doc);
|
|
242
|
+
return contents;
|
|
243
|
+
};
|
|
244
|
+
export const de_PutInvestigationGroupPolicyCommand = async (output, context) => {
|
|
245
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
246
|
+
return de_CommandError(output, context);
|
|
247
|
+
}
|
|
248
|
+
const contents = map({
|
|
249
|
+
$metadata: deserializeMetadata(output),
|
|
250
|
+
});
|
|
251
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
252
|
+
const doc = take(data, {
|
|
253
|
+
investigationGroupArn: __expectString,
|
|
254
|
+
});
|
|
255
|
+
Object.assign(contents, doc);
|
|
256
|
+
return contents;
|
|
257
|
+
};
|
|
258
|
+
export const de_TagResourceCommand = async (output, context) => {
|
|
259
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
260
|
+
return de_CommandError(output, context);
|
|
261
|
+
}
|
|
262
|
+
const contents = map({
|
|
263
|
+
$metadata: deserializeMetadata(output),
|
|
264
|
+
});
|
|
265
|
+
await collectBody(output.body, context);
|
|
266
|
+
return contents;
|
|
267
|
+
};
|
|
268
|
+
export const de_UntagResourceCommand = async (output, context) => {
|
|
269
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
270
|
+
return de_CommandError(output, context);
|
|
271
|
+
}
|
|
272
|
+
const contents = map({
|
|
273
|
+
$metadata: deserializeMetadata(output),
|
|
274
|
+
});
|
|
275
|
+
await collectBody(output.body, context);
|
|
276
|
+
return contents;
|
|
277
|
+
};
|
|
278
|
+
export const de_UpdateInvestigationGroupCommand = async (output, context) => {
|
|
279
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
280
|
+
return de_CommandError(output, context);
|
|
281
|
+
}
|
|
282
|
+
const contents = map({
|
|
283
|
+
$metadata: deserializeMetadata(output),
|
|
284
|
+
});
|
|
285
|
+
await collectBody(output.body, context);
|
|
286
|
+
return contents;
|
|
287
|
+
};
|
|
288
|
+
const de_CommandError = async (output, context) => {
|
|
289
|
+
const parsedOutput = {
|
|
290
|
+
...output,
|
|
291
|
+
body: await parseErrorBody(output.body, context),
|
|
292
|
+
};
|
|
293
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
294
|
+
switch (errorCode) {
|
|
295
|
+
case "AccessDeniedException":
|
|
296
|
+
case "com.amazonaws.aiops#AccessDeniedException":
|
|
297
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
298
|
+
case "ConflictException":
|
|
299
|
+
case "com.amazonaws.aiops#ConflictException":
|
|
300
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
301
|
+
case "ForbiddenException":
|
|
302
|
+
case "com.amazonaws.aiops#ForbiddenException":
|
|
303
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
304
|
+
case "InternalServerException":
|
|
305
|
+
case "com.amazonaws.aiops#InternalServerException":
|
|
306
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
307
|
+
case "ResourceNotFoundException":
|
|
308
|
+
case "com.amazonaws.aiops#ResourceNotFoundException":
|
|
309
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
310
|
+
case "ServiceQuotaExceededException":
|
|
311
|
+
case "com.amazonaws.aiops#ServiceQuotaExceededException":
|
|
312
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
313
|
+
case "ThrottlingException":
|
|
314
|
+
case "com.amazonaws.aiops#ThrottlingException":
|
|
315
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
316
|
+
case "ValidationException":
|
|
317
|
+
case "com.amazonaws.aiops#ValidationException":
|
|
318
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
319
|
+
default:
|
|
320
|
+
const parsedBody = parsedOutput.body;
|
|
321
|
+
return throwDefaultError({
|
|
322
|
+
output,
|
|
323
|
+
parsedBody,
|
|
324
|
+
errorCode,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
329
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
330
|
+
const contents = map({});
|
|
331
|
+
const data = parsedOutput.body;
|
|
332
|
+
const doc = take(data, {
|
|
333
|
+
message: __expectString,
|
|
334
|
+
});
|
|
335
|
+
Object.assign(contents, doc);
|
|
336
|
+
const exception = new AccessDeniedException({
|
|
337
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
338
|
+
...contents,
|
|
339
|
+
});
|
|
340
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
341
|
+
};
|
|
342
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
343
|
+
const contents = map({});
|
|
344
|
+
const data = parsedOutput.body;
|
|
345
|
+
const doc = take(data, {
|
|
346
|
+
message: __expectString,
|
|
347
|
+
});
|
|
348
|
+
Object.assign(contents, doc);
|
|
349
|
+
const exception = new ConflictException({
|
|
350
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
351
|
+
...contents,
|
|
352
|
+
});
|
|
353
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
354
|
+
};
|
|
355
|
+
const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
|
|
356
|
+
const contents = map({});
|
|
357
|
+
const data = parsedOutput.body;
|
|
358
|
+
const doc = take(data, {
|
|
359
|
+
message: __expectString,
|
|
360
|
+
});
|
|
361
|
+
Object.assign(contents, doc);
|
|
362
|
+
const exception = new ForbiddenException({
|
|
363
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
364
|
+
...contents,
|
|
365
|
+
});
|
|
366
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
367
|
+
};
|
|
368
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
369
|
+
const contents = map({});
|
|
370
|
+
const data = parsedOutput.body;
|
|
371
|
+
const doc = take(data, {
|
|
372
|
+
message: __expectString,
|
|
373
|
+
});
|
|
374
|
+
Object.assign(contents, doc);
|
|
375
|
+
const exception = new InternalServerException({
|
|
376
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
377
|
+
...contents,
|
|
378
|
+
});
|
|
379
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
380
|
+
};
|
|
381
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
382
|
+
const contents = map({});
|
|
383
|
+
const data = parsedOutput.body;
|
|
384
|
+
const doc = take(data, {
|
|
385
|
+
message: __expectString,
|
|
386
|
+
});
|
|
387
|
+
Object.assign(contents, doc);
|
|
388
|
+
const exception = new ResourceNotFoundException({
|
|
389
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
390
|
+
...contents,
|
|
391
|
+
});
|
|
392
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
393
|
+
};
|
|
394
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
395
|
+
const contents = map({});
|
|
396
|
+
const data = parsedOutput.body;
|
|
397
|
+
const doc = take(data, {
|
|
398
|
+
message: __expectString,
|
|
399
|
+
quotaCode: __expectString,
|
|
400
|
+
resourceId: __expectString,
|
|
401
|
+
resourceType: __expectString,
|
|
402
|
+
serviceCode: __expectString,
|
|
403
|
+
});
|
|
404
|
+
Object.assign(contents, doc);
|
|
405
|
+
const exception = new ServiceQuotaExceededException({
|
|
406
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
407
|
+
...contents,
|
|
408
|
+
});
|
|
409
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
410
|
+
};
|
|
411
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
412
|
+
const contents = map({});
|
|
413
|
+
const data = parsedOutput.body;
|
|
414
|
+
const doc = take(data, {
|
|
415
|
+
message: __expectString,
|
|
416
|
+
});
|
|
417
|
+
Object.assign(contents, doc);
|
|
418
|
+
const exception = new ThrottlingException({
|
|
419
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
420
|
+
...contents,
|
|
421
|
+
});
|
|
422
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
423
|
+
};
|
|
424
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
425
|
+
const contents = map({});
|
|
426
|
+
const data = parsedOutput.body;
|
|
427
|
+
const doc = take(data, {
|
|
428
|
+
message: __expectString,
|
|
429
|
+
});
|
|
430
|
+
Object.assign(contents, doc);
|
|
431
|
+
const exception = new ValidationException({
|
|
432
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
433
|
+
...contents,
|
|
434
|
+
});
|
|
435
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
436
|
+
};
|
|
437
|
+
const deserializeMetadata = (output) => ({
|
|
438
|
+
httpStatusCode: output.statusCode,
|
|
439
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
440
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
441
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
442
|
+
});
|
|
443
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
444
|
+
const _mR = "maxResults";
|
|
445
|
+
const _nT = "nextToken";
|
|
446
|
+
const _tK = "tagKeys";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
6
|
+
import { invalidProvider } from "@smithy/invalid-dependency";
|
|
7
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
8
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
9
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
10
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
12
|
+
export const getRuntimeConfig = (config) => {
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
return {
|
|
17
|
+
...clientSharedValues,
|
|
18
|
+
...config,
|
|
19
|
+
runtime: "browser",
|
|
20
|
+
defaultsMode,
|
|
21
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
22
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
23
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
24
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
26
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
27
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
28
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
29
|
+
sha256: config?.sha256 ?? Sha256,
|
|
30
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
31
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
32
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
|
|
3
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
+
import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
|
|
5
|
+
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
6
|
+
import { Hash } from "@smithy/hash-node";
|
|
7
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
8
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
11
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
12
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
15
|
+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
16
|
+
export const getRuntimeConfig = (config) => {
|
|
17
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
18
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
19
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
20
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
21
|
+
awsCheckVersion(process.version);
|
|
22
|
+
const loaderConfig = {
|
|
23
|
+
profile: config?.profile,
|
|
24
|
+
logger: clientSharedValues.logger,
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
...clientSharedValues,
|
|
28
|
+
...config,
|
|
29
|
+
runtime: "node",
|
|
30
|
+
defaultsMode,
|
|
31
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
32
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
33
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
34
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
35
|
+
createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
36
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
37
|
+
region: config?.region ??
|
|
38
|
+
loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
39
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
40
|
+
retryMode: config?.retryMode ??
|
|
41
|
+
loadNodeConfig({
|
|
42
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
43
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
44
|
+
}, config),
|
|
45
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
46
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
47
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
48
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
49
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
3
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
4
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
5
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
6
|
+
import { defaultAIOpsHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
7
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
8
|
+
export const getRuntimeConfig = (config) => {
|
|
9
|
+
return {
|
|
10
|
+
apiVersion: "2018-05-10",
|
|
11
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
12
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
13
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
14
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
15
|
+
extensions: config?.extensions ?? [],
|
|
16
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultAIOpsHttpAuthSchemeProvider,
|
|
17
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
18
|
+
{
|
|
19
|
+
schemeId: "aws.auth#sigv4",
|
|
20
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
21
|
+
signer: new AwsSdkSigV4Signer(),
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
25
|
+
serviceId: config?.serviceId ?? "AIOps",
|
|
26
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
27
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
28
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
7
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
9
|
+
};
|