google-cloud-audit_manager-v1 1.0.1 → 1.1.1

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: 81c1182d3cc58266eab0946c4a9713b1b02f78c991fbd72c93bb10102fb0cca7
4
- data.tar.gz: 36dcc8824664ca61fa4e51e62c0d560d51c673f36d3c45aba575035f1afb9829
3
+ metadata.gz: 74227ea6a9e48ad5cba6e21b5d998c5c5834e018a7ef6e422dc19ff2836a1c56
4
+ data.tar.gz: 8c13617abf43e7fa2968e059931d99512df30c95275949d7ddb6d7f1fd0950f8
5
5
  SHA512:
6
- metadata.gz: 35b159c6932d0dbeeca02937d008321b9982f0fba4a89613c8332928993e75c39f0b70671c4a4ed29e277a5bd37fbdb53a99fc095f8b7ece15876be92f1d8d8d
7
- data.tar.gz: 69588684db84862400de4daafbeab2576f497dcde905337ca9ac009c4efe4064f8961c28cc5fb93dcac74b8aa11866925c46b3d5e0a9b69e9d8d3eca50b0574f
6
+ metadata.gz: a8d1c7b31d63b631fc0caa947a89dc79031fc3c7284d9f7f065b6dbc283cb22926dc3efdf5f5ecb09801c6b9f1e8887d8709eff88727ac8653e20edd83786b33
7
+ data.tar.gz: dac6414d3d870cd8c2547496f78831aff500220f6c169030987977f44ee64761c1ce78362211a87a80cfc23f7ac0d4572f07bc155991613eae4a4bc5af073d40
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Ruby Client for the Audit Manager V1 API
2
2
 
3
- API Client library for the Audit Manager V1 API
3
+ The Audit Manager API allows customers to manage compliance audits.
4
4
 
5
- google-cloud-audit_manager-v1 is the official client library for the Audit Manager V1 API.
6
5
 
7
6
  https://github.com/googleapis/google-cloud-ruby
8
7
 
@@ -245,11 +245,11 @@ module Google
245
245
  # Service calls
246
246
 
247
247
  ##
248
- # Enrolls the customer resource(folder/project/organization) to the audit
249
- # manager service by creating the audit managers Service Agent in customers
250
- # workload and granting required permissions to the Service Agent. Please
251
- # note that if enrollment request is made on the already enrolled workload
252
- # then enrollment is executed overriding the existing set of destinations.
248
+ # Adds your project, folder, or organization to Audit
249
+ # Manager. This method creates the Audit Manager service agent in your
250
+ # workload and grants required permissions to the service agent.
251
+ # If you make this request on a workload that's already enrolled,
252
+ # then this method overrides the existing set of destinations.
253
253
  #
254
254
  # @overload enroll_resource(request, options = nil)
255
255
  # Pass arguments to `enroll_resource` via a request object, either of type
@@ -267,19 +267,21 @@ module Google
267
267
  # the default parameter values, pass an empty Hash as a request object (see above).
268
268
  #
269
269
  # @param scope [::String]
270
- # Required. The resource to be enrolled to the audit manager. Scope format
271
- # should be resource_type/resource_identifier Eg:
272
- # projects/\\{project}/locations/\\{location},
273
- # folders/\\{folder}/locations/\\{location}
274
- # organizations/\\{organization}/locations/\\{location}
270
+ # Required. Organization, folder, or project to enroll in Audit Manager, in
271
+ # one of the following formats:
272
+ #
273
+ # * `projects/{project}/locations/{location}`
274
+ # * `folders/{folder}/locations/{location}`
275
+ # * `organizations/{organization}/locations/{location}`
275
276
  # @param destinations [::Array<::Google::Cloud::AuditManager::V1::EnrollResourceRequest::EligibleDestination, ::Hash>]
