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

187 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 typing import MutableMapping, MutableSequence 

17 

18import proto # type: ignore 

19 

20from google.protobuf import field_mask_pb2 # type: ignore 

21from google.protobuf import timestamp_pb2 # type: ignore 

22 

23 

24__protobuf__ = proto.module( 

25 package="google.logging.v2", 

26 manifest={ 

27 "LifecycleState", 

28 "OperationState", 

29 "LogBucket", 

30 "LogView", 

31 "LogSink", 

32 "BigQueryOptions", 

33 "ListBucketsRequest", 

34 "ListBucketsResponse", 

35 "CreateBucketRequest", 

36 "UpdateBucketRequest", 

37 "GetBucketRequest", 

38 "DeleteBucketRequest", 

39 "UndeleteBucketRequest", 

40 "ListViewsRequest", 

41 "ListViewsResponse", 

42 "CreateViewRequest", 

43 "UpdateViewRequest", 

44 "GetViewRequest", 

45 "DeleteViewRequest", 

46 "ListSinksRequest", 

47 "ListSinksResponse", 

48 "GetSinkRequest", 

49 "CreateSinkRequest", 

50 "UpdateSinkRequest", 

51 "DeleteSinkRequest", 

52 "LogExclusion", 

53 "ListExclusionsRequest", 

54 "ListExclusionsResponse", 

55 "GetExclusionRequest", 

56 "CreateExclusionRequest", 

57 "UpdateExclusionRequest", 

58 "DeleteExclusionRequest", 

59 "GetCmekSettingsRequest", 

60 "UpdateCmekSettingsRequest", 

61 "CmekSettings", 

62 "GetSettingsRequest", 

63 "UpdateSettingsRequest", 

64 "Settings", 

65 "CopyLogEntriesRequest", 

66 "CopyLogEntriesMetadata", 

67 "CopyLogEntriesResponse", 

68 }, 

69) 

70 

71 

72class LifecycleState(proto.Enum): 

73 r"""LogBucket lifecycle states. 

74 

75 Values: 

76 LIFECYCLE_STATE_UNSPECIFIED (0): 

77 Unspecified state. This is only used/useful 

78 for distinguishing unset values. 

79 ACTIVE (1): 

80 The normal and active state. 

81 DELETE_REQUESTED (2): 

82 The resource has been marked for deletion by 

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

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

85 """ 

86 LIFECYCLE_STATE_UNSPECIFIED = 0 

87 ACTIVE = 1 

88 DELETE_REQUESTED = 2 

89 

90 

91class OperationState(proto.Enum): 

92 r"""List of different operation states. 

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

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

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

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

97 available. 

98 

99 Values: 

100 OPERATION_STATE_UNSPECIFIED (0): 

101 Should not be used. 

102 OPERATION_STATE_SCHEDULED (1): 

103 The operation is scheduled. 

104 OPERATION_STATE_WAITING_FOR_PERMISSIONS (2): 

105 Waiting for necessary permissions. 

106 OPERATION_STATE_RUNNING (3): 

107 The operation is running. 

108 OPERATION_STATE_SUCCEEDED (4): 

109 The operation was completed successfully. 

110 OPERATION_STATE_FAILED (5): 

111 The operation failed. 

112 OPERATION_STATE_CANCELLED (6): 

113 The operation was cancelled by the user. 

114 """ 

115 OPERATION_STATE_UNSPECIFIED = 0 

116 OPERATION_STATE_SCHEDULED = 1 

117 OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2 

118 OPERATION_STATE_RUNNING = 3 

119 OPERATION_STATE_SUCCEEDED = 4 

120 OPERATION_STATE_FAILED = 5 

121 OPERATION_STATE_CANCELLED = 6 

122 

123 

124class LogBucket(proto.Message): 

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

126 

127 Attributes: 

128 name (str): 

129 Output only. The resource name of the bucket. 

130 

131 For example: 

132 

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

134 

