Skip to content

Commit bae7040

Browse files
samples: Add Soft Delete policy and object management samples (#2676)
* samples: Add Soft Delete policy and object management samples Adds complete code samples demonstrating the following operations: - storage_disable_soft_delete - storage_get_soft_delete_policy - storage_set_soft_delete_policy - storage_list_soft_deleted_objects - storage_list_soft_deleted_object_versions - storage_restore_object * remove conflict * bug fix * refactor: Use literal for retention duration and improve test assertion - Removed the SOFT_DELETE_RETENTION_SECONDS constant, replacing it with the literal value (604800) and adding a comment. - Updated the listSoftDeletedObjectVersions test to assert on the object generation number, improving test coverage and reflecting the logging change. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 274fd4e commit bae7040

File tree

10 files changed

+503
-0
lines changed

10 files changed

+503
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-storage/tre
129129
| Storage Disable Bucket Versioning. | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/disableBucketVersioning.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/disableBucketVersioning.js,samples/README.md) |
130130
| Disable Default Event Based Hold | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/disableDefaultEventBasedHold.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/disableDefaultEventBasedHold.js,samples/README.md) |
131131
| Disable Requester Pays | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/disableRequesterPays.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/disableRequesterPays.js,samples/README.md) |
132+
| Disable Soft Delete | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/disableSoftDelete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/disableSoftDelete.js,samples/README.md) |
132133
| Disable Uniform Bucket Level Access | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/disableUniformBucketLevelAccess.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/disableUniformBucketLevelAccess.js,samples/README.md) |
133134
| Download Byte Range | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/downloadByteRange.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/downloadByteRange.js,samples/README.md) |
134135
| Download Encrypted File | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/downloadEncryptedFile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/downloadEncryptedFile.js,samples/README.md) |
@@ -161,6 +162,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-storage/tre
161162
| Get Requester Pays Status | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/getRequesterPaysStatus.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/getRequesterPaysStatus.js,samples/README.md) |
162163
| Get Retention Policy | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/getRetentionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/getRetentionPolicy.js,samples/README.md) |
163164
| Storage Get Service Account. | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/getServiceAccount.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/getServiceAccount.js,samples/README.md) |
165+
| Get Soft Delete Policy | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/getSoftDeletePolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/getSoftDeletePolicy.js,samples/README.md) |
164166
| Get Soft Deleted Bucket | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/getSoftDeletedBucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/getSoftDeletedBucket.js,samples/README.md) |
165167
| Get Uniform Bucket Level Access | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/getUniformBucketLevelAccess.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/getUniformBucketLevelAccess.js,samples/README.md) |
166168
| Activate HMAC SA Key. | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/hmacKeyActivate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/hmacKeyActivate.js,samples/README.md) |
@@ -176,6 +178,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-storage/tre
176178
| List Files with Old Versions. | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/listFilesWithOldVersions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/listFilesWithOldVersions.js,samples/README.md) |
177179
| List Notifications | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/listNotifications.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/listNotifications.js,samples/README.md) |
178180
| List Soft Deleted Bucket | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/listSoftDeletedBucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/listSoftDeletedBucket.js,samples/README.md) |
181+
| List Soft Deleted Object Versions | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/listSoftDeletedObjectVersions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/listSoftDeletedObjectVersions.js,samples/README.md) |
182+
| List Soft Deleted Objects | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/listSoftDeletedObjects.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/listSoftDeletedObjects.js,samples/README.md) |
179183
| Lock Retention Policy | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/lockRetentionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/lockRetentionPolicy.js,samples/README.md) |
180184
| Storage Make Bucket Public. | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/makeBucketPublic.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/makeBucketPublic.js,samples/README.md) |
181185
| Make Public | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/makePublic.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/makePublic.js,samples/README.md) |
@@ -199,6 +203,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-storage/tre
199203
| Remove Retention Policy | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/removeRetentionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/removeRetentionPolicy.js,samples/README.md) |
200204
| Rename File | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/renameFile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/renameFile.js,samples/README.md) |
201205
| Restore Soft Deleted Bucket | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/restoreSoftDeletedBucket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/restoreSoftDeletedBucket.js,samples/README.md) |
206+
| Restore Soft Deleted Object | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/restoreSoftDeletedObject.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/restoreSoftDeletedObject.js,samples/README.md) |
202207
| Rotate Encryption Key | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/rotateEncryptionKey.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/rotateEncryptionKey.js,samples/README.md) |
203208
| Set Autoclass | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setAutoclass.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setAutoclass.js,samples/README.md) |
204209
| Set Client Endpoint | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setClientEndpoint.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setClientEndpoint.js,samples/README.md) |
@@ -209,6 +214,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-storage/tre
209214
| Set RPO Async Turbo | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setRPOAsyncTurbo.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setRPOAsyncTurbo.js,samples/README.md) |
210215
| Set RPO Default | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setRPODefault.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setRPODefault.js,samples/README.md) |
211216
| Set Retention Policy | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setRetentionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setRetentionPolicy.js,samples/README.md) |
217+
| Set Soft Delete Policy | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setSoftDeletePolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setSoftDeletePolicy.js,samples/README.md) |
212218
| Set Temporary Hold | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setTemporaryHold.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setTemporaryHold.js,samples/README.md) |
213219
| Stream File Download | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/streamFileDownload.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/streamFileDownload.js,samples/README.md) |
214220
| Stream File Upload | [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/streamFileUpload.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/streamFileUpload.js,samples/README.md) |