276
- # Required. List of destination among which customer can choose to upload
277
- # their reports during the audit process. While enrolling at a
278
- # organization/folder level, customer can choose Cloud storage bucket in any
279
- # project. If the audit is triggered at project level using the service agent
280
- # at organization/folder level, all the destination options associated with
281
- # respective organization/folder level service agent will be available to
282
- # auditing projects.
277
+ # Required. Cloud Storage buckets that you can upload your audit reports to
278
+ # during the audit process.
279
+ #
280
+ # When you enroll an organization or folder, you can choose a Cloud Storage
281
+ # bucket from any project in the organization or folder. If you run an audit
282
+ # at the project level using the service agent at the organization or folder
283
+ # level, all the buckets that are associated with the service agent are
284
+ # available.
283
285
  #
284
286
  # @yield [response, operation] Access the result along with the RPC operation
285
287
  # @yieldparam response [::Google::Cloud::AuditManager::V1::Enrollment]
@@ -346,9 +348,14 @@ module Google
346
348
  end
347
349
 
348
350
  ##
349
- # Generates a demo report highlighting different responsibilities
350
- # (Google/Customer/ shared) required to be fulfilled for the customer's
351
- # workload to be compliant with the given standard.
351
+ # Generates an audit scope report for the given standard.
352
+ #
353
+ # The report includes the following:
354
+ #
355
+ # * The technical attributes and constraints that Audit Manager uses to
356
+ # verify your compliance with a framework.
357
+ # * A list of Google Cloud services and resources that are within the
358
+ # scope of the framework.
352
359
  #
353
360
  # @overload generate_audit_scope_report(request, options = nil)
354
361
  # Pass arguments to `generate_audit_scope_report` via a request object, either of type
@@ -366,18 +373,22 @@ module Google
366
373
  # the default parameter values, pass an empty Hash as a request object (see above).
367
374
  #
368
375
  # @param scope [::String]
369
- # Required. Scope for which the AuditScopeReport is required. Must be of
370
- # format resource_type/resource_identifier Eg:
371
- # projects/\\{project}/locations/\\{location},
372
- # folders/\\{folder}/locations/\\{location}
376
+ # Required. Project or folder that the audit scope report is generated for,
377
+ # in one of the following formats:
378
+ #
379
+ # * `projects/{project}/locations/{location}`
380
+ # * `folders/{folder}/locations/{location}`
381
+ # * `organizations/{organization}/locations/{location}`
373
382
  # @param compliance_standard [::String]
374
- # Required. Compliance Standard against which the Scope Report must be
375
- # generated. Eg: FEDRAMP_MODERATE
383
+ # Optional. Deprecated. The standard (industry or regulatory requirements)
384
+ # that the audit scope report is run against.
385
+ #
386
+ # Use the `compliance_framework` field instead.
376
387
  # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditScopeReportRequest::AuditScopeReportFormat]
377
- # Required. The format in which the Scope report bytes should be returned.
388
+ # Required. Format for the audit scope report.
378
389
  # @param compliance_framework [::String]
379
- # Required. Compliance framework against which the Scope Report must be
380
- # generated.
390
+ # Required. Framework (set of controls) that the audit scope report is
391
+ # generated against. For example, `NIST_800_53`.
381
392
  #
382
393
  # @yield [response, operation] Access the result along with the RPC operation
383
394
  # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditScopeReport]
@@ -444,8 +455,9 @@ module Google
444
455
  end
445
456
 
446
457
  ##
447
- # Register the Audit Report generation requests and returns the OperationId
448
- # using which the customer can track the report generation progress.
458
+ # Registers audit report generation requests. This method returns the
459
+ # operation identifier that you can use to track the report generation
460
+ # progress.
449
461
  #
450
462
  # @overload generate_audit_report(request, options = nil)
451
463
  # Pass arguments to `generate_audit_report` via a request object, either of type
@@ -457,27 +469,45 @@ module Google
457
469
  # @param options [::Gapic::CallOptions, ::Hash]
458
470
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
459
471
  #
460
- # @overload generate_audit_report(gcs_uri: nil, scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil)
472
+ # @overload generate_audit_report(gcs_uri: nil, scope: nil, compliance_standard: nil, report_format: nil, compliance_framework: nil, validate_only: nil)
461
473
  # Pass arguments to `generate_audit_report` via keyword arguments. Note that at
