Skip to content

Commit 998c300

Browse files
feat: [google-cloud-secret-manager] update secret manager protos for tags (#13976)
Clients can use use tags on secret manager to manage access to the resources(secret) PiperOrigin-RevId: 767419371 Source-Link: googleapis/googleapis@02838cf Source-Link: googleapis/googleapis-gen@9c43ac6 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNlY3JldC1tYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiI5YzQzYWM2NjU3ZDlmZjMzMWE2MjQ3OTlhYWZmNjQ5ZGJiYmUzY2VlIn0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b60fef3 commit 998c300

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

packages/google-cloud-secret-manager/google/cloud/secretmanager_v1/types/resources.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,18 @@ class Secret(proto.Message):
155155
added afterwards. They do not apply retroactively to
156156
existing
157157
[SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
158+
tags (MutableMapping[str, str]):
159+
Optional. Input only. Immutable. Mapping of
160+
Tag keys/values directly bound to this resource.
161+
For example:
162+
163+
"123/environment": "production",
164+
"123/costCenter": "marketing"
165+
166+
Tags are used to organize and group resources.
167+
168+
Tags can be used to control policy evaluation
169+
for the resource.
158170
"""
159171

160172
name: str = proto.Field(
@@ -222,6 +234,11 @@ class Secret(proto.Message):
222234
number=15,
223235
message="CustomerManagedEncryption",
224236
)
237+
tags: MutableMapping[str, str] = proto.MapField(
238+
proto.STRING,
239+
proto.STRING,
240+
number=16,
241+
)
225242

226243

227244
class SecretVersion(proto.Message):

packages/google-cloud-secret-manager/tests/unit/gapic/secretmanager_v1/test_secret_manager_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10302,6 +10302,7 @@ def test_create_secret_rest_call_success(request_type):
1030210302
"annotations": {},
1030310303
"version_destroy_ttl": {},
1030410304
"customer_managed_encryption": {},
10305+
"tags": {},
1030510306
}
1030610307
# The version of a generated dependency at test runtime may differ from the version used during generation.
1030710308
# Delete any fields which are not present in the current runtime dependency
@@ -10778,6 +10779,7 @@ def test_update_secret_rest_call_success(request_type):
1077810779
"annotations": {},
1077910780
"version_destroy_ttl": {},
1078010781
"customer_managed_encryption": {},
10782+
"tags": {},
1078110783
}
1078210784
# The version of a generated dependency at test runtime may differ from the version used during generation.
1078310785
# Delete any fields which are not present in the current runtime dependency

0 commit comments

Comments
 (0)