@jaypie/constructs 1.1.56 → 1.1.57
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.
|
@@ -4,9 +4,19 @@ import { Construct } from "constructs";
|
|
|
4
4
|
export interface JaypieDatadogBucketProps extends BucketProps {
|
|
5
5
|
/**
|
|
6
6
|
* Optional construct ID
|
|
7
|
-
* @default "
|
|
7
|
+
* @default "JaypieDatadogBucket"
|
|
8
8
|
*/
|
|
9
9
|
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The scope to use when creating the S3 bucket
|
|
12
|
+
* @default this (the construct itself)
|
|
13
|
+
*/
|
|
14
|
+
bucketScope?: Construct;
|
|
15
|
+
/**
|
|
16
|
+
* The ID to use for the S3 bucket construct
|
|
17
|
+
* @default "DatadogArchiveBucket"
|
|
18
|
+
*/
|
|
19
|
+
bucketId?: string;
|
|
10
20
|
/**
|
|
11
21
|
* The service tag value
|
|
12
22
|
* @default CDK.SERVICE.DATADOG
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1502,14 +1502,14 @@ class JaypieDatadogBucket extends constructs.Construct {
|
|
|
1502
1502
|
else {
|
|
1503
1503
|
// First param is props
|
|
1504
1504
|
props = idOrProps || {};
|
|
1505
|
-
id = props.id || "
|
|
1505
|
+
id = props.id || "JaypieDatadogBucket";
|
|
1506
1506
|
}
|
|
1507
1507
|
super(scope, id);
|
|
1508
1508
|
// Extract Jaypie-specific options
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
this.bucket = new s3.Bucket(
|
|
1509
|
+
const { bucketId = "DatadogArchiveBucket", bucketScope, grantDatadogAccess = true, project, service = CDK$2.SERVICE.DATADOG, ...bucketProps } = props;
|
|
1510
|
+
// Create the bucket using bucketScope (defaults to this) and bucketId
|
|
1511
|
+
const effectiveBucketScope = bucketScope || this;
|
|
1512
|
+
this.bucket = new s3.Bucket(effectiveBucketScope, bucketId, bucketProps);
|
|
1513
1513
|
// Add tags to bucket
|
|
1514
1514
|
cdk__namespace.Tags.of(this.bucket).add(CDK$2.TAG.SERVICE, service);
|
|
1515
1515
|
cdk__namespace.Tags.of(this.bucket).add(CDK$2.TAG.ROLE, CDK$2.ROLE.MONITORING);
|