Skip to content

Commit 5618268

Browse files
feat: [google-cloud-parametermanager] add CMEK support (#13696)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 738501501 Source-Link: googleapis/googleapis@e51fec1 Source-Link: googleapis/googleapis-gen@091777b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBhcmFtZXRlcm1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjA5MTc3N2JjNGQ0MzEyYzdhZWFjMTZmNWI2OGYwNzllNTViM2M3ZjAifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 6e93528 commit 5618268

File tree

2 files changed

+78
-1
lines changed

2 files changed

+78
-1
lines changed

packages/google-cloud-parametermanager/google/cloud/parametermanager_v1/types/service.py

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ class View(proto.Enum):
9292
class Parameter(proto.Message):
9393
r"""Message describing Parameter resource
9494
95+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
96+
9597
Attributes:
9698
name (str):
9799
Identifier. [Output only] The resource name of the Parameter
@@ -108,6 +110,15 @@ class Parameter(proto.Message):
108110
policy_member (google.iam.v1.resource_policy_member_pb2.ResourcePolicyMember):
109111
Output only. [Output-only] policy member strings of a Google
110112
Cloud resource.
113+
kms_key (str):
114+
Optional. Customer managed encryption key (CMEK) to use for
115+
encrypting the Parameter Versions. If not set, the default
116+
Google-managed encryption key will be used. Cloud KMS
117+
CryptoKeys must reside in the same location as the
118+
Parameter. The expected format is
119+
``projects/*/locations/*/keyRings/*/cryptoKeys/*``.
120+
121+
This field is a member of `oneof`_ ``_kms_key``.
111122
"""
112123

113124
name: str = proto.Field(
@@ -139,6 +150,11 @@ class Parameter(proto.Message):
139150
number=6,
140151
message=resource_policy_member_pb2.ResourcePolicyMember,
141152
)
153+
kms_key: str = proto.Field(
154+
proto.STRING,
155+
number=7,
156+
optional=True,
157+
)
142158

143159

144160
class ListParametersRequest(proto.Message):
@@ -380,6 +396,8 @@ class DeleteParameterRequest(proto.Message):
380396
class ParameterVersion(proto.Message):
381397
r"""Message describing ParameterVersion resource
382398
399+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
400+
383401
Attributes:
384402
name (str):
385403
Identifier. [Output only] The resource name of the
@@ -403,6 +421,14 @@ class ParameterVersion(proto.Message):
403421
ParameterVersion resource. This is only
404422
returned when the request provides the View
405423
value of FULL (default for GET request).
424+
kms_key_version (str):
425+
Optional. Output only. [Output only] The resource name of
426+
the KMS key version used to encrypt the ParameterVersion
427+
payload. This field is populated only if the Parameter
428+
resource has customer managed encryption key (CMEK)
429+
configured.
430+
431+
This field is a member of `oneof`_ ``_kms_key_version``.
406432
"""
407433

408434
name: str = proto.Field(
@@ -428,6 +454,11 @@ class ParameterVersion(proto.Message):
428454
number=5,
429455
message="ParameterVersionPayload",
430456
)
457+
kms_key_version: str = proto.Field(
458+
proto.STRING,
459+
number=6,
460+
optional=True,
461+
)
431462

432463

433464
class ParameterVersionPayload(proto.Message):
@@ -577,7 +608,7 @@ class RenderParameterVersionResponse(proto.Message):
577608
(ParameterVersionPayload) which has
578609
substitutions of all (if any) references to a
579610
SecretManager SecretVersion resources. This
580-
substituion only works for a Parameter which is
611+
substitution only works for a Parameter which is
581612
in JSON or YAML format.
582613
"""
583614

0 commit comments

Comments
 (0)