Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/google/cloud/logging_v2/types/logging_config.py: 98%

188 statements  

« prev     ^ index     » next       coverage.py v7.2.2, created at 2023-03-26 07:30 +0000

1# -*- coding: utf-8 -*- 

2# Copyright 2022 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# 

16from __future__ import annotations 

17 

18from typing import MutableMapping, MutableSequence 

19 

20import proto # type: ignore 

21 

22from google.protobuf import field_mask_pb2 # type: ignore 

23from google.protobuf import timestamp_pb2 # type: ignore 

24 

25 

26__protobuf__ = proto.module( 

27 package="google.logging.v2", 

28 manifest={ 

29 "LifecycleState", 

30 "OperationState", 

31 "LogBucket", 

32 "LogView", 

33 "LogSink", 

34 "BigQueryOptions", 

35 "ListBucketsRequest", 

36 "ListBucketsResponse", 

37 "CreateBucketRequest", 

38 "UpdateBucketRequest", 

39 "GetBucketRequest", 

40 "DeleteBucketRequest", 

41 "UndeleteBucketRequest", 

42 "ListViewsRequest", 

43 "ListViewsResponse", 

44 "CreateViewRequest", 

45 "UpdateViewRequest", 

46 "GetViewRequest", 

47 "DeleteViewRequest", 

48 "ListSinksRequest", 

49 "ListSinksResponse", 

50 "GetSinkRequest", 

51 "CreateSinkRequest", 

52 "UpdateSinkRequest", 

53 "DeleteSinkRequest", 

54 "LogExclusion", 

55 "ListExclusionsRequest", 

56 "ListExclusionsResponse", 

57 "GetExclusionRequest", 

58 "CreateExclusionRequest", 

59 "UpdateExclusionRequest", 

60 "DeleteExclusionRequest", 

61 "GetCmekSettingsRequest", 

62 "UpdateCmekSettingsRequest", 

63 "CmekSettings", 

64 "GetSettingsRequest", 

65 "UpdateSettingsRequest", 

66 "Settings", 

67 "CopyLogEntriesRequest", 

68 "CopyLogEntriesMetadata", 

69 "CopyLogEntriesResponse", 

70 }, 

71) 

72 

73 

74class LifecycleState(proto.Enum): 

75 r"""LogBucket lifecycle states. 

76 

77 Values: 

78 LIFECYCLE_STATE_UNSPECIFIED (0): 

79 Unspecified state. This is only used/useful 

80 for distinguishing unset values. 

81 ACTIVE (1): 

82 The normal and active state. 

83 DELETE_REQUESTED (2): 

84 The resource has been marked for deletion by 

85 the user. For some resources (e.g. buckets), 

86 this can be reversed by an un-delete operation. 

87 """ 

88 LIFECYCLE_STATE_UNSPECIFIED = 0 

89 ACTIVE = 1 

90 DELETE_REQUESTED = 2 

91 

92 

93class OperationState(proto.Enum): 

94 r"""List of different operation states. 

95 High level state of the operation. This is used to report the 

96 job's current state to the user. Once a long running operation 

97 is created, the current state of the operation can be queried 

98 even before the operation is finished and the final result is 

99 available. 

100 

101 Values: 

102 OPERATION_STATE_UNSPECIFIED (0): 

103 Should not be used. 

104 OPERATION_STATE_SCHEDULED (1): 

105 The operation is scheduled. 

106 OPERATION_STATE_WAITING_FOR_PERMISSIONS (2): 

107 Waiting for necessary permissions. 

108 OPERATION_STATE_RUNNING (3): 

109 The operation is running. 

110 OPERATION_STATE_SUCCEEDED (4): 

111 The operation was completed successfully. 

112 OPERATION_STATE_FAILED (5): 

113 The operation failed. 

114 OPERATION_STATE_CANCELLED (6): 

115 The operation was cancelled by the user. 

116 """ 

117 OPERATION_STATE_UNSPECIFIED = 0 

118 OPERATION_STATE_SCHEDULED = 1 

119 OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2 

120 OPERATION_STATE_RUNNING = 3 

121 OPERATION_STATE_SUCCEEDED = 4 

122 OPERATION_STATE_FAILED = 5 

123 OPERATION_STATE_CANCELLED = 6 

124 

125 

126class LogBucket(proto.Message): 

127 r"""Describes a repository in which log entries are stored. 

128 

129 Attributes: 

130 name (str): 

131 Output only. The resource name of the bucket. 

132 

133 For example: 

134 

135 ``projects/my-project/locations/global/buckets/my-bucket`` 

136 

137 For a list of supported locations, see `Supported 

138 Regions <https://cloud.google.com/logging/docs/region-support>`__ 

139 

140 For the location of ``global`` it is unspecified where log 

141 entries are actually stored. 

142 

143 After a bucket has been created, the location cannot be 

144 changed. 

145 description (str): 

146 Describes this bucket. 

147 create_time (google.protobuf.timestamp_pb2.Timestamp): 

148 Output only. The creation timestamp of the 

149 bucket. This is not set for any of the default 

150 buckets. 

151 update_time (google.protobuf.timestamp_pb2.Timestamp): 

152 Output only. The last update timestamp of the 

153 bucket. 

154 retention_days (int): 

155 Logs will be retained by default for this 

156 amount of time, after which they will 

157 automatically be deleted. The minimum retention 

158 period is 1 day. If this value is set to zero at 

159 bucket creation time, the default time of 30 

160 days will be used. 

161 locked (bool): 

162 Whether the bucket is locked. 

163 The retention period on a locked bucket cannot 

164 be changed. Locked buckets may only be deleted 

165 if they are empty. 

166 lifecycle_state (google.cloud.logging_v2.types.LifecycleState): 

167 Output only. The bucket lifecycle state. 

168 restricted_fields (MutableSequence[str]): 

169 Log entry field paths that are denied access in this bucket. 

170 

171 The following fields and their children are eligible: 

172 ``textPayload``, ``jsonPayload``, ``protoPayload``, 

173 ``httpRequest``, ``labels``, ``sourceLocation``. 

174 

175 Restricting a repeated field will restrict all values. 

176 Adding a parent will block all child fields. (e.g. 

177 ``foo.bar`` will block ``foo.bar.baz``) 

178 cmek_settings (google.cloud.logging_v2.types.CmekSettings): 

179 The CMEK settings of the log bucket. If 

180 present, new log entries written to this log 

181 bucket are encrypted using the CMEK key provided 

182 in this configuration. If a log bucket has CMEK 

183 settings, the CMEK settings cannot be disabled 

184 later by updating the log bucket. Changing the 

185 KMS key is allowed. 

186 """ 

187 

188 name: str = proto.Field( 

189 proto.STRING, 

190 number=1, 

191 ) 

192 description: str = proto.Field( 

193 proto.STRING, 

194 number=3, 

195 ) 

196 create_time: timestamp_pb2.Timestamp = proto.Field( 

197 proto.MESSAGE, 

198 number=4, 

199 message=timestamp_pb2.Timestamp, 

200 ) 

201 update_time: timestamp_pb2.Timestamp = proto.Field( 

202 proto.MESSAGE, 

203 number=5, 

204 message=timestamp_pb2.Timestamp, 

205 ) 

206 retention_days: int = proto.Field( 

207 proto.INT32, 

208 number=11, 

209 ) 

210 locked: bool = proto.Field( 

211 proto.BOOL, 

212 number=9, 

213 ) 

214 lifecycle_state: "LifecycleState" = proto.Field( 

215 proto.ENUM, 

216 number=12, 

217 enum="LifecycleState", 

218 ) 

219 restricted_fields: MutableSequence[str] = proto.RepeatedField( 

220 proto.STRING, 

221 number=15, 

222 ) 

223 cmek_settings: "CmekSettings" = proto.Field( 

224 proto.MESSAGE, 

225 number=19, 

226 message="CmekSettings", 

227 ) 

