organizations

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.

post/v1/{+scope}:enrollResource

Request

  • Base URL: https://auditmanager.googleapis.com
  • URL: https://auditmanager.googleapis.com/v1/{+scope}:enrollResource
  • Auth: one of:
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/cloud-auditmanager) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/cloud-auditmanager)
    • OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/cloud-platform) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/cloud-platform)

Path parameters

scopestring required

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

validateOnlyboolean

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.

Response

Successful response

Changes

No recorded changes to this operation across all 1 revision of this API.