Stay organized with collections
Save and categorize content based on your preferences.
This document describes audit logging for Capacity Planner. Google Cloud services
generate audit logs that record administrative and access activities within your Google Cloud resources.
For more information about Cloud Audit Logs, see the following:
Each IAM permission has a type property, whose value is an enum
that can be one of four values: ADMIN_READ, ADMIN_WRITE,
DATA_READ, or DATA_WRITE. When you call a method,
Capacity Planner generates an audit log whose category is dependent on the
type property of the permission required to perform the method.
Methods that require an IAM permission with the type property value
of DATA_READ, DATA_WRITE, or ADMIN_READ generate
Data Access audit logs.
Methods that require an IAM permission with the type property value
of ADMIN_WRITE generate
Admin Activity audit logs.
For information about how and which permissions are evaluated for each method,
see the Identity and Access Management documentation for Capacity Planner.
google.cloud.capacityplanner.v1main.UsageService
The following audit logs are associated with methods belonging to
google.cloud.capacityplanner.v1main.UsageService.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eCapacity Planner creates audit logs as part of Cloud Audit Logs, recording "who did what, where, and when" within Google Cloud resources, available for projects, folders, organizations, and billing accounts.\u003c/p\u003e\n"],["\u003cp\u003eThere are two main types of audit logs available for Capacity Planner: Data Access logs, which include both "admin read" operations for metadata and "data read/write" operations, requiring explicit enablement.\u003c/p\u003e\n"],["\u003cp\u003eAudit log entries include a \u003ccode\u003eLogEntry\u003c/code\u003e object, containing the \u003ccode\u003elogName\u003c/code\u003e, \u003ccode\u003eresource\u003c/code\u003e, \u003ccode\u003etimeStamp\u003c/code\u003e, and \u003ccode\u003eprotoPayload\u003c/code\u003e, alongside an \u003ccode\u003eAuditLog\u003c/code\u003e object within the \u003ccode\u003eprotoPayload\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eYou can view audit logs via the Google Cloud console, the gcloud CLI, or the Logging API, with specific commands and queries available for different scopes (project, folder, organization, billing account).\u003c/p\u003e\n"],["\u003cp\u003eAudit logs can be routed to Cloud Storage, BigQuery, or Pub/Sub for extended storage, advanced search, or integration with third-party applications, including creating aggregated sinks for organization-wide log management.\u003c/p\u003e\n"]]],[],null,["# Capacity Planner audit logging\n\nThis document describes audit logging for Capacity Planner. Google Cloud services\ngenerate audit logs that record administrative and access activities within your Google Cloud resources.\nFor more information about Cloud Audit Logs, see the following:\n\n- [Types of audit logs](/logging/docs/audit#types)\n- [Audit log entry structure](/logging/docs/audit#audit_log_entry_structure)\n- [Storing and routing audit logs](/logging/docs/audit#storing_and_routing_audit_logs)\n- [Cloud Logging pricing summary](/stackdriver/pricing#logs-pricing-summary)\n- [Enable Data Access audit logs](/logging/docs/audit/configure-data-access)\n\n\u003cbr /\u003e\n\nService name\n------------\n\nCapacity Planner audit logs use the service name `capacityplanner.googleapis.com`.\nFilter for this service: \n\n```gdscript\n protoPayload.serviceName=\"capacityplanner.googleapis.com\"\n \n```\n\n\u003cbr /\u003e\n\nMethods by permission type\n--------------------------\n\nEach IAM permission has a `type` property, whose value is an enum\nthat can be one of four values: `ADMIN_READ`, `ADMIN_WRITE`,\n`DATA_READ`, or `DATA_WRITE`. When you call a method,\nCapacity Planner generates an audit log whose category is dependent on the\n`type` property of the permission required to perform the method.\n\nMethods that require an IAM permission with the `type` property value\nof `DATA_READ`, `DATA_WRITE`, or `ADMIN_READ` generate\n[Data Access](/logging/docs/audit#data-access) audit logs.\n\nMethods that require an IAM permission with the `type` property value\nof `ADMIN_WRITE` generate\n[Admin Activity](/logging/docs/audit#admin-activity) audit logs.\n\nAPI interface audit logs\n------------------------\n\nFor information about how and which permissions are evaluated for each method,\nsee the Identity and Access Management documentation for Capacity Planner.\n\n### `google.cloud.capacityplanner.v1main.UsageService`\n\nThe following audit logs are associated with methods belonging to\n`google.cloud.capacityplanner.v1main.UsageService`.\n\n#### `QueryForecasts`\n\n- **Method** : `google.cloud.capacityplanner.v1main.UsageService.QueryForecasts` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `capacityplanner.forecasts.list - ADMIN_READ`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.capacityplanner.v1main.UsageService.QueryForecasts\"\n ` \n\n#### `QueryMachineShapeUsage`\n\n- **Method** : `google.cloud.capacityplanner.v1main.UsageService.QueryMachineShapeUsage` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `capacityplanner.forecasts.list - ADMIN_READ`\n - `capacityplanner.usageHistories.list - ADMIN_READ`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.capacityplanner.v1main.UsageService.QueryMachineShapeUsage\"\n ` \n\n#### `QueryReservations`\n\n- **Method** : `google.cloud.capacityplanner.v1main.UsageService.QueryReservations` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `capacityplanner.usageHistories.list - ADMIN_READ`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.capacityplanner.v1main.UsageService.QueryReservations\"\n ` \n\n#### `QueryUsageHistories`\n\n- **Method** : `google.cloud.capacityplanner.v1main.UsageService.QueryUsageHistories` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `capacityplanner.usageHistories.list - ADMIN_READ`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.capacityplanner.v1main.UsageService.QueryUsageHistories\"\n ` \n\n#### `SummarizeUsage`\n\n- **Method** : `google.cloud.capacityplanner.v1main.UsageService.SummarizeUsage` \n- **Audit log type** : [Data access](/logging/docs/audit#data-access) \n- **Permissions** :\n - `capacityplanner.usageHistories.summarize - ADMIN_READ`\n- **Method is a long-running or streaming operation** : No. \n- **Filter for this method** : `\n protoPayload.methodName=\"google.cloud.capacityplanner.v1main.UsageService.SummarizeUsage\"\n ` \n\nMethods that don't produce audit logs\n-------------------------------------\n\nA method might not produce audit logs for one or more of the following\nreasons:\n\n- It is a high volume method involving significant log generation and storage costs.\n- It has low auditing value.\n- Another audit or platform log already provides method coverage.\n\n\u003cbr /\u003e\n\nThe following methods don't produce audit logs:\n\n- `google.cloud.location.Locations.GetLocation`\n- `google.cloud.location.Locations.ListLocations`"]]