Audit Manager API . folders . locations

Instance Methods

auditReports()

Returns the auditReports Resource.

auditScopeReports()

Returns the auditScopeReports Resource.

operationDetails()

Returns the operationDetails Resource.

operationIds()

Returns the operationIds Resource.

resourceEnrollmentStatuses()

Returns the resourceEnrollmentStatuses Resource.

standards()

Returns the standards Resource.

close()

Close httplib2 connections.

enrollResource(scope, body=None, x__xgafv=None)

Adds your project, folder, or organization to Audit Manager. This method creates the Audit Manager service agent in your workload and grants required permissions to the service agent. If you make this request on a workload that's already enrolled, then this method overrides the existing set of destinations.

Method Details

close()
Close httplib2 connections.
enrollResource(scope, body=None, x__xgafv=None)
Adds your project, folder, or organization to Audit Manager. This method creates the Audit Manager service agent in your workload and grants required permissions to the service agent. If you make this request on a workload that's already enrolled, then this method overrides the existing set of destinations.

Args:
  scope: string, Required. Organization, folder, or project to enroll in Audit Manager, in one of the following formats: * `projects/{project}/locations/{location}` * `folders/{folder}/locations/{location}` * `organizations/{organization}/locations/{location}` (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for EnrollResource.
  "destinations": [ # Required. Cloud Storage buckets that you can upload your audit reports to during the audit process. When you enroll an organization or folder, you can choose a Cloud Storage bucket from any project in the organization or folder. If you run an audit at the project level using the service agent at the organization or folder level, all the buckets that are associated with the service agent are available.
    { # Details about the bucket where you want to upload the audit report.
      "eligibleGcsBucket": "A String", # The location of the Cloud Storage bucket where you want to upload the audit report and evidence during the GenerateAuditReport API call.
    },
  ],
  "validateOnly": True or False, # Optional. If `true`, only validates the request and does not enroll the resource. This executes standard request validation (such as schema, IAM, and destination checks) and skips the apply phase. Use this field for the following purposes: * **Infrastructure as Code (IaC)**: Allow tools like Terraform to run dry-run mutations (e.g., `terraform plan`) without creating real resources or incurring costs. * **User Interface Validation**: Enable real-time form and permission validation in custom UIs before submitting requests. * **CI/CD & Automation**: Test your scripts, permissions, and parameters safely without consuming resource quotas.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Organization, folder, or project to enroll for audit reports.
  "destinationDetails": [ # Output only. Cloud Storage buckets where you want to upload the audit reports.
    { # Cloud Storage bucket where the audit report is uploaded to.
      "gcsBucketUri": "A String", # URI for the Cloud Storage bucket, in the format `gs://{bucket_name}`.
    },
  ],
  "name": "A String", # Identifier. Name of the enrollment, in one of the following formats: * `projects/{project}/locations/{location}/enrollments/{enrollment}` * `folders/{folder}/locations/{location}/enrollments/{enrollment}` * `organizations/{organization}/locations/{location}/enrollments/{enrollment}`
}