google-cloud-audit_manager-v1 1.0.1 → 1.1.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: 81c1182d3cc58266eab0946c4a9713b1b02f78c991fbd72c93bb10102fb0cca7
4
- data.tar.gz: 36dcc8824664ca61fa4e51e62c0d560d51c673f36d3c45aba575035f1afb9829
3
+ metadata.gz: 0753b13fd5cd73fac1a8a405c7a78fc2c905ebd2ac9ac2c67a192b1b6f4b6f6d
4
+ data.tar.gz: 283b32b9b4c2fb9d66d02fe1645e7acf923c585dd2faca8437acbc57a9ad234a
5
5
  SHA512:
6
- metadata.gz: 35b159c6932d0dbeeca02937d008321b9982f0fba4a89613c8332928993e75c39f0b70671c4a4ed29e277a5bd37fbdb53a99fc095f8b7ece15876be92f1d8d8d
7
- data.tar.gz: 69588684db84862400de4daafbeab2576f497dcde905337ca9ac009c4efe4064f8961c28cc5fb93dcac74b8aa11866925c46b3d5e0a9b69e9d8d3eca50b0574f
6
+ metadata.gz: 24f89ab4c893d220ca6fe77e8f90f82d16a0142cc4b4fc2fc46e0e1700d1901d35adb5a6c37dc8223cfcff5e0b1c0bb9d9a88ba091e38c30a15bf93cc3ff1a01
7
+ data.tar.gz: 757d66f586a48110c4dba59672c59b01cf13f2d82cd9d9a70db78f71fe4376b4582e2a34c61f5e7907aabeb5a02dd8abda2188d785034494b2c3b15bd61c5df6
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,34 @@ 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 validate the request and don't generate the audit
499
+ # report.
481
500
  #
482
501
  # @yield [response, operation] Access the result along with the RPC operation
483
502
  # @yieldparam response [::Gapic::Operation]
@@ -553,7 +572,8 @@ module Google
553
572
  end
554
573
 
555
574
  ##
556
- # Lists audit reports in the selected parent scope
575
+ # Lists the audit reports for the organization, folder, or project that you
576
+ # specify as the parent scope.
557
577
  #
558
578
  # @overload list_audit_reports(request, options = nil)
559
579
  # Pass arguments to `list_audit_reports` via a request object, either of type
@@ -571,12 +591,20 @@ module Google
571
591
  # the default parameter values, pass an empty Hash as a request object (see above).
572
592
  #
573
593
  # @param parent [::String]
574
- # Required. The parent scope for which to list the reports.
594
+ # Required. Parent organization, folder, or project to list reports for,
595
+ # in one of the following formats:
596
+ #
597
+ # * `projects/{project}/locations/{location}`
598
+ # * `folders/{folder}/locations/{location}`
599
+ # * `organizations/{organization}/locations/{location}`
575
600
  # @param page_size [::Integer]
576
- # Optional. The maximum number of resources to return.
601
+ # Optional. Maximum number of items to return in a single page. The service
602
+ # might return fewer items than this value. If unspecified, the service picks
603
+ # an appropriate default. The maximum value is 100; values above 100 are
604
+ # reduced to 100.
577
605
  # @param page_token [::String]
578
- # Optional. The next_page_token value returned from a previous List request,
579
- # if any.
606
+ # Optional. A page token, received from a previous call, to retrieve the next
607
+ # page of results.
580
608
  #
581
609
  # @yield [response, operation] Access the result along with the RPC operation
582
610
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::AuditReport>]
@@ -649,7 +677,7 @@ module Google
649
677
  end
650
678
 
651
679
  ##
652
- # Get the overall audit report
680
+ # Gets the full metadata and findings for an audit report.
653
681
  #
654
682
  # @overload get_audit_report(request, options = nil)
655
683
  # Pass arguments to `get_audit_report` via a request object, either of type
@@ -667,9 +695,11 @@ module Google
667
695
  # the default parameter values, pass an empty Hash as a request object (see above).
668
696
  #
669
697
  # @param name [::String]
670
- # Required. Format
671
- # projects/\\{project}/locations/\\{location}/auditReports/\\{audit_report},
672
- # folders/\\{folder}/locations/\\{location}/auditReports/\\{audit_report}
698
+ # Required. Name of the audit report, in one of the following formats:
699
+ #
700
+ # * `projects/{project}/locations/{location}/auditReports/{audit_report}`
701
+ # * `folders/{folder}/locations/{location}/auditReports/{audit_report}`
702
+ # * `organizations/{organization}/locations/{location}/auditReports/{audit_report}`
673
703
  #
