Skip to content

Commit 7a82f6f

Browse files
feat: [google-cloud-container] add several fields to manage state of database encryption update (#12513)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 619289281 Source-Link: googleapis/googleapis@3a7c334 Source-Link: googleapis/googleapis-gen@6a8c733 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiNmE4YzczMzA2MmQ4MzNkMTFjNTI0NWVkYTUwZjUxMDhlMGU1NTMyNCJ9 BEGIN_NESTED_COMMIT feat: [google-cloud-container] add several fields to manage state of database encryption update PiperOrigin-RevId: 619273826 Source-Link: googleapis/googleapis@cf1b61c Source-Link: googleapis/googleapis-gen@6a32e3c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiNmEzMmUzY2ViNmVkZGE0OTQxNmI3OGE3MGRlNzhjNTUzYmNhN2EzYiJ9 END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent e377958 commit 7a82f6f

2 files changed

Lines changed: 184 additions & 0 deletions

File tree

packages/google-cloud-container/google/cloud/container_v1/types/cluster_service.py

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8285,13 +8285,28 @@ class MeshCertificates(proto.Message):
82858285
class DatabaseEncryption(proto.Message):
82868286
r"""Configuration of etcd encryption.
82878287
8288+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
8289+
82888290
Attributes:
82898291
key_name (str):
82908292
Name of CloudKMS key to use for the
82918293
encryption of secrets in etcd. Ex.
82928294
projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key
82938295
state (google.cloud.container_v1.types.DatabaseEncryption.State):
82948296
The desired state of etcd encryption.
8297+
current_state (google.cloud.container_v1.types.DatabaseEncryption.CurrentState):
8298+
Output only. The current state of etcd
8299+
encryption.
8300+
8301+
This field is a member of `oneof`_ ``_current_state``.
8302+
decryption_keys (MutableSequence[str]):
8303+
Output only. Keys in use by the cluster for decrypting
8304+
existing objects, in addition to the key in ``key_name``.
8305+
8306+
Each item is a CloudKMS key resource.
8307+
last_operation_errors (MutableSequence[google.cloud.container_v1.types.DatabaseEncryption.OperationError]):
8308+
Output only. Records errors seen during
8309+
DatabaseEncryption update operations.
82958310
"""
82968311

82978312
class State(proto.Enum):
@@ -8311,6 +8326,68 @@ class State(proto.Enum):
83118326
ENCRYPTED = 1
83128327
DECRYPTED = 2
83138328

8329+
class CurrentState(proto.Enum):
8330+
r"""Current State of etcd encryption.
8331+
8332+
Values:
8333+
CURRENT_STATE_UNSPECIFIED (0):
8334+
Should never be set
8335+
CURRENT_STATE_ENCRYPTED (7):
8336+
Secrets in etcd are encrypted.
8337+
CURRENT_STATE_DECRYPTED (2):
8338+
Secrets in etcd are stored in plain text (at
8339+
etcd level) - this is unrelated to Compute
8340+
Engine level full disk encryption.
8341+
CURRENT_STATE_ENCRYPTION_PENDING (3):
8342+
Encryption (or re-encryption with a different
8343+
CloudKMS key) of Secrets is in progress.
8344+
CURRENT_STATE_ENCRYPTION_ERROR (4):
8345+
Encryption (or re-encryption with a different
8346+
CloudKMS key) of Secrets in etcd encountered an
8347+
error.
8348+
CURRENT_STATE_DECRYPTION_PENDING (5):
8349+
De-crypting Secrets to plain text in etcd is
8350+
in progress.
8351+
CURRENT_STATE_DECRYPTION_ERROR (6):
8352+
De-crypting Secrets to plain text in etcd
8353+
encountered an error.
8354+
"""
8355+
CURRENT_STATE_UNSPECIFIED = 0
8356+
CURRENT_STATE_ENCRYPTED = 7
8357+
CURRENT_STATE_DECRYPTED = 2
8358+
CURRENT_STATE_ENCRYPTION_PENDING = 3
8359+
CURRENT_STATE_ENCRYPTION_ERROR = 4
8360+
CURRENT_STATE_DECRYPTION_PENDING = 5
8361+
CURRENT_STATE_DECRYPTION_ERROR = 6
8362+
8363+
class OperationError(proto.Message):
8364+
r"""OperationError records errors seen from CloudKMS keys
8365+
encountered during updates to DatabaseEncryption configuration.
8366+
8367+
Attributes:
8368+
key_name (str):
8369+
CloudKMS key resource that had the error.
8370+
error_message (str):
8371+
Description of the error seen during the
8372+
operation.
8373+
timestamp (google.protobuf.timestamp_pb2.Timestamp):
8374+
Time when the CloudKMS error was seen.
8375+
"""
8376+
8377+
key_name: str = proto.Field(
8378+
proto.STRING,
8379+
number=1,
8380+
)
8381+
error_message: str = proto.Field(
8382+
proto.STRING,
8383+
number=2,
8384+
)
8385+
timestamp: timestamp_pb2.Timestamp = proto.Field(
8386+
proto.MESSAGE,
8387+
number=3,
8388+
message=timestamp_pb2.Timestamp,
8389+
)
8390+
83148391
key_name: str = proto.Field(
83158392
proto.STRING,
83168393
number=1,
@@ -8320,6 +8397,21 @@ class State(proto.Enum):
83208397
number=2,
83218398
enum=State,
83228399
)
8400+
current_state: CurrentState = proto.Field(
8401+
proto.ENUM,
8402+
number=3,
8403+
optional=True,
8404+
enum=CurrentState,
8405+
)
8406+
decryption_keys: MutableSequence[str] = proto.RepeatedField(
8407+
proto.STRING,
8408+
number=4,
8409+
)
8410+
last_operation_errors: MutableSequence[OperationError] = proto.RepeatedField(
8411+
proto.MESSAGE,
8412+
number=5,
8413+
message=OperationError,
8414+
)
83238415

83248416

83258417
class ListUsableSubnetworksRequest(proto.Message):

packages/google-cloud-container/google/cloud/container_v1beta1/types/cluster_service.py

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9208,13 +9208,28 @@ class MeshCertificates(proto.Message):
92089208
class DatabaseEncryption(proto.Message):
92099209
r"""Configuration of etcd encryption.
92109210
9211+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
9212+
92119213
Attributes:
92129214
key_name (str):
92139215
Name of CloudKMS key to use for the
92149216
encryption of secrets in etcd. Ex.
92159217
projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key
92169218
state (google.cloud.container_v1beta1.types.DatabaseEncryption.State):
92179219
The desired state of etcd encryption.
9220+
current_state (google.cloud.container_v1beta1.types.DatabaseEncryption.CurrentState):
9221+
Output only. The current state of etcd
9222+
encryption.
9223+
9224+
This field is a member of `oneof`_ ``_current_state``.
9225+
decryption_keys (MutableSequence[str]):
9226+
Output only. Keys in use by the cluster for decrypting
9227+
existing objects, in addition to the key in ``key_name``.
9228+
9229+
Each item is a CloudKMS key resource.
9230+
last_operation_errors (MutableSequence[google.cloud.container_v1beta1.types.DatabaseEncryption.OperationError]):
9231+
Output only. Records errors seen during
9232+
DatabaseEncryption update operations.
92189233
"""
92199234

92209235
class State(proto.Enum):
@@ -9234,6 +9249,68 @@ class State(proto.Enum):
92349249
ENCRYPTED = 1
92359250
DECRYPTED = 2
92369251

9252+
class CurrentState(proto.Enum):
9253+
r"""Current State of etcd encryption.
9254+
9255+
Values:
9256+
CURRENT_STATE_UNSPECIFIED (0):
9257+
Should never be set
9258+
CURRENT_STATE_ENCRYPTED (7):
9259+
Secrets in etcd are encrypted.
9260+
CURRENT_STATE_DECRYPTED (2):
9261+
Secrets in etcd are stored in plain text (at
9262+
etcd level) - this is unrelated to Compute
9263+
Engine level full disk encryption.
9264+
CURRENT_STATE_ENCRYPTION_PENDING (3):
9265+
Encryption (or re-encryption with a different
9266+
CloudKMS key) of Secrets is in progress.
9267+
CURRENT_STATE_ENCRYPTION_ERROR (4):
9268+
Encryption (or re-encryption with a different
9269+
CloudKMS key) of Secrets in etcd encountered an
9270+
error.
9271+
CURRENT_STATE_DECRYPTION_PENDING (5):
9272+
De-crypting Secrets to plain text in etcd is
9273+
in progress.
9274+
CURRENT_STATE_DECRYPTION_ERROR (6):
9275+
De-crypting Secrets to plain text in etcd
9276+
encountered an error.
9277+
"""
9278+
CURRENT_STATE_UNSPECIFIED = 0
9279+
CURRENT_STATE_ENCRYPTED = 7
9280+
CURRENT_STATE_DECRYPTED = 2
9281+
CURRENT_STATE_ENCRYPTION_PENDING = 3
9282+
CURRENT_STATE_ENCRYPTION_ERROR = 4
9283+
CURRENT_STATE_DECRYPTION_PENDING = 5
9284+
CURRENT_STATE_DECRYPTION_ERROR = 6
9285+
9286+
class OperationError(proto.Message):
9287+
r"""OperationError records errors seen from CloudKMS keys
9288+
encountered during updates to DatabaseEncryption configuration.
9289+
9290+
Attributes:
9291+
key_name (str):
9292+
CloudKMS key resource that had the error.
9293+
error_message (str):
9294+
Description of the error seen during the
9295+
operation.
9296+
timestamp (google.protobuf.timestamp_pb2.Timestamp):
9297+
Time when the CloudKMS error was seen.
9298+
"""
9299+
9300+
key_name: str = proto.Field(
9301+
proto.STRING,
9302+
number=1,
9303+
)
9304+
error_message: str = proto.Field(
9305+
proto.STRING,
9306+
number=2,
9307+
)
9308+
timestamp: timestamp_pb2.Timestamp = proto.Field(
9309+
proto.MESSAGE,
9310+
number=3,
9311+
message=timestamp_pb2.Timestamp,
9312+
)
9313+
92379314
key_name: str = proto.Field(
92389315
proto.STRING,
92399316
number=1,
@@ -9243,6 +9320,21 @@ class State(proto.Enum):
92439320
number=2,
92449321
enum=State,
92459322
)
9323+
current_state: CurrentState = proto.Field(
9324+
proto.ENUM,
9325+
number=3,
9326+
optional=True,
9327+
enum=CurrentState,
9328+
)
9329+
decryption_keys: MutableSequence[str] = proto.RepeatedField(
9330+
proto.STRING,
9331+
number=4,
9332+
)
9333+
last_operation_errors: MutableSequence[OperationError] = proto.RepeatedField(
9334+
proto.MESSAGE,
9335+
number=5,
9336+
message=OperationError,
9337+
)
92469338

92479339

92489340
class ResourceUsageExportConfig(proto.Message):

0 commit comments

Comments
 (0)