google-cloud-maintenance-api 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/cloud/maintenance_api/__init__.py +51 -0
- google/cloud/maintenance_api/gapic_version.py +16 -0
- google/cloud/maintenance_api/py.typed +2 -0
- google/cloud/maintenance_api_v1beta/__init__.py +46 -0
- google/cloud/maintenance_api_v1beta/gapic_metadata.json +73 -0
- google/cloud/maintenance_api_v1beta/gapic_version.py +16 -0
- google/cloud/maintenance_api_v1beta/py.typed +2 -0
- google/cloud/maintenance_api_v1beta/services/__init__.py +15 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/__init__.py +22 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/async_client.py +786 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/client.py +1211 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/pagers.py +361 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/transports/__init__.py +36 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/transports/base.py +234 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/transports/grpc.py +456 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/transports/grpc_asyncio.py +499 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/transports/rest.py +1182 -0
- google/cloud/maintenance_api_v1beta/services/maintenance/transports/rest_base.py +283 -0
- google/cloud/maintenance_api_v1beta/types/__init__.py +38 -0
- google/cloud/maintenance_api_v1beta/types/maintenance_service.py +713 -0
- google_cloud_maintenance_api-0.1.0.dist-info/METADATA +239 -0
- google_cloud_maintenance_api-0.1.0.dist-info/RECORD +25 -0
- google_cloud_maintenance_api-0.1.0.dist-info/WHEEL +5 -0
- google_cloud_maintenance_api-0.1.0.dist-info/licenses/LICENSE +202 -0
- google_cloud_maintenance_api-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,713 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2025 Google LLC
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
#
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from typing import MutableMapping, MutableSequence
|
|
19
|
+
|
|
20
|
+
from google.protobuf import timestamp_pb2 # type: ignore
|
|
21
|
+
import proto # type: ignore
|
|
22
|
+
|
|
23
|
+
__protobuf__ = proto.module(
|
|
24
|
+
package="google.cloud.maintenance.api.v1beta",
|
|
25
|
+
manifest={
|
|
26
|
+
"MaintenanceCategory",
|
|
27
|
+
"SummarizeMaintenancesRequest",
|
|
28
|
+
"SummarizeMaintenancesResponse",
|
|
29
|
+
"MaintenanceSummary",
|
|
30
|
+
"ResourceMaintenance",
|
|
31
|
+
"MaintenanceControl",
|
|
32
|
+
"ListResourceMaintenancesRequest",
|
|
33
|
+
"ListResourceMaintenancesResponse",
|
|
34
|
+
"GetResourceMaintenanceRequest",
|
|
35
|
+
},
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class MaintenanceCategory(proto.Enum):
|
|
40
|
+
r"""The Category of the maintenance.
|
|
41
|
+
|
|
42
|
+
Values:
|
|
43
|
+
MAINTENANCE_CATEGORY_UNSPECIFIED (0):
|
|
44
|
+
Unspecified category.
|
|
45
|
+
INFRASTRUCTURE (1):
|
|
46
|
+
Infrastructure maintenance events are times
|
|
47
|
+
that Google Cloud performs regular maintenance
|
|
48
|
+
on network equipment e.g. Google Cloud
|
|
49
|
+
Interconnect These events are usually scheduled
|
|
50
|
+
in advance and we provide notification, when
|
|
51
|
+
possible, so that users can plan for the
|
|
52
|
+
infrastructure maintenance event and prevent
|
|
53
|
+
downtime. Infrastructure maintenance events
|
|
54
|
+
don't have a set interval between occurrences,
|
|
55
|
+
but generally occur several times a year.
|
|
56
|
+
SERVICE_UPDATE (3):
|
|
57
|
+
Updates that can include bug fixes, changes,
|
|
58
|
+
or new features that are backward compatible
|
|
59
|
+
with existing versions (including patches). Some
|
|
60
|
+
SPs allow users to control the scheduling of
|
|
61
|
+
these maintenance events using maintenance
|
|
62
|
+
windows and/or deny maintenance features.
|
|
63
|
+
"""
|
|
64
|
+
MAINTENANCE_CATEGORY_UNSPECIFIED = 0
|
|
65
|
+
INFRASTRUCTURE = 1
|
|
66
|
+
SERVICE_UPDATE = 3
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class SummarizeMaintenancesRequest(proto.Message):
|
|
70
|
+
r"""Request message for SummarizeMaintenances custom method.
|
|
71
|
+
|
|
72
|
+
Attributes:
|
|
73
|
+
parent (str):
|
|
74
|
+
Required. The parent of the resource maintenance. eg.
|
|
75
|
+
``projects/123/locations/*``
|
|
76
|
+
page_size (int):
|
|
77
|
+
The maximum number of resource maintenances
|
|
78
|
+
to send per page. The default page size is 20
|
|
79
|
+
and the maximum is 1000.
|
|
80
|
+
page_token (str):
|
|
81
|
+
The page token: If the next_page_token from a previous
|
|
82
|
+
response is provided, this request will send the subsequent
|
|
83
|
+
page.
|
|
84
|
+
filter (str):
|
|
85
|
+
Filter the list as specified in https://google.aip.dev/160.
|
|
86
|
+
Supported fields include:
|
|
87
|
+
|
|
88
|
+
- state
|
|
89
|
+
- resource.location
|
|
90
|
+
- resource.resourceName
|
|
91
|
+
- resource.type
|
|
92
|
+
- maintenance.maintenanceName
|
|
93
|
+
- maintenanceStartTime
|
|
94
|
+
- maintenanceCompleteTime Examples:
|
|
95
|
+
- state="SCHEDULED"
|
|
96
|
+
- resource.location="us-central1-c"
|
|
97
|
+
- resource.resourceName=~"\*/instance-20241212-211259"
|
|
98
|
+
- maintenanceStartTime>"2000-10-11T20:44:51Z"
|
|
99
|
+
- state="SCHEDULED" OR
|
|
100
|
+
resource.type="compute.googleapis.com/Instance"
|
|
101
|
+
- maintenance.maitenanceName="eb3b709c-9ca1-5472-9fb6-800a3849eda1"
|
|
102
|
+
AND maintenanceCompleteTime>"2000-10-11T20:44:51Z".
|
|
103
|
+
order_by (str):
|
|
104
|
+
Order results as specified in
|
|
105
|
+
https://google.aip.dev/132.
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
parent: str = proto.Field(
|
|
109
|
+
proto.STRING,
|
|
110
|
+
number=10006,
|
|
111
|
+
)
|
|
112
|
+
page_size: int = proto.Field(
|
|
113
|
+
proto.INT32,
|
|
114
|
+
number=10505,
|
|
115
|
+
)
|
|
116
|
+
page_token: str = proto.Field(
|
|
117
|
+
proto.STRING,
|
|
118
|
+
number=10506,
|
|
119
|
+
)
|
|
120
|
+
filter: str = proto.Field(
|
|
121
|
+
proto.STRING,
|
|
122
|
+
number=10507,
|
|
123
|
+
)
|
|
124
|
+
order_by: str = proto.Field(
|
|
125
|
+
proto.STRING,
|
|
126
|
+
number=10508,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class SummarizeMaintenancesResponse(proto.Message):
|
|
131
|
+
r"""
|
|
132
|
+
|
|
133
|
+
Attributes:
|
|
134
|
+
maintenances (MutableSequence[google.cloud.maintenance_api_v1beta.types.MaintenanceSummary]):
|
|
135
|
+
The resulting summaries.
|
|
136
|
+
next_page_token (str):
|
|
137
|
+
If present, the next page token can be
|
|
138
|
+
provided to a subsequent SummarizeMaintenances
|
|
139
|
+
call to list the next page. If empty, there are
|
|
140
|
+
no more pages.
|
|
141
|
+
unreachable (MutableSequence[str]):
|
|
142
|
+
Unordered list. Locations that could not be
|
|
143
|
+
reached.
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def raw_page(self):
|
|
148
|
+
return self
|
|
149
|
+
|
|
150
|
+
maintenances: MutableSequence["MaintenanceSummary"] = proto.RepeatedField(
|
|
151
|
+
proto.MESSAGE,
|
|
152
|
+
number=10509,
|
|
153
|
+
message="MaintenanceSummary",
|
|
154
|
+
)
|
|
155
|
+
next_page_token: str = proto.Field(
|
|
156
|
+
proto.STRING,
|
|
157
|
+
number=10510,
|
|
158
|
+
)
|
|
159
|
+
unreachable: MutableSequence[str] = proto.RepeatedField(
|
|
160
|
+
proto.STRING,
|
|
161
|
+
number=10511,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class MaintenanceSummary(proto.Message):
|
|
166
|
+
r"""MaintenanceSummary contains maintenance statistics calculated
|
|
167
|
+
based on ResourceMaintenances within the scope: project and
|
|
168
|
+
location.
|
|
169
|
+
|
|
170
|
+
Attributes:
|
|
171
|
+
maintenance_name (str):
|
|
172
|
+
Output only. The name of the maintenance.
|
|
173
|
+
title (str):
|
|
174
|
+
Output only. The title of the maintenance.
|
|
175
|
+
description (str):
|
|
176
|
+
Output only. The description of the
|
|
177
|
+
maintenance.
|
|
178
|
+
category (google.cloud.maintenance_api_v1beta.types.MaintenanceCategory):
|
|
179
|
+
Output only. The category of the maintenance
|
|
180
|
+
event.
|
|
181
|
+
maintenance_scheduled_start_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
182
|
+
Output only. Scheduled start time of the maintenance. The
|
|
183
|
+
maintenance will start at ``maintenanceScheduledStartTime``
|
|
184
|
+
or later, with best effort to finish before
|
|
185
|
+
``maintenanceScheduledEndTime``.
|
|
186
|
+
maintenance_scheduled_end_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
187
|
+
Output only. An estimated (best effort, not
|
|
188
|
+
guaranteed) end time of the scheduled
|
|
189
|
+
maintenance.
|
|
190
|
+
maintenance_start_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
191
|
+
Output only. Actual date when the maintenance started. Field
|
|
192
|
+
present only after the state changed to ``RUNNING``.
|
|
193
|
+
maintenance_end_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
194
|
+
Output only. Actual date when the maintenance successfully
|
|
195
|
+
completed. Field present only after the state changed to
|
|
196
|
+
``SUCCEEDED``.
|
|
197
|
+
user_controllable (bool):
|
|
198
|
+
Output only. Indicates whether the user has
|
|
199
|
+
some control over that maintenance, either
|
|
200
|
+
proactively before maintenance was scheduled
|
|
201
|
+
with maintenance policy or with reactive
|
|
202
|
+
controls after it was scheduled (see controls
|
|
203
|
+
field).
|
|
204
|
+
controls (MutableSequence[google.cloud.maintenance_api_v1beta.types.MaintenanceControl]):
|
|
205
|
+
Output only. Control available for that
|
|
206
|
+
Maintenance (might not be available for every
|
|
207
|
+
resource that maintenance is applied to).
|
|
208
|
+
stats (MutableSequence[google.cloud.maintenance_api_v1beta.types.MaintenanceSummary.Stats]):
|
|
209
|
+
Output only. Stats is a field of
|
|
210
|
+
ResourceMaintenance used to aggregate the stats.
|
|
211
|
+
"""
|
|
212
|
+
|
|
213
|
+
class Stats(proto.Message):
|
|
214
|
+
r"""
|
|
215
|
+
|
|
216
|
+
Attributes:
|
|
217
|
+
group_by (str):
|
|
218
|
+
groupBy specifies the type of aggregate. For example a
|
|
219
|
+
group_by might be ``"state"``
|
|
220
|
+
aggregates (MutableSequence[google.cloud.maintenance_api_v1beta.types.MaintenanceSummary.Aggregate]):
|
|
221
|
+
Aggregates is a list <group, count> pairs. For example, if
|
|
222
|
+
the group_by is ``"state"`` a possible tuple in the
|
|
223
|
+
aggregates list could be "SCHEDULED" : ``11``,
|
|
224
|
+
"""
|
|
225
|
+
|
|
226
|
+
group_by: str = proto.Field(
|
|
227
|
+
proto.STRING,
|
|
228
|
+
number=1,
|
|
229
|
+
)
|
|
230
|
+
aggregates: MutableSequence[
|
|
231
|
+
"MaintenanceSummary.Aggregate"
|
|
232
|
+
] = proto.RepeatedField(
|
|
233
|
+
proto.MESSAGE,
|
|
234
|
+
number=2,
|
|
235
|
+
message="MaintenanceSummary.Aggregate",
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
class Aggregate(proto.Message):
|
|
239
|
+
r"""
|
|
240
|
+
|
|
241
|
+
Attributes:
|
|
242
|
+
group (str):
|
|
243
|
+
Specifies what specific value of the group_by the count
|
|
244
|
+
represents. For example if group_by is ``"state"`` its
|
|
245
|
+
corresponding group could be ``"SCHEDULED"``.
|
|
246
|
+
count (int):
|
|
247
|
+
The count of the group.
|
|
248
|
+
"""
|
|
249
|
+
|
|
250
|
+
group: str = proto.Field(
|
|
251
|
+
proto.STRING,
|
|
252
|
+
number=1,
|
|
253
|
+
)
|
|
254
|
+
count: int = proto.Field(
|
|
255
|
+
proto.INT64,
|
|
256
|
+
number=2,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
maintenance_name: str = proto.Field(
|
|
260
|
+
proto.STRING,
|
|
261
|
+
number=1,
|
|
262
|
+
)
|
|
263
|
+
title: str = proto.Field(
|
|
264
|
+
proto.STRING,
|
|
265
|
+
number=2,
|
|
266
|
+
)
|
|
267
|
+
description: str = proto.Field(
|
|
268
|
+
proto.STRING,
|
|
269
|
+
number=3,
|
|
270
|
+
)
|
|
271
|
+
category: "MaintenanceCategory" = proto.Field(
|
|
272
|
+
proto.ENUM,
|
|
273
|
+
number=13,
|
|
274
|
+
enum="MaintenanceCategory",
|
|
275
|
+
)
|
|
276
|
+
maintenance_scheduled_start_time: timestamp_pb2.Timestamp = proto.Field(
|
|
277
|
+
proto.MESSAGE,
|
|
278
|
+
number=6,
|
|
279
|
+
message=timestamp_pb2.Timestamp,
|
|
280
|
+
)
|
|
281
|
+
maintenance_scheduled_end_time: timestamp_pb2.Timestamp = proto.Field(
|
|
282
|
+
proto.MESSAGE,
|
|
283
|
+
number=7,
|
|
284
|
+
message=timestamp_pb2.Timestamp,
|
|
285
|
+
)
|
|
286
|
+
maintenance_start_time: timestamp_pb2.Timestamp = proto.Field(
|
|
287
|
+
proto.MESSAGE,
|
|
288
|
+
number=8,
|
|
289
|
+
message=timestamp_pb2.Timestamp,
|
|
290
|
+
)
|
|
291
|
+
maintenance_end_time: timestamp_pb2.Timestamp = proto.Field(
|
|
292
|
+
proto.MESSAGE,
|
|
293
|
+
number=9,
|
|
294
|
+
message=timestamp_pb2.Timestamp,
|
|
295
|
+
)
|
|
296
|
+
user_controllable: bool = proto.Field(
|
|
297
|
+
proto.BOOL,
|
|
298
|
+
number=10,
|
|
299
|
+
)
|
|
300
|
+
controls: MutableSequence["MaintenanceControl"] = proto.RepeatedField(
|
|
301
|
+
proto.MESSAGE,
|
|
302
|
+
number=14,
|
|
303
|
+
message="MaintenanceControl",
|
|
304
|
+
)
|
|
305
|
+
stats: MutableSequence[Stats] = proto.RepeatedField(
|
|
306
|
+
proto.MESSAGE,
|
|
307
|
+
number=12,
|
|
308
|
+
message=Stats,
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
class ResourceMaintenance(proto.Message):
|
|
313
|
+
r"""ResourceMaintenance is a resource that represents a
|
|
314
|
+
maintenance operation on a resource.
|
|
315
|
+
|
|
316
|
+
Attributes:
|
|
317
|
+
name (str):
|
|
318
|
+
Identifier. The name of the resource_maintenance resource.
|
|
319
|
+
Format:
|
|
320
|
+
``"projects/{project}/locations/{location}/resourceMaintenance/{resource-maintenance-id}"``
|
|
321
|
+
resource (google.cloud.maintenance_api_v1beta.types.ResourceMaintenance.Resource):
|
|
322
|
+
Output only. The resource spec of the
|
|
323
|
+
resource maintenance.
|
|
324
|
+
maintenance (google.cloud.maintenance_api_v1beta.types.ResourceMaintenance.Maintenance):
|
|
325
|
+
Output only. The details of the maintenance.
|
|
326
|
+
state (google.cloud.maintenance_api_v1beta.types.ResourceMaintenance.State):
|
|
327
|
+
Output only. The state of the resource
|
|
328
|
+
maintenance.
|
|
329
|
+
create_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
330
|
+
Output only. The create time of the resource
|
|
331
|
+
maintenance.
|
|
332
|
+
update_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
333
|
+
Output only. The update time of the resource
|
|
334
|
+
maintenance.
|
|
335
|
+
maintenance_start_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
336
|
+
Output only. The time when the resource
|
|
337
|
+
maintenance has started.
|
|
338
|
+
maintenance_end_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
339
|
+
Output only. The time when the resource
|
|
340
|
+
maintenance has completed.
|
|
341
|
+
maintenance_cancel_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
342
|
+
Output only. The time when the resource
|
|
343
|
+
maintenance was cancelled.
|
|
344
|
+
maintenance_scheduled_start_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
345
|
+
Output only. The time when the maintenance on
|
|
346
|
+
the resource was scheduled to start.
|
|
347
|
+
maintenance_scheduled_end_time (google.protobuf.timestamp_pb2.Timestamp):
|
|
348
|
+
Output only. The time when the maintenance on
|
|
349
|
+
the resource was scheduled to end.
|
|
350
|
+
user_controllable (bool):
|
|
351
|
+
Output only. Indicates whether the user has
|
|
352
|
+
some control over that maintenance, either
|
|
353
|
+
proactively before maintenance was scheduled
|
|
354
|
+
with maintenance policy or with reactive
|
|
355
|
+
controls after it was scheduled (see controls
|
|
356
|
+
field)
|
|
357
|
+
controls (MutableSequence[google.cloud.maintenance_api_v1beta.types.MaintenanceControl]):
|
|
358
|
+
Output only. The controls of the maintenance.
|
|
359
|
+
labels (MutableMapping[str, str]):
|
|
360
|
+
Optional. The labels on the resource, which
|
|
361
|
+
can be used for categorization. similar to
|
|
362
|
+
Kubernetes resource labels.
|
|
363
|
+
annotations (MutableMapping[str, str]):
|
|
364
|
+
Optional. Annotations is an unstructured
|
|
365
|
+
key-value map stored with a resource that may be
|
|
366
|
+
set by external tools to store and retrieve
|
|
367
|
+
arbitrary metadata. They are not queryable and
|
|
368
|
+
should be preserved when modifying objects.
|
|
369
|
+
|
|
370
|
+
More info:
|
|
371
|
+
https://kubernetes.io/docs/user-guide/annotations
|
|
372
|
+
uid (str):
|
|
373
|
+
Output only. The unique identifier of the
|
|
374
|
+
resource. UID is unique in the time and space
|
|
375
|
+
for this resource within the scope of the
|
|
376
|
+
service. It is typically generated by the server
|
|
377
|
+
on successful creation of a resource and must
|
|
378
|
+
not be changed. UID is used to uniquely identify
|
|
379
|
+
resources with resource name reuses. This should
|
|
380
|
+
be a UUID4.
|
|
381
|
+
etag (str):
|
|
382
|
+
Output only. An opaque value that uniquely
|
|
383
|
+
identifies a version or generation of a
|
|
384
|
+
resource. It can be used to confirm that the
|
|
385
|
+
client and server agree on the ordering of a
|
|
386
|
+
resource being written.
|
|
387
|
+
"""
|
|
388
|
+
|
|
389
|
+
class State(proto.Enum):
|
|
390
|
+
r"""State is the state of a resource maintenance.
|
|
391
|
+
|
|
392
|
+
Values:
|
|
393
|
+
STATE_UNSPECIFIED (0):
|
|
394
|
+
Unspecified state.
|
|
395
|
+
SCHEDULED (1):
|
|
396
|
+
Scheduled for a particular window. For
|
|
397
|
+
disruptive maintenance it should respect
|
|
398
|
+
maintenance policy, i.e. its available windows,
|
|
399
|
+
exclusions and notification period.
|
|
400
|
+
RUNNING (2):
|
|
401
|
+
Maintenance is ongoing.
|
|
402
|
+
CANCELLED (3):
|
|
403
|
+
No longer planned, typically when other
|
|
404
|
+
maintenance (e.g. upgrade to newer version)
|
|
405
|
+
already happened, or the user skipped the
|
|
406
|
+
maintenance.
|
|
407
|
+
SUCCEEDED (4):
|
|
408
|
+
Successfully completed.
|
|
409
|
+
"""
|
|
410
|
+
STATE_UNSPECIFIED = 0
|
|
411
|
+
SCHEDULED = 1
|
|
412
|
+
RUNNING = 2
|
|
413
|
+
CANCELLED = 3
|
|
414
|
+
SUCCEEDED = 4
|
|
415
|
+
|
|
416
|
+
class Resource(proto.Message):
|
|
417
|
+
r"""Resource contains information about the resource affected by
|
|
418
|
+
maintenance.
|
|
419
|
+
|
|
420
|
+
Attributes:
|
|
421
|
+
resource_name (str):
|
|
422
|
+
Output only. Name is the reference to the
|
|
423
|
+
consumer resource affected by the maintenance.
|
|
424
|
+
Available values can be found here:
|
|
425
|
+
|
|
426
|
+
https://cloud.google.com/asset-inventory/docs/asset-names
|
|
427
|
+
location (str):
|
|
428
|
+
Output only. The location of the resource. Format:
|
|
429
|
+
``us-central1``
|
|
430
|
+
type_ (str):
|
|
431
|
+
Output only. The type of the resource. Available values can
|
|
432
|
+
be found here:
|
|
433
|
+
https://cloud.google.com/asset-inventory/docs/asset-types#supported_resource_types
|
|
434
|
+
Please note that not all the resource types will have their
|
|
435
|
+
maintenances reported.
|
|
436
|
+
"""
|
|
437
|
+
|
|
438
|
+
resource_name: str = proto.Field(
|
|
439
|
+
proto.STRING,
|
|
440
|
+
number=1,
|
|
441
|
+
)
|
|
442
|
+
location: str = proto.Field(
|
|
443
|
+
proto.STRING,
|
|
444
|
+
number=2,
|
|
445
|
+
)
|
|
446
|
+
type_: str = proto.Field(
|
|
447
|
+
proto.STRING,
|
|
448
|
+
number=3,
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
class Maintenance(proto.Message):
|
|
452
|
+
r"""Maintenance is the maintenance details of a resource's
|
|
453
|
+
maintenance.
|
|
454
|
+
|
|
455
|
+
Attributes:
|
|
456
|
+
maintenance_name (str):
|
|
457
|
+
Maintenance is the name of the corresponding maintenance
|
|
458
|
+
resource following the standard naming scheme:
|
|
459
|
+
``"{maintenance-id}"``
|
|
460
|
+
title (str):
|
|
461
|
+
Output only. The title of the maintenance.
|
|
462
|
+
description (str):
|
|
463
|
+
Output only. The description of the
|
|
464
|
+
maintenance.
|
|
465
|
+
category (google.cloud.maintenance_api_v1beta.types.MaintenanceCategory):
|
|
466
|
+
Output only. The category of the maintenance.
|
|
467
|
+
"""
|
|
468
|
+
|
|
469
|
+
maintenance_name: str = proto.Field(
|
|
470
|
+
proto.STRING,
|
|
471
|
+
number=1,
|
|
472
|
+
)
|
|
473
|
+
title: str = proto.Field(
|
|
474
|
+
proto.STRING,
|
|
475
|
+
number=2,
|
|
476
|
+
)
|
|
477
|
+
description: str = proto.Field(
|
|
478
|
+
proto.STRING,
|
|
479
|
+
number=3,
|
|
480
|
+
)
|
|
481
|
+
category: "MaintenanceCategory" = proto.Field(
|
|
482
|
+
proto.ENUM,
|
|
483
|
+
number=4,
|
|
484
|
+
enum="MaintenanceCategory",
|
|
485
|
+
)
|
|
486
|
+
|
|
487
|
+
name: str = proto.Field(
|
|
488
|
+
proto.STRING,
|
|
489
|
+
number=1,
|
|
490
|
+
)
|
|
491
|
+
resource: Resource = proto.Field(
|
|
492
|
+
proto.MESSAGE,
|
|
493
|
+
number=2,
|
|
494
|
+
message=Resource,
|
|
495
|
+
)
|
|
496
|
+
maintenance: Maintenance = proto.Field(
|
|
497
|
+
proto.MESSAGE,
|
|
498
|
+
number=3,
|
|
499
|
+
message=Maintenance,
|
|
500
|
+
)
|
|
501
|
+
state: State = proto.Field(
|
|
502
|
+
proto.ENUM,
|
|
503
|
+
number=4,
|
|
504
|
+
enum=State,
|
|
505
|
+
)
|
|
506
|
+
create_time: timestamp_pb2.Timestamp = proto.Field(
|
|
507
|
+
proto.MESSAGE,
|
|
508
|
+
number=5,
|
|
509
|
+
message=timestamp_pb2.Timestamp,
|
|
510
|
+
)
|
|
511
|
+
update_time: timestamp_pb2.Timestamp = proto.Field(
|
|
512
|
+
proto.MESSAGE,
|
|
513
|
+
number=6,
|
|
514
|
+
message=timestamp_pb2.Timestamp,
|
|
515
|
+
)
|
|
516
|
+
maintenance_start_time: timestamp_pb2.Timestamp = proto.Field(
|
|
517
|
+
proto.MESSAGE,
|
|
518
|
+
number=7,
|
|
519
|
+
message=timestamp_pb2.Timestamp,
|
|
520
|
+
)
|
|
521
|
+
maintenance_end_time: timestamp_pb2.Timestamp = proto.Field(
|
|
522
|
+
proto.MESSAGE,
|
|
523
|
+
number=8,
|
|
524
|
+
message=timestamp_pb2.Timestamp,
|
|
525
|
+
)
|
|
526
|
+
maintenance_cancel_time: timestamp_pb2.Timestamp = proto.Field(
|
|
527
|
+
proto.MESSAGE,
|
|
528
|
+
number=9,
|
|
529
|
+
message=timestamp_pb2.Timestamp,
|
|
530
|
+
)
|
|
531
|
+
maintenance_scheduled_start_time: timestamp_pb2.Timestamp = proto.Field(
|
|
532
|
+
proto.MESSAGE,
|
|
533
|
+
number=10,
|
|
534
|
+
message=timestamp_pb2.Timestamp,
|
|
535
|
+
)
|
|
536
|
+
maintenance_scheduled_end_time: timestamp_pb2.Timestamp = proto.Field(
|
|
537
|
+
proto.MESSAGE,
|
|
538
|
+
number=11,
|
|
539
|
+
message=timestamp_pb2.Timestamp,
|
|
540
|
+
)
|
|
541
|
+
user_controllable: bool = proto.Field(
|
|
542
|
+
proto.BOOL,
|
|
543
|
+
number=12,
|
|
544
|
+
)
|
|
545
|
+
controls: MutableSequence["MaintenanceControl"] = proto.RepeatedField(
|
|
546
|
+
proto.MESSAGE,
|
|
547
|
+
number=13,
|
|
548
|
+
message="MaintenanceControl",
|
|
549
|
+
)
|
|
550
|
+
labels: MutableMapping[str, str] = proto.MapField(
|
|
551
|
+
proto.STRING,
|
|
552
|
+
proto.STRING,
|
|
553
|
+
number=10401,
|
|
554
|
+
)
|
|
555
|
+
annotations: MutableMapping[str, str] = proto.MapField(
|
|
556
|
+
proto.STRING,
|
|
557
|
+
proto.STRING,
|
|
558
|
+
number=10402,
|
|
559
|
+
)
|
|
560
|
+
uid: str = proto.Field(
|
|
561
|
+
proto.STRING,
|
|
562
|
+
number=10201,
|
|
563
|
+
)
|
|
564
|
+
etag: str = proto.Field(
|
|
565
|
+
proto.STRING,
|
|
566
|
+
number=10202,
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
class MaintenanceControl(proto.Message):
|
|
571
|
+
r"""The control of the maintenance.
|
|
572
|
+
|
|
573
|
+
Attributes:
|
|
574
|
+
control (google.cloud.maintenance_api_v1beta.types.MaintenanceControl.Control):
|
|
575
|
+
The control of the resource maintenance.
|
|
576
|
+
is_custom (bool):
|
|
577
|
+
Indicates whether the control is available
|
|
578
|
+
only in Service Producer API (not through
|
|
579
|
+
Unified Maintenance).
|
|
580
|
+
documentation (str):
|
|
581
|
+
Link to Service Producer documentation about maintenance
|
|
582
|
+
control. Provided only when ``isCustom`` is ``true``.
|
|
583
|
+
"""
|
|
584
|
+
|
|
585
|
+
class Control(proto.Enum):
|
|
586
|
+
r"""Sets the type of control supported. comment (as in logs).
|
|
587
|
+
|
|
588
|
+
Values:
|
|
589
|
+
CONTROL_UNSPECIFIED (0):
|
|
590
|
+
Unspecified control.
|
|
591
|
+
APPLY (1):
|
|
592
|
+
Apply control.
|
|
593
|
+
MANAGE_POLICY (2):
|
|
594
|
+
Manage policy control.
|
|
595
|
+
RESCHEDULE (3):
|
|
596
|
+
Reschedule control.
|
|
597
|
+
"""
|
|
598
|
+
CONTROL_UNSPECIFIED = 0
|
|
599
|
+
APPLY = 1
|
|
600
|
+
MANAGE_POLICY = 2
|
|
601
|
+
RESCHEDULE = 3
|
|
602
|
+
|
|
603
|
+
control: Control = proto.Field(
|
|
604
|
+
proto.ENUM,
|
|
605
|
+
number=1,
|
|
606
|
+
enum=Control,
|
|
607
|
+
)
|
|
608
|
+
is_custom: bool = proto.Field(
|
|
609
|
+
proto.BOOL,
|
|
610
|
+
number=2,
|
|
611
|
+
)
|
|
612
|
+
documentation: str = proto.Field(
|
|
613
|
+
proto.STRING,
|
|
614
|
+
number=3,
|
|
615
|
+
)
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
class ListResourceMaintenancesRequest(proto.Message):
|
|
619
|
+
r"""The request structure for the ListResourceMaintenances
|
|
620
|
+
method.
|
|
621
|
+
|
|
622
|
+
Attributes:
|
|
623
|
+
parent (str):
|
|
624
|
+
Required. The parent of the resource
|
|
625
|
+
maintenance.
|
|
626
|
+
page_size (int):
|
|
627
|
+
The maximum number of resource maintenances
|
|
628
|
+
to send per page.
|
|
629
|
+
page_token (str):
|
|
630
|
+
The page token: If the next_page_token from a previous
|
|
631
|
+
response is provided, this request will send the subsequent
|
|
632
|
+
page.
|
|
633
|
+
filter (str):
|
|
634
|
+
Filter the list as specified in
|
|
635
|
+
https://google.aip.dev/160.
|
|
636
|
+
order_by (str):
|
|
637
|
+
Order results as specified in
|
|
638
|
+
https://google.aip.dev/132.
|
|
639
|
+
"""
|
|
640
|
+
|
|
641
|
+
parent: str = proto.Field(
|
|
642
|
+
proto.STRING,
|
|
643
|
+
number=10006,
|
|
644
|
+
)
|
|
645
|
+
page_size: int = proto.Field(
|
|
646
|
+
proto.INT32,
|
|
647
|
+
number=10505,
|
|
648
|
+
)
|
|
649
|
+
page_token: str = proto.Field(
|
|
650
|
+
proto.STRING,
|
|
651
|
+
number=10506,
|
|
652
|
+
)
|
|
653
|
+
filter: str = proto.Field(
|
|
654
|
+
proto.STRING,
|
|
655
|
+
number=10507,
|
|
656
|
+
)
|
|
657
|
+
order_by: str = proto.Field(
|
|
658
|
+
proto.STRING,
|
|
659
|
+
number=10508,
|
|
660
|
+
)
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
class ListResourceMaintenancesResponse(proto.Message):
|
|
664
|
+
r"""The response structure for the ListResourceMaintenances
|
|
665
|
+
method.
|
|
666
|
+
|
|
667
|
+
Attributes:
|
|
668
|
+
resource_maintenances (MutableSequence[google.cloud.maintenance_api_v1beta.types.ResourceMaintenance]):
|
|
669
|
+
The resulting resource maintenances.
|
|
670
|
+
next_page_token (str):
|
|
671
|
+
If present, the next page token can be
|
|
672
|
+
provided to a subsequent
|
|
673
|
+
ListResourceMaintenances call to list the next
|
|
674
|
+
page. If empty, there are no more pages.
|
|
675
|
+
unreachable (MutableSequence[str]):
|
|
676
|
+
Locations that could not be reached.
|
|
677
|
+
"""
|
|
678
|
+
|
|
679
|
+
@property
|
|
680
|
+
def raw_page(self):
|
|
681
|
+
return self
|
|
682
|
+
|
|
683
|
+
resource_maintenances: MutableSequence["ResourceMaintenance"] = proto.RepeatedField(
|
|
684
|
+
proto.MESSAGE,
|
|
685
|
+
number=10509,
|
|
686
|
+
message="ResourceMaintenance",
|
|
687
|
+
)
|
|
688
|
+
next_page_token: str = proto.Field(
|
|
689
|
+
proto.STRING,
|
|
690
|
+
number=10510,
|
|
691
|
+
)
|
|
692
|
+
unreachable: MutableSequence[str] = proto.RepeatedField(
|
|
693
|
+
proto.STRING,
|
|
694
|
+
number=10511,
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
class GetResourceMaintenanceRequest(proto.Message):
|
|
699
|
+
r"""The request structure for the GetResourceMaintenance method.
|
|
700
|
+
|
|
701
|
+
Attributes:
|
|
702
|
+
name (str):
|
|
703
|
+
Required. The resource name of the resource
|
|
704
|
+
within a service.
|
|
705
|
+
"""
|
|
706
|
+
|
|
707
|
+
name: str = proto.Field(
|
|
708
|
+
proto.STRING,
|
|
709
|
+
number=10001,
|
|
710
|
+
)
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
__all__ = tuple(sorted(__protobuf__.manifest))
|