Skip to main content

report_schedules

Creates, updates, deletes, gets or lists a report_schedules resource.

Overview

Namereport_schedules
TypeResource
Idsumologic.dashboards.report_schedules

Fields

The following fields are returned by SELECT queries:

Dashboard report schedule object that was requested.

NameDatatypeDescription
dashboard_idstringIdentifier of dashboard the schedule will generate report for. (example: B23OjNs5ZCyn5VdMwOBoLo3PjgRnJSAlNTKEDAcpuDG2CIgRe9KFXMofm2H2) (wire: dashboardId)
schedule_idstringIdentifier of the dashboard report schedule. (example: RdQHYPh2jxoS90DXtKfA7nAJV2rsQ9BncpfY7IkjNzQWi52ug85W7r6Rrmtd) (wire: scheduleId)
cron_expressionstringCron-like expression specifying the report's schedule. Field scheduleType must be set to "Custom", otherwise, scheduleType takes precedence over cronExpression. (example: 0 0/15 * * * ? *) (wire: cronExpression)
email_notificationobjectThe base class of all connection types. (wire: emailNotification)
export_widthintegerPixel width of the exported PDF or PNG. If absent, the default width is used. (wire: exportWidth)
is_activebooleanIs the dashboard report schedule active (wire: isActive)
report_formatstringFile format of the report. Can be Pdf or Png. Pdf is portable document format. Png is portable graphics image format. (pattern: <code>^(Pdf|Png)$</code>, example: Pdf, x-pattern-message: should be one of the following: 'Pdf', 'Png') (wire: reportFormat)
schedule_typestringRun schedule of the scheduled report. Set to "Custom" to specify the schedule with a CRON expression. Possible schedule types are: - RealTime - 15Minutes - 1Hour - 2Hours - 4Hours - 6Hours - 8Hours - 12Hours - 1Day - 1Week - Custom (example: 1Day) (wire: scheduleType)
themestringTheme for the report rendering. Must be Light or Dark. If absent, the dashboard's own theme is used. (pattern: <code>^(light|dark|Light|Dark)$</code>, example: Light, x-pattern-message: Must be Light, light, dark or Dark)
time_rangeobject (wire: timeRange)
time_zonestringTime zone identifier for time specification. Either an abbreviation such as "PST", a full name such as "America/Los_Angeles", or a custom ID such as "GMT-8:00". Note that the support of abbreviations is for JDK 1.1.x compatibility only and full names should be used. (example: America/Los_Angeles) (wire: timeZone)
variable_valuesobject (wire: variableValues)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectschedule_id, regionGet the schedule of a scheduled dashboard report by the given identifier.
listselectregiondashboard_id, limit, tokenList all dashboard report schedules created by the user.
createinsertregion, dashboard_id, email_notification, report_format, schedule_type, time_zoneSchedule dashboard report to send at a specific date and time. The report should be sent as attachment or downloadable URL in one of the following notification types: 'Email', 'AWSLambda', 'AzureFunctions', 'Datadog', 'HipChat', 'Jira', 'NewRelic', 'Opsgenie', 'PagerDuty', 'Slack', 'MicrosoftTeams', 'ServiceNow', 'SumoCloudSOAR' and 'Webhook'.
updateupdateschedule_id, region, dashboard_id, email_notification, report_format, schedule_type, time_zoneUpdate the schedule of a scheduled dashboard report by the given identifier.
deletedeleteschedule_id, regionDelete the schedule of a scheduled dashboard report by the given identifier. The scheduled dashboard report will no longer be generated and sent.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringSumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT)
schedule_idstringUUID of the dashboard report schedule to delete. (wire: scheduleId)
dashboard_idstringUUID of the dashboard that the report shedules are associated with. (wire: dashboardId)
limitinteger (int32)Limit the number of dashboard report schedules returned in the response. The number of dashboard report schedules returned may be less than the limit. (example: 50)
tokenstringContinuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. token is set to null when no more pages are left. (example: GDCiRv4vebF3UWFJQ1kySXBOR3Bzh69GR0RyWm9vCtc)

SELECT examples

Get the schedule of a scheduled dashboard report by the given identifier.

SELECT
dashboard_id,
schedule_id,
cron_expression,
email_notification,
export_width,
is_active,
report_format,
schedule_type,
theme,
time_range,
time_zone,
variable_values
FROM sumologic.dashboards.report_schedules
WHERE schedule_id = '{{ schedule_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;

INSERT examples

Schedule dashboard report to send at a specific date and time. The report should be sent as attachment or downloadable URL in one of the following notification types: 'Email', 'AWSLambda', 'AzureFunctions', 'Datadog', 'HipChat', 'Jira', 'NewRelic', 'Opsgenie', 'PagerDuty', 'Slack', 'MicrosoftTeams', 'ServiceNow', 'SumoCloudSOAR' and 'Webhook'.

INSERT INTO sumologic.dashboards.report_schedules (
dashboard_id,
time_range,
variable_values,
report_format,
schedule_type,
cron_expression,
time_zone,
email_notification,
is_active,
theme,
export_width,
region
)
SELECT
'{{ dashboard_id }}' /* required */,
'{{ time_range }}',
'{{ variable_values }}',
'{{ report_format }}' /* required */,
'{{ schedule_type }}' /* required */,
'{{ cron_expression }}',
'{{ time_zone }}' /* required */,
'{{ email_notification }}' /* required */,
{{ is_active }},
'{{ theme }}',
{{ export_width }},
'{{ region }}'
RETURNING
dashboard_id,
schedule_id,
cron_expression,
email_notification,
export_width,
is_active,
report_format,
schedule_type,
theme,
time_range,
time_zone,
variable_values
;

UPDATE examples

Update the schedule of a scheduled dashboard report by the given identifier.

UPDATE sumologic.dashboards.report_schedules
SET
dashboard_id = '{{ dashboard_id }}',
time_range = '{{ time_range }}',
variable_values = '{{ variable_values }}',
report_format = '{{ report_format }}',
schedule_type = '{{ schedule_type }}',
cron_expression = '{{ cron_expression }}',
time_zone = '{{ time_zone }}',
email_notification = '{{ email_notification }}',
is_active = {{ is_active }},
theme = '{{ theme }}',
export_width = {{ export_width }}
WHERE
schedule_id = '{{ schedule_id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
AND dashboard_id = '{{ dashboard_id }}' --required
AND email_notification = '{{ email_notification }}' --required
AND report_format = '{{ report_format }}' --required
AND schedule_type = '{{ schedule_type }}' --required
AND time_zone = '{{ time_zone }}' --required
RETURNING
dashboard_id,
schedule_id,
cron_expression,
email_notification,
export_width,
is_active,
report_format,
schedule_type,
theme,
time_range,
time_zone,
variable_values;

DELETE examples

Delete the schedule of a scheduled dashboard report by the given identifier. The scheduled dashboard report will no longer be generated and sent.

DELETE FROM sumologic.dashboards.report_schedules
WHERE schedule_id = '{{ schedule_id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
;