1 | import {Request} from '../lib/request';
|
2 | import {Response} from '../lib/response';
|
3 | import {AWSError} from '../lib/error';
|
4 | import {Service} from '../lib/service';
|
5 | import {ServiceConfigurationOptions} from '../lib/service';
|
6 | import {ConfigBase as Config} from '../lib/config';
|
7 | interface Blob {}
|
8 | declare class ComputeOptimizer extends Service {
|
9 | |
10 |
|
11 |
|
12 | constructor(options?: ComputeOptimizer.Types.ClientConfiguration)
|
13 | config: Config & ComputeOptimizer.Types.ClientConfiguration;
|
14 | /**
|
15 | * Returns Auto Scaling group recommendations. AWS Compute Optimizer currently generates recommendations for Auto Scaling groups that are configured to run instances of the M, C, R, T, and X instance families. The service does not generate recommendations for Auto Scaling groups that have a scaling policy attached to them, or that do not have the same values for desired, minimum, and maximum capacity. In order for Compute Optimizer to analyze your Auto Scaling groups, they must be of a fixed size. For more information, see the AWS Compute Optimizer User Guide.
|
16 | */
|
17 | getAutoScalingGroupRecommendations(params: ComputeOptimizer.Types.GetAutoScalingGroupRecommendationsRequest, callback?: (err: AWSError, data: ComputeOptimizer.Types.GetAutoScalingGroupRecommendationsResponse) => void): Request<ComputeOptimizer.Types.GetAutoScalingGroupRecommendationsResponse, AWSError>;
|
18 | /**
|
19 | * Returns Auto Scaling group recommendations. AWS Compute Optimizer currently generates recommendations for Auto Scaling groups that are configured to run instances of the M, C, R, T, and X instance families. The service does not generate recommendations for Auto Scaling groups that have a scaling policy attached to them, or that do not have the same values for desired, minimum, and maximum capacity. In order for Compute Optimizer to analyze your Auto Scaling groups, they must be of a fixed size. For more information, see the AWS Compute Optimizer User Guide.
|
20 | */
|
21 | getAutoScalingGroupRecommendations(callback?: (err: AWSError, data: ComputeOptimizer.Types.GetAutoScalingGroupRecommendationsResponse) => void): Request<ComputeOptimizer.Types.GetAutoScalingGroupRecommendationsResponse, AWSError>;
|
22 | /**
|
23 | * Returns Amazon EC2 instance recommendations. AWS Compute Optimizer currently generates recommendations for Amazon Elastic Compute Cloud (Amazon EC2) and Amazon EC2 Auto Scaling. It generates recommendations for M, C, R, T, and X instance families. For more information, see the AWS Compute Optimizer User Guide.
|
24 | */
|
25 | getEC2InstanceRecommendations(params: ComputeOptimizer.Types.GetEC2InstanceRecommendationsRequest, callback?: (err: AWSError, data: ComputeOptimizer.Types.GetEC2InstanceRecommendationsResponse) => void): Request<ComputeOptimizer.Types.GetEC2InstanceRecommendationsResponse, AWSError>;
|
26 | /**
|
27 | * Returns Amazon EC2 instance recommendations. AWS Compute Optimizer currently generates recommendations for Amazon Elastic Compute Cloud (Amazon EC2) and Amazon EC2 Auto Scaling. It generates recommendations for M, C, R, T, and X instance families. For more information, see the AWS Compute Optimizer User Guide.
|
28 | */
|
29 | getEC2InstanceRecommendations(callback?: (err: AWSError, data: ComputeOptimizer.Types.GetEC2InstanceRecommendationsResponse) => void): Request<ComputeOptimizer.Types.GetEC2InstanceRecommendationsResponse, AWSError>;
|
30 | /**
|
31 | * Returns the projected utilization metrics of Amazon EC2 instance recommendations.
|
32 | */
|
33 | getEC2RecommendationProjectedMetrics(params: ComputeOptimizer.Types.GetEC2RecommendationProjectedMetricsRequest, callback?: (err: AWSError, data: ComputeOptimizer.Types.GetEC2RecommendationProjectedMetricsResponse) => void): Request<ComputeOptimizer.Types.GetEC2RecommendationProjectedMetricsResponse, AWSError>;
|
34 | /**
|
35 | * Returns the projected utilization metrics of Amazon EC2 instance recommendations.
|
36 | */
|
37 | getEC2RecommendationProjectedMetrics(callback?: (err: AWSError, data: ComputeOptimizer.Types.GetEC2RecommendationProjectedMetricsResponse) => void): Request<ComputeOptimizer.Types.GetEC2RecommendationProjectedMetricsResponse, AWSError>;
|
38 | /**
|
39 | * Returns the enrollment (opt in) status of an account to the AWS Compute Optimizer service. If the account is a master account of an organization, this operation also confirms the enrollment status of member accounts within the organization.
|
40 | */
|
41 | getEnrollmentStatus(params: ComputeOptimizer.Types.GetEnrollmentStatusRequest, callback?: (err: AWSError, data: ComputeOptimizer.Types.GetEnrollmentStatusResponse) => void): Request<ComputeOptimizer.Types.GetEnrollmentStatusResponse, AWSError>;
|
42 | /**
|
43 | * Returns the enrollment (opt in) status of an account to the AWS Compute Optimizer service. If the account is a master account of an organization, this operation also confirms the enrollment status of member accounts within the organization.
|
44 | */
|
45 | getEnrollmentStatus(callback?: (err: AWSError, data: ComputeOptimizer.Types.GetEnrollmentStatusResponse) => void): Request<ComputeOptimizer.Types.GetEnrollmentStatusResponse, AWSError>;
|
46 | /**
|
47 | * Returns the optimization findings for an account. For example, it returns the number of Amazon EC2 instances in an account that are under-provisioned, over-provisioned, or optimized. It also returns the number of Auto Scaling groups in an account that are not optimized, or optimized.
|
48 | */
|
49 | getRecommendationSummaries(params: ComputeOptimizer.Types.GetRecommendationSummariesRequest, callback?: (err: AWSError, data: ComputeOptimizer.Types.GetRecommendationSummariesResponse) => void): Request<ComputeOptimizer.Types.GetRecommendationSummariesResponse, AWSError>;
|
50 | /**
|
51 | * Returns the optimization findings for an account. For example, it returns the number of Amazon EC2 instances in an account that are under-provisioned, over-provisioned, or optimized. It also returns the number of Auto Scaling groups in an account that are not optimized, or optimized.
|
52 | */
|
53 | getRecommendationSummaries(callback?: (err: AWSError, data: ComputeOptimizer.Types.GetRecommendationSummariesResponse) => void): Request<ComputeOptimizer.Types.GetRecommendationSummariesResponse, AWSError>;
|
54 | /**
|
55 | * Updates the enrollment (opt in) status of an account to the AWS Compute Optimizer service. If the account is a master account of an organization, this operation can also enroll member accounts within the organization.
|
56 | */
|
57 | updateEnrollmentStatus(params: ComputeOptimizer.Types.UpdateEnrollmentStatusRequest, callback?: (err: AWSError, data: ComputeOptimizer.Types.UpdateEnrollmentStatusResponse) => void): Request<ComputeOptimizer.Types.UpdateEnrollmentStatusResponse, AWSError>;
|
58 | /**
|
59 | * Updates the enrollment (opt in) status of an account to the AWS Compute Optimizer service. If the account is a master account of an organization, this operation can also enroll member accounts within the organization.
|
60 | */
|
61 | updateEnrollmentStatus(callback?: (err: AWSError, data: ComputeOptimizer.Types.UpdateEnrollmentStatusResponse) => void): Request<ComputeOptimizer.Types.UpdateEnrollmentStatusResponse, AWSError>;
|
62 | }
|
63 | declare namespace ComputeOptimizer {
|
64 | export type AccountId = string;
|
65 | export type AccountIds = AccountId[];
|
66 | export type AutoScalingGroupArn = string;
|
67 | export type AutoScalingGroupArns = AutoScalingGroupArn[];
|
68 | export interface AutoScalingGroupConfiguration {
|
69 | |
70 |
|
71 |
|
72 | desiredCapacity?: DesiredCapacity;
|
73 | |
74 |
|
75 |
|
76 | minSize?: MinSize;
|
77 | |
78 |
|
79 |
|
80 | maxSize?: MaxSize;
|
81 | |
82 |
|
83 |
|
84 | instanceType?: InstanceType;
|
85 | }
|
86 | export type AutoScalingGroupName = string;
|
87 | export interface AutoScalingGroupRecommendation {
|
88 | |
89 |
|
90 |
|
91 | accountId?: AccountId;
|
92 | |
93 |
|
94 |
|
95 | autoScalingGroupArn?: AutoScalingGroupArn;
|
96 | |
97 |
|
98 |
|
99 | autoScalingGroupName?: AutoScalingGroupName;
|
100 | |
101 |
|
102 |
|
103 | finding?: Finding;
|
104 | |
105 |
|
106 |
|
107 | utilizationMetrics?: UtilizationMetrics;
|
108 | |
109 |
|
110 |
|
111 | lookBackPeriodInDays?: LookBackPeriodInDays;
|
112 | |
113 |
|
114 |
|
115 | currentConfiguration?: AutoScalingGroupConfiguration;
|
116 | |
117 |
|
118 |
|
119 | recommendationOptions?: AutoScalingGroupRecommendationOptions;
|
120 | |
121 |
|
122 |
|
123 | lastRefreshTimestamp?: LastRefreshTimestamp;
|
124 | }
|
125 | export interface AutoScalingGroupRecommendationOption {
|
126 | |
127 |
|
128 |
|
129 | configuration?: AutoScalingGroupConfiguration;
|
130 | |
131 |
|
132 |
|
133 | projectedUtilizationMetrics?: ProjectedUtilizationMetrics;
|
134 | |
135 |
|
136 |
|
137 | performanceRisk?: PerformanceRisk;
|
138 | |
139 |
|
140 |
|
141 | rank?: Rank;
|
142 | }
|
143 | export type AutoScalingGroupRecommendationOptions = AutoScalingGroupRecommendationOption[];
|
144 | export type AutoScalingGroupRecommendations = AutoScalingGroupRecommendation[];
|
145 | export type Code = string;
|
146 | export type CurrentInstanceType = string;
|
147 | export type DesiredCapacity = number;
|
148 | export interface Filter {
|
149 | |
150 |
|
151 |
|
152 | name?: FilterName;
|
153 | |
154 |
|
155 |
|
156 | values?: FilterValues;
|
157 | }
|
158 | export type FilterName = "Finding"|"RecommendationSourceType"|string;
|
159 | export type FilterValue = string;
|
160 | export type FilterValues = FilterValue[];
|
161 | export type Filters = Filter[];
|
162 | export type Finding = "Underprovisioned"|"Overprovisioned"|"Optimized"|"NotOptimized"|string;
|
163 | export interface GetAutoScalingGroupRecommendationsRequest {
|
164 | |
165 |
|
166 |
|
167 | accountIds?: AccountIds;
|
168 | |
169 |
|
170 |
|
171 | autoScalingGroupArns?: AutoScalingGroupArns;
|
172 | |
173 |
|
174 |
|
175 | nextToken?: NextToken;
|
176 | |
177 |
|
178 |
|
179 | maxResults?: MaxResults;
|
180 | |
181 |
|
182 |
|
183 | filters?: Filters;
|
184 | }
|
185 | export interface GetAutoScalingGroupRecommendationsResponse {
|
186 | |
187 |
|
188 |
|
189 | nextToken?: NextToken;
|
190 | |
191 |
|
192 |
|
193 | autoScalingGroupRecommendations?: AutoScalingGroupRecommendations;
|
194 | |
195 |
|
196 |
|
197 | errors?: GetRecommendationErrors;
|
198 | }
|
199 | export interface GetEC2InstanceRecommendationsRequest {
|
200 | |
201 |
|
202 |
|
203 | instanceArns?: InstanceArns;
|
204 | |
205 |
|
206 |
|
207 | nextToken?: NextToken;
|
208 | |
209 |
|
210 |
|
211 | maxResults?: MaxResults;
|
212 | |
213 |
|
214 |
|
215 | filters?: Filters;
|
216 | |
217 |
|
218 |
|
219 | accountIds?: AccountIds;
|
220 | }
|
221 | export interface GetEC2InstanceRecommendationsResponse {
|
222 | |
223 |
|
224 |
|
225 | nextToken?: NextToken;
|
226 | |
227 |
|
228 |
|
229 | instanceRecommendations?: InstanceRecommendations;
|
230 | |
231 |
|
232 |
|
233 | errors?: GetRecommendationErrors;
|
234 | }
|
235 | export interface GetEC2RecommendationProjectedMetricsRequest {
|
236 | |
237 |
|
238 |
|
239 | instanceArn: InstanceArn;
|
240 | |
241 |
|
242 |
|
243 | stat: MetricStatistic;
|
244 | |
245 |
|
246 |
|
247 | period: Period;
|
248 | |
249 |
|
250 |
|
251 | startTime: Timestamp;
|
252 | |
253 |
|
254 |
|
255 | endTime: Timestamp;
|
256 | }
|
257 | export interface GetEC2RecommendationProjectedMetricsResponse {
|
258 | |
259 |
|
260 |
|
261 | recommendedOptionProjectedMetrics?: RecommendedOptionProjectedMetrics;
|
262 | }
|
263 | export interface GetEnrollmentStatusRequest {
|
264 | }
|
265 | export interface GetEnrollmentStatusResponse {
|
266 | |
267 |
|
268 |
|
269 | status?: Status;
|
270 | |
271 |
|
272 |
|
273 | statusReason?: StatusReason;
|
274 | |
275 |
|
276 |
|
277 | memberAccountsEnrolled?: MemberAccountsEnrolled;
|
278 | }
|
279 | export interface GetRecommendationError {
|
280 | |
281 |
|
282 |
|
283 | identifier?: Identifier;
|
284 | |
285 |
|
286 |
|
287 | code?: Code;
|
288 | |
289 |
|
290 |
|
291 | message?: Message;
|
292 | }
|
293 | export type GetRecommendationErrors = GetRecommendationError[];
|
294 | export interface GetRecommendationSummariesRequest {
|
295 | |
296 |
|
297 |
|
298 | accountIds?: AccountIds;
|
299 | |
300 |
|
301 |
|
302 | nextToken?: NextToken;
|
303 | |
304 |
|
305 |
|
306 | maxResults?: MaxResults;
|
307 | }
|
308 | export interface GetRecommendationSummariesResponse {
|
309 | |
310 |
|
311 |
|
312 | nextToken?: NextToken;
|
313 | |
314 |
|
315 |
|
316 | recommendationSummaries?: RecommendationSummaries;
|
317 | }
|
318 | export type Identifier = string;
|
319 | export type IncludeMemberAccounts = boolean;
|
320 | export type InstanceArn = string;
|
321 | export type InstanceArns = InstanceArn[];
|
322 | export type InstanceName = string;
|
323 | export interface InstanceRecommendation {
|
324 | |
325 |
|
326 |
|
327 | instanceArn?: InstanceArn;
|
328 | |
329 |
|
330 |
|
331 | accountId?: AccountId;
|
332 | |
333 |
|
334 |
|
335 | instanceName?: InstanceName;
|
336 | |
337 |
|
338 |
|
339 | currentInstanceType?: CurrentInstanceType;
|
340 | |
341 |
|
342 |
|
343 | finding?: Finding;
|
344 | |
345 |
|
346 |
|
347 | utilizationMetrics?: UtilizationMetrics;
|
348 | |
349 |
|
350 |
|
351 | lookBackPeriodInDays?: LookBackPeriodInDays;
|
352 | |
353 |
|
354 |
|
355 | recommendationOptions?: RecommendationOptions;
|
356 | |
357 |
|
358 |
|
359 | recommendationSources?: RecommendationSources;
|
360 | |
361 |
|
362 |
|
363 | lastRefreshTimestamp?: LastRefreshTimestamp;
|
364 | }
|
365 | export interface InstanceRecommendationOption {
|
366 | |
367 |
|
368 |
|
369 | instanceType?: InstanceType;
|
370 | |
371 |
|
372 |
|
373 | projectedUtilizationMetrics?: ProjectedUtilizationMetrics;
|
374 | |
375 |
|
376 |
|
377 | performanceRisk?: PerformanceRisk;
|
378 | |
379 |
|
380 |
|
381 | rank?: Rank;
|
382 | }
|
383 | export type InstanceRecommendations = InstanceRecommendation[];
|
384 | export type InstanceType = string;
|
385 | export type LastRefreshTimestamp = Date;
|
386 | export type LookBackPeriodInDays = number;
|
387 | export type MaxResults = number;
|
388 | export type MaxSize = number;
|
389 | export type MemberAccountsEnrolled = boolean;
|
390 | export type Message = string;
|
391 | export type MetricName = "Cpu"|"Memory"|string;
|
392 | export type MetricStatistic = "Maximum"|"Average"|string;
|
393 | export type MetricValue = number;
|
394 | export type MetricValues = MetricValue[];
|
395 | export type MinSize = number;
|
396 | export type NextToken = string;
|
397 | export type PerformanceRisk = number;
|
398 | export type Period = number;
|
399 | export interface ProjectedMetric {
|
400 | |
401 |
|
402 |
|
403 | name?: MetricName;
|
404 | |
405 |
|
406 |
|
407 | timestamps?: Timestamps;
|
408 | |
409 |
|
410 |
|
411 | values?: MetricValues;
|
412 | }
|
413 | export type ProjectedMetrics = ProjectedMetric[];
|
414 | export type ProjectedUtilizationMetrics = UtilizationMetric[];
|
415 | export type Rank = number;
|
416 | export type RecommendationOptions = InstanceRecommendationOption[];
|
417 | export interface RecommendationSource {
|
418 | |
419 |
|
420 |
|
421 | recommendationSourceArn?: RecommendationSourceArn;
|
422 | |
423 |
|
424 |
|
425 | recommendationSourceType?: RecommendationSourceType;
|
426 | }
|
427 | export type RecommendationSourceArn = string;
|
428 | export type RecommendationSourceType = "Ec2Instance"|"AutoScalingGroup"|string;
|
429 | export type RecommendationSources = RecommendationSource[];
|
430 | export type RecommendationSummaries = RecommendationSummary[];
|
431 | export interface RecommendationSummary {
|
432 | |
433 |
|
434 |
|
435 | summaries?: Summaries;
|
436 | |
437 |
|
438 |
|
439 | recommendationResourceType?: RecommendationSourceType;
|
440 | |
441 |
|
442 |
|
443 | accountId?: AccountId;
|
444 | }
|
445 | export type RecommendedInstanceType = string;
|
446 | export interface RecommendedOptionProjectedMetric {
|
447 | |
448 |
|
449 |
|
450 | recommendedInstanceType?: RecommendedInstanceType;
|
451 | |
452 |
|
453 |
|
454 | rank?: Rank;
|
455 | |
456 |
|
457 |
|
458 | projectedMetrics?: ProjectedMetrics;
|
459 | }
|
460 | export type RecommendedOptionProjectedMetrics = RecommendedOptionProjectedMetric[];
|
461 | export type Status = "Active"|"Inactive"|"Pending"|"Failed"|string;
|
462 | export type StatusReason = string;
|
463 | export type Summaries = Summary[];
|
464 | export interface Summary {
|
465 | |
466 |
|
467 |
|
468 | name?: Finding;
|
469 | |
470 |
|
471 |
|
472 | value?: SummaryValue;
|
473 | }
|
474 | export type SummaryValue = number;
|
475 | export type Timestamp = Date;
|
476 | export type Timestamps = Timestamp[];
|
477 | export interface UpdateEnrollmentStatusRequest {
|
478 | |
479 |
|
480 |
|
481 | status: Status;
|
482 | |
483 |
|
484 |
|
485 | includeMemberAccounts?: IncludeMemberAccounts;
|
486 | }
|
487 | export interface UpdateEnrollmentStatusResponse {
|
488 | |
489 |
|
490 |
|
491 | status?: Status;
|
492 | |
493 |
|
494 |
|
495 | statusReason?: StatusReason;
|
496 | }
|
497 | export interface UtilizationMetric {
|
498 | |
499 |
|
500 |
|
501 | name?: MetricName;
|
502 | |
503 |
|
504 |
|
505 | statistic?: MetricStatistic;
|
506 | |
507 |
|
508 |
|
509 | value?: MetricValue;
|
510 | }
|
511 | export type UtilizationMetrics = UtilizationMetric[];
|
512 | |
513 |
|
514 |
|
515 | export type apiVersion = "2019-11-01"|"latest"|string;
|
516 | export interface ClientApiVersions {
|
517 | |
518 |
|
519 |
|
520 | apiVersion?: apiVersion;
|
521 | }
|
522 | export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
|
523 | |
524 |
|
525 |
|
526 | export import Types = ComputeOptimizer;
|
527 | }
|
528 | export = ComputeOptimizer;
|