Skip to content

Commit fcce43c

Browse files
feat: [secretmanager] Add Secret Version Delayed Destroy changes for client libraries (#5273)
* feat: Add Secret Version Delayed Destroy changes for client libraries docs: Users can now enable secret version delayed destruction PiperOrigin-RevId: 626820938 Source-Link: googleapis/googleapis@0345704 Source-Link: googleapis/googleapis-gen@2532a56 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3JldG1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjI1MzJhNTY3ZWE0NzQ5YzVmNWUxYzBiYjdhM2Y3MTBiMDYyNzkzOTAifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 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> Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
1 parent f2a1e2e commit fcce43c

18 files changed

Lines changed: 1179 additions & 155 deletions

packages/google-cloud-secretmanager/protos/google/cloud/secretmanager/v1/resources.proto

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,23 @@ message Secret {
4141
option (google.api.resource) = {
4242
type: "secretmanager.googleapis.com/Secret"
4343
pattern: "projects/{project}/secrets/{secret}"
44+
pattern: "projects/{project}/locations/{location}/secrets/{secret}"
45+
plural: "secrets"
46+
singular: "secret"
4447
};
4548

4649
// Output only. The resource name of the
4750
// [Secret][google.cloud.secretmanager.v1.Secret] in the format
4851
// `projects/*/secrets/*`.
4952
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
5053

51-
// Required. Immutable. The replication policy of the secret data attached to
54+
// Optional. Immutable. The replication policy of the secret data attached to
5255
// the [Secret][google.cloud.secretmanager.v1.Secret].
5356
//
5457
// The replication policy cannot be changed after the Secret has been created.
5558
Replication replication = 2 [
5659
(google.api.field_behavior) = IMMUTABLE,
57-
(google.api.field_behavior) = REQUIRED
60+
(google.api.field_behavior) = OPTIONAL
5861
];
5962

6063
// Output only. The time at which the
@@ -120,7 +123,7 @@ message Secret {
120123
// No more than 50 aliases can be assigned to a given secret.
121124
//
122125
// Version-Alias pairs will be viewable via GetSecret and modifiable via
123-
// UpdateSecret. At launch access by alias will only be supported on
126+
// UpdateSecret. Access by alias is only be supported on
124127
// GetSecretVersion and AccessSecretVersion.
125128
map<string, int64> version_aliases = 11
126129
[(google.api.field_behavior) = OPTIONAL];
@@ -138,13 +141,37 @@ message Secret {
138141
//
139142
// The total size of annotation keys and values must be less than 16KiB.
140143
map<string, string> annotations = 13 [(google.api.field_behavior) = OPTIONAL];
144+
145+
// Optional. Secret Version TTL after destruction request
146+
//
147+
// This is a part of the Delayed secret version destroy feature.
148+
// For secret with TTL>0, version destruction doesn't happen immediately
149+
// on calling destroy instead the version goes to a disabled state and
150+
// destruction happens after the TTL expires.
151+
google.protobuf.Duration version_destroy_ttl = 14
152+
[(google.api.field_behavior) = OPTIONAL];
153+
154+
// Optional. The customer-managed encryption configuration of the Regionalised
155+
// Secrets. If no configuration is provided, Google-managed default encryption
156+
// is used.
157+
//
158+
// Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption
159+
// configuration only apply to
160+
// [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added
161+
// afterwards. They do not apply retroactively to existing
162+
// [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
163+
CustomerManagedEncryption customer_managed_encryption = 15
164+
[(google.api.field_behavior) = OPTIONAL];
141165
}
142166

143167
// A secret version resource in the Secret Manager API.
144168
message SecretVersion {
145169
option (google.api.resource) = {
146170
type: "secretmanager.googleapis.com/SecretVersion"
147171
pattern: "projects/{project}/secrets/{secret}/versions/{secret_version}"
172+
pattern: "projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}"
173+
plural: "secretVersions"
174+
singular: "secretVersion"
148175
};
149176

150177
// The state of a
@@ -213,6 +240,22 @@ message SecretVersion {
213240
// [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion].
214241
bool client_specified_payload_checksum = 7
215242
[(google.api.field_behavior) = OUTPUT_ONLY];
243+
244+
// Optional. Output only. Scheduled destroy time for secret version.
245+
// This is a part of the Delayed secret version destroy feature. For a
246+
// Secret with a valid version destroy TTL, when a secert version is
247+
// destroyed, the version is moved to disabled state and it is scheduled for
248+
// destruction. The version is destroyed only after the
249+
// `scheduled_destroy_time`.
250+
google.protobuf.Timestamp scheduled_destroy_time = 8
251+
[(google.api.field_behavior) = OUTPUT_ONLY];
252+
253+
// Output only. The customer-managed encryption status of the
254+
// [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only
255+
// populated if customer-managed encryption is used and
256+
// [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret.
257+
CustomerManagedEncryptionStatus customer_managed_encryption = 9
258+
[(google.api.field_behavior) = OUTPUT_ONLY];
216259
}
217260

218261
// A policy that defines the replication and encryption configuration of data.
@@ -381,8 +424,9 @@ message Topic {
381424

382425
// Required. The resource name of the Pub/Sub topic that will be published to,
383426
// in the following format: `projects/*/topics/*`. For publication to succeed,
384-
// the Secret Manager P4SA must have `pubsub.publisher` permissions on the
385-
// topic.
427+
// the Secret Manager service agent must have the `pubsub.topic.publish`
428+
// permission on the topic. The Pub/Sub Publisher role
429+
// (`roles/pubsub.publisher`) includes this permission.
386430
string name = 1 [(google.api.field_behavior) = REQUIRED];
387431
}
388432

0 commit comments

Comments
 (0)