@stacksjs/ts-cloud 0.1.2 → 0.1.5

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.
Files changed (187) hide show
  1. package/README.md +98 -13
  2. package/dist/aws/acm.d.ts +129 -0
  3. package/dist/aws/application-autoscaling.d.ts +282 -0
  4. package/dist/aws/bedrock.d.ts +2292 -0
  5. package/dist/aws/client.d.ts +79 -0
  6. package/dist/aws/cloudformation.d.ts +105 -0
  7. package/dist/aws/cloudfront.d.ts +265 -0
  8. package/dist/aws/cloudwatch-logs.d.ts +48 -0
  9. package/dist/aws/comprehend.d.ts +505 -0
  10. package/dist/aws/connect.d.ts +377 -0
  11. package/dist/aws/deploy-imap.d.ts +14 -0
  12. package/dist/aws/dynamodb.d.ts +176 -0
  13. package/dist/aws/ec2.d.ts +272 -0
  14. package/dist/aws/ecr.d.ts +149 -0
  15. package/dist/aws/ecs.d.ts +162 -0
  16. package/dist/aws/elasticache.d.ts +71 -0
  17. package/dist/aws/elbv2.d.ts +248 -0
  18. package/dist/aws/email.d.ts +175 -0
  19. package/dist/aws/eventbridge.d.ts +142 -0
  20. package/dist/aws/iam.d.ts +638 -0
  21. package/dist/aws/imap-server.d.ts +119 -0
  22. package/{src/aws/index.ts → dist/aws/index.d.ts} +62 -83
  23. package/{src/aws/kendra.ts → dist/aws/kendra.d.ts} +71 -386
  24. package/dist/aws/lambda.d.ts +232 -0
  25. package/dist/aws/opensearch.d.ts +87 -0
  26. package/dist/aws/personalize.d.ts +516 -0
  27. package/dist/aws/polly.d.ts +214 -0
  28. package/dist/aws/rds.d.ts +240 -0
  29. package/dist/aws/rekognition.d.ts +543 -0
  30. package/dist/aws/route53-domains.d.ts +113 -0
  31. package/dist/aws/route53.d.ts +215 -0
  32. package/dist/aws/s3.d.ts +212 -0
  33. package/dist/aws/scheduler.d.ts +140 -0
  34. package/dist/aws/secrets-manager.d.ts +170 -0
  35. package/dist/aws/ses.d.ts +288 -0
  36. package/dist/aws/setup-phone.d.ts +0 -0
  37. package/dist/aws/setup-sms.d.ts +115 -0
  38. package/dist/aws/sms.d.ts +304 -0
  39. package/dist/aws/smtp-server.d.ts +61 -0
  40. package/dist/aws/sns.d.ts +117 -0
  41. package/dist/aws/sqs.d.ts +65 -0
  42. package/dist/aws/ssm.d.ts +179 -0
  43. package/dist/aws/sts.d.ts +15 -0
  44. package/dist/aws/support.d.ts +104 -0
  45. package/dist/aws/test-imap.d.ts +0 -0
  46. package/dist/aws/textract.d.ts +403 -0
  47. package/dist/aws/transcribe.d.ts +60 -0
  48. package/dist/aws/translate.d.ts +358 -0
  49. package/dist/aws/voice.d.ts +219 -0
  50. package/dist/bin/cli.js +1724 -0
  51. package/dist/config.d.ts +7 -0
  52. package/dist/deploy/index.d.ts +2 -0
  53. package/dist/deploy/static-site-external-dns.d.ts +51 -0
  54. package/dist/deploy/static-site.d.ts +71 -0
  55. package/dist/dns/cloudflare.d.ts +52 -0
  56. package/dist/dns/godaddy.d.ts +38 -0
  57. package/dist/dns/index.d.ts +45 -0
  58. package/dist/dns/porkbun.d.ts +18 -0
  59. package/dist/dns/route53-adapter.d.ts +38 -0
  60. package/{src/dns/types.ts → dist/dns/types.d.ts} +26 -63
  61. package/dist/dns/validator.d.ts +78 -0
  62. package/dist/generators/index.d.ts +1 -0
  63. package/dist/generators/infrastructure.d.ts +30 -0
  64. package/{src/index.ts → dist/index.d.ts} +70 -93
  65. package/dist/index.js +7881 -0
  66. package/dist/push/apns.d.ts +60 -0
  67. package/dist/push/fcm.d.ts +117 -0
  68. package/dist/push/index.d.ts +14 -0
  69. package/dist/security/pre-deploy-scanner.d.ts +69 -0
  70. package/dist/ssl/acme-client.d.ts +67 -0
  71. package/dist/ssl/index.d.ts +2 -0
  72. package/dist/ssl/letsencrypt.d.ts +48 -0
  73. package/dist/types.d.ts +1 -0
  74. package/dist/utils/cli.d.ts +123 -0
  75. package/dist/validation/index.d.ts +1 -0
  76. package/dist/validation/template.d.ts +23 -0
  77. package/package.json +8 -8
  78. package/bin/cli.ts +0 -133
  79. package/bin/commands/analytics.ts +0 -328
  80. package/bin/commands/api.ts +0 -379
  81. package/bin/commands/assets.ts +0 -221
  82. package/bin/commands/audit.ts +0 -501
  83. package/bin/commands/backup.ts +0 -682
  84. package/bin/commands/cache.ts +0 -294
  85. package/bin/commands/cdn.ts +0 -281
  86. package/bin/commands/config.ts +0 -202
  87. package/bin/commands/container.ts +0 -105
  88. package/bin/commands/cost.ts +0 -208
  89. package/bin/commands/database.ts +0 -401
  90. package/bin/commands/deploy.ts +0 -674
  91. package/bin/commands/domain.ts +0 -397
  92. package/bin/commands/email.ts +0 -423
  93. package/bin/commands/environment.ts +0 -285
  94. package/bin/commands/events.ts +0 -424
  95. package/bin/commands/firewall.ts +0 -145
  96. package/bin/commands/function.ts +0 -116
  97. package/bin/commands/generate.ts +0 -280
  98. package/bin/commands/git.ts +0 -139
  99. package/bin/commands/iam.ts +0 -464
  100. package/bin/commands/index.ts +0 -48
  101. package/bin/commands/init.ts +0 -120
  102. package/bin/commands/logs.ts +0 -148
  103. package/bin/commands/network.ts +0 -579
  104. package/bin/commands/notify.ts +0 -489
  105. package/bin/commands/queue.ts +0 -407
  106. package/bin/commands/scheduler.ts +0 -370
  107. package/bin/commands/secrets.ts +0 -54
  108. package/bin/commands/server.ts +0 -629
  109. package/bin/commands/shared.ts +0 -97
  110. package/bin/commands/ssl.ts +0 -138
  111. package/bin/commands/stack.ts +0 -325
  112. package/bin/commands/status.ts +0 -385
  113. package/bin/commands/storage.ts +0 -450
  114. package/bin/commands/team.ts +0 -96
  115. package/bin/commands/tunnel.ts +0 -489
  116. package/bin/commands/utils.ts +0 -202
  117. package/build.ts +0 -15
  118. package/cloud +0 -2
  119. package/src/aws/acm.ts +0 -768
  120. package/src/aws/application-autoscaling.ts +0 -845
  121. package/src/aws/bedrock.ts +0 -4074
  122. package/src/aws/client.ts +0 -878
  123. package/src/aws/cloudformation.ts +0 -896
  124. package/src/aws/cloudfront.ts +0 -1531
  125. package/src/aws/cloudwatch-logs.ts +0 -154
  126. package/src/aws/comprehend.ts +0 -839
  127. package/src/aws/connect.ts +0 -1056
  128. package/src/aws/deploy-imap.ts +0 -384
  129. package/src/aws/dynamodb.ts +0 -340
  130. package/src/aws/ec2.ts +0 -1385
  131. package/src/aws/ecr.ts +0 -621
  132. package/src/aws/ecs.ts +0 -615
  133. package/src/aws/elasticache.ts +0 -301
  134. package/src/aws/elbv2.ts +0 -942
  135. package/src/aws/email.ts +0 -928
  136. package/src/aws/eventbridge.ts +0 -248
  137. package/src/aws/iam.ts +0 -1689
  138. package/src/aws/imap-server.ts +0 -2100
  139. package/src/aws/lambda.ts +0 -786
  140. package/src/aws/opensearch.ts +0 -158
  141. package/src/aws/personalize.ts +0 -977
  142. package/src/aws/polly.ts +0 -559
  143. package/src/aws/rds.ts +0 -888
  144. package/src/aws/rekognition.ts +0 -846
  145. package/src/aws/route53-domains.ts +0 -359
  146. package/src/aws/route53.ts +0 -1046
  147. package/src/aws/s3.ts +0 -2318
  148. package/src/aws/scheduler.ts +0 -571
  149. package/src/aws/secrets-manager.ts +0 -769
  150. package/src/aws/ses.ts +0 -1081
  151. package/src/aws/setup-phone.ts +0 -104
  152. package/src/aws/setup-sms.ts +0 -580
  153. package/src/aws/sms.ts +0 -1735
  154. package/src/aws/smtp-server.ts +0 -531
  155. package/src/aws/sns.ts +0 -758
  156. package/src/aws/sqs.ts +0 -382
  157. package/src/aws/ssm.ts +0 -807
  158. package/src/aws/sts.ts +0 -92
  159. package/src/aws/support.ts +0 -391
  160. package/src/aws/test-imap.ts +0 -86
  161. package/src/aws/textract.ts +0 -780
  162. package/src/aws/transcribe.ts +0 -108
  163. package/src/aws/translate.ts +0 -641
  164. package/src/aws/voice.ts +0 -1379
  165. package/src/config.ts +0 -35
  166. package/src/deploy/index.ts +0 -7
  167. package/src/deploy/static-site-external-dns.ts +0 -906
  168. package/src/deploy/static-site.ts +0 -1125
  169. package/src/dns/godaddy.ts +0 -412
  170. package/src/dns/index.ts +0 -183
  171. package/src/dns/porkbun.ts +0 -362
  172. package/src/dns/route53-adapter.ts +0 -414
  173. package/src/dns/validator.ts +0 -369
  174. package/src/generators/index.ts +0 -5
  175. package/src/generators/infrastructure.ts +0 -1660
  176. package/src/push/apns.ts +0 -452
  177. package/src/push/fcm.ts +0 -506
  178. package/src/push/index.ts +0 -58
  179. package/src/ssl/acme-client.ts +0 -478
  180. package/src/ssl/index.ts +0 -7
  181. package/src/ssl/letsencrypt.ts +0 -747
  182. package/src/types.ts +0 -2
  183. package/src/utils/cli.ts +0 -398
  184. package/src/validation/index.ts +0 -5
  185. package/src/validation/template.ts +0 -405
  186. package/test/index.test.ts +0 -128
  187. package/tsconfig.json +0 -18
