1 | import * as appscaling from '@aws-cdk/aws-applicationautoscaling';
|
2 | import * as cloudwatch from '@aws-cdk/aws-cloudwatch';
|
3 | import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2';
|
4 | import { Construct } from 'constructs';
|
5 |
|
6 |
|
7 |
|
8 | export interface ScalableTaskCountProps extends appscaling.BaseScalableAttributeProps {
|
9 | }
|
10 |
|
11 |
|
12 |
|
13 | export declare class ScalableTaskCount extends appscaling.BaseScalableAttribute {
|
14 | |
15 |
|
16 |
|
17 | constructor(scope: Construct, id: string, props: ScalableTaskCountProps);
|
18 | /**
|
19 | * Scales in or out based on a specified scheduled time.
|
20 | */
|
21 | scaleOnSchedule(id: string, props: appscaling.ScalingSchedule): void;
|
22 | /**
|
23 | * Scales in or out based on a specified metric value.
|
24 | */
|
25 | scaleOnMetric(id: string, props: appscaling.BasicStepScalingPolicyProps): void;
|
26 | /**
|
27 | * Scales in or out to achieve a target CPU utilization.
|
28 | */
|
29 | scaleOnCpuUtilization(id: string, props: CpuUtilizationScalingProps): void;
|
30 | /**
|
31 | * Scales in or out to achieve a target memory utilization.
|
32 | */
|
33 | scaleOnMemoryUtilization(id: string, props: MemoryUtilizationScalingProps): void;
|
34 | /**
|
35 | * Scales in or out to achieve a target Application Load Balancer request count per target.
|
36 | */
|
37 | scaleOnRequestCount(id: string, props: RequestCountScalingProps): void;
|
38 | /**
|
39 | * Scales in or out to achieve a target on a custom metric.
|
40 | */
|
41 | scaleToTrackCustomMetric(id: string, props: TrackCustomMetricProps): void;
|
42 | }
|
43 | /**
|
44 | * The properties for enabling scaling based on CPU utilization.
|
45 | */
|
46 | export interface CpuUtilizationScalingProps extends appscaling.BaseTargetTrackingProps {
|
47 | |
48 |
|
49 |
|
50 | readonly targetUtilizationPercent: number;
|
51 | }
|
52 |
|
53 |
|
54 |
|
55 | export interface MemoryUtilizationScalingProps extends appscaling.BaseTargetTrackingProps {
|
56 | |
57 |
|
58 |
|
59 | readonly targetUtilizationPercent: number;
|
60 | }
|
61 |
|
62 |
|
63 |
|
64 | export interface RequestCountScalingProps extends appscaling.BaseTargetTrackingProps {
|
65 | |
66 |
|
67 |
|
68 | readonly requestsPerTarget: number;
|
69 | |
70 |
|
71 |
|
72 | readonly targetGroup: elbv2.ApplicationTargetGroup;
|
73 | }
|
74 |
|
75 |
|
76 |
|
77 | export interface TrackCustomMetricProps extends appscaling.BaseTargetTrackingProps {
|
78 | |
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 | readonly metric: cloudwatch.IMetric;
|
87 | |
88 |
|
89 |
|
90 | readonly targetValue: number;
|
91 | }
|