@aws-sdk/client-cost-explorer 3.99.0 → 3.106.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/CostExplorer.js +30 -0
- package/dist-cjs/CostExplorerClient.js +2 -0
- package/dist-cjs/commands/ListCostAllocationTagsCommand.js +36 -0
- package/dist-cjs/commands/UpdateCostAllocationTagsStatusCommand.js +36 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +54 -2
- package/dist-cjs/pagination/ListCostAllocationTagsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +1 -0
- package/dist-cjs/protocols/Aws_json1_1.js +192 -2
- package/dist-es/CostExplorer.js +30 -0
- package/dist-es/CostExplorerClient.js +2 -0
- package/dist-es/commands/ListCostAllocationTagsCommand.js +39 -0
- package/dist-es/commands/UpdateCostAllocationTagsStatusCommand.js +39 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +38 -0
- package/dist-es/pagination/ListCostAllocationTagsPaginator.js +75 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +210 -0
- package/dist-types/CostExplorer.d.ts +63 -29
- package/dist-types/CostExplorerClient.d.ts +4 -2
- package/dist-types/commands/DescribeCostCategoryDefinitionCommand.d.ts +6 -2
- package/dist-types/commands/GetCostAndUsageWithResourcesCommand.d.ts +3 -1
- package/dist-types/commands/GetReservationCoverageCommand.d.ts +6 -3
- package/dist-types/commands/GetReservationPurchaseRecommendationCommand.d.ts +16 -10
- package/dist-types/commands/GetRightsizingRecommendationCommand.d.ts +2 -6
- package/dist-types/commands/GetSavingsPlansUtilizationCommand.d.ts +1 -1
- package/dist-types/commands/ListCostAllocationTagsCommand.d.ts +36 -0
- package/dist-types/commands/ListCostCategoryDefinitionsCommand.d.ts +7 -1
- package/dist-types/commands/TagResourceCommand.d.ts +2 -2
- package/dist-types/commands/UntagResourceCommand.d.ts +2 -3
- package/dist-types/commands/UpdateCostAllocationTagsStatusCommand.d.ts +38 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +410 -248
- package/dist-types/pagination/ListCostAllocationTagsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +6 -0
- package/dist-types/ts3.4/CostExplorer.d.ts +10 -0
- package/dist-types/ts3.4/CostExplorerClient.d.ts +4 -2
- package/dist-types/ts3.4/commands/ListCostAllocationTagsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateCostAllocationTagsStatusCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +94 -21
- package/dist-types/ts3.4/pagination/ListCostAllocationTagsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +6 -0
- package/package.json +4 -3
- package/CHANGELOG.md +0 -3755
|
@@ -3,6 +3,7 @@ import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-re
|
|
|
3
3
|
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
4
4
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
5
5
|
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
6
|
+
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
|
|
6
7
|
import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
|
|
7
8
|
import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
|
|
8
9
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
@@ -25,6 +26,7 @@ var CostExplorerClient = (function (_super) {
|
|
|
25
26
|
_this.middlewareStack.use(getContentLengthPlugin(_this.config));
|
|
26
27
|
_this.middlewareStack.use(getHostHeaderPlugin(_this.config));
|
|
27
28
|
_this.middlewareStack.use(getLoggerPlugin(_this.config));
|
|
29
|
+
_this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
|
|
28
30
|
_this.middlewareStack.use(getAwsAuthPlugin(_this.config));
|
|
29
31
|
_this.middlewareStack.use(getUserAgentPlugin(_this.config));
|
|
30
32
|
return _this;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { ListCostAllocationTagsRequest, ListCostAllocationTagsResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1ListCostAllocationTagsCommand, serializeAws_json1_1ListCostAllocationTagsCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
var ListCostAllocationTagsCommand = (function (_super) {
|
|
7
|
+
__extends(ListCostAllocationTagsCommand, _super);
|
|
8
|
+
function ListCostAllocationTagsCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
ListCostAllocationTagsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "CostExplorerClient";
|
|
18
|
+
var commandName = "ListCostAllocationTagsCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: ListCostAllocationTagsRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: ListCostAllocationTagsResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
ListCostAllocationTagsCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_json1_1ListCostAllocationTagsCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
ListCostAllocationTagsCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_json1_1ListCostAllocationTagsCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return ListCostAllocationTagsCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { ListCostAllocationTagsCommand };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { UpdateCostAllocationTagsStatusRequest, UpdateCostAllocationTagsStatusResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1UpdateCostAllocationTagsStatusCommand, serializeAws_json1_1UpdateCostAllocationTagsStatusCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
var UpdateCostAllocationTagsStatusCommand = (function (_super) {
|
|
7
|
+
__extends(UpdateCostAllocationTagsStatusCommand, _super);
|
|
8
|
+
function UpdateCostAllocationTagsStatusCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
UpdateCostAllocationTagsStatusCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "CostExplorerClient";
|
|
18
|
+
var commandName = "UpdateCostAllocationTagsStatusCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: UpdateCostAllocationTagsStatusRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: UpdateCostAllocationTagsStatusResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
UpdateCostAllocationTagsStatusCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_json1_1UpdateCostAllocationTagsStatusCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
UpdateCostAllocationTagsStatusCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_json1_1UpdateCostAllocationTagsStatusCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return UpdateCostAllocationTagsStatusCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { UpdateCostAllocationTagsStatusCommand };
|
|
@@ -23,6 +23,7 @@ export * from "./GetSavingsPlansUtilizationCommand";
|
|
|
23
23
|
export * from "./GetSavingsPlansUtilizationDetailsCommand";
|
|
24
24
|
export * from "./GetTagsCommand";
|
|
25
25
|
export * from "./GetUsageForecastCommand";
|
|
26
|
+
export * from "./ListCostAllocationTagsCommand";
|
|
26
27
|
export * from "./ListCostCategoryDefinitionsCommand";
|
|
27
28
|
export * from "./ListTagsForResourceCommand";
|
|
28
29
|
export * from "./ProvideAnomalyFeedbackCommand";
|
|
@@ -30,4 +31,5 @@ export * from "./TagResourceCommand";
|
|
|
30
31
|
export * from "./UntagResourceCommand";
|
|
31
32
|
export * from "./UpdateAnomalyMonitorCommand";
|
|
32
33
|
export * from "./UpdateAnomalySubscriptionCommand";
|
|
34
|
+
export * from "./UpdateCostAllocationTagsStatusCommand";
|
|
33
35
|
export * from "./UpdateCostCategoryDefinitionCommand";
|
|
@@ -778,6 +778,28 @@ var UnresolvableUsageUnitException = (function (_super) {
|
|
|
778
778
|
return UnresolvableUsageUnitException;
|
|
779
779
|
}(__BaseException));
|
|
780
780
|
export { UnresolvableUsageUnitException };
|
|
781
|
+
export var CostAllocationTagStatus;
|
|
782
|
+
(function (CostAllocationTagStatus) {
|
|
783
|
+
CostAllocationTagStatus["ACTIVE"] = "Active";
|
|
784
|
+
CostAllocationTagStatus["INACTIVE"] = "Inactive";
|
|
785
|
+
})(CostAllocationTagStatus || (CostAllocationTagStatus = {}));
|
|
786
|
+
export var CostAllocationTagType;
|
|
787
|
+
(function (CostAllocationTagType) {
|
|
788
|
+
CostAllocationTagType["AWS_GENERATED"] = "AWSGenerated";
|
|
789
|
+
CostAllocationTagType["USER_DEFINED"] = "UserDefined";
|
|
790
|
+
})(CostAllocationTagType || (CostAllocationTagType = {}));
|
|
791
|
+
export var ListCostAllocationTagsRequest;
|
|
792
|
+
(function (ListCostAllocationTagsRequest) {
|
|
793
|
+
ListCostAllocationTagsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
794
|
+
})(ListCostAllocationTagsRequest || (ListCostAllocationTagsRequest = {}));
|
|
795
|
+
export var CostAllocationTag;
|
|
796
|
+
(function (CostAllocationTag) {
|
|
797
|
+
CostAllocationTag.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
798
|
+
})(CostAllocationTag || (CostAllocationTag = {}));
|
|
799
|
+
export var ListCostAllocationTagsResponse;
|
|
800
|
+
(function (ListCostAllocationTagsResponse) {
|
|
801
|
+
ListCostAllocationTagsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
802
|
+
})(ListCostAllocationTagsResponse || (ListCostAllocationTagsResponse = {}));
|
|
781
803
|
export var ListCostCategoryDefinitionsRequest;
|
|
782
804
|
(function (ListCostCategoryDefinitionsRequest) {
|
|
783
805
|
ListCostCategoryDefinitionsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -852,6 +874,22 @@ export var UpdateAnomalySubscriptionResponse;
|
|
|
852
874
|
(function (UpdateAnomalySubscriptionResponse) {
|
|
853
875
|
UpdateAnomalySubscriptionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
854
876
|
})(UpdateAnomalySubscriptionResponse || (UpdateAnomalySubscriptionResponse = {}));
|
|
877
|
+
export var CostAllocationTagStatusEntry;
|
|
878
|
+
(function (CostAllocationTagStatusEntry) {
|
|
879
|
+
CostAllocationTagStatusEntry.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
880
|
+
})(CostAllocationTagStatusEntry || (CostAllocationTagStatusEntry = {}));
|
|
881
|
+
export var UpdateCostAllocationTagsStatusRequest;
|
|
882
|
+
(function (UpdateCostAllocationTagsStatusRequest) {
|
|
883
|
+
UpdateCostAllocationTagsStatusRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
884
|
+
})(UpdateCostAllocationTagsStatusRequest || (UpdateCostAllocationTagsStatusRequest = {}));
|
|
885
|
+
export var UpdateCostAllocationTagsStatusError;
|
|
886
|
+
(function (UpdateCostAllocationTagsStatusError) {
|
|
887
|
+
UpdateCostAllocationTagsStatusError.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
888
|
+
})(UpdateCostAllocationTagsStatusError || (UpdateCostAllocationTagsStatusError = {}));
|
|
889
|
+
export var UpdateCostAllocationTagsStatusResponse;
|
|
890
|
+
(function (UpdateCostAllocationTagsStatusResponse) {
|
|
891
|
+
UpdateCostAllocationTagsStatusResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
892
|
+
})(UpdateCostAllocationTagsStatusResponse || (UpdateCostAllocationTagsStatusResponse = {}));
|
|
855
893
|
export var UpdateCostCategoryDefinitionResponse;
|
|
856
894
|
(function (UpdateCostCategoryDefinitionResponse) {
|
|
857
895
|
UpdateCostCategoryDefinitionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
|
+
import { ListCostAllocationTagsCommand, } from "../commands/ListCostAllocationTagsCommand";
|
|
3
|
+
import { CostExplorer } from "../CostExplorer";
|
|
4
|
+
import { CostExplorerClient } from "../CostExplorerClient";
|
|
5
|
+
var makePagedClientRequest = function (client, input) {
|
|
6
|
+
var args = [];
|
|
7
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
+
args[_i - 2] = arguments[_i];
|
|
9
|
+
}
|
|
10
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
+
return __generator(this, function (_a) {
|
|
12
|
+
switch (_a.label) {
|
|
13
|
+
case 0: return [4, client.send.apply(client, __spreadArray([new ListCostAllocationTagsCommand(input)], __read(args), false))];
|
|
14
|
+
case 1: return [2, _a.sent()];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
var makePagedRequest = function (client, input) {
|
|
20
|
+
var args = [];
|
|
21
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
+
args[_i - 2] = arguments[_i];
|
|
23
|
+
}
|
|
24
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
+
return __generator(this, function (_a) {
|
|
26
|
+
switch (_a.label) {
|
|
27
|
+
case 0: return [4, client.listCostAllocationTags.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
+
case 1: return [2, _a.sent()];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export function paginateListCostAllocationTags(config, input) {
|
|
34
|
+
var additionalArguments = [];
|
|
35
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
36
|
+
additionalArguments[_i - 2] = arguments[_i];
|
|
37
|
+
}
|
|
38
|
+
return __asyncGenerator(this, arguments, function paginateListCostAllocationTags_1() {
|
|
39
|
+
var token, hasNext, page, prevToken;
|
|
40
|
+
return __generator(this, function (_a) {
|
|
41
|
+
switch (_a.label) {
|
|
42
|
+
case 0:
|
|
43
|
+
token = config.startingToken || undefined;
|
|
44
|
+
hasNext = true;
|
|
45
|
+
_a.label = 1;
|
|
46
|
+
case 1:
|
|
47
|
+
if (!hasNext) return [3, 9];
|
|
48
|
+
input.NextToken = token;
|
|
49
|
+
input["MaxResults"] = config.pageSize;
|
|
50
|
+
if (!(config.client instanceof CostExplorer)) return [3, 3];
|
|
51
|
+
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
52
|
+
case 2:
|
|
53
|
+
page = _a.sent();
|
|
54
|
+
return [3, 6];
|
|
55
|
+
case 3:
|
|
56
|
+
if (!(config.client instanceof CostExplorerClient)) return [3, 5];
|
|
57
|
+
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
58
|
+
case 4:
|
|
59
|
+
page = _a.sent();
|
|
60
|
+
return [3, 6];
|
|
61
|
+
case 5: throw new Error("Invalid client, expected CostExplorer | CostExplorerClient");
|
|
62
|
+
case 6: return [4, __await(page)];
|
|
63
|
+
case 7: return [4, _a.sent()];
|
|
64
|
+
case 8:
|
|
65
|
+
_a.sent();
|
|
66
|
+
prevToken = token;
|
|
67
|
+
token = page.NextToken;
|
|
68
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
69
|
+
return [3, 1];
|
|
70
|
+
case 9: return [4, __await(undefined)];
|
|
71
|
+
case 10: return [2, _a.sent()];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
@@ -278,6 +278,17 @@ export var serializeAws_json1_1GetUsageForecastCommand = function (input, contex
|
|
|
278
278
|
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
279
279
|
});
|
|
280
280
|
}); };
|
|
281
|
+
export var serializeAws_json1_1ListCostAllocationTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
282
|
+
var headers, body;
|
|
283
|
+
return __generator(this, function (_a) {
|
|
284
|
+
headers = {
|
|
285
|
+
"content-type": "application/x-amz-json-1.1",
|
|
286
|
+
"x-amz-target": "AWSInsightsIndexService.ListCostAllocationTags",
|
|
287
|
+
};
|
|
288
|
+
body = JSON.stringify(serializeAws_json1_1ListCostAllocationTagsRequest(input, context));
|
|
289
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
290
|
+
});
|
|
291
|
+
}); };
|
|
281
292
|
export var serializeAws_json1_1ListCostCategoryDefinitionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
282
293
|
var headers, body;
|
|
283
294
|
return __generator(this, function (_a) {
|
|
@@ -355,6 +366,17 @@ export var serializeAws_json1_1UpdateAnomalySubscriptionCommand = function (inpu
|
|
|
355
366
|
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
356
367
|
});
|
|
357
368
|
}); };
|
|
369
|
+
export var serializeAws_json1_1UpdateCostAllocationTagsStatusCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
370
|
+
var headers, body;
|
|
371
|
+
return __generator(this, function (_a) {
|
|
372
|
+
headers = {
|
|
373
|
+
"content-type": "application/x-amz-json-1.1",
|
|
374
|
+
"x-amz-target": "AWSInsightsIndexService.UpdateCostAllocationTagsStatus",
|
|
375
|
+
};
|
|
376
|
+
body = JSON.stringify(serializeAws_json1_1UpdateCostAllocationTagsStatusRequest(input, context));
|
|
377
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
378
|
+
});
|
|
379
|
+
}); };
|
|
358
380
|
export var serializeAws_json1_1UpdateCostCategoryDefinitionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
359
381
|
var headers, body;
|
|
360
382
|
return __generator(this, function (_a) {
|
|
@@ -1804,6 +1826,60 @@ var deserializeAws_json1_1GetUsageForecastCommandError = function (output, conte
|
|
|
1804
1826
|
}
|
|
1805
1827
|
});
|
|
1806
1828
|
}); };
|
|
1829
|
+
export var deserializeAws_json1_1ListCostAllocationTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1830
|
+
var data, contents, response;
|
|
1831
|
+
return __generator(this, function (_a) {
|
|
1832
|
+
switch (_a.label) {
|
|
1833
|
+
case 0:
|
|
1834
|
+
if (output.statusCode >= 300) {
|
|
1835
|
+
return [2, deserializeAws_json1_1ListCostAllocationTagsCommandError(output, context)];
|
|
1836
|
+
}
|
|
1837
|
+
return [4, parseBody(output.body, context)];
|
|
1838
|
+
case 1:
|
|
1839
|
+
data = _a.sent();
|
|
1840
|
+
contents = {};
|
|
1841
|
+
contents = deserializeAws_json1_1ListCostAllocationTagsResponse(data, context);
|
|
1842
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1843
|
+
return [2, Promise.resolve(response)];
|
|
1844
|
+
}
|
|
1845
|
+
});
|
|
1846
|
+
}); };
|
|
1847
|
+
var deserializeAws_json1_1ListCostAllocationTagsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1848
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
1849
|
+
var _c;
|
|
1850
|
+
return __generator(this, function (_d) {
|
|
1851
|
+
switch (_d.label) {
|
|
1852
|
+
case 0:
|
|
1853
|
+
_a = [__assign({}, output)];
|
|
1854
|
+
_c = {};
|
|
1855
|
+
return [4, parseBody(output.body, context)];
|
|
1856
|
+
case 1:
|
|
1857
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1858
|
+
errorCode = "UnknownError";
|
|
1859
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1860
|
+
_b = errorCode;
|
|
1861
|
+
switch (_b) {
|
|
1862
|
+
case "InvalidNextTokenException": return [3, 2];
|
|
1863
|
+
case "com.amazonaws.costexplorer#InvalidNextTokenException": return [3, 2];
|
|
1864
|
+
case "LimitExceededException": return [3, 4];
|
|
1865
|
+
case "com.amazonaws.costexplorer#LimitExceededException": return [3, 4];
|
|
1866
|
+
}
|
|
1867
|
+
return [3, 6];
|
|
1868
|
+
case 2: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
1869
|
+
case 3: throw _d.sent();
|
|
1870
|
+
case 4: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
1871
|
+
case 5: throw _d.sent();
|
|
1872
|
+
case 6:
|
|
1873
|
+
parsedBody = parsedOutput.body;
|
|
1874
|
+
response = new __BaseException({
|
|
1875
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1876
|
+
$fault: "client",
|
|
1877
|
+
$metadata: deserializeMetadata(output),
|
|
1878
|
+
});
|
|
1879
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1880
|
+
}
|
|
1881
|
+
});
|
|
1882
|
+
}); };
|
|
1807
1883
|
export var deserializeAws_json1_1ListCostCategoryDefinitionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1808
1884
|
var data, contents, response;
|
|
1809
1885
|
return __generator(this, function (_a) {
|
|
@@ -2182,6 +2258,56 @@ var deserializeAws_json1_1UpdateAnomalySubscriptionCommandError = function (outp
|
|
|
2182
2258
|
}
|
|
2183
2259
|
});
|
|
2184
2260
|
}); };
|
|
2261
|
+
export var deserializeAws_json1_1UpdateCostAllocationTagsStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2262
|
+
var data, contents, response;
|
|
2263
|
+
return __generator(this, function (_a) {
|
|
2264
|
+
switch (_a.label) {
|
|
2265
|
+
case 0:
|
|
2266
|
+
if (output.statusCode >= 300) {
|
|
2267
|
+
return [2, deserializeAws_json1_1UpdateCostAllocationTagsStatusCommandError(output, context)];
|
|
2268
|
+
}
|
|
2269
|
+
return [4, parseBody(output.body, context)];
|
|
2270
|
+
case 1:
|
|
2271
|
+
data = _a.sent();
|
|
2272
|
+
contents = {};
|
|
2273
|
+
contents = deserializeAws_json1_1UpdateCostAllocationTagsStatusResponse(data, context);
|
|
2274
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
2275
|
+
return [2, Promise.resolve(response)];
|
|
2276
|
+
}
|
|
2277
|
+
});
|
|
2278
|
+
}); };
|
|
2279
|
+
var deserializeAws_json1_1UpdateCostAllocationTagsStatusCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2280
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2281
|
+
var _c;
|
|
2282
|
+
return __generator(this, function (_d) {
|
|
2283
|
+
switch (_d.label) {
|
|
2284
|
+
case 0:
|
|
2285
|
+
_a = [__assign({}, output)];
|
|
2286
|
+
_c = {};
|
|
2287
|
+
return [4, parseBody(output.body, context)];
|
|
2288
|
+
case 1:
|
|
2289
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2290
|
+
errorCode = "UnknownError";
|
|
2291
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2292
|
+
_b = errorCode;
|
|
2293
|
+
switch (_b) {
|
|
2294
|
+
case "LimitExceededException": return [3, 2];
|
|
2295
|
+
case "com.amazonaws.costexplorer#LimitExceededException": return [3, 2];
|
|
2296
|
+
}
|
|
2297
|
+
return [3, 4];
|
|
2298
|
+
case 2: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
2299
|
+
case 3: throw _d.sent();
|
|
2300
|
+
case 4:
|
|
2301
|
+
parsedBody = parsedOutput.body;
|
|
2302
|
+
response = new __BaseException({
|
|
2303
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2304
|
+
$fault: "client",
|
|
2305
|
+
$metadata: deserializeMetadata(output),
|
|
2306
|
+
});
|
|
2307
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2308
|
+
}
|
|
2309
|
+
});
|
|
2310
|
+
}); };
|
|
2185
2311
|
export var deserializeAws_json1_1UpdateCostCategoryDefinitionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2186
2312
|
var data, contents, response;
|
|
2187
2313
|
return __generator(this, function (_a) {
|
|
@@ -2361,6 +2487,29 @@ var serializeAws_json1_1AnomalySubscription = function (input, context) {
|
|
|
2361
2487
|
input.SubscriptionArn !== null && { SubscriptionArn: input.SubscriptionArn })), (input.SubscriptionName !== undefined &&
|
|
2362
2488
|
input.SubscriptionName !== null && { SubscriptionName: input.SubscriptionName })), (input.Threshold !== undefined && input.Threshold !== null && { Threshold: __serializeFloat(input.Threshold) }));
|
|
2363
2489
|
};
|
|
2490
|
+
var serializeAws_json1_1CostAllocationTagKeyList = function (input, context) {
|
|
2491
|
+
return input
|
|
2492
|
+
.filter(function (e) { return e != null; })
|
|
2493
|
+
.map(function (entry) {
|
|
2494
|
+
if (entry === null) {
|
|
2495
|
+
return null;
|
|
2496
|
+
}
|
|
2497
|
+
return entry;
|
|
2498
|
+
});
|
|
2499
|
+
};
|
|
2500
|
+
var serializeAws_json1_1CostAllocationTagStatusEntry = function (input, context) {
|
|
2501
|
+
return __assign(__assign({}, (input.Status !== undefined && input.Status !== null && { Status: input.Status })), (input.TagKey !== undefined && input.TagKey !== null && { TagKey: input.TagKey }));
|
|
2502
|
+
};
|
|
2503
|
+
var serializeAws_json1_1CostAllocationTagStatusList = function (input, context) {
|
|
2504
|
+
return input
|
|
2505
|
+
.filter(function (e) { return e != null; })
|
|
2506
|
+
.map(function (entry) {
|
|
2507
|
+
if (entry === null) {
|
|
2508
|
+
return null;
|
|
2509
|
+
}
|
|
2510
|
+
return serializeAws_json1_1CostAllocationTagStatusEntry(entry, context);
|
|
2511
|
+
});
|
|
2512
|
+
};
|
|
2364
2513
|
var serializeAws_json1_1CostCategoryInheritedValueDimension = function (input, context) {
|
|
2365
2514
|
return __assign(__assign({}, (input.DimensionKey !== undefined && input.DimensionKey !== null && { DimensionKey: input.DimensionKey })), (input.DimensionName !== undefined && input.DimensionName !== null && { DimensionName: input.DimensionName }));
|
|
2366
2515
|
};
|
|
@@ -2645,6 +2794,10 @@ var serializeAws_json1_1GroupDefinitions = function (input, context) {
|
|
|
2645
2794
|
return serializeAws_json1_1GroupDefinition(entry, context);
|
|
2646
2795
|
});
|
|
2647
2796
|
};
|
|
2797
|
+
var serializeAws_json1_1ListCostAllocationTagsRequest = function (input, context) {
|
|
2798
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.Status !== undefined && input.Status !== null && { Status: input.Status })), (input.TagKeys !== undefined &&
|
|
2799
|
+
input.TagKeys !== null && { TagKeys: serializeAws_json1_1CostAllocationTagKeyList(input.TagKeys, context) })), (input.Type !== undefined && input.Type !== null && { Type: input.Type }));
|
|
2800
|
+
};
|
|
2648
2801
|
var serializeAws_json1_1ListCostCategoryDefinitionsRequest = function (input, context) {
|
|
2649
2802
|
return __assign(__assign(__assign({}, (input.EffectiveOn !== undefined && input.EffectiveOn !== null && { EffectiveOn: input.EffectiveOn })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
|
|
2650
2803
|
};
|
|
@@ -2788,6 +2941,12 @@ var serializeAws_json1_1UpdateAnomalySubscriptionRequest = function (input, cont
|
|
|
2788
2941
|
input.SubscriptionArn !== null && { SubscriptionArn: input.SubscriptionArn })), (input.SubscriptionName !== undefined &&
|
|
2789
2942
|
input.SubscriptionName !== null && { SubscriptionName: input.SubscriptionName })), (input.Threshold !== undefined && input.Threshold !== null && { Threshold: __serializeFloat(input.Threshold) }));
|
|
2790
2943
|
};
|
|
2944
|
+
var serializeAws_json1_1UpdateCostAllocationTagsStatusRequest = function (input, context) {
|
|
2945
|
+
return __assign({}, (input.CostAllocationTagsStatus !== undefined &&
|
|
2946
|
+
input.CostAllocationTagsStatus !== null && {
|
|
2947
|
+
CostAllocationTagsStatus: serializeAws_json1_1CostAllocationTagStatusList(input.CostAllocationTagsStatus, context),
|
|
2948
|
+
}));
|
|
2949
|
+
};
|
|
2791
2950
|
var serializeAws_json1_1UpdateCostCategoryDefinitionRequest = function (input, context) {
|
|
2792
2951
|
return __assign(__assign(__assign(__assign(__assign({}, (input.CostCategoryArn !== undefined &&
|
|
2793
2952
|
input.CostCategoryArn !== null && { CostCategoryArn: input.CostCategoryArn })), (input.DefaultValue !== undefined && input.DefaultValue !== null && { DefaultValue: input.DefaultValue })), (input.RuleVersion !== undefined && input.RuleVersion !== null && { RuleVersion: input.RuleVersion })), (input.Rules !== undefined &&
|
|
@@ -2909,6 +3068,24 @@ var deserializeAws_json1_1BillExpirationException = function (output, context) {
|
|
|
2909
3068
|
Message: __expectString(output.Message),
|
|
2910
3069
|
};
|
|
2911
3070
|
};
|
|
3071
|
+
var deserializeAws_json1_1CostAllocationTag = function (output, context) {
|
|
3072
|
+
return {
|
|
3073
|
+
Status: __expectString(output.Status),
|
|
3074
|
+
TagKey: __expectString(output.TagKey),
|
|
3075
|
+
Type: __expectString(output.Type),
|
|
3076
|
+
};
|
|
3077
|
+
};
|
|
3078
|
+
var deserializeAws_json1_1CostAllocationTagList = function (output, context) {
|
|
3079
|
+
var retVal = (output || [])
|
|
3080
|
+
.filter(function (e) { return e != null; })
|
|
3081
|
+
.map(function (entry) {
|
|
3082
|
+
if (entry === null) {
|
|
3083
|
+
return null;
|
|
3084
|
+
}
|
|
3085
|
+
return deserializeAws_json1_1CostAllocationTag(entry, context);
|
|
3086
|
+
});
|
|
3087
|
+
return retVal;
|
|
3088
|
+
};
|
|
2912
3089
|
var deserializeAws_json1_1CostCategory = function (output, context) {
|
|
2913
3090
|
return {
|
|
2914
3091
|
CostCategoryArn: __expectString(output.CostCategoryArn),
|
|
@@ -3677,6 +3854,14 @@ var deserializeAws_json1_1LimitExceededException = function (output, context) {
|
|
|
3677
3854
|
Message: __expectString(output.Message),
|
|
3678
3855
|
};
|
|
3679
3856
|
};
|
|
3857
|
+
var deserializeAws_json1_1ListCostAllocationTagsResponse = function (output, context) {
|
|
3858
|
+
return {
|
|
3859
|
+
CostAllocationTags: output.CostAllocationTags !== undefined && output.CostAllocationTags !== null
|
|
3860
|
+
? deserializeAws_json1_1CostAllocationTagList(output.CostAllocationTags, context)
|
|
3861
|
+
: undefined,
|
|
3862
|
+
NextToken: __expectString(output.NextToken),
|
|
3863
|
+
};
|
|
3864
|
+
};
|
|
3680
3865
|
var deserializeAws_json1_1ListCostCategoryDefinitionsResponse = function (output, context) {
|
|
3681
3866
|
return {
|
|
3682
3867
|
CostCategoryReferences: output.CostCategoryReferences !== undefined && output.CostCategoryReferences !== null
|
|
@@ -4396,6 +4581,31 @@ var deserializeAws_json1_1UpdateAnomalySubscriptionResponse = function (output,
|
|
|
4396
4581
|
SubscriptionArn: __expectString(output.SubscriptionArn),
|
|
4397
4582
|
};
|
|
4398
4583
|
};
|
|
4584
|
+
var deserializeAws_json1_1UpdateCostAllocationTagsStatusError = function (output, context) {
|
|
4585
|
+
return {
|
|
4586
|
+
Code: __expectString(output.Code),
|
|
4587
|
+
Message: __expectString(output.Message),
|
|
4588
|
+
TagKey: __expectString(output.TagKey),
|
|
4589
|
+
};
|
|
4590
|
+
};
|
|
4591
|
+
var deserializeAws_json1_1UpdateCostAllocationTagsStatusErrors = function (output, context) {
|
|
4592
|
+
var retVal = (output || [])
|
|
4593
|
+
.filter(function (e) { return e != null; })
|
|
4594
|
+
.map(function (entry) {
|
|
4595
|
+
if (entry === null) {
|
|
4596
|
+
return null;
|
|
4597
|
+
}
|
|
4598
|
+
return deserializeAws_json1_1UpdateCostAllocationTagsStatusError(entry, context);
|
|
4599
|
+
});
|
|
4600
|
+
return retVal;
|
|
4601
|
+
};
|
|
4602
|
+
var deserializeAws_json1_1UpdateCostAllocationTagsStatusResponse = function (output, context) {
|
|
4603
|
+
return {
|
|
4604
|
+
Errors: output.Errors !== undefined && output.Errors !== null
|
|
4605
|
+
? deserializeAws_json1_1UpdateCostAllocationTagsStatusErrors(output.Errors, context)
|
|
4606
|
+
: undefined,
|
|
4607
|
+
};
|
|
4608
|
+
};
|
|
4399
4609
|
var deserializeAws_json1_1UpdateCostCategoryDefinitionResponse = function (output, context) {
|
|
4400
4610
|
return {
|
|
4401
4611
|
CostCategoryArn: __expectString(output.CostCategoryArn),
|