google-cloud-audit_manager-v1 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74227ea6a9e48ad5cba6e21b5d998c5c5834e018a7ef6e422dc19ff2836a1c56
4
- data.tar.gz: 8c13617abf43e7fa2968e059931d99512df30c95275949d7ddb6d7f1fd0950f8
3
+ metadata.gz: b855cd128e47656e738afedbcf5f7fd486f3e6f52e15f4b169ed9d2955330e32
4
+ data.tar.gz: '0669e5d6684b9bd70a2028f97015bed59527a799ac8fd5b7600179557124aff3'
5
5
  SHA512:
6
- metadata.gz: a8d1c7b31d63b631fc0caa947a89dc79031fc3c7284d9f7f065b6dbc283cb22926dc3efdf5f5ecb09801c6b9f1e8887d8709eff88727ac8653e20edd83786b33
7
- data.tar.gz: dac6414d3d870cd8c2547496f78831aff500220f6c169030987977f44ee64761c1ce78362211a87a80cfc23f7ac0d4572f07bc155991613eae4a4bc5af073d40
6
+ metadata.gz: a58714d88ebd80c1fdd0ae055895e1fde773fe2908d2a0896894bb60fe217a5c6ab5664c37c71100cbc76d1eea6056375ec54854401f7d885fde2f4b6acb8697
7
+ data.tar.gz: 1c68c2e867e08b1b8ce401390783beabcb8592d128e5d3163e44aab969e503d7ce818214946e59be2df5c66ffccd064dc58dde18ce8c43e2c3fd5db55f76eb72
data/README.md CHANGED
@@ -32,8 +32,8 @@ In order to use this library, you first need to go through the following steps:
32
32
  require "google/cloud/audit_manager/v1"
33
33
 
34
34
  client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new
