@jaypie/constructs 1.1.21 → 1.1.23

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
+ import { Construct } from "constructs";
2
+ import { RemovalPolicy } from "aws-cdk-lib";
3
+ import * as s3 from "aws-cdk-lib/aws-s3";
4
+ import * as iam from "aws-cdk-lib/aws-iam";
5
+ import * as cloudwatch from "aws-cdk-lib/aws-cloudwatch";
6
+ import { JaypieQueuedLambda, JaypieQueuedLambdaProps } from "./JaypieQueuedLambda.js";
7
+ export interface JaypieBucketQueuedLambdaProps extends JaypieQueuedLambdaProps {
8
+ bucketName?: string;
9
+ bucketOptions?: s3.BucketProps;
10
+ }
11
+ export declare class JaypieBucketQueuedLambda extends JaypieQueuedLambda implements s3.IBucket {
12
+ private readonly _bucket;
13
+ constructor(scope: Construct, id: string, props: JaypieBucketQueuedLambdaProps);
14
+ get bucket(): s3.Bucket;
15
+ get bucketArn(): string;
16
+ get bucketDomainName(): string;
17
+ get bucketDualStackDomainName(): string;
18
+ get bucketName(): string;
19
+ get bucketRegionalDomainName(): string;
20
+ get bucketWebsiteDomainName(): string;
21
+ get bucketWebsiteUrl(): string;
22
+ get encryptionKey(): undefined | import("aws-cdk-lib/aws-kms").IKey;
23
+ get isWebsite(): boolean;
24
+ get policy(): s3.BucketPolicy | undefined;
25
+ addEventNotification(event: s3.EventType, dest: s3.IBucketNotificationDestination, filters?: s3.NotificationKeyFilter[]): void;
26
+ addObjectCreatedNotification(dest: s3.IBucketNotificationDestination, ...filters: s3.NotificationKeyFilter[]): void;
27
+ addObjectRemovedNotification(dest: s3.IBucketNotificationDestination, ...filters: s3.NotificationKeyFilter[]): void;
28
+ addToResourcePolicy(permission: iam.PolicyStatement): iam.AddToResourcePolicyResult;
29
+ arnForObjects(objectKeyPattern: string): string;
30
+ enableEventBridgeNotification(): void;
31
+ grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant;
32
+ grantDelete(grantee: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
33
+ grantPublicAccess(keyPrefix?: string, ...allowedActions: string[]): iam.Grant;
34
+ grantPut(grantee: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
35
+ grantPutAcl(grantee: iam.IGrantable, objectsKeyPattern?: string): iam.Grant;
36
+ grantRead(grantee: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
37
+ grantReadWrite(grantee: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
38
+ grantWrite(grantee: iam.IGrantable, objectsKeyPattern?: any): iam.Grant;
39
+ onCloudTrailEvent(id: string, options?: s3.OnCloudTrailBucketEventOptions): import("aws-cdk-lib/aws-events").Rule;
40
+ onCloudTrailPutObject(id: string, options?: s3.OnCloudTrailBucketEventOptions): import("aws-cdk-lib/aws-events").Rule;
41
+ onCloudTrailWriteObject(id: string, options?: s3.OnCloudTrailBucketEventOptions): import("aws-cdk-lib/aws-events").Rule;
42
+ s3UrlForObject(key?: string): string;
43
+ transferAccelerationUrlForObject(key?: string, options?: s3.TransferAccelerationUrlOptions): string;
44
+ urlForObject(key?: string): string;
45
+ virtualHostedUrlForObject(key?: string, options?: s3.VirtualHostedStyleUrlOptions): string;
46
+ metricAllRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
47
+ metricBucketSizeBytes(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
48
+ metricDeleteRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
49
+ metricDownloadBytes(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
50
+ metricFirstByteLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
51
+ metricGetRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
52
+ metricHeadRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
53
+ metricHttpRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
54
+ metricListRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
55
+ metricNumberOfObjects(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
56
+ metricPostRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
57
+ metricPutRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
58
+ metricSelectRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
59
+ metricSelectScannedBytes(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
60
+ metricUploadBytes(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
61
+ metricSelectReturnedBytes(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
62
+ applyRemovalPolicy(policy: RemovalPolicy): void;
63
+ }
@@ -0,0 +1,73 @@
1
+ import { Construct } from "constructs";
2
+ import { Duration, Stack, RemovalPolicy } from "aws-cdk-lib";
3
+ import * as lambda from "aws-cdk-lib/aws-lambda";
4
+ import * as iam from "aws-cdk-lib/aws-iam";
5
+ import * as cloudwatch from "aws-cdk-lib/aws-cloudwatch";
6
+ import * as secretsmanager from "aws-cdk-lib/aws-secretsmanager";
7
+ import { JaypieEnvSecret } from "./JaypieEnvSecret.js";
8
+ export interface JaypieLambdaProps {
9
+ code: lambda.Code | string;
10
+ datadogApiKeyArn?: string;
11
+ environment?: {
12
+ [key: string]: string;
13
+ };
14
+ envSecrets?: {
15
+ [key: string]: secretsmanager.ISecret;
16
+ };
17
+ handler: string;
18
+ layers?: lambda.ILayerVersion[];
19
+ logRetention?: number;
20
+ memorySize?: number;
21
+ paramsAndSecrets?: lambda.ParamsAndSecretsLayerVersion | boolean;
22
+ paramsAndSecretsOptions?: {
23
+ cacheSize?: number;
24
+ logLevel?: lambda.ParamsAndSecretsLogLevel;
25
+ parameterStoreTtl?: number;
26
+ secretsManagerTtl?: number;
27
+ };
28
+ reservedConcurrentExecutions?: number;
29
+ roleTag?: string;
30
+ runtime?: lambda.Runtime;
31
+ secrets?: JaypieEnvSecret[];
32
+ timeout?: Duration | number;
33
+ vendorTag?: string;
34
+ }
35
+ export declare class JaypieLambda extends Construct implements lambda.IFunction {
36
+ private readonly _lambda;
37
+ private readonly _code;
38
+ constructor(scope: Construct, id: string, props: JaypieLambdaProps);
39
+ get lambda(): lambda.Function;
40
+ get code(): lambda.Code;
41
+ get functionArn(): string;
42
+ get functionName(): string;
43
+ get grantPrincipal(): iam.IPrincipal;
44
+ get role(): iam.IRole | undefined;
45
+ get architecture(): lambda.Architecture;
46
+ get connections(): import("aws-cdk-lib/aws-ec2").Connections;
47
+ get isBoundToVpc(): boolean;
48
+ get latestVersion(): lambda.IVersion;
49
+ get permissionsNode(): import("constructs").Node;
50
+ get resourceArnsForGrantInvoke(): string[];
51
+ addEventSource(source: lambda.IEventSource): void;
52
+ addEventSourceMapping(id: string, options: lambda.EventSourceMappingOptions): lambda.EventSourceMapping;
53
+ addFunctionUrl(options?: lambda.FunctionUrlOptions): lambda.FunctionUrl;
54
+ addPermission(id: string, permission: lambda.Permission): void;
55
+ addToRolePolicy(statement: iam.PolicyStatement): void;
56
+ configureAsyncInvoke(options: lambda.EventInvokeConfigOptions): void;
57
+ grantInvoke(grantee: iam.IGrantable): iam.Grant;
58
+ grantInvokeCompositePrincipal(compositePrincipal: iam.CompositePrincipal): iam.Grant[];
59
+ grantInvokeUrl(grantee: iam.IGrantable): iam.Grant;
60
+ metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
61
+ metricDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
62
+ metricErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
63
+ metricInvocations(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
64
+ metricThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
65
+ grantInvokeLatestVersion(grantee: iam.IGrantable): iam.Grant;
66
+ grantInvokeVersion(grantee: iam.IGrantable, version: lambda.Version): iam.Grant;
67
+ get env(): {
68
+ account: string;
69
+ region: string;
70
+ };
71
+ get stack(): Stack;
72
+ applyRemovalPolicy(policy: RemovalPolicy): void;
73
+ }
@@ -5,35 +5,15 @@ import * as sqs from "aws-cdk-lib/aws-sqs";
5
5
  import * as iam from "aws-cdk-lib/aws-iam";
6
6
  import * as cloudwatch from "aws-cdk-lib/aws-cloudwatch";
7
7
  import * as kms from "aws-cdk-lib/aws-kms";
8
- import * as secretsmanager from "aws-cdk-lib/aws-secretsmanager";
9
- import { JaypieEnvSecret } from "./JaypieEnvSecret.js";
10
- export interface JaypieQueuedLambdaProps {
8
+ import { JaypieLambdaProps } from "./JaypieLambda.js";
9
+ export interface JaypieQueuedLambdaProps extends JaypieLambdaProps {
11
10
  batchSize?: number;
12
- code: lambda.Code | string;
13
- environment?: {
14
- [key: string]: string;
15
- };
16
- envSecrets?: {
17
- [key: string]: secretsmanager.ISecret;
18
- };
19
11
  fifo?: boolean;
20
- handler: string;
21
- layers?: lambda.ILayerVersion[];
22
- logRetention?: number;
23
- memorySize?: number;
24
- paramsAndSecrets?: lambda.ParamsAndSecretsLayerVersion;
25
- reservedConcurrentExecutions?: number;
26
- roleTag?: string;
27
- runtime?: lambda.Runtime;
28
- secrets?: JaypieEnvSecret[];
29
- timeout?: Duration | number;
30
- vendorTag?: string;
31
12
  visibilityTimeout?: Duration | number;
32
13
  }
33
14
  export declare class JaypieQueuedLambda extends Construct implements lambda.IFunction, sqs.IQueue {
34
15
  private readonly _queue;
35
- private readonly _lambda;
36
- private readonly _code;
16
+ private readonly _lambdaConstruct;
37
17
  constructor(scope: Construct, id: string, props: JaypieQueuedLambdaProps);
38
18
  get queue(): sqs.Queue;
39
19
  get lambda(): lambda.Function;
@@ -0,0 +1 @@
1
+ export {};