package/README.md CHANGED
@@ -6,13 +6,13 @@
6
6
  <!-- [![npm downloads][npm-downloads-src]][npm-downloads-href] -->
7
7
  <!-- [![Codecov][codecov-src]][codecov-href] -->
8
8
 
9
- # ts-cloud
9
+ # @stacksjs/ts-cloud
10
10
 
11
11
  > Zero-dependency AWS infrastructure as TypeScript. Deploy production-ready cloud infrastructure without AWS SDK or CLI.
12
12
 
13
13
  ## Overview
14
14
 
15
- ts-cloud is a modern infrastructure-as-code framework that lets you define AWS infrastructure using TypeScript configuration files. Unlike AWS CDK or Terraform, ts-cloud:
15
+ @stacksjs/ts-cloud is a modern infrastructure-as-code framework that lets you define AWS infrastructure using TypeScript configuration files. Unlike AWS CDK or Terraform, @stacksjs/ts-cloud:
16
16
 
17
17
  - **Zero AWS Dependencies** - No AWS SDK, no AWS CLI. Direct AWS API calls only.
18
18
  - **Type-Safe Configuration** - Full TypeScript types for all AWS resources
@@ -55,6 +55,23 @@ Complete CloudFormation template builders for:
55
55
  - **Monitoring** - CloudWatch dashboards, alarms, and log groups
