Audit Manager API . organizations . locations . auditSchedules

Instance Methods

close()

Close httplib2 connections.

create(parent, auditScheduleId=None, body=None, validateOnly=None, x__xgafv=None)

Creates a new audit schedule in a given project and location.

get(name, x__xgafv=None)

Gets details of a single audit schedule.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

Lists audit schedules in a given project and location.

list_next(previous_request, previous_response)

Retrieves the next page of results.

patch(name, body=None, updateMask=None, validateOnly=None, x__xgafv=None)

Updates an existing audit schedule.

Method Details

close()
Close httplib2 connections.
create(parent, auditScheduleId=None, body=None, validateOnly=None, x__xgafv=None)
Creates a new audit schedule in a given project and location.

Args:
  parent: string, Required. Project or folder that this audit schedule is for, in one of the following formats: * `projects/{project}/locations/{location}` * `folders/{folder}/locations/{location}` (required)
  body: object, The request body.
    The object takes the form of:

{ # An audit schedule, in one of the following formats: * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}` * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
  "complianceFramework": "A String", # Required. Framework (set of controls) that the audit scope report is generated against. For example, `NIST_800_53`.
  "createTime": "A String", # Output only. Timestamp when the schedule was created.
  "displayName": "A String", # Optional. Display name for the audit schedule.
  "errorMessage": "A String", # Output only. Describes the error if the schedule is in an error state.
  "gcsUri": "A String", # Required. Cloud Storage bucket where Audit Manager can upload the audit report and evidence. The format is `gs://{bucket_name}`.
  "lastTriggerTime": "A String", # Output only. Timestamp when the audit run was last triggered.
  "name": "A String", # Identifier. Unique identifier for the audit schedule. Format: projects/{project}/locations/{location}/auditSchedules/{audit_schedule} folders/{folder}/locations/{location}/auditSchedules/{audit_schedule} organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}
  "nextRunTime": "A String", # Output only. Calculated timestamp for the next scheduled run.
  "reportFormat": "A String", # Required. Format for the audit report.
  "scheduleConfig": { # Timing and frequency parameters for recurring audit runs. # Required. Configuration that defines when and how often audit runs are automatically triggered for this schedule.
    "endTime": "A String", # Optional. Date that the schedule stops. If not specified, the schedule runs indefinitely.
    "frequency": "A String", # Required. Frequency of audit runs.
    "startTime": "A String", # Required. Date and time when the first audit run is triggered. Subsequent runs are based on this time and the chosen frequency.
    "timeZone": "A String", # Optional. Time zone for the audit schedule in IANA format (for example, `America/New_York`). The time zone is used to interpret the `start_time` and the `end_time`, and to calculate subsequent run dates. If not specified, the time zone default is UTC.
  },
  "state": "A String", # Optional. State of the audit schedule. While most states are managed by the system, you can use UpdateAuditSchedule to start, pause, or delete the schedule.
  "updateTime": "A String", # Output only. Timestamp when the schedule was last updated.
}

  auditScheduleId: string, Required. ID to use for the audit schedule, which becomes the final component of the audit schedule's resource name.
  validateOnly: boolean, Optional. If `true`, only validates the request and does not create the audit schedule. This executes standard request validation (such as schema, framework existence, scope, and IAM 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:

    { # An audit schedule, in one of the following formats: * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}` * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
  "complianceFramework": "A String", # Required. Framework (set of controls) that the audit scope report is generated against. For example, `NIST_800_53`.
  "createTime": "A String", # Output only. Timestamp when the schedule was created.
  "displayName": "A String", # Optional. Display name for the audit schedule.
  "errorMessage": "A String", # Output only. Describes the error if the schedule is in an error state.
  "gcsUri": "A String", # Required. Cloud Storage bucket where Audit Manager can upload the audit report and evidence. The format is `gs://{bucket_name}`.
  "lastTriggerTime": "A String", # Output only. Timestamp when the audit run was last triggered.
  "name": "A String", # Identifier. Unique identifier for the audit schedule. Format: projects/{project}/locations/{location}/auditSchedules/{audit_schedule} folders/{folder}/locations/{location}/auditSchedules/{audit_schedule} organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}
  "nextRunTime": "A String", # Output only. Calculated timestamp for the next scheduled run.
  "reportFormat": "A String", # Required. Format for the audit report.
  "scheduleConfig": { # Timing and frequency parameters for recurring audit runs. # Required. Configuration that defines when and how often audit runs are automatically triggered for this schedule.
    "endTime": "A String", # Optional. Date that the schedule stops. If not specified, the schedule runs indefinitely.
    "frequency": "A String", # Required. Frequency of audit runs.
    "startTime": "A String", # Required. Date and time when the first audit run is triggered. Subsequent runs are based on this time and the chosen frequency.
    "timeZone": "A String", # Optional. Time zone for the audit schedule in IANA format (for example, `America/New_York`). The time zone is used to interpret the `start_time` and the `end_time`, and to calculate subsequent run dates. If not specified, the time zone default is UTC.
  },
  "state": "A String", # Optional. State of the audit schedule. While most states are managed by the system, you can use UpdateAuditSchedule to start, pause, or delete the schedule.
  "updateTime": "A String", # Output only. Timestamp when the schedule was last updated.
}
get(name, x__xgafv=None)
Gets details of a single audit schedule.

Args:
  name: string, Required. Name of the audit schedule to retrieve, in one of the following formats: * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}` * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}` * `organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # An audit schedule, in one of the following formats: * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}` * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
  "complianceFramework": "A String", # Required. Framework (set of controls) that the audit scope report is generated against. For example, `NIST_800_53`.
  "createTime": "A String", # Output only. Timestamp when the schedule was created.
  "displayName": "A String", # Optional. Display name for the audit schedule.
  "errorMessage": "A String", # Output only. Describes the error if the schedule is in an error state.
  "gcsUri": "A String", # Required. Cloud Storage bucket where Audit Manager can upload the audit report and evidence. The format is `gs://{bucket_name}`.
  "lastTriggerTime": "A String", # Output only. Timestamp when the audit run was last triggered.
  "name": "A String", # Identifier. Unique identifier for the audit schedule. Format: projects/{project}/locations/{location}/auditSchedules/{audit_schedule} folders/{folder}/locations/{location}/auditSchedules/{audit_schedule} organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}
  "nextRunTime": "A String", # Output only. Calculated timestamp for the next scheduled run.
  "reportFormat": "A String", # Required. Format for the audit report.
  "scheduleConfig": { # Timing and frequency parameters for recurring audit runs. # Required. Configuration that defines when and how often audit runs are automatically triggered for this schedule.
    "endTime": "A String", # Optional. Date that the schedule stops. If not specified, the schedule runs indefinitely.
    "frequency": "A String", # Required. Frequency of audit runs.
    "startTime": "A String", # Required. Date and time when the first audit run is triggered. Subsequent runs are based on this time and the chosen frequency.
    "timeZone": "A String", # Optional. Time zone for the audit schedule in IANA format (for example, `America/New_York`). The time zone is used to interpret the `start_time` and the `end_time`, and to calculate subsequent run dates. If not specified, the time zone default is UTC.
  },
  "state": "A String", # Optional. State of the audit schedule. While most states are managed by the system, you can use UpdateAuditSchedule to start, pause, or delete the schedule.
  "updateTime": "A String", # Output only. Timestamp when the schedule was last updated.
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists audit schedules in a given project and location.

