@aws-sdk/client-freetier 3.840.0 → 3.844.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/README.md +40 -18
- package/dist-cjs/index.js +347 -21
- package/dist-es/FreeTier.js +8 -0
- package/dist-es/commands/GetAccountActivityCommand.js +22 -0
- package/dist-es/commands/GetAccountPlanStateCommand.js +22 -0
- package/dist-es/commands/ListAccountActivitiesCommand.js +22 -0
- package/dist-es/commands/UpgradeAccountPlanCommand.js +22 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/models/models_0.js +79 -14
- package/dist-es/pagination/ListAccountActivitiesPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_0.js +162 -3
- package/dist-types/FreeTier.d.ts +31 -11
- package/dist-types/FreeTierClient.d.ts +7 -13
- package/dist-types/commands/GetAccountActivityCommand.d.ts +129 -0
- package/dist-types/commands/GetAccountPlanStateCommand.d.ts +156 -0
- package/dist-types/commands/GetFreeTierUsageCommand.d.ts +4 -4
- package/dist-types/commands/ListAccountActivitiesCommand.d.ts +131 -0
- package/dist-types/commands/UpgradeAccountPlanCommand.d.ts +171 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/index.d.ts +1 -11
- package/dist-types/models/models_0.d.ts +373 -75
- package/dist-types/pagination/ListAccountActivitiesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_0.d.ts +36 -0
- package/dist-types/ts3.4/FreeTier.d.ts +70 -0
- package/dist-types/ts3.4/FreeTierClient.d.ts +28 -2
- package/dist-types/ts3.4/commands/GetAccountActivityCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetAccountPlanStateCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetFreeTierUsageCommand.d.ts +9 -5
- package/dist-types/ts3.4/commands/ListAccountActivitiesCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/UpgradeAccountPlanCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +143 -18
- package/dist-types/ts3.4/pagination/ListAccountActivitiesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +48 -0
- package/package.json +14 -14
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_GetAccountPlanStateCommand, se_GetAccountPlanStateCommand } from "../protocols/Aws_json1_0";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetAccountPlanStateCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("AWSFreeTierService", "GetAccountPlanState", {})
|
|
17
|
+
.n("FreeTierClient", "GetAccountPlanStateCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_GetAccountPlanStateCommand)
|
|
20
|
+
.de(de_GetAccountPlanStateCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_ListAccountActivitiesCommand, se_ListAccountActivitiesCommand } from "../protocols/Aws_json1_0";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ListAccountActivitiesCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("AWSFreeTierService", "ListAccountActivities", {})
|
|
17
|
+
.n("FreeTierClient", "ListAccountActivitiesCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_ListAccountActivitiesCommand)
|
|
20
|
+
.de(de_ListAccountActivitiesCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_UpgradeAccountPlanCommand, se_UpgradeAccountPlanCommand } from "../protocols/Aws_json1_0";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class UpgradeAccountPlanCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("AWSFreeTierService", "UpgradeAccountPlan", {})
|
|
17
|
+
.n("FreeTierClient", "UpgradeAccountPlanCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_UpgradeAccountPlanCommand)
|
|
20
|
+
.de(de_UpgradeAccountPlanCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -1,19 +1,56 @@
|
|
|
1
1
|
import { FreeTierServiceException as __BaseException } from "./FreeTierServiceException";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
name = "AccessDeniedException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "AccessDeniedException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export const AccountPlanStatus = {
|
|
15
|
+
ACTIVE: "ACTIVE",
|
|
16
|
+
EXPIRED: "EXPIRED",
|
|
17
|
+
NOT_STARTED: "NOT_STARTED",
|
|
10
18
|
};
|
|
11
|
-
export const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
export const AccountPlanType = {
|
|
20
|
+
FREE: "FREE",
|
|
21
|
+
PAID: "PAID",
|
|
22
|
+
};
|
|
23
|
+
export const CurrencyCode = {
|
|
24
|
+
USD: "USD",
|
|
25
|
+
};
|
|
26
|
+
export var ActivityReward;
|
|
27
|
+
(function (ActivityReward) {
|
|
28
|
+
ActivityReward.visit = (value, visitor) => {
|
|
29
|
+
if (value.credit !== undefined)
|
|
30
|
+
return visitor.credit(value.credit);
|
|
31
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
32
|
+
};
|
|
33
|
+
})(ActivityReward || (ActivityReward = {}));
|
|
34
|
+
export const ActivityStatus = {
|
|
35
|
+
COMPLETED: "COMPLETED",
|
|
36
|
+
EXPIRING: "EXPIRING",
|
|
37
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
38
|
+
NOT_STARTED: "NOT_STARTED",
|
|
39
|
+
};
|
|
40
|
+
export const LanguageCode = {
|
|
41
|
+
DE_DE: "de-DE",
|
|
42
|
+
EN_GB: "en-GB",
|
|
43
|
+
EN_US: "en-US",
|
|
44
|
+
ES_ES: "es-ES",
|
|
45
|
+
FR_FR: "fr-FR",
|
|
46
|
+
ID_ID: "id-ID",
|
|
47
|
+
IT_IT: "it-IT",
|
|
48
|
+
JA_JP: "ja-JP",
|
|
49
|
+
KO_KR: "ko-KR",
|
|
50
|
+
PT_PT: "pt-PT",
|
|
51
|
+
TR_TR: "tr-TR",
|
|
52
|
+
ZH_CN: "zh-CN",
|
|
53
|
+
ZH_TW: "zh-TW",
|
|
17
54
|
};
|
|
18
55
|
export class InternalServerException extends __BaseException {
|
|
19
56
|
name = "InternalServerException";
|
|
@@ -27,6 +64,18 @@ export class InternalServerException extends __BaseException {
|
|
|
27
64
|
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
28
65
|
}
|
|
29
66
|
}
|
|
67
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
68
|
+
name = "ResourceNotFoundException";
|
|
69
|
+
$fault = "client";
|
|
70
|
+
constructor(opts) {
|
|
71
|
+
super({
|
|
72
|
+
name: "ResourceNotFoundException",
|
|
73
|
+
$fault: "client",
|
|
74
|
+
...opts,
|
|
75
|
+
});
|
|
76
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
30
79
|
export class ThrottlingException extends __BaseException {
|
|
31
80
|
name = "ThrottlingException";
|
|
32
81
|
$fault = "client";
|
|
@@ -51,3 +100,19 @@ export class ValidationException extends __BaseException {
|
|
|
51
100
|
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
52
101
|
}
|
|
53
102
|
}
|
|
103
|
+
export const Dimension = {
|
|
104
|
+
DESCRIPTION: "DESCRIPTION",
|
|
105
|
+
FREE_TIER_TYPE: "FREE_TIER_TYPE",
|
|
106
|
+
OPERATION: "OPERATION",
|
|
107
|
+
REGION: "REGION",
|
|
108
|
+
SERVICE: "SERVICE",
|
|
109
|
+
USAGE_PERCENTAGE: "USAGE_PERCENTAGE",
|
|
110
|
+
USAGE_TYPE: "USAGE_TYPE",
|
|
111
|
+
};
|
|
112
|
+
export const MatchOption = {
|
|
113
|
+
CONTAINS: "CONTAINS",
|
|
114
|
+
ENDS_WITH: "ENDS_WITH",
|
|
115
|
+
EQUALS: "EQUALS",
|
|
116
|
+
GREATER_THAN_OR_EQUAL: "GREATER_THAN_OR_EQUAL",
|
|
117
|
+
STARTS_WITH: "STARTS_WITH",
|
|
118
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListAccountActivitiesCommand, } from "../commands/ListAccountActivitiesCommand";
|
|
3
|
+
import { FreeTierClient } from "../FreeTierClient";
|
|
4
|
+
export const paginateListAccountActivities = createPaginator(FreeTierClient, ListAccountActivitiesCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,14 +1,64 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
|
+
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectString as __expectString, limitedParseDouble as __limitedParseDouble, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { FreeTierServiceException as __BaseException } from "../models/FreeTierServiceException";
|
|
5
|
-
import { InternalServerException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
5
|
+
import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
+
export const se_GetAccountActivityCommand = async (input, context) => {
|
|
7
|
+
const headers = sharedHeaders("GetAccountActivity");
|
|
8
|
+
let body;
|
|
9
|
+
body = JSON.stringify(_json(input));
|
|
10
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
11
|
+
};
|
|
12
|
+
export const se_GetAccountPlanStateCommand = async (input, context) => {
|
|
13
|
+
const headers = sharedHeaders("GetAccountPlanState");
|
|
14
|
+
let body;
|
|
15
|
+
body = JSON.stringify(_json(input));
|
|
16
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
|
+
};
|
|
6
18
|
export const se_GetFreeTierUsageCommand = async (input, context) => {
|
|
7
19
|
const headers = sharedHeaders("GetFreeTierUsage");
|
|
8
20
|
let body;
|
|
9
21
|
body = JSON.stringify(se_GetFreeTierUsageRequest(input, context));
|
|
10
22
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
11
23
|
};
|
|
24
|
+
export const se_ListAccountActivitiesCommand = async (input, context) => {
|
|
25
|
+
const headers = sharedHeaders("ListAccountActivities");
|
|
26
|
+
let body;
|
|
27
|
+
body = JSON.stringify(_json(input));
|
|
28
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
+
};
|
|
30
|
+
export const se_UpgradeAccountPlanCommand = async (input, context) => {
|
|
31
|
+
const headers = sharedHeaders("UpgradeAccountPlan");
|
|
32
|
+
let body;
|
|
33
|
+
body = JSON.stringify(_json(input));
|
|
34
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
+
};
|
|
36
|
+
export const de_GetAccountActivityCommand = async (output, context) => {
|
|
37
|
+
if (output.statusCode >= 300) {
|
|
38
|
+
return de_CommandError(output, context);
|
|
39
|
+
}
|
|
40
|
+
const data = await parseBody(output.body, context);
|
|
41
|
+
let contents = {};
|
|
42
|
+
contents = de_GetAccountActivityResponse(data, context);
|
|
43
|
+
const response = {
|
|
44
|
+
$metadata: deserializeMetadata(output),
|
|
45
|
+
...contents,
|
|
46
|
+
};
|
|
47
|
+
return response;
|
|
48
|
+
};
|
|
49
|
+
export const de_GetAccountPlanStateCommand = async (output, context) => {
|
|
50
|
+
if (output.statusCode >= 300) {
|
|
51
|
+
return de_CommandError(output, context);
|
|
52
|
+
}
|
|
53
|
+
const data = await parseBody(output.body, context);
|
|
54
|
+
let contents = {};
|
|
55
|
+
contents = de_GetAccountPlanStateResponse(data, context);
|
|
56
|
+
const response = {
|
|
57
|
+
$metadata: deserializeMetadata(output),
|
|
58
|
+
...contents,
|
|
59
|
+
};
|
|
60
|
+
return response;
|
|
61
|
+
};
|
|
12
62
|
export const de_GetFreeTierUsageCommand = async (output, context) => {
|
|
13
63
|
if (output.statusCode >= 300) {
|
|
14
64
|
return de_CommandError(output, context);
|
|
@@ -22,6 +72,32 @@ export const de_GetFreeTierUsageCommand = async (output, context) => {
|
|
|
22
72
|
};
|
|
23
73
|
return response;
|
|
24
74
|
};
|
|
75
|
+
export const de_ListAccountActivitiesCommand = async (output, context) => {
|
|
76
|
+
if (output.statusCode >= 300) {
|
|
77
|
+
return de_CommandError(output, context);
|
|
78
|
+
}
|
|
79
|
+
const data = await parseBody(output.body, context);
|
|
80
|
+
let contents = {};
|
|
81
|
+
contents = de_ListAccountActivitiesResponse(data, context);
|
|
82
|
+
const response = {
|
|
83
|
+
$metadata: deserializeMetadata(output),
|
|
84
|
+
...contents,
|
|
85
|
+
};
|
|
86
|
+
return response;
|
|
87
|
+
};
|
|
88
|
+
export const de_UpgradeAccountPlanCommand = async (output, context) => {
|
|
89
|
+
if (output.statusCode >= 300) {
|
|
90
|
+
return de_CommandError(output, context);
|
|
91
|
+
}
|
|
92
|
+
const data = await parseBody(output.body, context);
|
|
93
|
+
let contents = {};
|
|
94
|
+
contents = _json(data);
|
|
95
|
+
const response = {
|
|
96
|
+
$metadata: deserializeMetadata(output),
|
|
97
|
+
...contents,
|
|
98
|
+
};
|
|
99
|
+
return response;
|
|
100
|
+
};
|
|
25
101
|
const de_CommandError = async (output, context) => {
|
|
26
102
|
const parsedOutput = {
|
|
27
103
|
...output,
|
|
@@ -32,12 +108,18 @@ const de_CommandError = async (output, context) => {
|
|
|
32
108
|
case "InternalServerException":
|
|
33
109
|
case "com.amazonaws.freetier#InternalServerException":
|
|
34
110
|
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
111
|
+
case "ResourceNotFoundException":
|
|
112
|
+
case "com.amazonaws.freetier#ResourceNotFoundException":
|
|
113
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
35
114
|
case "ThrottlingException":
|
|
36
115
|
case "com.amazonaws.freetier#ThrottlingException":
|
|
37
116
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
38
117
|
case "ValidationException":
|
|
39
118
|
case "com.amazonaws.freetier#ValidationException":
|
|
40
119
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
120
|
+
case "AccessDeniedException":
|
|
121
|
+
case "com.amazonaws.freetier#AccessDeniedException":
|
|
122
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
41
123
|
default:
|
|
42
124
|
const parsedBody = parsedOutput.body;
|
|
43
125
|
return throwDefaultError({
|
|
@@ -47,6 +129,15 @@ const de_CommandError = async (output, context) => {
|
|
|
47
129
|
});
|
|
48
130
|
}
|
|
49
131
|
};
|
|
132
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
133
|
+
const body = parsedOutput.body;
|
|
134
|
+
const deserialized = _json(body);
|
|
135
|
+
const exception = new AccessDeniedException({
|
|
136
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
137
|
+
...deserialized,
|
|
138
|
+
});
|
|
139
|
+
return __decorateServiceException(exception, body);
|
|
140
|
+
};
|
|
50
141
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
51
142
|
const body = parsedOutput.body;
|
|
52
143
|
const deserialized = _json(body);
|
|
@@ -56,6 +147,15 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
56
147
|
});
|
|
57
148
|
return __decorateServiceException(exception, body);
|
|
58
149
|
};
|
|
150
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
151
|
+
const body = parsedOutput.body;
|
|
152
|
+
const deserialized = _json(body);
|
|
153
|
+
const exception = new ResourceNotFoundException({
|
|
154
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
155
|
+
...deserialized,
|
|
156
|
+
});
|
|
157
|
+
return __decorateServiceException(exception, body);
|
|
158
|
+
};
|
|
59
159
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
60
160
|
const body = parsedOutput.body;
|
|
61
161
|
const deserialized = _json(body);
|
|
@@ -96,6 +196,30 @@ const se_GetFreeTierUsageRequest = (input, context) => {
|
|
|
96
196
|
nextToken: [],
|
|
97
197
|
});
|
|
98
198
|
};
|
|
199
|
+
const de_Activities = (output, context) => {
|
|
200
|
+
const retVal = (output || [])
|
|
201
|
+
.filter((e) => e != null)
|
|
202
|
+
.map((entry) => {
|
|
203
|
+
return de_ActivitySummary(entry, context);
|
|
204
|
+
});
|
|
205
|
+
return retVal;
|
|
206
|
+
};
|
|
207
|
+
const de_ActivityReward = (output, context) => {
|
|
208
|
+
if (output.credit != null) {
|
|
209
|
+
return {
|
|
210
|
+
credit: de_MonetaryAmount(output.credit, context),
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return { $unknown: Object.entries(output)[0] };
|
|
214
|
+
};
|
|
215
|
+
const de_ActivitySummary = (output, context) => {
|
|
216
|
+
return take(output, {
|
|
217
|
+
activityId: __expectString,
|
|
218
|
+
reward: (_) => de_ActivityReward(__expectUnion(_), context),
|
|
219
|
+
status: __expectString,
|
|
220
|
+
title: __expectString,
|
|
221
|
+
});
|
|
222
|
+
};
|
|
99
223
|
const de_FreeTierUsage = (output, context) => {
|
|
100
224
|
return take(output, {
|
|
101
225
|
actualUsageAmount: __limitedParseDouble,
|
|
@@ -118,12 +242,47 @@ const de_FreeTierUsages = (output, context) => {
|
|
|
118
242
|
});
|
|
119
243
|
return retVal;
|
|
120
244
|
};
|
|
245
|
+
const de_GetAccountActivityResponse = (output, context) => {
|
|
246
|
+
return take(output, {
|
|
247
|
+
activityId: __expectString,
|
|
248
|
+
completedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
249
|
+
description: __expectString,
|
|
250
|
+
estimatedTimeToCompleteInMinutes: __expectInt32,
|
|
251
|
+
expiresAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
252
|
+
instructionsUrl: __expectString,
|
|
253
|
+
reward: (_) => de_ActivityReward(__expectUnion(_), context),
|
|
254
|
+
startedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
255
|
+
status: __expectString,
|
|
256
|
+
title: __expectString,
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
const de_GetAccountPlanStateResponse = (output, context) => {
|
|
260
|
+
return take(output, {
|
|
261
|
+
accountId: __expectString,
|
|
262
|
+
accountPlanExpirationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
263
|
+
accountPlanRemainingCredits: (_) => de_MonetaryAmount(_, context),
|
|
264
|
+
accountPlanStatus: __expectString,
|
|
265
|
+
accountPlanType: __expectString,
|
|
266
|
+
});
|
|
267
|
+
};
|
|
121
268
|
const de_GetFreeTierUsageResponse = (output, context) => {
|
|
122
269
|
return take(output, {
|
|
123
270
|
freeTierUsages: (_) => de_FreeTierUsages(_, context),
|
|
124
271
|
nextToken: __expectString,
|
|
125
272
|
});
|
|
126
273
|
};
|
|
274
|
+
const de_ListAccountActivitiesResponse = (output, context) => {
|
|
275
|
+
return take(output, {
|
|
276
|
+
activities: (_) => de_Activities(_, context),
|
|
277
|
+
nextToken: __expectString,
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
const de_MonetaryAmount = (output, context) => {
|
|
281
|
+
return take(output, {
|
|
282
|
+
amount: __limitedParseDouble,
|
|
283
|
+
unit: __expectString,
|
|
284
|
+
});
|
|
285
|
+
};
|
|
127
286
|
const deserializeMetadata = (output) => ({
|
|
128
287
|
httpStatusCode: output.statusCode,
|
|
129
288
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-types/FreeTier.d.ts
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { GetAccountActivityCommandInput, GetAccountActivityCommandOutput } from "./commands/GetAccountActivityCommand";
|
|
3
|
+
import { GetAccountPlanStateCommandInput, GetAccountPlanStateCommandOutput } from "./commands/GetAccountPlanStateCommand";
|
|
2
4
|
import { GetFreeTierUsageCommandInput, GetFreeTierUsageCommandOutput } from "./commands/GetFreeTierUsageCommand";
|
|
5
|
+
import { ListAccountActivitiesCommandInput, ListAccountActivitiesCommandOutput } from "./commands/ListAccountActivitiesCommand";
|
|
6
|
+
import { UpgradeAccountPlanCommandInput, UpgradeAccountPlanCommandOutput } from "./commands/UpgradeAccountPlanCommand";
|
|
3
7
|
import { FreeTierClient } from "./FreeTierClient";
|
|
4
8
|
export interface FreeTier {
|
|
9
|
+
/**
|
|
10
|
+
* @see {@link GetAccountActivityCommand}
|
|
11
|
+
*/
|
|
12
|
+
getAccountActivity(args: GetAccountActivityCommandInput, options?: __HttpHandlerOptions): Promise<GetAccountActivityCommandOutput>;
|
|
13
|
+
getAccountActivity(args: GetAccountActivityCommandInput, cb: (err: any, data?: GetAccountActivityCommandOutput) => void): void;
|
|
14
|
+
getAccountActivity(args: GetAccountActivityCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAccountActivityCommandOutput) => void): void;
|
|
15
|
+
/**
|
|
16
|
+
* @see {@link GetAccountPlanStateCommand}
|
|
17
|
+
*/
|
|
18
|
+
getAccountPlanState(): Promise<GetAccountPlanStateCommandOutput>;
|
|
19
|
+
getAccountPlanState(args: GetAccountPlanStateCommandInput, options?: __HttpHandlerOptions): Promise<GetAccountPlanStateCommandOutput>;
|
|
20
|
+
getAccountPlanState(args: GetAccountPlanStateCommandInput, cb: (err: any, data?: GetAccountPlanStateCommandOutput) => void): void;
|
|
21
|
+
getAccountPlanState(args: GetAccountPlanStateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAccountPlanStateCommandOutput) => void): void;
|
|
5
22
|
/**
|
|
6
23
|
* @see {@link GetFreeTierUsageCommand}
|
|
7
24
|
*/
|
|
@@ -9,19 +26,22 @@ export interface FreeTier {
|
|
|
9
26
|
getFreeTierUsage(args: GetFreeTierUsageCommandInput, options?: __HttpHandlerOptions): Promise<GetFreeTierUsageCommandOutput>;
|
|
10
27
|
getFreeTierUsage(args: GetFreeTierUsageCommandInput, cb: (err: any, data?: GetFreeTierUsageCommandOutput) => void): void;
|
|
11
28
|
getFreeTierUsage(args: GetFreeTierUsageCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetFreeTierUsageCommandOutput) => void): void;
|
|
29
|
+
/**
|
|
30
|
+
* @see {@link ListAccountActivitiesCommand}
|
|
31
|
+
*/
|
|
32
|
+
listAccountActivities(): Promise<ListAccountActivitiesCommandOutput>;
|
|
33
|
+
listAccountActivities(args: ListAccountActivitiesCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountActivitiesCommandOutput>;
|
|
34
|
+
listAccountActivities(args: ListAccountActivitiesCommandInput, cb: (err: any, data?: ListAccountActivitiesCommandOutput) => void): void;
|
|
35
|
+
listAccountActivities(args: ListAccountActivitiesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountActivitiesCommandOutput) => void): void;
|
|
36
|
+
/**
|
|
37
|
+
* @see {@link UpgradeAccountPlanCommand}
|
|
38
|
+
*/
|
|
39
|
+
upgradeAccountPlan(args: UpgradeAccountPlanCommandInput, options?: __HttpHandlerOptions): Promise<UpgradeAccountPlanCommandOutput>;
|
|
40
|
+
upgradeAccountPlan(args: UpgradeAccountPlanCommandInput, cb: (err: any, data?: UpgradeAccountPlanCommandOutput) => void): void;
|
|
41
|
+
upgradeAccountPlan(args: UpgradeAccountPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpgradeAccountPlanCommandOutput) => void): void;
|
|
12
42
|
}
|
|
13
43
|
/**
|
|
14
|
-
* <p>You can use the Amazon Web Services Free Tier API to query programmatically your Free Tier usage data.</p>
|
|
15
|
-
* <p>Free Tier tracks your monthly usage data for all free tier offers that are associated with your
|
|
16
|
-
* Amazon Web Services account. You can use the Free Tier API to filter and show only the data that you want.</p>
|
|
17
|
-
* <p>Service endpoint</p>
|
|
18
|
-
* <p>The Free Tier API provides the following endpoint:</p>
|
|
19
|
-
* <ul>
|
|
20
|
-
* <li>
|
|
21
|
-
* <p>https://freetier.us-east-1.api.aws</p>
|
|
22
|
-
* </li>
|
|
23
|
-
* </ul>
|
|
24
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-free-tier.html">Using the Amazon Web Services Free Tier</a> in the <i>Billing User Guide</i>.</p>
|
|
44
|
+
* <p>You can use the Amazon Web Services Free Tier API to query programmatically your Free Tier usage data.</p> <p>Free Tier tracks your monthly usage data for all free tier offers that are associated with your Amazon Web Services account. You can use the Free Tier API to filter and show only the data that you want.</p> <p>Service endpoint</p> <p>The Free Tier API provides the following endpoint:</p> <ul/> <p>For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-free-tier.html">Using the Amazon Web Services Free Tier</a> in the <i>Billing User Guide</i>.</p>
|
|
25
45
|
* @public
|
|
26
46
|
*/
|
|
27
47
|
export declare class FreeTier extends FreeTierClient implements FreeTier {
|
|
@@ -7,18 +7,22 @@ import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol
|
|
|
7
7
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
8
8
|
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
9
|
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
|
+
import { GetAccountActivityCommandInput, GetAccountActivityCommandOutput } from "./commands/GetAccountActivityCommand";
|
|
11
|
+
import { GetAccountPlanStateCommandInput, GetAccountPlanStateCommandOutput } from "./commands/GetAccountPlanStateCommand";
|
|
10
12
|
import { GetFreeTierUsageCommandInput, GetFreeTierUsageCommandOutput } from "./commands/GetFreeTierUsageCommand";
|
|
13
|
+
import { ListAccountActivitiesCommandInput, ListAccountActivitiesCommandOutput } from "./commands/ListAccountActivitiesCommand";
|
|
14
|
+
import { UpgradeAccountPlanCommandInput, UpgradeAccountPlanCommandOutput } from "./commands/UpgradeAccountPlanCommand";
|
|
11
15
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
12
16
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
13
17
|
export { __Client };
|
|
14
18
|
/**
|
|
15
19
|
* @public
|
|
16
20
|
*/
|
|
17
|
-
export type ServiceInputTypes = GetFreeTierUsageCommandInput;
|
|
21
|
+
export type ServiceInputTypes = GetAccountActivityCommandInput | GetAccountPlanStateCommandInput | GetFreeTierUsageCommandInput | ListAccountActivitiesCommandInput | UpgradeAccountPlanCommandInput;
|
|
18
22
|
/**
|
|
19
23
|
* @public
|
|
20
24
|
*/
|
|
21
|
-
export type ServiceOutputTypes = GetFreeTierUsageCommandOutput;
|
|
25
|
+
export type ServiceOutputTypes = GetAccountActivityCommandOutput | GetAccountPlanStateCommandOutput | GetFreeTierUsageCommandOutput | ListAccountActivitiesCommandOutput | UpgradeAccountPlanCommandOutput;
|
|
22
26
|
/**
|
|
23
27
|
* @public
|
|
24
28
|
*/
|
|
@@ -170,17 +174,7 @@ export type FreeTierClientResolvedConfigType = __SmithyResolvedConfiguration<__H
|
|
|
170
174
|
export interface FreeTierClientResolvedConfig extends FreeTierClientResolvedConfigType {
|
|
171
175
|
}
|
|
172
176
|
/**
|
|
173
|
-
* <p>You can use the Amazon Web Services Free Tier API to query programmatically your Free Tier usage data.</p>
|
|
174
|
-
* <p>Free Tier tracks your monthly usage data for all free tier offers that are associated with your
|
|
175
|
-
* Amazon Web Services account. You can use the Free Tier API to filter and show only the data that you want.</p>
|
|
176
|
-
* <p>Service endpoint</p>
|
|
177
|
-
* <p>The Free Tier API provides the following endpoint:</p>
|
|
178
|
-
* <ul>
|
|
179
|
-
* <li>
|
|
180
|
-
* <p>https://freetier.us-east-1.api.aws</p>
|
|
181
|
-
* </li>
|
|
182
|
-
* </ul>
|
|
183
|
-
* <p>For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-free-tier.html">Using the Amazon Web Services Free Tier</a> in the <i>Billing User Guide</i>.</p>
|
|
177
|
+
* <p>You can use the Amazon Web Services Free Tier API to query programmatically your Free Tier usage data.</p> <p>Free Tier tracks your monthly usage data for all free tier offers that are associated with your Amazon Web Services account. You can use the Free Tier API to filter and show only the data that you want.</p> <p>Service endpoint</p> <p>The Free Tier API provides the following endpoint:</p> <ul/> <p>For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-free-tier.html">Using the Amazon Web Services Free Tier</a> in the <i>Billing User Guide</i>.</p>
|
|
184
178
|
* @public
|
|
185
179
|
*/
|
|
186
180
|
export declare class FreeTierClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, FreeTierClientResolvedConfig> {
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { FreeTierClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FreeTierClient";
|
|
4
|
+
import { GetAccountActivityRequest, GetAccountActivityResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link GetAccountActivityCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetAccountActivityCommandInput extends GetAccountActivityRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetAccountActivityCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetAccountActivityCommandOutput extends GetAccountActivityResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GetAccountActivityCommand_base: {
|
|
25
|
+
new (input: GetAccountActivityCommandInput): import("@smithy/smithy-client").CommandImpl<GetAccountActivityCommandInput, GetAccountActivityCommandOutput, FreeTierClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: GetAccountActivityCommandInput): import("@smithy/smithy-client").CommandImpl<GetAccountActivityCommandInput, GetAccountActivityCommandOutput, FreeTierClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p> Returns a specific activity record that is available to the customer. </p>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { FreeTierClient, GetAccountActivityCommand } from "@aws-sdk/client-freetier"; // ES Modules import
|
|
35
|
+
* // const { FreeTierClient, GetAccountActivityCommand } = require("@aws-sdk/client-freetier"); // CommonJS import
|
|
36
|
+
* const client = new FreeTierClient(config);
|
|
37
|
+
* const input = { // GetAccountActivityRequest
|
|
38
|
+
* activityId: "STRING_VALUE", // required
|
|
39
|
+
* languageCode: "en-US" || "en-GB" || "id-ID" || "de-DE" || "es-ES" || "fr-FR" || "ja-JP" || "it-IT" || "pt-PT" || "ko-KR" || "zh-CN" || "zh-TW" || "tr-TR",
|
|
40
|
+
* };
|
|
41
|
+
* const command = new GetAccountActivityCommand(input);
|
|
42
|
+
* const response = await client.send(command);
|
|
43
|
+
* // { // GetAccountActivityResponse
|
|
44
|
+
* // activityId: "STRING_VALUE", // required
|
|
45
|
+
* // title: "STRING_VALUE", // required
|
|
46
|
+
* // description: "STRING_VALUE", // required
|
|
47
|
+
* // status: "NOT_STARTED" || "IN_PROGRESS" || "COMPLETED" || "EXPIRING", // required
|
|
48
|
+
* // instructionsUrl: "STRING_VALUE", // required
|
|
49
|
+
* // reward: { // ActivityReward Union: only one key present
|
|
50
|
+
* // credit: { // MonetaryAmount
|
|
51
|
+
* // amount: Number("double"), // required
|
|
52
|
+
* // unit: "USD", // required
|
|
53
|
+
* // },
|
|
54
|
+
* // },
|
|
55
|
+
* // estimatedTimeToCompleteInMinutes: Number("int"),
|
|
56
|
+
* // expiresAt: new Date("TIMESTAMP"),
|
|
57
|
+
* // startedAt: new Date("TIMESTAMP"),
|
|
58
|
+
* // completedAt: new Date("TIMESTAMP"),
|
|
59
|
+
* // };
|
|
60
|
+
*
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @param GetAccountActivityCommandInput - {@link GetAccountActivityCommandInput}
|
|
64
|
+
* @returns {@link GetAccountActivityCommandOutput}
|
|
65
|
+
* @see {@link GetAccountActivityCommandInput} for command's `input` shape.
|
|
66
|
+
* @see {@link GetAccountActivityCommandOutput} for command's `response` shape.
|
|
67
|
+
* @see {@link FreeTierClientResolvedConfig | config} for FreeTierClient's `config` shape.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link InternalServerException} (server fault)
|
|
70
|
+
* <p>An unexpected error occurred during the processing of your request.</p>
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
73
|
+
* <p> This exception is thrown when the requested resource cannot be found. </p>
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
76
|
+
* <p>The request was denied due to request throttling.</p>
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link ValidationException} (client fault)
|
|
79
|
+
* <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
|
|
80
|
+
*
|
|
81
|
+
* @throws {@link FreeTierServiceException}
|
|
82
|
+
* <p>Base exception class for all service exceptions from FreeTier service.</p>
|
|
83
|
+
*
|
|
84
|
+
*
|
|
85
|
+
* @example Fetching an Account activity by id
|
|
86
|
+
* ```javascript
|
|
87
|
+
* //
|
|
88
|
+
* const input = {
|
|
89
|
+
* activityId: "d622f48bf4014286a2686ab10cacfb2e",
|
|
90
|
+
* languageCode: "en-US"
|
|
91
|
+
* };
|
|
92
|
+
* const command = new GetAccountActivityCommand(input);
|
|
93
|
+
* const response = await client.send(command);
|
|
94
|
+
* /* response is
|
|
95
|
+
* {
|
|
96
|
+
* activityId: "d622f48bf4014286a2686ab10cacfb2e",
|
|
97
|
+
* completedAt: "1985-06-12T23:20:50.520Z",
|
|
98
|
+
* description: "Set up three notifications: one for your costs reach ...",
|
|
99
|
+
* estimatedTimeToCompleteInMinutes: 15,
|
|
100
|
+
* expiresAt: "1985-10-12T23:20:50.520Z",
|
|
101
|
+
* instructionsUrl: "https://catalog.us-east-1.prod.workshops.aws/workshops/2a5fc82d-2b5f-4105-83c2-91a1b4d7abfe/en-US/2-foundation/lab1-create",
|
|
102
|
+
* reward: {
|
|
103
|
+
* credit: {
|
|
104
|
+
* amount: 20.0,
|
|
105
|
+
* unit: "USD"
|
|
106
|
+
* }
|
|
107
|
+
* },
|
|
108
|
+
* startedAt: "1985-04-12T23:20:50.520Z",
|
|
109
|
+
* status: "COMPLETED",
|
|
110
|
+
* title: "Configure Your Access in the AWS Identity and Access Management (IAM) center"
|
|
111
|
+
* }
|
|
112
|
+
* *\/
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
export declare class GetAccountActivityCommand extends GetAccountActivityCommand_base {
|
|
118
|
+
/** @internal type navigation helper, not in runtime. */
|
|
119
|
+
protected static __types: {
|
|
120
|
+
api: {
|
|
121
|
+
input: GetAccountActivityRequest;
|
|
122
|
+
output: GetAccountActivityResponse;
|
|
123
|
+
};
|
|
124
|
+
sdk: {
|
|
125
|
+
input: GetAccountActivityCommandInput;
|
|
126
|
+
output: GetAccountActivityCommandOutput;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
}
|