@jaypie/constructs 1.1.28 → 1.1.30

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,46 @@
1
+ import { Construct } from "constructs";
2
+ import { RemovalPolicy, Stack } from "aws-cdk-lib";
3
+ import * as acm from "aws-cdk-lib/aws-certificatemanager";
4
+ import * as apiGateway from "aws-cdk-lib/aws-apigateway";
5
+ import * as route53 from "aws-cdk-lib/aws-route53";
6
+ export interface JaypieApiGatewayProps extends apiGateway.LambdaRestApiProps {
7
+ certificate?: boolean | acm.ICertificate;
8
+ host?: string;
9
+ name?: string;
10
+ roleTag?: string;
11
+ zone?: string | route53.IHostedZone;
12
+ }
13
+ export declare class JaypieApiGateway extends Construct implements apiGateway.IRestApi {
14
+ private readonly _api;
15
+ private readonly _certificate?;
16
+ private readonly _domainName?;
17
+ private readonly _host?;
18
+ constructor(scope: Construct, id: string, props: JaypieApiGatewayProps);
19
+ get api(): apiGateway.LambdaRestApi;
20
+ get url(): string;
21
+ get certificateArn(): string | undefined;
22
+ get domainName(): string | undefined;
23
+ get host(): string | undefined;
24
+ get restApiId(): string;
25
+ get restApiName(): string;
26
+ get restApiRootResourceId(): string;
27
+ get deploymentStage(): apiGateway.Stage;
28
+ get domainNameAliasDomainName(): string | undefined;
29
+ get domainNameAliasHostedZoneId(): string | undefined;
30
+ get root(): apiGateway.IResource;
31
+ get env(): {
32
+ account: string;
33
+ region: string;
34
+ };
35
+ get stack(): Stack;
36
+ arnForExecuteApi(method?: string, path?: string, stage?: string): string;
37
+ metric(metricName: string, props?: import("aws-cdk-lib/aws-cloudwatch").MetricOptions): import("aws-cdk-lib/aws-cloudwatch").Metric;
38
+ metricCacheHitCount(props?: import("aws-cdk-lib/aws-cloudwatch").MetricOptions): import("aws-cdk-lib/aws-cloudwatch").Metric;
39
+ metricCacheMissCount(props?: import("aws-cdk-lib/aws-cloudwatch").MetricOptions): import("aws-cdk-lib/aws-cloudwatch").Metric;
40
+ metricClientError(props?: import("aws-cdk-lib/aws-cloudwatch").MetricOptions): import("aws-cdk-lib/aws-cloudwatch").Metric;
41
+ metricCount(props?: import("aws-cdk-lib/aws-cloudwatch").MetricOptions): import("aws-cdk-lib/aws-cloudwatch").Metric;
42
+ metricIntegrationLatency(props?: import("aws-cdk-lib/aws-cloudwatch").MetricOptions): import("aws-cdk-lib/aws-cloudwatch").Metric;
43
+ metricLatency(props?: import("aws-cdk-lib/aws-cloudwatch").MetricOptions): import("aws-cdk-lib/aws-cloudwatch").Metric;
44
+ metricServerError(props?: import("aws-cdk-lib/aws-cloudwatch").MetricOptions): import("aws-cdk-lib/aws-cloudwatch").Metric;
45
+ applyRemovalPolicy(policy: RemovalPolicy): void;
46
+ }
@@ -0,0 +1,5 @@
1
+ import { Construct } from "constructs";
2
+ import { JaypieStack, JaypieStackProps } from "./JaypieStack";
3
+ export declare class JaypieAppStack extends JaypieStack {
4
+ constructor(scope: Construct, id: string, props?: JaypieStackProps);
5
+ }
@@ -0,0 +1,5 @@
1
+ import { Construct } from "constructs";
2
+ import { JaypieStack, JaypieStackProps } from "./JaypieStack";
3
+ export declare class JaypieInfrastructureStack extends JaypieStack {
4
+ constructor(scope: Construct, id: string, props?: JaypieStackProps);
5
+ }
@@ -25,6 +25,7 @@ export interface JaypieLambdaProps {
25
25
  parameterStoreTtl?: number;
26
26
  secretsManagerTtl?: number;
27
27
  };
28
+ provisionedConcurrentExecutions?: number;
28
29
  reservedConcurrentExecutions?: number;
29
30
  roleTag?: string;
30
31
  runtime?: lambda.Runtime;
