Skip to content

Commit 8b3d36d

Browse files
Google APIscopybara-github
authored andcommitted
feat: added topic field to Secret
PiperOrigin-RevId: 359285402
1 parent eabec5a commit 8b3d36d

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

google/cloud/secretmanager/v1/resources.proto

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -70,6 +70,10 @@ message Secret {
7070
// No more than 64 labels can be assigned to a given resource.
7171
map<string, string> labels = 4;
7272

73+
// Optional. A list of up to 10 Pub/Sub topics to which messages are published when
74+
// control plane operations are called on the secret or its versions.
75+
repeated Topic topics = 5 [(google.api.field_behavior) = OPTIONAL];
76+
7377
// Expiration policy attached to the [Secret][google.cloud.secretmanager.v1.Secret]. If specified the [Secret][google.cloud.secretmanager.v1.Secret]
7478
// and all [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] will be automatically deleted at
7579
// expiration. Expired secrets are irreversibly deleted.
@@ -260,6 +264,20 @@ message CustomerManagedEncryptionStatus {
260264
string kms_key_version_name = 1 [(google.api.field_behavior) = REQUIRED];
261265
}
262266

267+
// A Pub/Sub topic which Secret Manager will publish to when control plane
268+
// events occur on this secret.
269+
message Topic {
270+
option (google.api.resource) = {
271+
type: "pubsub.googleapis.com/Topic"
272+
pattern: "projects/{project}/topics/{topic}"
273+
};
274+
275+
// Required. The resource name of the Pub/Sub topic that will be published to, in the
276+
// following format: `projects/*/topics/*`. For publication to succeed, the
277+
// Secret Manager P4SA must have `pubsub.publisher` permissions on the topic.
278+
string name = 1 [(google.api.field_behavior) = REQUIRED];
279+
}
280+
263281
// A secret payload resource in the Secret Manager API. This contains the
264282
// sensitive secret payload that is associated with a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
265283
message SecretPayload {

google/cloud/secretmanager/v1/service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)