35
- request = ::Google::Cloud::AuditManager::V1::EnrollResourceRequest.new # (request fields as keyword arguments...)
36
- response = client.enroll_resource request
35
+ request = ::Google::Cloud::AuditManager::V1::CreateAuditScheduleRequest.new # (request fields as keyword arguments...)
36
+ response = client.create_audit_schedule request
37
37
  ```
38
38
 
39
39
  View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-audit_manager-v1/latest)
@@ -71,6 +71,15 @@ module Google
71
71
  end
72
72
  default_config = Client::Configuration.new parent_config
73
73
 
74
+ default_config.rpcs.create_audit_schedule.timeout = 60.0
75
+
76
+ default_config.rpcs.update_audit_schedule.timeout = 60.0
77
+
78
+ default_config.rpcs.list_audit_schedules.timeout = 60.0
79
+ default_config.rpcs.list_audit_schedules.retry_policy = {
80
+ initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
81
+ }
82
+
74
83
  default_config.rpcs.enroll_resource.timeout = 60.0
75
84
 
76
85
  default_config.rpcs.generate_audit_scope_report.timeout = 60.0
@@ -244,6 +253,407 @@ module Google
244
253
 
245
254
  # Service calls
246
255
 
256
+ ##
257
+ # Creates a new audit schedule in a given project and location.
258
+ #
259
+ # @overload create_audit_schedule(request, options = nil)
260
+ # Pass arguments to `create_audit_schedule` via a request object, either of type
261
+ # {::Google::Cloud::AuditManager::V1::CreateAuditScheduleRequest} or an equivalent Hash.
262
+ #
263
+ # @param request [::Google::Cloud::AuditManager::V1::CreateAuditScheduleRequest, ::Hash]
264
+ # A request object representing the call parameters. Required. To specify no
265
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
266
+ # @param options [::Gapic::CallOptions, ::Hash]
267
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
268
+ #
269
+ # @overload create_audit_schedule(parent: nil, audit_schedule: nil, audit_schedule_id: nil, validate_only: nil)
270
+ # Pass arguments to `create_audit_schedule` via keyword arguments. Note that at
271
+ # least one keyword argument is required. To specify no parameters, or to keep all
272
+ # the default parameter values, pass an empty Hash as a request object (see above).
273
+ #
274
+ # @param parent [::String]
275
+ # Required. Project or folder that this audit schedule is for, in one of the
276
+ # following formats:
277
+ #
278
+ # * `projects/{project}/locations/{location}`
279
+ # * `folders/{folder}/locations/{location}`
280
+ # @param audit_schedule [::Google::Cloud::AuditManager::V1::AuditSchedule, ::Hash]
281
+ # Required. Audit schedule to create.
282
+ # @param audit_schedule_id [::String]
283
+ # Required. ID to use for the audit schedule, which becomes the final
284
+ # component of the audit schedule's resource name.
285
+ # @param validate_only [::Boolean]
286
+ # Optional. If `true`, only validates the request and does not create the
287
+ # audit schedule. This executes standard request validation (such as schema,
288
+ # framework existence, scope, and IAM checks) and skips the apply phase.
289
+ #
290
+ # Use this field for the following purposes:
291
+ # * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run
292
+ # dry-run mutations (e.g., `terraform plan`) without creating real
293
+ # resources or incurring costs.
294
+ # * **User Interface Validation**: Enable real-time form and permission
295
+ # validation in custom UIs before submitting requests.
296
+ # * **CI/CD & Automation**: Test your scripts, permissions, and parameters
297
+ # safely without consuming resource quotas.
298
+ #
299
+ # @yield [response, operation] Access the result along with the RPC operation
300
+ # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditSchedule]
301
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
302
+ #
303
+ # @return [::Google::Cloud::AuditManager::V1::AuditSchedule]
304
+ #
305
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
306
+ #
307
+ # @example Basic example
308
+ # require "google/cloud/audit_manager/v1"
309
+ #
310
+ # # Create a client object. The client can be reused for multiple calls.
311
+ # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new
312
+ #
313
+ # # Create a request. To set request fields, pass in keyword arguments.
314
+ # request = Google::Cloud::AuditManager::V1::CreateAuditScheduleRequest.new
315
+ #
316
+ # # Call the create_audit_schedule method.
317
+ # result = client.create_audit_schedule request
318
+ #
319
+ # # The returned object is of type Google::Cloud::AuditManager::V1::AuditSchedule.
320
+ # p result
321
+ #
322
+ def create_audit_schedule request, options = nil
323
+ raise ::ArgumentError, "request must be provided" if request.nil?
324
+
325
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::CreateAuditScheduleRequest
326
+
327
+ # Converts hash and nil to an options object
328
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
329
+
330
+ # Customize the options with defaults
331
+ metadata = @config.rpcs.create_audit_schedule.metadata.to_h
332
+
333
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
334
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
335
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
336
+ gapic_version: ::Google::Cloud::AuditManager::V1::VERSION
337
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
338
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
339
+
340
+ header_params = {}
341
+ if request.parent
342
+ header_params["parent"] = request.parent
343
+ end
344
+
345
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
346
+ metadata[:"x-goog-request-params"] ||= request_params_header
347
+
348
+ options.apply_defaults timeout: @config.rpcs.create_audit_schedule.timeout,
349
+ metadata: metadata,
350
+ retry_policy: @config.rpcs.create_audit_schedule.retry_policy
351
+
352
+ options.apply_defaults timeout: @config.timeout,
353
+ metadata: @config.metadata,
354
+ retry_policy: @config.retry_policy
355
+
356
+ @audit_manager_stub.call_rpc :create_audit_schedule, request, options: options do |response, operation|
357
+ yield response, operation if block_given?
358
+ end
359
+ rescue ::GRPC::BadStatus => e
360
+ raise ::Google::Cloud::Error.from_error(e)
361
+ end
362
+
363
+ ##
364
+ # Updates an existing audit schedule.
365
+ #
366
+ # @overload update_audit_schedule(request, options = nil)
367
+ # Pass arguments to `update_audit_schedule` via a request object, either of type
368
+ # {::Google::Cloud::AuditManager::V1::UpdateAuditScheduleRequest} or an equivalent Hash.
369
+ #
370
+ # @param request [::Google::Cloud::AuditManager::V1::UpdateAuditScheduleRequest, ::Hash]
371
+ # A request object representing the call parameters. Required. To specify no
372
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
373
+ # @param options [::Gapic::CallOptions, ::Hash]
374
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
375
+ #
376
+ # @overload update_audit_schedule(audit_schedule: nil, update_mask: nil, validate_only: nil)
377
+ # Pass arguments to `update_audit_schedule` via keyword arguments. Note that at
378
+ # least one keyword argument is required. To specify no parameters, or to keep all
379
+ # the default parameter values, pass an empty Hash as a request object (see above).
380
+ #
381
+ # @param audit_schedule [::Google::Cloud::AuditManager::V1::AuditSchedule, ::Hash]
382
+ # Required. Audit schedule to update.
383
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
384
+ # Optional. List of fields to update.
385
+ # @param validate_only [::Boolean]
386
+ # Optional. If `true`, only validates the request and does not update the
387
+ # audit schedule. This executes standard request validation (such as
388
+ # schema, framework existence, scope, and IAM checks) and skips the apply
389
+ # phase.
390
+ #
391
+ # Use this field for the following purposes:
392
+ # * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run
393
+ # dry-run mutations (e.g., `terraform plan`) without creating real
394
+ # resources or incurring costs.
395
+ # * **User Interface Validation**: Enable real-time form and permission
396
+ # validation in custom UIs before submitting requests.
397
+ # * **CI/CD & Automation**: Test your scripts, permissions, and parameters
398
+ # safely without consuming resource quotas.
399
+ #
400
+ # @yield [response, operation] Access the result along with the RPC operation
401
+ # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditSchedule]
402
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
403
+ #
404
+ # @return [::Google::Cloud::AuditManager::V1::AuditSchedule]
405
+ #
406
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
407
+ #
408
+ # @example Basic example
409
+ # require "google/cloud/audit_manager/v1"
410
+ #
411
+ # # Create a client object. The client can be reused for multiple calls.
412
+ # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new
413
+ #
414
+ # # Create a request. To set request fields, pass in keyword arguments.
415
+ # request = Google::Cloud::AuditManager::V1::UpdateAuditScheduleRequest.new
416
+ #
417
+ # # Call the update_audit_schedule method.
418
+ # result = client.update_audit_schedule request
419
+ #
420
+ # # The returned object is of type Google::Cloud::AuditManager::V1::AuditSchedule.
421
+ # p result
422
+ #
423
+ def update_audit_schedule request, options = nil
424
+ raise ::ArgumentError, "request must be provided" if request.nil?
425
+
426
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::UpdateAuditScheduleRequest
427
+
428
+ # Converts hash and nil to an options object
429
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
430
+
431
+ # Customize the options with defaults
432
+ metadata = @config.rpcs.update_audit_schedule.metadata.to_h
433
+
434
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
435
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
436
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
437
+ gapic_version: ::Google::Cloud::AuditManager::V1::VERSION
438
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
439
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
440
+
441
+ header_params = {}
442
+ if request.audit_schedule&.name
443
+ header_params["audit_schedule.name"] = request.audit_schedule.name
444
+ end
445
+
446
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
447
+ metadata[:"x-goog-request-params"] ||= request_params_header
448
+
449
+ options.apply_defaults timeout: @config.rpcs.update_audit_schedule.timeout,
450
+ metadata: metadata,
451
+ retry_policy: @config.rpcs.update_audit_schedule.retry_policy
452
+
453
+ options.apply_defaults timeout: @config.timeout,
454
+ metadata: @config.metadata,
455
+ retry_policy: @config.retry_policy
456
+
457
+ @audit_manager_stub.call_rpc :update_audit_schedule, request, options: options do |response, operation|
458
+ yield response, operation if block_given?
459
+ end
460
+ rescue ::GRPC::BadStatus => e
461
+ raise ::Google::Cloud::Error.from_error(e)
462
+ end
463
+
464
+ ##
465
+ # Gets details of a single audit schedule.
466
+ #
467
+ # @overload get_audit_schedule(request, options = nil)
468
+ # Pass arguments to `get_audit_schedule` via a request object, either of type
469
+ # {::Google::Cloud::AuditManager::V1::GetAuditScheduleRequest} or an equivalent Hash.
470
+ #
471
+ # @param request [::Google::Cloud::AuditManager::V1::GetAuditScheduleRequest, ::Hash]
472
+ # A request object representing the call parameters. Required. To specify no
473
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
474
+ # @param options [::Gapic::CallOptions, ::Hash]
475
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
476
+ #
477
+ # @overload get_audit_schedule(name: nil)
478
+ # Pass arguments to `get_audit_schedule` via keyword arguments. Note that at
479
+ # least one keyword argument is required. To specify no parameters, or to keep all
480
+ # the default parameter values, pass an empty Hash as a request object (see above).
481
+ #
482
+ # @param name [::String]
483
+ # Required. Name of the audit schedule to retrieve, in one of the following
484
+ # formats:
485
+ #
486
+ # * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}`
487
+ # * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
488
+ # * `organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}`
489
+ #
490
+ # @yield [response, operation] Access the result along with the RPC operation
491
+ # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditSchedule]
492
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
493
+ #
494
+ # @return [::Google::Cloud::AuditManager::V1::AuditSchedule]
495
+ #
496
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
497
+ #
498
+ # @example Basic example
499
+ # require "google/cloud/audit_manager/v1"
500
+ #
501
+ # # Create a client object. The client can be reused for multiple calls.
502
+ # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new
503
+ #
504
+ # # Create a request. To set request fields, pass in keyword arguments.
505
+ # request = Google::Cloud::AuditManager::V1::GetAuditScheduleRequest.new
506
+ #
507
+ # # Call the get_audit_schedule method.
508
+ # result = client.get_audit_schedule request
509
+ #
510
+ # # The returned object is of type Google::Cloud::AuditManager::V1::AuditSchedule.
511
+ # p result
512
+ #
513
+ def get_audit_schedule request, options = nil
514
+ raise ::ArgumentError, "request must be provided" if request.nil?
515
+
516
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetAuditScheduleRequest
517
+
518
+ # Converts hash and nil to an options object
519
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
520
+
521
+ # Customize the options with defaults
522
+ metadata = @config.rpcs.get_audit_schedule.metadata.to_h
523
+
524
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
525
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
526
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
527
+ gapic_version: ::Google::Cloud::AuditManager::V1::VERSION
528
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
529
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
530
+
531
+ header_params = {}
532
+ if request.name
533
+ header_params["name"] = request.name
534
+ end
535
+
536
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
537
+ metadata[:"x-goog-request-params"] ||= request_params_header
538
+
539
+ options.apply_defaults timeout: @config.rpcs.get_audit_schedule.timeout,
540
+ metadata: metadata,
541
+ retry_policy: @config.rpcs.get_audit_schedule.retry_policy
542
+
543
+ options.apply_defaults timeout: @config.timeout,
544
+ metadata: @config.metadata,
545
+ retry_policy: @config.retry_policy
546
+
547
+ @audit_manager_stub.call_rpc :get_audit_schedule, request, options: options do |response, operation|
548
+ yield response, operation if block_given?
549
+ end
550
+ rescue ::GRPC::BadStatus => e
551
+ raise ::Google::Cloud::Error.from_error(e)
552
+ end
553
+
554
+ ##
555
+ # Lists audit schedules in a given project and location.
556
+ #
557
+ # @overload list_audit_schedules(request, options = nil)
558
+ # Pass arguments to `list_audit_schedules` via a request object, either of type
559
+ # {::Google::Cloud::AuditManager::V1::ListAuditSchedulesRequest} or an equivalent Hash.
560
+ #
561
+ # @param request [::Google::Cloud::AuditManager::V1::ListAuditSchedulesRequest, ::Hash]
562
+ # A request object representing the call parameters. Required. To specify no
563
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
564
+ # @param options [::Gapic::CallOptions, ::Hash]
565
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
566
+ #
567
+ # @overload list_audit_schedules(parent: nil, page_size: nil, page_token: nil)
568
+ # Pass arguments to `list_audit_schedules` via keyword arguments. Note that at
569
+ # least one keyword argument is required. To specify no parameters, or to keep all
570
+ # the default parameter values, pass an empty Hash as a request object (see above).
571
+ #
572
+ # @param parent [::String]
573
+ # Required. Parent for the audit schedule, in one of the following formats:
574
+ #
575
+ # * `projects/{project}/locations/{location}`
576
+ # * `folders/{folder}/locations/{location}`
577
+ # * `organizations/{organization}/locations/{location}`
578
+ # @param page_size [::Integer]
579
+ # Optional. Maximum number of items to return in a single page. The service
580
+ # might return fewer items than this value. If unspecified, the service picks
581
+ # an appropriate default. The maximum value is 100; values above 100 are
582
+ # reduced to 100.
583
+ # @param page_token [::String]
584
+ # Optional. A page token, received from a previous call, to retrieve the next
585
+ # page of results.
586
+ #
587
+ # @yield [response, operation] Access the result along with the RPC operation
588
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditSchedule>]
589
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
590
+ #
591
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditSchedule>]
592
+ #
593
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
594
+ #
595
+ # @example Basic example
596
+ # require "google/cloud/audit_manager/v1"
597
+ #
598
+ # # Create a client object. The client can be reused for multiple calls.
599
+ # client = Google::Cloud::AuditManager::V1::AuditManager::Client.new
600
+ #
601
+ # # Create a request. To set request fields, pass in keyword arguments.
602
+ # request = Google::Cloud::AuditManager::V1::ListAuditSchedulesRequest.new
603
+ #
604
+ # # Call the list_audit_schedules method.
605
+ # result = client.list_audit_schedules request
606
+ #
607
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
608
+ # # over elements, and API calls will be issued to fetch pages as needed.
609
+ # result.each do |item|
610
+ # # Each element is of type ::Google::Cloud::AuditManager::V1::AuditSchedule.
611
+ # p item
612
+ # end
613
+ #
614
+ def list_audit_schedules request, options = nil
615
+ raise ::ArgumentError, "request must be provided" if request.nil?
616
+
617
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListAuditSchedulesRequest
618
+
619
+ # Converts hash and nil to an options object
620
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
621
+
622
+ # Customize the options with defaults
623
+ metadata = @config.rpcs.list_audit_schedules.metadata.to_h
624
+
625
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
626
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
627
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
628
+ gapic_version: ::Google::Cloud::AuditManager::V1::VERSION
629
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
630
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
631
+
632
+ header_params = {}
633
+ if request.parent
634
+ header_params["parent"] = request.parent
635
+ end
636
+
637
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
638
+ metadata[:"x-goog-request-params"] ||= request_params_header
639
+
640
+ options.apply_defaults timeout: @config.rpcs.list_audit_schedules.timeout,
641
+ metadata: metadata,
642
+ retry_policy: @config.rpcs.list_audit_schedules.retry_policy
643
+
644
+ options.apply_defaults timeout: @config.timeout,
645
+ metadata: @config.metadata,
646
+ retry_policy: @config.retry_policy
647
+
648
+ @audit_manager_stub.call_rpc :list_audit_schedules, request, options: options do |response, operation|
649
+ response = ::Gapic::PagedEnumerable.new @audit_manager_stub, :list_audit_schedules, request, response, operation, options
650
+ yield response, operation if block_given?
651
+ throw :response, response
652
+ end
653
+ rescue ::GRPC::BadStatus => e
654
+ raise ::Google::Cloud::Error.from_error(e)
655
+ end
656
+
247
657
  ##