462
474
  # least one keyword argument is required. To specify no parameters, or to keep all
463
475
  # the default parameter values, pass an empty Hash as a request object (see above).
464
476
  #
465
477
  # @param gcs_uri [::String]
466
- # Destination Cloud storage bucket where report and evidence must be
467
- # uploaded. The Cloud storage bucket provided here must be selected among
468
- # the buckets entered during the enrollment process.
478
+ # URL for the Cloud Storage bucket where the report and evidence is
479
+ # uploaded. You must select a bucket that was provided during the
480
+ # enrollment process.
469
481
  # @param scope [::String]
470
- # Required. Scope for which the AuditScopeReport is required. Must be of
471
- # format resource_type/resource_identifier Eg:
472
- # projects/\\{project}/locations/\\{location},
473
- # folders/\\{folder}/locations/\\{location}
482
+ # Required. Organization, folder, or project that the audit applies to, in
483
+ # one of the following formats:
484
+ #
485
+ # * `projects/{project}/locations/{location}`
486
+ # * `folders/{folder}/locations/{location}`
487
+ # * `organizations/{organization}/locations/{location}`
474
488
  # @param compliance_standard [::String]
475
- # Required. Compliance Standard against which the Scope Report must be
476
- # generated. Eg: FEDRAMP_MODERATE
489
+ # Optional. Deprecated. Compliance standard for the audit report.
490
+ #
491
+ # Use the `compliance_framework` field instead.
477
492
  # @param report_format [::Google::Cloud::AuditManager::V1::GenerateAuditReportRequest::AuditReportFormat]
478
- # Required. The format in which the audit report should be created.
493
+ # Required. Format for the audit report.
479
494
  # @param compliance_framework [::String]
480
- # Required. Compliance framework against which the Report must be generated.
495
+ # Required. The framework that's used for the audit report. For example,
496
+ # `NIST_800_53`.
497
+ # @param validate_only [::Boolean]
498
+ # Optional. If `true`, only validates the request and does not generate the
499
+ # audit report. This executes standard request validation (such as schema,
500
+ # framework existence, scope, and IAM checks) and skips the apply phase.
501
+ #
502
+ # Use this field for the following purposes:
503
+ # * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run
504
+ # dry-run mutations (e.g., `terraform plan`) without creating real
505
+ # resources or incurring costs.
506
+ # * **User Interface Validation**: Enable real-time form and permission
507
+ # validation in custom UIs before submitting requests.
508
+ # * **CI/CD & Automation**: Test your scripts, permissions, and parameters
509
+ # safely without triggering expensive Long-Running Operations (LROs) or
510
+ # consuming resource quotas.
481
511
  #
482
512
  # @yield [response, operation] Access the result along with the RPC operation
483
513
  # @yieldparam response [::Gapic::Operation]
@@ -553,7 +583,8 @@ module Google
553
583
  end
554
584
 
555
585
  ##
556
- # Lists audit reports in the selected parent scope
586
+ # Lists the audit reports for the organization, folder, or project that you
587
+ # specify as the parent scope.
557
588
  #
558
589
  # @overload list_audit_reports(request, options = nil)
559
590
  # Pass arguments to `list_audit_reports` via a request object, either of type
@@ -571,12 +602,20 @@ module Google
571
602
  # the default parameter values, pass an empty Hash as a request object (see above).
572
603
  #
573
604
  # @param parent [::String]
574
- # Required. The parent scope for which to list the reports.
605
+ # Required. Parent organization, folder, or project to list reports for,
606
+ # in one of the following formats:
607
+ #
608
+ # * `projects/{project}/locations/{location}`
609
+ # * `folders/{folder}/locations/{location}`
610
+ # * `organizations/{organization}/locations/{location}`
575
611
  # @param page_size [::Integer]
576
- # Optional. The maximum number of resources to return.
612
+ # Optional. Maximum number of items to return in a single page. The service
613
+ # might return fewer items than this value. If unspecified, the service picks
614
+ # an appropriate default. The maximum value is 100; values above 100 are
615
+ # reduced to 100.
577
616
  # @param page_token [::String]
