Skip to content

Commit

Permalink
feat: added expire_time and ttl fields to Secret (#201)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 352563582

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Jan 19 07:29:20 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 9ecdacc9a00e1dd443b11bf10215d6e7648db8a7
Source-Link: googleapis/googleapis@9ecdacc
  • Loading branch information
yoshi-automation authored Jan 21, 2021
1 parent 8380780 commit 5a79497
Show file tree
Hide file tree
Showing 5 changed files with 471 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package google.cloud.secretmanager.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

Expand Down Expand Up @@ -68,6 +69,23 @@ message Secret {
//
// No more than 64 labels can be assigned to a given resource.
map<string, string> labels = 4;

// Expiration policy attached to the [Secret][google.cloud.secretmanager.v1.Secret]. If specified the [Secret][google.cloud.secretmanager.v1.Secret]
// and all [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] will be automatically deleted at
// expiration. Expired secrets are irreversibly deleted.
//
// Expiration is *not* the recommended way to set time-based permissions. [IAM
// Conditions](https://cloud.google.com/secret-manager/docs/access-control#conditions)
// is recommended for granting time-based permissions because the operation
// can be reversed.
oneof expiration {
// Optional. Timestamp in UTC when the [Secret][google.cloud.secretmanager.v1.Secret] is scheduled to expire. This is
// always provided on output, regardless of what was sent on input.
google.protobuf.Timestamp expire_time = 6 [(google.api.field_behavior) = OPTIONAL];

// Input only. The TTL for the [Secret][google.cloud.secretmanager.v1.Secret].
google.protobuf.Duration ttl = 7 [(google.api.field_behavior) = INPUT_ONLY];
}
}

// A secret version resource in the Secret Manager API.
Expand Down
111 changes: 111 additions & 0 deletions packages/google-cloud-secretmanager/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a79497

Please sign in to comment.