REST Resource: folders.locations.auditSchedules

Resource: AuditSchedule

An audit schedule, in one of the following formats:

  • projects/{project}/locations/{location}/auditSchedules/{auditSchedule}
  • folders/{folder}/locations/{location}/auditSchedules/{auditSchedule}
  • organizations/{organization}/locations/{location}/auditSchedules/{auditSchedule}
JSON representation
{
  "name": string,
  "displayName": string,
  "gcsUri": string,
  "complianceFramework": string,
  "reportFormat": enum (AuditReportFormat),
  "scheduleConfig": {
    object (ScheduleConfig)
  },
  "state": enum (ScheduleState),
  "createTime": string,
  "updateTime": string,
  "nextRunTime": string,
  "lastTriggerTime": string,
  "errorMessage": string
}
Fields
name

string

Identifier. Unique identifier for the audit schedule. Format: projects/{project}/locations/{location}/auditSchedules/{auditSchedule} folders/{folder}/locations/{location}/auditSchedules/{auditSchedule} organizations/{organization}/locations/{location}/auditSchedules/{auditSchedule}

displayName

string

Optional. Display name for the audit schedule.

gcsUri

string

Required. Cloud Storage bucket where Audit Manager can upload the audit report and evidence. The format is gs://{bucket_name}.

complianceFramework

string

Required. Framework (set of controls) that the audit scope report is generated against. For example, NIST_800_53.

reportFormat

enum (AuditReportFormat)

Required. Format for the audit report.

scheduleConfig

object (ScheduleConfig)

Required. Configuration that defines when and how often audit runs are automatically triggered for this schedule.

state

enum (ScheduleState)

Optional. State of the audit schedule. While most states are managed by the system, you can use auditSchedules.patch to start, pause, or delete the schedule.

createTime

string (Timestamp format)

Output only. Timestamp when the schedule was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. Timestamp when the schedule was last updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

nextRunTime

string (Timestamp format)

Output only. Calculated timestamp for the next scheduled run.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

lastTriggerTime

string (Timestamp format)

Output only. Timestamp when the audit run was last triggered.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

errorMessage

string

Output only. Describes the error if the schedule is in an error state.

AuditReportFormat

Format for the audit report.

Enums
AUDIT_REPORT_FORMAT_UNSPECIFIED Default value. This value is unused.
AUDIT_REPORT_FORMAT_ODF Open Document Format (ODF).

ScheduleConfig

Timing and frequency parameters for recurring audit runs.

JSON representation
{
  "startTime": string,
  "endTime": string,
  "frequency": enum (Frequency),
  "timeZone": string
}
Fields
startTime

string (Timestamp format)

Required. Date and time when the first audit run is triggered. Subsequent runs are based on this time and the chosen frequency.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

endTime

string (Timestamp format)

Optional. Date that the schedule stops. If not specified, the schedule runs indefinitely.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

frequency

enum (Frequency)

Required. Frequency of audit runs.

timeZone

string

Optional. Time zone for the audit schedule in IANA format (for example, America/New_York). The time zone is used to interpret the startTime and the endTime, and to calculate subsequent run dates. If not specified, the time zone default is UTC.

Frequency

Frequency of audit runs.

Enums
FREQUENCY_UNSPECIFIED Default value. This value is unused.
DAILY The audit runs every day.
WEEKLY The audit runs weekly on the same day of the week as startTime.
MONTHLY The audit runs monthly on the same day of the month as startTime.
QUARTERLY The audit runs quarterly (every 3 months) on the same day of the month as startTime.
ANNUALLY The audit runs annually on the same month and day as startTime.

ScheduleState

State of an audit schedule.

Enums
SCHEDULE_STATE_UNSPECIFIED Default value. This value is unused.
SCHEDULE_STATE_ACTIVE Schedule is active and will trigger runs.
SCHEDULE_STATE_PAUSED Schedule is paused and will not trigger runs.
SCHEDULE_STATE_COMPLETED Schedule end time has passed.
SCHEDULE_STATE_FAILED_SETUP Schedule setup failed during creation or update.
SCHEDULE_STATE_ERROR Schedule is in an error state due to persistent failure to trigger an audit. Manual intervention is required.
SCHEDULE_STATE_DELETED Schedule has been marked for deletion by the user.

Methods

create

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

get

Gets details of a single audit schedule.

list

Lists audit schedules in a given folder and location.

patch

Updates an existing audit schedule.