248
658
  # Adds your project, folder, or organization to Audit
249
659
  # Manager. This method creates the Audit Manager service agent in your
@@ -261,7 +671,7 @@ module Google
261
671
  # @param options [::Gapic::CallOptions, ::Hash]
262
672
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
263
673
  #
264
- # @overload enroll_resource(scope: nil, destinations: nil)
674
+ # @overload enroll_resource(scope: nil, destinations: nil, validate_only: nil)
265
675
  # Pass arguments to `enroll_resource` via keyword arguments. Note that at
266
676
  # least one keyword argument is required. To specify no parameters, or to keep all
267
677
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -282,6 +692,19 @@ module Google
282
692
  # at the project level using the service agent at the organization or folder
283
693
  # level, all the buckets that are associated with the service agent are
284
694
  # available.
695
+ # @param validate_only [::Boolean]
696
+ # Optional. If `true`, only validates the request and does not enroll the
697
+ # resource. This executes standard request validation (such as schema, IAM,
698
+ # and destination checks) and skips the apply phase.
699
+ #
700
+ # Use this field for the following purposes:
701
+ # * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run
702
+ # dry-run mutations (e.g., `terraform plan`) without creating real
703
+ # resources or incurring costs.
704
+ # * **User Interface Validation**: Enable real-time form and permission
705
+ # validation in custom UIs before submitting requests.
706
+ # * **CI/CD & Automation**: Test your scripts, permissions, and parameters
707
+ # safely without consuming resource quotas.
285
708
  #