228 

229 

230class LogView(proto.Message): 

231 r"""Describes a view over log entries in a bucket. 

232 

233 Attributes: 

234 name (str): 

235 The resource name of the view. 

236 

237 For example: 

238 

239 ``projects/my-project/locations/global/buckets/my-bucket/views/my-view`` 

240 description (str): 

241 Describes this view. 

242 create_time (google.protobuf.timestamp_pb2.Timestamp): 

243 Output only. The creation timestamp of the 

244 view. 

245 update_time (google.protobuf.timestamp_pb2.Timestamp): 

246 Output only. The last update timestamp of the 

247 view. 

248 filter (str): 

249 Filter that restricts which log entries in a bucket are 

250 visible in this view. 

251 

252 Filters are restricted to be a logical AND of ==/!= of any 

253 of the following: 

254 

255 - originating project/folder/organization/billing account. 

256 - resource type 

257 - log id 

258 

259 For example: 

260 

261 SOURCE("projects/myproject") AND resource.type = 

262 "gce_instance" AND LOG_ID("stdout") 

263 """ 

264 

265 name: str = proto.Field( 

266 proto.STRING, 

267 number=1, 

268 ) 

269 description: str = proto.Field( 

270 proto.STRING, 

271 number=3, 

272 ) 

273 create_time: timestamp_pb2.Timestamp = proto.Field( 

274 proto.MESSAGE, 

275 number=4, 

276 message=timestamp_pb2.Timestamp, 

277 ) 

278 update_time: timestamp_pb2.Timestamp = proto.Field( 

279 proto.MESSAGE, 

280 number=5, 

281 message=timestamp_pb2.Timestamp, 

282 ) 

283 filter: str = proto.Field( 

284 proto.STRING, 

285 number=7, 

286 ) 

287 

288 

289class LogSink(proto.Message): 

290 r"""Describes a sink used to export log entries to one of the 

291 following destinations in any project: a Cloud Storage bucket, a 

292 BigQuery dataset, a Pub/Sub topic or a Cloud Logging log bucket. 

293 A logs filter controls which log entries are exported. The sink 

294 must be created within a project, organization, billing account, 

295 or folder. 

296 

297 

298 .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields 

299 

300 Attributes: 

301 name (str): 

302 Required. The client-assigned sink identifier, unique within 

303 the project. 

304 

305 For example: ``"my-syslog-errors-to-pubsub"``. Sink 

306 identifiers are limited to 100 characters and can include 

307 only the following characters: upper and lower-case 

308 alphanumeric characters, underscores, hyphens, and periods. 

309 First character has to be alphanumeric. 

310 destination (str): 

311 Required. The export destination: 

312 

313 :: 

314 

315 "storage.googleapis.com/[GCS_BUCKET]" 

316 "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" 

317 "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" 

318 

319 The sink's ``writer_identity``, set when the sink is 

320 created, must have permission to write to the destination or 

321 else the log entries are not exported. For more information, 

322 see `Exporting Logs with 

323 Sinks <https://cloud.google.com/logging/docs/api/tasks/exporting-logs>`__. 

324 filter (str): 

325 Optional. An `advanced logs 

326 filter <https://cloud.google.com/logging/docs/view/advanced-queries>`__. 

327 The only exported log entries are those that are in the 

328 resource owning the sink and that match the filter. 

329 

330 For example: 

331 

332 ``logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR`` 

333 description (str): 

334 Optional. A description of this sink. 

335 The maximum length of the description is 8000 

336 characters. 

337 disabled (bool): 

338 Optional. If set to true, then this sink is 

339 disabled and it does not export any log entries. 

340 exclusions (MutableSequence[google.cloud.logging_v2.types.LogExclusion]): 

341 Optional. Log entries that match any of these exclusion 

342 filters will not be exported. 

343 

344 If a log entry is matched by both ``filter`` and one of 

345 ``exclusion_filters`` it will not be exported. 

346 output_version_format (google.cloud.logging_v2.types.LogSink.VersionFormat): 

347 Deprecated. This field is unused. 

348 writer_identity (str): 

349 Output only. An IAM identity—a service account or 

350 group—under which Cloud Logging writes the exported log 

351 entries to the sink's destination. This field is set by 

352 [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] 

353 and 

354 [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] 

355 based on the value of ``unique_writer_identity`` in those 

356 methods. 

357 

358 Until you grant this identity write-access to the 

359 destination, log entry exports from this sink will fail. For 

360 more information, see `Granting Access for a 

361 Resource <https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource>`__. 

362 Consult the destination service's documentation to determine 

363 the appropriate IAM roles to assign to the identity. 

364 

365 Sinks that have a destination that is a log bucket in the 

366 same project as the sink do not have a writer_identity and 

367 no additional permissions are required. 

368 include_children (bool): 

369 Optional. This field applies only to sinks owned by 

370 organizations and folders. If the field is false, the 

371 default, only the logs owned by the sink's parent resource 

372 are available for export. If the field is true, then log 

373 entries from all the projects, folders, and billing accounts 

374 contained in the sink's parent resource are also available 

375 for export. Whether a particular log entry from the children 

376 is exported depends on the sink's filter expression. 

377 

378 For example, if this field is true, then the filter 

379 ``resource.type=gce_instance`` would export all Compute 

380 Engine VM instance log entries from all projects in the 

381 sink's parent. 

382 

383 To only export entries from certain child projects, filter 

384 on the project part of the log name: 

385 

386 logName:("projects/test-project1/" OR 

387 "projects/test-project2/") AND resource.type=gce_instance 

388 bigquery_options (google.cloud.logging_v2.types.BigQueryOptions): 

389 Optional. Options that affect sinks exporting 

390 data to BigQuery. 

391 

392 This field is a member of `oneof`_ ``options``. 

393 create_time (google.protobuf.timestamp_pb2.Timestamp): 

394 Output only. The creation timestamp of the 

395 sink. 

396 This field may not be present for older sinks. 

397 update_time (google.protobuf.timestamp_pb2.Timestamp): 

398 Output only. The last update timestamp of the 

399 sink. 

400 This field may not be present for older sinks. 

401 """ 

402 

403 class VersionFormat(proto.Enum): 

404 r"""Deprecated. This is unused. 

405 

406 Values: 

407 VERSION_FORMAT_UNSPECIFIED (0): 

408 An unspecified format version that will 

409 default to V2. 

410 V2 (1): 

411 ``LogEntry`` version 2 format. 

412 V1 (2): 

413 ``LogEntry`` version 1 format. 

414 """ 

415 VERSION_FORMAT_UNSPECIFIED = 0 

416 V2 = 1 

417 V1 = 2 

418 

419 name: str = proto.Field( 

420 proto.STRING, 

421 number=1, 

422 ) 

423 destination: str = proto.Field( 

424 proto.STRING, 

425 number=3, 

426 ) 

427 filter: str = proto.Field( 

428 proto.STRING, 

429 number=5, 

430 ) 

431 description: str = proto.Field( 

432 proto.STRING, 

433 number=18, 

434 ) 

435 disabled: bool = proto.Field( 

436 proto.BOOL, 

437 number=19, 

438 ) 

439 exclusions: MutableSequence["LogExclusion"] = proto.RepeatedField( 

440 proto.MESSAGE, 

441 number=16, 

442 message="LogExclusion", 

443 ) 

444 output_version_format: VersionFormat = proto.Field( 

445 proto.ENUM, 

446 number=6, 

447 enum=VersionFormat, 

448 ) 

449 writer_identity: str = proto.Field( 

450 proto.STRING, 

451 number=8, 

452 ) 

453 include_children: bool = proto.Field( 

454 proto.BOOL, 

455 number=9, 

456 ) 

