@aws-sdk/client-cost-optimization-hub 3.458.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/LICENSE +201 -0
- package/README.md +268 -0
- package/dist-cjs/CostOptimizationHub.js +25 -0
- package/dist-cjs/CostOptimizationHubClient.js +43 -0
- package/dist-cjs/commands/GetPreferencesCommand.js +51 -0
- package/dist-cjs/commands/GetRecommendationCommand.js +51 -0
- package/dist-cjs/commands/ListEnrollmentStatusesCommand.js +51 -0
- package/dist-cjs/commands/ListRecommendationSummariesCommand.js +51 -0
- package/dist-cjs/commands/ListRecommendationsCommand.js +51 -0
- package/dist-cjs/commands/UpdateEnrollmentStatusCommand.js +51 -0
- package/dist-cjs/commands/UpdatePreferencesCommand.js +51 -0
- package/dist-cjs/commands/index.js +10 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +12 -0
- package/dist-cjs/models/CostOptimizationHubServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +158 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListEnrollmentStatusesPaginator.js +29 -0
- package/dist-cjs/pagination/ListRecommendationSummariesPaginator.js +29 -0
- package/dist-cjs/pagination/ListRecommendationsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_0.js +830 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +24 -0
- package/dist-cjs/runtimeExtensions.js +22 -0
- package/dist-es/CostOptimizationHub.js +21 -0
- package/dist-es/CostOptimizationHubClient.js +39 -0
- package/dist-es/commands/GetPreferencesCommand.js +47 -0
- package/dist-es/commands/GetRecommendationCommand.js +47 -0
- package/dist-es/commands/ListEnrollmentStatusesCommand.js +47 -0
- package/dist-es/commands/ListRecommendationSummariesCommand.js +47 -0
- package/dist-es/commands/ListRecommendationsCommand.js +47 -0
- package/dist-es/commands/UpdateEnrollmentStatusCommand.js +47 -0
- package/dist-es/commands/UpdatePreferencesCommand.js +47 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +7 -0
- package/dist-es/models/CostOptimizationHubServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +150 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListEnrollmentStatusesPaginator.js +25 -0
- package/dist-es/pagination/ListRecommendationSummariesPaginator.js +25 -0
- package/dist-es/pagination/ListRecommendationsPaginator.js +25 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_0.js +813 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +20 -0
- package/dist-es/runtimeExtensions.js +18 -0
- package/dist-types/CostOptimizationHub.d.ts +66 -0
- package/dist-types/CostOptimizationHubClient.d.ts +183 -0
- package/dist-types/commands/GetPreferencesCommand.d.ts +89 -0
- package/dist-types/commands/GetRecommendationCommand.d.ts +647 -0
- package/dist-types/commands/ListEnrollmentStatusesCommand.d.ts +99 -0
- package/dist-types/commands/ListRecommendationSummariesCommand.d.ts +138 -0
- package/dist-types/commands/ListRecommendationsCommand.d.ts +157 -0
- package/dist-types/commands/UpdateEnrollmentStatusCommand.d.ts +94 -0
- package/dist-types/commands/UpdatePreferencesCommand.d.ts +91 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +22 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +8 -0
- package/dist-types/index.d.ts +22 -0
- package/dist-types/models/CostOptimizationHubServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2141 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListEnrollmentStatusesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRecommendationSummariesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRecommendationsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_json1_0.d.ts +65 -0
- package/dist-types/runtimeConfig.browser.d.ts +46 -0
- package/dist-types/runtimeConfig.d.ts +46 -0
- package/dist-types/runtimeConfig.native.d.ts +45 -0
- package/dist-types/runtimeConfig.shared.d.ts +19 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/CostOptimizationHub.d.ts +126 -0
- package/dist-types/ts3.4/CostOptimizationHubClient.d.ts +163 -0
- package/dist-types/ts3.4/commands/GetPreferencesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetRecommendationCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListEnrollmentStatusesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListRecommendationSummariesCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListRecommendationsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/UpdateEnrollmentStatusCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/UpdatePreferencesCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +7 -0
- package/dist-types/ts3.4/index.d.ts +10 -0
- package/dist-types/ts3.4/models/CostOptimizationHubServiceException.d.ts +8 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +734 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListEnrollmentStatusesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRecommendationSummariesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRecommendationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +89 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +99 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +99 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +90 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/package.json +102 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { CostOptimizationHubServiceException as __BaseException } from "./CostOptimizationHubServiceException";
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "AccessDeniedException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "AccessDeniedException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export const EnrollmentStatus = {
|
|
15
|
+
ACTIVE: "Active",
|
|
16
|
+
INACTIVE: "Inactive",
|
|
17
|
+
};
|
|
18
|
+
export const ActionType = {
|
|
19
|
+
MIGRATE_TO_GRAVITON: "MigrateToGraviton",
|
|
20
|
+
PURCHASE_RESERVED_INSTANCES: "PurchaseReservedInstances",
|
|
21
|
+
PURCHASE_SAVINGS_PLANS: "PurchaseSavingsPlans",
|
|
22
|
+
RIGHTSIZE: "Rightsize",
|
|
23
|
+
STOP: "Stop",
|
|
24
|
+
UPGRADE: "Upgrade",
|
|
25
|
+
};
|
|
26
|
+
export const MemberAccountDiscountVisibility = {
|
|
27
|
+
ALL: "All",
|
|
28
|
+
NONE: "None",
|
|
29
|
+
};
|
|
30
|
+
export const SavingsEstimationMode = {
|
|
31
|
+
AFTER_DISCOUNTS: "AfterDiscounts",
|
|
32
|
+
BEFORE_DISCOUNTS: "BeforeDiscounts",
|
|
33
|
+
};
|
|
34
|
+
export class InternalServerException extends __BaseException {
|
|
35
|
+
constructor(opts) {
|
|
36
|
+
super({
|
|
37
|
+
name: "InternalServerException",
|
|
38
|
+
$fault: "server",
|
|
39
|
+
...opts,
|
|
40
|
+
});
|
|
41
|
+
this.name = "InternalServerException";
|
|
42
|
+
this.$fault = "server";
|
|
43
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export class ThrottlingException extends __BaseException {
|
|
47
|
+
constructor(opts) {
|
|
48
|
+
super({
|
|
49
|
+
name: "ThrottlingException",
|
|
50
|
+
$fault: "client",
|
|
51
|
+
...opts,
|
|
52
|
+
});
|
|
53
|
+
this.name = "ThrottlingException";
|
|
54
|
+
this.$fault = "client";
|
|
55
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export const ValidationExceptionReason = {
|
|
59
|
+
FIELD_VALIDATION_FAILED: "FieldValidationFailed",
|
|
60
|
+
OTHER: "Other",
|
|
61
|
+
};
|
|
62
|
+
export class ValidationException extends __BaseException {
|
|
63
|
+
constructor(opts) {
|
|
64
|
+
super({
|
|
65
|
+
name: "ValidationException",
|
|
66
|
+
$fault: "client",
|
|
67
|
+
...opts,
|
|
68
|
+
});
|
|
69
|
+
this.name = "ValidationException";
|
|
70
|
+
this.$fault = "client";
|
|
71
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
72
|
+
this.reason = opts.reason;
|
|
73
|
+
this.fields = opts.fields;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export var ResourceDetails;
|
|
77
|
+
(function (ResourceDetails) {
|
|
78
|
+
ResourceDetails.visit = (value, visitor) => {
|
|
79
|
+
if (value.lambdaFunction !== undefined)
|
|
80
|
+
return visitor.lambdaFunction(value.lambdaFunction);
|
|
81
|
+
if (value.ecsService !== undefined)
|
|
82
|
+
return visitor.ecsService(value.ecsService);
|
|
83
|
+
if (value.ec2Instance !== undefined)
|
|
84
|
+
return visitor.ec2Instance(value.ec2Instance);
|
|
85
|
+
if (value.ebsVolume !== undefined)
|
|
86
|
+
return visitor.ebsVolume(value.ebsVolume);
|
|
87
|
+
if (value.ec2AutoScalingGroup !== undefined)
|
|
88
|
+
return visitor.ec2AutoScalingGroup(value.ec2AutoScalingGroup);
|
|
89
|
+
if (value.ec2ReservedInstances !== undefined)
|
|
90
|
+
return visitor.ec2ReservedInstances(value.ec2ReservedInstances);
|
|
91
|
+
if (value.rdsReservedInstances !== undefined)
|
|
92
|
+
return visitor.rdsReservedInstances(value.rdsReservedInstances);
|
|
93
|
+
if (value.elastiCacheReservedInstances !== undefined)
|
|
94
|
+
return visitor.elastiCacheReservedInstances(value.elastiCacheReservedInstances);
|
|
95
|
+
if (value.openSearchReservedInstances !== undefined)
|
|
96
|
+
return visitor.openSearchReservedInstances(value.openSearchReservedInstances);
|
|
97
|
+
if (value.redshiftReservedInstances !== undefined)
|
|
98
|
+
return visitor.redshiftReservedInstances(value.redshiftReservedInstances);
|
|
99
|
+
if (value.ec2InstanceSavingsPlans !== undefined)
|
|
100
|
+
return visitor.ec2InstanceSavingsPlans(value.ec2InstanceSavingsPlans);
|
|
101
|
+
if (value.computeSavingsPlans !== undefined)
|
|
102
|
+
return visitor.computeSavingsPlans(value.computeSavingsPlans);
|
|
103
|
+
if (value.sageMakerSavingsPlans !== undefined)
|
|
104
|
+
return visitor.sageMakerSavingsPlans(value.sageMakerSavingsPlans);
|
|
105
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
106
|
+
};
|
|
107
|
+
})(ResourceDetails || (ResourceDetails = {}));
|
|
108
|
+
export const ResourceType = {
|
|
109
|
+
COMPUTE_SAVINGS_PLANS: "ComputeSavingsPlans",
|
|
110
|
+
EBS_VOLUME: "EbsVolume",
|
|
111
|
+
EC2_AUTO_SCALING_GROUP: "Ec2AutoScalingGroup",
|
|
112
|
+
EC2_INSTANCE: "Ec2Instance",
|
|
113
|
+
EC2_INSTANCE_SAVINGS_PLANS: "Ec2InstanceSavingsPlans",
|
|
114
|
+
EC2_RESERVED_INSTANCES: "Ec2ReservedInstances",
|
|
115
|
+
ECS_SERVICE: "EcsService",
|
|
116
|
+
ELASTI_CACHE_RESERVED_INSTANCES: "ElastiCacheReservedInstances",
|
|
117
|
+
LAMBDA_FUNCTION: "LambdaFunction",
|
|
118
|
+
OPEN_SEARCH_RESERVED_INSTANCES: "OpenSearchReservedInstances",
|
|
119
|
+
RDS_RESERVED_INSTANCES: "RdsReservedInstances",
|
|
120
|
+
REDSHIFT_RESERVED_INSTANCES: "RedshiftReservedInstances",
|
|
121
|
+
SAGE_MAKER_SAVINGS_PLANS: "SageMakerSavingsPlans",
|
|
122
|
+
};
|
|
123
|
+
export const ImplementationEffort = {
|
|
124
|
+
HIGH: "High",
|
|
125
|
+
LOW: "Low",
|
|
126
|
+
MEDIUM: "Medium",
|
|
127
|
+
VERY_HIGH: "VeryHigh",
|
|
128
|
+
VERY_LOW: "VeryLow",
|
|
129
|
+
};
|
|
130
|
+
export const Source = {
|
|
131
|
+
COMPUTE_OPTIMIZER: "ComputeOptimizer",
|
|
132
|
+
COST_EXPLORER: "CostExplorer",
|
|
133
|
+
};
|
|
134
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
135
|
+
constructor(opts) {
|
|
136
|
+
super({
|
|
137
|
+
name: "ResourceNotFoundException",
|
|
138
|
+
$fault: "client",
|
|
139
|
+
...opts,
|
|
140
|
+
});
|
|
141
|
+
this.name = "ResourceNotFoundException";
|
|
142
|
+
this.$fault = "client";
|
|
143
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
144
|
+
this.resourceId = opts.resourceId;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
export const Order = {
|
|
148
|
+
ASC: "Asc",
|
|
149
|
+
DESC: "Desc",
|
|
150
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListEnrollmentStatusesCommand, } from "../commands/ListEnrollmentStatusesCommand";
|
|
2
|
+
import { CostOptimizationHubClient } from "../CostOptimizationHubClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListEnrollmentStatusesCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListEnrollmentStatuses(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.nextToken = token;
|
|
12
|
+
input["maxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof CostOptimizationHubClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected CostOptimizationHub | CostOptimizationHubClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListRecommendationSummariesCommand, } from "../commands/ListRecommendationSummariesCommand";
|
|
2
|
+
import { CostOptimizationHubClient } from "../CostOptimizationHubClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListRecommendationSummariesCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListRecommendationSummaries(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.nextToken = token;
|
|
12
|
+
input["maxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof CostOptimizationHubClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected CostOptimizationHub | CostOptimizationHubClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListRecommendationsCommand, } from "../commands/ListRecommendationsCommand";
|
|
2
|
+
import { CostOptimizationHubClient } from "../CostOptimizationHubClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListRecommendationsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListRecommendations(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.nextToken = token;
|
|
12
|
+
input["maxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof CostOptimizationHubClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected CostOptimizationHub | CostOptimizationHubClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|