Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
feat: Added support for accessing secret versions by alias (#281)
Browse files Browse the repository at this point in the history
* feat: Added support for accessing secret versions by alias
Clients can now associate custom strings with specified secret versions for later access.

chore: remove obsolete samples

PiperOrigin-RevId: 439320490

Source-Link: googleapis/googleapis@bbe5618

Source-Link: https://github.com/googleapis/googleapis-gen/commit/6bdfcfd879740c62bbe11b2ebc6b8371f0d420af
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmJkZmNmZDg3OTc0MGM2MmJiZTExYjJlYmM2YjgzNzFmMGQ0MjBhZiJ9

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Apr 4, 2022
1 parent 7fab5fc commit 6c5cd29
Show file tree
Hide file tree
Showing 31 changed files with 19 additions and 1,352 deletions.
19 changes: 19 additions & 0 deletions google/cloud/secretmanager_v1/types/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,20 @@ class Secret(proto.Message):
Optional. Rotation policy attached to the
[Secret][google.cloud.secretmanager.v1.Secret]. May be
excluded if there is no rotation policy.
version_aliases (Sequence[google.cloud.secretmanager_v1.types.Secret.VersionAliasesEntry]):
Optional. Mapping from version alias to version name.
A version alias is a string with a maximum length of 63
characters and can contain uppercase and lowercase letters,
numerals, and the hyphen (``-``) and underscore ('_')
characters. An alias string must start with a letter and
cannot be the string 'latest' or 'NEW'. No more than 50
aliases can be assigned to a given secret.
Version-Alias pairs will be viewable via GetSecret and
modifiable via UpdateSecret. At launch access by alias will
only be supported on GetSecretVersion and
AccessSecretVersion.
"""

name = proto.Field(
Expand Down Expand Up @@ -151,6 +165,11 @@ class Secret(proto.Message):
number=9,
message="Rotation",
)
version_aliases = proto.MapField(
proto.STRING,
proto.INT64,
number=11,
)


class SecretVersion(proto.Message):
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6c5cd29

Please sign in to comment.