457 bigquery_options: "BigQueryOptions" = proto.Field( 

458 proto.MESSAGE, 

459 number=12, 

460 oneof="options", 

461 message="BigQueryOptions", 

462 ) 

463 create_time: timestamp_pb2.Timestamp = proto.Field( 

464 proto.MESSAGE, 

465 number=13, 

466 message=timestamp_pb2.Timestamp, 

467 ) 

468 update_time: timestamp_pb2.Timestamp = proto.Field( 

469 proto.MESSAGE, 

470 number=14, 

471 message=timestamp_pb2.Timestamp, 

472 ) 

473 

474 

475class BigQueryOptions(proto.Message): 

476 r"""Options that change functionality of a sink exporting data to 

477 BigQuery. 

478 

479 Attributes: 

480 use_partitioned_tables (bool): 

481 Optional. Whether to use `BigQuery's partition 

482 tables <https://cloud.google.com/bigquery/docs/partitioned-tables>`__. 

483 By default, Cloud Logging creates dated tables based on the 

484 log entries' timestamps, e.g. syslog_20170523. With 

485 partitioned tables the date suffix is no longer present and 

486 `special query 

487 syntax <https://cloud.google.com/bigquery/docs/querying-partitioned-tables>`__ 

488 has to be used instead. In both cases, tables are sharded 

489 based on UTC timezone. 

490 uses_timestamp_column_partitioning (bool): 

491 Output only. True if new timestamp column based partitioning 

492 is in use, false if legacy ingestion-time partitioning is in 

493 use. 

494 

495 All new sinks will have this field set true and will use 

496 timestamp column based partitioning. If 

497 use_partitioned_tables is false, this value has no meaning 

498 and will be false. Legacy sinks using partitioned tables 

499 will have this field set to false. 

500 """ 

501 

502 use_partitioned_tables: bool = proto.Field( 

503 proto.BOOL, 

504 number=1, 

505 ) 

506 uses_timestamp_column_partitioning: bool = proto.Field( 

507 proto.BOOL, 

508 number=3, 

509 ) 

510 

511 

512class ListBucketsRequest(proto.Message): 

513 r"""The parameters to ``ListBuckets``. 

514 

515 Attributes: 

516 parent (str): 

517 Required. The parent resource whose buckets are to be 

518 listed: 

519 

520 :: 

521 

522 "projects/[PROJECT_ID]/locations/[LOCATION_ID]" 

523 "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" 

524 "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" 

525 "folders/[FOLDER_ID]/locations/[LOCATION_ID]" 

526 

527 Note: The locations portion of the resource must be 

528 specified, but supplying the character ``-`` in place of 

529 [LOCATION_ID] will return all buckets. 

530 page_token (str): 

531 Optional. If present, then retrieve the next batch of 

532 results from the preceding call to this method. 

533 ``pageToken`` must be the value of ``nextPageToken`` from 

534 the previous response. The values of other method parameters 

535 should be identical to those in the previous call. 

536 page_size (int): 

537 Optional. The maximum number of results to return from this 

538 request. Non-positive values are ignored. The presence of 

539 ``nextPageToken`` in the response indicates that more 

540 results might be available. 

541 """ 

542 

543 parent: str = proto.Field( 

544 proto.STRING, 

545 number=1, 

546 ) 

547 page_token: str = proto.Field( 

548 proto.STRING, 

549 number=2, 

550 ) 

551 page_size: int = proto.Field( 

552 proto.INT32, 

553 number=3, 

554 ) 

555 

556 

557class ListBucketsResponse(proto.Message): 

558 r"""The response from ListBuckets. 

559 

560 Attributes: 

561 buckets (MutableSequence[google.cloud.logging_v2.types.LogBucket]): 

562 A list of buckets. 

563 next_page_token (str): 

564 If there might be more results than appear in this response, 

565 then ``nextPageToken`` is included. To get the next set of 

566 results, call the same method again using the value of 

567 ``nextPageToken`` as ``pageToken``. 

568 """ 

569 

570 @property 

571 def raw_page(self): 

572 return self 

573 

574 buckets: MutableSequence["LogBucket"] = proto.RepeatedField( 

575 proto.MESSAGE, 

576 number=1, 

577 message="LogBucket", 

578 ) 

579 next_page_token: str = proto.Field( 

580 proto.STRING, 

581 number=2, 

582 ) 

583 

584 

585class CreateBucketRequest(proto.Message): 

586 r"""The parameters to ``CreateBucket``. 

587 

588 Attributes: 

589 parent (str): 

590 Required. The resource in which to create the log bucket: 

591 

592 :: 

593 

594 "projects/[PROJECT_ID]/locations/[LOCATION_ID]" 

595 

596 For example: 

597 

598 ``"projects/my-project/locations/global"`` 

599 bucket_id (str): 

600 Required. A client-assigned identifier such as 

601 ``"my-bucket"``. Identifiers are limited to 100 characters 

602 and can include only letters, digits, underscores, hyphens, 

603 and periods. 

604 bucket (google.cloud.logging_v2.types.LogBucket): 

605 Required. The new bucket. The region 

606 specified in the new bucket must be compliant 

607 with any Location Restriction Org Policy. The 

608 name field in the bucket is ignored. 

609 """ 

610 

611 parent: str = proto.Field( 

612 proto.STRING, 

613 number=1, 

614 ) 

615 bucket_id: str = proto.Field( 

616 proto.STRING, 

617 number=2, 

618 ) 

619 bucket: "LogBucket" = proto.Field( 

620 proto.MESSAGE, 

621 number=3, 

622 message="LogBucket", 

623 ) 

624 

625 

626class UpdateBucketRequest(proto.Message): 

627 r"""The parameters to ``UpdateBucket``. 

628 

629 Attributes: 

630 name (str): 

631 Required. The full resource name of the bucket to update. 

632 

633 :: 

634 

635 "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

636 "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

637 "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

638 "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

639 

640 For example: 

641 

642 ``"projects/my-project/locations/global/buckets/my-bucket"`` 

643 bucket (google.cloud.logging_v2.types.LogBucket): 

644 Required. The updated bucket. 

645 update_mask (google.protobuf.field_mask_pb2.FieldMask): 

646 Required. Field mask that specifies the fields in ``bucket`` 

647 that need an update. A bucket field will be overwritten if, 

648 and only if, it is in the update mask. ``name`` and output 

649 only fields cannot be updated. 

650 

651 For a detailed ``FieldMask`` definition, see: 

652 https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask 

653 

654 For example: ``updateMask=retention_days`` 

655 """ 

656 

657 name: str = proto.Field( 

658 proto.STRING, 

659 number=1, 

660 ) 

661 bucket: "LogBucket" = proto.Field( 

662 proto.MESSAGE, 

663 number=2, 

664 message="LogBucket", 

665 ) 

666 update_mask: field_mask_pb2.FieldMask = proto.Field( 

667 proto.MESSAGE, 

668 number=4, 

669 message=field_mask_pb2.FieldMask, 

670 ) 

671 

672 

673class GetBucketRequest(proto.Message): 

674 r"""The parameters to ``GetBucket``. 

675 

676 Attributes: 

677 name (str): 

678 Required. The resource name of the bucket: 

679 

680 :: 

681 

682 "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

683 "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

684 "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

685 "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

686 

687 For example: 

688 

689 ``"projects/my-project/locations/global/buckets/my-bucket"`` 

690 """ 

691 

692 name: str = proto.Field( 

693 proto.STRING, 

694 number=1, 

695 ) 

696 

697 

698class DeleteBucketRequest(proto.Message): 

699 r"""The parameters to ``DeleteBucket``. 

700 

701 Attributes: 

702 name (str): 

703 Required. The full resource name of the bucket to delete. 

704 

705 :: 

706 

707 "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

708 "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

709 "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

710 "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

711 

712 For example: 

713 

714 ``"projects/my-project/locations/global/buckets/my-bucket"`` 

715 """ 