135 For a list of supported locations, see `Supported 

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

137 

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

139 entries are actually stored. 

140 

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

142 changed. 

143 description (str): 

144 Describes this bucket. 

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

146 Output only. The creation timestamp of the 

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

148 buckets. 

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

150 Output only. The last update timestamp of the 

151 bucket. 

152 retention_days (int): 

153 Logs will be retained by default for this 

154 amount of time, after which they will 

155 automatically be deleted. The minimum retention 

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

157 bucket creation time, the default time of 30 

158 days will be used. 

159 locked (bool): 

160 Whether the bucket is locked. 

161 The retention period on a locked bucket cannot 

162 be changed. Locked buckets may only be deleted 

163 if they are empty. 

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

165 Output only. The bucket lifecycle state. 

166 restricted_fields (MutableSequence[str]): 

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

168 

169 The following fields and their children are eligible: 

170 ``textPayload``, ``jsonPayload``, ``protoPayload``, 

171 ``httpRequest``, ``labels``, ``sourceLocation``. 

172 

173 Restricting a repeated field will restrict all values. 

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

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

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

177 The CMEK settings of the log bucket. If 

178 present, new log entries written to this log 

179 bucket are encrypted using the CMEK key provided 

180 in this configuration. If a log bucket has CMEK 

181 settings, the CMEK settings cannot be disabled 

182 later by updating the log bucket. Changing the 

183 KMS key is allowed. 

184 """ 

185 

186 name: str = proto.Field( 

187 proto.STRING, 

188 number=1, 

189 ) 

190 description: str = proto.Field( 

191 proto.STRING, 

192 number=3, 

193 ) 

194 create_time: timestamp_pb2.Timestamp = proto.Field( 

195 proto.MESSAGE, 

196 number=4, 

197 message=timestamp_pb2.Timestamp, 

198 ) 

199 update_time: timestamp_pb2.Timestamp = proto.Field( 

200 proto.MESSAGE, 

201 number=5, 

202 message=timestamp_pb2.Timestamp, 

203 ) 

204 retention_days: int = proto.Field( 

205 proto.INT32, 

206 number=11, 

207 ) 

208 locked: bool = proto.Field( 

209 proto.BOOL, 

210 number=9, 

211 ) 

212 lifecycle_state: "LifecycleState" = proto.Field( 

213 proto.ENUM, 

214 number=12, 

215 enum="LifecycleState", 

216 ) 

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

218 proto.STRING, 

219 number=15, 

220 ) 

221 cmek_settings: "CmekSettings" = proto.Field( 

222 proto.MESSAGE, 

223 number=19, 

224 message="CmekSettings", 

225 ) 

226 

227 

228class LogView(proto.Message): 

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

230 

231 Attributes: 

232 name (str): 

233 The resource name of the view. 

234 

235 For example: 

236 

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

238 description (str): 

239 Describes this view. 

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

241 Output only. The creation timestamp of the 

242 view. 

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

244 Output only. The last update timestamp of the 

245 view. 

246 filter (str): 

247 Filter that restricts which log entries in a bucket are 

248 visible in this view. 

249 

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

251 of the following: 

252 

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

254 - resource type 

255 - log id 

256 

257 For example: 

258 

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

260 "gce_instance" AND LOG_ID("stdout") 

261 """ 

262 

263 name: str = proto.Field( 

264 proto.STRING, 

265 number=1, 

266 ) 

267 description: str = proto.Field( 

268 proto.STRING, 

269 number=3, 

270 ) 

271 create_time: timestamp_pb2.Timestamp = proto.Field( 

272 proto.MESSAGE, 

273 number=4, 

274 message=timestamp_pb2.Timestamp, 

275 ) 

276 update_time: timestamp_pb2.Timestamp = proto.Field( 

277 proto.MESSAGE, 

278 number=5, 

279 message=timestamp_pb2.Timestamp, 

280 ) 

281 filter: str = proto.Field( 

282 proto.STRING, 

283 number=7, 

284 ) 

285 

286 

287class LogSink(proto.Message): 

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

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

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

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

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

293 or folder. 

294 

295 

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

297 

298 Attributes: 

299 name (str): 

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

301 the project. 

302 

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

304 identifiers are limited to 100 characters and can include 

305 only the following characters: upper and lower-case 

306 alphanumeric characters, underscores, hyphens, and periods. 

307 First character has to be alphanumeric. 

308 destination (str): 

309 Required. The export destination: 

310 

311 :: 

312 

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

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

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

316 

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

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

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

320 see `Exporting Logs with 

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

322 filter (str): 

323 Optional. An `advanced logs 

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

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

326 resource owning the sink and that match the filter. 

327 

328 For example: 

329 

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

331 description (str): 

332 Optional. A description of this sink. 

333 The maximum length of the description is 8000 

334 characters. 

335 disabled (bool): 

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

337 disabled and it does not export any log entries. 

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

339 Optional. Log entries that match any of these exclusion 

340 filters will not be exported. 

341 

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

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

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

345 Deprecated. This field is unused. 

346 writer_identity (str): 

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

348 group—under which Cloud Logging writes the exported log 

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

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

351 and 

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

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

354 methods. 

355 

356 Until you grant this identity write-access to the 

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

358 more information, see `Granting Access for a 

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

360 Consult the destination service's documentation to determine 

361 the appropriate IAM roles to assign to the identity. 

362 

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

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

365 no additional permissions are required. 

366 include_children (bool): 

367 Optional. This field applies only to sinks owned by 

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

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

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

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

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

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

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

375 

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

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

378 Engine VM instance log entries from all projects in the 

379 sink's parent. 

380 

381 To only export entries from certain child projects, filter 

382 on the project part of the log name: 

383 

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

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

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

387 Optional. Options that affect sinks exporting 

388 data to BigQuery. 

389 

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

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

392 Output only. The creation timestamp of the 

393 sink. 

394 This field may not be present for older sinks. 

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

396 Output only. The last update timestamp of the 

397 sink. 

398 This field may not be present for older sinks. 

399 """ 

400 

401 class VersionFormat(proto.Enum): 

402 r"""Deprecated. This is unused. 

403 

404 Values: 

405 VERSION_FORMAT_UNSPECIFIED (0): 

406 An unspecified format version that will 

407 default to V2. 

408 V2 (1): 

409 ``LogEntry`` version 2 format. 

410 V1 (2): 

411 ``LogEntry`` version 1 format. 