286
709
  # @yield [response, operation] Access the result along with the RPC operation
287
710
  # @yieldparam response [::Google::Cloud::AuditManager::V1::Enrollment]
@@ -367,7 +790,7 @@ module Google
367
790
  # @param options [::Gapic::CallOptions, ::Hash]
368
791
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
369
792
  #
370
- # @overload generate_audit_scope_report(scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil)
793
+ # @overload generate_audit_scope_report(scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil, validate_only: nil)
371
794
  # Pass arguments to `generate_audit_scope_report` via keyword arguments. Note that at
372
795
  # least one keyword argument is required. To specify no parameters, or to keep all
373
796
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -389,6 +812,20 @@ module Google
389
812
  # @param compliance_framework [::String]
390
813
  # Required. Framework (set of controls) that the audit scope report is
391
814
  # generated against. For example, `NIST_800_53`.
815
+ # @param validate_only [::Boolean]
816
+ # Optional. If `true`, only validates the request and does not generate the
817
+ # audit scope report. This executes standard request validation (such as
818
+ # schema, framework existence, scope, and IAM checks) and skips the apply
819
+ # phase.
820
+ #
821
+ # Use this field for the following purposes:
822
+ # * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run
823
+ # dry-run mutations (e.g., `terraform plan`) without creating real
824
+ # resources or incurring costs.
825
+ # * **User Interface Validation**: Enable real-time form and permission
826
+ # validation in custom UIs before submitting requests.
827
+ # * **CI/CD & Automation**: Test your scripts, permissions, and parameters
828
+ # safely without consuming resource quotas.
392
829
  #