716 

717 name: str = proto.Field( 

718 proto.STRING, 

719 number=1, 

720 ) 

721 

722 

723class UndeleteBucketRequest(proto.Message): 

724 r"""The parameters to ``UndeleteBucket``. 

725 

726 Attributes: 

727 name (str): 

728 Required. The full resource name of the bucket to undelete. 

729 

730 :: 

731 

732 "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

733 "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

734 "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

735 "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" 

736 

737 For example: 

738 

739 ``"projects/my-project/locations/global/buckets/my-bucket"`` 

740 """ 

741 

742 name: str = proto.Field( 

743 proto.STRING, 

744 number=1, 

745 ) 

746 

747 

748class ListViewsRequest(proto.Message): 

749 r"""The parameters to ``ListViews``. 

750 

751 Attributes: 

752 parent (str): 

753 Required. The bucket whose views are to be listed: 

754 

755 :: 

756 

757 "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". 

758 page_token (str): 

759 Optional. If present, then retrieve the next batch of 

760 results from the preceding call to this method. 

761 ``pageToken`` must be the value of ``nextPageToken`` from 

762 the previous response. The values of other method parameters 

763 should be identical to those in the previous call. 

764 page_size (int): 

765 Optional. The maximum number of results to return from this 

766 request. 

767 

768 Non-positive values are ignored. The presence of 

769 ``nextPageToken`` in the response indicates that more 

770 results might be available. 

771 """ 

772 

773 parent: str = proto.Field( 

774 proto.STRING, 

775 number=1, 

776 ) 

777 page_token: str = proto.Field( 

778 proto.STRING, 

779 number=2, 

780 ) 

781 page_size: int = proto.Field( 

782 proto.INT32, 

783 number=3, 

784 ) 

785 

786 

787class ListViewsResponse(proto.Message): 

788 r"""The response from ListViews. 

789 

790 Attributes: 

791 views (MutableSequence[google.cloud.logging_v2.types.LogView]): 

792 A list of views. 

793 next_page_token (str): 

794 If there might be more results than appear in this response, 

795 then ``nextPageToken`` is included. To get the next set of 

796 results, call the same method again using the value of 

797 ``nextPageToken`` as ``pageToken``. 

798 """ 

799 

800 @property 

801 def raw_page(self): 

802 return self 

803 

804 views: MutableSequence["LogView"] = proto.RepeatedField( 

805 proto.MESSAGE, 

806 number=1, 

807 message="LogView", 

808 ) 

809 next_page_token: str = proto.Field( 

810 proto.STRING, 

811 number=2, 

812 ) 

813 

814 

815class CreateViewRequest(proto.Message): 

816 r"""The parameters to ``CreateView``. 

817 

818 Attributes: 

819 parent (str): 

820 Required. The bucket in which to create the view 

821 

822 :: 

823 

824 `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` 

825 

826 For example: 

827 

828 ``"projects/my-project/locations/global/buckets/my-bucket"`` 

829 view_id (str): 

830 Required. The id to use for this view. 

831 view (google.cloud.logging_v2.types.LogView): 

832 Required. The new view. 

833 """ 

834 

835 parent: str = proto.Field( 

836 proto.STRING, 

837 number=1, 

838 ) 

839 view_id: str = proto.Field( 

840 proto.STRING, 

841 number=2, 

842 ) 

843 view: "LogView" = proto.Field( 

844 proto.MESSAGE, 

845 number=3, 

846 message="LogView", 

847 ) 

848 

849 

850class UpdateViewRequest(proto.Message): 

851 r"""The parameters to ``UpdateView``. 

852 

853 Attributes: 

854 name (str): 

855 Required. The full resource name of the view to update 

856 

857 :: 

858 

859 "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" 

860 

861 For example: 

862 

863 ``"projects/my-project/locations/global/buckets/my-bucket/views/my-view"`` 

864 view (google.cloud.logging_v2.types.LogView): 

865 Required. The updated view. 

866 update_mask (google.protobuf.field_mask_pb2.FieldMask): 

867 Optional. Field mask that specifies the fields in ``view`` 

868 that need an update. A field will be overwritten if, and 

869 only if, it is in the update mask. ``name`` and output only 

870 fields cannot be updated. 

871 

872 For a detailed ``FieldMask`` definition, see 

873 https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask 

874 

875 For example: ``updateMask=filter`` 

876 """ 

877 

878 name: str = proto.Field( 

879 proto.STRING, 

880 number=1, 

881 ) 

882 view: "LogView" = proto.Field( 

883 proto.MESSAGE, 

884 number=2, 

885 message="LogView", 

886 ) 

887 update_mask: field_mask_pb2.FieldMask = proto.Field( 

888 proto.MESSAGE, 

889 number=4, 

890 message=field_mask_pb2.FieldMask, 

891 ) 

892 

893 

894class GetViewRequest(proto.Message): 

895 r"""The parameters to ``GetView``. 

896 

897 Attributes: 

898 name (str): 

899 Required. The resource name of the policy: 

900 

901 :: 

902 

903 "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" 

904 

905 For example: 

906 

907 ``"projects/my-project/locations/global/buckets/my-bucket/views/my-view"`` 

908 """ 

909 

910 name: str = proto.Field( 

911 proto.STRING, 

912 number=1, 

913 ) 

914 

915 

916class DeleteViewRequest(proto.Message): 

917 r"""The parameters to ``DeleteView``. 

918 

919 Attributes: 

920 name (str): 

921 Required. The full resource name of the view to delete: 

922 

923 :: 

924 

925 "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" 

926 

927 For example: 

928 

929 :: 

930 

931 `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` 

932 """ 

933 

934 name: str = proto.Field( 

935 proto.STRING, 

936 number=1, 

937 ) 

938 

939 

940class ListSinksRequest(proto.Message): 

941 r"""The parameters to ``ListSinks``. 

942 

943 Attributes: 

944 parent (str): 

945 Required. The parent resource whose sinks are to be listed: 

946 

947 :: 

948 

949 "projects/[PROJECT_ID]" 

950 "organizations/[ORGANIZATION_ID]" 

951 "billingAccounts/[BILLING_ACCOUNT_ID]" 

952 "folders/[FOLDER_ID]". 

953 page_token (str): 

954 Optional. If present, then retrieve the next batch of 

955 results from the preceding call to this method. 

956 ``pageToken`` must be the value of ``nextPageToken`` from 

957 the previous response. The values of other method parameters 

958 should be identical to those in the previous call. 

959 page_size (int): 

960 Optional. The maximum number of results to return from this 

961 request. Non-positive values are ignored. The presence of 

962 ``nextPageToken`` in the response indicates that more 

963 results might be available. 

964 """ 

965 

966 parent: str = proto.Field( 

967 proto.STRING, 

968 number=1, 

969 ) 

970 page_token: str = proto.Field( 

971 proto.STRING, 

972 number=2, 

973 ) 

974 page_size: int = proto.Field( 

975 proto.INT32, 

976 number=3, 

977 ) 

978 

979 

980class ListSinksResponse(proto.Message): 

981 r"""Result returned from ``ListSinks``. 

982 

983 Attributes: 

984 sinks (MutableSequence[google.cloud.logging_v2.types.LogSink]): 

985 A list of sinks. 

986 next_page_token (str): 

987 If there might be more results than appear in this response, 

988 then ``nextPageToken`` is included. To get the next set of 

989 results, call the same method again using the value of 

990 ``nextPageToken`` as ``pageToken``. 

991 """ 

992 

993 @property 

994 def raw_page(self): 

995 return self 

996 

997 sinks: MutableSequence["LogSink"] = proto.RepeatedField( 

998 proto.MESSAGE, 

999 number=1, 

1000 message="LogSink", 

1001 ) 

1002 next_page_token: str = proto.Field( 

1003 proto.STRING, 

1004 number=2, 

1005 ) 

