Skip to content

Commit d17e10d

Browse files
committed
docs(samples): Updating readme for soft delete cost analyzer script
1 parent ff4c1d5 commit d17e10d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

storage/cost-analysis/README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ NOTE: Due to the specific functionality related to Google Cloud APIs, this guide
2727
3. A Python environment (https://cloud.google.com/python/setup)
2828

2929
**Command-Line Arguments**
30-
* `project_name`_ (Required): Specifies your GCP project name.
31-
* `--cost_threshold`_ (Optional, default=0): Sets a relative cost threshold.
32-
* `--soft_delete_window`_ (Optional, default= 604800 (i.e. 7 days)): Time window (in seconds) for considering soft-deleted objects..
33-
* `--agg_days`_ (Optional, default=30): The period over which to combine and aggregate results.
34-
* `--lookback_days`_ (Optional, default=360): Time window (in days) for considering the how old the bucket to be.
35-
* `--list`_ (Optional): Produces a simple list of bucket names.
30+
* `project_name` - (**Required**): Specifies your GCP project name.
31+
* `--cost_threshold` - (Optional, default=0): Sets a relative cost threshold.
32+
* `--soft_delete_window` - (Optional, default= 604800 (i.e. 7 days)): Time window (in seconds) for considering soft-deleted objects..
33+
* `--agg_days` - (Optional, default=30): The period over which to combine and aggregate results.
34+
* `--lookback_days` - (Optional, default=360): Time window (in days) for considering the how old the bucket to be.
35+
* `--list` - (Optional, default=False): Produces a simple list of bucket names.
3636

3737
Note: In this sample, cost_threshold 0.15 would spotlight buckets where enabling soft delete might increase costs by over 15%.
3838

3939
``` code-block:: bash
4040
$ python storage_soft_delete_relative_cost_analyzer.py my-project-name
4141
```
4242

43-
**Important Note:** To disable soft-delete for buckets flagged by the script, follow these steps:
43+
To disable soft-delete for buckets flagged by the script, follow these steps:
4444

4545
```code-block::bash
4646
# 1. Run the analyzer to generate a list of buckets exceeding your cost threshold:
@@ -49,4 +49,6 @@ python storage_soft_delete_relative_cost_analyzer.py [your-project-name] --[OTHE
4949
# 2. Update the buckets using the generated list:
5050
cat list_of_buckets.txt | gcloud storage buckets update -I --clear-soft-delete
5151
52-
```
52+
```
53+
54+
**Important Note:** <span style="color: red;">Disabling soft-delete for flagged buckets means when deleting it will permanently delete files. These files cannot be restored, even if a soft-delete policy is later re-enabled.</span>

0 commit comments

Comments
 (0)