393
830
  # @yield [response, operation] Access the result along with the RPC operation
394
831
  # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditScopeReport]
@@ -1090,17 +1527,17 @@ module Google
1090
1527
  # @example
1091
1528
  #
1092
1529
  # # Modify the global config, setting the timeout for
1093
- # # enroll_resource to 20 seconds,
1530
+ # # create_audit_schedule to 20 seconds,
1094
1531
  # # and all remaining timeouts to 10 seconds.
1095
1532
  # ::Google::Cloud::AuditManager::V1::AuditManager::Client.configure do |config|
1096
1533
  # config.timeout = 10.0
1097
- # config.rpcs.enroll_resource.timeout = 20.0
1534
+ # config.rpcs.create_audit_schedule.timeout = 20.0
1098
1535
  # end
1099
1536
  #
1100
1537
  # # Apply the above configuration only to a new client.
1101
1538
  # client = ::Google::Cloud::AuditManager::V1::AuditManager::Client.new do |config|
1102
1539
  # config.timeout = 10.0
1103
- # config.rpcs.enroll_resource.timeout = 20.0
1540
+ # config.rpcs.create_audit_schedule.timeout = 20.0
1104
1541
  # end
1105
1542
  #
1106
1543
  # @!attribute [rw] endpoint
@@ -1259,6 +1696,26 @@ module Google
1259
1696
  # trigger a retry.