1006 

1007 

1008class GetSinkRequest(proto.Message): 

1009 r"""The parameters to ``GetSink``. 

1010 

1011 Attributes: 

1012 sink_name (str): 

1013 Required. The resource name of the sink: 

1014 

1015 :: 

1016 

1017 "projects/[PROJECT_ID]/sinks/[SINK_ID]" 

1018 "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" 

1019 "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" 

1020 "folders/[FOLDER_ID]/sinks/[SINK_ID]" 

1021 

1022 For example: 

1023 

1024 ``"projects/my-project/sinks/my-sink"`` 

1025 """ 

1026 

1027 sink_name: str = proto.Field( 

1028 proto.STRING, 

1029 number=1, 

1030 ) 

1031 

1032 

1033class CreateSinkRequest(proto.Message): 

1034 r"""The parameters to ``CreateSink``. 

1035 

1036 Attributes: 

1037 parent (str): 

1038 Required. The resource in which to create the sink: 

1039 

1040 :: 

1041 

1042 "projects/[PROJECT_ID]" 

1043 "organizations/[ORGANIZATION_ID]" 

1044 "billingAccounts/[BILLING_ACCOUNT_ID]" 

1045 "folders/[FOLDER_ID]" 

1046 

1047 For examples: 

1048 

1049 ``"projects/my-project"`` ``"organizations/123456789"`` 

1050 sink (google.cloud.logging_v2.types.LogSink): 

1051 Required. The new sink, whose ``name`` parameter is a sink 

1052 identifier that is not already in use. 

1053 unique_writer_identity (bool): 

1054 Optional. Determines the kind of IAM identity returned as 

1055 ``writer_identity`` in the new sink. If this value is 

1056 omitted or set to false, and if the sink's parent is a 

1057 project, then the value returned as ``writer_identity`` is 

1058 the same group or service account used by Cloud Logging 

1059 before the addition of writer identities to this API. The 

1060 sink's destination must be in the same project as the sink 

1061 itself. 

1062 

1063 If this field is set to true, or if the sink is owned by a 

1064 non-project resource such as an organization, then the value 

1065 of ``writer_identity`` will be a unique service account used 

1066 only for exports from the new sink. For more information, 

1067 see ``writer_identity`` in 

1068 [LogSink][google.logging.v2.LogSink]. 

1069 """ 

1070 

1071 parent: str = proto.Field( 

1072 proto.STRING, 

1073 number=1, 

1074 ) 

1075 sink: "LogSink" = proto.Field( 

1076 proto.MESSAGE, 

1077 number=2, 

1078 message="LogSink", 

1079 ) 

1080 unique_writer_identity: bool = proto.Field( 

1081 proto.BOOL, 

1082 number=3, 

1083 ) 

1084 

1085 

1086class UpdateSinkRequest(proto.Message): 

1087 r"""The parameters to ``UpdateSink``. 

1088 

1089 Attributes: 

1090 sink_name (str): 

1091 Required. The full resource name of the sink to update, 

1092 including the parent resource and the sink identifier: 

1093 

1094 :: 

1095 

1096 "projects/[PROJECT_ID]/sinks/[SINK_ID]" 

1097 "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" 

1098 "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" 

1099 "folders/[FOLDER_ID]/sinks/[SINK_ID]" 

1100 

1101 For example: 

1102 

1103 ``"projects/my-project/sinks/my-sink"`` 

1104 sink (google.cloud.logging_v2.types.LogSink): 

1105 Required. The updated sink, whose name is the same 

1106 identifier that appears as part of ``sink_name``. 

1107 unique_writer_identity (bool): 

1108 Optional. See 

1109 [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] 

1110 for a description of this field. When updating a sink, the 

1111 effect of this field on the value of ``writer_identity`` in 

1112 the updated sink depends on both the old and new values of 

1113 this field: 

1114 

1115 - If the old and new values of this field are both false or 

1116 both true, then there is no change to the sink's 

1117 ``writer_identity``. 

1118 - If the old value is false and the new value is true, then 

1119 ``writer_identity`` is changed to a unique service 

1120 account. 

1121 - It is an error if the old value is true and the new value 

1122 is set to false or defaulted to false. 

1123 update_mask (google.protobuf.field_mask_pb2.FieldMask): 

1124 Optional. Field mask that specifies the fields in ``sink`` 

1125 that need an update. A sink field will be overwritten if, 

1126 and only if, it is in the update mask. ``name`` and output 

1127 only fields cannot be updated. 

1128 

1129 An empty ``updateMask`` is temporarily treated as using the 

1130 following mask for backwards compatibility purposes: 

1131 

1132 ``destination,filter,includeChildren`` 

1133 

1134 At some point in the future, behavior will be removed and 

1135 specifying an empty ``updateMask`` will be an error. 

1136 

1137 For a detailed ``FieldMask`` definition, see 

1138 https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask 

1139 

1140 For example: ``updateMask=filter`` 

1141 """ 

1142 

1143 sink_name: str = proto.Field( 

1144 proto.STRING, 

1145 number=1, 

1146 ) 

1147 sink: "LogSink" = proto.Field( 

1148 proto.MESSAGE, 

1149 number=2, 

1150 message="LogSink", 

1151 ) 

1152 unique_writer_identity: bool = proto.Field( 

1153 proto.BOOL, 

1154 number=3, 

1155 ) 

1156 update_mask: field_mask_pb2.FieldMask = proto.Field( 

1157 proto.MESSAGE, 

1158 number=4, 

1159 message=field_mask_pb2.FieldMask, 

1160 ) 

1161 

1162 

1163class DeleteSinkRequest(proto.Message): 

1164 r"""The parameters to ``DeleteSink``. 

1165 

1166 Attributes: 

1167 sink_name (str): 

1168 Required. The full resource name of the sink to delete, 

1169 including the parent resource and the sink identifier: 

1170 

1171 :: 

1172 

1173 "projects/[PROJECT_ID]/sinks/[SINK_ID]" 

1174 "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" 

1175 "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" 

1176 "folders/[FOLDER_ID]/sinks/[SINK_ID]" 

1177 

1178 For example: 

1179 

1180 ``"projects/my-project/sinks/my-sink"`` 

1181 """ 

1182 

1183 sink_name: str = proto.Field( 

1184 proto.STRING, 

1185 number=1, 

1186 ) 

1187 

1188 

1189class LogExclusion(proto.Message): 

1190 r"""Specifies a set of log entries that are filtered out by a sink. If 

1191 your Google Cloud resource receives a large volume of log entries, 

1192 you can use exclusions to reduce your chargeable logs. Note that 

1193 exclusions on organization-level and folder-level sinks don't apply 

1194 to child resources. Note also that you cannot modify the \_Required 

1195 sink or exclude logs from it. 

1196 

1197 Attributes: 

1198 name (str): 

1199 Required. A client-assigned identifier, such as 

1200 ``"load-balancer-exclusion"``. Identifiers are limited to 

1201 100 characters and can include only letters, digits, 

1202 underscores, hyphens, and periods. First character has to be 

1203 alphanumeric. 

1204 description (str): 

1205 Optional. A description of this exclusion. 

1206 filter (str): 

1207 Required. An `advanced logs 

1208 filter <https://cloud.google.com/logging/docs/view/advanced-queries>`__ 

1209 that matches the log entries to be excluded. By using the 

1210 `sample 

1211 function <https://cloud.google.com/logging/docs/view/advanced-queries#sample>`__, 

1212 you can exclude less than 100% of the matching log entries. 

1213 

1214 For example, the following query matches 99% of low-severity 

1215 log entries from Google Cloud Storage buckets: 

1216 

1217 ``resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)`` 

1218 disabled (bool): 

1219 Optional. If set to True, then this exclusion is disabled 

1220 and it does not exclude any log entries. You can [update an 

1221 exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] 

1222 to change the value of this field. 

1223 create_time (google.protobuf.timestamp_pb2.Timestamp): 

1224 Output only. The creation timestamp of the 

1225 exclusion. 

1226 This field may not be present for older 

1227 exclusions. 

1228 update_time (google.protobuf.timestamp_pb2.Timestamp): 

1229 Output only. The last update timestamp of the 

1230 exclusion. 

1231 This field may not be present for older 

1232 exclusions. 

1233 """ 