@@ -0,0 +1,8 @@
1
+ import { Stack, StackProps } from "aws-cdk-lib";
2
+ import { Construct } from "constructs";
3
+ export interface JaypieStackProps extends StackProps {
4
+ key?: string;
5
+ }
6
+ export declare class JaypieStack extends Stack {
7
+ constructor(scope: Construct, id: string, props?: JaypieStackProps);
8
+ }
@@ -0,0 +1,81 @@
1
+ import { RemovalPolicy } from "aws-cdk-lib";
2
+ import * as acm from "aws-cdk-lib/aws-certificatemanager";
3
+ import * as cloudfront from "aws-cdk-lib/aws-cloudfront";
4
+ import { AddToResourcePolicyResult, PolicyStatement } from "aws-cdk-lib/aws-iam";
5
+ import * as route53 from "aws-cdk-lib/aws-route53";
6
+ import * as s3 from "aws-cdk-lib/aws-s3";
7
+ import * as kms from "aws-cdk-lib/aws-kms";
8
+ import { Construct } from "constructs";
9
+ export interface JaypieWebDeploymentBucketProps extends s3.BucketProps {
10
+ /**
11
+ * SSL certificate for the CloudFront distribution
12
+ * @default true (creates a new certificate)
13
+ */
14
+ certificate?: boolean | acm.ICertificate;
15
+ /**
16
+ * The domain name for the website
17
+ * @default mergeDomain(CDK_ENV_WEB_SUBDOMAIN, CDK_ENV_WEB_HOSTED_ZONE || CDK_ENV_HOSTED_ZONE)
18
+ */
19
+ host?: string;
20
+ /**
21
+ * Optional bucket name
22
+ */
23
+ name?: string;
24
+ /**
25
+ * Role tag for tagging resources
26
+ * @default CDK.ROLE.HOSTING
27
+ */
28
+ roleTag?: string;
29
+ /**
30
+ * The hosted zone for DNS records
31
+ * @default CDK_ENV_WEB_HOSTED_ZONE || CDK_ENV_HOSTED_ZONE
32
+ */
33
+ zone?: string | route53.IHostedZone;
34
+ }
35
+ export declare class JaypieWebDeploymentBucket extends Construct implements s3.IBucket {
36
+ readonly bucket: s3.Bucket;
37
+ readonly bucketArn: string;
38
+ readonly bucketDomainName: string;
39
+ readonly bucketDualStackDomainName: string;
40
+ readonly bucketName: string;
41
+ readonly bucketRegionalDomainName: string;
42
+ readonly bucketWebsiteDomainName: string;
43
+ readonly bucketWebsiteUrl: string;
44
+ readonly encryptionKey?: kms.IKey;
45
+ readonly isWebsite?: boolean;
46
+ readonly notificationsHandlerRole?: string;
47
+ readonly policy?: s3.BucketPolicy;
48
+ readonly deployRoleArn?: string;
49
+ readonly distributionDomainName?: string;
50
+ readonly certificate?: acm.ICertificate;
51
+ readonly distribution?: cloudfront.Distribution;
52
+ constructor(scope: Construct, id: string, props?: JaypieWebDeploymentBucketProps);
53
+ addEventNotification(event: s3.EventType, dest: s3.IBucketNotificationDestination, ...filters: s3.NotificationKeyFilter[]): void;
54
+ addObjectCreatedNotification(dest: s3.IBucketNotificationDestination, ...filters: s3.NotificationKeyFilter[]): void;
55
+ addObjectRemovedNotification(dest: s3.IBucketNotificationDestination, ...filters: s3.NotificationKeyFilter[]): void;
56
+ addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult;
57
+ arnForObjects(keyPattern: string): string;
58
+ grantDelete(identity: any, objectsKeyPattern?: any): any;
59
+ grantPublicAccess(allowedActions: string, keyPrefix?: string): any;
60
+ grantPut(identity: any, objectsKeyPattern?: any): any;
61
+ grantPutAcl(identity: any, objectsKeyPattern?: string): any;
62
+ grantRead(identity: any, objectsKeyPattern?: any): any;
63
+ grantReadWrite(identity: any, objectsKeyPattern?: any): any;
64
+ grantWrite(identity: any, objectsKeyPattern?: any): any;
65
+ s3UrlForObject(key?: string): string;
66
+ urlForObject(key?: string): string;
67
+ virtualHostedUrlForObject(key?: string, options?: s3.VirtualHostedStyleUrlOptions): string;
68
+ transferAccelerationUrlForObject(key?: string): string;
69
+ onCloudTrailEvent(id: string, options?: s3.OnCloudTrailBucketEventOptions): any;
70
+ onCloudTrailPutObject(id: string, options?: s3.OnCloudTrailBucketEventOptions): any;
71
+ onCloudTrailWriteObject(id: string, options?: s3.OnCloudTrailBucketEventOptions): any;
72
+ addCorsRule(rule: s3.CorsRule): void;
73
+ addInventory(inventory: s3.Inventory): void;
74
+ addLifecycleRule(rule: s3.LifecycleRule): void;
75
+ addMetric(metric: s3.BucketMetrics): void;
76
+ enableEventBridgeNotification(): void;
77
+ addReplicationPolicy(policy: any): void;
78
+ get stack(): any;
79
+ get env(): any;
80
+ applyRemovalPolicy(policy: RemovalPolicy): void;
81
+ }
@@ -0,0 +1,5 @@
1
+ export declare function constructEnvName(name: string, opts?: {
2
+ env?: string;
3
+ key?: string;
4
+ nonce?: string;
5
+ }): string;
@@ -0,0 +1 @@
1
+ export declare function constructStackName(key?: string): string;
@@ -0,0 +1,4 @@
1
+ export { constructEnvName } from "./constructEnvName";
2
+ export { constructStackName } from "./constructStackName";
3
+ export { isEnv, isProductionEnv, isSandboxEnv } from "./isEnv";
4
+ export { stackTagger } from "./stackTagger";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Check if the current environment matches the given environment
3
+ */
4
+ export declare function isEnv(env: string): boolean;
5
+ /**
6
+ * Check if the current environment is production
7
+ */
8
+ export declare function isProductionEnv(): boolean;
9
+ /**
10
+ * Check if the current environment is sandbox
11
+ */
12
+ export declare function isSandboxEnv(): boolean;
@@ -0,0 +1,4 @@
1
+ import { Stack } from "aws-cdk-lib";
2
+ export declare function stackTagger(stack: Stack, { name }?: {
3
+ name?: string;
4
+ }): boolean;