1260
1697
  #
1261
1698
  class Rpcs
1699
+ ##
1700
+ # RPC-specific configuration for `create_audit_schedule`
1701
+ # @return [::Gapic::Config::Method]
1702
+ #
1703
+ attr_reader :create_audit_schedule
1704
+ ##
1705
+ # RPC-specific configuration for `update_audit_schedule`
1706
+ # @return [::Gapic::Config::Method]
1707
+ #
1708
+ attr_reader :update_audit_schedule
1709
+ ##
1710
+ # RPC-specific configuration for `get_audit_schedule`
1711
+ # @return [::Gapic::Config::Method]
1712
+ #
1713
+ attr_reader :get_audit_schedule
1714
+ ##
1715
+ # RPC-specific configuration for `list_audit_schedules`
1716
+ # @return [::Gapic::Config::Method]
1717
+ #
1718
+ attr_reader :list_audit_schedules
1262
1719
  ##
1263
1720
  # RPC-specific configuration for `enroll_resource`
1264
1721
  # @return [::Gapic::Config::Method]
@@ -1302,6 +1759,14 @@ module Google
1302
1759
 
1303
1760
  # @private
1304
1761
  def initialize parent_rpcs = nil
1762
+ create_audit_schedule_config = parent_rpcs.create_audit_schedule if parent_rpcs.respond_to? :create_audit_schedule
1763
+ @create_audit_schedule = ::Gapic::Config::Method.new create_audit_schedule_config
1764
+ update_audit_schedule_config = parent_rpcs.update_audit_schedule if parent_rpcs.respond_to? :update_audit_schedule
1765
+ @update_audit_schedule = ::Gapic::Config::Method.new update_audit_schedule_config
1766
+ get_audit_schedule_config = parent_rpcs.get_audit_schedule if parent_rpcs.respond_to? :get_audit_schedule
1767
+ @get_audit_schedule = ::Gapic::Config::Method.new get_audit_schedule_config
1768
+ list_audit_schedules_config = parent_rpcs.list_audit_schedules if parent_rpcs.respond_to? :list_audit_schedules
1769
+ @list_audit_schedules = ::Gapic::Config::Method.new list_audit_schedules_config
1305
1770
  enroll_resource_config = parent_rpcs.enroll_resource if parent_rpcs.respond_to? :enroll_resource