1234 

1235 name: str = proto.Field( 

1236 proto.STRING, 

1237 number=1, 

1238 ) 

1239 description: str = proto.Field( 

1240 proto.STRING, 

1241 number=2, 

1242 ) 

1243 filter: str = proto.Field( 

1244 proto.STRING, 

1245 number=3, 

1246 ) 

1247 disabled: bool = proto.Field( 

1248 proto.BOOL, 

1249 number=4, 

1250 ) 

1251 create_time: timestamp_pb2.Timestamp = proto.Field( 

1252 proto.MESSAGE, 

1253 number=5, 

1254 message=timestamp_pb2.Timestamp, 

1255 ) 

1256 update_time: timestamp_pb2.Timestamp = proto.Field( 

1257 proto.MESSAGE, 

1258 number=6, 

1259 message=timestamp_pb2.Timestamp, 

1260 ) 

1261 

1262 

1263class ListExclusionsRequest(proto.Message): 

1264 r"""The parameters to ``ListExclusions``. 

1265 

1266 Attributes: 

1267 parent (str): 

1268 Required. The parent resource whose exclusions are to be 

1269 listed. 

1270 

1271 :: 

1272 

1273 "projects/[PROJECT_ID]" 

1274 "organizations/[ORGANIZATION_ID]" 

1275 "billingAccounts/[BILLING_ACCOUNT_ID]" 

1276 "folders/[FOLDER_ID]". 

1277 page_token (str): 

1278 Optional. If present, then retrieve the next batch of 

1279 results from the preceding call to this method. 

1280 ``pageToken`` must be the value of ``nextPageToken`` from 

1281 the previous response. The values of other method parameters 

1282 should be identical to those in the previous call. 

1283 page_size (int): 

1284 Optional. The maximum number of results to return from this 

1285 request. Non-positive values are ignored. The presence of 

1286 ``nextPageToken`` in the response indicates that more 

1287 results might be available. 

1288 """ 

1289 

1290 parent: str = proto.Field( 

1291 proto.STRING, 

1292 number=1, 

1293 ) 

1294 page_token: str = proto.Field( 

1295 proto.STRING, 

1296 number=2, 

1297 ) 

1298 page_size: int = proto.Field( 

1299 proto.INT32, 

1300 number=3, 

1301 ) 

1302 

1303 

1304class ListExclusionsResponse(proto.Message): 

1305 r"""Result returned from ``ListExclusions``. 

1306 

1307 Attributes: 

1308 exclusions (MutableSequence[google.cloud.logging_v2.types.LogExclusion]): 

1309 A list of exclusions. 

1310 next_page_token (str): 

1311 If there might be more results than appear in this response, 

1312 then ``nextPageToken`` is included. To get the next set of 

1313 results, call the same method again using the value of 

1314 ``nextPageToken`` as ``pageToken``. 

1315 """ 

1316 

1317 @property 

1318 def raw_page(self): 

1319 return self 

1320 

1321 exclusions: MutableSequence["LogExclusion"] = proto.RepeatedField( 

1322 proto.MESSAGE, 

1323 number=1, 

1324 message="LogExclusion", 

1325 ) 

1326 next_page_token: str = proto.Field( 

1327 proto.STRING, 

1328 number=2, 

1329 ) 

1330 

1331 

1332class GetExclusionRequest(proto.Message): 

1333 r"""The parameters to ``GetExclusion``. 

1334 

1335 Attributes: 

1336 name (str): 

1337 Required. The resource name of an existing exclusion: 

1338 

1339 :: 

1340 

1341 "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" 

1342 "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" 

1343 "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" 

1344 "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" 

1345 

1346 For example: 

1347 

1348 ``"projects/my-project/exclusions/my-exclusion"`` 

1349 """ 

1350 

1351 name: str = proto.Field( 

1352 proto.STRING, 

1353 number=1, 

1354 ) 

1355 

1356 

1357class CreateExclusionRequest(proto.Message): 

1358 r"""The parameters to ``CreateExclusion``. 

1359 

1360 Attributes: 

1361 parent (str): 

1362 Required. The parent resource in which to create the 

1363 exclusion: 

1364 

1365 :: 

1366 

1367 "projects/[PROJECT_ID]" 

1368 "organizations/[ORGANIZATION_ID]" 

1369 "billingAccounts/[BILLING_ACCOUNT_ID]" 

1370 "folders/[FOLDER_ID]" 

1371 

1372 For examples: 

1373 

1374 ``"projects/my-logging-project"`` 

1375 ``"organizations/123456789"`` 

1376 exclusion (google.cloud.logging_v2.types.LogExclusion): 

1377 Required. The new exclusion, whose ``name`` parameter is an 

1378 exclusion name that is not already used in the parent 

1379 resource. 

1380 """ 

1381 

1382 parent: str = proto.Field( 

1383 proto.STRING, 

1384 number=1, 

1385 ) 

1386 exclusion: "LogExclusion" = proto.Field( 

1387 proto.MESSAGE, 

1388 number=2, 

1389 message="LogExclusion", 

1390 ) 

1391 

1392 

1393class UpdateExclusionRequest(proto.Message): 

1394 r"""The parameters to ``UpdateExclusion``. 

1395 

1396 Attributes: 

1397 name (str): 

1398 Required. The resource name of the exclusion to update: 

1399 

1400 :: 

1401 

1402 "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" 

1403 "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" 

1404 "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" 

1405 "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" 

1406 

1407 For example: 

1408 

1409 ``"projects/my-project/exclusions/my-exclusion"`` 

1410 exclusion (google.cloud.logging_v2.types.LogExclusion): 

1411 Required. New values for the existing exclusion. Only the 

1412 fields specified in ``update_mask`` are relevant. 

1413 update_mask (google.protobuf.field_mask_pb2.FieldMask): 

1414 Required. A non-empty list of fields to change in the 

1415 existing exclusion. New values for the fields are taken from 

1416 the corresponding fields in the 

1417 [LogExclusion][google.logging.v2.LogExclusion] included in 

1418 this request. Fields not mentioned in ``update_mask`` are 

1419 not changed and are ignored in the request. 

1420 

1421 For example, to change the filter and description of an 

1422 exclusion, specify an ``update_mask`` of 

1423 ``"filter,description"``. 

1424 """ 

1425 

1426 name: str = proto.Field( 

1427 proto.STRING, 

1428 number=1, 

1429 ) 

1430 exclusion: "LogExclusion" = proto.Field( 

1431 proto.MESSAGE, 

1432 number=2, 

1433 message="LogExclusion", 

1434 ) 

1435 update_mask: field_mask_pb2.FieldMask = proto.Field( 

1436 proto.MESSAGE, 

1437 number=3, 

1438 message=field_mask_pb2.FieldMask, 

1439 ) 

1440 

1441 

1442class DeleteExclusionRequest(proto.Message): 

1443 r"""The parameters to ``DeleteExclusion``. 

1444 

1445 Attributes: 

1446 name (str): 

1447 Required. The resource name of an existing exclusion to 

1448 delete: 

1449 

1450 :: 

1451 

1452 "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" 

1453 "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" 

1454 "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" 

1455 "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" 

1456 

1457 For example: 

1458 

1459 ``"projects/my-project/exclusions/my-exclusion"`` 

1460 """ 

1461 

1462 name: str = proto.Field( 

1463 proto.STRING, 

1464 number=1, 

1465 ) 

