@stacksjs/ts-cloud 0.2.3 → 0.2.6
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/aws/acm.d.ts +215 -0
- package/dist/aws/application-autoscaling.d.ts +345 -0
- package/dist/aws/bedrock.d.ts +2672 -0
- package/dist/aws/client.d.ts +181 -0
- package/dist/aws/cloudformation.d.ts +187 -0
- package/dist/aws/cloudfront.d.ts +416 -0
- package/dist/aws/cloudwatch-logs.d.ts +70 -0
- package/dist/aws/comprehend.d.ts +616 -0
- package/dist/aws/connect.d.ts +533 -0
- package/dist/aws/deploy-imap.d.ts +26 -0
- package/dist/aws/dynamodb.d.ts +270 -0
- package/dist/aws/ec2.d.ts +545 -0
- package/dist/aws/ecr.d.ts +240 -0
- package/dist/aws/ecs.d.ts +267 -0
- package/dist/aws/efs.d.ts +36 -0
- package/dist/aws/elasticache.d.ts +112 -0
- package/dist/aws/elbv2.d.ts +389 -0
- package/dist/aws/email.d.ts +260 -0
- package/dist/aws/eventbridge.d.ts +197 -0
- package/dist/aws/iam.d.ts +1013 -0
- package/dist/aws/imap-server.d.ts +298 -0
- package/dist/aws/index.d.ts +53 -0
- package/dist/aws/kendra.d.ts +831 -0
- package/dist/aws/lambda.d.ts +319 -0
- package/dist/aws/opensearch.d.ts +121 -0
- package/dist/aws/personalize.d.ts +586 -0
- package/dist/aws/polly.d.ts +243 -0
- package/dist/aws/rds.d.ts +346 -0
- package/dist/aws/rekognition.d.ts +691 -0
- package/dist/aws/route53-domains.d.ts +161 -0
- package/dist/aws/route53.d.ts +330 -0
- package/dist/aws/s3.d.ts +535 -0
- package/dist/aws/scheduler.d.ts +224 -0
- package/dist/aws/secrets-manager.d.ts +267 -0
- package/dist/aws/ses.d.ts +441 -0
- package/dist/aws/setup-phone.d.ts +1 -0
- package/dist/aws/setup-sms.d.ts +116 -0
- package/dist/aws/sms.d.ts +477 -0
- package/dist/aws/smtp-server.d.ts +108 -0
- package/dist/aws/sns.d.ts +224 -0
- package/dist/aws/sqs.d.ts +107 -0
- package/dist/aws/ssm.d.ts +311 -0
- package/dist/aws/sts.d.ts +21 -0
- package/dist/aws/support.d.ts +139 -0
- package/dist/aws/test-imap.d.ts +15 -0
- package/dist/aws/textract.d.ts +477 -0
- package/dist/aws/transcribe.d.ts +79 -0
- package/dist/aws/translate.d.ts +424 -0
- package/dist/aws/voice.d.ts +361 -0
- package/dist/bin/cli.js +4480 -804
- package/dist/config.d.ts +5 -0
- package/dist/deploy/index.d.ts +6 -0
- package/dist/deploy/static-site-external-dns.d.ts +70 -0
- package/dist/deploy/static-site.d.ts +110 -0
- package/dist/dns/cloudflare.d.ts +74 -0
- package/dist/dns/godaddy.d.ts +63 -0
- package/dist/dns/index.d.ts +67 -0
- package/dist/dns/porkbun.d.ts +43 -0
- package/dist/dns/route53-adapter.d.ts +67 -0
- package/dist/dns/types.d.ts +100 -0
- package/dist/dns/validator.d.ts +105 -0
- package/dist/generators/index.d.ts +4 -0
- package/dist/generators/infrastructure.d.ts +115 -0
- package/dist/index.d.ts +9 -165
- package/dist/index.js +4971 -6013
- package/dist/push/apns.d.ts +140 -0
- package/dist/push/fcm.d.ts +205 -0
- package/dist/push/index.d.ts +44 -0
- package/dist/security/pre-deploy-scanner.d.ts +97 -0
- package/dist/ssl/acme-client.d.ts +133 -0
- package/dist/ssl/index.d.ts +6 -0
- package/dist/ssl/letsencrypt.d.ts +96 -0
- package/dist/utils/cli.d.ts +121 -0
- package/dist/validation/index.d.ts +4 -0
- package/dist/validation/template.d.ts +27 -0
- package/package.json +6 -6
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ACM (AWS Certificate Manager) Client
|
|
3
|
+
* For requesting and managing SSL/TLS certificates
|
|
4
|
+
*/
|
|
5
|
+
export interface CertificateDetail {
|
|
6
|
+
CertificateArn: string;
|
|
7
|
+
DomainName: string;
|
|
8
|
+
SubjectAlternativeNames?: string[];
|
|
9
|
+
Status: 'PENDING_VALIDATION' | 'ISSUED' | 'INACTIVE' | 'EXPIRED' | 'VALIDATION_TIMED_OUT' | 'REVOKED' | 'FAILED';
|
|
10
|
+
Type?: 'IMPORTED' | 'AMAZON_ISSUED' | 'PRIVATE';
|
|
11
|
+
DomainValidationOptions?: {
|
|
12
|
+
DomainName: string;
|
|
13
|
+
ValidationDomain?: string;
|
|
14
|
+
ValidationStatus?: 'PENDING_VALIDATION' | 'SUCCESS' | 'FAILED';
|
|
15
|
+
ResourceRecord?: {
|
|
16
|
+
Name: string;
|
|
17
|
+
Type: string;
|
|
18
|
+
Value: string;
|
|
19
|
+
};
|
|
20
|
+
ValidationMethod?: 'EMAIL' | 'DNS';
|
|
21
|
+
}[];
|
|
22
|
+
CreatedAt?: string;
|
|
23
|
+
IssuedAt?: string;
|
|
24
|
+
NotBefore?: string;
|
|
25
|
+
NotAfter?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare class ACMClient {
|
|
28
|
+
private client;
|
|
29
|
+
private region;
|
|
30
|
+
constructor(region?: string);
|
|
31
|
+
/**
|
|
32
|
+
* Request a new certificate
|
|
33
|
+
*/
|
|
34
|
+
requestCertificate(params: {
|
|
35
|
+
DomainName: string;
|
|
36
|
+
SubjectAlternativeNames?: string[];
|
|
37
|
+
ValidationMethod?: 'EMAIL' | 'DNS';
|
|
38
|
+
}): Promise<{
|
|
39
|
+
CertificateArn: string;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* Describe a certificate to get its details and validation options
|
|
43
|
+
*/
|
|
44
|
+
describeCertificate(params: {
|
|
45
|
+
CertificateArn: string;
|
|
46
|
+
}): Promise<CertificateDetail>;
|
|
47
|
+
/**
|
|
48
|
+
* List certificates
|
|
49
|
+
*/
|
|
50
|
+
listCertificates(params?: {
|
|
51
|
+
CertificateStatuses?: ('PENDING_VALIDATION' | 'ISSUED' | 'INACTIVE' | 'EXPIRED' | 'VALIDATION_TIMED_OUT' | 'REVOKED' | 'FAILED')[];
|
|
52
|
+
MaxItems?: number;
|
|
53
|
+
NextToken?: string;
|
|
54
|
+
}): Promise<{
|
|
55
|
+
CertificateSummaryList: {
|
|
56
|
+
CertificateArn: string;
|
|
57
|
+
DomainName: string;
|
|
58
|
+
}[];
|
|
59
|
+
NextToken?: string;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Delete a certificate
|
|
63
|
+
*/
|
|
64
|
+
deleteCertificate(params: {
|
|
65
|
+
CertificateArn: string;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Get certificate tags
|
|
69
|
+
*/
|
|
70
|
+
listTagsForCertificate(params: {
|
|
71
|
+
CertificateArn: string;
|
|
72
|
+
}): Promise<{
|
|
73
|
+
Tags: Array<{
|
|
74
|
+
Key: string;
|
|
75
|
+
Value?: string;
|
|
76
|
+
}>;
|
|
77
|
+
}>;
|
|
78
|
+
/**
|
|
79
|
+
* Add tags to a certificate
|
|
80
|
+
*/
|
|
81
|
+
addTagsToCertificate(params: {
|
|
82
|
+
CertificateArn: string;
|
|
83
|
+
Tags: Array<{
|
|
84
|
+
Key: string;
|
|
85
|
+
Value?: string;
|
|
86
|
+
}>;
|
|
87
|
+
}): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Resend validation email
|
|
90
|
+
*/
|
|
91
|
+
resendValidationEmail(params: {
|
|
92
|
+
CertificateArn: string;
|
|
93
|
+
Domain: string;
|
|
94
|
+
ValidationDomain: string;
|
|
95
|
+
}): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Find certificate by domain name
|
|
98
|
+
*/
|
|
99
|
+
findCertificateByDomain(domainName: string): Promise<CertificateDetail | null>;
|
|
100
|
+
/**
|
|
101
|
+
* Wait for certificate to be issued
|
|
102
|
+
*/
|
|
103
|
+
waitForCertificateValidation(certificateArn: string, maxAttempts?: number, delayMs?: number): Promise<CertificateDetail | null>;
|
|
104
|
+
/**
|
|
105
|
+
* Get DNS validation records for a certificate
|
|
106
|
+
*/
|
|
107
|
+
getDnsValidationRecords(certificateArn: string): Promise<Array<{
|
|
108
|
+
domainName: string;
|
|
109
|
+
recordName: string;
|
|
110
|
+
recordType: string;
|
|
111
|
+
recordValue: string;
|
|
112
|
+
}>>;
|
|
113
|
+
/**
|
|
114
|
+
* Request certificate for a domain with common SANs
|
|
115
|
+
* Automatically includes www and wildcard
|
|
116
|
+
*/
|
|
117
|
+
requestCertificateWithSans(params: {
|
|
118
|
+
DomainName: string;
|
|
119
|
+
IncludeWww?: boolean;
|
|
120
|
+
IncludeWildcard?: boolean;
|
|
121
|
+
AdditionalSans?: string[];
|
|
122
|
+
}): Promise<{
|
|
123
|
+
CertificateArn: string;
|
|
124
|
+
}>;
|
|
125
|
+
/**
|
|
126
|
+
* Check if certificate is valid for a given domain
|
|
127
|
+
*/
|
|
128
|
+
isCertificateValidForDomain(certificateArn: string, domainName: string): Promise<boolean>;
|
|
129
|
+
}
|
|
130
|
+
import type { DnsProviderConfig } from '../dns/types';
|
|
131
|
+
/**
|
|
132
|
+
* Helper class for ACM DNS validation with Route53 integration
|
|
133
|
+
* @deprecated Use UnifiedDnsValidator from 'ts-cloud/dns' for multi-provider support (Route53, Porkbun, GoDaddy)
|
|
134
|
+
*/
|
|
135
|
+
export declare class ACMDnsValidator {
|
|
136
|
+
private acm;
|
|
137
|
+
private route53;
|
|
138
|
+
private dnsProvider?;
|
|
139
|
+
/**
|
|
140
|
+
* Create ACM DNS validator
|
|
141
|
+
* @param region - AWS region for ACM (default: us-east-1)
|
|
142
|
+
* @param dnsProviderConfig - Optional external DNS provider config (Porkbun, GoDaddy)
|
|
143
|
+
*/
|
|
144
|
+
constructor(region?: string, dnsProviderConfig?: DnsProviderConfig);
|
|
145
|
+
/**
|
|
146
|
+
* Request certificate and automatically create DNS validation records
|
|
147
|
+
* @param params.domainName - Primary domain name for the certificate
|
|
148
|
+
* @param params.hostedZoneId - Route53 hosted zone ID (required if no external DNS provider configured)
|
|
149
|
+
* @param params.subjectAlternativeNames - Additional domain names (SANs)
|
|
150
|
+
* @param params.waitForValidation - Wait for certificate to be issued
|
|
151
|
+
* @param params.maxWaitMinutes - Maximum wait time in minutes
|
|
152
|
+
*/
|
|
153
|
+
requestAndValidate(params: {
|
|
154
|
+
domainName: string;
|
|
155
|
+
hostedZoneId?: string;
|
|
156
|
+
subjectAlternativeNames?: string[];
|
|
157
|
+
waitForValidation?: boolean;
|
|
158
|
+
maxWaitMinutes?: number;
|
|
159
|
+
}): Promise<{
|
|
160
|
+
certificateArn: string;
|
|
161
|
+
validationRecords: Array<{
|
|
162
|
+
domainName: string;
|
|
163
|
+
recordName: string;
|
|
164
|
+
recordValue: string;
|
|
165
|
+
}>;
|
|
166
|
+
}>;
|
|
167
|
+
/**
|
|
168
|
+
* Wait for validation options to become available
|
|
169
|
+
*/
|
|
170
|
+
private waitForValidationOptions;
|
|
171
|
+
/**
|
|
172
|
+
* Create validation records for an existing certificate
|
|
173
|
+
* Uses external DNS provider if configured, otherwise Route53
|
|
174
|
+
*/
|
|
175
|
+
createValidationRecords(params: {
|
|
176
|
+
certificateArn: string;
|
|
177
|
+
hostedZoneId?: string;
|
|
178
|
+
domain?: string;
|
|
179
|
+
}): Promise<Array<{
|
|
180
|
+
domainName: string;
|
|
181
|
+
recordName: string;
|
|
182
|
+
recordValue: string;
|
|
183
|
+
changeId?: string;
|
|
184
|
+
}>>;
|
|
185
|
+
/**
|
|
186
|
+
* Delete validation records after certificate is issued
|
|
187
|
+
* Uses external DNS provider if configured, otherwise Route53
|
|
188
|
+
*/
|
|
189
|
+
deleteValidationRecords(params: {
|
|
190
|
+
certificateArn: string;
|
|
191
|
+
hostedZoneId?: string;
|
|
192
|
+
domain?: string;
|
|
193
|
+
}): Promise<void>;
|
|
194
|
+
/**
|
|
195
|
+
* Find or create a certificate for a domain
|
|
196
|
+
* Uses external DNS provider if configured, otherwise Route53
|
|
197
|
+
*/
|
|
198
|
+
findOrCreateCertificate(params: {
|
|
199
|
+
domainName: string;
|
|
200
|
+
hostedZoneId?: string;
|
|
201
|
+
subjectAlternativeNames?: string[];
|
|
202
|
+
waitForValidation?: boolean;
|
|
203
|
+
}): Promise<{
|
|
204
|
+
certificateArn: string;
|
|
205
|
+
isNew: boolean;
|
|
206
|
+
}>;
|
|
207
|
+
/**
|
|
208
|
+
* Check if using external DNS provider
|
|
209
|
+
*/
|
|
210
|
+
hasExternalDnsProvider(): boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Get the DNS provider name if using external provider
|
|
213
|
+
*/
|
|
214
|
+
getDnsProviderName(): string;
|
|
215
|
+
}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AWS Application Auto Scaling Client
|
|
3
|
+
* Supports auto-scaling for ECS services, DynamoDB tables, and other AWS resources
|
|
4
|
+
* Direct API calls without AWS CLI dependency
|
|
5
|
+
*/
|
|
6
|
+
export type ScalableDimension = 'ecs:service:DesiredCount' | 'dynamodb:table:ReadCapacityUnits' | 'dynamodb:table:WriteCapacityUnits' | 'dynamodb:index:ReadCapacityUnits' | 'dynamodb:index:WriteCapacityUnits' | 'rds:cluster:ReadReplicaCount' | 'lambda:function:ProvisionedConcurrency' | 'elasticache:replication-group:NodeGroups' | 'elasticache:replication-group:Replicas';
|
|
7
|
+
export type ServiceNamespace = 'ecs' | 'dynamodb' | 'rds' | 'lambda' | 'elasticache' | 'custom-resource' | 'comprehend' | 'kafka' | 'sagemaker';
|
|
8
|
+
export type MetricType = 'ECSServiceAverageCPUUtilization' | 'ECSServiceAverageMemoryUtilization' | 'ALBRequestCountPerTarget' | 'DynamoDBReadCapacityUtilization' | 'DynamoDBWriteCapacityUtilization' | 'RDSReaderAverageCPUUtilization' | 'RDSReaderAverageDatabaseConnections' | 'EC2SpotFleetRequestAverageCPUUtilization' | 'EC2SpotFleetRequestAverageNetworkIn' | 'EC2SpotFleetRequestAverageNetworkOut' | 'SageMakerVariantInvocationsPerInstance' | 'SageMakerVariantProvisionedConcurrencyUtilization' | 'ElastiCachePrimaryEngineCPUUtilization' | 'ElastiCacheReplicaEngineCPUUtilization' | 'ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage' | 'LambdaProvisionedConcurrencyUtilization' | 'CassandraReadCapacityUtilization' | 'CassandraWriteCapacityUtilization';
|
|
9
|
+
export interface ScalableTarget {
|
|
10
|
+
ServiceNamespace: ServiceNamespace;
|
|
11
|
+
ResourceId: string;
|
|
12
|
+
ScalableDimension: ScalableDimension;
|
|
13
|
+
MinCapacity: number;
|
|
14
|
+
MaxCapacity: number;
|
|
15
|
+
RoleARN?: string;
|
|
16
|
+
CreationTime?: string;
|
|
17
|
+
SuspendedState?: {
|
|
18
|
+
DynamicScalingInSuspended?: boolean;
|
|
19
|
+
DynamicScalingOutSuspended?: boolean;
|
|
20
|
+
ScheduledScalingSuspended?: boolean;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface ScalingPolicy {
|
|
24
|
+
PolicyARN?: string;
|
|
25
|
+
PolicyName: string;
|
|
26
|
+
ServiceNamespace: ServiceNamespace;
|
|
27
|
+
ResourceId: string;
|
|
28
|
+
ScalableDimension: ScalableDimension;
|
|
29
|
+
PolicyType: 'TargetTrackingScaling' | 'StepScaling';
|
|
30
|
+
StepScalingPolicyConfiguration?: StepScalingPolicyConfiguration;
|
|
31
|
+
TargetTrackingScalingPolicyConfiguration?: TargetTrackingScalingPolicyConfiguration;
|
|
32
|
+
Alarms?: Array<{
|
|
33
|
+
AlarmName: string;
|
|
34
|
+
AlarmARN: string;
|
|
35
|
+
}>;
|
|
36
|
+
CreationTime?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface StepScalingPolicyConfiguration {
|
|
39
|
+
AdjustmentType: 'ChangeInCapacity' | 'PercentChangeInCapacity' | 'ExactCapacity';
|
|
40
|
+
StepAdjustments: Array<{
|
|
41
|
+
MetricIntervalLowerBound?: number;
|
|
42
|
+
MetricIntervalUpperBound?: number;
|
|
43
|
+
ScalingAdjustment: number;
|
|
44
|
+
}>;
|
|
45
|
+
MinAdjustmentMagnitude?: number;
|
|
46
|
+
Cooldown?: number;
|
|
47
|
+
MetricAggregationType?: 'Average' | 'Minimum' | 'Maximum';
|
|
48
|
+
}
|
|
49
|
+
export interface TargetTrackingScalingPolicyConfiguration {
|
|
50
|
+
TargetValue: number;
|
|
51
|
+
PredefinedMetricSpecification?: {
|
|
52
|
+
PredefinedMetricType: MetricType;
|
|
53
|
+
ResourceLabel?: string;
|
|
54
|
+
};
|
|
55
|
+
CustomizedMetricSpecification?: {
|
|
56
|
+
MetricName: string;
|
|
57
|
+
Namespace: string;
|
|
58
|
+
Statistic: 'Average' | 'Minimum' | 'Maximum' | 'SampleCount' | 'Sum';
|
|
59
|
+
Unit?: string;
|
|
60
|
+
Dimensions?: Array<{
|
|
61
|
+
Name: string;
|
|
62
|
+
Value: string;
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
ScaleOutCooldown?: number;
|
|
66
|
+
ScaleInCooldown?: number;
|
|
67
|
+
DisableScaleIn?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface ScheduledAction {
|
|
70
|
+
ScheduledActionName: string;
|
|
71
|
+
ScheduledActionARN?: string;
|
|
72
|
+
ServiceNamespace: ServiceNamespace;
|
|
73
|
+
Schedule: string;
|
|
74
|
+
Timezone?: string;
|
|
75
|
+
ResourceId: string;
|
|
76
|
+
ScalableDimension: ScalableDimension;
|
|
77
|
+
StartTime?: string;
|
|
78
|
+
EndTime?: string;
|
|
79
|
+
ScalableTargetAction?: {
|
|
80
|
+
MinCapacity?: number;
|
|
81
|
+
MaxCapacity?: number;
|
|
82
|
+
};
|
|
83
|
+
CreationTime?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Application Auto Scaling client for ECS, DynamoDB, and other services
|
|
87
|
+
*/
|
|
88
|
+
export declare class ApplicationAutoScalingClient {
|
|
89
|
+
private client;
|
|
90
|
+
private region;
|
|
91
|
+
constructor(region?: string);
|
|
92
|
+
/**
|
|
93
|
+
* Register a scalable target
|
|
94
|
+
* This must be done before creating scaling policies
|
|
95
|
+
*/
|
|
96
|
+
registerScalableTarget(options: {
|
|
97
|
+
serviceNamespace: ServiceNamespace;
|
|
98
|
+
resourceId: string;
|
|
99
|
+
scalableDimension: ScalableDimension;
|
|
100
|
+
minCapacity: number;
|
|
101
|
+
maxCapacity: number;
|
|
102
|
+
roleARN?: string;
|
|
103
|
+
suspendedState?: {
|
|
104
|
+
dynamicScalingInSuspended?: boolean;
|
|
105
|
+
dynamicScalingOutSuspended?: boolean;
|
|
106
|
+
scheduledScalingSuspended?: boolean;
|
|
107
|
+
};
|
|
108
|
+
}): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Describe scalable targets
|
|
111
|
+
*/
|
|
112
|
+
describeScalableTargets(options: {
|
|
113
|
+
serviceNamespace: ServiceNamespace;
|
|
114
|
+
resourceIds?: string[];
|
|
115
|
+
scalableDimension?: ScalableDimension;
|
|
116
|
+
maxResults?: number;
|
|
117
|
+
nextToken?: string;
|
|
118
|
+
}): Promise<{
|
|
119
|
+
ScalableTargets: ScalableTarget[];
|
|
120
|
+
NextToken?: string;
|
|
121
|
+
}>;
|
|
122
|
+
/**
|
|
123
|
+
* Deregister a scalable target
|
|
124
|
+
*/
|
|
125
|
+
deregisterScalableTarget(options: {
|
|
126
|
+
serviceNamespace: ServiceNamespace;
|
|
127
|
+
resourceId: string;
|
|
128
|
+
scalableDimension: ScalableDimension;
|
|
129
|
+
}): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Put a scaling policy (create or update)
|
|
132
|
+
*/
|
|
133
|
+
putScalingPolicy(options: {
|
|
134
|
+
policyName: string;
|
|
135
|
+
serviceNamespace: ServiceNamespace;
|
|
136
|
+
resourceId: string;
|
|
137
|
+
scalableDimension: ScalableDimension;
|
|
138
|
+
policyType: 'TargetTrackingScaling' | 'StepScaling';
|
|
139
|
+
targetTrackingScalingPolicyConfiguration?: TargetTrackingScalingPolicyConfiguration;
|
|
140
|
+
stepScalingPolicyConfiguration?: StepScalingPolicyConfiguration;
|
|
141
|
+
}): Promise<{
|
|
142
|
+
PolicyARN: string;
|
|
143
|
+
Alarms: Array<{
|
|
144
|
+
AlarmName: string;
|
|
145
|
+
AlarmARN: string;
|
|
146
|
+
}>;
|
|
147
|
+
}>;
|
|
148
|
+
/**
|
|
149
|
+
* Describe scaling policies
|
|
150
|
+
*/
|
|
151
|
+
describeScalingPolicies(options: {
|
|
152
|
+
serviceNamespace: ServiceNamespace;
|
|
153
|
+
policyNames?: string[];
|
|
154
|
+
resourceId?: string;
|
|
155
|
+
scalableDimension?: ScalableDimension;
|
|
156
|
+
maxResults?: number;
|
|
157
|
+
nextToken?: string;
|
|
158
|
+
}): Promise<{
|
|
159
|
+
ScalingPolicies: ScalingPolicy[];
|
|
160
|
+
NextToken?: string;
|
|
161
|
+
}>;
|
|
162
|
+
/**
|
|
163
|
+
* Delete a scaling policy
|
|
164
|
+
*/
|
|
165
|
+
deleteScalingPolicy(options: {
|
|
166
|
+
policyName: string;
|
|
167
|
+
serviceNamespace: ServiceNamespace;
|
|
168
|
+
resourceId: string;
|
|
169
|
+
scalableDimension: ScalableDimension;
|
|
170
|
+
}): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Put a scheduled action
|
|
173
|
+
*/
|
|
174
|
+
putScheduledAction(options: {
|
|
175
|
+
scheduledActionName: string;
|
|
176
|
+
serviceNamespace: ServiceNamespace;
|
|
177
|
+
resourceId: string;
|
|
178
|
+
scalableDimension: ScalableDimension;
|
|
179
|
+
schedule: string;
|
|
180
|
+
timezone?: string;
|
|
181
|
+
startTime?: Date;
|
|
182
|
+
endTime?: Date;
|
|
183
|
+
scalableTargetAction?: {
|
|
184
|
+
minCapacity?: number;
|
|
185
|
+
maxCapacity?: number;
|
|
186
|
+
};
|
|
187
|
+
}): Promise<void>;
|
|
188
|
+
/**
|
|
189
|
+
* Describe scheduled actions
|
|
190
|
+
*/
|
|
191
|
+
describeScheduledActions(options: {
|
|
192
|
+
serviceNamespace: ServiceNamespace;
|
|
193
|
+
scheduledActionNames?: string[];
|
|
194
|
+
resourceId?: string;
|
|
195
|
+
scalableDimension?: ScalableDimension;
|
|
196
|
+
maxResults?: number;
|
|
197
|
+
nextToken?: string;
|
|
198
|
+
}): Promise<{
|
|
199
|
+
ScheduledActions: ScheduledAction[];
|
|
200
|
+
NextToken?: string;
|
|
201
|
+
}>;
|
|
202
|
+
/**
|
|
203
|
+
* Delete a scheduled action
|
|
204
|
+
*/
|
|
205
|
+
deleteScheduledAction(options: {
|
|
206
|
+
scheduledActionName: string;
|
|
207
|
+
serviceNamespace: ServiceNamespace;
|
|
208
|
+
resourceId: string;
|
|
209
|
+
scalableDimension: ScalableDimension;
|
|
210
|
+
}): Promise<void>;
|
|
211
|
+
/**
|
|
212
|
+
* Describe scaling activities
|
|
213
|
+
*/
|
|
214
|
+
describeScalingActivities(options: {
|
|
215
|
+
serviceNamespace: ServiceNamespace;
|
|
216
|
+
resourceId?: string;
|
|
217
|
+
scalableDimension?: ScalableDimension;
|
|
218
|
+
maxResults?: number;
|
|
219
|
+
nextToken?: string;
|
|
220
|
+
includeNotScaledActivities?: boolean;
|
|
221
|
+
}): Promise<{
|
|
222
|
+
ScalingActivities: Array<{
|
|
223
|
+
ActivityId: string;
|
|
224
|
+
ServiceNamespace: string;
|
|
225
|
+
ResourceId: string;
|
|
226
|
+
ScalableDimension: string;
|
|
227
|
+
Description: string;
|
|
228
|
+
Cause: string;
|
|
229
|
+
StartTime: string;
|
|
230
|
+
EndTime?: string;
|
|
231
|
+
StatusCode: 'Pending' | 'InProgress' | 'Successful' | 'Overridden' | 'Unfulfilled' | 'Failed';
|
|
232
|
+
StatusMessage?: string;
|
|
233
|
+
Details?: string;
|
|
234
|
+
NotScaledReasons?: Array<{
|
|
235
|
+
Code: string;
|
|
236
|
+
MaxCapacity?: number;
|
|
237
|
+
MinCapacity?: number;
|
|
238
|
+
CurrentCapacity?: number;
|
|
239
|
+
}>;
|
|
240
|
+
}>;
|
|
241
|
+
NextToken?: string;
|
|
242
|
+
}>;
|
|
243
|
+
/**
|
|
244
|
+
* Helper: Get the resource ID format for an ECS service
|
|
245
|
+
*/
|
|
246
|
+
getECSServiceResourceId(clusterName: string, serviceName: string): string;
|
|
247
|
+
/**
|
|
248
|
+
* Helper: Register an ECS service for auto-scaling
|
|
249
|
+
*/
|
|
250
|
+
registerECSServiceScaling(options: {
|
|
251
|
+
clusterName: string;
|
|
252
|
+
serviceName: string;
|
|
253
|
+
minCapacity: number;
|
|
254
|
+
maxCapacity: number;
|
|
255
|
+
}): Promise<void>;
|
|
256
|
+
/**
|
|
257
|
+
* Helper: Create a CPU-based scaling policy for an ECS service
|
|
258
|
+
*/
|
|
259
|
+
createECSCPUScalingPolicy(options: {
|
|
260
|
+
clusterName: string;
|
|
261
|
+
serviceName: string;
|
|
262
|
+
policyName: string;
|
|
263
|
+
targetCPUPercent: number;
|
|
264
|
+
scaleOutCooldown?: number;
|
|
265
|
+
scaleInCooldown?: number;
|
|
266
|
+
disableScaleIn?: boolean;
|
|
267
|
+
}): Promise<{
|
|
268
|
+
PolicyARN: string;
|
|
269
|
+
Alarms: Array<{
|
|
270
|
+
AlarmName: string;
|
|
271
|
+
AlarmARN: string;
|
|
272
|
+
}>;
|
|
273
|
+
}>;
|
|
274
|
+
/**
|
|
275
|
+
* Helper: Create a memory-based scaling policy for an ECS service
|
|
276
|
+
*/
|
|
277
|
+
createECSMemoryScalingPolicy(options: {
|
|
278
|
+
clusterName: string;
|
|
279
|
+
serviceName: string;
|
|
280
|
+
policyName: string;
|
|
281
|
+
targetMemoryPercent: number;
|
|
282
|
+
scaleOutCooldown?: number;
|
|
283
|
+
scaleInCooldown?: number;
|
|
284
|
+
disableScaleIn?: boolean;
|
|
285
|
+
}): Promise<{
|
|
286
|
+
PolicyARN: string;
|
|
287
|
+
Alarms: Array<{
|
|
288
|
+
AlarmName: string;
|
|
289
|
+
AlarmARN: string;
|
|
290
|
+
}>;
|
|
291
|
+
}>;
|
|
292
|
+
/**
|
|
293
|
+
* Helper: Create an ALB request count scaling policy for an ECS service
|
|
294
|
+
*/
|
|
295
|
+
createECSRequestCountScalingPolicy(options: {
|
|
296
|
+
clusterName: string;
|
|
297
|
+
serviceName: string;
|
|
298
|
+
policyName: string;
|
|
299
|
+
targetRequestsPerTarget: number;
|
|
300
|
+
targetGroupArn: string;
|
|
301
|
+
loadBalancerArn: string;
|
|
302
|
+
scaleOutCooldown?: number;
|
|
303
|
+
scaleInCooldown?: number;
|
|
304
|
+
disableScaleIn?: boolean;
|
|
305
|
+
}): Promise<{
|
|
306
|
+
PolicyARN: string;
|
|
307
|
+
Alarms: Array<{
|
|
308
|
+
AlarmName: string;
|
|
309
|
+
AlarmARN: string;
|
|
310
|
+
}>;
|
|
311
|
+
}>;
|
|
312
|
+
/**
|
|
313
|
+
* Helper: Get all scaling policies for an ECS service
|
|
314
|
+
*/
|
|
315
|
+
getECSServiceScalingPolicies(clusterName: string, serviceName: string): Promise<ScalingPolicy[]>;
|
|
316
|
+
/**
|
|
317
|
+
* Helper: Remove all auto-scaling from an ECS service
|
|
318
|
+
*/
|
|
319
|
+
removeECSServiceScaling(clusterName: string, serviceName: string): Promise<void>;
|
|
320
|
+
/**
|
|
321
|
+
* Helper: Create a scheduled scaling action for an ECS service
|
|
322
|
+
* Example schedule: "cron(0 9 * * ? *)" for 9 AM daily
|
|
323
|
+
*/
|
|
324
|
+
createECSScheduledScaling(options: {
|
|
325
|
+
clusterName: string;
|
|
326
|
+
serviceName: string;
|
|
327
|
+
actionName: string;
|
|
328
|
+
schedule: string;
|
|
329
|
+
timezone?: string;
|
|
330
|
+
minCapacity?: number;
|
|
331
|
+
maxCapacity?: number;
|
|
332
|
+
}): Promise<void>;
|
|
333
|
+
/**
|
|
334
|
+
* Helper: Get scaling activity history for an ECS service
|
|
335
|
+
*/
|
|
336
|
+
getECSScalingActivities(clusterName: string, serviceName: string, maxResults?: number): Promise<Array<{
|
|
337
|
+
ActivityId: string;
|
|
338
|
+
Description: string;
|
|
339
|
+
Cause: string;
|
|
340
|
+
StartTime: string;
|
|
341
|
+
EndTime?: string;
|
|
342
|
+
StatusCode: string;
|
|
343
|
+
StatusMessage?: string;
|
|
344
|
+
}>>;
|
|
345
|
+
}
|