412 """ 

413 VERSION_FORMAT_UNSPECIFIED = 0 

414 V2 = 1 

415 V1 = 2 

416 

417 name: str = proto.Field( 

418 proto.STRING, 

419 number=1, 

420 ) 

421 destination: str = proto.Field( 

422 proto.STRING, 

423 number=3, 

424 ) 

425 filter: str = proto.Field( 

426 proto.STRING, 

427 number=5, 

428 ) 

429 description: str = proto.Field( 

430 proto.STRING, 

431 number=18, 

432 ) 

433 disabled: bool = proto.Field( 

434 proto.BOOL, 

435 number=19, 

436 ) 

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

438 proto.MESSAGE, 

439 number=16, 

440 message="LogExclusion", 

441 ) 

442 output_version_format: VersionFormat = proto.Field( 

443 proto.ENUM, 

444 number=6, 

445 enum=VersionFormat, 

446 ) 

447 writer_identity: str = proto.Field( 

448 proto.STRING, 

449 number=8, 

450 ) 

451 include_children: bool = proto.Field( 

452 proto.BOOL, 

453 number=9, 

454 ) 

455 bigquery_options: "BigQueryOptions" = proto.Field( 

456 proto.MESSAGE, 

457 number=12, 

458 oneof="options", 

459 message="BigQueryOptions", 

460 ) 

461 create_time: timestamp_pb2.Timestamp = proto.Field( 

462 proto.MESSAGE, 

463 number=13, 

464 message=timestamp_pb2.Timestamp, 

465 ) 

466 update_time: timestamp_pb2.Timestamp = proto.Field( 

467 proto.MESSAGE, 

468 number=14, 

469 message=timestamp_pb2.Timestamp, 

470 ) 

471 

472 

473class BigQueryOptions(proto.Message): 

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

475 BigQuery. 

476 

477 Attributes: 

478 use_partitioned_tables (bool): 

479 Optional. Whether to use `BigQuery's partition 

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

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

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

483 partitioned tables the date suffix is no longer present and 

484 `special query 

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

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

487 based on UTC timezone. 

488 uses_timestamp_column_partitioning (bool): 

489 Output only. True if new timestamp column based partitioning 

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

491 use. 

492 

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

494 timestamp column based partitioning. If 

495 use_partitioned_tables is false, this value has no meaning 

496 and will be false. Legacy sinks using partitioned tables 

497 will have this field set to false. 

498 """ 

499 

500 use_partitioned_tables: bool = proto.Field( 

501 proto.BOOL, 

502 number=1, 

503 ) 

504 uses_timestamp_column_partitioning: bool = proto.Field( 

505 proto.BOOL, 

506 number=3, 

507 ) 

508 

509 

510class ListBucketsRequest(proto.Message): 

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

512 

513 Attributes: 

514 parent (str): 

515 Required. The parent resource whose buckets are to be 

516 listed: 

517 

518 :: 

519 

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

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

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

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

524 

525 Note: The locations portion of the resource must be 

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

527 [LOCATION_ID] will return all buckets. 

528 page_token (str): 

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

530 results from the preceding call to this method. 

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

532 the previous response. The values of other method parameters 

533 should be identical to those in the previous call. 

534 page_size (int): 

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

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

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

538 results might be available. 

539 """ 

540 

541 parent: str = proto.Field( 

542 proto.STRING, 

543 number=1, 

544 ) 

545 page_token: str = proto.Field( 

546 proto.STRING, 

547 number=2, 

548 ) 

549 page_size: int = proto.Field( 

550 proto.INT32, 

551 number=3, 

552 ) 

553 

554 

555class ListBucketsResponse(proto.Message): 

556 r"""The response from ListBuckets. 

557 

558 Attributes: 

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

560 A list of buckets. 

561 next_page_token (str): 

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

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

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

565 ``nextPageToken`` as ``pageToken``. 

566 """ 

567 

568 @property 

569 def raw_page(self): 

570 return self 

571 

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

573 proto.MESSAGE, 

574 number=1, 

575 message="LogBucket", 

576 ) 

577 next_page_token: str = proto.Field( 

578 proto.STRING, 

579 number=2, 

580 ) 

581 

582 

583class CreateBucketRequest(proto.Message): 

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

585 

586 Attributes: 

587 parent (str): 

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

589 

590 :: 

591 

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

593 

594 For example: 

595 

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

597 bucket_id (str): 

598 Required. A client-assigned identifier such as 

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

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

601 and periods. 

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

603 Required. The new bucket. The region 

604 specified in the new bucket must be compliant 

605 with any Location Restriction Org Policy. The 

606 name field in the bucket is ignored. 

607 """ 

608 

609 parent: str = proto.Field( 

610 proto.STRING, 

611 number=1, 

612 ) 

613 bucket_id: str = proto.Field( 

614 proto.STRING, 

615 number=2, 

616 ) 

617 bucket: "LogBucket" = proto.Field( 

618 proto.MESSAGE, 

619 number=3, 

620 message="LogBucket", 

621 ) 

622 

623 

624class UpdateBucketRequest(proto.Message): 

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

626 

627 Attributes: 

628 name (str): 

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

630 

631 :: 

632 

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

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

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

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

637 

638 For example: 

639 

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

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

642 Required. The updated bucket. 

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

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

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

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

647 only fields cannot be updated. 

648 

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

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

651 

652 For example: ``updateMask=retention_days`` 

653 """ 

654 

655 name: str = proto.Field( 

656 proto.STRING, 

657 number=1, 

658 ) 

659 bucket: "LogBucket" = proto.Field( 

660 proto.MESSAGE, 

661 number=2, 

662 message="LogBucket", 

663 ) 

664 update_mask: field_mask_pb2.FieldMask = proto.Field( 

665 proto.MESSAGE, 

666 number=4, 

667 message=field_mask_pb2.FieldMask, 

668 ) 

669 

670 

671class GetBucketRequest(proto.Message): 

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

673 

674 Attributes: 

675 name (str): 

676 Required. The resource name of the bucket: 

677 

678 :: 

679 

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

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

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

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

684 

685 For example: 

686 

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

688 """ 