674
704
  # @yield [response, operation] Access the result along with the RPC operation
675
705
  # @yieldparam response [::Google::Cloud::AuditManager::V1::AuditReport]
@@ -736,7 +766,7 @@ module Google
736
766
  end
737
767
 
738
768
  ##
739
- # Get a resource along with its enrollment status.
769
+ # Gets a resource and its enrollment status.
740
770
  #
741
771
  # @overload get_resource_enrollment_status(request, options = nil)
742
772
  # Pass arguments to `get_resource_enrollment_status` via a request object, either of type
@@ -754,10 +784,12 @@ module Google
754
784
  # the default parameter values, pass an empty Hash as a request object (see above).
755
785
  #
756
786
  # @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}
787
+ # Required. Name of the resource enrollment status, in one of the following
788
+ # formats:
789
+ #
790
+ # * `folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}`
791
+ # * `projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}`
792
+ # * `organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}`
761
793
  #
762
794
  # @yield [response, operation] Access the result along with the RPC operation
763
795
  # @yieldparam response [::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus]
@@ -824,7 +856,8 @@ module Google
824
856
  end
825
857
 
826
858
  ##
827
- # Fetches all resources under the parent along with their enrollment.
859
+ # Lists all the folders and projects in an organization or folder, along with
860
+ # their enrollments.
828
861
  #
829
862
  # @overload list_resource_enrollment_statuses(request, options = nil)
830
863
  # Pass arguments to `list_resource_enrollment_statuses` via a request object, either of type
@@ -842,13 +875,19 @@ module Google
842
875
  # the default parameter values, pass an empty Hash as a request object (see above).
843
876
  #
844
877
  # @param parent [::String]
845
- # Required. The parent scope for which the list of resources with enrollments
846
- # are required.
878
+ # Required. Parent organization or folder to list enrollment statuses for,
879
+ # in one of the following formats:
880
+ #
881
+ # * `folders/{folder}/locations/{location}`
882
+ # * `organizations/{organization}/locations/{location}`
847
883
  # @param page_size [::Integer]
848
- # Optional. The maximum number of resources to return.
884
+ # Optional. Maximum number of items to return in a single page. The service
885
+ # might return fewer items than this value. If unspecified, the service picks
886
+ # an appropriate default. The maximum value is 100; values above 100 are
887
+ # reduced to 100.
849
888
  # @param page_token [::String]
850
- # Optional. The next_page_token value returned from a previous List request,
851
- # if any.
889
+ # Optional. A page token, received from a previous call, to retrieve the next
890
+ # page of results.
852
891
  #
853
892
  # @yield [response, operation] Access the result along with the RPC operation
854
893
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AuditManager::V1::ResourceEnrollmentStatus>]
@@ -921,7 +960,8 @@ module Google
921
960
  end
922
961
 
923
962
  ##
924
- # Gets controls needed to be implemented to be compliant to a standard.
963
+ # Lists the controls that you must implement to become compliant to a
964
+ # regulatory standard.
925
965
  #
926
966
  # @overload list_controls(request, options = nil)
927
967
  # Pass arguments to `list_controls` via a request object, either of type
@@ -939,14 +979,19 @@ module Google
939
979
  # the default parameter values, pass an empty Hash as a request object (see above).
940
980
  #
941
981
  # @param parent [::String]
942
- # Required. Format
943
- # projects/\\{project}/locations/\\{location}/standards/\\{standard},
944
- # folders/\\{folder}/locations/\\{location}/standards/\\{standard}
982
+ # Required. Standard to list controls for, in one of the following formats:
983
+ #
984
+ # * `projects/{project}/locations/{location}/standards/{standard}`
985
+ # * `folders/{folder}/locations/{location}/standards/{standard}`
986
+ # * `organizations/{organization}/locations/{location}/standards/{standard}`
945
987
  # @param page_size [::Integer]
946
- # Optional. The maximum number of resources to return.
988
+ # Optional. Maximum number of items to return in a single page. The service
989
+ # might return fewer items than this value. If unspecified, the service picks
990
+ # an appropriate default. The maximum value is 100; values above 100 are
991
+ # reduced to 100.
947
992
  # @param page_token [::String]
948
- # Optional. The next_page_token value returned from a previous List request,
949
- # if any.
993
+ # Optional. A page token, received from a previous call, to retrieve the next
994
+ # page of results.
950
995
  #
951
996
  # @yield [response, operation] Access the result along with the RPC operation
952
997
  # @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
  #