578
- # Optional. The next_page_token value returned from a previous List request,
579
- # if any.
617
+ # Optional. A page token, received from a previous call, to retrieve the next
618
+ # page of results.
580
619
  #
581
620
  # @yield [response, operation] Access the result along with the RPC operation
582
621
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>]
@@ -649,7 +688,7 @@ module Google
649
688
  end
650
689
 
651
690
  ##
652
- # Get the overall audit report
691
+ # Gets the full metadata and findings for an audit report.
653
692
  #
654
693
  # @overload get_audit_report(request, options = nil)
655
694
  # Pass arguments to `get_audit_report` via a request object, either of type
@@ -667,9 +706,11 @@ module Google
667
706
  # the default parameter values, pass an empty Hash as a request object (see above).
668
707
  #
669
708
  # @param name [::String]
670
- # Required. Format
671
- # projects/\\{project}/locations/\\{location}/auditReports/\\{audit_report},
672
- # folders/\\{folder}/locations/\\{location}/auditReports/\\{audit_report}
709
+ # Required. Name of the audit report, in one of the following formats:
710
+ #
711
+ # * `projects/{project}/locations/{location}/auditReports/{audit_report}`
712
+ # * `folders/{folder}/locations/{location}/auditReports/{audit_report}`
713
+ # * `organizations/{organization}/locations/{location}/auditReports/{audit_report}`
673
714
  #
674
715
  # @yield [response, operation] Access the result along with the RPC operation
675
716
  # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditReport]
@@ -736,7 +777,7 @@ module Google
736
777
  end
737
778
 
738
779
  ##
739
- # Get a resource along with its enrollment status.
780
+ # Gets a resource and its enrollment status.
740
781
  #
741
782
  # @overload get_resource_enrollment_status(request, options = nil)
742
783
  # Pass arguments to `get_resource_enrollment_status` via a request object, either of type
@@ -754,10 +795,12 @@ module Google
754
795
  # the default parameter values, pass an empty Hash as a request object (see above).
755
796
  #
756
797
  # @param name [::String]
757
- # Required. Format
758
- # folders/\\{folder}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status},
759
- # projects/\\{project}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status},
760
- # organizations/\\{organization}/locations/\\{location}/resourceEnrollmentStatuses/\\{resource_enrollment_status}
798
+ # Required. Name of the resource enrollment status, in one of the following
799
+ # formats:
800
+ #
801
+ # * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}`
802
+ # * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}`
803
+ # * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}`
761
804
  #
762
805
  # @yield [response, operation] Access the result along with the RPC operation
763
806
  # @yieldparam response [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus]
@@ -824,7 +867,8 @@ module Google
824
867
  end
825
868
 
826
869
  ##
827
- # Fetches all resources under the parent along with their enrollment.
870
+ # Lists all the folders and projects in an organization or folder, along with
871
+ # their enrollments.
828
872
  #
829
873
  # @overload list_resource_enrollment_statuses(request, options = nil)
830
874
  # Pass arguments to `list_resource_enrollment_statuses` via a request object, either of type
@@ -842,13 +886,19 @@ module Google
842
886
  # the default parameter values, pass an empty Hash as a request object (see above).
843
887
  #
844
888
  # @param parent [::String]
845
- # Required. The parent scope for which the list of resources with enrollments
846
- # are required.
889
+ # Required. Parent organization or folder to list enrollment statuses for,
890
+ # in one of the following formats:
891
+ #
892
+ # * `folders/{folder}/locations/{location}`
893
+ # * `organizations/{organization}/locations/{location}`
847
894
  # @param page_size [::Integer]
848
- # Optional. The maximum number of resources to return.
895
+ # Optional. Maximum number of items to return in a single page. The service
896
+ # might return fewer items than this value. If unspecified, the service picks
897
+ # an appropriate default. The maximum value is 100; values above 100 are
898
+ # reduced to 100.
849
899
  # @param page_token [::String]