689 

690 name: str = proto.Field( 

691 proto.STRING, 

692 number=1, 

693 ) 

694 

695 

696class DeleteBucketRequest(proto.Message): 

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

698 

699 Attributes: 

700 name (str): 

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

702 

703 :: 

704 

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

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

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

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

709 

710 For example: 

711 

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

713 """ 

714 

715 name: str = proto.Field( 

716 proto.STRING, 

717 number=1, 

718 ) 

719 

720 

721class UndeleteBucketRequest(proto.Message): 

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

723 

724 Attributes: 

725 name (str): 

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

727 

728 :: 

729 

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

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

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

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

734 

735 For example: 

736 

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

738 """ 

739 

740 name: str = proto.Field( 

741 proto.STRING, 

742 number=1, 

743 ) 

744 

745 

746class ListViewsRequest(proto.Message): 

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

748 

749 Attributes: 

750 parent (str): 

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

752 

753 :: 

754 

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

756 page_token (str): 

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

758 results from the preceding call to this method. 

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

760 the previous response. The values of other method parameters 

761 should be identical to those in the previous call. 

762 page_size (int): 

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

764 request. 

765 

766 Non-positive values are ignored. The presence of 

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

768 results might be available. 

769 """ 

770 

771 parent: str = proto.Field( 

772 proto.STRING, 

773 number=1, 

774 ) 

775 page_token: str = proto.Field( 

776 proto.STRING, 

777 number=2, 

778 ) 

779 page_size: int = proto.Field( 

780 proto.INT32, 

781 number=3, 

782 ) 

783 

784 

785class ListViewsResponse(proto.Message): 

786 r"""The response from ListViews. 

787 

788 Attributes: 

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

790 A list of views. 

791 next_page_token (str): 

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

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

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

795 ``nextPageToken`` as ``pageToken``. 

796 """ 

797 

798 @property 

799 def raw_page(self): 

800 return self 

801 

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

803 proto.MESSAGE, 

804 number=1, 

805 message="LogView", 

806 ) 

807 next_page_token: str = proto.Field( 

808 proto.STRING, 

809 number=2, 

810 ) 

811 

812 

813class CreateViewRequest(proto.Message): 

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

815 

816 Attributes: 

817 parent (str): 

818 Required. The bucket in which to create the view 

819 

820 :: 

821 

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

823 

824 For example: 

825 

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

827 view_id (str): 

828 Required. The id to use for this view. 

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

830 Required. The new view. 

831 """ 

832 

833 parent: str = proto.Field( 

834 proto.STRING, 

835 number=1, 

836 ) 

837 view_id: str = proto.Field( 

838 proto.STRING, 

839 number=2, 

840 ) 

841 view: "LogView" = proto.Field( 

842 proto.MESSAGE, 

843 number=3, 

844 message="LogView", 

845 ) 

846 

847 

848class UpdateViewRequest(proto.Message): 

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

850 

851 Attributes: 

852 name (str): 

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

854 

855 :: 

856 

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

858 

859 For example: 

860 

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

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

863 Required. The updated view. 

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

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

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

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

868 fields cannot be updated. 

869 

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

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

872 

873 For example: ``updateMask=filter`` 

874 """ 

875 

876 name: str = proto.Field( 

877 proto.STRING, 

878 number=1, 

879 ) 

880 view: "LogView" = proto.Field( 

881 proto.MESSAGE, 

882 number=2, 

883 message="LogView", 

884 ) 

885 update_mask: field_mask_pb2.FieldMask = proto.Field( 

886 proto.MESSAGE, 

887 number=4, 

888 message=field_mask_pb2.FieldMask, 

889 ) 

890 

891 

892class GetViewRequest(proto.Message): 

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

894 

895 Attributes: 

896 name (str): 

897 Required. The resource name of the policy: 

898 

899 :: 

900 

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

902 

903 For example: 

904 

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

906 """ 

907 

908 name: str = proto.Field( 

909 proto.STRING, 

910 number=1, 

911 ) 

912 

913 

914class DeleteViewRequest(proto.Message): 

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

916 

917 Attributes: 

918 name (str): 

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

920 

921 :: 

922 

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

924 

925 For example: 

926 

927 :: 

928 

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

930 """ 

931 

932 name: str = proto.Field( 

933 proto.STRING, 

934 number=1, 

935 ) 

936 

937 

938class ListSinksRequest(proto.Message): 

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

940 

941 Attributes: 

942 parent (str): 

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

944 

945 :: 

946 

947 "projects/[PROJECT_ID]" 

948 "organizations/[ORGANIZATION_ID]" 

949 "billingAccounts/[BILLING_ACCOUNT_ID]" 

950 "folders/[FOLDER_ID]". 

951 page_token (str): 

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

953 results from the preceding call to this method. 

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

955 the previous response. The values of other method parameters 

956 should be identical to those in the previous call. 

957 page_size (int): 

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

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

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

961 results might be available. 

962 """ 

963 

964 parent: str = proto.Field( 

965 proto.STRING, 

966 number=1, 

967 ) 

968 page_token: str = proto.Field( 

969 proto.STRING, 

970 number=2, 

971 ) 

972 page_size: int = proto.Field( 

973 proto.INT32, 

974 number=3, 

975 ) 

976 

977 

978class ListSinksResponse(proto.Message): 

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

980 

981 Attributes: 

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

983 A list of sinks. 

984 next_page_token (str): 

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

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

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