samples/README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ objects to users via direct download.
4848
* [Storage Disable Bucket Versioning.](#storage-disable-bucket-versioning.)
4949
* [Disable Default Event Based Hold](#disable-default-event-based-hold)
5050
* [Disable Requester Pays](#disable-requester-pays)
51+
* [Disable Soft Delete](#disable-soft-delete)
5152
* [Disable Uniform Bucket Level Access](#disable-uniform-bucket-level-access)
5253
* [Download Byte Range](#download-byte-range)
5354
* [Download Encrypted File](#download-encrypted-file)
@@ -80,6 +81,7 @@ objects to users via direct download.
8081
* [Get Requester Pays Status](#get-requester-pays-status)
8182
* [Get Retention Policy](#get-retention-policy)
8283
* [Storage Get Service Account.](#storage-get-service-account.)
84+
* [Get Soft Delete Policy](#get-soft-delete-policy)
8385
* [Get Soft Deleted Bucket](#get-soft-deleted-bucket)
8486
* [Get Uniform Bucket Level Access](#get-uniform-bucket-level-access)
8587
* [Activate HMAC SA Key.](#activate-hmac-sa-key.)
@@ -95,6 +97,8 @@ objects to users via direct download.
9597
* [List Files with Old Versions.](#list-files-with-old-versions.)
9698
* [List Notifications](#list-notifications)
9799
* [List Soft Deleted Bucket](#list-soft-deleted-bucket)
100+
* [List Soft Deleted Object Versions](#list-soft-deleted-object-versions)
101+
* [List Soft Deleted Objects](#list-soft-deleted-objects)
98102
* [Lock Retention Policy](#lock-retention-policy)
99103
* [Storage Make Bucket Public.](#storage-make-bucket-public.)
100104
* [Make Public](#make-public)
@@ -118,6 +122,7 @@ objects to users via direct download.
118122
* [Remove Retention Policy](#remove-retention-policy)
119123
* [Rename File](#rename-file)
120124
* [Restore Soft Deleted Bucket](#restore-soft-deleted-bucket)
125+
* [Restore Soft Deleted Object](#restore-soft-deleted-object)
121126
* [Rotate Encryption Key](#rotate-encryption-key)
122127
* [Set Autoclass](#set-autoclass)
123128
* [Set Client Endpoint](#set-client-endpoint)
@@ -128,6 +133,7 @@ objects to users via direct download.
128133
* [Set RPO Async Turbo](#set-rpo-async-turbo)
129134
* [Set RPO Default](#set-rpo-default)
130135
* [Set Retention Policy](#set-retention-policy)
136+
* [Set Soft Delete Policy](#set-soft-delete-policy)
131137
* [Set Temporary Hold](#set-temporary-hold)
132138
* [Stream File Download](#stream-file-download)
133139
* [Stream File Upload](#stream-file-upload)
@@ -696,6 +702,23 @@ __Usage:__
696702

697703

698704

705+
### Disable Soft Delete
706+
707+
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/disableSoftDelete.js).
708+
709+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/disableSoftDelete.js,samples/README.md)
710+
711+
__Usage:__
712+
713+
714+
`node samples/disableSoftDelete.js`
715+
716+
717+
-----
718+
719+
720+
721+
699722
### Disable Uniform Bucket Level Access
700723

701724
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/disableUniformBucketLevelAccess.js).
@@ -1256,6 +1279,23 @@ __Usage:__
12561279

12571280

12581281

1282+
### Get Soft Delete Policy
1283+
1284+
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/getSoftDeletePolicy.js).
1285+
1286+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/getSoftDeletePolicy.js,samples/README.md)
1287+
1288+
__Usage:__
1289+
1290+
1291+
`node samples/getSoftDeletePolicy.js`
1292+
1293+
1294+
-----
1295+
1296+
1297+
1298+
12591299
### Get Soft Deleted Bucket
12601300

12611301
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/getSoftDeletedBucket.js).
@@ -1525,6 +1565,40 @@ __Usage:__
15251565

15261566

15271567

1568+
### List Soft Deleted Object Versions
1569+
1570+
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/listSoftDeletedObjectVersions.js).
1571+
1572+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/listSoftDeletedObjectVersions.js,samples/README.md)
1573+
1574+
__Usage:__
1575+
1576+
1577+
`node samples/listSoftDeletedObjectVersions.js`
1578+
1579+
1580+
-----
1581+
1582+
1583+
1584+
1585+
### List Soft Deleted Objects
1586+
1587+
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/listSoftDeletedObjects.js).
1588+
1589+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/listSoftDeletedObjects.js,samples/README.md)
1590+
1591+
__Usage:__
1592+
1593+
1594+
`node samples/listSoftDeletedObjects.js`
1595+
1596+
1597+
-----
1598+
1599+
1600+
1601+
15281602
### Lock Retention Policy
15291603

15301604
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/lockRetentionPolicy.js).
@@ -1924,6 +1998,23 @@ __Usage:__
19241998

19251999

19262000

2001+
### Restore Soft Deleted Object
2002+
2003+
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/restoreSoftDeletedObject.js).
2004+
2005+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/restoreSoftDeletedObject.js,samples/README.md)
2006+
2007+
__Usage:__
2008+
2009+
2010+
`node samples/restoreSoftDeletedObject.js`
2011+
2012+
2013+
-----
2014+
2015+
2016+
2017+
19272018
### Rotate Encryption Key
19282019

19292020
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/rotateEncryptionKey.js).
@@ -2096,6 +2187,23 @@ __Usage:__
20962187

20972188

20982189

2190+
### Set Soft Delete Policy
2191+
2192+
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setSoftDeletePolicy.js).
2193+
2194+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-storage&page=editor&open_in_editor=samples/setSoftDeletePolicy.js,samples/README.md)
2195+
2196+
__Usage:__
2197+
2198+
2199+
`node samples/setSoftDeletePolicy.js`
2200+
2201+
2202+
-----
2203+
2204+
2205+
2206+
20992207
### Set Temporary Hold
21002208

21012209
View the [source code](https://github.com/googleapis/nodejs-storage/blob/main/samples/setTemporaryHold.js).

0 commit comments

Comments
 (0)