@stacksjs/ts-cloud 0.5.5 → 0.5.7

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.
@@ -0,0 +1,63 @@
1
+ /** A single CloudWatch metric datapoint. */
2
+ export interface MetricDatapoint {
3
+ Timestamp?: string;
4
+ Sum?: number;
5
+ Average?: number;
6
+ Maximum?: number;
7
+ Minimum?: number;
8
+ Unit?: string;
9
+ }
10
+ /** A CloudWatch alarm summary. */
11
+ export interface MetricAlarm {
12
+ AlarmName?: string;
13
+ StateValue?: string;
14
+ MetricName?: string;
15
+ ComparisonOperator?: string;
16
+ Threshold?: number;
17
+ Namespace?: string;
18
+ }
19
+ /**
20
+ * Minimal CloudWatch (metrics/alarms) client over the query API — covers what
21
+ * the serverless `metrics` / `alarms` commands need without an AWS SDK.
22
+ */
23
+ export declare class CloudWatchClient {
24
+ private client;
25
+ private region;
26
+ constructor(region?: string);
27
+ private query;
28
+ /** Fetch aggregated statistics for one metric over a time window. */
29
+ getMetricStatistics(options: {
30
+ Namespace: string;
31
+ MetricName: string;
32
+ Dimensions?: Array<{
33
+ Name: string;
34
+ Value: string;
35
+ }>;
36
+ StartTime: Date;
37
+ EndTime: Date;
38
+ Period: number;
39
+ Statistics: Array<'Sum' | 'Average' | 'Maximum' | 'Minimum'>;
40
+ }): Promise<MetricDatapoint[]>;
41
+ /** List alarms, optionally filtered by name prefix. */
42
+ describeAlarms(options?: {
43
+ AlarmNamePrefix?: string;
44
+ MaxRecords?: number;
45
+ }): Promise<MetricAlarm[]>;
46
+ /** Create or update a metric alarm. */
47
+ putMetricAlarm(options: {
48
+ AlarmName: string;
49
+ Namespace: string;
50
+ MetricName: string;
51
+ ComparisonOperator: string;
52
+ Threshold: number;
53
+ EvaluationPeriods: number;
54
+ Period: number;
55
+ Statistic: 'Sum' | 'Average' | 'Maximum' | 'Minimum';
56
+ Dimensions?: Array<{
57
+ Name: string;
58
+ Value: string;
59
+ }>;
60
+ AlarmActions?: string[];
61
+ AlarmDescription?: string;
62
+ }): Promise<void>;
63
+ }
@@ -187,6 +187,28 @@ export declare class LambdaClient {
187
187
  FunctionVersion?: string;
188
188
  Description?: string;
189
189
  }>;
190
+ /** Point an existing alias at a (new) function version. */
191
+ updateAlias(params: {
192
+ FunctionName: string;
193
+ Name: string;
194
+ FunctionVersion: string;
195
+ Description?: string;
196
+ }): Promise<{
197
+ AliasArn?: string;
198
+ Name?: string;
199
+ FunctionVersion?: string;
200
+ }>;
201
+ /** Pre-provision N warm execution environments on a function version/alias. */
202
+ putProvisionedConcurrencyConfig(params: {
203
+ FunctionName: string;
204
+ Qualifier: string;
205
+ ProvisionedConcurrentExecutions: number;
206
+ }): Promise<{
207
+ Status?: string;
208
+ RequestedProvisionedConcurrentExecutions?: number;
209
+ }>;
210
+ /** Remove a provisioned-concurrency config from a function version/alias. */
211
+ deleteProvisionedConcurrencyConfig(functionName: string, qualifier: string): Promise<void>;
190
212
  /**
191
213
  * Wait for function to become active
192
214
  */
package/dist/aws/rds.d.ts CHANGED
@@ -269,6 +269,35 @@ export declare class RDSClient {
269
269
  }): Promise<{
270
270
  DBInstance?: DBInstance;
271
271
  }>;
272
+ /**
273
+ * Modify a DB cluster — used to rescale an Aurora Serverless v2 cluster's
274
+ * ServerlessV2 min/max ACU capacity.
275
+ */
276
+ modifyDBCluster(options: {
277
+ DBClusterIdentifier: string;
278
+ ServerlessV2ScalingConfiguration?: {
279
+ MinCapacity: number;
280
+ MaxCapacity: number;
281
+ };
282
+ BackupRetentionPeriod?: number;
283
+ ApplyImmediately?: boolean;
284
+ }): Promise<{
285
+ DBCluster?: DBCluster;
286
+ }>;
287
+ /**
288
+ * Restore an Aurora cluster to a point in time as a NEW cluster (the source is
289
+ * left untouched). Either RestoreToTime or UseLatestRestorableTime is required.
290
+ */
291
+ restoreDBClusterToPointInTime(options: {
292
+ DBClusterIdentifier: string;
293
+ SourceDBClusterIdentifier: string;
294
+ RestoreToTime?: Date;
295
+ UseLatestRestorableTime?: boolean;
296
+ VpcSecurityGroupIds?: string[];
297
+ DBSubnetGroupName?: string;
298
+ }): Promise<{
299
+ DBCluster?: DBCluster;
300
+ }>;
272
301
  /**
273
302
  * Start a DB instance
274
303
  */