Args:
  parent: string, Required. Parent for the audit schedule, in one of the following formats: * `projects/{project}/locations/{location}` * `folders/{folder}/locations/{location}` * `organizations/{organization}/locations/{location}` (required)
  pageSize: integer, Optional. Maximum number of items to return in a single page. The service might return fewer items than this value. If unspecified, the service picks an appropriate default. The maximum value is 100; values above 100 are reduced to 100.
  pageToken: string, Optional. A page token, received from a previous call, to retrieve the next page of results.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for ListAuditSchedules.
  "auditSchedules": [ # List of audit schedules.
    { # An audit schedule, in one of the following formats: * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}` * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
      "complianceFramework": "A String", # Required. Framework (set of controls) that the audit scope report is generated against. For example, `NIST_800_53`.
      "createTime": "A String", # Output only. Timestamp when the schedule was created.
      "displayName": "A String", # Optional. Display name for the audit schedule.
      "errorMessage": "A String", # Output only. Describes the error if the schedule is in an error state.
      "gcsUri": "A String", # Required. Cloud Storage bucket where Audit Manager can upload the audit report and evidence. The format is `gs://{bucket_name}`.
      "lastTriggerTime": "A String", # Output only. Timestamp when the audit run was last triggered.
      "name": "A String", # Identifier. Unique identifier for the audit schedule. Format: projects/{project}/locations/{location}/auditSchedules/{audit_schedule} folders/{folder}/locations/{location}/auditSchedules/{audit_schedule} organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}
      "nextRunTime": "A String", # Output only. Calculated timestamp for the next scheduled run.
      "reportFormat": "A String", # Required. Format for the audit report.
      "scheduleConfig": { # Timing and frequency parameters for recurring audit runs. # Required. Configuration that defines when and how often audit runs are automatically triggered for this schedule.
        "endTime": "A String", # Optional. Date that the schedule stops. If not specified, the schedule runs indefinitely.
        "frequency": "A String", # Required. Frequency of audit runs.
        "startTime": "A String", # Required. Date and time when the first audit run is triggered. Subsequent runs are based on this time and the chosen frequency.
        "timeZone": "A String", # Optional. Time zone for the audit schedule in IANA format (for example, `America/New_York`). The time zone is used to interpret the `start_time` and the `end_time`, and to calculate subsequent run dates. If not specified, the time zone default is UTC.
      },
      "state": "A String", # Optional. State of the audit schedule. While most states are managed by the system, you can use UpdateAuditSchedule to start, pause, or delete the schedule.
      "updateTime": "A String", # Output only. Timestamp when the schedule was last updated.
    },
  ],
  "nextPageToken": "A String", # A token that you can send as the `page_token` in a subsequent request to retrieve the next page of results. If this field is empty, there are no subsequent pages.
  "unreachable": [ # Locations that can't be reached.
    "A String",
  ],
}
list_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
patch(name, body=None, updateMask=None, validateOnly=None, x__xgafv=None)
Updates an existing audit schedule.