988 ``nextPageToken`` as ``pageToken``. 

989 """ 

990 

991 @property 

992 def raw_page(self): 

993 return self 

994 

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

996 proto.MESSAGE, 

997 number=1, 

998 message="LogSink", 

999 ) 

1000 next_page_token: str = proto.Field( 

1001 proto.STRING, 

1002 number=2, 

1003 ) 

1004 

1005 

1006class GetSinkRequest(proto.Message): 

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

1008 

1009 Attributes: 

1010 sink_name (str): 

1011 Required. The resource name of the sink: 

1012 

1013 :: 

1014 

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

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

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

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

1019 

1020 For example: 

1021 

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

1023 """ 

1024 

1025 sink_name: str = proto.Field( 

1026 proto.STRING, 

1027 number=1, 

1028 ) 

1029 

1030 

1031class CreateSinkRequest(proto.Message): 

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

1033 

1034 Attributes: 

1035 parent (str): 

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

1037 

1038 :: 

1039 

1040 "projects/[PROJECT_ID]" 

1041 "organizations/[ORGANIZATION_ID]" 

1042 "billingAccounts/[BILLING_ACCOUNT_ID]" 

1043 "folders/[FOLDER_ID]" 

1044 

1045 For examples: 

1046 

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

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

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

1050 identifier that is not already in use. 

1051 unique_writer_identity (bool): 

1052 Optional. Determines the kind of IAM identity returned as 

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

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

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

1056 the same group or service account used by Cloud Logging 

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

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

1059 itself. 

1060 

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

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

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

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

1065 see ``writer_identity`` in 

1066 [LogSink][google.logging.v2.LogSink]. 

1067 """ 

1068 

1069 parent: str = proto.Field( 

1070 proto.STRING, 

1071 number=1, 

1072 ) 

1073 sink: "LogSink" = proto.Field( 

1074 proto.MESSAGE, 

1075 number=2, 

1076 message="LogSink", 

1077 ) 

1078 unique_writer_identity: bool = proto.Field( 

1079 proto.BOOL, 

1080 number=3, 

1081 ) 

1082 

1083 

1084class UpdateSinkRequest(proto.Message): 

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

1086 

1087 Attributes: 

1088 sink_name (str): 

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

1090 including the parent resource and the sink identifier: 

1091 

1092 :: 

1093 

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

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

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

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

1098 

1099 For example: 

1100 

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

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

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

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

1105 unique_writer_identity (bool): 

1106 Optional. See 

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

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

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

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

1111 this field: 

1112 

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

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

1115 ``writer_identity``. 

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

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

1118 account. 

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

1120 is set to false or defaulted to false. 

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

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

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

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

1125 only fields cannot be updated. 

1126 

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

1128 following mask for backwards compatibility purposes: 

1129 

1130 ``destination,filter,includeChildren`` 

1131 

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

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

1134 

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

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

1137 

1138 For example: ``updateMask=filter`` 

1139 """ 

1140 

1141 sink_name: str = proto.Field( 

1142 proto.STRING, 

1143 number=1, 

1144 ) 

1145 sink: "LogSink" = proto.Field( 

1146 proto.MESSAGE, 

1147 number=2, 

1148 message="LogSink", 

1149 ) 

1150 unique_writer_identity: bool = proto.Field( 

1151 proto.BOOL, 

1152 number=3, 

1153 ) 

1154 update_mask: field_mask_pb2.FieldMask = proto.Field( 

1155 proto.MESSAGE, 

1156 number=4, 

1157 message=field_mask_pb2.FieldMask, 

1158 ) 

1159 

1160 

1161class DeleteSinkRequest(proto.Message): 

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

1163 

1164 Attributes: 

1165 sink_name (str): 

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

1167 including the parent resource and the sink identifier: 

1168 

1169 :: 

1170 

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

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

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

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

1175 

1176 For example: 

1177 

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

1179 """ 

1180 

1181 sink_name: str = proto.Field( 

1182 proto.STRING, 

1183 number=1, 

1184 ) 

1185 

1186 

1187class LogExclusion(proto.Message): 

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

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

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

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

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

1193 sink or exclude logs from it. 

1194 

1195 Attributes: 

1196 name (str): 

1197 Required. A client-assigned identifier, such as 

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

1199 100 characters and can include only letters, digits, 

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

1201 alphanumeric. 

1202 description (str): 

1203 Optional. A description of this exclusion. 

1204 filter (str): 

1205 Required. An `advanced logs 

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

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

1208 `sample 

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

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

1211 

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

1213 log entries from Google Cloud Storage buckets: 

1214 

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

1216 disabled (bool): 

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

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

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

1220 to change the value of this field. 

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

1222 Output only. The creation timestamp of the 

1223 exclusion. 

1224 This field may not be present for older 

1225 exclusions. 

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

1227 Output only. The last update timestamp of the 

1228 exclusion. 

1229 This field may not be present for older 

1230 exclusions. 

1231 """ 

1232 

1233 name: str = proto.Field( 

1234 proto.STRING, 

1235 number=1, 

1236 ) 

1237 description: str = proto.Field( 

1238 proto.STRING, 

1239 number=2, 

1240 ) 

1241 filter: str = proto.Field( 

1242 proto.STRING, 

1243 number=3, 

1244 ) 

1245 disabled: bool = proto.Field( 

1246 proto.BOOL, 

1247 number=4, 

1248 ) 

1249 create_time: timestamp_pb2.Timestamp = proto.Field( 

1250 proto.MESSAGE, 

1251 number=5, 

1252 message=timestamp_pb2.Timestamp, 

1253 ) 

