@aws-sdk/client-billing 3.891.0 → 3.894.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/index.js +1051 -10
- package/package.json +19 -19
- package/dist-cjs/Billing.js +0 -31
- package/dist-cjs/BillingClient.js +0 -52
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -43
- package/dist-cjs/commands/CreateBillingViewCommand.js +0 -27
- package/dist-cjs/commands/DeleteBillingViewCommand.js +0 -26
- package/dist-cjs/commands/GetBillingViewCommand.js +0 -27
- package/dist-cjs/commands/GetResourcePolicyCommand.js +0 -26
- package/dist-cjs/commands/ListBillingViewsCommand.js +0 -27
- package/dist-cjs/commands/ListSourceViewsForBillingViewCommand.js +0 -26
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -26
- package/dist-cjs/commands/TagResourceCommand.js +0 -26
- package/dist-cjs/commands/UntagResourceCommand.js +0 -26
- package/dist-cjs/commands/UpdateBillingViewCommand.js +0 -27
- package/dist-cjs/commands/index.js +0 -13
- package/dist-cjs/endpoint/EndpointParameters.js +0 -17
- package/dist-cjs/extensionConfiguration.js +0 -2
- package/dist-cjs/models/BillingServiceException.js +0 -12
- package/dist-cjs/models/index.js +0 -4
- package/dist-cjs/models/models_0.js +0 -166
- package/dist-cjs/pagination/Interfaces.js +0 -2
- package/dist-cjs/pagination/ListBillingViewsPaginator.js +0 -7
- package/dist-cjs/pagination/ListSourceViewsForBillingViewPaginator.js +0 -7
- package/dist-cjs/pagination/index.js +0 -6
- package/dist-cjs/protocols/Aws_json1_0.js +0 -406
- package/dist-cjs/runtimeExtensions.js +0 -13
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateBillingViewRequestFilterSensitiveLog = exports.ListBillingViewsResponseFilterSensitiveLog = exports.BillingViewListElementFilterSensitiveLog = exports.GetBillingViewResponseFilterSensitiveLog = exports.BillingViewElementFilterSensitiveLog = exports.CreateBillingViewRequestFilterSensitiveLog = exports.ResourceNotFoundException = exports.BillingViewType = exports.ValidationException = exports.ValidationExceptionReason = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.InternalServerException = exports.Dimension = exports.ConflictException = exports.AccessDeniedException = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
const BillingServiceException_1 = require("./BillingServiceException");
|
|
6
|
-
class AccessDeniedException extends BillingServiceException_1.BillingServiceException {
|
|
7
|
-
name = "AccessDeniedException";
|
|
8
|
-
$fault = "client";
|
|
9
|
-
constructor(opts) {
|
|
10
|
-
super({
|
|
11
|
-
name: "AccessDeniedException",
|
|
12
|
-
$fault: "client",
|
|
13
|
-
...opts,
|
|
14
|
-
});
|
|
15
|
-
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.AccessDeniedException = AccessDeniedException;
|
|
19
|
-
class ConflictException extends BillingServiceException_1.BillingServiceException {
|
|
20
|
-
name = "ConflictException";
|
|
21
|
-
$fault = "client";
|
|
22
|
-
resourceId;
|
|
23
|
-
resourceType;
|
|
24
|
-
constructor(opts) {
|
|
25
|
-
super({
|
|
26
|
-
name: "ConflictException",
|
|
27
|
-
$fault: "client",
|
|
28
|
-
...opts,
|
|
29
|
-
});
|
|
30
|
-
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
31
|
-
this.resourceId = opts.resourceId;
|
|
32
|
-
this.resourceType = opts.resourceType;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.ConflictException = ConflictException;
|
|
36
|
-
exports.Dimension = {
|
|
37
|
-
LINKED_ACCOUNT: "LINKED_ACCOUNT",
|
|
38
|
-
};
|
|
39
|
-
class InternalServerException extends BillingServiceException_1.BillingServiceException {
|
|
40
|
-
name = "InternalServerException";
|
|
41
|
-
$fault = "server";
|
|
42
|
-
constructor(opts) {
|
|
43
|
-
super({
|
|
44
|
-
name: "InternalServerException",
|
|
45
|
-
$fault: "server",
|
|
46
|
-
...opts,
|
|
47
|
-
});
|
|
48
|
-
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.InternalServerException = InternalServerException;
|
|
52
|
-
class ServiceQuotaExceededException extends BillingServiceException_1.BillingServiceException {
|
|
53
|
-
name = "ServiceQuotaExceededException";
|
|
54
|
-
$fault = "client";
|
|
55
|
-
resourceId;
|
|
56
|
-
resourceType;
|
|
57
|
-
serviceCode;
|
|
58
|
-
quotaCode;
|
|
59
|
-
constructor(opts) {
|
|
60
|
-
super({
|
|
61
|
-
name: "ServiceQuotaExceededException",
|
|
62
|
-
$fault: "client",
|
|
63
|
-
...opts,
|
|
64
|
-
});
|
|
65
|
-
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
66
|
-
this.resourceId = opts.resourceId;
|
|
67
|
-
this.resourceType = opts.resourceType;
|
|
68
|
-
this.serviceCode = opts.serviceCode;
|
|
69
|
-
this.quotaCode = opts.quotaCode;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
|
|
73
|
-
class ThrottlingException extends BillingServiceException_1.BillingServiceException {
|
|
74
|
-
name = "ThrottlingException";
|
|
75
|
-
$fault = "client";
|
|
76
|
-
constructor(opts) {
|
|
77
|
-
super({
|
|
78
|
-
name: "ThrottlingException",
|
|
79
|
-
$fault: "client",
|
|
80
|
-
...opts,
|
|
81
|
-
});
|
|
82
|
-
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.ThrottlingException = ThrottlingException;
|
|
86
|
-
exports.ValidationExceptionReason = {
|
|
87
|
-
CANNOT_PARSE: "cannotParse",
|
|
88
|
-
FIELD_VALIDATION_FAILED: "fieldValidationFailed",
|
|
89
|
-
OTHER: "other",
|
|
90
|
-
UNKNOWN_OPERATION: "unknownOperation",
|
|
91
|
-
};
|
|
92
|
-
class ValidationException extends BillingServiceException_1.BillingServiceException {
|
|
93
|
-
name = "ValidationException";
|
|
94
|
-
$fault = "client";
|
|
95
|
-
reason;
|
|
96
|
-
fieldList;
|
|
97
|
-
constructor(opts) {
|
|
98
|
-
super({
|
|
99
|
-
name: "ValidationException",
|
|
100
|
-
$fault: "client",
|
|
101
|
-
...opts,
|
|
102
|
-
});
|
|
103
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
104
|
-
this.reason = opts.reason;
|
|
105
|
-
this.fieldList = opts.fieldList;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
exports.ValidationException = ValidationException;
|
|
109
|
-
exports.BillingViewType = {
|
|
110
|
-
BILLING_GROUP: "BILLING_GROUP",
|
|
111
|
-
CUSTOM: "CUSTOM",
|
|
112
|
-
PRIMARY: "PRIMARY",
|
|
113
|
-
};
|
|
114
|
-
class ResourceNotFoundException extends BillingServiceException_1.BillingServiceException {
|
|
115
|
-
name = "ResourceNotFoundException";
|
|
116
|
-
$fault = "client";
|
|
117
|
-
resourceId;
|
|
118
|
-
resourceType;
|
|
119
|
-
constructor(opts) {
|
|
120
|
-
super({
|
|
121
|
-
name: "ResourceNotFoundException",
|
|
122
|
-
$fault: "client",
|
|
123
|
-
...opts,
|
|
124
|
-
});
|
|
125
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
126
|
-
this.resourceId = opts.resourceId;
|
|
127
|
-
this.resourceType = opts.resourceType;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
131
|
-
const CreateBillingViewRequestFilterSensitiveLog = (obj) => ({
|
|
132
|
-
...obj,
|
|
133
|
-
...(obj.name && { name: smithy_client_1.SENSITIVE_STRING }),
|
|
134
|
-
...(obj.description && { description: smithy_client_1.SENSITIVE_STRING }),
|
|
135
|
-
});
|
|
136
|
-
exports.CreateBillingViewRequestFilterSensitiveLog = CreateBillingViewRequestFilterSensitiveLog;
|
|
137
|
-
const BillingViewElementFilterSensitiveLog = (obj) => ({
|
|
138
|
-
...obj,
|
|
139
|
-
...(obj.name && { name: smithy_client_1.SENSITIVE_STRING }),
|
|
140
|
-
...(obj.description && { description: smithy_client_1.SENSITIVE_STRING }),
|
|
141
|
-
});
|
|
142
|
-
exports.BillingViewElementFilterSensitiveLog = BillingViewElementFilterSensitiveLog;
|
|
143
|
-
const GetBillingViewResponseFilterSensitiveLog = (obj) => ({
|
|
144
|
-
...obj,
|
|
145
|
-
...(obj.billingView && { billingView: (0, exports.BillingViewElementFilterSensitiveLog)(obj.billingView) }),
|
|
146
|
-
});
|
|
147
|
-
exports.GetBillingViewResponseFilterSensitiveLog = GetBillingViewResponseFilterSensitiveLog;
|
|
148
|
-
const BillingViewListElementFilterSensitiveLog = (obj) => ({
|
|
149
|
-
...obj,
|
|
150
|
-
...(obj.name && { name: smithy_client_1.SENSITIVE_STRING }),
|
|
151
|
-
...(obj.description && { description: smithy_client_1.SENSITIVE_STRING }),
|
|
152
|
-
});
|
|
153
|
-
exports.BillingViewListElementFilterSensitiveLog = BillingViewListElementFilterSensitiveLog;
|
|
154
|
-
const ListBillingViewsResponseFilterSensitiveLog = (obj) => ({
|
|
155
|
-
...obj,
|
|
156
|
-
...(obj.billingViews && {
|
|
157
|
-
billingViews: obj.billingViews.map((item) => (0, exports.BillingViewListElementFilterSensitiveLog)(item)),
|
|
158
|
-
}),
|
|
159
|
-
});
|
|
160
|
-
exports.ListBillingViewsResponseFilterSensitiveLog = ListBillingViewsResponseFilterSensitiveLog;
|
|
161
|
-
const UpdateBillingViewRequestFilterSensitiveLog = (obj) => ({
|
|
162
|
-
...obj,
|
|
163
|
-
...(obj.name && { name: smithy_client_1.SENSITIVE_STRING }),
|
|
164
|
-
...(obj.description && { description: smithy_client_1.SENSITIVE_STRING }),
|
|
165
|
-
});
|
|
166
|
-
exports.UpdateBillingViewRequestFilterSensitiveLog = UpdateBillingViewRequestFilterSensitiveLog;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateListBillingViews = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const BillingClient_1 = require("../BillingClient");
|
|
6
|
-
const ListBillingViewsCommand_1 = require("../commands/ListBillingViewsCommand");
|
|
7
|
-
exports.paginateListBillingViews = (0, core_1.createPaginator)(BillingClient_1.BillingClient, ListBillingViewsCommand_1.ListBillingViewsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paginateListSourceViewsForBillingView = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const BillingClient_1 = require("../BillingClient");
|
|
6
|
-
const ListSourceViewsForBillingViewCommand_1 = require("../commands/ListSourceViewsForBillingViewCommand");
|
|
7
|
-
exports.paginateListSourceViewsForBillingView = (0, core_1.createPaginator)(BillingClient_1.BillingClient, ListSourceViewsForBillingViewCommand_1.ListSourceViewsForBillingViewCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./ListBillingViewsPaginator"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./ListSourceViewsForBillingViewPaginator"), exports);
|
|
@@ -1,406 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateBillingViewCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSourceViewsForBillingViewCommand = exports.de_ListBillingViewsCommand = exports.de_GetResourcePolicyCommand = exports.de_GetBillingViewCommand = exports.de_DeleteBillingViewCommand = exports.de_CreateBillingViewCommand = exports.se_UpdateBillingViewCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSourceViewsForBillingViewCommand = exports.se_ListBillingViewsCommand = exports.se_GetResourcePolicyCommand = exports.se_GetBillingViewCommand = exports.se_DeleteBillingViewCommand = exports.se_CreateBillingViewCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const uuid_1 = require("uuid");
|
|
8
|
-
const BillingServiceException_1 = require("../models/BillingServiceException");
|
|
9
|
-
const models_0_1 = require("../models/models_0");
|
|
10
|
-
const se_CreateBillingViewCommand = async (input, context) => {
|
|
11
|
-
const headers = sharedHeaders("CreateBillingView");
|
|
12
|
-
let body;
|
|
13
|
-
body = JSON.stringify(se_CreateBillingViewRequest(input, context));
|
|
14
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
15
|
-
};
|
|
16
|
-
exports.se_CreateBillingViewCommand = se_CreateBillingViewCommand;
|
|
17
|
-
const se_DeleteBillingViewCommand = async (input, context) => {
|
|
18
|
-
const headers = sharedHeaders("DeleteBillingView");
|
|
19
|
-
let body;
|
|
20
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
21
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
-
};
|
|
23
|
-
exports.se_DeleteBillingViewCommand = se_DeleteBillingViewCommand;
|
|
24
|
-
const se_GetBillingViewCommand = async (input, context) => {
|
|
25
|
-
const headers = sharedHeaders("GetBillingView");
|
|
26
|
-
let body;
|
|
27
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
28
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
-
};
|
|
30
|
-
exports.se_GetBillingViewCommand = se_GetBillingViewCommand;
|
|
31
|
-
const se_GetResourcePolicyCommand = async (input, context) => {
|
|
32
|
-
const headers = sharedHeaders("GetResourcePolicy");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
35
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
-
};
|
|
37
|
-
exports.se_GetResourcePolicyCommand = se_GetResourcePolicyCommand;
|
|
38
|
-
const se_ListBillingViewsCommand = async (input, context) => {
|
|
39
|
-
const headers = sharedHeaders("ListBillingViews");
|
|
40
|
-
let body;
|
|
41
|
-
body = JSON.stringify(se_ListBillingViewsRequest(input, context));
|
|
42
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
43
|
-
};
|
|
44
|
-
exports.se_ListBillingViewsCommand = se_ListBillingViewsCommand;
|
|
45
|
-
const se_ListSourceViewsForBillingViewCommand = async (input, context) => {
|
|
46
|
-
const headers = sharedHeaders("ListSourceViewsForBillingView");
|
|
47
|
-
let body;
|
|
48
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
49
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
50
|
-
};
|
|
51
|
-
exports.se_ListSourceViewsForBillingViewCommand = se_ListSourceViewsForBillingViewCommand;
|
|
52
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
53
|
-
const headers = sharedHeaders("ListTagsForResource");
|
|
54
|
-
let body;
|
|
55
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
56
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
|
-
};
|
|
58
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
59
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
60
|
-
const headers = sharedHeaders("TagResource");
|
|
61
|
-
let body;
|
|
62
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
63
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
64
|
-
};
|
|
65
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
66
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
67
|
-
const headers = sharedHeaders("UntagResource");
|
|
68
|
-
let body;
|
|
69
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
70
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
71
|
-
};
|
|
72
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
73
|
-
const se_UpdateBillingViewCommand = async (input, context) => {
|
|
74
|
-
const headers = sharedHeaders("UpdateBillingView");
|
|
75
|
-
let body;
|
|
76
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
77
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
78
|
-
};
|
|
79
|
-
exports.se_UpdateBillingViewCommand = se_UpdateBillingViewCommand;
|
|
80
|
-
const de_CreateBillingViewCommand = async (output, context) => {
|
|
81
|
-
if (output.statusCode >= 300) {
|
|
82
|
-
return de_CommandError(output, context);
|
|
83
|
-
}
|
|
84
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
85
|
-
let contents = {};
|
|
86
|
-
contents = de_CreateBillingViewResponse(data, context);
|
|
87
|
-
const response = {
|
|
88
|
-
$metadata: deserializeMetadata(output),
|
|
89
|
-
...contents,
|
|
90
|
-
};
|
|
91
|
-
return response;
|
|
92
|
-
};
|
|
93
|
-
exports.de_CreateBillingViewCommand = de_CreateBillingViewCommand;
|
|
94
|
-
const de_DeleteBillingViewCommand = async (output, context) => {
|
|
95
|
-
if (output.statusCode >= 300) {
|
|
96
|
-
return de_CommandError(output, context);
|
|
97
|
-
}
|
|
98
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
99
|
-
let contents = {};
|
|
100
|
-
contents = (0, smithy_client_1._json)(data);
|
|
101
|
-
const response = {
|
|
102
|
-
$metadata: deserializeMetadata(output),
|
|
103
|
-
...contents,
|
|
104
|
-
};
|
|
105
|
-
return response;
|
|
106
|
-
};
|
|
107
|
-
exports.de_DeleteBillingViewCommand = de_DeleteBillingViewCommand;
|
|
108
|
-
const de_GetBillingViewCommand = async (output, context) => {
|
|
109
|
-
if (output.statusCode >= 300) {
|
|
110
|
-
return de_CommandError(output, context);
|
|
111
|
-
}
|
|
112
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
113
|
-
let contents = {};
|
|
114
|
-
contents = de_GetBillingViewResponse(data, context);
|
|
115
|
-
const response = {
|
|
116
|
-
$metadata: deserializeMetadata(output),
|
|
117
|
-
...contents,
|
|
118
|
-
};
|
|
119
|
-
return response;
|
|
120
|
-
};
|
|
121
|
-
exports.de_GetBillingViewCommand = de_GetBillingViewCommand;
|
|
122
|
-
const de_GetResourcePolicyCommand = async (output, context) => {
|
|
123
|
-
if (output.statusCode >= 300) {
|
|
124
|
-
return de_CommandError(output, context);
|
|
125
|
-
}
|
|
126
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
127
|
-
let contents = {};
|
|
128
|
-
contents = (0, smithy_client_1._json)(data);
|
|
129
|
-
const response = {
|
|
130
|
-
$metadata: deserializeMetadata(output),
|
|
131
|
-
...contents,
|
|
132
|
-
};
|
|
133
|
-
return response;
|
|
134
|
-
};
|
|
135
|
-
exports.de_GetResourcePolicyCommand = de_GetResourcePolicyCommand;
|
|
136
|
-
const de_ListBillingViewsCommand = async (output, context) => {
|
|
137
|
-
if (output.statusCode >= 300) {
|
|
138
|
-
return de_CommandError(output, context);
|
|
139
|
-
}
|
|
140
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
141
|
-
let contents = {};
|
|
142
|
-
contents = (0, smithy_client_1._json)(data);
|
|
143
|
-
const response = {
|
|
144
|
-
$metadata: deserializeMetadata(output),
|
|
145
|
-
...contents,
|
|
146
|
-
};
|
|
147
|
-
return response;
|
|
148
|
-
};
|
|
149
|
-
exports.de_ListBillingViewsCommand = de_ListBillingViewsCommand;
|
|
150
|
-
const de_ListSourceViewsForBillingViewCommand = async (output, context) => {
|
|
151
|
-
if (output.statusCode >= 300) {
|
|
152
|
-
return de_CommandError(output, context);
|
|
153
|
-
}
|
|
154
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
155
|
-
let contents = {};
|
|
156
|
-
contents = (0, smithy_client_1._json)(data);
|
|
157
|
-
const response = {
|
|
158
|
-
$metadata: deserializeMetadata(output),
|
|
159
|
-
...contents,
|
|
160
|
-
};
|
|
161
|
-
return response;
|
|
162
|
-
};
|
|
163
|
-
exports.de_ListSourceViewsForBillingViewCommand = de_ListSourceViewsForBillingViewCommand;
|
|
164
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
165
|
-
if (output.statusCode >= 300) {
|
|
166
|
-
return de_CommandError(output, context);
|
|
167
|
-
}
|
|
168
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
169
|
-
let contents = {};
|
|
170
|
-
contents = (0, smithy_client_1._json)(data);
|
|
171
|
-
const response = {
|
|
172
|
-
$metadata: deserializeMetadata(output),
|
|
173
|
-
...contents,
|
|
174
|
-
};
|
|
175
|
-
return response;
|
|
176
|
-
};
|
|
177
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
178
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
179
|
-
if (output.statusCode >= 300) {
|
|
180
|
-
return de_CommandError(output, context);
|
|
181
|
-
}
|
|
182
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
183
|
-
let contents = {};
|
|
184
|
-
contents = (0, smithy_client_1._json)(data);
|
|
185
|
-
const response = {
|
|
186
|
-
$metadata: deserializeMetadata(output),
|
|
187
|
-
...contents,
|
|
188
|
-
};
|
|
189
|
-
return response;
|
|
190
|
-
};
|
|
191
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
192
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
193
|
-
if (output.statusCode >= 300) {
|
|
194
|
-
return de_CommandError(output, context);
|
|
195
|
-
}
|
|
196
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
197
|
-
let contents = {};
|
|
198
|
-
contents = (0, smithy_client_1._json)(data);
|
|
199
|
-
const response = {
|
|
200
|
-
$metadata: deserializeMetadata(output),
|
|
201
|
-
...contents,
|
|
202
|
-
};
|
|
203
|
-
return response;
|
|
204
|
-
};
|
|
205
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
206
|
-
const de_UpdateBillingViewCommand = async (output, context) => {
|
|
207
|
-
if (output.statusCode >= 300) {
|
|
208
|
-
return de_CommandError(output, context);
|
|
209
|
-
}
|
|
210
|
-
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
211
|
-
let contents = {};
|
|
212
|
-
contents = de_UpdateBillingViewResponse(data, context);
|
|
213
|
-
const response = {
|
|
214
|
-
$metadata: deserializeMetadata(output),
|
|
215
|
-
...contents,
|
|
216
|
-
};
|
|
217
|
-
return response;
|
|
218
|
-
};
|
|
219
|
-
exports.de_UpdateBillingViewCommand = de_UpdateBillingViewCommand;
|
|
220
|
-
const de_CommandError = async (output, context) => {
|
|
221
|
-
const parsedOutput = {
|
|
222
|
-
...output,
|
|
223
|
-
body: await (0, core_1.parseJsonErrorBody)(output.body, context),
|
|
224
|
-
};
|
|
225
|
-
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
226
|
-
switch (errorCode) {
|
|
227
|
-
case "AccessDeniedException":
|
|
228
|
-
case "com.amazonaws.billing#AccessDeniedException":
|
|
229
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
230
|
-
case "ConflictException":
|
|
231
|
-
case "com.amazonaws.billing#ConflictException":
|
|
232
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
233
|
-
case "InternalServerException":
|
|
234
|
-
case "com.amazonaws.billing#InternalServerException":
|
|
235
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
236
|
-
case "ServiceQuotaExceededException":
|
|
237
|
-
case "com.amazonaws.billing#ServiceQuotaExceededException":
|
|
238
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
239
|
-
case "ThrottlingException":
|
|
240
|
-
case "com.amazonaws.billing#ThrottlingException":
|
|
241
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
242
|
-
case "ValidationException":
|
|
243
|
-
case "com.amazonaws.billing#ValidationException":
|
|
244
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
245
|
-
case "ResourceNotFoundException":
|
|
246
|
-
case "com.amazonaws.billing#ResourceNotFoundException":
|
|
247
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
248
|
-
default:
|
|
249
|
-
const parsedBody = parsedOutput.body;
|
|
250
|
-
return throwDefaultError({
|
|
251
|
-
output,
|
|
252
|
-
parsedBody,
|
|
253
|
-
errorCode,
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
258
|
-
const body = parsedOutput.body;
|
|
259
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
260
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
261
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
262
|
-
...deserialized,
|
|
263
|
-
});
|
|
264
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
265
|
-
};
|
|
266
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
267
|
-
const body = parsedOutput.body;
|
|
268
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
269
|
-
const exception = new models_0_1.ConflictException({
|
|
270
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
271
|
-
...deserialized,
|
|
272
|
-
});
|
|
273
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
274
|
-
};
|
|
275
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
276
|
-
const body = parsedOutput.body;
|
|
277
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
278
|
-
const exception = new models_0_1.InternalServerException({
|
|
279
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
280
|
-
...deserialized,
|
|
281
|
-
});
|
|
282
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
283
|
-
};
|
|
284
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
285
|
-
const body = parsedOutput.body;
|
|
286
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
287
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
288
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
289
|
-
...deserialized,
|
|
290
|
-
});
|
|
291
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
292
|
-
};
|
|
293
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
294
|
-
const body = parsedOutput.body;
|
|
295
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
296
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
297
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
298
|
-
...deserialized,
|
|
299
|
-
});
|
|
300
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
301
|
-
};
|
|
302
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
303
|
-
const body = parsedOutput.body;
|
|
304
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
305
|
-
const exception = new models_0_1.ThrottlingException({
|
|
306
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
307
|
-
...deserialized,
|
|
308
|
-
});
|
|
309
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
310
|
-
};
|
|
311
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
312
|
-
const body = parsedOutput.body;
|
|
313
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
314
|
-
const exception = new models_0_1.ValidationException({
|
|
315
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
316
|
-
...deserialized,
|
|
317
|
-
});
|
|
318
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
319
|
-
};
|
|
320
|
-
const se_ActiveTimeRange = (input, context) => {
|
|
321
|
-
return (0, smithy_client_1.take)(input, {
|
|
322
|
-
activeAfterInclusive: (_) => _.getTime() / 1_000,
|
|
323
|
-
activeBeforeInclusive: (_) => _.getTime() / 1_000,
|
|
324
|
-
});
|
|
325
|
-
};
|
|
326
|
-
const se_CreateBillingViewRequest = (input, context) => {
|
|
327
|
-
return (0, smithy_client_1.take)(input, {
|
|
328
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
329
|
-
dataFilterExpression: smithy_client_1._json,
|
|
330
|
-
description: [],
|
|
331
|
-
name: [],
|
|
332
|
-
resourceTags: smithy_client_1._json,
|
|
333
|
-
sourceViews: smithy_client_1._json,
|
|
334
|
-
});
|
|
335
|
-
};
|
|
336
|
-
const se_ListBillingViewsRequest = (input, context) => {
|
|
337
|
-
return (0, smithy_client_1.take)(input, {
|
|
338
|
-
activeTimeRange: (_) => se_ActiveTimeRange(_, context),
|
|
339
|
-
arns: smithy_client_1._json,
|
|
340
|
-
billingViewTypes: smithy_client_1._json,
|
|
341
|
-
maxResults: [],
|
|
342
|
-
nextToken: [],
|
|
343
|
-
ownerAccountId: [],
|
|
344
|
-
});
|
|
345
|
-
};
|
|
346
|
-
const de_BillingViewElement = (output, context) => {
|
|
347
|
-
return (0, smithy_client_1.take)(output, {
|
|
348
|
-
arn: smithy_client_1.expectString,
|
|
349
|
-
billingViewType: smithy_client_1.expectString,
|
|
350
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
351
|
-
dataFilterExpression: smithy_client_1._json,
|
|
352
|
-
description: smithy_client_1.expectString,
|
|
353
|
-
name: smithy_client_1.expectString,
|
|
354
|
-
ownerAccountId: smithy_client_1.expectString,
|
|
355
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
356
|
-
});
|
|
357
|
-
};
|
|
358
|
-
const de_CreateBillingViewResponse = (output, context) => {
|
|
359
|
-
return (0, smithy_client_1.take)(output, {
|
|
360
|
-
arn: smithy_client_1.expectString,
|
|
361
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
362
|
-
});
|
|
363
|
-
};
|
|
364
|
-
const de_GetBillingViewResponse = (output, context) => {
|
|
365
|
-
return (0, smithy_client_1.take)(output, {
|
|
366
|
-
billingView: (_) => de_BillingViewElement(_, context),
|
|
367
|
-
});
|
|
368
|
-
};
|
|
369
|
-
const de_UpdateBillingViewResponse = (output, context) => {
|
|
370
|
-
return (0, smithy_client_1.take)(output, {
|
|
371
|
-
arn: smithy_client_1.expectString,
|
|
372
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
373
|
-
});
|
|
374
|
-
};
|
|
375
|
-
const deserializeMetadata = (output) => ({
|
|
376
|
-
httpStatusCode: output.statusCode,
|
|
377
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
378
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
379
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
380
|
-
});
|
|
381
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
382
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(BillingServiceException_1.BillingServiceException);
|
|
383
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
384
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
385
|
-
const contents = {
|
|
386
|
-
protocol,
|
|
387
|
-
hostname,
|
|
388
|
-
port,
|
|
389
|
-
method: "POST",
|
|
390
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
391
|
-
headers,
|
|
392
|
-
};
|
|
393
|
-
if (resolvedHostname !== undefined) {
|
|
394
|
-
contents.hostname = resolvedHostname;
|
|
395
|
-
}
|
|
396
|
-
if (body !== undefined) {
|
|
397
|
-
contents.body = body;
|
|
398
|
-
}
|
|
399
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
400
|
-
};
|
|
401
|
-
function sharedHeaders(operation) {
|
|
402
|
-
return {
|
|
403
|
-
"content-type": "application/x-amz-json-1.0",
|
|
404
|
-
"x-amz-target": `AWSBilling.${operation}`,
|
|
405
|
-
};
|
|
406
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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 httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
|
|
10
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
11
|
-
return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
|
|
12
|
-
};
|
|
13
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|