1306
1771
  @enroll_resource = ::Gapic::Config::Method.new enroll_resource_config
1307
1772
  generate_audit_scope_report_config = parent_rpcs.generate_audit_scope_report if parent_rpcs.respond_to? :generate_audit_scope_report
@@ -82,6 +82,64 @@ module Google
82
82
  resource.call(**args)
83
83
  end
84
84
 
85
+ ##
86
+ # Create a fully-qualified AuditSchedule resource string.
87
+ #
88
+ # @overload audit_schedule_path(project:, location:, audit_schedule:)
89
+ # The resource will be in the following format:
90
+ #
91
+ # `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}`
92
+ #
93
+ # @param project [String]
94
+ # @param location [String]
95
+ # @param audit_schedule [String]
96
+ #
97
+ # @overload audit_schedule_path(folder:, location:, audit_schedule:)
98
+ # The resource will be in the following format:
99
+ #
100
+ # `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
101
+ #
102
+ # @param folder [String]
103
+ # @param location [String]
104
+ # @param audit_schedule [String]
105
+ #
106
+ # @overload audit_schedule_path(organization:, location:, audit_schedule:)
107
+ # The resource will be in the following format:
108
+ #
109
+ # `organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}`
110
+ #
111
+ # @param organization [String]
112
+ # @param location [String]
113
+ # @param audit_schedule [String]
114
+ #
115
+ # @return [::String]
116
+ def audit_schedule_path **args
117
+ resources = {
118
+ "audit_schedule:location:project" => (proc do |project:, location:, audit_schedule:|
119
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
120
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
121
+
122
+ "projects/#{project}/locations/#{location}/auditSchedules/#{audit_schedule}"
123
+ end),
124
+ "audit_schedule:folder:location" => (proc do |folder:, location:, audit_schedule:|
125
+ raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
126
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
127
+
128
+ "folders/#{folder}/locations/#{location}/auditSchedules/#{audit_schedule}"
129
+ end),
130
+ "audit_schedule:location:organization" => (proc do |organization:, location:, audit_schedule:|
131
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
132
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
133
+
134
+ "organizations/#{organization}/locations/#{location}/auditSchedules/#{audit_schedule}"
135
+ end)
136
+ }
137
+
138
+ resource = resources[args.keys.sort.join(":")]
139
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
140
+ resource.call(**args)
141
+ end
142
+
85
143
  ##
86
144
  # Create a fully-qualified EnrollmentStatusScope resource string.
87
145
  #