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 +4 -4
- data/README.md +2 -2
- data/lib/google/cloud/audit_manager/v1/audit_manager/client.rb +470 -5
- data/lib/google/cloud/audit_manager/v1/audit_manager/paths.rb +58 -0
- data/lib/google/cloud/audit_manager/v1/audit_manager/rest/client.rb +442 -5
- data/lib/google/cloud/audit_manager/v1/audit_manager/rest/service_stub.rb +306 -0
- data/lib/google/cloud/audit_manager/v1/version.rb +1 -1
- data/lib/google/cloud/auditmanager/v1/auditmanager_pb.rb +12 -1
- data/lib/google/cloud/auditmanager/v1/auditmanager_services_pb.rb +8 -0
- data/proto_docs/google/cloud/auditmanager/v1/auditmanager.rb +283 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +2 -1
|
@@ -73,6 +73,15 @@ module Google
|
|
|
73
73
|
end
|
|
74
74
|
default_config = Client::Configuration.new parent_config
|
|
75
75
|
|
|
76
|
+
default_config.rpcs.create_audit_schedule.timeout = 60.0
|
|
77
|
+
|
|
78
|
+
default_config.rpcs.update_audit_schedule.timeout = 60.0
|
|
79
|
+
|
|
80
|
+
default_config.rpcs.list_audit_schedules.timeout = 60.0
|
|
81
|
+
default_config.rpcs.list_audit_schedules.retry_policy = {
|
|
82
|
+
initial_delay: 0.1, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
83
|
+
}
|
|
84
|
+
|
|
76
85
|
default_config.rpcs.enroll_resource.timeout = 60.0
|
|
77
86
|
|
|
78
87
|
default_config.rpcs.generate_audit_scope_report.timeout = 60.0
|
|
@@ -238,6 +247,379 @@ module Google
|
|
|
238
247
|
|
|
239
248
|
# Service calls
|
|
240
249
|
|
|
250
|
+
##
|
|
251
|
+
# Creates a new audit schedule in a given project and location.
|
|
252
|
+
#
|
|
253
|
+
# @overload create_audit_schedule(request, options = nil)
|
|
254
|
+
# Pass arguments to `create_audit_schedule` via a request object, either of type
|
|
255
|
+
# {::Google::Cloud::AuditManager::V1::CreateAuditScheduleRequest} or an equivalent Hash.
|
|
256
|
+
#
|
|
257
|
+
# @param request [::Google::Cloud::AuditManager::V1::CreateAuditScheduleRequest, ::Hash]
|
|
258
|
+
# A request object representing the call parameters. Required. To specify no
|
|
259
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
260
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
261
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
262
|
+
#
|
|
263
|
+
# @overload create_audit_schedule(parent: nil, audit_schedule: nil, audit_schedule_id: nil, validate_only: nil)
|
|
264
|
+
# Pass arguments to `create_audit_schedule` via keyword arguments. Note that at
|
|
265
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
266
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
267
|
+
#
|
|
268
|
+
# @param parent [::String]
|
|
269
|
+
# Required. Project or folder that this audit schedule is for, in one of the
|
|
270
|
+
# following formats:
|
|
271
|
+
#
|
|
272
|
+
# * `projects/{project}/locations/{location}`
|
|
273
|
+
# * `folders/{folder}/locations/{location}`
|
|
274
|
+
# @param audit_schedule [::Google::Cloud::AuditManager::V1::AuditSchedule, ::Hash]
|
|
275
|
+
# Required. Audit schedule to create.
|
|
276
|
+
# @param audit_schedule_id [::String]
|
|
277
|
+
# Required. ID to use for the audit schedule, which becomes the final
|
|
278
|
+
# component of the audit schedule's resource name.
|
|
279
|
+
# @param validate_only [::Boolean]
|
|
280
|
+
# Optional. If `true`, only validates the request and does not create the
|
|
281
|
+
# audit schedule. This executes standard request validation (such as schema,
|
|
282
|
+
# framework existence, scope, and IAM checks) and skips the apply phase.
|
|
283
|
+
#
|
|
284
|
+
# Use this field for the following purposes:
|
|
285
|
+
# * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run
|
|
286
|
+
# dry-run mutations (e.g., `terraform plan`) without creating real
|
|
287
|
+
# resources or incurring costs.
|
|
288
|
+
# * **User Interface Validation**: Enable real-time form and permission
|
|
289
|
+
# validation in custom UIs before submitting requests.
|
|
290
|
+
# * **CI/CD & Automation**: Test your scripts, permissions, and parameters
|
|
291
|
+
# safely without consuming resource quotas.
|
|
292
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
293
|
+
# @yieldparam result [::Google::Cloud::AuditManager::V1::AuditSchedule]
|
|
294
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
295
|
+
#
|
|
296
|
+
# @return [::Google::Cloud::AuditManager::V1::AuditSchedule]
|
|
297
|
+
#
|
|
298
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
299
|
+
#
|
|
300
|
+
# @example Basic example
|
|
301
|
+
# require "google/cloud/audit_manager/v1"
|
|
302
|
+
#
|
|
303
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
304
|
+
# client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new
|
|
305
|
+
#
|
|
306
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
307
|
+
# request = Google::Cloud::AuditManager::V1::CreateAuditScheduleRequest.new
|
|
308
|
+
#
|
|
309
|
+
# # Call the create_audit_schedule method.
|
|
310
|
+
# result = client.create_audit_schedule request
|
|
311
|
+
#
|
|
312
|
+
# # The returned object is of type Google::Cloud::AuditManager::V1::AuditSchedule.
|
|
313
|
+
# p result
|
|
314
|
+
#
|
|
315
|
+
def create_audit_schedule request, options = nil
|
|
316
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
317
|
+
|
|
318
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::CreateAuditScheduleRequest
|
|
319
|
+
|
|
320
|
+
# Converts hash and nil to an options object
|
|
321
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
322
|
+
|
|
323
|
+
# Customize the options with defaults
|
|
324
|
+
call_metadata = @config.rpcs.create_audit_schedule.metadata.to_h
|
|
325
|
+
|
|
326
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
327
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
328
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
329
|
+
gapic_version: ::Google::Cloud::AuditManager::V1::VERSION,
|
|
330
|
+
transports_version_send: [:rest]
|
|
331
|
+
|
|
332
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
333
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
334
|
+
|
|
335
|
+
options.apply_defaults timeout: @config.rpcs.create_audit_schedule.timeout,
|
|
336
|
+
metadata: call_metadata,
|
|
337
|
+
retry_policy: @config.rpcs.create_audit_schedule.retry_policy
|
|
338
|
+
|
|
339
|
+
options.apply_defaults timeout: @config.timeout,
|
|
340
|
+
metadata: @config.metadata,
|
|
341
|
+
retry_policy: @config.retry_policy
|
|
342
|
+
|
|
343
|
+
@audit_manager_stub.create_audit_schedule request, options do |result, operation|
|
|
344
|
+
yield result, operation if block_given?
|
|
345
|
+
end
|
|
346
|
+
rescue ::Gapic::Rest::Error => e
|
|
347
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
##
|
|
351
|
+
# Updates an existing audit schedule.
|
|
352
|
+
#
|
|
353
|
+
# @overload update_audit_schedule(request, options = nil)
|
|
354
|
+
# Pass arguments to `update_audit_schedule` via a request object, either of type
|
|
355
|
+
# {::Google::Cloud::AuditManager::V1::UpdateAuditScheduleRequest} or an equivalent Hash.
|
|
356
|
+
#
|
|
357
|
+
# @param request [::Google::Cloud::AuditManager::V1::UpdateAuditScheduleRequest, ::Hash]
|
|
358
|
+
# A request object representing the call parameters. Required. To specify no
|
|
359
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
360
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
361
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
362
|
+
#
|
|
363
|
+
# @overload update_audit_schedule(audit_schedule: nil, update_mask: nil, validate_only: nil)
|
|
364
|
+
# Pass arguments to `update_audit_schedule` via keyword arguments. Note that at
|
|
365
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
366
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
367
|
+
#
|
|
368
|
+
# @param audit_schedule [::Google::Cloud::AuditManager::V1::AuditSchedule, ::Hash]
|
|
369
|
+
# Required. Audit schedule to update.
|
|
370
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
371
|
+
# Optional. List of fields to update.
|
|
372
|
+
# @param validate_only [::Boolean]
|
|
373
|
+
# Optional. If `true`, only validates the request and does not update the
|
|
374
|
+
# audit schedule. This executes standard request validation (such as
|
|
375
|
+
# schema, framework existence, scope, and IAM checks) and skips the apply
|
|
376
|
+
# phase.
|
|
377
|
+
#
|
|
378
|
+
# Use this field for the following purposes:
|
|
379
|
+
# * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run
|
|
380
|
+
# dry-run mutations (e.g., `terraform plan`) without creating real
|
|
381
|
+
# resources or incurring costs.
|
|
382
|
+
# * **User Interface Validation**: Enable real-time form and permission
|
|
383
|
+
# validation in custom UIs before submitting requests.
|
|
384
|
+
# * **CI/CD & Automation**: Test your scripts, permissions, and parameters
|
|
385
|
+
# safely without consuming resource quotas.
|
|
386
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
387
|
+
# @yieldparam result [::Google::Cloud::AuditManager::V1::AuditSchedule]
|
|
388
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
389
|
+
#
|
|
390
|
+
# @return [::Google::Cloud::AuditManager::V1::AuditSchedule]
|
|
391
|
+
#
|
|
392
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
393
|
+
#
|
|
394
|
+
# @example Basic example
|
|
395
|
+
# require "google/cloud/audit_manager/v1"
|
|
396
|
+
#
|
|
397
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
398
|
+
# client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new
|
|
399
|
+
#
|
|
400
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
401
|
+
# request = Google::Cloud::AuditManager::V1::UpdateAuditScheduleRequest.new
|
|
402
|
+
#
|
|
403
|
+
# # Call the update_audit_schedule method.
|
|
404
|
+
# result = client.update_audit_schedule request
|
|
405
|
+
#
|
|
406
|
+
# # The returned object is of type Google::Cloud::AuditManager::V1::AuditSchedule.
|
|
407
|
+
# p result
|
|
408
|
+
#
|
|
409
|
+
def update_audit_schedule request, options = nil
|
|
410
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
411
|
+
|
|
412
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::UpdateAuditScheduleRequest
|
|
413
|
+
|
|
414
|
+
# Converts hash and nil to an options object
|
|
415
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
416
|
+
|
|
417
|
+
# Customize the options with defaults
|
|
418
|
+
call_metadata = @config.rpcs.update_audit_schedule.metadata.to_h
|
|
419
|
+
|
|
420
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
421
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
422
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
423
|
+
gapic_version: ::Google::Cloud::AuditManager::V1::VERSION,
|
|
424
|
+
transports_version_send: [:rest]
|
|
425
|
+
|
|
426
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
427
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
428
|
+
|
|
429
|
+
options.apply_defaults timeout: @config.rpcs.update_audit_schedule.timeout,
|
|
430
|
+
metadata: call_metadata,
|
|
431
|
+
retry_policy: @config.rpcs.update_audit_schedule.retry_policy
|
|
432
|
+
|
|
433
|
+
options.apply_defaults timeout: @config.timeout,
|
|
434
|
+
metadata: @config.metadata,
|
|
435
|
+
retry_policy: @config.retry_policy
|
|
436
|
+
|
|
437
|
+
@audit_manager_stub.update_audit_schedule request, options do |result, operation|
|
|
438
|
+
yield result, operation if block_given?
|
|
439
|
+
end
|
|
440
|
+
rescue ::Gapic::Rest::Error => e
|
|
441
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
##
|
|
445
|
+
# Gets details of a single audit schedule.
|
|
446
|
+
#
|
|
447
|
+
# @overload get_audit_schedule(request, options = nil)
|
|
448
|
+
# Pass arguments to `get_audit_schedule` via a request object, either of type
|
|
449
|
+
# {::Google::Cloud::AuditManager::V1::GetAuditScheduleRequest} or an equivalent Hash.
|
|
450
|
+
#
|
|
451
|
+
# @param request [::Google::Cloud::AuditManager::V1::GetAuditScheduleRequest, ::Hash]
|
|
452
|
+
# A request object representing the call parameters. Required. To specify no
|
|
453
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
454
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
455
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
456
|
+
#
|
|
457
|
+
# @overload get_audit_schedule(name: nil)
|
|
458
|
+
# Pass arguments to `get_audit_schedule` via keyword arguments. Note that at
|
|
459
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
460
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
461
|
+
#
|
|
462
|
+
# @param name [::String]
|
|
463
|
+
# Required. Name of the audit schedule to retrieve, in one of the following
|
|
464
|
+
# formats:
|
|
465
|
+
#
|
|
466
|
+
# * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}`
|
|
467
|
+
# * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
|
|
468
|
+
# * `organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}`
|
|
469
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
470
|
+
# @yieldparam result [::Google::Cloud::AuditManager::V1::AuditSchedule]
|
|
471
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
472
|
+
#
|
|
473
|
+
# @return [::Google::Cloud::AuditManager::V1::AuditSchedule]
|
|
474
|
+
#
|
|
475
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
476
|
+
#
|
|
477
|
+
# @example Basic example
|
|
478
|
+
# require "google/cloud/audit_manager/v1"
|
|
479
|
+
#
|
|
480
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
481
|
+
# client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new
|
|
482
|
+
#
|
|
483
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
484
|
+
# request = Google::Cloud::AuditManager::V1::GetAuditScheduleRequest.new
|
|
485
|
+
#
|
|
486
|
+
# # Call the get_audit_schedule method.
|
|
487
|
+
# result = client.get_audit_schedule request
|
|
488
|
+
#
|
|
489
|
+
# # The returned object is of type Google::Cloud::AuditManager::V1::AuditSchedule.
|
|
490
|
+
# p result
|
|
491
|
+
#
|
|
492
|
+
def get_audit_schedule request, options = nil
|
|
493
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
494
|
+
|
|
495
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::GetAuditScheduleRequest
|
|
496
|
+
|
|
497
|
+
# Converts hash and nil to an options object
|
|
498
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
499
|
+
|
|
500
|
+
# Customize the options with defaults
|
|
501
|
+
call_metadata = @config.rpcs.get_audit_schedule.metadata.to_h
|
|
502
|
+
|
|
503
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
504
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
505
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
506
|
+
gapic_version: ::Google::Cloud::AuditManager::V1::VERSION,
|
|
507
|
+
transports_version_send: [:rest]
|
|
508
|
+
|
|
509
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
510
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
511
|
+
|
|
512
|
+
options.apply_defaults timeout: @config.rpcs.get_audit_schedule.timeout,
|
|
513
|
+
metadata: call_metadata,
|
|
514
|
+
retry_policy: @config.rpcs.get_audit_schedule.retry_policy
|
|
515
|
+
|
|
516
|
+
options.apply_defaults timeout: @config.timeout,
|
|
517
|
+
metadata: @config.metadata,
|
|
518
|
+
retry_policy: @config.retry_policy
|
|
519
|
+
|
|
520
|
+
@audit_manager_stub.get_audit_schedule request, options do |result, operation|
|
|
521
|
+
yield result, operation if block_given?
|
|
522
|
+
end
|
|
523
|
+
rescue ::Gapic::Rest::Error => e
|
|
524
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
##
|
|
528
|
+
# Lists audit schedules in a given project and location.
|
|
529
|
+
#
|
|
530
|
+
# @overload list_audit_schedules(request, options = nil)
|
|
531
|
+
# Pass arguments to `list_audit_schedules` via a request object, either of type
|
|
532
|
+
# {::Google::Cloud::AuditManager::V1::ListAuditSchedulesRequest} or an equivalent Hash.
|
|
533
|
+
#
|
|
534
|
+
# @param request [::Google::Cloud::AuditManager::V1::ListAuditSchedulesRequest, ::Hash]
|
|
535
|
+
# A request object representing the call parameters. Required. To specify no
|
|
536
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
537
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
538
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
539
|
+
#
|
|
540
|
+
# @overload list_audit_schedules(parent: nil, page_size: nil, page_token: nil)
|
|
541
|
+
# Pass arguments to `list_audit_schedules` via keyword arguments. Note that at
|
|
542
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
543
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
544
|
+
#
|
|
545
|
+
# @param parent [::String]
|
|
546
|
+
# Required. Parent for the audit schedule, in one of the following formats:
|
|
547
|
+
#
|
|
548
|
+
# * `projects/{project}/locations/{location}`
|
|
549
|
+
# * `folders/{folder}/locations/{location}`
|
|
550
|
+
# * `organizations/{organization}/locations/{location}`
|
|
551
|
+
# @param page_size [::Integer]
|
|
552
|
+
# Optional. Maximum number of items to return in a single page. The service
|
|
553
|
+
# might return fewer items than this value. If unspecified, the service picks
|
|
554
|
+
# an appropriate default. The maximum value is 100; values above 100 are
|
|
555
|
+
# reduced to 100.
|
|
556
|
+
# @param page_token [::String]
|
|
557
|
+
# Optional. A page token, received from a previous call, to retrieve the next
|
|
558
|
+
# page of results.
|
|
559
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
560
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditSchedule>]
|
|
561
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
562
|
+
#
|
|
563
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditSchedule>]
|
|
564
|
+
#
|
|
565
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
566
|
+
#
|
|
567
|
+
# @example Basic example
|
|
568
|
+
# require "google/cloud/audit_manager/v1"
|
|
569
|
+
#
|
|
570
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
571
|
+
# client = Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new
|
|
572
|
+
#
|
|
573
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
574
|
+
# request = Google::Cloud::AuditManager::V1::ListAuditSchedulesRequest.new
|
|
575
|
+
#
|
|
576
|
+
# # Call the list_audit_schedules method.
|
|
577
|
+
# result = client.list_audit_schedules request
|
|
578
|
+
#
|
|
579
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
580
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
581
|
+
# result.each do |item|
|
|
582
|
+
# # Each element is of type ::Google::Cloud::AuditManager::V1::AuditSchedule.
|
|
583
|
+
# p item
|
|
584
|
+
# end
|
|
585
|
+
#
|
|
586
|
+
def list_audit_schedules request, options = nil
|
|
587
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
588
|
+
|
|
589
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AuditManager::V1::ListAuditSchedulesRequest
|
|
590
|
+
|
|
591
|
+
# Converts hash and nil to an options object
|
|
592
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
593
|
+
|
|
594
|
+
# Customize the options with defaults
|
|
595
|
+
call_metadata = @config.rpcs.list_audit_schedules.metadata.to_h
|
|
596
|
+
|
|
597
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
598
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
599
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
600
|
+
gapic_version: ::Google::Cloud::AuditManager::V1::VERSION,
|
|
601
|
+
transports_version_send: [:rest]
|
|
602
|
+
|
|
603
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
604
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
605
|
+
|
|
606
|
+
options.apply_defaults timeout: @config.rpcs.list_audit_schedules.timeout,
|
|
607
|
+
metadata: call_metadata,
|
|
608
|
+
retry_policy: @config.rpcs.list_audit_schedules.retry_policy
|
|
609
|
+
|
|
610
|
+
options.apply_defaults timeout: @config.timeout,
|
|
611
|
+
metadata: @config.metadata,
|
|
612
|
+
retry_policy: @config.retry_policy
|
|
613
|
+
|
|
614
|
+
@audit_manager_stub.list_audit_schedules request, options do |result, operation|
|
|
615
|
+
result = ::Gapic::Rest::PagedEnumerable.new @audit_manager_stub, :list_audit_schedules, "audit_schedules", request, result, options
|
|
616
|
+
yield result, operation if block_given?
|
|
617
|
+
throw :response, result
|
|
618
|
+
end
|
|
619
|
+
rescue ::Gapic::Rest::Error => e
|
|
620
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
621
|
+
end
|
|
622
|
+
|
|
241
623
|
##
|
|
242
624
|
# Adds your project, folder, or organization to Audit
|
|
243
625
|
# Manager. This method creates the Audit Manager service agent in your
|
|
@@ -255,7 +637,7 @@ module Google
|
|
|
255
637
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
256
638
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
257
639
|
#
|
|
258
|
-
# @overload enroll_resource(scope: nil, destinations: nil)
|
|
640
|
+
# @overload enroll_resource(scope: nil, destinations: nil, validate_only: nil)
|
|
259
641
|
# Pass arguments to `enroll_resource` via keyword arguments. Note that at
|
|
260
642
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
261
643
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -276,6 +658,19 @@ module Google
|
|
|
276
658
|
# at the project level using the service agent at the organization or folder
|
|
277
659
|
# level, all the buckets that are associated with the service agent are
|
|
278
660
|
# available.
|
|
661
|
+
# @param validate_only [::Boolean]
|
|
662
|
+
# Optional. If `true`, only validates the request and does not enroll the
|
|
663
|
+
# resource. This executes standard request validation (such as schema, IAM,
|
|
664
|
+
# and destination checks) and skips the apply phase.
|
|
665
|
+
#
|
|
666
|
+
# Use this field for the following purposes:
|
|
667
|
+
# * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run
|
|
668
|
+
# dry-run mutations (e.g., `terraform plan`) without creating real
|
|
669
|
+
# resources or incurring costs.
|
|
670
|
+
# * **User Interface Validation**: Enable real-time form and permission
|
|
671
|
+
# validation in custom UIs before submitting requests.
|
|
672
|
+
# * **CI/CD & Automation**: Test your scripts, permissions, and parameters
|
|
673
|
+
# safely without consuming resource quotas.
|
|
279
674
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
280
675
|
# @yieldparam result [::Google::Cloud::AuditManager::V1::Enrollment]
|
|
281
676
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -354,7 +749,7 @@ module Google
|
|
|
354
749
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
355
750
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
356
751
|
#
|
|
357
|
-
# @overload generate_audit_scope_report(scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil)
|
|
752
|
+
# @overload generate_audit_scope_report(scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil, validate_only: nil)
|
|
358
753
|
# Pass arguments to `generate_audit_scope_report` via keyword arguments. Note that at
|
|
359
754
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
360
755
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -376,6 +771,20 @@ module Google
|
|
|
376
771
|
# @param compliance_framework [::String]
|
|
377
772
|
# Required. Framework (set of controls) that the audit scope report is
|
|
378
773
|
# generated against. For example, `NIST_800_53`.
|
|
774
|
+
# @param validate_only [::Boolean]
|
|
775
|
+
# Optional. If `true`, only validates the request and does not generate the
|
|
776
|
+
# audit scope report. This executes standard request validation (such as
|
|
777
|
+
# schema, framework existence, scope, and IAM checks) and skips the apply
|
|
778
|
+
# phase.
|
|
779
|
+
#
|
|
780
|
+
# Use this field for the following purposes:
|
|
781
|
+
# * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run
|
|
782
|
+
# dry-run mutations (e.g., `terraform plan`) without creating real
|
|
783
|
+
# resources or incurring costs.
|
|
784
|
+
# * **User Interface Validation**: Enable real-time form and permission
|
|
785
|
+
# validation in custom UIs before submitting requests.
|
|
786
|
+
# * **CI/CD & Automation**: Test your scripts, permissions, and parameters
|
|
787
|
+
# safely without consuming resource quotas.
|
|
379
788
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
380
789
|
# @yieldparam result [::Google::Cloud::AuditManager::V1::AuditScopeReport]
|
|
381
790
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -1028,17 +1437,17 @@ module Google
|
|
|
1028
1437
|
# @example
|
|
1029
1438
|
#
|
|
1030
1439
|
# # Modify the global config, setting the timeout for
|
|
1031
|
-
# #
|
|
1440
|
+
# # create_audit_schedule to 20 seconds,
|
|
1032
1441
|
# # and all remaining timeouts to 10 seconds.
|
|
1033
1442
|
# ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.configure do |config|
|
|
1034
1443
|
# config.timeout = 10.0
|
|
1035
|
-
# config.rpcs.
|
|
1444
|
+
# config.rpcs.create_audit_schedule.timeout = 20.0
|
|
1036
1445
|
# end
|
|
1037
1446
|
#
|
|
1038
1447
|
# # Apply the above configuration only to a new client.
|
|
1039
1448
|
# client = ::Google::Cloud::AuditManager::V1::AuditManager::Rest::Client.new do |config|
|
|
1040
1449
|
# config.timeout = 10.0
|
|
1041
|
-
# config.rpcs.
|
|
1450
|
+
# config.rpcs.create_audit_schedule.timeout = 20.0
|
|
1042
1451
|
# end
|
|
1043
1452
|
#
|
|
1044
1453
|
# @!attribute [rw] endpoint
|
|
@@ -1167,6 +1576,26 @@ module Google
|
|
|
1167
1576
|
# trigger a retry.
|
|
1168
1577
|
#
|
|
1169
1578
|
class Rpcs
|
|
1579
|
+
##
|
|
1580
|
+
# RPC-specific configuration for `create_audit_schedule`
|
|
1581
|
+
# @return [::Gapic::Config::Method]
|
|
1582
|
+
#
|
|
1583
|
+
attr_reader :create_audit_schedule
|
|
1584
|
+
##
|
|
1585
|
+
# RPC-specific configuration for `update_audit_schedule`
|
|
1586
|
+
# @return [::Gapic::Config::Method]
|
|
1587
|
+
#
|
|
1588
|
+
attr_reader :update_audit_schedule
|
|
1589
|
+
##
|
|
1590
|
+
# RPC-specific configuration for `get_audit_schedule`
|
|
1591
|
+
# @return [::Gapic::Config::Method]
|
|
1592
|
+
#
|
|
1593
|
+
attr_reader :get_audit_schedule
|
|
1594
|
+
##
|
|
1595
|
+
# RPC-specific configuration for `list_audit_schedules`
|
|
1596
|
+
# @return [::Gapic::Config::Method]
|
|
1597
|
+
#
|
|
1598
|
+
attr_reader :list_audit_schedules
|
|
1170
1599
|
##
|
|
1171
1600
|
# RPC-specific configuration for `enroll_resource`
|
|
1172
1601
|
# @return [::Gapic::Config::Method]
|
|
@@ -1210,6 +1639,14 @@ module Google
|
|
|
1210
1639
|
|
|
1211
1640
|
# @private
|
|
1212
1641
|
def initialize parent_rpcs = nil
|
|
1642
|
+
create_audit_schedule_config = parent_rpcs.create_audit_schedule if parent_rpcs.respond_to? :create_audit_schedule
|
|
1643
|
+
@create_audit_schedule = ::Gapic::Config::Method.new create_audit_schedule_config
|
|
1644
|
+
update_audit_schedule_config = parent_rpcs.update_audit_schedule if parent_rpcs.respond_to? :update_audit_schedule
|
|
1645
|
+
@update_audit_schedule = ::Gapic::Config::Method.new update_audit_schedule_config
|
|
1646
|
+
get_audit_schedule_config = parent_rpcs.get_audit_schedule if parent_rpcs.respond_to? :get_audit_schedule
|
|
1647
|
+
@get_audit_schedule = ::Gapic::Config::Method.new get_audit_schedule_config
|
|
1648
|
+
list_audit_schedules_config = parent_rpcs.list_audit_schedules if parent_rpcs.respond_to? :list_audit_schedules
|
|
1649
|
+
@list_audit_schedules = ::Gapic::Config::Method.new list_audit_schedules_config
|
|
1213
1650
|
enroll_resource_config = parent_rpcs.enroll_resource if parent_rpcs.respond_to? :enroll_resource
|
|
1214
1651
|
@enroll_resource = ::Gapic::Config::Method.new enroll_resource_config
|
|
1215
1652
|
generate_audit_scope_report_config = parent_rpcs.generate_audit_scope_report if parent_rpcs.respond_to? :generate_audit_scope_report
|