Method: projects.locations.enrollResource

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.

HTTP request

POST https://auditmanager.googleapis.com/v1/{scope=projects/*/locations/*}:enrollResource

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
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}

Request body

The request body contains data with the following structure:

JSON representation
{
  "destinations": [
    {
      object (EligibleDestination)
    }
  ]
}
Fields
destinations[]

object (EligibleDestination)

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.

Response body

If successful, the response body contains an instance of Enrollment.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the scope resource:

  • auditmanager.locations.enrollResource

For more information, see the IAM documentation.