@aws-sdk/client-cloudtrail-data 3.490.0 → 3.496.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/dist-cjs/CloudTrailData.js +1 -13
- package/dist-cjs/CloudTrailDataClient.js +1 -43
- package/dist-cjs/commands/PutAuditEventsCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -4
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +495 -10
- package/dist-cjs/models/CloudTrailDataServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -82
- package/dist-cjs/protocols/Aws_restJson1.js +1 -208
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CloudTrailData = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
const CloudTrailDataClient_1 = require("./CloudTrailDataClient");
|
|
6
|
-
const PutAuditEventsCommand_1 = require("./commands/PutAuditEventsCommand");
|
|
7
|
-
const commands = {
|
|
8
|
-
PutAuditEventsCommand: PutAuditEventsCommand_1.PutAuditEventsCommand,
|
|
9
|
-
};
|
|
10
|
-
class CloudTrailData extends CloudTrailDataClient_1.CloudTrailDataClient {
|
|
11
|
-
}
|
|
12
|
-
exports.CloudTrailData = CloudTrailData;
|
|
13
|
-
(0, smithy_client_1.createAggregatedClient)(commands, CloudTrailData);
|
|
1
|
+
module.exports = require("./index.js");
|
|
@@ -1,43 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CloudTrailDataClient = exports.__Client = void 0;
|
|
4
|
-
const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
|
|
5
|
-
const middleware_logger_1 = require("@aws-sdk/middleware-logger");
|
|
6
|
-
const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
|
|
7
|
-
const middleware_signing_1 = require("@aws-sdk/middleware-signing");
|
|
8
|
-
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
|
9
|
-
const config_resolver_1 = require("@smithy/config-resolver");
|
|
10
|
-
const middleware_content_length_1 = require("@smithy/middleware-content-length");
|
|
11
|
-
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
12
|
-
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
13
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
14
|
-
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
|
15
|
-
const EndpointParameters_1 = require("./endpoint/EndpointParameters");
|
|
16
|
-
const runtimeConfig_1 = require("./runtimeConfig");
|
|
17
|
-
const runtimeExtensions_1 = require("./runtimeExtensions");
|
|
18
|
-
class CloudTrailDataClient extends smithy_client_1.Client {
|
|
19
|
-
constructor(...[configuration]) {
|
|
20
|
-
const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
|
21
|
-
const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
|
|
22
|
-
const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
|
|
23
|
-
const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
|
|
24
|
-
const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
|
|
25
|
-
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
|
|
26
|
-
const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5);
|
|
27
|
-
const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6);
|
|
28
|
-
const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
|
|
29
|
-
super(_config_8);
|
|
30
|
-
this.config = _config_8;
|
|
31
|
-
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
|
32
|
-
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
|
33
|
-
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
|
|
34
|
-
this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
|
|
35
|
-
this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
|
|
36
|
-
this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
|
|
37
|
-
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
|
|
38
|
-
}
|
|
39
|
-
destroy() {
|
|
40
|
-
super.destroy();
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.CloudTrailDataClient = CloudTrailDataClient;
|
|
1
|
+
module.exports = require("./index.js");
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PutAuditEventsCommand = exports.$Command = void 0;
|
|
4
|
-
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
-
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
-
const EndpointParameters_1 = require("../endpoint/EndpointParameters");
|
|
9
|
-
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
10
|
-
class PutAuditEventsCommand extends smithy_client_1.Command
|
|
11
|
-
.classBuilder()
|
|
12
|
-
.ep({
|
|
13
|
-
...EndpointParameters_1.commonParams,
|
|
14
|
-
})
|
|
15
|
-
.m(function (Command, cs, config, o) {
|
|
16
|
-
return [
|
|
17
|
-
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
18
|
-
(0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
|
|
19
|
-
];
|
|
20
|
-
})
|
|
21
|
-
.s("CloudTrailDataService", "PutAuditEvents", {})
|
|
22
|
-
.n("CloudTrailDataClient", "PutAuditEventsCommand")
|
|
23
|
-
.f(void 0, void 0)
|
|
24
|
-
.ser(Aws_restJson1_1.se_PutAuditEventsCommand)
|
|
25
|
-
.de(Aws_restJson1_1.de_PutAuditEventsCommand)
|
|
26
|
-
.build() {
|
|
27
|
-
}
|
|
28
|
-
exports.PutAuditEventsCommand = PutAuditEventsCommand;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.commonParams = exports.resolveClientEndpointParameters = void 0;
|
|
4
|
-
const resolveClientEndpointParameters = (options) => {
|
|
5
|
-
return {
|
|
6
|
-
...options,
|
|
7
|
-
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
8
|
-
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
9
|
-
defaultSigningName: "cloudtrail-data",
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
|
|
13
|
-
exports.commonParams = {
|
|
14
|
-
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
15
|
-
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
16
|
-
Region: { type: "builtInParams", name: "region" },
|
|
17
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
18
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
module.exports = require("./index.js");
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,11 +1,496 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
$Command: () => import_smithy_client.Command,
|
|
25
|
+
ChannelInsufficientPermission: () => ChannelInsufficientPermission,
|
|
26
|
+
ChannelNotFound: () => ChannelNotFound,
|
|
27
|
+
ChannelUnsupportedSchema: () => ChannelUnsupportedSchema,
|
|
28
|
+
CloudTrailData: () => CloudTrailData,
|
|
29
|
+
CloudTrailDataClient: () => CloudTrailDataClient,
|
|
30
|
+
CloudTrailDataServiceException: () => CloudTrailDataServiceException,
|
|
31
|
+
DuplicatedAuditEventId: () => DuplicatedAuditEventId,
|
|
32
|
+
InvalidChannelARN: () => InvalidChannelARN,
|
|
33
|
+
PutAuditEventsCommand: () => PutAuditEventsCommand,
|
|
34
|
+
UnsupportedOperationException: () => UnsupportedOperationException,
|
|
35
|
+
__Client: () => import_smithy_client.Client,
|
|
36
|
+
__MetadataBearer: () => import_types.MetadataBearer
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(src_exports);
|
|
39
|
+
|
|
40
|
+
// src/CloudTrailDataClient.ts
|
|
41
|
+
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
42
|
+
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
43
|
+
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
44
|
+
var import_middleware_signing = require("@aws-sdk/middleware-signing");
|
|
45
|
+
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
46
|
+
var import_config_resolver = require("@smithy/config-resolver");
|
|
47
|
+
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
48
|
+
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
49
|
+
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
// src/endpoint/EndpointParameters.ts
|
|
53
|
+
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
54
|
+
return {
|
|
55
|
+
...options,
|
|
56
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
57
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
58
|
+
defaultSigningName: "cloudtrail-data"
|
|
59
|
+
};
|
|
60
|
+
}, "resolveClientEndpointParameters");
|
|
61
|
+
var commonParams = {
|
|
62
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
63
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
64
|
+
Region: { type: "builtInParams", name: "region" },
|
|
65
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// src/CloudTrailDataClient.ts
|
|
69
|
+
var import_runtimeConfig = require("././runtimeConfig");
|
|
70
|
+
|
|
71
|
+
// src/runtimeExtensions.ts
|
|
72
|
+
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
73
|
+
var import_protocol_http = require("@smithy/protocol-http");
|
|
74
|
+
var import_smithy_client = require("@smithy/smithy-client");
|
|
75
|
+
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
76
|
+
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
77
|
+
const extensionConfiguration = {
|
|
78
|
+
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
79
|
+
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
80
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
81
|
+
};
|
|
82
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
83
|
+
return {
|
|
84
|
+
...runtimeConfig,
|
|
85
|
+
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
86
|
+
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
87
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
88
|
+
};
|
|
89
|
+
}, "resolveRuntimeExtensions");
|
|
90
|
+
|
|
91
|
+
// src/CloudTrailDataClient.ts
|
|
92
|
+
var _CloudTrailDataClient = class _CloudTrailDataClient extends import_smithy_client.Client {
|
|
93
|
+
constructor(...[configuration]) {
|
|
94
|
+
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
95
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
96
|
+
const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
|
|
97
|
+
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
98
|
+
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
|
|
99
|
+
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
100
|
+
const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
|
|
101
|
+
const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
|
|
102
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
103
|
+
super(_config_8);
|
|
104
|
+
this.config = _config_8;
|
|
105
|
+
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
106
|
+
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
107
|
+
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
108
|
+
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
109
|
+
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
110
|
+
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
111
|
+
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
115
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
116
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
117
|
+
*/
|
|
118
|
+
destroy() {
|
|
119
|
+
super.destroy();
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
__name(_CloudTrailDataClient, "CloudTrailDataClient");
|
|
123
|
+
var CloudTrailDataClient = _CloudTrailDataClient;
|
|
124
|
+
|
|
125
|
+
// src/CloudTrailData.ts
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
// src/commands/PutAuditEventsCommand.ts
|
|
129
|
+
|
|
130
|
+
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
131
|
+
|
|
132
|
+
var import_types = require("@smithy/types");
|
|
133
|
+
|
|
134
|
+
// src/protocols/Aws_restJson1.ts
|
|
135
|
+
var import_core = require("@smithy/core");
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
// src/models/CloudTrailDataServiceException.ts
|
|
139
|
+
|
|
140
|
+
var _CloudTrailDataServiceException = class _CloudTrailDataServiceException extends import_smithy_client.ServiceException {
|
|
141
|
+
/**
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
constructor(options) {
|
|
145
|
+
super(options);
|
|
146
|
+
Object.setPrototypeOf(this, _CloudTrailDataServiceException.prototype);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
__name(_CloudTrailDataServiceException, "CloudTrailDataServiceException");
|
|
150
|
+
var CloudTrailDataServiceException = _CloudTrailDataServiceException;
|
|
151
|
+
|
|
152
|
+
// src/models/models_0.ts
|
|
153
|
+
var _ChannelInsufficientPermission = class _ChannelInsufficientPermission extends CloudTrailDataServiceException {
|
|
154
|
+
/**
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
constructor(opts) {
|
|
158
|
+
super({
|
|
159
|
+
name: "ChannelInsufficientPermission",
|
|
160
|
+
$fault: "client",
|
|
161
|
+
...opts
|
|
162
|
+
});
|
|
163
|
+
this.name = "ChannelInsufficientPermission";
|
|
164
|
+
this.$fault = "client";
|
|
165
|
+
Object.setPrototypeOf(this, _ChannelInsufficientPermission.prototype);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
__name(_ChannelInsufficientPermission, "ChannelInsufficientPermission");
|
|
169
|
+
var ChannelInsufficientPermission = _ChannelInsufficientPermission;
|
|
170
|
+
var _ChannelNotFound = class _ChannelNotFound extends CloudTrailDataServiceException {
|
|
171
|
+
/**
|
|
172
|
+
* @internal
|
|
173
|
+
*/
|
|
174
|
+
constructor(opts) {
|
|
175
|
+
super({
|
|
176
|
+
name: "ChannelNotFound",
|
|
177
|
+
$fault: "client",
|
|
178
|
+
...opts
|
|
179
|
+
});
|
|
180
|
+
this.name = "ChannelNotFound";
|
|
181
|
+
this.$fault = "client";
|
|
182
|
+
Object.setPrototypeOf(this, _ChannelNotFound.prototype);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
__name(_ChannelNotFound, "ChannelNotFound");
|
|
186
|
+
var ChannelNotFound = _ChannelNotFound;
|
|
187
|
+
var _ChannelUnsupportedSchema = class _ChannelUnsupportedSchema extends CloudTrailDataServiceException {
|
|
188
|
+
/**
|
|
189
|
+
* @internal
|
|
190
|
+
*/
|
|
191
|
+
constructor(opts) {
|
|
192
|
+
super({
|
|
193
|
+
name: "ChannelUnsupportedSchema",
|
|
194
|
+
$fault: "client",
|
|
195
|
+
...opts
|
|
196
|
+
});
|
|
197
|
+
this.name = "ChannelUnsupportedSchema";
|
|
198
|
+
this.$fault = "client";
|
|
199
|
+
Object.setPrototypeOf(this, _ChannelUnsupportedSchema.prototype);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
__name(_ChannelUnsupportedSchema, "ChannelUnsupportedSchema");
|
|
203
|
+
var ChannelUnsupportedSchema = _ChannelUnsupportedSchema;
|
|
204
|
+
var _DuplicatedAuditEventId = class _DuplicatedAuditEventId extends CloudTrailDataServiceException {
|
|
205
|
+
/**
|
|
206
|
+
* @internal
|
|
207
|
+
*/
|
|
208
|
+
constructor(opts) {
|
|
209
|
+
super({
|
|
210
|
+
name: "DuplicatedAuditEventId",
|
|
211
|
+
$fault: "client",
|
|
212
|
+
...opts
|
|
213
|
+
});
|
|
214
|
+
this.name = "DuplicatedAuditEventId";
|
|
215
|
+
this.$fault = "client";
|
|
216
|
+
Object.setPrototypeOf(this, _DuplicatedAuditEventId.prototype);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
__name(_DuplicatedAuditEventId, "DuplicatedAuditEventId");
|
|
220
|
+
var DuplicatedAuditEventId = _DuplicatedAuditEventId;
|
|
221
|
+
var _InvalidChannelARN = class _InvalidChannelARN extends CloudTrailDataServiceException {
|
|
222
|
+
/**
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
225
|
+
constructor(opts) {
|
|
226
|
+
super({
|
|
227
|
+
name: "InvalidChannelARN",
|
|
228
|
+
$fault: "client",
|
|
229
|
+
...opts
|
|
230
|
+
});
|
|
231
|
+
this.name = "InvalidChannelARN";
|
|
232
|
+
this.$fault = "client";
|
|
233
|
+
Object.setPrototypeOf(this, _InvalidChannelARN.prototype);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
__name(_InvalidChannelARN, "InvalidChannelARN");
|
|
237
|
+
var InvalidChannelARN = _InvalidChannelARN;
|
|
238
|
+
var _UnsupportedOperationException = class _UnsupportedOperationException extends CloudTrailDataServiceException {
|
|
239
|
+
/**
|
|
240
|
+
* @internal
|
|
241
|
+
*/
|
|
242
|
+
constructor(opts) {
|
|
243
|
+
super({
|
|
244
|
+
name: "UnsupportedOperationException",
|
|
245
|
+
$fault: "client",
|
|
246
|
+
...opts
|
|
247
|
+
});
|
|
248
|
+
this.name = "UnsupportedOperationException";
|
|
249
|
+
this.$fault = "client";
|
|
250
|
+
Object.setPrototypeOf(this, _UnsupportedOperationException.prototype);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
__name(_UnsupportedOperationException, "UnsupportedOperationException");
|
|
254
|
+
var UnsupportedOperationException = _UnsupportedOperationException;
|
|
255
|
+
|
|
256
|
+
// src/protocols/Aws_restJson1.ts
|
|
257
|
+
var se_PutAuditEventsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
258
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
259
|
+
const headers = {
|
|
260
|
+
"content-type": "application/json"
|
|
261
|
+
};
|
|
262
|
+
b.bp("/PutAuditEvents");
|
|
263
|
+
const query = (0, import_smithy_client.map)({
|
|
264
|
+
[_cA]: [, (0, import_smithy_client.expectNonNull)(input[_cA], `channelArn`)],
|
|
265
|
+
[_eI]: [, input[_eI]]
|
|
266
|
+
});
|
|
267
|
+
let body;
|
|
268
|
+
body = JSON.stringify(
|
|
269
|
+
(0, import_smithy_client.take)(input, {
|
|
270
|
+
auditEvents: (_) => (0, import_smithy_client._json)(_)
|
|
271
|
+
})
|
|
272
|
+
);
|
|
273
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
274
|
+
return b.build();
|
|
275
|
+
}, "se_PutAuditEventsCommand");
|
|
276
|
+
var de_PutAuditEventsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
277
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
278
|
+
return de_PutAuditEventsCommandError(output, context);
|
|
279
|
+
}
|
|
280
|
+
const contents = (0, import_smithy_client.map)({
|
|
281
|
+
$metadata: deserializeMetadata(output)
|
|
282
|
+
});
|
|
283
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
284
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
285
|
+
failed: import_smithy_client._json,
|
|
286
|
+
successful: import_smithy_client._json
|
|
287
|
+
});
|
|
288
|
+
Object.assign(contents, doc);
|
|
289
|
+
return contents;
|
|
290
|
+
}, "de_PutAuditEventsCommand");
|
|
291
|
+
var de_PutAuditEventsCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
292
|
+
const parsedOutput = {
|
|
293
|
+
...output,
|
|
294
|
+
body: await parseErrorBody(output.body, context)
|
|
295
|
+
};
|
|
296
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
297
|
+
switch (errorCode) {
|
|
298
|
+
case "ChannelInsufficientPermission":
|
|
299
|
+
case "com.amazonaws.cloudtraildata#ChannelInsufficientPermission":
|
|
300
|
+
throw await de_ChannelInsufficientPermissionRes(parsedOutput, context);
|
|
301
|
+
case "ChannelNotFound":
|
|
302
|
+
case "com.amazonaws.cloudtraildata#ChannelNotFound":
|
|
303
|
+
throw await de_ChannelNotFoundRes(parsedOutput, context);
|
|
304
|
+
case "ChannelUnsupportedSchema":
|
|
305
|
+
case "com.amazonaws.cloudtraildata#ChannelUnsupportedSchema":
|
|
306
|
+
throw await de_ChannelUnsupportedSchemaRes(parsedOutput, context);
|
|
307
|
+
case "DuplicatedAuditEventId":
|
|
308
|
+
case "com.amazonaws.cloudtraildata#DuplicatedAuditEventId":
|
|
309
|
+
throw await de_DuplicatedAuditEventIdRes(parsedOutput, context);
|
|
310
|
+
case "InvalidChannelARN":
|
|
311
|
+
case "com.amazonaws.cloudtraildata#InvalidChannelARN":
|
|
312
|
+
throw await de_InvalidChannelARNRes(parsedOutput, context);
|
|
313
|
+
case "UnsupportedOperationException":
|
|
314
|
+
case "com.amazonaws.cloudtraildata#UnsupportedOperationException":
|
|
315
|
+
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
316
|
+
default:
|
|
317
|
+
const parsedBody = parsedOutput.body;
|
|
318
|
+
return throwDefaultError({
|
|
319
|
+
output,
|
|
320
|
+
parsedBody,
|
|
321
|
+
errorCode
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}, "de_PutAuditEventsCommandError");
|
|
325
|
+
var throwDefaultError = (0, import_smithy_client.withBaseException)(CloudTrailDataServiceException);
|
|
326
|
+
var de_ChannelInsufficientPermissionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
327
|
+
const contents = (0, import_smithy_client.map)({});
|
|
328
|
+
const data = parsedOutput.body;
|
|
329
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
330
|
+
message: import_smithy_client.expectString
|
|
331
|
+
});
|
|
332
|
+
Object.assign(contents, doc);
|
|
333
|
+
const exception = new ChannelInsufficientPermission({
|
|
334
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
335
|
+
...contents
|
|
336
|
+
});
|
|
337
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
338
|
+
}, "de_ChannelInsufficientPermissionRes");
|
|
339
|
+
var de_ChannelNotFoundRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
340
|
+
const contents = (0, import_smithy_client.map)({});
|
|
341
|
+
const data = parsedOutput.body;
|
|
342
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
343
|
+
message: import_smithy_client.expectString
|
|
344
|
+
});
|
|
345
|
+
Object.assign(contents, doc);
|
|
346
|
+
const exception = new ChannelNotFound({
|
|
347
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
348
|
+
...contents
|
|
349
|
+
});
|
|
350
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
351
|
+
}, "de_ChannelNotFoundRes");
|
|
352
|
+
var de_ChannelUnsupportedSchemaRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
353
|
+
const contents = (0, import_smithy_client.map)({});
|
|
354
|
+
const data = parsedOutput.body;
|
|
355
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
356
|
+
message: import_smithy_client.expectString
|
|
357
|
+
});
|
|
358
|
+
Object.assign(contents, doc);
|
|
359
|
+
const exception = new ChannelUnsupportedSchema({
|
|
360
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
361
|
+
...contents
|
|
362
|
+
});
|
|
363
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
364
|
+
}, "de_ChannelUnsupportedSchemaRes");
|
|
365
|
+
var de_DuplicatedAuditEventIdRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
366
|
+
const contents = (0, import_smithy_client.map)({});
|
|
367
|
+
const data = parsedOutput.body;
|
|
368
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
369
|
+
message: import_smithy_client.expectString
|
|
370
|
+
});
|
|
371
|
+
Object.assign(contents, doc);
|
|
372
|
+
const exception = new DuplicatedAuditEventId({
|
|
373
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
374
|
+
...contents
|
|
375
|
+
});
|
|
376
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
377
|
+
}, "de_DuplicatedAuditEventIdRes");
|
|
378
|
+
var de_InvalidChannelARNRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
379
|
+
const contents = (0, import_smithy_client.map)({});
|
|
380
|
+
const data = parsedOutput.body;
|
|
381
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
382
|
+
message: import_smithy_client.expectString
|
|
383
|
+
});
|
|
384
|
+
Object.assign(contents, doc);
|
|
385
|
+
const exception = new InvalidChannelARN({
|
|
386
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
387
|
+
...contents
|
|
388
|
+
});
|
|
389
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
390
|
+
}, "de_InvalidChannelARNRes");
|
|
391
|
+
var de_UnsupportedOperationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
392
|
+
const contents = (0, import_smithy_client.map)({});
|
|
393
|
+
const data = parsedOutput.body;
|
|
394
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
395
|
+
message: import_smithy_client.expectString
|
|
396
|
+
});
|
|
397
|
+
Object.assign(contents, doc);
|
|
398
|
+
const exception = new UnsupportedOperationException({
|
|
399
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
400
|
+
...contents
|
|
401
|
+
});
|
|
402
|
+
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
403
|
+
}, "de_UnsupportedOperationExceptionRes");
|
|
404
|
+
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
405
|
+
httpStatusCode: output.statusCode,
|
|
406
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
407
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
408
|
+
cfId: output.headers["x-amz-cf-id"]
|
|
409
|
+
}), "deserializeMetadata");
|
|
410
|
+
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
411
|
+
var _cA = "channelArn";
|
|
412
|
+
var _eI = "externalId";
|
|
413
|
+
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
414
|
+
if (encoded.length) {
|
|
415
|
+
return JSON.parse(encoded);
|
|
416
|
+
}
|
|
417
|
+
return {};
|
|
418
|
+
}), "parseBody");
|
|
419
|
+
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
420
|
+
const value = await parseBody(errorBody, context);
|
|
421
|
+
value.message = value.message ?? value.Message;
|
|
422
|
+
return value;
|
|
423
|
+
}, "parseErrorBody");
|
|
424
|
+
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
425
|
+
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
426
|
+
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
427
|
+
let cleanValue = rawValue;
|
|
428
|
+
if (typeof cleanValue === "number") {
|
|
429
|
+
cleanValue = cleanValue.toString();
|
|
430
|
+
}
|
|
431
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
432
|
+
cleanValue = cleanValue.split(",")[0];
|
|
433
|
+
}
|
|
434
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
435
|
+
cleanValue = cleanValue.split(":")[0];
|
|
436
|
+
}
|
|
437
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
438
|
+
cleanValue = cleanValue.split("#")[1];
|
|
439
|
+
}
|
|
440
|
+
return cleanValue;
|
|
441
|
+
}, "sanitizeErrorCode");
|
|
442
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
443
|
+
if (headerKey !== void 0) {
|
|
444
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
445
|
+
}
|
|
446
|
+
if (data.code !== void 0) {
|
|
447
|
+
return sanitizeErrorCode(data.code);
|
|
448
|
+
}
|
|
449
|
+
if (data["__type"] !== void 0) {
|
|
450
|
+
return sanitizeErrorCode(data["__type"]);
|
|
451
|
+
}
|
|
452
|
+
}, "loadRestJsonErrorCode");
|
|
453
|
+
|
|
454
|
+
// src/commands/PutAuditEventsCommand.ts
|
|
455
|
+
var _PutAuditEventsCommand = class _PutAuditEventsCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
456
|
+
...commonParams
|
|
457
|
+
}).m(function(Command, cs, config, o) {
|
|
458
|
+
return [
|
|
459
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
460
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
461
|
+
];
|
|
462
|
+
}).s("CloudTrailDataService", "PutAuditEvents", {}).n("CloudTrailDataClient", "PutAuditEventsCommand").f(void 0, void 0).ser(se_PutAuditEventsCommand).de(de_PutAuditEventsCommand).build() {
|
|
463
|
+
};
|
|
464
|
+
__name(_PutAuditEventsCommand, "PutAuditEventsCommand");
|
|
465
|
+
var PutAuditEventsCommand = _PutAuditEventsCommand;
|
|
466
|
+
|
|
467
|
+
// src/CloudTrailData.ts
|
|
468
|
+
var commands = {
|
|
469
|
+
PutAuditEventsCommand
|
|
470
|
+
};
|
|
471
|
+
var _CloudTrailData = class _CloudTrailData extends CloudTrailDataClient {
|
|
472
|
+
};
|
|
473
|
+
__name(_CloudTrailData, "CloudTrailData");
|
|
474
|
+
var CloudTrailData = _CloudTrailData;
|
|
475
|
+
(0, import_smithy_client.createAggregatedClient)(commands, CloudTrailData);
|
|
476
|
+
|
|
477
|
+
// src/index.ts
|
|
478
|
+
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
|
479
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
480
|
+
|
|
481
|
+
0 && (module.exports = {
|
|
482
|
+
$Command,
|
|
483
|
+
ChannelInsufficientPermission,
|
|
484
|
+
ChannelNotFound,
|
|
485
|
+
ChannelUnsupportedSchema,
|
|
486
|
+
CloudTrailData,
|
|
487
|
+
CloudTrailDataClient,
|
|
488
|
+
CloudTrailDataServiceException,
|
|
489
|
+
DuplicatedAuditEventId,
|
|
490
|
+
InvalidChannelARN,
|
|
491
|
+
PutAuditEventsCommand,
|
|
492
|
+
UnsupportedOperationException,
|
|
493
|
+
__Client,
|
|
494
|
+
__MetadataBearer
|
|
495
|
+
});
|
|
496
|
+
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CloudTrailDataServiceException = exports.__ServiceException = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
-
class CloudTrailDataServiceException extends smithy_client_1.ServiceException {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
Object.setPrototypeOf(this, CloudTrailDataServiceException.prototype);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.CloudTrailDataServiceException = CloudTrailDataServiceException;
|
|
1
|
+
module.exports = require("../index.js");
|
package/dist-cjs/models/index.js
CHANGED
|
@@ -1,82 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnsupportedOperationException = exports.InvalidChannelARN = exports.DuplicatedAuditEventId = exports.ChannelUnsupportedSchema = exports.ChannelNotFound = exports.ChannelInsufficientPermission = void 0;
|
|
4
|
-
const CloudTrailDataServiceException_1 = require("./CloudTrailDataServiceException");
|
|
5
|
-
class ChannelInsufficientPermission extends CloudTrailDataServiceException_1.CloudTrailDataServiceException {
|
|
6
|
-
constructor(opts) {
|
|
7
|
-
super({
|
|
8
|
-
name: "ChannelInsufficientPermission",
|
|
9
|
-
$fault: "client",
|
|
10
|
-
...opts,
|
|
11
|
-
});
|
|
12
|
-
this.name = "ChannelInsufficientPermission";
|
|
13
|
-
this.$fault = "client";
|
|
14
|
-
Object.setPrototypeOf(this, ChannelInsufficientPermission.prototype);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.ChannelInsufficientPermission = ChannelInsufficientPermission;
|
|
18
|
-
class ChannelNotFound extends CloudTrailDataServiceException_1.CloudTrailDataServiceException {
|
|
19
|
-
constructor(opts) {
|
|
20
|
-
super({
|
|
21
|
-
name: "ChannelNotFound",
|
|
22
|
-
$fault: "client",
|
|
23
|
-
...opts,
|
|
24
|
-
});
|
|
25
|
-
this.name = "ChannelNotFound";
|
|
26
|
-
this.$fault = "client";
|
|
27
|
-
Object.setPrototypeOf(this, ChannelNotFound.prototype);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.ChannelNotFound = ChannelNotFound;
|
|
31
|
-
class ChannelUnsupportedSchema extends CloudTrailDataServiceException_1.CloudTrailDataServiceException {
|
|
32
|
-
constructor(opts) {
|
|
33
|
-
super({
|
|
34
|
-
name: "ChannelUnsupportedSchema",
|
|
35
|
-
$fault: "client",
|
|
36
|
-
...opts,
|
|
37
|
-
});
|
|
38
|
-
this.name = "ChannelUnsupportedSchema";
|
|
39
|
-
this.$fault = "client";
|
|
40
|
-
Object.setPrototypeOf(this, ChannelUnsupportedSchema.prototype);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.ChannelUnsupportedSchema = ChannelUnsupportedSchema;
|
|
44
|
-
class DuplicatedAuditEventId extends CloudTrailDataServiceException_1.CloudTrailDataServiceException {
|
|
45
|
-
constructor(opts) {
|
|
46
|
-
super({
|
|
47
|
-
name: "DuplicatedAuditEventId",
|
|
48
|
-
$fault: "client",
|
|
49
|
-
...opts,
|
|
50
|
-
});
|
|
51
|
-
this.name = "DuplicatedAuditEventId";
|
|
52
|
-
this.$fault = "client";
|
|
53
|
-
Object.setPrototypeOf(this, DuplicatedAuditEventId.prototype);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.DuplicatedAuditEventId = DuplicatedAuditEventId;
|
|
57
|
-
class InvalidChannelARN extends CloudTrailDataServiceException_1.CloudTrailDataServiceException {
|
|
58
|
-
constructor(opts) {
|
|
59
|
-
super({
|
|
60
|
-
name: "InvalidChannelARN",
|
|
61
|
-
$fault: "client",
|
|
62
|
-
...opts,
|
|
63
|
-
});
|
|
64
|
-
this.name = "InvalidChannelARN";
|
|
65
|
-
this.$fault = "client";
|
|
66
|
-
Object.setPrototypeOf(this, InvalidChannelARN.prototype);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
exports.InvalidChannelARN = InvalidChannelARN;
|
|
70
|
-
class UnsupportedOperationException extends CloudTrailDataServiceException_1.CloudTrailDataServiceException {
|
|
71
|
-
constructor(opts) {
|
|
72
|
-
super({
|
|
73
|
-
name: "UnsupportedOperationException",
|
|
74
|
-
$fault: "client",
|
|
75
|
-
...opts,
|
|
76
|
-
});
|
|
77
|
-
this.name = "UnsupportedOperationException";
|
|
78
|
-
this.$fault = "client";
|
|
79
|
-
Object.setPrototypeOf(this, UnsupportedOperationException.prototype);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.UnsupportedOperationException = UnsupportedOperationException;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,208 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_PutAuditEventsCommand = exports.se_PutAuditEventsCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const CloudTrailDataServiceException_1 = require("../models/CloudTrailDataServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_PutAuditEventsCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/PutAuditEvents");
|
|
14
|
-
const query = (0, smithy_client_1.map)({
|
|
15
|
-
[_cA]: [, (0, smithy_client_1.expectNonNull)(input[_cA], `channelArn`)],
|
|
16
|
-
[_eI]: [, input[_eI]],
|
|
17
|
-
});
|
|
18
|
-
let body;
|
|
19
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
20
|
-
auditEvents: (_) => (0, smithy_client_1._json)(_),
|
|
21
|
-
}));
|
|
22
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
23
|
-
return b.build();
|
|
24
|
-
};
|
|
25
|
-
exports.se_PutAuditEventsCommand = se_PutAuditEventsCommand;
|
|
26
|
-
const de_PutAuditEventsCommand = async (output, context) => {
|
|
27
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
28
|
-
return de_PutAuditEventsCommandError(output, context);
|
|
29
|
-
}
|
|
30
|
-
const contents = (0, smithy_client_1.map)({
|
|
31
|
-
$metadata: deserializeMetadata(output),
|
|
32
|
-
});
|
|
33
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
34
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
35
|
-
failed: smithy_client_1._json,
|
|
36
|
-
successful: smithy_client_1._json,
|
|
37
|
-
});
|
|
38
|
-
Object.assign(contents, doc);
|
|
39
|
-
return contents;
|
|
40
|
-
};
|
|
41
|
-
exports.de_PutAuditEventsCommand = de_PutAuditEventsCommand;
|
|
42
|
-
const de_PutAuditEventsCommandError = async (output, context) => {
|
|
43
|
-
const parsedOutput = {
|
|
44
|
-
...output,
|
|
45
|
-
body: await parseErrorBody(output.body, context),
|
|
46
|
-
};
|
|
47
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
48
|
-
switch (errorCode) {
|
|
49
|
-
case "ChannelInsufficientPermission":
|
|
50
|
-
case "com.amazonaws.cloudtraildata#ChannelInsufficientPermission":
|
|
51
|
-
throw await de_ChannelInsufficientPermissionRes(parsedOutput, context);
|
|
52
|
-
case "ChannelNotFound":
|
|
53
|
-
case "com.amazonaws.cloudtraildata#ChannelNotFound":
|
|
54
|
-
throw await de_ChannelNotFoundRes(parsedOutput, context);
|
|
55
|
-
case "ChannelUnsupportedSchema":
|
|
56
|
-
case "com.amazonaws.cloudtraildata#ChannelUnsupportedSchema":
|
|
57
|
-
throw await de_ChannelUnsupportedSchemaRes(parsedOutput, context);
|
|
58
|
-
case "DuplicatedAuditEventId":
|
|
59
|
-
case "com.amazonaws.cloudtraildata#DuplicatedAuditEventId":
|
|
60
|
-
throw await de_DuplicatedAuditEventIdRes(parsedOutput, context);
|
|
61
|
-
case "InvalidChannelARN":
|
|
62
|
-
case "com.amazonaws.cloudtraildata#InvalidChannelARN":
|
|
63
|
-
throw await de_InvalidChannelARNRes(parsedOutput, context);
|
|
64
|
-
case "UnsupportedOperationException":
|
|
65
|
-
case "com.amazonaws.cloudtraildata#UnsupportedOperationException":
|
|
66
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
67
|
-
default:
|
|
68
|
-
const parsedBody = parsedOutput.body;
|
|
69
|
-
return throwDefaultError({
|
|
70
|
-
output,
|
|
71
|
-
parsedBody,
|
|
72
|
-
errorCode,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(CloudTrailDataServiceException_1.CloudTrailDataServiceException);
|
|
77
|
-
const de_ChannelInsufficientPermissionRes = async (parsedOutput, context) => {
|
|
78
|
-
const contents = (0, smithy_client_1.map)({});
|
|
79
|
-
const data = parsedOutput.body;
|
|
80
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
81
|
-
message: smithy_client_1.expectString,
|
|
82
|
-
});
|
|
83
|
-
Object.assign(contents, doc);
|
|
84
|
-
const exception = new models_0_1.ChannelInsufficientPermission({
|
|
85
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
86
|
-
...contents,
|
|
87
|
-
});
|
|
88
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
89
|
-
};
|
|
90
|
-
const de_ChannelNotFoundRes = async (parsedOutput, context) => {
|
|
91
|
-
const contents = (0, smithy_client_1.map)({});
|
|
92
|
-
const data = parsedOutput.body;
|
|
93
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
94
|
-
message: smithy_client_1.expectString,
|
|
95
|
-
});
|
|
96
|
-
Object.assign(contents, doc);
|
|
97
|
-
const exception = new models_0_1.ChannelNotFound({
|
|
98
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
99
|
-
...contents,
|
|
100
|
-
});
|
|
101
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
102
|
-
};
|
|
103
|
-
const de_ChannelUnsupportedSchemaRes = async (parsedOutput, context) => {
|
|
104
|
-
const contents = (0, smithy_client_1.map)({});
|
|
105
|
-
const data = parsedOutput.body;
|
|
106
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
107
|
-
message: smithy_client_1.expectString,
|
|
108
|
-
});
|
|
109
|
-
Object.assign(contents, doc);
|
|
110
|
-
const exception = new models_0_1.ChannelUnsupportedSchema({
|
|
111
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
112
|
-
...contents,
|
|
113
|
-
});
|
|
114
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
115
|
-
};
|
|
116
|
-
const de_DuplicatedAuditEventIdRes = async (parsedOutput, context) => {
|
|
117
|
-
const contents = (0, smithy_client_1.map)({});
|
|
118
|
-
const data = parsedOutput.body;
|
|
119
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
120
|
-
message: smithy_client_1.expectString,
|
|
121
|
-
});
|
|
122
|
-
Object.assign(contents, doc);
|
|
123
|
-
const exception = new models_0_1.DuplicatedAuditEventId({
|
|
124
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
125
|
-
...contents,
|
|
126
|
-
});
|
|
127
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
128
|
-
};
|
|
129
|
-
const de_InvalidChannelARNRes = async (parsedOutput, context) => {
|
|
130
|
-
const contents = (0, smithy_client_1.map)({});
|
|
131
|
-
const data = parsedOutput.body;
|
|
132
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
133
|
-
message: smithy_client_1.expectString,
|
|
134
|
-
});
|
|
135
|
-
Object.assign(contents, doc);
|
|
136
|
-
const exception = new models_0_1.InvalidChannelARN({
|
|
137
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
138
|
-
...contents,
|
|
139
|
-
});
|
|
140
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
141
|
-
};
|
|
142
|
-
const de_UnsupportedOperationExceptionRes = async (parsedOutput, context) => {
|
|
143
|
-
const contents = (0, smithy_client_1.map)({});
|
|
144
|
-
const data = parsedOutput.body;
|
|
145
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
146
|
-
message: smithy_client_1.expectString,
|
|
147
|
-
});
|
|
148
|
-
Object.assign(contents, doc);
|
|
149
|
-
const exception = new models_0_1.UnsupportedOperationException({
|
|
150
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
151
|
-
...contents,
|
|
152
|
-
});
|
|
153
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
154
|
-
};
|
|
155
|
-
const deserializeMetadata = (output) => ({
|
|
156
|
-
httpStatusCode: output.statusCode,
|
|
157
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
158
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
159
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
160
|
-
});
|
|
161
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
162
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
163
|
-
value !== null &&
|
|
164
|
-
value !== "" &&
|
|
165
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
166
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
167
|
-
const _cA = "channelArn";
|
|
168
|
-
const _eI = "externalId";
|
|
169
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
170
|
-
if (encoded.length) {
|
|
171
|
-
return JSON.parse(encoded);
|
|
172
|
-
}
|
|
173
|
-
return {};
|
|
174
|
-
});
|
|
175
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
176
|
-
const value = await parseBody(errorBody, context);
|
|
177
|
-
value.message = value.message ?? value.Message;
|
|
178
|
-
return value;
|
|
179
|
-
};
|
|
180
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
181
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
182
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
183
|
-
let cleanValue = rawValue;
|
|
184
|
-
if (typeof cleanValue === "number") {
|
|
185
|
-
cleanValue = cleanValue.toString();
|
|
186
|
-
}
|
|
187
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
188
|
-
cleanValue = cleanValue.split(",")[0];
|
|
189
|
-
}
|
|
190
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
191
|
-
cleanValue = cleanValue.split(":")[0];
|
|
192
|
-
}
|
|
193
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
194
|
-
cleanValue = cleanValue.split("#")[1];
|
|
195
|
-
}
|
|
196
|
-
return cleanValue;
|
|
197
|
-
};
|
|
198
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
199
|
-
if (headerKey !== undefined) {
|
|
200
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
201
|
-
}
|
|
202
|
-
if (data.code !== undefined) {
|
|
203
|
-
return sanitizeErrorCode(data.code);
|
|
204
|
-
}
|
|
205
|
-
if (data["__type"] !== undefined) {
|
|
206
|
-
return sanitizeErrorCode(data["__type"]);
|
|
207
|
-
}
|
|
208
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const asPartial = (t) => t;
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = {
|
|
10
|
-
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
11
|
-
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
12
|
-
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
13
|
-
};
|
|
14
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
15
|
-
return {
|
|
16
|
-
...runtimeConfig,
|
|
17
|
-
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
18
|
-
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
19
|
-
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
1
|
+
module.exports = require("./index.js");
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cloudtrail-data",
|
|
3
3
|
"description": "AWS SDK for JavaScript Cloudtrail Data Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.496.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
|
-
"build:cjs": "
|
|
7
|
+
"build:cjs": "node ../../scripts/compilation/inline client-cloudtrail-data",
|
|
8
8
|
"build:es": "tsc -p tsconfig.es.json",
|
|
9
9
|
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
10
10
|
"build:types": "tsc -p tsconfig.types.json",
|
|
@@ -20,47 +20,47 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
27
|
-
"@aws-sdk/middleware-logger": "3.
|
|
28
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
29
|
-
"@aws-sdk/middleware-signing": "3.
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
31
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
32
|
-
"@aws-sdk/types": "3.
|
|
33
|
-
"@aws-sdk/util-endpoints": "3.
|
|
34
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
35
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
36
|
-
"@smithy/config-resolver": "^2.
|
|
37
|
-
"@smithy/core": "^1.
|
|
38
|
-
"@smithy/fetch-http-handler": "^2.
|
|
39
|
-
"@smithy/hash-node": "^2.
|
|
40
|
-
"@smithy/invalid-dependency": "^2.
|
|
41
|
-
"@smithy/middleware-content-length": "^2.
|
|
42
|
-
"@smithy/middleware-endpoint": "^2.
|
|
43
|
-
"@smithy/middleware-retry": "^2.
|
|
44
|
-
"@smithy/middleware-serde": "^2.
|
|
45
|
-
"@smithy/middleware-stack": "^2.
|
|
46
|
-
"@smithy/node-config-provider": "^2.1
|
|
47
|
-
"@smithy/node-http-handler": "^2.
|
|
48
|
-
"@smithy/protocol-http": "^3.
|
|
49
|
-
"@smithy/smithy-client": "^2.
|
|
50
|
-
"@smithy/types": "^2.
|
|
51
|
-
"@smithy/url-parser": "^2.
|
|
52
|
-
"@smithy/util-base64": "^2.
|
|
53
|
-
"@smithy/util-body-length-browser": "^2.
|
|
54
|
-
"@smithy/util-body-length-node": "^2.1
|
|
55
|
-
"@smithy/util-defaults-mode-browser": "^2.
|
|
56
|
-
"@smithy/util-defaults-mode-node": "^2.
|
|
57
|
-
"@smithy/util-endpoints": "^1.
|
|
58
|
-
"@smithy/util-retry": "^2.
|
|
59
|
-
"@smithy/util-utf8": "^2.
|
|
23
|
+
"@aws-sdk/client-sts": "3.496.0",
|
|
24
|
+
"@aws-sdk/core": "3.496.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.496.0",
|
|
26
|
+
"@aws-sdk/middleware-host-header": "3.496.0",
|
|
27
|
+
"@aws-sdk/middleware-logger": "3.496.0",
|
|
28
|
+
"@aws-sdk/middleware-recursion-detection": "3.496.0",
|
|
29
|
+
"@aws-sdk/middleware-signing": "3.496.0",
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.496.0",
|
|
31
|
+
"@aws-sdk/region-config-resolver": "3.496.0",
|
|
32
|
+
"@aws-sdk/types": "3.496.0",
|
|
33
|
+
"@aws-sdk/util-endpoints": "3.496.0",
|
|
34
|
+
"@aws-sdk/util-user-agent-browser": "3.496.0",
|
|
35
|
+
"@aws-sdk/util-user-agent-node": "3.496.0",
|
|
36
|
+
"@smithy/config-resolver": "^2.1.1",
|
|
37
|
+
"@smithy/core": "^1.3.1",
|
|
38
|
+
"@smithy/fetch-http-handler": "^2.4.1",
|
|
39
|
+
"@smithy/hash-node": "^2.1.1",
|
|
40
|
+
"@smithy/invalid-dependency": "^2.1.1",
|
|
41
|
+
"@smithy/middleware-content-length": "^2.1.1",
|
|
42
|
+
"@smithy/middleware-endpoint": "^2.4.1",
|
|
43
|
+
"@smithy/middleware-retry": "^2.1.1",
|
|
44
|
+
"@smithy/middleware-serde": "^2.1.1",
|
|
45
|
+
"@smithy/middleware-stack": "^2.1.1",
|
|
46
|
+
"@smithy/node-config-provider": "^2.2.1",
|
|
47
|
+
"@smithy/node-http-handler": "^2.3.1",
|
|
48
|
+
"@smithy/protocol-http": "^3.1.1",
|
|
49
|
+
"@smithy/smithy-client": "^2.3.1",
|
|
50
|
+
"@smithy/types": "^2.9.1",
|
|
51
|
+
"@smithy/url-parser": "^2.1.1",
|
|
52
|
+
"@smithy/util-base64": "^2.1.1",
|
|
53
|
+
"@smithy/util-body-length-browser": "^2.1.1",
|
|
54
|
+
"@smithy/util-body-length-node": "^2.2.1",
|
|
55
|
+
"@smithy/util-defaults-mode-browser": "^2.1.1",
|
|
56
|
+
"@smithy/util-defaults-mode-node": "^2.1.1",
|
|
57
|
+
"@smithy/util-endpoints": "^1.1.1",
|
|
58
|
+
"@smithy/util-retry": "^2.1.1",
|
|
59
|
+
"@smithy/util-utf8": "^2.1.1",
|
|
60
60
|
"tslib": "^2.5.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@smithy/service-client-documentation-generator": "^2.
|
|
63
|
+
"@smithy/service-client-documentation-generator": "^2.1.1",
|
|
64
64
|
"@tsconfig/node14": "1.0.3",
|
|
65
65
|
"@types/node": "^14.14.31",
|
|
66
66
|
"concurrently": "7.0.0",
|