1466 

1467 

1468class GetCmekSettingsRequest(proto.Message): 

1469 r"""The parameters to 

1470 [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings]. 

1471 

1472 See `Enabling CMEK for Log 

1473 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1474 for more information. 

1475 

1476 Attributes: 

1477 name (str): 

1478 Required. The resource for which to retrieve CMEK settings. 

1479 

1480 :: 

1481 

1482 "projects/[PROJECT_ID]/cmekSettings" 

1483 "organizations/[ORGANIZATION_ID]/cmekSettings" 

1484 "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" 

1485 "folders/[FOLDER_ID]/cmekSettings" 

1486 

1487 For example: 

1488 

1489 ``"organizations/12345/cmekSettings"`` 

1490 

1491 Note: CMEK for the Log Router can be configured for Google 

1492 Cloud projects, folders, organizations and billing accounts. 

1493 Once configured for an organization, it applies to all 

1494 projects and folders in the Google Cloud organization. 

1495 """ 

1496 

1497 name: str = proto.Field( 

1498 proto.STRING, 

1499 number=1, 

1500 ) 

1501 

1502 

1503class UpdateCmekSettingsRequest(proto.Message): 

1504 r"""The parameters to 

1505 [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings]. 

1506 

1507 See `Enabling CMEK for Log 

1508 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1509 for more information. 

1510 

1511 Attributes: 

1512 name (str): 

1513 Required. The resource name for the CMEK settings to update. 

1514 

1515 :: 

1516 

1517 "projects/[PROJECT_ID]/cmekSettings" 

1518 "organizations/[ORGANIZATION_ID]/cmekSettings" 

1519 "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" 

1520 "folders/[FOLDER_ID]/cmekSettings" 

1521 

1522 For example: 

1523 

1524 ``"organizations/12345/cmekSettings"`` 

1525 

1526 Note: CMEK for the Log Router can currently only be 

1527 configured for Google Cloud organizations. Once configured, 

1528 it applies to all projects and folders in the Google Cloud 

1529 organization. 

1530 cmek_settings (google.cloud.logging_v2.types.CmekSettings): 

1531 Required. The CMEK settings to update. 

1532 

1533 See `Enabling CMEK for Log 

1534 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1535 for more information. 

1536 update_mask (google.protobuf.field_mask_pb2.FieldMask): 

1537 Optional. Field mask identifying which fields from 

1538 ``cmek_settings`` should be updated. A field will be 

1539 overwritten if and only if it is in the update mask. Output 

1540 only fields cannot be updated. 

1541 

1542 See [FieldMask][google.protobuf.FieldMask] for more 

1543 information. 

1544 

1545 For example: ``"updateMask=kmsKeyName"`` 

1546 """ 

1547 

1548 name: str = proto.Field( 

1549 proto.STRING, 

1550 number=1, 

1551 ) 

1552 cmek_settings: "CmekSettings" = proto.Field( 

1553 proto.MESSAGE, 

1554 number=2, 

1555 message="CmekSettings", 

1556 ) 

1557 update_mask: field_mask_pb2.FieldMask = proto.Field( 

1558 proto.MESSAGE, 

1559 number=3, 

1560 message=field_mask_pb2.FieldMask, 

1561 ) 

1562 

1563 

1564class CmekSettings(proto.Message): 

1565 r"""Describes the customer-managed encryption key (CMEK) settings 

1566 associated with a project, folder, organization, billing account, or 

1567 flexible resource. 

1568 

1569 Note: CMEK for the Log Router can currently only be configured for 

1570 Google Cloud organizations. Once configured, it applies to all 

1571 projects and folders in the Google Cloud organization. 

1572 

1573 See `Enabling CMEK for Log 

1574 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1575 for more information. 

1576 

1577 Attributes: 

1578 name (str): 

1579 Output only. The resource name of the CMEK 

1580 settings. 

1581 kms_key_name (str): 

1582 The resource name for the configured Cloud KMS key. 

1583 

1584 KMS key name format: 

1585 

1586 :: 

1587 

1588 "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" 

1589 

1590 For example: 

1591 

1592 ``"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`` 

1593 

1594 To enable CMEK for the Log Router, set this field to a valid 

1595 ``kms_key_name`` for which the associated service account 

1596 has the required cloudkms.cryptoKeyEncrypterDecrypter roles 

1597 assigned for the key. 

1598 

1599 The Cloud KMS key used by the Log Router can be updated by 

1600 changing the ``kms_key_name`` to a new valid key name or 

1601 disabled by setting the key name to an empty string. 

1602 Encryption operations that are in progress will be completed 

1603 with the key that was in use when they started. Decryption 

1604 operations will be completed using the key that was used at 

1605 the time of encryption unless access to that key has been 

1606 revoked. 

1607 

1608 To disable CMEK for the Log Router, set this field to an 

1609 empty string. 

1610 

1611 See `Enabling CMEK for Log 

1612 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1613 for more information. 

1614 service_account_id (str): 

1615 Output only. The service account that will be used by the 

1616 Log Router to access your Cloud KMS key. 

1617 

1618 Before enabling CMEK for Log Router, you must first assign 

1619 the cloudkms.cryptoKeyEncrypterDecrypter role to the service 

1620 account that the Log Router will use to access your Cloud 

1621 KMS key. Use 

1622 [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] 

1623 to obtain the service account ID. 

1624 

1625 See `Enabling CMEK for Log 

1626 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1627 for more information. 

1628 """ 

1629 

1630 name: str = proto.Field( 

1631 proto.STRING, 

1632 number=1, 

1633 ) 

1634 kms_key_name: str = proto.Field( 

1635 proto.STRING, 

1636 number=2, 

1637 ) 

1638 service_account_id: str = proto.Field( 

1639 proto.STRING, 

1640 number=3, 

1641 ) 

1642 

1643 

1644class GetSettingsRequest(proto.Message): 

1645 r"""The parameters to 

1646 [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings]. 

1647 

1648 See `Enabling CMEK for Log 

1649 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1650 for more information. 

1651 

1652 Attributes: 

1653 name (str): 

1654 Required. The resource for which to retrieve settings. 

1655 

1656 :: 

1657 

1658 "projects/[PROJECT_ID]/settings" 

1659 "organizations/[ORGANIZATION_ID]/settings" 

1660 "billingAccounts/[BILLING_ACCOUNT_ID]/settings" 

1661 "folders/[FOLDER_ID]/settings" 

1662 

1663 For example: 

1664 

1665 ``"organizations/12345/settings"`` 

1666 

1667 Note: Settings for the Log Router can be get for Google 

1668 Cloud projects, folders, organizations and billing accounts. 

1669 Currently it can only be configured for organizations. Once 

1670 configured for an organization, it applies to all projects 

1671 and folders in the Google Cloud organization. 

1672 """ 

1673 

1674 name: str = proto.Field( 

1675 proto.STRING, 

1676 number=1, 

1677 ) 

1678 

1679 

1680class UpdateSettingsRequest(proto.Message): 

1681 r"""The parameters to 

1682 [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings]. 

1683 

1684 See `Enabling CMEK for Log 

1685 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1686 for more information. 

1687 

1688 Attributes: 

1689 name (str): 

1690 Required. The resource name for the settings to update. 

1691 

1692 :: 

1693 

1694 "organizations/[ORGANIZATION_ID]/settings" 

1695 

1696 For example: 

1697 

1698 ``"organizations/12345/settings"`` 

1699 

1700 Note: Settings for the Log Router can currently only be 

1701 configured for Google Cloud organizations. Once configured, 

1702 it applies to all projects and folders in the Google Cloud 

1703 organization. 

1704 settings (google.cloud.logging_v2.types.Settings): 

1705 Required. The settings to update. 

1706 

1707 See `Enabling CMEK for Log 

1708 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1709 for more information. 

1710 update_mask (google.protobuf.field_mask_pb2.FieldMask): 

1711 Optional. Field mask identifying which fields from 

1712 ``settings`` should be updated. A field will be overwritten 

1713 if and only if it is in the update mask. Output only fields 

1714 cannot be updated. 

1715 

1716 See [FieldMask][google.protobuf.FieldMask] for more 

1717 information. 

1718 

1719 For example: ``"updateMask=kmsKeyName"`` 

1720 """ 

