@gammarers/aws-secure-bucket 1.3.0
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.
- package/.jsii +3734 -0
- package/API.md +1274 -0
- package/API.md.md +1195 -0
- package/LICENSE +202 -0
- package/README.md +52 -0
- package/lib/index.d.ts +46 -0
- package/lib/index.js +94 -0
- package/package.json +146 -0
package/API.md.md
ADDED
|
@@ -0,0 +1,1195 @@
|
|
|
1
|
+
# API Reference <a name="API Reference" id="api-reference"></a>
|
|
2
|
+
|
|
3
|
+
## Constructs <a name="Constructs" id="Constructs"></a>
|
|
4
|
+
|
|
5
|
+
### SecureBucket <a name="SecureBucket" id="@yicr/secure-bucket.SecureBucket"></a>
|
|
6
|
+
|
|
7
|
+
#### Initializers <a name="Initializers" id="@yicr/secure-bucket.SecureBucket.Initializer"></a>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { SecureBucket } from '@yicr/secure-bucket'
|
|
11
|
+
|
|
12
|
+
new SecureBucket(scope: Construct, id: string, props?: SecureBucketProps)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
| **Name** | **Type** | **Description** |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
18
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
19
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.Initializer.parameter.props">props</a></code> | <code><a href="#@yicr/secure-bucket.SecureBucketProps">SecureBucketProps</a></code> | *No description.* |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@yicr/secure-bucket.SecureBucket.Initializer.parameter.scope"></a>
|
|
24
|
+
|
|
25
|
+
- *Type:* constructs.Construct
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
##### `id`<sup>Required</sup> <a name="id" id="@yicr/secure-bucket.SecureBucket.Initializer.parameter.id"></a>
|
|
30
|
+
|
|
31
|
+
- *Type:* string
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
##### `props`<sup>Optional</sup> <a name="props" id="@yicr/secure-bucket.SecureBucket.Initializer.parameter.props"></a>
|
|
36
|
+
|
|
37
|
+
- *Type:* <a href="#@yicr/secure-bucket.SecureBucketProps">SecureBucketProps</a>
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
42
|
+
|
|
43
|
+
| **Name** | **Description** |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
46
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. |
|
|
47
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.addEventNotification">addEventNotification</a></code> | Adds a bucket notification event destination. |
|
|
48
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.addObjectCreatedNotification">addObjectCreatedNotification</a></code> | Subscribes a destination to receive notifications when an object is created in the bucket. |
|
|
49
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.addObjectRemovedNotification">addObjectRemovedNotification</a></code> | Subscribes a destination to receive notifications when an object is removed from the bucket. |
|
|
50
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.addToResourcePolicy">addToResourcePolicy</a></code> | Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use `bucketArn` and `arnForObjects(keys)` to obtain ARNs for this bucket or objects. |
|
|
51
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.arnForObjects">arnForObjects</a></code> | Returns an ARN that represents all objects within the bucket that match the key pattern specified. |
|
|
52
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.enableEventBridgeNotification">enableEventBridgeNotification</a></code> | Enables event bridge notification, causing all events below to be sent to EventBridge:. |
|
|
53
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.grantDelete">grantDelete</a></code> | Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket. |
|
|
54
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.grantPublicAccess">grantPublicAccess</a></code> | Allows unrestricted access to objects from this bucket. |
|
|
55
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.grantPut">grantPut</a></code> | Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal. |
|
|
56
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.grantPutAcl">grantPutAcl</a></code> | Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket. |
|
|
57
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.grantRead">grantRead</a></code> | Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User). |
|
|
58
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.grantReadWrite">grantReadWrite</a></code> | Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User). |
|
|
59
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.grantWrite">grantWrite</a></code> | Grant write permissions to this bucket to an IAM principal. |
|
|
60
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.onCloudTrailEvent">onCloudTrailEvent</a></code> | Define a CloudWatch event that triggers when something happens to this repository. |
|
|
61
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.onCloudTrailPutObject">onCloudTrailPutObject</a></code> | Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call. |
|
|
62
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.onCloudTrailWriteObject">onCloudTrailWriteObject</a></code> | Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to. |
|
|
63
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.s3UrlForObject">s3UrlForObject</a></code> | The S3 URL of an S3 object. For example:. |
|
|
64
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.transferAccelerationUrlForObject">transferAccelerationUrlForObject</a></code> | The https Transfer Acceleration URL of an S3 object. |
|
|
65
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.urlForObject">urlForObject</a></code> | The https URL of an S3 object. Specify `regional: false` at the options for non-regional URLs. For example:. |
|
|
66
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.virtualHostedUrlForObject">virtualHostedUrlForObject</a></code> | The virtual hosted-style URL of an S3 object. Specify `regional: false` at the options for non-regional URL. For example:. |
|
|
67
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.addCorsRule">addCorsRule</a></code> | Adds a cross-origin access configuration for objects in an Amazon S3 bucket. |
|
|
68
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.addInventory">addInventory</a></code> | Add an inventory configuration. |
|
|
69
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.addLifecycleRule">addLifecycleRule</a></code> | Add a lifecycle rule to the bucket. |
|
|
70
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.addMetric">addMetric</a></code> | Adds a metrics configuration for the CloudWatch request metrics from the bucket. |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
##### `toString` <a name="toString" id="@yicr/secure-bucket.SecureBucket.toString"></a>
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
public toString(): string
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Returns a string representation of this construct.
|
|
81
|
+
|
|
82
|
+
##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="@yicr/secure-bucket.SecureBucket.applyRemovalPolicy"></a>
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
public applyRemovalPolicy(policy: RemovalPolicy): void
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Apply the given removal policy to this resource.
|
|
89
|
+
|
|
90
|
+
The Removal Policy controls what happens to this resource when it stops
|
|
91
|
+
being managed by CloudFormation, either because you've removed it from the
|
|
92
|
+
CDK application or because you've made a change that requires the resource
|
|
93
|
+
to be replaced.
|
|
94
|
+
|
|
95
|
+
The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
|
|
96
|
+
account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
|
|
97
|
+
|
|
98
|
+
###### `policy`<sup>Required</sup> <a name="policy" id="@yicr/secure-bucket.SecureBucket.applyRemovalPolicy.parameter.policy"></a>
|
|
99
|
+
|
|
100
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
##### `addEventNotification` <a name="addEventNotification" id="@yicr/secure-bucket.SecureBucket.addEventNotification"></a>
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
public addEventNotification(event: EventType, dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Adds a bucket notification event destination.
|
|
111
|
+
|
|
112
|
+
> [https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
|
|
113
|
+
|
|
114
|
+
*Example*
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
declare const myLambda: lambda.Function;
|
|
118
|
+
const bucket = new s3.Bucket(this, 'MyBucket');
|
|
119
|
+
bucket.addEventNotification(s3.EventType.OBJECT_CREATED, new s3n.LambdaDestination(myLambda), {prefix: 'home/myusername/*'});
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
###### `event`<sup>Required</sup> <a name="event" id="@yicr/secure-bucket.SecureBucket.addEventNotification.parameter.event"></a>
|
|
124
|
+
|
|
125
|
+
- *Type:* aws-cdk-lib.aws_s3.EventType
|
|
126
|
+
|
|
127
|
+
The event to trigger the notification.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
###### `dest`<sup>Required</sup> <a name="dest" id="@yicr/secure-bucket.SecureBucket.addEventNotification.parameter.dest"></a>
|
|
132
|
+
|
|
133
|
+
- *Type:* aws-cdk-lib.aws_s3.IBucketNotificationDestination
|
|
134
|
+
|
|
135
|
+
The notification destination (Lambda, SNS Topic or SQS Queue).
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
###### `filters`<sup>Required</sup> <a name="filters" id="@yicr/secure-bucket.SecureBucket.addEventNotification.parameter.filters"></a>
|
|
140
|
+
|
|
141
|
+
- *Type:* aws-cdk-lib.aws_s3.NotificationKeyFilter
|
|
142
|
+
|
|
143
|
+
S3 object key filter rules to determine which objects trigger this event.
|
|
144
|
+
|
|
145
|
+
Each filter must include a `prefix` and/or `suffix`
|
|
146
|
+
that will be matched against the s3 object key. Refer to the S3 Developer Guide
|
|
147
|
+
for details about allowed filter rules.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
##### `addObjectCreatedNotification` <a name="addObjectCreatedNotification" id="@yicr/secure-bucket.SecureBucket.addObjectCreatedNotification"></a>
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
public addObjectCreatedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Subscribes a destination to receive notifications when an object is created in the bucket.
|
|
158
|
+
|
|
159
|
+
This is identical to calling
|
|
160
|
+
`onEvent(EventType.OBJECT_CREATED)`.
|
|
161
|
+
|
|
162
|
+
###### `dest`<sup>Required</sup> <a name="dest" id="@yicr/secure-bucket.SecureBucket.addObjectCreatedNotification.parameter.dest"></a>
|
|
163
|
+
|
|
164
|
+
- *Type:* aws-cdk-lib.aws_s3.IBucketNotificationDestination
|
|
165
|
+
|
|
166
|
+
The notification destination (see onEvent).
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
###### `filters`<sup>Required</sup> <a name="filters" id="@yicr/secure-bucket.SecureBucket.addObjectCreatedNotification.parameter.filters"></a>
|
|
171
|
+
|
|
172
|
+
- *Type:* aws-cdk-lib.aws_s3.NotificationKeyFilter
|
|
173
|
+
|
|
174
|
+
Filters (see onEvent).
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
##### `addObjectRemovedNotification` <a name="addObjectRemovedNotification" id="@yicr/secure-bucket.SecureBucket.addObjectRemovedNotification"></a>
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
public addObjectRemovedNotification(dest: IBucketNotificationDestination, filters: NotificationKeyFilter): void
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Subscribes a destination to receive notifications when an object is removed from the bucket.
|
|
185
|
+
|
|
186
|
+
This is identical to calling
|
|
187
|
+
`onEvent(EventType.OBJECT_REMOVED)`.
|
|
188
|
+
|
|
189
|
+
###### `dest`<sup>Required</sup> <a name="dest" id="@yicr/secure-bucket.SecureBucket.addObjectRemovedNotification.parameter.dest"></a>
|
|
190
|
+
|
|
191
|
+
- *Type:* aws-cdk-lib.aws_s3.IBucketNotificationDestination
|
|
192
|
+
|
|
193
|
+
The notification destination (see onEvent).
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
###### `filters`<sup>Required</sup> <a name="filters" id="@yicr/secure-bucket.SecureBucket.addObjectRemovedNotification.parameter.filters"></a>
|
|
198
|
+
|
|
199
|
+
- *Type:* aws-cdk-lib.aws_s3.NotificationKeyFilter
|
|
200
|
+
|
|
201
|
+
Filters (see onEvent).
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
##### `addToResourcePolicy` <a name="addToResourcePolicy" id="@yicr/secure-bucket.SecureBucket.addToResourcePolicy"></a>
|
|
206
|
+
|
|
207
|
+
```typescript
|
|
208
|
+
public addToResourcePolicy(permission: PolicyStatement): AddToResourcePolicyResult
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this bucket and/or its contents. Use `bucketArn` and `arnForObjects(keys)` to obtain ARNs for this bucket or objects.
|
|
212
|
+
|
|
213
|
+
Note that the policy statement may or may not be added to the policy.
|
|
214
|
+
For example, when an `IBucket` is created from an existing bucket,
|
|
215
|
+
it's not possible to tell whether the bucket already has a policy
|
|
216
|
+
attached, let alone to re-use that policy to add more statements to it.
|
|
217
|
+
So it's safest to do nothing in these cases.
|
|
218
|
+
|
|
219
|
+
###### `permission`<sup>Required</sup> <a name="permission" id="@yicr/secure-bucket.SecureBucket.addToResourcePolicy.parameter.permission"></a>
|
|
220
|
+
|
|
221
|
+
- *Type:* aws-cdk-lib.aws_iam.PolicyStatement
|
|
222
|
+
|
|
223
|
+
the policy statement to be added to the bucket's policy.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
##### `arnForObjects` <a name="arnForObjects" id="@yicr/secure-bucket.SecureBucket.arnForObjects"></a>
|
|
228
|
+
|
|
229
|
+
```typescript
|
|
230
|
+
public arnForObjects(keyPattern: string): string
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Returns an ARN that represents all objects within the bucket that match the key pattern specified.
|
|
234
|
+
|
|
235
|
+
To represent all keys, specify ``"*"``.
|
|
236
|
+
|
|
237
|
+
If you need to specify a keyPattern with multiple components, concatenate them into a single string, e.g.:
|
|
238
|
+
|
|
239
|
+
arnForObjects(`home/${team}/${user}/*`)
|
|
240
|
+
|
|
241
|
+
###### `keyPattern`<sup>Required</sup> <a name="keyPattern" id="@yicr/secure-bucket.SecureBucket.arnForObjects.parameter.keyPattern"></a>
|
|
242
|
+
|
|
243
|
+
- *Type:* string
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
##### `enableEventBridgeNotification` <a name="enableEventBridgeNotification" id="@yicr/secure-bucket.SecureBucket.enableEventBridgeNotification"></a>
|
|
248
|
+
|
|
249
|
+
```typescript
|
|
250
|
+
public enableEventBridgeNotification(): void
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Enables event bridge notification, causing all events below to be sent to EventBridge:.
|
|
254
|
+
|
|
255
|
+
Object Deleted (DeleteObject)
|
|
256
|
+
- Object Deleted (Lifecycle expiration)
|
|
257
|
+
- Object Restore Initiated
|
|
258
|
+
- Object Restore Completed
|
|
259
|
+
- Object Restore Expired
|
|
260
|
+
- Object Storage Class Changed
|
|
261
|
+
- Object Access Tier Changed
|
|
262
|
+
- Object ACL Updated
|
|
263
|
+
- Object Tags Added
|
|
264
|
+
- Object Tags Deleted
|
|
265
|
+
|
|
266
|
+
##### `grantDelete` <a name="grantDelete" id="@yicr/secure-bucket.SecureBucket.grantDelete"></a>
|
|
267
|
+
|
|
268
|
+
```typescript
|
|
269
|
+
public grantDelete(identity: IGrantable, objectsKeyPattern?: any): Grant
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Grants s3:DeleteObject* permission to an IAM principal for objects in this bucket.
|
|
273
|
+
|
|
274
|
+
###### `identity`<sup>Required</sup> <a name="identity" id="@yicr/secure-bucket.SecureBucket.grantDelete.parameter.identity"></a>
|
|
275
|
+
|
|
276
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
277
|
+
|
|
278
|
+
The principal.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
###### `objectsKeyPattern`<sup>Optional</sup> <a name="objectsKeyPattern" id="@yicr/secure-bucket.SecureBucket.grantDelete.parameter.objectsKeyPattern"></a>
|
|
283
|
+
|
|
284
|
+
- *Type:* any
|
|
285
|
+
|
|
286
|
+
Restrict the permission to a certain key pattern (default '*').
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
##### `grantPublicAccess` <a name="grantPublicAccess" id="@yicr/secure-bucket.SecureBucket.grantPublicAccess"></a>
|
|
291
|
+
|
|
292
|
+
```typescript
|
|
293
|
+
public grantPublicAccess(allowedActions: string, keyPrefix?: string): Grant
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Allows unrestricted access to objects from this bucket.
|
|
297
|
+
|
|
298
|
+
IMPORTANT: This permission allows anyone to perform actions on S3 objects
|
|
299
|
+
in this bucket, which is useful for when you configure your bucket as a
|
|
300
|
+
website and want everyone to be able to read objects in the bucket without
|
|
301
|
+
needing to authenticate.
|
|
302
|
+
|
|
303
|
+
Without arguments, this method will grant read ("s3:GetObject") access to
|
|
304
|
+
all objects ("*") in the bucket.
|
|
305
|
+
|
|
306
|
+
The method returns the `iam.Grant` object, which can then be modified
|
|
307
|
+
as needed. For example, you can add a condition that will restrict access only
|
|
308
|
+
to an IPv4 range like this:
|
|
309
|
+
|
|
310
|
+
const grant = bucket.grantPublicAccess();
|
|
311
|
+
grant.resourceStatement!.addCondition(‘IpAddress’, { “aws:SourceIp”: “54.240.143.0/24” });
|
|
312
|
+
|
|
313
|
+
Note that if this `IBucket` refers to an existing bucket, possibly not
|
|
314
|
+
managed by CloudFormation, this method will have no effect, since it's
|
|
315
|
+
impossible to modify the policy of an existing bucket.
|
|
316
|
+
|
|
317
|
+
###### `allowedActions`<sup>Required</sup> <a name="allowedActions" id="@yicr/secure-bucket.SecureBucket.grantPublicAccess.parameter.allowedActions"></a>
|
|
318
|
+
|
|
319
|
+
- *Type:* string
|
|
320
|
+
|
|
321
|
+
the set of S3 actions to allow.
|
|
322
|
+
|
|
323
|
+
Default is "s3:GetObject".
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
###### `keyPrefix`<sup>Optional</sup> <a name="keyPrefix" id="@yicr/secure-bucket.SecureBucket.grantPublicAccess.parameter.keyPrefix"></a>
|
|
328
|
+
|
|
329
|
+
- *Type:* string
|
|
330
|
+
|
|
331
|
+
the prefix of S3 object keys (e.g. `home/*`). Default is "*".
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
##### `grantPut` <a name="grantPut" id="@yicr/secure-bucket.SecureBucket.grantPut"></a>
|
|
336
|
+
|
|
337
|
+
```typescript
|
|
338
|
+
public grantPut(identity: IGrantable, objectsKeyPattern?: any): Grant
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Grants s3:PutObject* and s3:Abort* permissions for this bucket to an IAM principal.
|
|
342
|
+
|
|
343
|
+
If encryption is used, permission to use the key to encrypt the contents
|
|
344
|
+
of written files will also be granted to the same principal.
|
|
345
|
+
|
|
346
|
+
###### `identity`<sup>Required</sup> <a name="identity" id="@yicr/secure-bucket.SecureBucket.grantPut.parameter.identity"></a>
|
|
347
|
+
|
|
348
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
349
|
+
|
|
350
|
+
The principal.
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
###### `objectsKeyPattern`<sup>Optional</sup> <a name="objectsKeyPattern" id="@yicr/secure-bucket.SecureBucket.grantPut.parameter.objectsKeyPattern"></a>
|
|
355
|
+
|
|
356
|
+
- *Type:* any
|
|
357
|
+
|
|
358
|
+
Restrict the permission to a certain key pattern (default '*').
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
##### `grantPutAcl` <a name="grantPutAcl" id="@yicr/secure-bucket.SecureBucket.grantPutAcl"></a>
|
|
363
|
+
|
|
364
|
+
```typescript
|
|
365
|
+
public grantPutAcl(identity: IGrantable, objectsKeyPattern?: string): Grant
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Grant the given IAM identity permissions to modify the ACLs of objects in the given Bucket.
|
|
369
|
+
|
|
370
|
+
If your application has the '@aws-cdk/aws-s3:grantWriteWithoutAcl' feature flag set,
|
|
371
|
+
calling `grantWrite` or `grantReadWrite` no longer grants permissions to modify the ACLs of the objects;
|
|
372
|
+
in this case, if you need to modify object ACLs, call this method explicitly.
|
|
373
|
+
|
|
374
|
+
###### `identity`<sup>Required</sup> <a name="identity" id="@yicr/secure-bucket.SecureBucket.grantPutAcl.parameter.identity"></a>
|
|
375
|
+
|
|
376
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
###### `objectsKeyPattern`<sup>Optional</sup> <a name="objectsKeyPattern" id="@yicr/secure-bucket.SecureBucket.grantPutAcl.parameter.objectsKeyPattern"></a>
|
|
381
|
+
|
|
382
|
+
- *Type:* string
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
##### `grantRead` <a name="grantRead" id="@yicr/secure-bucket.SecureBucket.grantRead"></a>
|
|
387
|
+
|
|
388
|
+
```typescript
|
|
389
|
+
public grantRead(identity: IGrantable, objectsKeyPattern?: any): Grant
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Grant read permissions for this bucket and it's contents to an IAM principal (Role/Group/User).
|
|
393
|
+
|
|
394
|
+
If encryption is used, permission to use the key to decrypt the contents
|
|
395
|
+
of the bucket will also be granted to the same principal.
|
|
396
|
+
|
|
397
|
+
###### `identity`<sup>Required</sup> <a name="identity" id="@yicr/secure-bucket.SecureBucket.grantRead.parameter.identity"></a>
|
|
398
|
+
|
|
399
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
400
|
+
|
|
401
|
+
The principal.
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
###### `objectsKeyPattern`<sup>Optional</sup> <a name="objectsKeyPattern" id="@yicr/secure-bucket.SecureBucket.grantRead.parameter.objectsKeyPattern"></a>
|
|
406
|
+
|
|
407
|
+
- *Type:* any
|
|
408
|
+
|
|
409
|
+
Restrict the permission to a certain key pattern (default '*').
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
##### `grantReadWrite` <a name="grantReadWrite" id="@yicr/secure-bucket.SecureBucket.grantReadWrite"></a>
|
|
414
|
+
|
|
415
|
+
```typescript
|
|
416
|
+
public grantReadWrite(identity: IGrantable, objectsKeyPattern?: any): Grant
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Grants read/write permissions for this bucket and it's contents to an IAM principal (Role/Group/User).
|
|
420
|
+
|
|
421
|
+
If an encryption key is used, permission to use the key for
|
|
422
|
+
encrypt/decrypt will also be granted.
|
|
423
|
+
|
|
424
|
+
Before CDK version 1.85.0, this method granted the `s3:PutObject*` permission that included `s3:PutObjectAcl`,
|
|
425
|
+
which could be used to grant read/write object access to IAM principals in other accounts.
|
|
426
|
+
If you want to get rid of that behavior, update your CDK version to 1.85.0 or later,
|
|
427
|
+
and make sure the `@aws-cdk/aws-s3:grantWriteWithoutAcl` feature flag is set to `true`
|
|
428
|
+
in the `context` key of your cdk.json file.
|
|
429
|
+
If you've already updated, but still need the principal to have permissions to modify the ACLs,
|
|
430
|
+
use the `grantPutAcl` method.
|
|
431
|
+
|
|
432
|
+
###### `identity`<sup>Required</sup> <a name="identity" id="@yicr/secure-bucket.SecureBucket.grantReadWrite.parameter.identity"></a>
|
|
433
|
+
|
|
434
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
###### `objectsKeyPattern`<sup>Optional</sup> <a name="objectsKeyPattern" id="@yicr/secure-bucket.SecureBucket.grantReadWrite.parameter.objectsKeyPattern"></a>
|
|
439
|
+
|
|
440
|
+
- *Type:* any
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
##### `grantWrite` <a name="grantWrite" id="@yicr/secure-bucket.SecureBucket.grantWrite"></a>
|
|
445
|
+
|
|
446
|
+
```typescript
|
|
447
|
+
public grantWrite(identity: IGrantable, objectsKeyPattern?: any): Grant
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
Grant write permissions to this bucket to an IAM principal.
|
|
451
|
+
|
|
452
|
+
If encryption is used, permission to use the key to encrypt the contents
|
|
453
|
+
of written files will also be granted to the same principal.
|
|
454
|
+
|
|
455
|
+
Before CDK version 1.85.0, this method granted the `s3:PutObject*` permission that included `s3:PutObjectAcl`,
|
|
456
|
+
which could be used to grant read/write object access to IAM principals in other accounts.
|
|
457
|
+
If you want to get rid of that behavior, update your CDK version to 1.85.0 or later,
|
|
458
|
+
and make sure the `@aws-cdk/aws-s3:grantWriteWithoutAcl` feature flag is set to `true`
|
|
459
|
+
in the `context` key of your cdk.json file.
|
|
460
|
+
If you've already updated, but still need the principal to have permissions to modify the ACLs,
|
|
461
|
+
use the `grantPutAcl` method.
|
|
462
|
+
|
|
463
|
+
###### `identity`<sup>Required</sup> <a name="identity" id="@yicr/secure-bucket.SecureBucket.grantWrite.parameter.identity"></a>
|
|
464
|
+
|
|
465
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
###### `objectsKeyPattern`<sup>Optional</sup> <a name="objectsKeyPattern" id="@yicr/secure-bucket.SecureBucket.grantWrite.parameter.objectsKeyPattern"></a>
|
|
470
|
+
|
|
471
|
+
- *Type:* any
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
##### `onCloudTrailEvent` <a name="onCloudTrailEvent" id="@yicr/secure-bucket.SecureBucket.onCloudTrailEvent"></a>
|
|
476
|
+
|
|
477
|
+
```typescript
|
|
478
|
+
public onCloudTrailEvent(id: string, options?: OnCloudTrailBucketEventOptions): Rule
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
Define a CloudWatch event that triggers when something happens to this repository.
|
|
482
|
+
|
|
483
|
+
Requires that there exists at least one CloudTrail Trail in your account
|
|
484
|
+
that captures the event. This method will not create the Trail.
|
|
485
|
+
|
|
486
|
+
###### `id`<sup>Required</sup> <a name="id" id="@yicr/secure-bucket.SecureBucket.onCloudTrailEvent.parameter.id"></a>
|
|
487
|
+
|
|
488
|
+
- *Type:* string
|
|
489
|
+
|
|
490
|
+
The id of the rule.
|
|
491
|
+
|
|
492
|
+
---
|
|
493
|
+
|
|
494
|
+
###### `options`<sup>Optional</sup> <a name="options" id="@yicr/secure-bucket.SecureBucket.onCloudTrailEvent.parameter.options"></a>
|
|
495
|
+
|
|
496
|
+
- *Type:* aws-cdk-lib.aws_s3.OnCloudTrailBucketEventOptions
|
|
497
|
+
|
|
498
|
+
Options for adding the rule.
|
|
499
|
+
|
|
500
|
+
---
|
|
501
|
+
|
|
502
|
+
##### `onCloudTrailPutObject` <a name="onCloudTrailPutObject" id="@yicr/secure-bucket.SecureBucket.onCloudTrailPutObject"></a>
|
|
503
|
+
|
|
504
|
+
```typescript
|
|
505
|
+
public onCloudTrailPutObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
Defines an AWS CloudWatch event that triggers when an object is uploaded to the specified paths (keys) in this bucket using the PutObject API call.
|
|
509
|
+
|
|
510
|
+
Note that some tools like `aws s3 cp` will automatically use either
|
|
511
|
+
PutObject or the multipart upload API depending on the file size,
|
|
512
|
+
so using `onCloudTrailWriteObject` may be preferable.
|
|
513
|
+
|
|
514
|
+
Requires that there exists at least one CloudTrail Trail in your account
|
|
515
|
+
that captures the event. This method will not create the Trail.
|
|
516
|
+
|
|
517
|
+
###### `id`<sup>Required</sup> <a name="id" id="@yicr/secure-bucket.SecureBucket.onCloudTrailPutObject.parameter.id"></a>
|
|
518
|
+
|
|
519
|
+
- *Type:* string
|
|
520
|
+
|
|
521
|
+
The id of the rule.
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
###### `options`<sup>Optional</sup> <a name="options" id="@yicr/secure-bucket.SecureBucket.onCloudTrailPutObject.parameter.options"></a>
|
|
526
|
+
|
|
527
|
+
- *Type:* aws-cdk-lib.aws_s3.OnCloudTrailBucketEventOptions
|
|
528
|
+
|
|
529
|
+
Options for adding the rule.
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
##### `onCloudTrailWriteObject` <a name="onCloudTrailWriteObject" id="@yicr/secure-bucket.SecureBucket.onCloudTrailWriteObject"></a>
|
|
534
|
+
|
|
535
|
+
```typescript
|
|
536
|
+
public onCloudTrailWriteObject(id: string, options?: OnCloudTrailBucketEventOptions): Rule
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
Defines an AWS CloudWatch event that triggers when an object at the specified paths (keys) in this bucket are written to.
|
|
540
|
+
|
|
541
|
+
This includes
|
|
542
|
+
the events PutObject, CopyObject, and CompleteMultipartUpload.
|
|
543
|
+
|
|
544
|
+
Note that some tools like `aws s3 cp` will automatically use either
|
|
545
|
+
PutObject or the multipart upload API depending on the file size,
|
|
546
|
+
so using this method may be preferable to `onCloudTrailPutObject`.
|
|
547
|
+
|
|
548
|
+
Requires that there exists at least one CloudTrail Trail in your account
|
|
549
|
+
that captures the event. This method will not create the Trail.
|
|
550
|
+
|
|
551
|
+
###### `id`<sup>Required</sup> <a name="id" id="@yicr/secure-bucket.SecureBucket.onCloudTrailWriteObject.parameter.id"></a>
|
|
552
|
+
|
|
553
|
+
- *Type:* string
|
|
554
|
+
|
|
555
|
+
The id of the rule.
|
|
556
|
+
|
|
557
|
+
---
|
|
558
|
+
|
|
559
|
+
###### `options`<sup>Optional</sup> <a name="options" id="@yicr/secure-bucket.SecureBucket.onCloudTrailWriteObject.parameter.options"></a>
|
|
560
|
+
|
|
561
|
+
- *Type:* aws-cdk-lib.aws_s3.OnCloudTrailBucketEventOptions
|
|
562
|
+
|
|
563
|
+
Options for adding the rule.
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
##### `s3UrlForObject` <a name="s3UrlForObject" id="@yicr/secure-bucket.SecureBucket.s3UrlForObject"></a>
|
|
568
|
+
|
|
569
|
+
```typescript
|
|
570
|
+
public s3UrlForObject(key?: string): string
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
The S3 URL of an S3 object. For example:.
|
|
574
|
+
|
|
575
|
+
`s3://onlybucket`
|
|
576
|
+
- `s3://bucket/key`
|
|
577
|
+
|
|
578
|
+
###### `key`<sup>Optional</sup> <a name="key" id="@yicr/secure-bucket.SecureBucket.s3UrlForObject.parameter.key"></a>
|
|
579
|
+
|
|
580
|
+
- *Type:* string
|
|
581
|
+
|
|
582
|
+
The S3 key of the object.
|
|
583
|
+
|
|
584
|
+
If not specified, the S3 URL of the
|
|
585
|
+
bucket is returned.
|
|
586
|
+
|
|
587
|
+
---
|
|
588
|
+
|
|
589
|
+
##### `transferAccelerationUrlForObject` <a name="transferAccelerationUrlForObject" id="@yicr/secure-bucket.SecureBucket.transferAccelerationUrlForObject"></a>
|
|
590
|
+
|
|
591
|
+
```typescript
|
|
592
|
+
public transferAccelerationUrlForObject(key?: string, options?: TransferAccelerationUrlOptions): string
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
The https Transfer Acceleration URL of an S3 object.
|
|
596
|
+
|
|
597
|
+
Specify `dualStack: true` at the options
|
|
598
|
+
for dual-stack endpoint (connect to the bucket over IPv6). For example:
|
|
599
|
+
|
|
600
|
+
- `https://bucket.s3-accelerate.amazonaws.com`
|
|
601
|
+
- `https://bucket.s3-accelerate.amazonaws.com/key`
|
|
602
|
+
|
|
603
|
+
###### `key`<sup>Optional</sup> <a name="key" id="@yicr/secure-bucket.SecureBucket.transferAccelerationUrlForObject.parameter.key"></a>
|
|
604
|
+
|
|
605
|
+
- *Type:* string
|
|
606
|
+
|
|
607
|
+
The S3 key of the object.
|
|
608
|
+
|
|
609
|
+
If not specified, the URL of the
|
|
610
|
+
bucket is returned.
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
###### `options`<sup>Optional</sup> <a name="options" id="@yicr/secure-bucket.SecureBucket.transferAccelerationUrlForObject.parameter.options"></a>
|
|
615
|
+
|
|
616
|
+
- *Type:* aws-cdk-lib.aws_s3.TransferAccelerationUrlOptions
|
|
617
|
+
|
|
618
|
+
Options for generating URL.
|
|
619
|
+
|
|
620
|
+
---
|
|
621
|
+
|
|
622
|
+
##### `urlForObject` <a name="urlForObject" id="@yicr/secure-bucket.SecureBucket.urlForObject"></a>
|
|
623
|
+
|
|
624
|
+
```typescript
|
|
625
|
+
public urlForObject(key?: string): string
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
The https URL of an S3 object. Specify `regional: false` at the options for non-regional URLs. For example:.
|
|
629
|
+
|
|
630
|
+
`https://s3.us-west-1.amazonaws.com/onlybucket`
|
|
631
|
+
- `https://s3.us-west-1.amazonaws.com/bucket/key`
|
|
632
|
+
- `https://s3.cn-north-1.amazonaws.com.cn/china-bucket/mykey`
|
|
633
|
+
|
|
634
|
+
###### `key`<sup>Optional</sup> <a name="key" id="@yicr/secure-bucket.SecureBucket.urlForObject.parameter.key"></a>
|
|
635
|
+
|
|
636
|
+
- *Type:* string
|
|
637
|
+
|
|
638
|
+
The S3 key of the object.
|
|
639
|
+
|
|
640
|
+
If not specified, the URL of the
|
|
641
|
+
bucket is returned.
|
|
642
|
+
|
|
643
|
+
---
|
|
644
|
+
|
|
645
|
+
##### `virtualHostedUrlForObject` <a name="virtualHostedUrlForObject" id="@yicr/secure-bucket.SecureBucket.virtualHostedUrlForObject"></a>
|
|
646
|
+
|
|
647
|
+
```typescript
|
|
648
|
+
public virtualHostedUrlForObject(key?: string, options?: VirtualHostedStyleUrlOptions): string
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
The virtual hosted-style URL of an S3 object. Specify `regional: false` at the options for non-regional URL. For example:.
|
|
652
|
+
|
|
653
|
+
`https://only-bucket.s3.us-west-1.amazonaws.com`
|
|
654
|
+
- `https://bucket.s3.us-west-1.amazonaws.com/key`
|
|
655
|
+
- `https://bucket.s3.amazonaws.com/key`
|
|
656
|
+
- `https://china-bucket.s3.cn-north-1.amazonaws.com.cn/mykey`
|
|
657
|
+
|
|
658
|
+
###### `key`<sup>Optional</sup> <a name="key" id="@yicr/secure-bucket.SecureBucket.virtualHostedUrlForObject.parameter.key"></a>
|
|
659
|
+
|
|
660
|
+
- *Type:* string
|
|
661
|
+
|
|
662
|
+
The S3 key of the object.
|
|
663
|
+
|
|
664
|
+
If not specified, the URL of the
|
|
665
|
+
bucket is returned.
|
|
666
|
+
|
|
667
|
+
---
|
|
668
|
+
|
|
669
|
+
###### `options`<sup>Optional</sup> <a name="options" id="@yicr/secure-bucket.SecureBucket.virtualHostedUrlForObject.parameter.options"></a>
|
|
670
|
+
|
|
671
|
+
- *Type:* aws-cdk-lib.aws_s3.VirtualHostedStyleUrlOptions
|
|
672
|
+
|
|
673
|
+
Options for generating URL.
|
|
674
|
+
|
|
675
|
+
---
|
|
676
|
+
|
|
677
|
+
##### `addCorsRule` <a name="addCorsRule" id="@yicr/secure-bucket.SecureBucket.addCorsRule"></a>
|
|
678
|
+
|
|
679
|
+
```typescript
|
|
680
|
+
public addCorsRule(rule: CorsRule): void
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
Adds a cross-origin access configuration for objects in an Amazon S3 bucket.
|
|
684
|
+
|
|
685
|
+
###### `rule`<sup>Required</sup> <a name="rule" id="@yicr/secure-bucket.SecureBucket.addCorsRule.parameter.rule"></a>
|
|
686
|
+
|
|
687
|
+
- *Type:* aws-cdk-lib.aws_s3.CorsRule
|
|
688
|
+
|
|
689
|
+
The CORS configuration rule to add.
|
|
690
|
+
|
|
691
|
+
---
|
|
692
|
+
|
|
693
|
+
##### `addInventory` <a name="addInventory" id="@yicr/secure-bucket.SecureBucket.addInventory"></a>
|
|
694
|
+
|
|
695
|
+
```typescript
|
|
696
|
+
public addInventory(inventory: Inventory): void
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
Add an inventory configuration.
|
|
700
|
+
|
|
701
|
+
###### `inventory`<sup>Required</sup> <a name="inventory" id="@yicr/secure-bucket.SecureBucket.addInventory.parameter.inventory"></a>
|
|
702
|
+
|
|
703
|
+
- *Type:* aws-cdk-lib.aws_s3.Inventory
|
|
704
|
+
|
|
705
|
+
configuration to add.
|
|
706
|
+
|
|
707
|
+
---
|
|
708
|
+
|
|
709
|
+
##### `addLifecycleRule` <a name="addLifecycleRule" id="@yicr/secure-bucket.SecureBucket.addLifecycleRule"></a>
|
|
710
|
+
|
|
711
|
+
```typescript
|
|
712
|
+
public addLifecycleRule(rule: LifecycleRule): void
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
Add a lifecycle rule to the bucket.
|
|
716
|
+
|
|
717
|
+
###### `rule`<sup>Required</sup> <a name="rule" id="@yicr/secure-bucket.SecureBucket.addLifecycleRule.parameter.rule"></a>
|
|
718
|
+
|
|
719
|
+
- *Type:* aws-cdk-lib.aws_s3.LifecycleRule
|
|
720
|
+
|
|
721
|
+
The rule to add.
|
|
722
|
+
|
|
723
|
+
---
|
|
724
|
+
|
|
725
|
+
##### `addMetric` <a name="addMetric" id="@yicr/secure-bucket.SecureBucket.addMetric"></a>
|
|
726
|
+
|
|
727
|
+
```typescript
|
|
728
|
+
public addMetric(metric: BucketMetrics): void
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
Adds a metrics configuration for the CloudWatch request metrics from the bucket.
|
|
732
|
+
|
|
733
|
+
###### `metric`<sup>Required</sup> <a name="metric" id="@yicr/secure-bucket.SecureBucket.addMetric.parameter.metric"></a>
|
|
734
|
+
|
|
735
|
+
- *Type:* aws-cdk-lib.aws_s3.BucketMetrics
|
|
736
|
+
|
|
737
|
+
The metric configuration to add.
|
|
738
|
+
|
|
739
|
+
---
|
|
740
|
+
|
|
741
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
742
|
+
|
|
743
|
+
| **Name** | **Description** |
|
|
744
|
+
| --- | --- |
|
|
745
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
746
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.isOwnedResource">isOwnedResource</a></code> | Returns true if the construct was created by CDK, and false otherwise. |
|
|
747
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.isResource">isResource</a></code> | Check whether the given construct is a Resource. |
|
|
748
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.fromBucketArn">fromBucketArn</a></code> | *No description.* |
|
|
749
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.fromBucketAttributes">fromBucketAttributes</a></code> | Creates a Bucket construct that represents an external bucket. |
|
|
750
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.fromBucketName">fromBucketName</a></code> | *No description.* |
|
|
751
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.fromCfnBucket">fromCfnBucket</a></code> | Create a mutable `IBucket` based on a low-level `CfnBucket`. |
|
|
752
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.validateBucketName">validateBucketName</a></code> | Thrown an exception if the given bucket name is not valid. |
|
|
753
|
+
|
|
754
|
+
---
|
|
755
|
+
|
|
756
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="@yicr/secure-bucket.SecureBucket.isConstruct"></a>
|
|
757
|
+
|
|
758
|
+
```typescript
|
|
759
|
+
import { SecureBucket } from '@yicr/secure-bucket'
|
|
760
|
+
|
|
761
|
+
SecureBucket.isConstruct(x: any)
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
Checks if `x` is a construct.
|
|
765
|
+
|
|
766
|
+
###### `x`<sup>Required</sup> <a name="x" id="@yicr/secure-bucket.SecureBucket.isConstruct.parameter.x"></a>
|
|
767
|
+
|
|
768
|
+
- *Type:* any
|
|
769
|
+
|
|
770
|
+
Any object.
|
|
771
|
+
|
|
772
|
+
---
|
|
773
|
+
|
|
774
|
+
##### `isOwnedResource` <a name="isOwnedResource" id="@yicr/secure-bucket.SecureBucket.isOwnedResource"></a>
|
|
775
|
+
|
|
776
|
+
```typescript
|
|
777
|
+
import { SecureBucket } from '@yicr/secure-bucket'
|
|
778
|
+
|
|
779
|
+
SecureBucket.isOwnedResource(construct: IConstruct)
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
Returns true if the construct was created by CDK, and false otherwise.
|
|
783
|
+
|
|
784
|
+
###### `construct`<sup>Required</sup> <a name="construct" id="@yicr/secure-bucket.SecureBucket.isOwnedResource.parameter.construct"></a>
|
|
785
|
+
|
|
786
|
+
- *Type:* constructs.IConstruct
|
|
787
|
+
|
|
788
|
+
---
|
|
789
|
+
|
|
790
|
+
##### `isResource` <a name="isResource" id="@yicr/secure-bucket.SecureBucket.isResource"></a>
|
|
791
|
+
|
|
792
|
+
```typescript
|
|
793
|
+
import { SecureBucket } from '@yicr/secure-bucket'
|
|
794
|
+
|
|
795
|
+
SecureBucket.isResource(construct: IConstruct)
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
Check whether the given construct is a Resource.
|
|
799
|
+
|
|
800
|
+
###### `construct`<sup>Required</sup> <a name="construct" id="@yicr/secure-bucket.SecureBucket.isResource.parameter.construct"></a>
|
|
801
|
+
|
|
802
|
+
- *Type:* constructs.IConstruct
|
|
803
|
+
|
|
804
|
+
---
|
|
805
|
+
|
|
806
|
+
##### `fromBucketArn` <a name="fromBucketArn" id="@yicr/secure-bucket.SecureBucket.fromBucketArn"></a>
|
|
807
|
+
|
|
808
|
+
```typescript
|
|
809
|
+
import { SecureBucket } from '@yicr/secure-bucket'
|
|
810
|
+
|
|
811
|
+
SecureBucket.fromBucketArn(scope: Construct, id: string, bucketArn: string)
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@yicr/secure-bucket.SecureBucket.fromBucketArn.parameter.scope"></a>
|
|
815
|
+
|
|
816
|
+
- *Type:* constructs.Construct
|
|
817
|
+
|
|
818
|
+
---
|
|
819
|
+
|
|
820
|
+
###### `id`<sup>Required</sup> <a name="id" id="@yicr/secure-bucket.SecureBucket.fromBucketArn.parameter.id"></a>
|
|
821
|
+
|
|
822
|
+
- *Type:* string
|
|
823
|
+
|
|
824
|
+
---
|
|
825
|
+
|
|
826
|
+
###### `bucketArn`<sup>Required</sup> <a name="bucketArn" id="@yicr/secure-bucket.SecureBucket.fromBucketArn.parameter.bucketArn"></a>
|
|
827
|
+
|
|
828
|
+
- *Type:* string
|
|
829
|
+
|
|
830
|
+
---
|
|
831
|
+
|
|
832
|
+
##### `fromBucketAttributes` <a name="fromBucketAttributes" id="@yicr/secure-bucket.SecureBucket.fromBucketAttributes"></a>
|
|
833
|
+
|
|
834
|
+
```typescript
|
|
835
|
+
import { SecureBucket } from '@yicr/secure-bucket'
|
|
836
|
+
|
|
837
|
+
SecureBucket.fromBucketAttributes(scope: Construct, id: string, attrs: BucketAttributes)
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
Creates a Bucket construct that represents an external bucket.
|
|
841
|
+
|
|
842
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@yicr/secure-bucket.SecureBucket.fromBucketAttributes.parameter.scope"></a>
|
|
843
|
+
|
|
844
|
+
- *Type:* constructs.Construct
|
|
845
|
+
|
|
846
|
+
The parent creating construct (usually `this`).
|
|
847
|
+
|
|
848
|
+
---
|
|
849
|
+
|
|
850
|
+
###### `id`<sup>Required</sup> <a name="id" id="@yicr/secure-bucket.SecureBucket.fromBucketAttributes.parameter.id"></a>
|
|
851
|
+
|
|
852
|
+
- *Type:* string
|
|
853
|
+
|
|
854
|
+
The construct's name.
|
|
855
|
+
|
|
856
|
+
---
|
|
857
|
+
|
|
858
|
+
###### `attrs`<sup>Required</sup> <a name="attrs" id="@yicr/secure-bucket.SecureBucket.fromBucketAttributes.parameter.attrs"></a>
|
|
859
|
+
|
|
860
|
+
- *Type:* aws-cdk-lib.aws_s3.BucketAttributes
|
|
861
|
+
|
|
862
|
+
A `BucketAttributes` object.
|
|
863
|
+
|
|
864
|
+
Can be obtained from a call to
|
|
865
|
+
`bucket.export()` or manually created.
|
|
866
|
+
|
|
867
|
+
---
|
|
868
|
+
|
|
869
|
+
##### `fromBucketName` <a name="fromBucketName" id="@yicr/secure-bucket.SecureBucket.fromBucketName"></a>
|
|
870
|
+
|
|
871
|
+
```typescript
|
|
872
|
+
import { SecureBucket } from '@yicr/secure-bucket'
|
|
873
|
+
|
|
874
|
+
SecureBucket.fromBucketName(scope: Construct, id: string, bucketName: string)
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@yicr/secure-bucket.SecureBucket.fromBucketName.parameter.scope"></a>
|
|
878
|
+
|
|
879
|
+
- *Type:* constructs.Construct
|
|
880
|
+
|
|
881
|
+
---
|
|
882
|
+
|
|
883
|
+
###### `id`<sup>Required</sup> <a name="id" id="@yicr/secure-bucket.SecureBucket.fromBucketName.parameter.id"></a>
|
|
884
|
+
|
|
885
|
+
- *Type:* string
|
|
886
|
+
|
|
887
|
+
---
|
|
888
|
+
|
|
889
|
+
###### `bucketName`<sup>Required</sup> <a name="bucketName" id="@yicr/secure-bucket.SecureBucket.fromBucketName.parameter.bucketName"></a>
|
|
890
|
+
|
|
891
|
+
- *Type:* string
|
|
892
|
+
|
|
893
|
+
---
|
|
894
|
+
|
|
895
|
+
##### `fromCfnBucket` <a name="fromCfnBucket" id="@yicr/secure-bucket.SecureBucket.fromCfnBucket"></a>
|
|
896
|
+
|
|
897
|
+
```typescript
|
|
898
|
+
import { SecureBucket } from '@yicr/secure-bucket'
|
|
899
|
+
|
|
900
|
+
SecureBucket.fromCfnBucket(cfnBucket: CfnBucket)
|
|
901
|
+
```
|
|
902
|
+
|
|
903
|
+
Create a mutable `IBucket` based on a low-level `CfnBucket`.
|
|
904
|
+
|
|
905
|
+
###### `cfnBucket`<sup>Required</sup> <a name="cfnBucket" id="@yicr/secure-bucket.SecureBucket.fromCfnBucket.parameter.cfnBucket"></a>
|
|
906
|
+
|
|
907
|
+
- *Type:* aws-cdk-lib.aws_s3.CfnBucket
|
|
908
|
+
|
|
909
|
+
---
|
|
910
|
+
|
|
911
|
+
##### `validateBucketName` <a name="validateBucketName" id="@yicr/secure-bucket.SecureBucket.validateBucketName"></a>
|
|
912
|
+
|
|
913
|
+
```typescript
|
|
914
|
+
import { SecureBucket } from '@yicr/secure-bucket'
|
|
915
|
+
|
|
916
|
+
SecureBucket.validateBucketName(physicalName: string)
|
|
917
|
+
```
|
|
918
|
+
|
|
919
|
+
Thrown an exception if the given bucket name is not valid.
|
|
920
|
+
|
|
921
|
+
###### `physicalName`<sup>Required</sup> <a name="physicalName" id="@yicr/secure-bucket.SecureBucket.validateBucketName.parameter.physicalName"></a>
|
|
922
|
+
|
|
923
|
+
- *Type:* string
|
|
924
|
+
|
|
925
|
+
name of the bucket.
|
|
926
|
+
|
|
927
|
+
---
|
|
928
|
+
|
|
929
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
930
|
+
|
|
931
|
+
| **Name** | **Type** | **Description** |
|
|
932
|
+
| --- | --- | --- |
|
|
933
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
934
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.env">env</a></code> | <code>aws-cdk-lib.ResourceEnvironment</code> | The environment this resource belongs to. |
|
|
935
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | The stack in which this resource is defined. |
|
|
936
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.bucketArn">bucketArn</a></code> | <code>string</code> | The ARN of the bucket. |
|
|
937
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.bucketDomainName">bucketDomainName</a></code> | <code>string</code> | The IPv4 DNS name of the specified bucket. |
|
|
938
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.bucketDualStackDomainName">bucketDualStackDomainName</a></code> | <code>string</code> | The IPv6 DNS name of the specified bucket. |
|
|
939
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.bucketName">bucketName</a></code> | <code>string</code> | The name of the bucket. |
|
|
940
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.bucketRegionalDomainName">bucketRegionalDomainName</a></code> | <code>string</code> | The regional domain name of the specified bucket. |
|
|
941
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.bucketWebsiteDomainName">bucketWebsiteDomainName</a></code> | <code>string</code> | The Domain name of the static website. |
|
|
942
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.bucketWebsiteUrl">bucketWebsiteUrl</a></code> | <code>string</code> | The URL of the static website. |
|
|
943
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.encryptionKey">encryptionKey</a></code> | <code>aws-cdk-lib.aws_kms.IKey</code> | Optional KMS encryption key associated with this bucket. |
|
|
944
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.isWebsite">isWebsite</a></code> | <code>boolean</code> | If this bucket has been configured for static website hosting. |
|
|
945
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucket.property.policy">policy</a></code> | <code>aws-cdk-lib.aws_s3.BucketPolicy</code> | The resource policy associated with this bucket. |
|
|
946
|
+
|
|
947
|
+
---
|
|
948
|
+
|
|
949
|
+
##### `node`<sup>Required</sup> <a name="node" id="@yicr/secure-bucket.SecureBucket.property.node"></a>
|
|
950
|
+
|
|
951
|
+
```typescript
|
|
952
|
+
public readonly node: Node;
|
|
953
|
+
```
|
|
954
|
+
|
|
955
|
+
- *Type:* constructs.Node
|
|
956
|
+
|
|
957
|
+
The tree node.
|
|
958
|
+
|
|
959
|
+
---
|
|
960
|
+
|
|
961
|
+
##### `env`<sup>Required</sup> <a name="env" id="@yicr/secure-bucket.SecureBucket.property.env"></a>
|
|
962
|
+
|
|
963
|
+
```typescript
|
|
964
|
+
public readonly env: ResourceEnvironment;
|
|
965
|
+
```
|
|
966
|
+
|
|
967
|
+
- *Type:* aws-cdk-lib.ResourceEnvironment
|
|
968
|
+
|
|
969
|
+
The environment this resource belongs to.
|
|
970
|
+
|
|
971
|
+
For resources that are created and managed by the CDK
|
|
972
|
+
(generally, those created by creating new class instances like Role, Bucket, etc.),
|
|
973
|
+
this is always the same as the environment of the stack they belong to;
|
|
974
|
+
however, for imported resources
|
|
975
|
+
(those obtained from static methods like fromRoleArn, fromBucketName, etc.),
|
|
976
|
+
that might be different than the stack they were imported into.
|
|
977
|
+
|
|
978
|
+
---
|
|
979
|
+
|
|
980
|
+
##### `stack`<sup>Required</sup> <a name="stack" id="@yicr/secure-bucket.SecureBucket.property.stack"></a>
|
|
981
|
+
|
|
982
|
+
```typescript
|
|
983
|
+
public readonly stack: Stack;
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
- *Type:* aws-cdk-lib.Stack
|
|
987
|
+
|
|
988
|
+
The stack in which this resource is defined.
|
|
989
|
+
|
|
990
|
+
---
|
|
991
|
+
|
|
992
|
+
##### `bucketArn`<sup>Required</sup> <a name="bucketArn" id="@yicr/secure-bucket.SecureBucket.property.bucketArn"></a>
|
|
993
|
+
|
|
994
|
+
```typescript
|
|
995
|
+
public readonly bucketArn: string;
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
- *Type:* string
|
|
999
|
+
|
|
1000
|
+
The ARN of the bucket.
|
|
1001
|
+
|
|
1002
|
+
---
|
|
1003
|
+
|
|
1004
|
+
##### `bucketDomainName`<sup>Required</sup> <a name="bucketDomainName" id="@yicr/secure-bucket.SecureBucket.property.bucketDomainName"></a>
|
|
1005
|
+
|
|
1006
|
+
```typescript
|
|
1007
|
+
public readonly bucketDomainName: string;
|
|
1008
|
+
```
|
|
1009
|
+
|
|
1010
|
+
- *Type:* string
|
|
1011
|
+
|
|
1012
|
+
The IPv4 DNS name of the specified bucket.
|
|
1013
|
+
|
|
1014
|
+
---
|
|
1015
|
+
|
|
1016
|
+
##### `bucketDualStackDomainName`<sup>Required</sup> <a name="bucketDualStackDomainName" id="@yicr/secure-bucket.SecureBucket.property.bucketDualStackDomainName"></a>
|
|
1017
|
+
|
|
1018
|
+
```typescript
|
|
1019
|
+
public readonly bucketDualStackDomainName: string;
|
|
1020
|
+
```
|
|
1021
|
+
|
|
1022
|
+
- *Type:* string
|
|
1023
|
+
|
|
1024
|
+
The IPv6 DNS name of the specified bucket.
|
|
1025
|
+
|
|
1026
|
+
---
|
|
1027
|
+
|
|
1028
|
+
##### `bucketName`<sup>Required</sup> <a name="bucketName" id="@yicr/secure-bucket.SecureBucket.property.bucketName"></a>
|
|
1029
|
+
|
|
1030
|
+
```typescript
|
|
1031
|
+
public readonly bucketName: string;
|
|
1032
|
+
```
|
|
1033
|
+
|
|
1034
|
+
- *Type:* string
|
|
1035
|
+
|
|
1036
|
+
The name of the bucket.
|
|
1037
|
+
|
|
1038
|
+
---
|
|
1039
|
+
|
|
1040
|
+
##### `bucketRegionalDomainName`<sup>Required</sup> <a name="bucketRegionalDomainName" id="@yicr/secure-bucket.SecureBucket.property.bucketRegionalDomainName"></a>
|
|
1041
|
+
|
|
1042
|
+
```typescript
|
|
1043
|
+
public readonly bucketRegionalDomainName: string;
|
|
1044
|
+
```
|
|
1045
|
+
|
|
1046
|
+
- *Type:* string
|
|
1047
|
+
|
|
1048
|
+
The regional domain name of the specified bucket.
|
|
1049
|
+
|
|
1050
|
+
---
|
|
1051
|
+
|
|
1052
|
+
##### `bucketWebsiteDomainName`<sup>Required</sup> <a name="bucketWebsiteDomainName" id="@yicr/secure-bucket.SecureBucket.property.bucketWebsiteDomainName"></a>
|
|
1053
|
+
|
|
1054
|
+
```typescript
|
|
1055
|
+
public readonly bucketWebsiteDomainName: string;
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
- *Type:* string
|
|
1059
|
+
|
|
1060
|
+
The Domain name of the static website.
|
|
1061
|
+
|
|
1062
|
+
---
|
|
1063
|
+
|
|
1064
|
+
##### `bucketWebsiteUrl`<sup>Required</sup> <a name="bucketWebsiteUrl" id="@yicr/secure-bucket.SecureBucket.property.bucketWebsiteUrl"></a>
|
|
1065
|
+
|
|
1066
|
+
```typescript
|
|
1067
|
+
public readonly bucketWebsiteUrl: string;
|
|
1068
|
+
```
|
|
1069
|
+
|
|
1070
|
+
- *Type:* string
|
|
1071
|
+
|
|
1072
|
+
The URL of the static website.
|
|
1073
|
+
|
|
1074
|
+
---
|
|
1075
|
+
|
|
1076
|
+
##### `encryptionKey`<sup>Optional</sup> <a name="encryptionKey" id="@yicr/secure-bucket.SecureBucket.property.encryptionKey"></a>
|
|
1077
|
+
|
|
1078
|
+
```typescript
|
|
1079
|
+
public readonly encryptionKey: IKey;
|
|
1080
|
+
```
|
|
1081
|
+
|
|
1082
|
+
- *Type:* aws-cdk-lib.aws_kms.IKey
|
|
1083
|
+
|
|
1084
|
+
Optional KMS encryption key associated with this bucket.
|
|
1085
|
+
|
|
1086
|
+
---
|
|
1087
|
+
|
|
1088
|
+
##### `isWebsite`<sup>Optional</sup> <a name="isWebsite" id="@yicr/secure-bucket.SecureBucket.property.isWebsite"></a>
|
|
1089
|
+
|
|
1090
|
+
```typescript
|
|
1091
|
+
public readonly isWebsite: boolean;
|
|
1092
|
+
```
|
|
1093
|
+
|
|
1094
|
+
- *Type:* boolean
|
|
1095
|
+
|
|
1096
|
+
If this bucket has been configured for static website hosting.
|
|
1097
|
+
|
|
1098
|
+
---
|
|
1099
|
+
|
|
1100
|
+
##### `policy`<sup>Optional</sup> <a name="policy" id="@yicr/secure-bucket.SecureBucket.property.policy"></a>
|
|
1101
|
+
|
|
1102
|
+
```typescript
|
|
1103
|
+
public readonly policy: BucketPolicy;
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
- *Type:* aws-cdk-lib.aws_s3.BucketPolicy
|
|
1107
|
+
|
|
1108
|
+
The resource policy associated with this bucket.
|
|
1109
|
+
|
|
1110
|
+
If `autoCreatePolicy` is true, a `BucketPolicy` will be created upon the
|
|
1111
|
+
first call to addToResourcePolicy(s).
|
|
1112
|
+
|
|
1113
|
+
---
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
## Structs <a name="Structs" id="Structs"></a>
|
|
1117
|
+
|
|
1118
|
+
### SecureBucketProps <a name="SecureBucketProps" id="@yicr/secure-bucket.SecureBucketProps"></a>
|
|
1119
|
+
|
|
1120
|
+
#### Initializer <a name="Initializer" id="@yicr/secure-bucket.SecureBucketProps.Initializer"></a>
|
|
1121
|
+
|
|
1122
|
+
```typescript
|
|
1123
|
+
import { SecureBucketProps } from '@yicr/secure-bucket'
|
|
1124
|
+
|
|
1125
|
+
const secureBucketProps: SecureBucketProps = { ... }
|
|
1126
|
+
```
|
|
1127
|
+
|
|
1128
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1129
|
+
|
|
1130
|
+
| **Name** | **Type** | **Description** |
|
|
1131
|
+
| --- | --- | --- |
|
|
1132
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucketProps.property.bucketName">bucketName</a></code> | <code>string</code> | *No description.* |
|
|
1133
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucketProps.property.encryption">encryption</a></code> | <code><a href="#@yicr/secure-bucket.SecureBucketEncryption">SecureBucketEncryption</a></code> | *No description.* |
|
|
1134
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucketProps.property.versioned">versioned</a></code> | <code>boolean</code> | *No description.* |
|
|
1135
|
+
|
|
1136
|
+
---
|
|
1137
|
+
|
|
1138
|
+
##### `bucketName`<sup>Optional</sup> <a name="bucketName" id="@yicr/secure-bucket.SecureBucketProps.property.bucketName"></a>
|
|
1139
|
+
|
|
1140
|
+
```typescript
|
|
1141
|
+
public readonly bucketName: string;
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
- *Type:* string
|
|
1145
|
+
|
|
1146
|
+
---
|
|
1147
|
+
|
|
1148
|
+
##### `encryption`<sup>Optional</sup> <a name="encryption" id="@yicr/secure-bucket.SecureBucketProps.property.encryption"></a>
|
|
1149
|
+
|
|
1150
|
+
```typescript
|
|
1151
|
+
public readonly encryption: SecureBucketEncryption;
|
|
1152
|
+
```
|
|
1153
|
+
|
|
1154
|
+
- *Type:* <a href="#@yicr/secure-bucket.SecureBucketEncryption">SecureBucketEncryption</a>
|
|
1155
|
+
|
|
1156
|
+
---
|
|
1157
|
+
|
|
1158
|
+
##### `versioned`<sup>Optional</sup> <a name="versioned" id="@yicr/secure-bucket.SecureBucketProps.property.versioned"></a>
|
|
1159
|
+
|
|
1160
|
+
```typescript
|
|
1161
|
+
public readonly versioned: boolean;
|
|
1162
|
+
```
|
|
1163
|
+
|
|
1164
|
+
- *Type:* boolean
|
|
1165
|
+
|
|
1166
|
+
---
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
## Enums <a name="Enums" id="Enums"></a>
|
|
1171
|
+
|
|
1172
|
+
### SecureBucketEncryption <a name="SecureBucketEncryption" id="@yicr/secure-bucket.SecureBucketEncryption"></a>
|
|
1173
|
+
|
|
1174
|
+
#### Members <a name="Members" id="Members"></a>
|
|
1175
|
+
|
|
1176
|
+
| **Name** | **Description** |
|
|
1177
|
+
| --- | --- |
|
|
1178
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucketEncryption.KMS_MANAGED">KMS_MANAGED</a></code> | Server-side KMS encryption with a master key managed by KMS. |
|
|
1179
|
+
| <code><a href="#@yicr/secure-bucket.SecureBucketEncryption.S3_MANAGED">S3_MANAGED</a></code> | Server-side encryption with a master key managed by S3. |
|
|
1180
|
+
|
|
1181
|
+
---
|
|
1182
|
+
|
|
1183
|
+
##### `KMS_MANAGED` <a name="KMS_MANAGED" id="@yicr/secure-bucket.SecureBucketEncryption.KMS_MANAGED"></a>
|
|
1184
|
+
|
|
1185
|
+
Server-side KMS encryption with a master key managed by KMS.
|
|
1186
|
+
|
|
1187
|
+
---
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
##### `S3_MANAGED` <a name="S3_MANAGED" id="@yicr/secure-bucket.SecureBucketEncryption.S3_MANAGED"></a>
|
|
1191
|
+
|
|
1192
|
+
Server-side encryption with a master key managed by S3.
|
|
1193
|
+
|
|
1194
|
+
---
|
|
1195
|
+
|