1254 update_time: timestamp_pb2.Timestamp = proto.Field( 

1255 proto.MESSAGE, 

1256 number=6, 

1257 message=timestamp_pb2.Timestamp, 

1258 ) 

1259 

1260 

1261class ListExclusionsRequest(proto.Message): 

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

1263 

1264 Attributes: 

1265 parent (str): 

1266 Required. The parent resource whose exclusions are to be 

1267 listed. 

1268 

1269 :: 

1270 

1271 "projects/[PROJECT_ID]" 

1272 "organizations/[ORGANIZATION_ID]" 

1273 "billingAccounts/[BILLING_ACCOUNT_ID]" 

1274 "folders/[FOLDER_ID]". 

1275 page_token (str): 

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

1277 results from the preceding call to this method. 

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

1279 the previous response. The values of other method parameters 

1280 should be identical to those in the previous call. 

1281 page_size (int): 

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

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

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

1285 results might be available. 

1286 """ 

1287 

1288 parent: str = proto.Field( 

1289 proto.STRING, 

1290 number=1, 

1291 ) 

1292 page_token: str = proto.Field( 

1293 proto.STRING, 

1294 number=2, 

1295 ) 

1296 page_size: int = proto.Field( 

1297 proto.INT32, 

1298 number=3, 

1299 ) 

1300 

1301 

1302class ListExclusionsResponse(proto.Message): 

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

1304 

1305 Attributes: 

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

1307 A list of exclusions. 

1308 next_page_token (str): 

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

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

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

1312 ``nextPageToken`` as ``pageToken``. 

1313 """ 

1314 

1315 @property 

1316 def raw_page(self): 

1317 return self 

1318 

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

1320 proto.MESSAGE, 

1321 number=1, 

1322 message="LogExclusion", 

1323 ) 

1324 next_page_token: str = proto.Field( 

1325 proto.STRING, 

1326 number=2, 

1327 ) 

1328 

1329 

1330class GetExclusionRequest(proto.Message): 

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

1332 

1333 Attributes: 

1334 name (str): 

1335 Required. The resource name of an existing exclusion: 

1336 

1337 :: 

1338 

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

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

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

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

1343 

1344 For example: 

1345 

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

1347 """ 

1348 

1349 name: str = proto.Field( 

1350 proto.STRING, 

1351 number=1, 

1352 ) 

1353 

1354 

1355class CreateExclusionRequest(proto.Message): 

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

1357 

1358 Attributes: 

1359 parent (str): 

1360 Required. The parent resource in which to create the 

1361 exclusion: 

1362 

1363 :: 

1364 

1365 "projects/[PROJECT_ID]" 

1366 "organizations/[ORGANIZATION_ID]" 

1367 "billingAccounts/[BILLING_ACCOUNT_ID]" 

1368 "folders/[FOLDER_ID]" 

1369 

1370 For examples: 

1371 

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

1373 ``"organizations/123456789"`` 

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

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

1376 exclusion name that is not already used in the parent 

1377 resource. 

1378 """ 

1379 

1380 parent: str = proto.Field( 

1381 proto.STRING, 

1382 number=1, 

1383 ) 

1384 exclusion: "LogExclusion" = proto.Field( 

1385 proto.MESSAGE, 

1386 number=2, 

1387 message="LogExclusion", 

1388 ) 

1389 

1390 

1391class UpdateExclusionRequest(proto.Message): 

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

1393 

1394 Attributes: 

1395 name (str): 

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

1397 

1398 :: 

1399 

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

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

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

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

1404 

1405 For example: 

1406 

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

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

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

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

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

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

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

1414 the corresponding fields in the 

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

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

1417 not changed and are ignored in the request. 

1418 

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

1420 exclusion, specify an ``update_mask`` of 

1421 ``"filter,description"``. 

1422 """ 

1423 

1424 name: str = proto.Field( 

1425 proto.STRING, 

1426 number=1, 

1427 ) 

1428 exclusion: "LogExclusion" = proto.Field( 

1429 proto.MESSAGE, 

1430 number=2, 

1431 message="LogExclusion", 

1432 ) 

1433 update_mask: field_mask_pb2.FieldMask = proto.Field( 

1434 proto.MESSAGE, 

1435 number=3, 

1436 message=field_mask_pb2.FieldMask, 

1437 ) 

1438 

1439 

1440class DeleteExclusionRequest(proto.Message): 

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

1442 

1443 Attributes: 

1444 name (str): 

1445 Required. The resource name of an existing exclusion to 

1446 delete: 

1447 

1448 :: 

1449 

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

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

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

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

1454 

1455 For example: 

1456 

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

1458 """ 

1459 

1460 name: str = proto.Field( 

1461 proto.STRING, 

1462 number=1, 

1463 ) 

1464 

1465 

1466class GetCmekSettingsRequest(proto.Message): 

1467 r"""The parameters to 

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

1469 

1470 See `Enabling CMEK for Log 

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

1472 for more information. 

1473 

1474 Attributes: 

1475 name (str): 

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

1477 

1478 :: 

1479 

1480 "projects/[PROJECT_ID]/cmekSettings" 

1481 "organizations/[ORGANIZATION_ID]/cmekSettings" 

1482 "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" 

1483 "folders/[FOLDER_ID]/cmekSettings" 

1484 

1485 For example: 

1486 

1487 ``"organizations/12345/cmekSettings"`` 

1488 

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

1490 Cloud projects, folders, organizations and billing accounts. 

1491 Once configured for an organization, it applies to all 

1492 projects and folders in the Google Cloud organization. 

1493 """ 