850
- # Optional. The next_page_token value returned from a previous List request,
851
- # if any.
900
+ # Optional. A page token, received from a previous call, to retrieve the next
901
+ # page of results.
852
902
  #
853
903
  # @yield [response, operation] Access the result along with the RPC operation
854
904
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>]
@@ -921,7 +971,8 @@ module Google
921
971
  end
922
972
 
923
973
  ##
924
- # Gets controls needed to be implemented to be compliant to a standard.
974
+ # Lists the controls that you must implement to become compliant to a
975
+ # regulatory standard.
925
976
  #
926
977
  # @overload list_controls(request, options = nil)
927
978
  # Pass arguments to `list_controls` via a request object, either of type
@@ -939,14 +990,19 @@ module Google
939
990
  # the default parameter values, pass an empty Hash as a request object (see above).
940
991
  #
941
992
  # @param parent [::String]
942
- # Required. Format
943
- # projects/\\{project}/locations/\\{location}/standards/\\{standard},
944
- # folders/\\{folder}/locations/\\{location}/standards/\\{standard}
993
+ # Required. Standard to list controls for, in one of the following formats:
994
+ #
995
+ # * `projects/{project}/locations/{location}/standards/{standard}`
996
+ # * `folders/{folder}/locations/{location}/standards/{standard}`
997
+ # * `organizations/{organization}/locations/{location}/standards/{standard}`
945
998
  # @param page_size [::Integer]
946
- # Optional. The maximum number of resources to return.
999
+ # Optional. Maximum number of items to return in a single page. The service
1000
+ # might return fewer items than this value. If unspecified, the service picks
1001
+ # an appropriate default. The maximum value is 100; values above 100 are
1002
+ # reduced to 100.
947
1003
  # @param page_token [::String]
948
- # Optional. The next_page_token value returned from a previous List request,
949
- # if any.
1004
+ # Optional. A page token, received from a previous call, to retrieve the next
1005
+ # page of results.
950
1006
  #
951
1007
  # @yield [response, operation] Access the result along with the RPC operation
952
1008
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::Control>]
@@ -26,6 +26,7 @@ module Google
26
26
  # Credentials for the AuditManager API.
27
27
  class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-auditmanager",
29
30
  "https://www.googleapis.com/auth/cloud-platform"
30
31
  ]
31
32
  self.env_vars = [
@@ -45,6 +45,15 @@ module Google
45
45
  # @param location [String]
46
46
  # @param audit_report [String]
47
47
  #
48
+ # @overload audit_report_path(organization:, location:, audit_report:)
49
+ # The resource will be in the following format:
50
+ #
51
+ # `organizations/{organization}/locations/{location}/auditReports/{audit_report}`
52
+ #
53
+ # @param organization [String]
54
+ # @param location [String]
55
+ # @param audit_report [String]
56
+ #
48
57
  # @return [::String]
49
58
  def audit_report_path **args
50
59
  resources = {
@@ -59,6 +68,12 @@ module Google
59
68
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
60
69
 
61
70
  "folders/#{folder}/locations/#{location}/auditReports/#{audit_report}"
71
+ end),
72
+ "audit_report:location:organization" => (proc do |organization:, location:, audit_report:|
73
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
74
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
75
+
76
+ "organizations/#{organization}/locations/#{location}/auditReports/#{audit_report}"
62
77
  end)
63
78
  }
64
79
 
@@ -140,6 +155,23 @@ module Google
140
155
  "projects/#{project}/locations/#{location}"
141
156
  end
142
157
 
158
+ ##
159
+ # Create a fully-qualified OrganizationLocation resource string.
160
+ #
161
+ # The resource will be in the following format:
162
+ #
163
+ # `organizations/{organization}/locations/{location}`
164
+ #
165
+ # @param organization [String]
166
+ # @param location [String]
167
+ #
168
+ # @return [::String]
169
+ def organization_location_path organization:, location:
170
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
171
+
172
+ "organizations/#{organization}/locations/#{location}"
173
+ end
174
+
143
175
  ##
144
176
  # Create a fully-qualified ResourceEnrollmentStatus resource string.
145
177
  #