1721 

1722 name: str = proto.Field( 

1723 proto.STRING, 

1724 number=1, 

1725 ) 

1726 settings: "Settings" = proto.Field( 

1727 proto.MESSAGE, 

1728 number=2, 

1729 message="Settings", 

1730 ) 

1731 update_mask: field_mask_pb2.FieldMask = proto.Field( 

1732 proto.MESSAGE, 

1733 number=3, 

1734 message=field_mask_pb2.FieldMask, 

1735 ) 

1736 

1737 

1738class Settings(proto.Message): 

1739 r"""Describes the settings associated with a project, folder, 

1740 organization, billing account, or flexible resource. 

1741 

1742 Attributes: 

1743 name (str): 

1744 Output only. The resource name of the 

1745 settings. 

1746 kms_key_name (str): 

1747 Optional. The resource name for the configured Cloud KMS 

1748 key. 

1749 

1750 KMS key name format: 

1751 

1752 :: 

1753 

1754 "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" 

1755 

1756 For example: 

1757 

1758 ``"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`` 

1759 

1760 To enable CMEK for the Log Router, set this field to a valid 

1761 ``kms_key_name`` for which the associated service account 

1762 has the required 

1763 ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` role assigned 

1764 for the key. 

1765 

1766 The Cloud KMS key used by the Log Router can be updated by 

1767 changing the ``kms_key_name`` to a new valid key name. 

1768 Encryption operations that are in progress will be completed 

1769 with the key that was in use when they started. Decryption 

1770 operations will be completed using the key that was used at 

1771 the time of encryption unless access to that key has been 

1772 revoked. 

1773 

1774 To disable CMEK for the Log Router, set this field to an 

1775 empty string. 

1776 

1777 See `Enabling CMEK for Log 

1778 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1779 for more information. 

1780 kms_service_account_id (str): 

1781 Output only. The service account that will be used by the 

1782 Log Router to access your Cloud KMS key. 

1783 

1784 Before enabling CMEK for Log Router, you must first assign 

1785 the role ``roles/cloudkms.cryptoKeyEncrypterDecrypter`` to 

1786 the service account that the Log Router will use to access 

1787 your Cloud KMS key. Use 

1788 [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] 

1789 to obtain the service account ID. 

1790 

1791 See `Enabling CMEK for Log 

1792 Router <https://cloud.google.com/logging/docs/routing/managed-encryption>`__ 

1793 for more information. 

1794 storage_location (str): 

1795 Optional. The Cloud region that will be used for \_Default 

1796 and \_Required log buckets for newly created projects and 

1797 folders. For example ``europe-west1``. This setting does not 

1798 affect the location of custom log buckets. 

1799 disable_default_sink (bool): 

1800 Optional. If set to true, the \_Default sink in newly 

1801 created projects and folders will created in a disabled 

1802 state. This can be used to automatically disable log 

1803 ingestion if there is already an aggregated sink configured 

1804 in the hierarchy. The \_Default sink can be re-enabled 

1805 manually if needed. 

1806 """ 

1807 

1808 name: str = proto.Field( 

1809 proto.STRING, 

1810 number=1, 

1811 ) 

1812 kms_key_name: str = proto.Field( 

1813 proto.STRING, 

1814 number=2, 

1815 ) 

1816 kms_service_account_id: str = proto.Field( 

1817 proto.STRING, 

1818 number=3, 

1819 ) 

1820 storage_location: str = proto.Field( 

1821 proto.STRING, 

1822 number=4, 

1823 ) 

1824 disable_default_sink: bool = proto.Field( 

1825 proto.BOOL, 

1826 number=5, 

1827 ) 

1828 

1829 

1830class CopyLogEntriesRequest(proto.Message): 

1831 r"""The parameters to CopyLogEntries. 

1832 

1833 Attributes: 

1834 name (str): 

1835 Required. Log bucket from which to copy log entries. 

1836 

1837 For example: 

1838 

1839 ``"projects/my-project/locations/global/buckets/my-source-bucket"`` 

1840 filter (str): 

1841 Optional. A filter specifying which log 

1842 entries to copy. The filter must be no more than 

1843 20k characters. An empty filter matches all log 

1844 entries. 

1845 destination (str): 

1846 Required. Destination to which to copy log 

1847 entries. 

1848 """ 

1849 

1850 name: str = proto.Field( 

1851 proto.STRING, 

1852 number=1, 

1853 ) 

1854 filter: str = proto.Field( 

1855 proto.STRING, 

1856 number=3, 

1857 ) 

1858 destination: str = proto.Field( 

1859 proto.STRING, 

1860 number=4, 

1861 ) 

1862 

1863 

1864class CopyLogEntriesMetadata(proto.Message): 

1865 r"""Metadata for CopyLogEntries long running operations. 

1866 

1867 Attributes: 

1868 start_time (google.protobuf.timestamp_pb2.Timestamp): 

1869 The create time of an operation. 

1870 end_time (google.protobuf.timestamp_pb2.Timestamp): 

1871 The end time of an operation. 

1872 state (google.cloud.logging_v2.types.OperationState): 

1873 State of an operation. 

1874 cancellation_requested (bool): 

1875 Identifies whether the user has requested 

1876 cancellation of the operation. 

1877 request (google.cloud.logging_v2.types.CopyLogEntriesRequest): 

1878 CopyLogEntries RPC request. 

1879 progress (int): 

1880 Estimated progress of the operation (0 - 

1881 100%). 

1882 writer_identity (str): 

1883 The IAM identity of a service account that must be granted 

1884 access to the destination. 

1885 

1886 If the service account is not granted permission to the 

1887 destination within an hour, the operation will be cancelled. 

1888 

1889 For example: ``"serviceAccount:foo@bar.com"`` 

1890 """ 

1891 

1892 start_time: timestamp_pb2.Timestamp = proto.Field( 

1893 proto.MESSAGE, 

1894 number=1, 

1895 message=timestamp_pb2.Timestamp, 

1896 ) 

1897 end_time: timestamp_pb2.Timestamp = proto.Field( 

1898 proto.MESSAGE, 

1899 number=2, 

1900 message=timestamp_pb2.Timestamp, 

1901 ) 

1902 state: "OperationState" = proto.Field( 

1903 proto.ENUM, 

1904 number=3, 

1905 enum="OperationState", 

1906 ) 

1907 cancellation_requested: bool = proto.Field( 

1908 proto.BOOL, 

1909 number=4, 

1910 ) 

1911 request: "CopyLogEntriesRequest" = proto.Field( 

1912 proto.MESSAGE, 

1913 number=5, 

1914 message="CopyLogEntriesRequest", 

1915 ) 

1916 progress: int = proto.Field( 

1917 proto.INT32, 

1918 number=6, 

1919 ) 

1920 writer_identity: str = proto.Field( 

1921 proto.STRING, 

1922 number=7, 

1923 ) 

1924 

1925 

1926class CopyLogEntriesResponse(proto.Message): 

1927 r"""Response type for CopyLogEntries long running operations. 

1928 

1929 Attributes: 

1930 log_entries_copied_count (int): 

1931 Number of log entries copied. 

1932 """ 

1933 

1934 log_entries_copied_count: int = proto.Field( 

1935 proto.INT64, 

1936 number=1, 

1937 ) 

1938 

1939 

1940__all__ = tuple(sorted(__protobuf__.manifest))