samples: add samples for encryption enforcement config feature#3369
samples: add samples for encryption enforcement config feature#3369nidhiii-27 wants to merge 5 commits intogoogleapis:mainfrom
Conversation
|
Here is the summary of changes. You are about to add 3 region tags.
This comment is generated by snippet-bot.
|
samples/snippets/src/main/java/com/example/storage/bucket/GetEncryptionEnforcementConfig.java
Outdated
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/storage/bucket/GetEncryptionEnforcementConfig.java
Outdated
Show resolved
Hide resolved
.../snippets/src/main/java/com/example/storage/bucket/RemoveAllEncryptionEnforcementConfig.java
Show resolved
Hide resolved
| .setCustomerSuppliedEncryptionEnforcementConfig(null) | ||
| .build(); | ||
|
|
||
| storage.update(bucketInfo); |
There was a problem hiding this comment.
can we repuspose this class to be more generic like to "Update" EncryptionEnforcementConfig instead?
This way may be we can have samples for :
- remove a specific encryption enforcement (maybe taking in encryption-type as input: gmek, cmek, csek)?
- remove all encryption enforcement all together.
- update a specific encryption types' restriction mode?
wdyt?
There was a problem hiding this comment.
But we are already updating and doing this in the three different examples in SetBucketEncryptionEnforcementConfig
and if a specific case is needed, we can add it there
There was a problem hiding this comment.
isn't SetBucketEncryptionEnforcementConfig for "bucket create, along with encryption-enforcement config",
while UpdateBucketEncryptionEnforcementConfig would be for all kinds of "bucket update, related to encryption-enforcement config"?
Added samples:
storage_get_encryption_enforcement_config
storage_remove_encryption_enforcement_config
storage_set_encryption_enforcement_config