@aws-sdk/client-freetier 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/FreeTier.js +1 -13
- package/dist-cjs/FreeTierClient.js +1 -43
- package/dist-cjs/commands/GetFreeTierUsageCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -4
- package/dist-cjs/endpoint/EndpointParameters.js +1 -16
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +456 -11
- package/dist-cjs/models/FreeTierServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -59
- package/dist-cjs/pagination/GetFreeTierUsagePaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/index.js +1 -5
- package/dist-cjs/protocols/Aws_json1_0.js +1 -202
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
package/dist-cjs/FreeTier.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FreeTier = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
const GetFreeTierUsageCommand_1 = require("./commands/GetFreeTierUsageCommand");
|
|
6
|
-
const FreeTierClient_1 = require("./FreeTierClient");
|
|
7
|
-
const commands = {
|
|
8
|
-
GetFreeTierUsageCommand: GetFreeTierUsageCommand_1.GetFreeTierUsageCommand,
|
|
9
|
-
};
|
|
10
|
-
class FreeTier extends FreeTierClient_1.FreeTierClient {
|
|
11
|
-
}
|
|
12
|
-
exports.FreeTier = FreeTier;
|
|
13
|
-
(0, smithy_client_1.createAggregatedClient)(commands, FreeTier);
|
|
1
|
+
module.exports = require("./index.js");
|
|
@@ -1,43 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FreeTierClient = 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 FreeTierClient 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.FreeTierClient = FreeTierClient;
|
|
1
|
+
module.exports = require("./index.js");
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetFreeTierUsageCommand = 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_json1_0_1 = require("../protocols/Aws_json1_0");
|
|
10
|
-
class GetFreeTierUsageCommand 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("AWSFreeTierService", "GetFreeTierUsage", {})
|
|
22
|
-
.n("FreeTierClient", "GetFreeTierUsageCommand")
|
|
23
|
-
.f(void 0, void 0)
|
|
24
|
-
.ser(Aws_json1_0_1.se_GetFreeTierUsageCommand)
|
|
25
|
-
.de(Aws_json1_0_1.de_GetFreeTierUsageCommand)
|
|
26
|
-
.build() {
|
|
27
|
-
}
|
|
28
|
-
exports.GetFreeTierUsageCommand = GetFreeTierUsageCommand;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,16 +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
|
-
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
8
|
-
defaultSigningName: "freetier",
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
|
|
12
|
-
exports.commonParams = {
|
|
13
|
-
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
-
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
-
Region: { type: "builtInParams", name: "region" },
|
|
16
|
-
};
|
|
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,12 +1,457 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
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
|
+
Dimension: () => Dimension,
|
|
26
|
+
FreeTier: () => FreeTier,
|
|
27
|
+
FreeTierClient: () => FreeTierClient,
|
|
28
|
+
FreeTierServiceException: () => FreeTierServiceException,
|
|
29
|
+
GetFreeTierUsageCommand: () => GetFreeTierUsageCommand,
|
|
30
|
+
InternalServerException: () => InternalServerException,
|
|
31
|
+
MatchOption: () => MatchOption,
|
|
32
|
+
ThrottlingException: () => ThrottlingException,
|
|
33
|
+
ValidationException: () => ValidationException,
|
|
34
|
+
__Client: () => import_smithy_client.Client,
|
|
35
|
+
__MetadataBearer: () => import_types.MetadataBearer,
|
|
36
|
+
paginateGetFreeTierUsage: () => paginateGetFreeTierUsage
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(src_exports);
|
|
39
|
+
|
|
40
|
+
// src/FreeTierClient.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
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
57
|
+
defaultSigningName: "freetier"
|
|
58
|
+
};
|
|
59
|
+
}, "resolveClientEndpointParameters");
|
|
60
|
+
var commonParams = {
|
|
61
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
62
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
63
|
+
Region: { type: "builtInParams", name: "region" }
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// src/FreeTierClient.ts
|
|
67
|
+
var import_runtimeConfig = require("././runtimeConfig");
|
|
68
|
+
|
|
69
|
+
// src/runtimeExtensions.ts
|
|
70
|
+
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
71
|
+
var import_protocol_http = require("@smithy/protocol-http");
|
|
72
|
+
var import_smithy_client = require("@smithy/smithy-client");
|
|
73
|
+
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
74
|
+
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
75
|
+
const extensionConfiguration = {
|
|
76
|
+
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
77
|
+
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
78
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
79
|
+
};
|
|
80
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
81
|
+
return {
|
|
82
|
+
...runtimeConfig,
|
|
83
|
+
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
84
|
+
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
85
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
86
|
+
};
|
|
87
|
+
}, "resolveRuntimeExtensions");
|
|
88
|
+
|
|
89
|
+
// src/FreeTierClient.ts
|
|
90
|
+
var _FreeTierClient = class _FreeTierClient extends import_smithy_client.Client {
|
|
91
|
+
constructor(...[configuration]) {
|
|
92
|
+
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
93
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
94
|
+
const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
|
|
95
|
+
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
96
|
+
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
|
|
97
|
+
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
98
|
+
const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
|
|
99
|
+
const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
|
|
100
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
101
|
+
super(_config_8);
|
|
102
|
+
this.config = _config_8;
|
|
103
|
+
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
104
|
+
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
105
|
+
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
106
|
+
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
107
|
+
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
108
|
+
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
109
|
+
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
113
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
114
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
115
|
+
*/
|
|
116
|
+
destroy() {
|
|
117
|
+
super.destroy();
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
__name(_FreeTierClient, "FreeTierClient");
|
|
121
|
+
var FreeTierClient = _FreeTierClient;
|
|
122
|
+
|
|
123
|
+
// src/FreeTier.ts
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
// src/commands/GetFreeTierUsageCommand.ts
|
|
127
|
+
|
|
128
|
+
var import_middleware_serde = require("@smithy/middleware-serde");
|
|
129
|
+
|
|
130
|
+
var import_types = require("@smithy/types");
|
|
131
|
+
|
|
132
|
+
// src/protocols/Aws_json1_0.ts
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
// src/models/FreeTierServiceException.ts
|
|
137
|
+
|
|
138
|
+
var _FreeTierServiceException = class _FreeTierServiceException extends import_smithy_client.ServiceException {
|
|
139
|
+
/**
|
|
140
|
+
* @internal
|
|
141
|
+
*/
|
|
142
|
+
constructor(options) {
|
|
143
|
+
super(options);
|
|
144
|
+
Object.setPrototypeOf(this, _FreeTierServiceException.prototype);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
__name(_FreeTierServiceException, "FreeTierServiceException");
|
|
148
|
+
var FreeTierServiceException = _FreeTierServiceException;
|
|
149
|
+
|
|
150
|
+
// src/models/models_0.ts
|
|
151
|
+
var Dimension = {
|
|
152
|
+
DESCRIPTION: "DESCRIPTION",
|
|
153
|
+
FREE_TIER_TYPE: "FREE_TIER_TYPE",
|
|
154
|
+
OPERATION: "OPERATION",
|
|
155
|
+
REGION: "REGION",
|
|
156
|
+
SERVICE: "SERVICE",
|
|
157
|
+
USAGE_PERCENTAGE: "USAGE_PERCENTAGE",
|
|
158
|
+
USAGE_TYPE: "USAGE_TYPE"
|
|
159
|
+
};
|
|
160
|
+
var MatchOption = {
|
|
161
|
+
CONTAINS: "CONTAINS",
|
|
162
|
+
ENDS_WITH: "ENDS_WITH",
|
|
163
|
+
EQUALS: "EQUALS",
|
|
164
|
+
GREATER_THAN_OR_EQUAL: "GREATER_THAN_OR_EQUAL",
|
|
165
|
+
STARTS_WITH: "STARTS_WITH"
|
|
166
|
+
};
|
|
167
|
+
var _InternalServerException = class _InternalServerException extends FreeTierServiceException {
|
|
168
|
+
/**
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
constructor(opts) {
|
|
172
|
+
super({
|
|
173
|
+
name: "InternalServerException",
|
|
174
|
+
$fault: "server",
|
|
175
|
+
...opts
|
|
176
|
+
});
|
|
177
|
+
this.name = "InternalServerException";
|
|
178
|
+
this.$fault = "server";
|
|
179
|
+
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
__name(_InternalServerException, "InternalServerException");
|
|
183
|
+
var InternalServerException = _InternalServerException;
|
|
184
|
+
var _ThrottlingException = class _ThrottlingException extends FreeTierServiceException {
|
|
185
|
+
/**
|
|
186
|
+
* @internal
|
|
187
|
+
*/
|
|
188
|
+
constructor(opts) {
|
|
189
|
+
super({
|
|
190
|
+
name: "ThrottlingException",
|
|
191
|
+
$fault: "client",
|
|
192
|
+
...opts
|
|
193
|
+
});
|
|
194
|
+
this.name = "ThrottlingException";
|
|
195
|
+
this.$fault = "client";
|
|
196
|
+
Object.setPrototypeOf(this, _ThrottlingException.prototype);
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
__name(_ThrottlingException, "ThrottlingException");
|
|
200
|
+
var ThrottlingException = _ThrottlingException;
|
|
201
|
+
var _ValidationException = class _ValidationException extends FreeTierServiceException {
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
*/
|
|
205
|
+
constructor(opts) {
|
|
206
|
+
super({
|
|
207
|
+
name: "ValidationException",
|
|
208
|
+
$fault: "client",
|
|
209
|
+
...opts
|
|
210
|
+
});
|
|
211
|
+
this.name = "ValidationException";
|
|
212
|
+
this.$fault = "client";
|
|
213
|
+
Object.setPrototypeOf(this, _ValidationException.prototype);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
__name(_ValidationException, "ValidationException");
|
|
217
|
+
var ValidationException = _ValidationException;
|
|
218
|
+
|
|
219
|
+
// src/protocols/Aws_json1_0.ts
|
|
220
|
+
var se_GetFreeTierUsageCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
221
|
+
const headers = sharedHeaders("GetFreeTierUsage");
|
|
222
|
+
let body;
|
|
223
|
+
body = JSON.stringify(se_GetFreeTierUsageRequest(input, context));
|
|
224
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
225
|
+
}, "se_GetFreeTierUsageCommand");
|
|
226
|
+
var de_GetFreeTierUsageCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
227
|
+
if (output.statusCode >= 300) {
|
|
228
|
+
return de_GetFreeTierUsageCommandError(output, context);
|
|
229
|
+
}
|
|
230
|
+
const data = await parseBody(output.body, context);
|
|
231
|
+
let contents = {};
|
|
232
|
+
contents = de_GetFreeTierUsageResponse(data, context);
|
|
233
|
+
const response = {
|
|
234
|
+
$metadata: deserializeMetadata(output),
|
|
235
|
+
...contents
|
|
236
|
+
};
|
|
237
|
+
return response;
|
|
238
|
+
}, "de_GetFreeTierUsageCommand");
|
|
239
|
+
var de_GetFreeTierUsageCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
240
|
+
const parsedOutput = {
|
|
241
|
+
...output,
|
|
242
|
+
body: await parseErrorBody(output.body, context)
|
|
243
|
+
};
|
|
244
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
245
|
+
switch (errorCode) {
|
|
246
|
+
case "InternalServerException":
|
|
247
|
+
case "com.amazonaws.freetier#InternalServerException":
|
|
248
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
249
|
+
case "ThrottlingException":
|
|
250
|
+
case "com.amazonaws.freetier#ThrottlingException":
|
|
251
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
252
|
+
case "ValidationException":
|
|
253
|
+
case "com.amazonaws.freetier#ValidationException":
|
|
254
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
255
|
+
default:
|
|
256
|
+
const parsedBody = parsedOutput.body;
|
|
257
|
+
return throwDefaultError({
|
|
258
|
+
output,
|
|
259
|
+
parsedBody,
|
|
260
|
+
errorCode
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}, "de_GetFreeTierUsageCommandError");
|
|
264
|
+
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
265
|
+
const body = parsedOutput.body;
|
|
266
|
+
const deserialized = (0, import_smithy_client._json)(body);
|
|
267
|
+
const exception = new InternalServerException({
|
|
268
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
269
|
+
...deserialized
|
|
270
|
+
});
|
|
271
|
+
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
272
|
+
}, "de_InternalServerExceptionRes");
|
|
273
|
+
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
274
|
+
const body = parsedOutput.body;
|
|
275
|
+
const deserialized = (0, import_smithy_client._json)(body);
|
|
276
|
+
const exception = new ThrottlingException({
|
|
277
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
278
|
+
...deserialized
|
|
279
|
+
});
|
|
280
|
+
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
281
|
+
}, "de_ThrottlingExceptionRes");
|
|
282
|
+
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
283
|
+
const body = parsedOutput.body;
|
|
284
|
+
const deserialized = (0, import_smithy_client._json)(body);
|
|
285
|
+
const exception = new ValidationException({
|
|
286
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
287
|
+
...deserialized
|
|
288
|
+
});
|
|
289
|
+
return (0, import_smithy_client.decorateServiceException)(exception, body);
|
|
290
|
+
}, "de_ValidationExceptionRes");
|
|
291
|
+
var se_Expression = /* @__PURE__ */ __name((input, context) => {
|
|
292
|
+
return (0, import_smithy_client.take)(input, {
|
|
293
|
+
And: (_) => se_Expressions(_, context),
|
|
294
|
+
Dimensions: import_smithy_client._json,
|
|
295
|
+
Not: (_) => se_Expression(_, context),
|
|
296
|
+
Or: (_) => se_Expressions(_, context)
|
|
297
|
+
});
|
|
298
|
+
}, "se_Expression");
|
|
299
|
+
var se_Expressions = /* @__PURE__ */ __name((input, context) => {
|
|
300
|
+
return input.filter((e) => e != null).map((entry) => {
|
|
301
|
+
return se_Expression(entry, context);
|
|
302
|
+
});
|
|
303
|
+
}, "se_Expressions");
|
|
304
|
+
var se_GetFreeTierUsageRequest = /* @__PURE__ */ __name((input, context) => {
|
|
305
|
+
return (0, import_smithy_client.take)(input, {
|
|
306
|
+
filter: (_) => se_Expression(_, context),
|
|
307
|
+
maxResults: [],
|
|
308
|
+
nextToken: []
|
|
309
|
+
});
|
|
310
|
+
}, "se_GetFreeTierUsageRequest");
|
|
311
|
+
var de_FreeTierUsage = /* @__PURE__ */ __name((output, context) => {
|
|
312
|
+
return (0, import_smithy_client.take)(output, {
|
|
313
|
+
actualUsageAmount: import_smithy_client.limitedParseDouble,
|
|
314
|
+
description: import_smithy_client.expectString,
|
|
315
|
+
forecastedUsageAmount: import_smithy_client.limitedParseDouble,
|
|
316
|
+
freeTierType: import_smithy_client.expectString,
|
|
317
|
+
limit: import_smithy_client.limitedParseDouble,
|
|
318
|
+
operation: import_smithy_client.expectString,
|
|
319
|
+
region: import_smithy_client.expectString,
|
|
320
|
+
service: import_smithy_client.expectString,
|
|
321
|
+
unit: import_smithy_client.expectString,
|
|
322
|
+
usageType: import_smithy_client.expectString
|
|
323
|
+
});
|
|
324
|
+
}, "de_FreeTierUsage");
|
|
325
|
+
var de_FreeTierUsages = /* @__PURE__ */ __name((output, context) => {
|
|
326
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
327
|
+
return de_FreeTierUsage(entry, context);
|
|
328
|
+
});
|
|
329
|
+
return retVal;
|
|
330
|
+
}, "de_FreeTierUsages");
|
|
331
|
+
var de_GetFreeTierUsageResponse = /* @__PURE__ */ __name((output, context) => {
|
|
332
|
+
return (0, import_smithy_client.take)(output, {
|
|
333
|
+
freeTierUsages: (_) => de_FreeTierUsages(_, context),
|
|
334
|
+
nextToken: import_smithy_client.expectString
|
|
335
|
+
});
|
|
336
|
+
}, "de_GetFreeTierUsageResponse");
|
|
337
|
+
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
338
|
+
httpStatusCode: output.statusCode,
|
|
339
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
340
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
341
|
+
cfId: output.headers["x-amz-cf-id"]
|
|
342
|
+
}), "deserializeMetadata");
|
|
343
|
+
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
344
|
+
var throwDefaultError = (0, import_smithy_client.withBaseException)(FreeTierServiceException);
|
|
345
|
+
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
346
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
347
|
+
const contents = {
|
|
348
|
+
protocol,
|
|
349
|
+
hostname,
|
|
350
|
+
port,
|
|
351
|
+
method: "POST",
|
|
352
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
353
|
+
headers
|
|
354
|
+
};
|
|
355
|
+
if (resolvedHostname !== void 0) {
|
|
356
|
+
contents.hostname = resolvedHostname;
|
|
357
|
+
}
|
|
358
|
+
if (body !== void 0) {
|
|
359
|
+
contents.body = body;
|
|
360
|
+
}
|
|
361
|
+
return new import_protocol_http.HttpRequest(contents);
|
|
362
|
+
}, "buildHttpRpcRequest");
|
|
363
|
+
function sharedHeaders(operation) {
|
|
364
|
+
return {
|
|
365
|
+
"content-type": "application/x-amz-json-1.0",
|
|
366
|
+
"x-amz-target": `AWSFreeTierService.${operation}`
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
__name(sharedHeaders, "sharedHeaders");
|
|
370
|
+
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
371
|
+
if (encoded.length) {
|
|
372
|
+
return JSON.parse(encoded);
|
|
373
|
+
}
|
|
374
|
+
return {};
|
|
375
|
+
}), "parseBody");
|
|
376
|
+
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
377
|
+
const value = await parseBody(errorBody, context);
|
|
378
|
+
value.message = value.message ?? value.Message;
|
|
379
|
+
return value;
|
|
380
|
+
}, "parseErrorBody");
|
|
381
|
+
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
382
|
+
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
383
|
+
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
384
|
+
let cleanValue = rawValue;
|
|
385
|
+
if (typeof cleanValue === "number") {
|
|
386
|
+
cleanValue = cleanValue.toString();
|
|
387
|
+
}
|
|
388
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
389
|
+
cleanValue = cleanValue.split(",")[0];
|
|
390
|
+
}
|
|
391
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
392
|
+
cleanValue = cleanValue.split(":")[0];
|
|
393
|
+
}
|
|
394
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
395
|
+
cleanValue = cleanValue.split("#")[1];
|
|
396
|
+
}
|
|
397
|
+
return cleanValue;
|
|
398
|
+
}, "sanitizeErrorCode");
|
|
399
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
400
|
+
if (headerKey !== void 0) {
|
|
401
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
402
|
+
}
|
|
403
|
+
if (data.code !== void 0) {
|
|
404
|
+
return sanitizeErrorCode(data.code);
|
|
405
|
+
}
|
|
406
|
+
if (data["__type"] !== void 0) {
|
|
407
|
+
return sanitizeErrorCode(data["__type"]);
|
|
408
|
+
}
|
|
409
|
+
}, "loadRestJsonErrorCode");
|
|
410
|
+
|
|
411
|
+
// src/commands/GetFreeTierUsageCommand.ts
|
|
412
|
+
var _GetFreeTierUsageCommand = class _GetFreeTierUsageCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
413
|
+
...commonParams
|
|
414
|
+
}).m(function(Command, cs, config, o) {
|
|
415
|
+
return [
|
|
416
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
417
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
418
|
+
];
|
|
419
|
+
}).s("AWSFreeTierService", "GetFreeTierUsage", {}).n("FreeTierClient", "GetFreeTierUsageCommand").f(void 0, void 0).ser(se_GetFreeTierUsageCommand).de(de_GetFreeTierUsageCommand).build() {
|
|
420
|
+
};
|
|
421
|
+
__name(_GetFreeTierUsageCommand, "GetFreeTierUsageCommand");
|
|
422
|
+
var GetFreeTierUsageCommand = _GetFreeTierUsageCommand;
|
|
423
|
+
|
|
424
|
+
// src/FreeTier.ts
|
|
425
|
+
var commands = {
|
|
426
|
+
GetFreeTierUsageCommand
|
|
427
|
+
};
|
|
428
|
+
var _FreeTier = class _FreeTier extends FreeTierClient {
|
|
429
|
+
};
|
|
430
|
+
__name(_FreeTier, "FreeTier");
|
|
431
|
+
var FreeTier = _FreeTier;
|
|
432
|
+
(0, import_smithy_client.createAggregatedClient)(commands, FreeTier);
|
|
433
|
+
|
|
434
|
+
// src/pagination/GetFreeTierUsagePaginator.ts
|
|
435
|
+
var import_core = require("@smithy/core");
|
|
436
|
+
var paginateGetFreeTierUsage = (0, import_core.createPaginator)(FreeTierClient, GetFreeTierUsageCommand, "nextToken", "nextToken", "maxResults");
|
|
437
|
+
|
|
438
|
+
// src/index.ts
|
|
439
|
+
var import_util_endpoints = require("@aws-sdk/util-endpoints");
|
|
440
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
441
|
+
|
|
442
|
+
0 && (module.exports = {
|
|
443
|
+
$Command,
|
|
444
|
+
Dimension,
|
|
445
|
+
FreeTier,
|
|
446
|
+
FreeTierClient,
|
|
447
|
+
FreeTierServiceException,
|
|
448
|
+
GetFreeTierUsageCommand,
|
|
449
|
+
InternalServerException,
|
|
450
|
+
MatchOption,
|
|
451
|
+
ThrottlingException,
|
|
452
|
+
ValidationException,
|
|
453
|
+
__Client,
|
|
454
|
+
__MetadataBearer,
|
|
455
|
+
paginateGetFreeTierUsage
|
|
456
|
+
});
|
|
457
|
+
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FreeTierServiceException = 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 FreeTierServiceException extends smithy_client_1.ServiceException {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
Object.setPrototypeOf(this, FreeTierServiceException.prototype);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.FreeTierServiceException = FreeTierServiceException;
|
|
1
|
+
module.exports = require("../index.js");
|
package/dist-cjs/models/index.js
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = exports.MatchOption = exports.Dimension = void 0;
|
|
4
|
-
const FreeTierServiceException_1 = require("./FreeTierServiceException");
|
|
5
|
-
exports.Dimension = {
|
|
6
|
-
DESCRIPTION: "DESCRIPTION",
|
|
7
|
-
FREE_TIER_TYPE: "FREE_TIER_TYPE",
|
|
8
|
-
OPERATION: "OPERATION",
|
|
9
|
-
REGION: "REGION",
|
|
10
|
-
SERVICE: "SERVICE",
|
|
11
|
-
USAGE_PERCENTAGE: "USAGE_PERCENTAGE",
|
|
12
|
-
USAGE_TYPE: "USAGE_TYPE",
|
|
13
|
-
};
|
|
14
|
-
exports.MatchOption = {
|
|
15
|
-
CONTAINS: "CONTAINS",
|
|
16
|
-
ENDS_WITH: "ENDS_WITH",
|
|
17
|
-
EQUALS: "EQUALS",
|
|
18
|
-
GREATER_THAN_OR_EQUAL: "GREATER_THAN_OR_EQUAL",
|
|
19
|
-
STARTS_WITH: "STARTS_WITH",
|
|
20
|
-
};
|
|
21
|
-
class InternalServerException extends FreeTierServiceException_1.FreeTierServiceException {
|
|
22
|
-
constructor(opts) {
|
|
23
|
-
super({
|
|
24
|
-
name: "InternalServerException",
|
|
25
|
-
$fault: "server",
|
|
26
|
-
...opts,
|
|
27
|
-
});
|
|
28
|
-
this.name = "InternalServerException";
|
|
29
|
-
this.$fault = "server";
|
|
30
|
-
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.InternalServerException = InternalServerException;
|
|
34
|
-
class ThrottlingException extends FreeTierServiceException_1.FreeTierServiceException {
|
|
35
|
-
constructor(opts) {
|
|
36
|
-
super({
|
|
37
|
-
name: "ThrottlingException",
|
|
38
|
-
$fault: "client",
|
|
39
|
-
...opts,
|
|
40
|
-
});
|
|
41
|
-
this.name = "ThrottlingException";
|
|
42
|
-
this.$fault = "client";
|
|
43
|
-
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.ThrottlingException = ThrottlingException;
|
|
47
|
-
class ValidationException extends FreeTierServiceException_1.FreeTierServiceException {
|
|
48
|
-
constructor(opts) {
|
|
49
|
-
super({
|
|
50
|
-
name: "ValidationException",
|
|
51
|
-
$fault: "client",
|
|
52
|
-
...opts,
|
|
53
|
-
});
|
|
54
|
-
this.name = "ValidationException";
|
|
55
|
-
this.$fault = "client";
|
|
56
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.ValidationException = ValidationException;
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateGetFreeTierUsage = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const GetFreeTierUsageCommand_1 = require("../commands/GetFreeTierUsageCommand");
|
|
6
|
-
const FreeTierClient_1 = require("../FreeTierClient");
|
|
7
|
-
exports.paginateGetFreeTierUsage = (0, core_1.createPaginator)(FreeTierClient_1.FreeTierClient, GetFreeTierUsageCommand_1.GetFreeTierUsageCommand, "nextToken", "nextToken", "maxResults");
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./GetFreeTierUsagePaginator"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,202 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_GetFreeTierUsageCommand = exports.se_GetFreeTierUsageCommand = void 0;
|
|
4
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const FreeTierServiceException_1 = require("../models/FreeTierServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_GetFreeTierUsageCommand = async (input, context) => {
|
|
9
|
-
const headers = sharedHeaders("GetFreeTierUsage");
|
|
10
|
-
let body;
|
|
11
|
-
body = JSON.stringify(se_GetFreeTierUsageRequest(input, context));
|
|
12
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
-
};
|
|
14
|
-
exports.se_GetFreeTierUsageCommand = se_GetFreeTierUsageCommand;
|
|
15
|
-
const de_GetFreeTierUsageCommand = async (output, context) => {
|
|
16
|
-
if (output.statusCode >= 300) {
|
|
17
|
-
return de_GetFreeTierUsageCommandError(output, context);
|
|
18
|
-
}
|
|
19
|
-
const data = await parseBody(output.body, context);
|
|
20
|
-
let contents = {};
|
|
21
|
-
contents = de_GetFreeTierUsageResponse(data, context);
|
|
22
|
-
const response = {
|
|
23
|
-
$metadata: deserializeMetadata(output),
|
|
24
|
-
...contents,
|
|
25
|
-
};
|
|
26
|
-
return response;
|
|
27
|
-
};
|
|
28
|
-
exports.de_GetFreeTierUsageCommand = de_GetFreeTierUsageCommand;
|
|
29
|
-
const de_GetFreeTierUsageCommandError = async (output, context) => {
|
|
30
|
-
const parsedOutput = {
|
|
31
|
-
...output,
|
|
32
|
-
body: await parseErrorBody(output.body, context),
|
|
33
|
-
};
|
|
34
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
35
|
-
switch (errorCode) {
|
|
36
|
-
case "InternalServerException":
|
|
37
|
-
case "com.amazonaws.freetier#InternalServerException":
|
|
38
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
39
|
-
case "ThrottlingException":
|
|
40
|
-
case "com.amazonaws.freetier#ThrottlingException":
|
|
41
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
42
|
-
case "ValidationException":
|
|
43
|
-
case "com.amazonaws.freetier#ValidationException":
|
|
44
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
45
|
-
default:
|
|
46
|
-
const parsedBody = parsedOutput.body;
|
|
47
|
-
return throwDefaultError({
|
|
48
|
-
output,
|
|
49
|
-
parsedBody,
|
|
50
|
-
errorCode,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
55
|
-
const body = parsedOutput.body;
|
|
56
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
57
|
-
const exception = new models_0_1.InternalServerException({
|
|
58
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
59
|
-
...deserialized,
|
|
60
|
-
});
|
|
61
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
62
|
-
};
|
|
63
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
64
|
-
const body = parsedOutput.body;
|
|
65
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
66
|
-
const exception = new models_0_1.ThrottlingException({
|
|
67
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
68
|
-
...deserialized,
|
|
69
|
-
});
|
|
70
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
71
|
-
};
|
|
72
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
73
|
-
const body = parsedOutput.body;
|
|
74
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
75
|
-
const exception = new models_0_1.ValidationException({
|
|
76
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
77
|
-
...deserialized,
|
|
78
|
-
});
|
|
79
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
80
|
-
};
|
|
81
|
-
const se_Expression = (input, context) => {
|
|
82
|
-
return (0, smithy_client_1.take)(input, {
|
|
83
|
-
And: (_) => se_Expressions(_, context),
|
|
84
|
-
Dimensions: smithy_client_1._json,
|
|
85
|
-
Not: (_) => se_Expression(_, context),
|
|
86
|
-
Or: (_) => se_Expressions(_, context),
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
const se_Expressions = (input, context) => {
|
|
90
|
-
return input
|
|
91
|
-
.filter((e) => e != null)
|
|
92
|
-
.map((entry) => {
|
|
93
|
-
return se_Expression(entry, context);
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
const se_GetFreeTierUsageRequest = (input, context) => {
|
|
97
|
-
return (0, smithy_client_1.take)(input, {
|
|
98
|
-
filter: (_) => se_Expression(_, context),
|
|
99
|
-
maxResults: [],
|
|
100
|
-
nextToken: [],
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
const de_FreeTierUsage = (output, context) => {
|
|
104
|
-
return (0, smithy_client_1.take)(output, {
|
|
105
|
-
actualUsageAmount: smithy_client_1.limitedParseDouble,
|
|
106
|
-
description: smithy_client_1.expectString,
|
|
107
|
-
forecastedUsageAmount: smithy_client_1.limitedParseDouble,
|
|
108
|
-
freeTierType: smithy_client_1.expectString,
|
|
109
|
-
limit: smithy_client_1.limitedParseDouble,
|
|
110
|
-
operation: smithy_client_1.expectString,
|
|
111
|
-
region: smithy_client_1.expectString,
|
|
112
|
-
service: smithy_client_1.expectString,
|
|
113
|
-
unit: smithy_client_1.expectString,
|
|
114
|
-
usageType: smithy_client_1.expectString,
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
const de_FreeTierUsages = (output, context) => {
|
|
118
|
-
const retVal = (output || [])
|
|
119
|
-
.filter((e) => e != null)
|
|
120
|
-
.map((entry) => {
|
|
121
|
-
return de_FreeTierUsage(entry, context);
|
|
122
|
-
});
|
|
123
|
-
return retVal;
|
|
124
|
-
};
|
|
125
|
-
const de_GetFreeTierUsageResponse = (output, context) => {
|
|
126
|
-
return (0, smithy_client_1.take)(output, {
|
|
127
|
-
freeTierUsages: (_) => de_FreeTierUsages(_, context),
|
|
128
|
-
nextToken: smithy_client_1.expectString,
|
|
129
|
-
});
|
|
130
|
-
};
|
|
131
|
-
const deserializeMetadata = (output) => ({
|
|
132
|
-
httpStatusCode: output.statusCode,
|
|
133
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
134
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
135
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
136
|
-
});
|
|
137
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
138
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(FreeTierServiceException_1.FreeTierServiceException);
|
|
139
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
140
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
141
|
-
const contents = {
|
|
142
|
-
protocol,
|
|
143
|
-
hostname,
|
|
144
|
-
port,
|
|
145
|
-
method: "POST",
|
|
146
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
147
|
-
headers,
|
|
148
|
-
};
|
|
149
|
-
if (resolvedHostname !== undefined) {
|
|
150
|
-
contents.hostname = resolvedHostname;
|
|
151
|
-
}
|
|
152
|
-
if (body !== undefined) {
|
|
153
|
-
contents.body = body;
|
|
154
|
-
}
|
|
155
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
156
|
-
};
|
|
157
|
-
function sharedHeaders(operation) {
|
|
158
|
-
return {
|
|
159
|
-
"content-type": "application/x-amz-json-1.0",
|
|
160
|
-
"x-amz-target": `AWSFreeTierService.${operation}`,
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
164
|
-
if (encoded.length) {
|
|
165
|
-
return JSON.parse(encoded);
|
|
166
|
-
}
|
|
167
|
-
return {};
|
|
168
|
-
});
|
|
169
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
170
|
-
const value = await parseBody(errorBody, context);
|
|
171
|
-
value.message = value.message ?? value.Message;
|
|
172
|
-
return value;
|
|
173
|
-
};
|
|
174
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
175
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
176
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
177
|
-
let cleanValue = rawValue;
|
|
178
|
-
if (typeof cleanValue === "number") {
|
|
179
|
-
cleanValue = cleanValue.toString();
|
|
180
|
-
}
|
|
181
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
182
|
-
cleanValue = cleanValue.split(",")[0];
|
|
183
|
-
}
|
|
184
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
185
|
-
cleanValue = cleanValue.split(":")[0];
|
|
186
|
-
}
|
|
187
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
188
|
-
cleanValue = cleanValue.split("#")[1];
|
|
189
|
-
}
|
|
190
|
-
return cleanValue;
|
|
191
|
-
};
|
|
192
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
193
|
-
if (headerKey !== undefined) {
|
|
194
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
195
|
-
}
|
|
196
|
-
if (data.code !== undefined) {
|
|
197
|
-
return sanitizeErrorCode(data.code);
|
|
198
|
-
}
|
|
199
|
-
if (data["__type"] !== undefined) {
|
|
200
|
-
return sanitizeErrorCode(data["__type"]);
|
|
201
|
-
}
|
|
202
|
-
};
|
|
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-freetier",
|
|
3
3
|
"description": "AWS SDK for JavaScript Freetier 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-freetier",
|
|
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",
|