Args:
  name: string, Identifier. Unique identifier for the audit schedule. Format: projects/{project}/locations/{location}/auditSchedules/{audit_schedule} folders/{folder}/locations/{location}/auditSchedules/{audit_schedule} organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule} (required)
  body: object, The request body.
    The object takes the form of:

{ # An audit schedule, in one of the following formats: * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}` * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
  "complianceFramework": "A String", # Required. Framework (set of controls) that the audit scope report is generated against. For example, `NIST_800_53`.
  "createTime": "A String", # Output only. Timestamp when the schedule was created.
  "displayName": "A String", # Optional. Display name for the audit schedule.
  "errorMessage": "A String", # Output only. Describes the error if the schedule is in an error state.
  "gcsUri": "A String", # Required. Cloud Storage bucket where Audit Manager can upload the audit report and evidence. The format is `gs://{bucket_name}`.
  "lastTriggerTime": "A String", # Output only. Timestamp when the audit run was last triggered.
  "name": "A String", # Identifier. Unique identifier for the audit schedule. Format: projects/{project}/locations/{location}/auditSchedules/{audit_schedule} folders/{folder}/locations/{location}/auditSchedules/{audit_schedule} organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}
  "nextRunTime": "A String", # Output only. Calculated timestamp for the next scheduled run.
  "reportFormat": "A String", # Required. Format for the audit report.
  "scheduleConfig": { # Timing and frequency parameters for recurring audit runs. # Required. Configuration that defines when and how often audit runs are automatically triggered for this schedule.
    "endTime": "A String", # Optional. Date that the schedule stops. If not specified, the schedule runs indefinitely.
    "frequency": "A String", # Required. Frequency of audit runs.
    "startTime": "A String", # Required. Date and time when the first audit run is triggered. Subsequent runs are based on this time and the chosen frequency.
    "timeZone": "A String", # Optional. Time zone for the audit schedule in IANA format (for example, `America/New_York`). The time zone is used to interpret the `start_time` and the `end_time`, and to calculate subsequent run dates. If not specified, the time zone default is UTC.
  },
  "state": "A String", # Optional. State of the audit schedule. While most states are managed by the system, you can use UpdateAuditSchedule to start, pause, or delete the schedule.
  "updateTime": "A String", # Output only. Timestamp when the schedule was last updated.
}

  updateMask: string, Optional. List of fields to update.
  validateOnly: boolean, Optional. If `true`, only validates the request and does not update the audit schedule. This executes standard request validation (such as schema, framework existence, scope, and IAM 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:

    { # An audit schedule, in one of the following formats: * `projects/{project}/locations/{location}/auditSchedules/{audit_schedule}` * `folders/{folder}/locations/{location}/auditSchedules/{audit_schedule}`
  "complianceFramework": "A String", # Required. Framework (set of controls) that the audit scope report is generated against. For example, `NIST_800_53`.
  "createTime": "A String", # Output only. Timestamp when the schedule was created.
  "displayName": "A String", # Optional. Display name for the audit schedule.
  "errorMessage": "A String", # Output only. Describes the error if the schedule is in an error state.
  "gcsUri": "A String", # Required. Cloud Storage bucket where Audit Manager can upload the audit report and evidence. The format is `gs://{bucket_name}`.
  "lastTriggerTime": "A String", # Output only. Timestamp when the audit run was last triggered.
  "name": "A String", # Identifier. Unique identifier for the audit schedule. Format: projects/{project}/locations/{location}/auditSchedules/{audit_schedule} folders/{folder}/locations/{location}/auditSchedules/{audit_schedule} organizations/{organization}/locations/{location}/auditSchedules/{audit_schedule}
  "nextRunTime": "A String", # Output only. Calculated timestamp for the next scheduled run.
  "reportFormat": "A String", # Required. Format for the audit report.
  "scheduleConfig": { # Timing and frequency parameters for recurring audit runs. # Required. Configuration that defines when and how often audit runs are automatically triggered for this schedule.
    "endTime": "A String", # Optional. Date that the schedule stops. If not specified, the schedule runs indefinitely.
    "frequency": "A String", # Required. Frequency of audit runs.
    "startTime": "A String", # Required. Date and time when the first audit run is triggered. Subsequent runs are based on this time and the chosen frequency.
    "timeZone": "A String", # Optional. Time zone for the audit schedule in IANA format (for example, `America/New_York`). The time zone is used to interpret the `start_time` and the `end_time`, and to calculate subsequent run dates. If not specified, the time zone default is UTC.
  },
  "state": "A String", # Optional. State of the audit schedule. While most states are managed by the system, you can use UpdateAuditSchedule to start, pause, or delete the schedule.
  "updateTime": "A String", # Output only. Timestamp when the schedule was last updated.
}