1494 

1495 name: str = proto.Field( 

1496 proto.STRING, 

1497 number=1, 

1498 ) 

1499 

1500 

1501class UpdateCmekSettingsRequest(proto.Message): 

1502 r"""The parameters to 

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

1504 

1505 See `Enabling CMEK for Log 

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

1507 for more information. 

1508 

1509 Attributes: 

1510 name (str): 

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

1512 

1513 :: 

1514 

1515 "projects/[PROJECT_ID]/cmekSettings" 

1516 "organizations/[ORGANIZATION_ID]/cmekSettings" 

1517 "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" 

1518 "folders/[FOLDER_ID]/cmekSettings" 

1519 

1520 For example: 

1521 

1522 ``"organizations/12345/cmekSettings"`` 

1523 

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

1525 configured for Google Cloud organizations. Once configured, 

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

1527 organization. 

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

1529 Required. The CMEK settings to update. 

1530 

1531 See `Enabling CMEK for Log 

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

1533 for more information. 

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

1535 Optional. Field mask identifying which fields from 

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

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

1538 only fields cannot be updated. 

1539 

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

1541 information. 

1542 

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

1544 """ 

1545 

1546 name: str = proto.Field( 

1547 proto.STRING, 

1548 number=1, 

1549 ) 

1550 cmek_settings: "CmekSettings" = proto.Field( 

1551 proto.MESSAGE, 

1552 number=2, 

1553 message="CmekSettings", 

1554 ) 

1555 update_mask: field_mask_pb2.FieldMask = proto.Field( 

1556 proto.MESSAGE, 

1557 number=3, 

1558 message=field_mask_pb2.FieldMask, 

1559 ) 

1560 

1561 

1562class CmekSettings(proto.Message): 

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

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

1565 flexible resource. 

1566 

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

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

1569 projects and folders in the Google Cloud organization. 

1570 

1571 See `Enabling CMEK for Log 

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

1573 for more information. 

1574 

1575 Attributes: 

1576 name (str): 

1577 Output only. The resource name of the CMEK 

1578 settings. 

1579 kms_key_name (str): 

1580 The resource name for the configured Cloud KMS key. 

1581 

1582 KMS key name format: 

1583 

1584 :: 

1585 

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

1587 

1588 For example: 

1589 

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

1591 

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

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

1594 has the required cloudkms.cryptoKeyEncrypterDecrypter roles 

1595 assigned for the key. 

1596 

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

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

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

1600 Encryption operations that are in progress will be completed 

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

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

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

1604 revoked. 

1605 

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

1607 empty string. 

1608 

1609 See `Enabling CMEK for Log 

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

1611 for more information. 

1612 service_account_id (str): 

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

1614 Log Router to access your Cloud KMS key. 

1615 

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

1617 the cloudkms.cryptoKeyEncrypterDecrypter role to the service 

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

1619 KMS key. Use 

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

1621 to obtain the service account ID. 

1622 

1623 See `Enabling CMEK for Log 

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

1625 for more information. 

1626 """ 

1627 

1628 name: str = proto.Field( 

1629 proto.STRING, 

1630 number=1, 

1631 ) 

1632 kms_key_name: str = proto.Field( 

1633 proto.STRING, 

1634 number=2, 

1635 ) 

1636 service_account_id: str = proto.Field( 

1637 proto.STRING, 

1638 number=3, 

1639 ) 

1640 

1641 

1642class GetSettingsRequest(proto.Message): 

1643 r"""The parameters to 

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

1645 

1646 See `Enabling CMEK for Log 

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

1648 for more information. 

1649 

1650 Attributes: 

1651 name (str): 

1652 Required. The resource for which to retrieve settings. 

1653 

1654 :: 

1655 

1656 "projects/[PROJECT_ID]/settings" 

1657 "organizations/[ORGANIZATION_ID]/settings" 

1658 "billingAccounts/[BILLING_ACCOUNT_ID]/settings" 

1659 "folders/[FOLDER_ID]/settings" 

1660 

1661 For example: 

1662 

1663 ``"organizations/12345/settings"`` 

1664 

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

1666 Cloud projects, folders, organizations and billing accounts. 

1667 Currently it can only be configured for organizations. Once 

1668 configured for an organization, it applies to all projects 

1669 and folders in the Google Cloud organization. 

1670 """ 

1671 

1672 name: str = proto.Field( 

1673 proto.STRING, 

1674 number=1, 

1675 ) 

1676 

1677 

1678class UpdateSettingsRequest(proto.Message): 

1679 r"""The parameters to 

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

1681 

1682 See `Enabling CMEK for Log 

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

1684 for more information. 

1685 

1686 Attributes: 

1687 name (str): 

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

1689 

1690 :: 

1691 

1692 "organizations/[ORGANIZATION_ID]/settings" 

1693 

1694 For example: 

1695 

1696 ``"organizations/12345/settings"`` 

1697 

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

1699 configured for Google Cloud organizations. Once configured, 

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

1701 organization. 

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

1703 Required. The settings to update. 

1704 

1705 See `Enabling CMEK for Log 

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

1707 for more information. 

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

1709 Optional. Field mask identifying which fields from 

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

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

1712 cannot be updated. 

1713 

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

1715 information. 

1716 

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

