@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/esm/index.js
CHANGED
|
@@ -1472,14 +1472,14 @@ class JaypieDatadogBucket extends Construct {
|
|
|
1472
1472
|
else {
|
|
1473
1473
|
// First param is props
|
|
1474
1474
|
props = idOrProps || {};
|
|
1475
|
-
id = props.id || "
|
|
1475
|
+
id = props.id || "JaypieDatadogBucket";
|
|
1476
1476
|
}
|
|
1477
1477
|
super(scope, id);
|
|
1478
1478
|
// Extract Jaypie-specific options
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
this.bucket = new Bucket(
|
|
1479
|
+
const { bucketId = "DatadogArchiveBucket", bucketScope, grantDatadogAccess = true, project, service = CDK$2.SERVICE.DATADOG, ...bucketProps } = props;
|
|
1480
|
+
// Create the bucket using bucketScope (defaults to this) and bucketId
|
|
1481
|
+
const effectiveBucketScope = bucketScope || this;
|
|
1482
|
+
this.bucket = new Bucket(effectiveBucketScope, bucketId, bucketProps);
|
|
1483
1483
|
// Add tags to bucket
|
|
1484
1484
|
cdk.Tags.of(this.bucket).add(CDK$2.TAG.SERVICE, service);
|
|
1485
1485
|
cdk.Tags.of(this.bucket).add(CDK$2.TAG.ROLE, CDK$2.ROLE.MONITORING);
|