56
56
  - **Security** - ACM certificates, WAF rules, security groups
57
57
 
58
+ ### 🔒 Pre-Deployment Security Scanning
59
+
60
+ Built-in secret detection to prevent accidental credential exposure:
61
+
62
+ - **35+ Secret Patterns** - AWS keys, API tokens, private keys, database credentials
63
+ - **Automatic Scanning** - Runs before every deployment
64
+ - **Configurable Severity** - Block on critical, high, medium, or low findings
65
+ - **CI/CD Ready** - Integrate security checks into your pipeline
66
+
67
+ ```bash
68
+ # Scan for secrets before deploying
69
+ cloud deploy:security-scan --source ./dist
70
+
71
+ # Deploy with automatic security scanning
72
+ cloud deploy # Scans automatically before deployment
73
+ ```
74
+
58
75
  ### ☁️ Direct AWS Integration
59
76
 
60
77
  No SDK, no CLI - pure AWS Signature V4 API calls:
@@ -69,7 +86,7 @@ No SDK, no CLI - pure AWS Signature V4 API calls:
69
86
  ### Installation
70
87
 
71
88
  ```bash
72
- bun add ts-cloud
89
+ bun add @stacksjs/ts-cloud
73
90
  ```
74
91
 
75
92
  ### Your First Deployment
@@ -77,7 +94,7 @@ bun add ts-cloud
77
94
  Create a `cloud.config.ts`:
78
95
 
79
96
  ```typescript
80
- import { createStaticSitePreset } from 'ts-cloud/presets'
97
+ import { createStaticSitePreset } from '@stacksjs/ts-cloud/presets'
81
98
 
82
99
  export default createStaticSitePreset({
83
100
  name: 'My Website',
@@ -104,7 +121,7 @@ That's it! You now have:
104
121
  #### Full-Stack Application
105
122
 
106
123
  ```typescript
107
- import { createFullStackAppPreset } from 'ts-cloud/presets'
124
+ import { createFullStackAppPreset } from '@stacksjs/ts-cloud/presets'
108
125
 