1718 """ 

1719 

1720 name: str = proto.Field( 

1721 proto.STRING, 

1722 number=1, 

1723 ) 

1724 settings: "Settings" = proto.Field( 

1725 proto.MESSAGE, 

1726 number=2, 

1727 message="Settings", 

1728 ) 

1729 update_mask: field_mask_pb2.FieldMask = proto.Field( 

1730 proto.MESSAGE, 

1731 number=3, 

1732 message=field_mask_pb2.FieldMask, 

1733 ) 

1734 

1735 

1736class Settings(proto.Message): 

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

1738 organization, billing account, or flexible resource. 

1739 

1740 Attributes: 

1741 name (str): 

1742 Output only. The resource name of the 

1743 settings. 

1744 kms_key_name (str): 

1745 Optional. The resource name for the configured Cloud KMS 

1746 key. 

1747 

1748 KMS key name format: 

1749 

1750 :: 

1751 

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

1753 

1754 For example: 

1755 

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

1757 

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

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

1760 has the required 

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

1762 for the key. 

1763 

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

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

1766 Encryption operations that are in progress will be completed 

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

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

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

1770 revoked. 

1771 

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

1773 empty string. 

1774 

1775 See `Enabling CMEK for Log 

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

1777 for more information. 

1778 kms_service_account_id (str): 

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

1780 Log Router to access your Cloud KMS key. 

1781 

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

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

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

1785 your Cloud KMS key. Use 

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

1787 to obtain the service account ID. 

1788 

1789 See `Enabling CMEK for Log 

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

1791 for more information. 

1792 storage_location (str): 

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

1794 and \_Required log buckets for newly created projects and 

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

1796 affect the location of custom log buckets. 

1797 disable_default_sink (bool): 

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

1799 created projects and folders will created in a disabled 

1800 state. This can be used to automatically disable log 

1801 ingestion if there is already an aggregated sink configured 

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

1803 manually if needed. 

1804 """ 

1805 

1806 name: str = proto.Field( 

1807 proto.STRING, 

1808 number=1, 

1809 ) 

1810 kms_key_name: str = proto.Field( 

1811 proto.STRING, 

1812 number=2, 

1813 ) 

1814 kms_service_account_id: str = proto.Field( 

1815 proto.STRING, 

1816 number=3, 

1817 ) 

1818 storage_location: str = proto.Field( 

1819 proto.STRING, 

1820 number=4, 

1821 ) 

1822 disable_default_sink: bool = proto.Field( 

1823 proto.BOOL, 

1824 number=5, 

1825 ) 

1826 

1827 

1828class CopyLogEntriesRequest(proto.Message): 

1829 r"""The parameters to CopyLogEntries. 

1830 

1831 Attributes: 

1832 name (str): 

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

1834 

1835 For example: 

1836 

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

1838 filter (str): 

1839 Optional. A filter specifying which log 

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

1841 20k characters. An empty filter matches all log 

1842 entries. 

1843 destination (str): 

1844 Required. Destination to which to copy log 

1845 entries. 

1846 """ 

1847 

1848 name: str = proto.Field( 

1849 proto.STRING, 

1850 number=1, 

1851 ) 

1852 filter: str = proto.Field( 

1853 proto.STRING, 

1854 number=3, 

1855 ) 

1856 destination: str = proto.Field( 

1857 proto.STRING, 

1858 number=4, 

1859 ) 

1860 

1861 

1862class CopyLogEntriesMetadata(proto.Message): 

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

1864 

1865 Attributes: 

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

1867 The create time of an operation. 

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

1869 The end time of an operation. 

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

1871 State of an operation. 

1872 cancellation_requested (bool): 

1873 Identifies whether the user has requested 

1874 cancellation of the operation. 

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

1876 CopyLogEntries RPC request. 

1877 progress (int): 

1878 Estimated progress of the operation (0 - 

1879 100%). 

1880 writer_identity (str): 

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

1882 access to the destination. 

1883 

1884 If the service account is not granted permission to the 

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

1886 

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

1888 """ 

1889 

1890 start_time: timestamp_pb2.Timestamp = proto.Field( 

1891 proto.MESSAGE, 

1892 number=1, 

1893 message=timestamp_pb2.Timestamp, 

1894 ) 

1895 end_time: timestamp_pb2.Timestamp = proto.Field( 

1896 proto.MESSAGE, 

1897 number=2, 

1898 message=timestamp_pb2.Timestamp, 

1899 ) 

1900 state: "OperationState" = proto.Field( 

1901 proto.ENUM, 

1902 number=3, 

1903 enum="OperationState", 

1904 ) 

1905 cancellation_requested: bool = proto.Field( 

1906 proto.BOOL, 

1907 number=4, 

1908 ) 

1909 request: "CopyLogEntriesRequest" = proto.Field( 

1910 proto.MESSAGE, 

1911 number=5, 

1912 message="CopyLogEntriesRequest", 

1913 ) 

1914 progress: int = proto.Field( 

1915 proto.INT32, 

1916 number=6, 

1917 ) 

1918 writer_identity: str = proto.Field( 

1919 proto.STRING, 

1920 number=7, 

1921 ) 

1922 

1923 

1924class CopyLogEntriesResponse(proto.Message): 

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

1926 

1927 Attributes: 

1928 log_entries_copied_count (int): 

1929 Number of log entries copied. 

1930 """ 

1931 

1932 log_entries_copied_count: int = proto.Field( 

1933 proto.INT64, 

1934 number=1, 

1935 ) 

1936 

1937 

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