@ts-cloud/core 0.7.12 → 0.7.14
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/cloudformation/types.d.ts +26 -26
- package/dist/email/advanced/rules.d.ts +24 -24
- package/dist/email/advanced/templates.d.ts +4 -4
- package/dist/errors/index.d.ts +52 -48
- package/dist/intrinsic-functions.d.ts +8 -8
- package/dist/modules/ai.d.ts +32 -32
- package/dist/modules/api.d.ts +8 -8
- package/dist/modules/auth.d.ts +6 -6
- package/dist/modules/cache.d.ts +16 -16
- package/dist/modules/cdn.d.ts +6 -6
- package/dist/modules/compute.d.ts +56 -56
- package/dist/modules/database.d.ts +13 -13
- package/dist/modules/deployment.d.ts +15 -15
- package/dist/modules/monitoring.d.ts +40 -39
- package/dist/modules/permissions.d.ts +35 -35
- package/dist/modules/queue.d.ts +26 -26
- package/dist/modules/redirects.d.ts +2 -2
- package/dist/modules/search.d.ts +2 -2
- package/dist/modules/security.d.ts +16 -16
- package/dist/modules/storage.d.ts +15 -15
- package/dist/multi-account/config.d.ts +28 -28
- package/dist/serverless/runtime-resolve.d.ts +1 -1
- package/dist/sms/advanced/mms.d.ts +3 -3
- package/dist/types.d.ts +4 -0
- package/package.json +3 -3
package/dist/modules/cdn.d.ts
CHANGED
|
@@ -207,18 +207,18 @@ export declare class CDN {
|
|
|
207
207
|
/**
|
|
208
208
|
* Cookie behavior configuration
|
|
209
209
|
*/
|
|
210
|
-
cookies: (behavior:
|
|
210
|
+
cookies: (behavior: 'none' | 'all' | 'allowList', allowedCookies?: string[]) => {
|
|
211
211
|
Forward: string;
|
|
212
212
|
WhitelistedNames?: string[];
|
|
213
213
|
};
|
|
214
214
|
/**
|
|
215
215
|
* Allowed HTTP methods configuration
|
|
216
216
|
*/
|
|
217
|
-
allowedMethods: (methods:
|
|
217
|
+
allowedMethods: (methods: 'ALL' | 'GET_HEAD' | 'GET_HEAD_OPTIONS') => string[];
|
|
218
218
|
/**
|
|
219
219
|
* Cached methods configuration
|
|
220
220
|
*/
|
|
221
|
-
cachedMethods: (methods:
|
|
221
|
+
cachedMethods: (methods: 'GET_HEAD' | 'GET_HEAD_OPTIONS') => string[];
|
|
222
222
|
/**
|
|
223
223
|
* Common TTL presets
|
|
224
224
|
*/
|
|
@@ -263,10 +263,10 @@ export declare class CDN {
|
|
|
263
263
|
max: number;
|
|
264
264
|
default: number;
|
|
265
265
|
};
|
|
266
|
-
cookies?:
|
|
266
|
+
cookies?: 'none' | 'all' | 'allowList';
|
|
267
267
|
allowedCookies?: string[];
|
|
268
|
-
allowedMethods?:
|
|
269
|
-
cachedMethods?:
|
|
268
|
+
allowedMethods?: 'ALL' | 'GET_HEAD' | 'GET_HEAD_OPTIONS';
|
|
269
|
+
cachedMethods?: 'GET_HEAD' | 'GET_HEAD_OPTIONS';
|
|
270
270
|
compress?: boolean;
|
|
271
271
|
forwardQueryString?: boolean;
|
|
272
272
|
forwardHeaders?: string[];
|
|
@@ -351,9 +351,9 @@ export declare class Compute {
|
|
|
351
351
|
createAccessPolicy: (secretArns: string[]) => {
|
|
352
352
|
PolicyName: string;
|
|
353
353
|
PolicyDocument: {
|
|
354
|
-
Version:
|
|
354
|
+
Version: '2012-10-17';
|
|
355
355
|
Statement: Array<{
|
|
356
|
-
Effect:
|
|
356
|
+
Effect: 'Allow' | 'Deny';
|
|
357
357
|
Action: string[];
|
|
358
358
|
Resource: string[];
|
|
359
359
|
}>;
|
|
@@ -365,9 +365,9 @@ export declare class Compute {
|
|
|
365
365
|
createKmsPolicy: (kmsKeyArns: string[]) => {
|
|
366
366
|
PolicyName: string;
|
|
367
367
|
PolicyDocument: {
|
|
368
|
-
Version:
|
|
368
|
+
Version: '2012-10-17';
|
|
369
369
|
Statement: Array<{
|
|
370
|
-
Effect:
|
|
370
|
+
Effect: 'Allow' | 'Deny';
|
|
371
371
|
Action: string[];
|
|
372
372
|
Resource: string[];
|
|
373
373
|
}>;
|
|
@@ -567,8 +567,8 @@ export declare class Compute {
|
|
|
567
567
|
* Allowed CIDRs for corporate VPNs (common patterns)
|
|
568
568
|
*/
|
|
569
569
|
commonCidrs: {
|
|
570
|
-
any: readonly [
|
|
571
|
-
privateOnly: readonly [
|
|
570
|
+
any: readonly ['0.0.0.0/0'];
|
|
571
|
+
privateOnly: readonly ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16'];
|
|
572
572
|
};
|
|
573
573
|
};
|
|
574
574
|
/**
|
|
@@ -579,7 +579,7 @@ export declare class Compute {
|
|
|
579
579
|
/**
|
|
580
580
|
* Map human-readable size to EC2 instance type
|
|
581
581
|
*/
|
|
582
|
-
toInstanceType: (size:
|
|
582
|
+
toInstanceType: (size: 'nano' | 'micro' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge' | '4xlarge' | '8xlarge', family?: 't3' | 't3a' | 'm6i' | 'c6i' | 'r6i') => string;
|
|
583
583
|
/**
|
|
584
584
|
* Size configurations with CPU and memory specs
|
|
585
585
|
*/
|
|
@@ -587,61 +587,61 @@ export declare class Compute {
|
|
|
587
587
|
readonly nano: {
|
|
588
588
|
readonly vcpu: 2;
|
|
589
589
|
readonly memory: 0.5;
|
|
590
|
-
readonly instanceType:
|
|
590
|
+
readonly instanceType: 't3.nano';
|
|
591
591
|
};
|
|
592
592
|
readonly micro: {
|
|
593
593
|
readonly vcpu: 2;
|
|
594
594
|
readonly memory: 1;
|
|
595
|
-
readonly instanceType:
|
|
595
|
+
readonly instanceType: 't3.micro';
|
|
596
596
|
};
|
|
597
597
|
readonly small: {
|
|
598
598
|
readonly vcpu: 2;
|
|
599
599
|
readonly memory: 2;
|
|
600
|
-
readonly instanceType:
|
|
600
|
+
readonly instanceType: 't3.small';
|
|
601
601
|
};
|
|
602
602
|
readonly medium: {
|
|
603
603
|
readonly vcpu: 2;
|
|
604
604
|
readonly memory: 4;
|
|
605
|
-
readonly instanceType:
|
|
605
|
+
readonly instanceType: 't3.medium';
|
|
606
606
|
};
|
|
607
607
|
readonly large: {
|
|
608
608
|
readonly vcpu: 2;
|
|
609
609
|
readonly memory: 8;
|
|
610
|
-
readonly instanceType:
|
|
610
|
+
readonly instanceType: 't3.large';
|
|
611
611
|
};
|
|
612
612
|
readonly xlarge: {
|
|
613
613
|
readonly vcpu: 4;
|
|
614
614
|
readonly memory: 16;
|
|
615
|
-
readonly instanceType:
|
|
615
|
+
readonly instanceType: 't3.xlarge';
|
|
616
616
|
};
|
|
617
617
|
readonly '2xlarge': {
|
|
618
618
|
readonly vcpu: 8;
|
|
619
619
|
readonly memory: 32;
|
|
620
|
-
readonly instanceType:
|
|
620
|
+
readonly instanceType: 't3.2xlarge';
|
|
621
621
|
};
|
|
622
622
|
};
|
|
623
623
|
/**
|
|
624
624
|
* Get Fargate CPU/memory from size
|
|
625
625
|
*/
|
|
626
|
-
toFargateSpecs: (size:
|
|
626
|
+
toFargateSpecs: (size: 'nano' | 'micro' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge') => {
|
|
627
627
|
cpu: string;
|
|
628
628
|
memory: string;
|
|
629
629
|
};
|
|
630
630
|
/**
|
|
631
631
|
* Get Lambda memory from size
|
|
632
632
|
*/
|
|
633
|
-
toLambdaMemory: (size:
|
|
633
|
+
toLambdaMemory: (size: 'nano' | 'micro' | 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge') => number;
|
|
634
634
|
/**
|
|
635
635
|
* Presets for common workloads
|
|
636
636
|
*/
|
|
637
637
|
presets: {
|
|
638
|
-
readonly webServer:
|
|
639
|
-
readonly apiServer:
|
|
640
|
-
readonly worker:
|
|
641
|
-
readonly database:
|
|
642
|
-
readonly cache:
|
|
643
|
-
readonly compute:
|
|
644
|
-
readonly general:
|
|
638
|
+
readonly webServer: 't3.small';
|
|
639
|
+
readonly apiServer: 't3.medium';
|
|
640
|
+
readonly worker: 't3.medium';
|
|
641
|
+
readonly database: 'r6i.large';
|
|
642
|
+
readonly cache: 'r6i.medium';
|
|
643
|
+
readonly compute: 'c6i.large';
|
|
644
|
+
readonly general: 'm6i.medium';
|
|
645
645
|
};
|
|
646
646
|
};
|
|
647
647
|
/**
|
|
@@ -654,7 +654,7 @@ export declare class Compute {
|
|
|
654
654
|
*/
|
|
655
655
|
create: (options: {
|
|
656
656
|
size: number;
|
|
657
|
-
type?:
|
|
657
|
+
type?: 'standard' | 'ssd' | 'premium' | 'gp2' | 'gp3' | 'io1' | 'io2';
|
|
658
658
|
encrypted?: boolean;
|
|
659
659
|
iops?: number;
|
|
660
660
|
throughput?: number;
|
|
@@ -721,8 +721,8 @@ export declare class Compute {
|
|
|
721
721
|
*/
|
|
722
722
|
create: (options: {
|
|
723
723
|
maxPrice?: string;
|
|
724
|
-
spotInstanceType?:
|
|
725
|
-
interruptionBehavior?:
|
|
724
|
+
spotInstanceType?: 'one-time' | 'persistent';
|
|
725
|
+
interruptionBehavior?: 'hibernate' | 'stop' | 'terminate';
|
|
726
726
|
blockDurationMinutes?: number;
|
|
727
727
|
}) => {
|
|
728
728
|
SpotOptions: {
|
|
@@ -775,7 +775,7 @@ export declare class Compute {
|
|
|
775
775
|
}>;
|
|
776
776
|
baseCapacity?: number;
|
|
777
777
|
onDemandPercentage?: number;
|
|
778
|
-
spotAllocationStrategy?:
|
|
778
|
+
spotAllocationStrategy?: 'lowest-price' | 'capacity-optimized' | 'capacity-optimized-prioritized';
|
|
779
779
|
spotMaxPrice?: string;
|
|
780
780
|
}) => {
|
|
781
781
|
MixedInstancesPolicy: {
|
|
@@ -805,10 +805,10 @@ export declare class Compute {
|
|
|
805
805
|
onDemandPercentage: number;
|
|
806
806
|
spotAllocationStrategy: string;
|
|
807
807
|
instanceTypes: readonly [{
|
|
808
|
-
readonly size:
|
|
808
|
+
readonly size: 'small';
|
|
809
809
|
readonly weight: 1;
|
|
810
810
|
}, {
|
|
811
|
-
readonly size:
|
|
811
|
+
readonly size: 'medium';
|
|
812
812
|
readonly weight: 2;
|
|
813
813
|
}];
|
|
814
814
|
};
|
|
@@ -820,10 +820,10 @@ export declare class Compute {
|
|
|
820
820
|
onDemandPercentage: number;
|
|
821
821
|
spotAllocationStrategy: string;
|
|
822
822
|
instanceTypes: readonly [{
|
|
823
|
-
readonly size:
|
|
823
|
+
readonly size: 'medium';
|
|
824
824
|
readonly weight: 1;
|
|
825
825
|
}, {
|
|
826
|
-
readonly size:
|
|
826
|
+
readonly size: 'large';
|
|
827
827
|
readonly weight: 2;
|
|
828
828
|
}];
|
|
829
829
|
};
|
|
@@ -835,7 +835,7 @@ export declare class Compute {
|
|
|
835
835
|
onDemandPercentage: number;
|
|
836
836
|
spotAllocationStrategy: string;
|
|
837
837
|
instanceTypes: readonly [{
|
|
838
|
-
readonly size:
|
|
838
|
+
readonly size: 'medium';
|
|
839
839
|
readonly weight: 1;
|
|
840
840
|
}];
|
|
841
841
|
};
|
|
@@ -856,7 +856,7 @@ export declare class Compute {
|
|
|
856
856
|
scaleUpThreshold?: number;
|
|
857
857
|
scaleDownThreshold?: number;
|
|
858
858
|
cooldownSeconds?: number;
|
|
859
|
-
targetMetric?:
|
|
859
|
+
targetMetric?: 'cpu' | 'memory' | 'requests';
|
|
860
860
|
}) => {
|
|
861
861
|
minSize: number;
|
|
862
862
|
maxSize: number;
|
|
@@ -941,7 +941,7 @@ export declare class Compute {
|
|
|
941
941
|
timeout?: number;
|
|
942
942
|
healthyThreshold?: number;
|
|
943
943
|
unhealthyThreshold?: number;
|
|
944
|
-
protocol?:
|
|
944
|
+
protocol?: 'HTTP' | 'HTTPS' | 'TCP';
|
|
945
945
|
}) => {
|
|
946
946
|
HealthCheckPath?: string;
|
|
947
947
|
HealthCheckIntervalSeconds: number;
|
|
@@ -1030,10 +1030,10 @@ export declare class Compute {
|
|
|
1030
1030
|
* SSL policies (TLS versions)
|
|
1031
1031
|
*/
|
|
1032
1032
|
policies: {
|
|
1033
|
-
readonly tls13:
|
|
1034
|
-
readonly tls12:
|
|
1035
|
-
readonly tls11:
|
|
1036
|
-
readonly fips:
|
|
1033
|
+
readonly tls13: 'ELBSecurityPolicy-TLS13-1-2-2021-06';
|
|
1034
|
+
readonly tls12: 'ELBSecurityPolicy-TLS-1-2-Ext-2018-06';
|
|
1035
|
+
readonly tls11: 'ELBSecurityPolicy-TLS-1-1-2017-01';
|
|
1036
|
+
readonly fips: 'ELBSecurityPolicy-TLS-1-2-Ext-FIPS-2022-05';
|
|
1037
1037
|
};
|
|
1038
1038
|
};
|
|
1039
1039
|
/**
|
|
@@ -1065,15 +1065,15 @@ export declare class Compute {
|
|
|
1065
1065
|
* Runtime options
|
|
1066
1066
|
*/
|
|
1067
1067
|
runtimes: {
|
|
1068
|
-
readonly nodejs20:
|
|
1069
|
-
readonly nodejs18:
|
|
1070
|
-
readonly python312:
|
|
1071
|
-
readonly python311:
|
|
1072
|
-
readonly java21:
|
|
1073
|
-
readonly java17:
|
|
1074
|
-
readonly go:
|
|
1075
|
-
readonly rust:
|
|
1076
|
-
readonly bun:
|
|
1068
|
+
readonly nodejs20: 'nodejs20.x';
|
|
1069
|
+
readonly nodejs18: 'nodejs18.x';
|
|
1070
|
+
readonly python312: 'python3.12';
|
|
1071
|
+
readonly python311: 'python3.11';
|
|
1072
|
+
readonly java21: 'java21';
|
|
1073
|
+
readonly java17: 'java17';
|
|
1074
|
+
readonly go: 'provided.al2023';
|
|
1075
|
+
readonly rust: 'provided.al2023';
|
|
1076
|
+
readonly bun: 'provided.al2023';
|
|
1077
1077
|
};
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Common function configurations
|
|
@@ -1122,10 +1122,10 @@ export declare class Compute {
|
|
|
1122
1122
|
* Generate complete user data script for app server
|
|
1123
1123
|
*/
|
|
1124
1124
|
generateAppServerScript: (options: {
|
|
1125
|
-
runtime?:
|
|
1125
|
+
runtime?: 'bun' | 'node';
|
|
1126
1126
|
runtimeVersion?: string;
|
|
1127
|
-
webServer?:
|
|
1128
|
-
processManager?:
|
|
1127
|
+
webServer?: 'nginx' | 'caddy' | 'none';
|
|
1128
|
+
processManager?: 'pm2' | 'systemd';
|
|
1129
1129
|
enableSsl?: boolean;
|
|
1130
1130
|
sslEmail?: string;
|
|
1131
1131
|
domain?: string;
|
|
@@ -1146,10 +1146,10 @@ export declare class Compute {
|
|
|
1146
1146
|
* - Multiple sites can share one EC2 instance
|
|
1147
1147
|
*/
|
|
1148
1148
|
generateBunAppScript: (options: {
|
|
1149
|
-
runtime?:
|
|
1149
|
+
runtime?: 'bun' | 'node' | 'deno' | 'php';
|
|
1150
1150
|
runtimeVersion?: string;
|
|
1151
1151
|
systemPackages?: string[];
|
|
1152
|
-
database?:
|
|
1152
|
+
database?: 'sqlite' | 'mysql' | 'postgres';
|
|
1153
1153
|
/**
|
|
1154
1154
|
* Caddyfile content. When set, installs Caddy and configures it as
|
|
1155
1155
|
* a reverse proxy + TLS terminator using the supplied Caddyfile.
|
|
@@ -1241,7 +1241,7 @@ export declare class Compute {
|
|
|
1241
1241
|
/**
|
|
1242
1242
|
* Minimal worker server (no web server)
|
|
1243
1243
|
*/
|
|
1244
|
-
worker: (runtime?:
|
|
1244
|
+
worker: (runtime?: 'bun' | 'node') => string;
|
|
1245
1245
|
};
|
|
1246
1246
|
};
|
|
1247
1247
|
/**
|
|
@@ -1313,8 +1313,8 @@ export declare class Compute {
|
|
|
1313
1313
|
subnetId: string;
|
|
1314
1314
|
keyName: string;
|
|
1315
1315
|
domain: string;
|
|
1316
|
-
runtime?:
|
|
1317
|
-
webServer?:
|
|
1316
|
+
runtime?: 'bun' | 'node';
|
|
1317
|
+
webServer?: 'nginx' | 'caddy';
|
|
1318
1318
|
}) => {
|
|
1319
1319
|
instance: EC2Instance;
|
|
1320
1320
|
securityGroup: EC2SecurityGroup;
|
|
@@ -1341,7 +1341,7 @@ export declare class Compute {
|
|
|
1341
1341
|
vpcId: string;
|
|
1342
1342
|
subnetId: string;
|
|
1343
1343
|
keyName: string;
|
|
1344
|
-
runtime?:
|
|
1344
|
+
runtime?: 'bun' | 'node';
|
|
1345
1345
|
installRedis?: boolean;
|
|
1346
1346
|
}) => {
|
|
1347
1347
|
instance: EC2Instance;
|
|
@@ -127,18 +127,18 @@ export declare class Database {
|
|
|
127
127
|
* Common RDS instance classes
|
|
128
128
|
*/
|
|
129
129
|
static readonly InstanceClasses: {
|
|
130
|
-
readonly T3_Micro:
|
|
131
|
-
readonly T3_Small:
|
|
132
|
-
readonly T3_Medium:
|
|
133
|
-
readonly T3_Large:
|
|
134
|
-
readonly T4g_Micro:
|
|
135
|
-
readonly T4g_Small:
|
|
136
|
-
readonly T4g_Medium:
|
|
137
|
-
readonly M5_Large:
|
|
138
|
-
readonly M5_XLarge:
|
|
139
|
-
readonly M5_2XLarge:
|
|
140
|
-
readonly R5_Large:
|
|
141
|
-
readonly R5_XLarge:
|
|
142
|
-
readonly R5_2XLarge:
|
|
130
|
+
readonly T3_Micro: 'db.t3.micro';
|
|
131
|
+
readonly T3_Small: 'db.t3.small';
|
|
132
|
+
readonly T3_Medium: 'db.t3.medium';
|
|
133
|
+
readonly T3_Large: 'db.t3.large';
|
|
134
|
+
readonly T4g_Micro: 'db.t4g.micro';
|
|
135
|
+
readonly T4g_Small: 'db.t4g.small';
|
|
136
|
+
readonly T4g_Medium: 'db.t4g.medium';
|
|
137
|
+
readonly M5_Large: 'db.m5.large';
|
|
138
|
+
readonly M5_XLarge: 'db.m5.xlarge';
|
|
139
|
+
readonly M5_2XLarge: 'db.m5.2xlarge';
|
|
140
|
+
readonly R5_Large: 'db.r5.large';
|
|
141
|
+
readonly R5_XLarge: 'db.r5.xlarge';
|
|
142
|
+
readonly R5_2XLarge: 'db.r5.2xlarge';
|
|
143
143
|
};
|
|
144
144
|
}
|
|
@@ -130,19 +130,19 @@ export declare class Deployment {
|
|
|
130
130
|
/**
|
|
131
131
|
* All at once deployment (fastest, but downtime)
|
|
132
132
|
*/
|
|
133
|
-
readonly allAtOnce: () => CodeDeployDeploymentConfigOptions[
|
|
133
|
+
readonly allAtOnce: () => CodeDeployDeploymentConfigOptions['minimumHealthyHosts'];
|
|
134
134
|
/**
|
|
135
135
|
* Half at a time deployment
|
|
136
136
|
*/
|
|
137
|
-
readonly halfAtATime: () => CodeDeployDeploymentConfigOptions[
|
|
137
|
+
readonly halfAtATime: () => CodeDeployDeploymentConfigOptions['minimumHealthyHosts'];
|
|
138
138
|
/**
|
|
139
139
|
* One at a time deployment (slowest, but safest)
|
|
140
140
|
*/
|
|
141
|
-
readonly oneAtATime: () => CodeDeployDeploymentConfigOptions[
|
|
141
|
+
readonly oneAtATime: () => CodeDeployDeploymentConfigOptions['minimumHealthyHosts'];
|
|
142
142
|
/**
|
|
143
143
|
* Custom deployment configuration
|
|
144
144
|
*/
|
|
145
|
-
readonly custom: (type:
|
|
145
|
+
readonly custom: (type: 'HOST_COUNT' | 'FLEET_PERCENT', value: number) => CodeDeployDeploymentConfigOptions['minimumHealthyHosts'];
|
|
146
146
|
};
|
|
147
147
|
/**
|
|
148
148
|
* Traffic routing configurations
|
|
@@ -151,15 +151,15 @@ export declare class Deployment {
|
|
|
151
151
|
/**
|
|
152
152
|
* All traffic at once
|
|
153
153
|
*/
|
|
154
|
-
readonly allAtOnce: () => CodeDeployDeploymentConfigOptions[
|
|
154
|
+
readonly allAtOnce: () => CodeDeployDeploymentConfigOptions['trafficRoutingConfig'];
|
|
155
155
|
/**
|
|
156
156
|
* Canary deployment (shift traffic in two steps)
|
|
157
157
|
*/
|
|
158
|
-
readonly canary: (canaryPercentage: number, canaryInterval: number) => CodeDeployDeploymentConfigOptions[
|
|
158
|
+
readonly canary: (canaryPercentage: number, canaryInterval: number) => CodeDeployDeploymentConfigOptions['trafficRoutingConfig'];
|
|
159
159
|
/**
|
|
160
160
|
* Linear deployment (shift traffic gradually)
|
|
161
161
|
*/
|
|
162
|
-
readonly linear: (linearPercentage: number, linearInterval: number) => CodeDeployDeploymentConfigOptions[
|
|
162
|
+
readonly linear: (linearPercentage: number, linearInterval: number) => CodeDeployDeploymentConfigOptions['trafficRoutingConfig'];
|
|
163
163
|
};
|
|
164
164
|
/**
|
|
165
165
|
* Rollback configurations
|
|
@@ -168,19 +168,19 @@ export declare class Deployment {
|
|
|
168
168
|
/**
|
|
169
169
|
* Auto rollback on deployment failure
|
|
170
170
|
*/
|
|
171
|
-
readonly onFailure: () => CodeDeployDeploymentGroupOptions[
|
|
171
|
+
readonly onFailure: () => CodeDeployDeploymentGroupOptions['autoRollbackConfiguration'];
|
|
172
172
|
/**
|
|
173
173
|
* Auto rollback on alarm or failure
|
|
174
174
|
*/
|
|
175
|
-
readonly onAlarmOrFailure: () => CodeDeployDeploymentGroupOptions[
|
|
175
|
+
readonly onAlarmOrFailure: () => CodeDeployDeploymentGroupOptions['autoRollbackConfiguration'];
|
|
176
176
|
/**
|
|
177
177
|
* Auto rollback on all events
|
|
178
178
|
*/
|
|
179
|
-
readonly onAllEvents: () => CodeDeployDeploymentGroupOptions[
|
|
179
|
+
readonly onAllEvents: () => CodeDeployDeploymentGroupOptions['autoRollbackConfiguration'];
|
|
180
180
|
/**
|
|
181
181
|
* No auto rollback
|
|
182
182
|
*/
|
|
183
|
-
readonly disabled: () => CodeDeployDeploymentGroupOptions[
|
|
183
|
+
readonly disabled: () => CodeDeployDeploymentGroupOptions['autoRollbackConfiguration'];
|
|
184
184
|
};
|
|
185
185
|
/**
|
|
186
186
|
* Blue/Green deployment configurations
|
|
@@ -189,19 +189,19 @@ export declare class Deployment {
|
|
|
189
189
|
/**
|
|
190
190
|
* Standard blue/green with immediate termination
|
|
191
191
|
*/
|
|
192
|
-
readonly standard: () => CodeDeployDeploymentGroupOptions[
|
|
192
|
+
readonly standard: () => CodeDeployDeploymentGroupOptions['blueGreenDeploymentConfiguration'];
|
|
193
193
|
/**
|
|
194
194
|
* Blue/green with delayed termination
|
|
195
195
|
*/
|
|
196
|
-
readonly withDelay: (terminationWaitTimeInMinutes: number) => CodeDeployDeploymentGroupOptions[
|
|
196
|
+
readonly withDelay: (terminationWaitTimeInMinutes: number) => CodeDeployDeploymentGroupOptions['blueGreenDeploymentConfiguration'];
|
|
197
197
|
/**
|
|
198
198
|
* Blue/green with manual approval
|
|
199
199
|
*/
|
|
200
|
-
readonly withManualApproval: (waitTimeInMinutes: number) => CodeDeployDeploymentGroupOptions[
|
|
200
|
+
readonly withManualApproval: (waitTimeInMinutes: number) => CodeDeployDeploymentGroupOptions['blueGreenDeploymentConfiguration'];
|
|
201
201
|
/**
|
|
202
202
|
* Blue/green keeping old instances
|
|
203
203
|
*/
|
|
204
|
-
readonly keepBlue: () => CodeDeployDeploymentGroupOptions[
|
|
204
|
+
readonly keepBlue: () => CodeDeployDeploymentGroupOptions['blueGreenDeploymentConfiguration'];
|
|
205
205
|
};
|
|
206
206
|
/**
|
|
207
207
|
* Common use cases
|
|
@@ -160,7 +160,8 @@ export declare class Monitoring {
|
|
|
160
160
|
/**
|
|
161
161
|
* RDS free storage alarm
|
|
162
162
|
*/
|
|
163
|
-
readonly rdsFreeStorage: (slug: string, environment: EnvironmentType, dbInstanceId: string, threshold?: number,
|
|
163
|
+
readonly rdsFreeStorage: (slug: string, environment: EnvironmentType, dbInstanceId: string, threshold?: number, // 5GB in bytes
|
|
164
|
+
snsTopicArn?: string) => AlarmOptions;
|
|
164
165
|
/**
|
|
165
166
|
* SQS queue depth alarm
|
|
166
167
|
*/
|
|
@@ -237,11 +238,11 @@ export declare class Monitoring {
|
|
|
237
238
|
/**
|
|
238
239
|
* Match ERROR log lines
|
|
239
240
|
*/
|
|
240
|
-
readonly errors:
|
|
241
|
+
readonly errors: '[time, request_id, event_type = ERROR*, ...]';
|
|
241
242
|
/**
|
|
242
243
|
* Match all log lines
|
|
243
244
|
*/
|
|
244
|
-
readonly all:
|
|
245
|
+
readonly all: '';
|
|
245
246
|
/**
|
|
246
247
|
* Match JSON logs with specific field
|
|
247
248
|
*/
|
|
@@ -253,11 +254,11 @@ export declare class Monitoring {
|
|
|
253
254
|
/**
|
|
254
255
|
* Match 4xx errors
|
|
255
256
|
*/
|
|
256
|
-
readonly http4xx:
|
|
257
|
+
readonly http4xx: '[..., status_code = 4*, ...]';
|
|
257
258
|
/**
|
|
258
259
|
* Match 5xx errors
|
|
259
260
|
*/
|
|
260
|
-
readonly http5xx:
|
|
261
|
+
readonly http5xx: '[..., status_code = 5*, ...]';
|
|
261
262
|
};
|
|
262
263
|
/**
|
|
263
264
|
* Create a comprehensive application dashboard
|
|
@@ -330,11 +331,11 @@ export declare class Monitoring {
|
|
|
330
331
|
metricName: string;
|
|
331
332
|
namespace: string;
|
|
332
333
|
threshold: number;
|
|
333
|
-
comparisonOperator?:
|
|
334
|
+
comparisonOperator?: 'GreaterThanThreshold' | 'GreaterThanOrEqualToThreshold' | 'LessThanThreshold' | 'LessThanOrEqualToThreshold';
|
|
334
335
|
evaluationPeriods?: number;
|
|
335
336
|
period?: number;
|
|
336
|
-
statistic?:
|
|
337
|
-
treatMissingData?:
|
|
337
|
+
statistic?: 'Average' | 'Sum' | 'Maximum' | 'Minimum' | 'SampleCount';
|
|
338
|
+
treatMissingData?: 'breaching' | 'notBreaching' | 'ignore' | 'missing';
|
|
338
339
|
}) => {
|
|
339
340
|
MetricName: string;
|
|
340
341
|
Namespace: string;
|
|
@@ -349,28 +350,28 @@ export declare class Monitoring {
|
|
|
349
350
|
* AWS namespace constants
|
|
350
351
|
*/
|
|
351
352
|
namespaces: {
|
|
352
|
-
readonly ec2:
|
|
353
|
-
readonly ecs:
|
|
354
|
-
readonly lambda:
|
|
355
|
-
readonly rds:
|
|
356
|
-
readonly sqs:
|
|
357
|
-
readonly sns:
|
|
358
|
-
readonly s3:
|
|
359
|
-
readonly cloudfront:
|
|
360
|
-
readonly alb:
|
|
361
|
-
readonly nlb:
|
|
362
|
-
readonly apiGateway:
|
|
363
|
-
readonly dynamodb:
|
|
364
|
-
readonly elasticache:
|
|
353
|
+
readonly ec2: 'AWS/EC2';
|
|
354
|
+
readonly ecs: 'AWS/ECS';
|
|
355
|
+
readonly lambda: 'AWS/Lambda';
|
|
356
|
+
readonly rds: 'AWS/RDS';
|
|
357
|
+
readonly sqs: 'AWS/SQS';
|
|
358
|
+
readonly sns: 'AWS/SNS';
|
|
359
|
+
readonly s3: 'AWS/S3';
|
|
360
|
+
readonly cloudfront: 'AWS/CloudFront';
|
|
361
|
+
readonly alb: 'AWS/ApplicationELB';
|
|
362
|
+
readonly nlb: 'AWS/NetworkELB';
|
|
363
|
+
readonly apiGateway: 'AWS/ApiGateway';
|
|
364
|
+
readonly dynamodb: 'AWS/DynamoDB';
|
|
365
|
+
readonly elasticache: 'AWS/ElastiCache';
|
|
365
366
|
};
|
|
366
367
|
/**
|
|
367
368
|
* Comparison operator options
|
|
368
369
|
*/
|
|
369
370
|
comparisonOperators: {
|
|
370
|
-
readonly greaterThan:
|
|
371
|
-
readonly greaterOrEqual:
|
|
372
|
-
readonly lessThan:
|
|
373
|
-
readonly lessOrEqual:
|
|
371
|
+
readonly greaterThan: 'GreaterThanThreshold';
|
|
372
|
+
readonly greaterOrEqual: 'GreaterThanOrEqualToThreshold';
|
|
373
|
+
readonly lessThan: 'LessThanThreshold';
|
|
374
|
+
readonly lessOrEqual: 'LessThanOrEqualToThreshold';
|
|
374
375
|
};
|
|
375
376
|
/**
|
|
376
377
|
* Common metric configurations by service
|
|
@@ -495,10 +496,10 @@ export declare class Monitoring {
|
|
|
495
496
|
highCpu: (threshold?: number) => {
|
|
496
497
|
metricName: string;
|
|
497
498
|
threshold: number;
|
|
498
|
-
comparisonOperator:
|
|
499
|
+
comparisonOperator: 'GreaterThanThreshold';
|
|
499
500
|
evaluationPeriods: number;
|
|
500
501
|
period: number;
|
|
501
|
-
statistic:
|
|
502
|
+
statistic: 'Average';
|
|
502
503
|
};
|
|
503
504
|
/**
|
|
504
505
|
* High memory alarm (for ECS)
|
|
@@ -506,10 +507,10 @@ export declare class Monitoring {
|
|
|
506
507
|
highMemory: (threshold?: number) => {
|
|
507
508
|
metricName: string;
|
|
508
509
|
threshold: number;
|
|
509
|
-
comparisonOperator:
|
|
510
|
+
comparisonOperator: 'GreaterThanThreshold';
|
|
510
511
|
evaluationPeriods: number;
|
|
511
512
|
period: number;
|
|
512
|
-
statistic:
|
|
513
|
+
statistic: 'Average';
|
|
513
514
|
};
|
|
514
515
|
/**
|
|
515
516
|
* High error rate alarm
|
|
@@ -517,10 +518,10 @@ export declare class Monitoring {
|
|
|
517
518
|
highErrors: (threshold?: number) => {
|
|
518
519
|
metricName: string;
|
|
519
520
|
threshold: number;
|
|
520
|
-
comparisonOperator:
|
|
521
|
+
comparisonOperator: 'GreaterThanThreshold';
|
|
521
522
|
evaluationPeriods: number;
|
|
522
523
|
period: number;
|
|
523
|
-
statistic:
|
|
524
|
+
statistic: 'Sum';
|
|
524
525
|
};
|
|
525
526
|
/**
|
|
526
527
|
* High latency alarm
|
|
@@ -528,10 +529,10 @@ export declare class Monitoring {
|
|
|
528
529
|
highLatency: (threshold?: number) => {
|
|
529
530
|
metricName: string;
|
|
530
531
|
threshold: number;
|
|
531
|
-
comparisonOperator:
|
|
532
|
+
comparisonOperator: 'GreaterThanThreshold';
|
|
532
533
|
evaluationPeriods: number;
|
|
533
534
|
period: number;
|
|
534
|
-
statistic:
|
|
535
|
+
statistic: 'Average';
|
|
535
536
|
};
|
|
536
537
|
/**
|
|
537
538
|
* Low healthy hosts alarm
|
|
@@ -540,10 +541,10 @@ export declare class Monitoring {
|
|
|
540
541
|
metricName: string;
|
|
541
542
|
namespace: string;
|
|
542
543
|
threshold: number;
|
|
543
|
-
comparisonOperator:
|
|
544
|
+
comparisonOperator: 'LessThanThreshold';
|
|
544
545
|
evaluationPeriods: number;
|
|
545
546
|
period: number;
|
|
546
|
-
statistic:
|
|
547
|
+
statistic: 'Minimum';
|
|
547
548
|
};
|
|
548
549
|
/**
|
|
549
550
|
* Queue depth alarm
|
|
@@ -552,10 +553,10 @@ export declare class Monitoring {
|
|
|
552
553
|
metricName: string;
|
|
553
554
|
namespace: string;
|
|
554
555
|
threshold: number;
|
|
555
|
-
comparisonOperator:
|
|
556
|
+
comparisonOperator: 'GreaterThanThreshold';
|
|
556
557
|
evaluationPeriods: number;
|
|
557
558
|
period: number;
|
|
558
|
-
statistic:
|
|
559
|
+
statistic: 'Average';
|
|
559
560
|
};
|
|
560
561
|
/**
|
|
561
562
|
* Low storage alarm
|
|
@@ -564,10 +565,10 @@ export declare class Monitoring {
|
|
|
564
565
|
metricName: string;
|
|
565
566
|
namespace: string;
|
|
566
567
|
threshold: number;
|
|
567
|
-
comparisonOperator:
|
|
568
|
+
comparisonOperator: 'LessThanThreshold';
|
|
568
569
|
evaluationPeriods: number;
|
|
569
570
|
period: number;
|
|
570
|
-
statistic:
|
|
571
|
+
statistic: 'Average';
|
|
571
572
|
};
|
|
572
573
|
};
|
|
573
574
|
};
|