109
126
  export default createFullStackAppPreset({
110
127
  name: 'My App',
@@ -125,7 +142,7 @@ Includes:
125
142
  #### Serverless API
126
143
 
127
144
  ```typescript
128
- import { createApiBackendPreset } from 'ts-cloud/presets'
145
+ import { createApiBackendPreset } from '@stacksjs/ts-cloud/presets'
129
146
 
130
147
  export default createApiBackendPreset({
131
148
  name: 'My API',
@@ -148,7 +165,7 @@ Includes:
148
165
  You can extend any preset with custom configuration:
149
166
 
150
167
  ```typescript
151
- import { createNodeJsServerPreset, extendPreset } from 'ts-cloud/presets'
168
+ import { createNodeJsServerPreset, extendPreset } from '@stacksjs/ts-cloud/presets'
152
169
 
153
170
  export default extendPreset(
154
171
  createNodeJsServerPreset({
@@ -175,7 +192,7 @@ export default extendPreset(
175
192
  Combine multiple presets:
176
193
 
177
194
  ```typescript
178
- import { composePresets, createStaticSitePreset, createApiBackendPreset } from 'ts-cloud/presets'
195
+ import { composePresets, createStaticSitePreset, createApiBackendPreset } from '@stacksjs/ts-cloud/presets'
179
196
 
180
197
  export default composePresets(
181
198
  createStaticSitePreset({ name: 'Frontend', slug: 'frontend', domain: 'example.com' }),
@@ -198,7 +215,7 @@ export default composePresets(
198
215
  Generate templates programmatically:
199
216
 
200
217
  ```typescript
201
- import { CloudFormationBuilder } from 'ts-cloud/cloudformation'
218
+ import { CloudFormationBuilder } from '@stacksjs/ts-cloud/cloudformation'
202
219
 
203
220
  const builder = new CloudFormationBuilder(config)
204
221
  const template = builder.build()
@@ -211,7 +228,7 @@ console.log(JSON.stringify(template, null, 2))
211
228
  Use the AWS clients directly:
212
229
 
213
230
  ```typescript
214
- import { CloudFormationClient, S3Client, CloudFrontClient } from 'ts-cloud/aws'
231
+ import { CloudFormationClient, S3Client, CloudFrontClient } from '@stacksjs/ts-cloud/aws'
215
232
 
216
233
  // CloudFormation
217
234
  const cfn = new CloudFormationClient('us-east-1')
@@ -236,6 +253,74 @@ await cloudfront.createInvalidation({
236
253
  })
237
254
  ```
238
255
 
256
+ ## DNS Providers
257
+
258
+ @stacksjs/ts-cloud supports multiple DNS providers for domain management and SSL certificate validation:
259
+
260
+ ### Cloudflare
261
+
262
+ 1. Log in to your [Cloudflare Dashboard](https://dash.cloudflare.com/)
263
+ 2. Go to **My Profile** → **API Tokens** (or visit https://dash.cloudflare.com/profile/api-tokens)
264
+ 3. Click **Create Token**
265
+ 4. Use the **Edit zone DNS** template, or create a custom token with:
266
+ - **Permissions**: Zone → DNS → Edit
267
+ - **Zone Resources**: Include → All zones (or specific zones)
268
+ 5. Copy the generated token
269
+
270
+ ```bash
271
+ export CLOUDFLARE_API_TOKEN="your-api-token-here"
272
+ ```
273
+
274
+ ### Porkbun
275
+
276
+ 1. Log in to your [Porkbun Dashboard](https://porkbun.com/account/api)
277
+ 2. Enable API access for your domain(s)
278
+ 3. Generate an API key pair
279
+
280
+ ```bash
281
+ export PORKBUN_API_KEY="your-api-key"
282
+ export PORKBUN_SECRET_KEY="your-secret-key"
283
+ ```
284
+
285
+ ### GoDaddy
286
+
287
+ 1. Log in to [GoDaddy Developer Portal](https://developer.godaddy.com/)
288
+ 2. Create a new API key
289
+ 3. Note both the key and secret
290
+
291
+ ```bash
292
+ export GODADDY_API_KEY="your-api-key"
293
+ export GODADDY_API_SECRET="your-api-secret"
294
+ export GODADDY_ENVIRONMENT="production" # or "ote" for testing
295
+ ```
296
+
297
+ ### Route53
298
+
299
+ Uses AWS credentials from environment or ~/.aws/credentials:
300
+
301
+ ```bash
302
+ export AWS_ACCESS_KEY_ID="your-access-key"
303
+ export AWS_SECRET_ACCESS_KEY="your-secret-key"
304
+ export AWS_REGION="us-east-1"
305
+ export AWS_HOSTED_ZONE_ID="Z1234567890" # Optional
306
+ ```
307
+
308
+ ### CLI Usage
309
+
310
+ ```bash
311
+ # List domains
312
+ cloud domain:list --provider cloudflare
313
+
314
+ # List DNS records
315
+ cloud dns:records example.com --provider cloudflare
316
+
317
+ # Add a DNS record
318
+ cloud dns:add example.com A 192.168.1.1 --name api --provider cloudflare
319
+
320
+ # Generate SSL certificate with DNS validation
321
+ cloud domain:ssl example.com --provider cloudflare
322
+ ```
323
+
239
324
  ## Development
240
325
 
241
326
  ```bash
@@ -264,7 +349,7 @@ bun run typecheck
264
349
 
265
350
  ### No Dependencies
266
351
 
267
- ts-cloud uses **zero external dependencies** for AWS operations:
352
+ @stacksjs/ts-cloud uses **zero external dependencies** for AWS operations:
268
353
 
269
354
  - **AWS Signature V4** - Manual request signing for authentication
270
355
  - **Direct HTTPS** - Native `fetch()` for API calls
@@ -312,8 +397,8 @@ The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.
312
397
  Made with 💙
313
398
 
314
399
  <!-- Badges -->
315
- [npm-version-src]: https://img.shields.io/npm/v/ts-cloud?style=flat-square
316
- [npm-version-href]: https://npmjs.com/package/ts-cloud
400
+ [npm-version-src]: https://img.shields.io/npm/v/@stacksjs/ts-cloud?style=flat-square
401
+ [npm-version-href]: https://npmjs.com/package/@stacksjs/ts-cloud
317
402
  [github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/ts-cloud/ci.yml?style=flat-square&branch=main
318
403
  [github-actions-href]: https://github.com/stacksjs/ts-cloud/actions?query=workflow%3Aci
319
404
 
@@ -0,0 +1,129 @@
1
+ import { AWSClient } from './client';
2
+ import { Route53Client } from './route53';
3
+ import type { DnsProvider, DnsProviderConfig } from '../dns/types';
4
+ export declare interface CertificateDetail {
5
+ CertificateArn: string
6
+ DomainName: string
7
+ SubjectAlternativeNames?: string[]
8
+ Status: 'PENDING_VALIDATION' | 'ISSUED' | 'INACTIVE' | 'EXPIRED' | 'VALIDATION_TIMED_OUT' | 'REVOKED' | 'FAILED'
9
+ Type?: 'IMPORTED' | 'AMAZON_ISSUED' | 'PRIVATE'
10
+ DomainValidationOptions?: {
11
+ DomainName: string
12
+ ValidationDomain?: string
13
+ ValidationStatus?: 'PENDING_VALIDATION' | 'SUCCESS' | 'FAILED'
14
+ ResourceRecord?: {
15
+ Name: string
16
+ Type: string
17
+ Value: string
18
+ }
19
+ ValidationMethod?: 'EMAIL' | 'DNS'
20
+ }[]
21
+ CreatedAt?: string
22
+ IssuedAt?: string
23
+ NotBefore?: string
24
+ NotAfter?: string
25
+ }
26
+ export declare class ACMClient {
27
+ private client: AWSClient;
28
+ private region: string;
29
+ constructor(region?: string);
30
+ requestCertificate(params: {
31
+ DomainName: string
32
+ SubjectAlternativeNames?: string[]
33
+ ValidationMethod?: 'EMAIL' | 'DNS'
34
+ }): Promise<{
35
+ CertificateArn: string
36
+ }>;
37
+ describeCertificate(params: {
38
+ CertificateArn: string
39
+ }): Promise<CertificateDetail>;
40
+ listCertificates(params?: {
41
+ CertificateStatuses?: ('PENDING_VALIDATION' | 'ISSUED' | 'INACTIVE' | 'EXPIRED' | 'VALIDATION_TIMED_OUT' | 'REVOKED' | 'FAILED')[]
42
+ MaxItems?: number
43
+ NextToken?: string
44
+ }): Promise<{
45
+ CertificateSummaryList: { CertificateArn: string, DomainName: string }[]
46
+ NextToken?: string
47
+ }>;
48
+ deleteCertificate(params: {
49
+ CertificateArn: string
50
+ }): Promise<void>;
51
+ listTagsForCertificate(params: {
52
+ CertificateArn: string
53
+ }): Promise<{ Tags: Array<{ Key: string, Value?: string }> }>;
54
+ addTagsToCertificate(params: {
55
+ CertificateArn: string
56
+ Tags: Array<{ Key: string, Value?: string }>
57
+ }): Promise<void>;
58
+ resendValidationEmail(params: {
59
+ CertificateArn: string
60
+ Domain: string
61
+ ValidationDomain: string
62
+ }): Promise<void>;
63
+ findCertificateByDomain(domainName: string): Promise<CertificateDetail | null>;
64
+ waitForCertificateValidation(certificateArn: string, maxAttempts?: any, delayMs?: any): Promise<CertificateDetail | null>;
65
+ getDnsValidationRecords(certificateArn: string): Promise<Array<{
66
+ domainName: string
67
+ recordName: string
68
+ recordType: string
69
+ recordValue: string
70
+ }>>;
71
+ requestCertificateWithSans(params: {
72
+ DomainName: string
73
+ IncludeWww?: boolean
74
+ IncludeWildcard?: boolean
75
+ AdditionalSans?: string[]
76
+ }): Promise<{ CertificateArn: string }>;
77
+ isCertificateValidForDomain(certificateArn: string, domainName: string): Promise<boolean>;
78
+ }
79
+ /**
80
+ * Helper class for ACM DNS validation with Route53 integration
81
+ * @deprecated Use UnifiedDnsValidator from 'ts-cloud/dns' for multi-provider support (Route53, Porkbun, GoDaddy)
82
+ */
83
+ export declare class ACMDnsValidator {
84
+ private acm: ACMClient;
85
+ private route53: Route53Client;
86
+ private dnsProvider?: DnsProvider;
87
+ constructor(region?: string, dnsProviderConfig?: DnsProviderConfig);
88
+ requestAndValidate(params: {
89
+ domainName: string
90
+ hostedZoneId?: string
91
+ subjectAlternativeNames?: string[]
92
+ waitForValidation?: boolean
93
+ maxWaitMinutes?: number
94
+ }): Promise<{
95
+ certificateArn: string
96
+ validationRecords: Array<{
97
+ domainName: string
98
+ recordName: string
99
+ recordValue: string
100
+ }>
101
+ }>;
102
+ private waitForValidationOptions(certificateArn: string, maxAttempts?: any): Promise<void>;
103
+ createValidationRecords(params: {
104
+ certificateArn: string
105
+ hostedZoneId?: string
106
+ domain?: string
107
+ }): Promise<Array<{
108
+ domainName: string
109
+ recordName: string
110
+ recordValue: string
111
+ changeId?: string
112
+ }>>;
113
+ deleteValidationRecords(params: {
114
+ certificateArn: string
115
+ hostedZoneId?: string
116
+ domain?: string
117
+ }): Promise<void>;
118
+ findOrCreateCertificate(params: {
119
+ domainName: string
120
+ hostedZoneId?: string
121
+ subjectAlternativeNames?: string[]
122
+ waitForValidation?: boolean
123
+ }): Promise<{
124
+ certificateArn: string
125
+ isNew: boolean
126
+ }>;
127
+ hasExternalDnsProvider(): boolean;
128
+ getDnsProviderName(): string;
129
+ }
@@ -0,0 +1,282 @@
1
+ import { AWSClient } from './client';
2
+ export declare interface ScalableTarget {
3
+ ServiceNamespace: ServiceNamespace
4
+ ResourceId: string
5
+ ScalableDimension: ScalableDimension
6
+ MinCapacity: number
7
+ MaxCapacity: number
8
+ RoleARN?: string
9
+ CreationTime?: string
10
+ SuspendedState?: {
11
+ DynamicScalingInSuspended?: boolean
12
+ DynamicScalingOutSuspended?: boolean
13
+ ScheduledScalingSuspended?: boolean
14
+ }
15
+ }
16
+ export declare interface ScalingPolicy {
17
+ PolicyARN?: string
18
+ PolicyName: string
19
+ ServiceNamespace: ServiceNamespace
20
+ ResourceId: string
21
+ ScalableDimension: ScalableDimension
22
+ PolicyType: 'TargetTrackingScaling' | 'StepScaling'
23
+ StepScalingPolicyConfiguration?: StepScalingPolicyConfiguration
24
+ TargetTrackingScalingPolicyConfiguration?: TargetTrackingScalingPolicyConfiguration
25
+ Alarms?: Array<{
26
+ AlarmName: string
27
+ AlarmARN: string
28
+ }>
29
+ CreationTime?: string
30
+ }
31
+ export declare interface StepScalingPolicyConfiguration {
32
+ AdjustmentType: 'ChangeInCapacity' | 'PercentChangeInCapacity' | 'ExactCapacity'
33
+ StepAdjustments: Array<{
34
+ MetricIntervalLowerBound?: number
35
+ MetricIntervalUpperBound?: number
36
+ ScalingAdjustment: number
37
+ }>
38
+ MinAdjustmentMagnitude?: number
39
+ Cooldown?: number
40
+ MetricAggregationType?: 'Average' | 'Minimum' | 'Maximum'
41
+ }
42
+ export declare interface TargetTrackingScalingPolicyConfiguration {
43
+ TargetValue: number
44
+ PredefinedMetricSpecification?: {
45
+ PredefinedMetricType: MetricType
46
+ ResourceLabel?: string
47
+ }
48
+ CustomizedMetricSpecification?: {
49
+ MetricName: string
50
+ Namespace: string
51
+ Statistic: 'Average' | 'Minimum' | 'Maximum' | 'SampleCount' | 'Sum'
52
+ Unit?: string
53
+ Dimensions?: Array<{
54
+ Name: string
55
+ Value: string
56
+ }>
57
+ }
58
+ ScaleOutCooldown?: number
59
+ ScaleInCooldown?: number
60
+ DisableScaleIn?: boolean
61
+ }
62
+ export declare interface ScheduledAction {
63
+ ScheduledActionName: string
64
+ ScheduledActionARN?: string
65
+ ServiceNamespace: ServiceNamespace
66
+ Schedule: string
67
+ Timezone?: string
68
+ ResourceId: string
69
+ ScalableDimension: ScalableDimension
70
+ StartTime?: string
71
+ EndTime?: string
72
+ ScalableTargetAction?: {
73
+ MinCapacity?: number
74
+ MaxCapacity?: number
75
+ }
76
+ CreationTime?: string
77
+ }
78
+ export type ScalableDimension = | 'ecs:service:DesiredCount'
79
+ | 'dynamodb:table:ReadCapacityUnits'
80
+ | 'dynamodb:table:WriteCapacityUnits'
81
+ | 'dynamodb:index:ReadCapacityUnits'
82
+ | 'dynamodb:index:WriteCapacityUnits'
83
+ | 'rds:cluster:ReadReplicaCount'
84
+ | 'lambda:function:ProvisionedConcurrency'
85
+ | 'elasticache:replication-group:NodeGroups'
86
+ | 'elasticache:replication-group:Replicas'
87
+ export type ServiceNamespace = | 'ecs'
88
+ | 'dynamodb'
89
+ | 'rds'
90
+ | 'lambda'
91
+ | 'elasticache'
92
+ | 'custom-resource'
93
+ | 'comprehend'
94
+ | 'kafka'
95
+ | 'sagemaker'
96
+ export type MetricType = | 'ECSServiceAverageCPUUtilization'
97
+ | 'ECSServiceAverageMemoryUtilization'
98
+ | 'ALBRequestCountPerTarget'
99
+ | 'DynamoDBReadCapacityUtilization'
100
+ | 'DynamoDBWriteCapacityUtilization'
101
+ | 'RDSReaderAverageCPUUtilization'
102
+ | 'RDSReaderAverageDatabaseConnections'
103
+ | 'EC2SpotFleetRequestAverageCPUUtilization'
104
+ | 'EC2SpotFleetRequestAverageNetworkIn'
105
+ | 'EC2SpotFleetRequestAverageNetworkOut'
106
+ | 'SageMakerVariantInvocationsPerInstance'
107
+ | 'SageMakerVariantProvisionedConcurrencyUtilization'
108
+ | 'ElastiCachePrimaryEngineCPUUtilization'
109
+ | 'ElastiCacheReplicaEngineCPUUtilization'
110
+ | 'ElastiCacheDatabaseMemoryUsageCountedForEvictPercentage'
111
+ | 'LambdaProvisionedConcurrencyUtilization'
112
+ | 'CassandraReadCapacityUtilization'
113
+ | 'CassandraWriteCapacityUtilization'
114
+ /**
115
+ * Application Auto Scaling client for ECS, DynamoDB, and other services
116
+ */
117
+ export declare class ApplicationAutoScalingClient {
118
+ private client: AWSClient;
119
+ private region: string;
120
+ constructor(region?: string);
121
+ registerScalableTarget(options: {
122
+ serviceNamespace: ServiceNamespace
123
+ resourceId: string
124
+ scalableDimension: ScalableDimension
125
+ minCapacity: number
126
+ maxCapacity: number
127
+ roleARN?: string
128
+ suspendedState?: {
129
+ dynamicScalingInSuspended?: boolean
130
+ dynamicScalingOutSuspended?: boolean
131
+ scheduledScalingSuspended?: boolean
132
+ }
133
+ }): Promise<void>;
134
+ describeScalableTargets(options: {
135
+ serviceNamespace: ServiceNamespace
136
+ resourceIds?: string[]
137
+ scalableDimension?: ScalableDimension
138
+ maxResults?: number
139
+ nextToken?: string
140
+ }): Promise<{ ScalableTargets: ScalableTarget[], NextToken?: string }>;
141
+ deregisterScalableTarget(options: {
142
+ serviceNamespace: ServiceNamespace
143
+ resourceId: string
144
+ scalableDimension: ScalableDimension
145
+ }): Promise<void>;
146
+ putScalingPolicy(options: {
147
+ policyName: string
148
+ serviceNamespace: ServiceNamespace
149
+ resourceId: string
150
+ scalableDimension: ScalableDimension
151
+ policyType: 'TargetTrackingScaling' | 'StepScaling'
152
+ targetTrackingScalingPolicyConfiguration?: TargetTrackingScalingPolicyConfiguration
153
+ stepScalingPolicyConfiguration?: StepScalingPolicyConfiguration
154
+ }): Promise<{ PolicyARN: string, Alarms: Array<{ AlarmName: string, AlarmARN: string }> }>;
155
+ describeScalingPolicies(options: {
156
+ serviceNamespace: ServiceNamespace
157
+ policyNames?: string[]
158
+ resourceId?: string
159
+ scalableDimension?: ScalableDimension
160
+ maxResults?: number
161
+ nextToken?: string
162
+ }): Promise<{ ScalingPolicies: ScalingPolicy[], NextToken?: string }>;
163
+ deleteScalingPolicy(options: {
164
+ policyName: string
165
+ serviceNamespace: ServiceNamespace
166
+ resourceId: string
167
+ scalableDimension: ScalableDimension
168
+ }): Promise<void>;
169
+ putScheduledAction(options: {
170
+ scheduledActionName: string
171
+ serviceNamespace: ServiceNamespace
172
+ resourceId: string
173
+ scalableDimension: ScalableDimension
174
+ schedule: string
175
+ timezone?: string
176
+ startTime?: Date
177
+ endTime?: Date
178
+ scalableTargetAction?: {
179
+ minCapacity?: number
180
+ maxCapacity?: number
181
+ }
182
+ }): Promise<void>;
183
+ describeScheduledActions(options: {
184
+ serviceNamespace: ServiceNamespace
185
+ scheduledActionNames?: string[]
186
+ resourceId?: string
187
+ scalableDimension?: ScalableDimension
188
+ maxResults?: number
189
+ nextToken?: string
190
+ }): Promise<{ ScheduledActions: ScheduledAction[], NextToken?: string }>;
191
+ deleteScheduledAction(options: {
192
+ scheduledActionName: string
193
+ serviceNamespace: ServiceNamespace
194
+ resourceId: string
195
+ scalableDimension: ScalableDimension
196
+ }): Promise<void>;
197
+ describeScalingActivities(options: {
198
+ serviceNamespace: ServiceNamespace
199
+ resourceId?: string
200
+ scalableDimension?: ScalableDimension
201
+ maxResults?: number
202
+ nextToken?: string
203
+ includeNotScaledActivities?: boolean
204
+ }): Promise<{
205
+ ScalingActivities: Array<{
206
+ ActivityId: string
207
+ ServiceNamespace: string
208
+ ResourceId: string
209
+ ScalableDimension: string
210
+ Description: string
211
+ Cause: string
212
+ StartTime: string
213
+ EndTime?: string
214
+ StatusCode: 'Pending' | 'InProgress' | 'Successful' | 'Overridden' | 'Unfulfilled' | 'Failed'
215
+ StatusMessage?: string
216
+ Details?: string
217
+ NotScaledReasons?: Array<{
218
+ Code: string
219
+ MaxCapacity?: number
220
+ MinCapacity?: number
221
+ CurrentCapacity?: number
222
+ }>
223
+ }>
224
+ NextToken?: string
225
+ }>;
226
+ getECSServiceResourceId(clusterName: string, serviceName: string): string;
227
+ registerECSServiceScaling(options: {
228
+ clusterName: string
229
+ serviceName: string
230
+ minCapacity: number
231
+ maxCapacity: number
232
+ }): Promise<void>;
233
+ createECSCPUScalingPolicy(options: {
234
+ clusterName: string
235
+ serviceName: string
236
+ policyName: string
237
+ targetCPUPercent: number
238
+ scaleOutCooldown?: number
239
+ scaleInCooldown?: number
240
+ disableScaleIn?: boolean
241
+ }): Promise<{ PolicyARN: string, Alarms: Array<{ AlarmName: string, AlarmARN: string }> }>;
242
+ createECSMemoryScalingPolicy(options: {
243
+ clusterName: string
244
+ serviceName: string
245
+ policyName: string
246
+ targetMemoryPercent: number
247
+ scaleOutCooldown?: number
248
+ scaleInCooldown?: number
249
+ disableScaleIn?: boolean
250
+ }): Promise<{ PolicyARN: string, Alarms: Array<{ AlarmName: string, AlarmARN: string }> }>;
251
+ createECSRequestCountScalingPolicy(options: {
252
+ clusterName: string
253
+ serviceName: string
254
+ policyName: string
255
+ targetRequestsPerTarget: number
256
+ targetGroupArn: string
257
+ loadBalancerArn: string
258
+ scaleOutCooldown?: number
259
+ scaleInCooldown?: number
260
+ disableScaleIn?: boolean
261
+ }): Promise<{ PolicyARN: string, Alarms: Array<{ AlarmName: string, AlarmARN: string }> }>;
262
+ getECSServiceScalingPolicies(clusterName: string, serviceName: string): Promise<ScalingPolicy[]>;
263
+ removeECSServiceScaling(clusterName: string, serviceName: string): Promise<void>;
264
+ createECSScheduledScaling(options: {
265
+ clusterName: string
266
+ serviceName: string
267
+ actionName: string
268
+ schedule: string
269
+ timezone?: string
270
+ minCapacity?: number
271
+ maxCapacity?: number
272
+ }): Promise<void>;
273
+ getECSScalingActivities(clusterName: string, serviceName: string, maxResults?: any): Promise<Array<{
274
+ ActivityId: string
275
+ Description: string
276
+ Cause: string
277
+ StartTime: string
278
+ EndTime?: string
279
+ StatusCode: string
280
+ StatusMessage?: string
281
+ }>>;
282
+ }