report_schedules
Creates, updates, deletes, gets or lists a report_schedules resource.
Overview
| Name | report_schedules |
| Type | Resource |
| Id | sumologic.dashboards.report_schedules |
Fields
The following fields are returned by SELECT queries:
- get
- list
Dashboard report schedule object that was requested.
| Name | Datatype | Description |
|---|---|---|
dashboard_id | string | Identifier of dashboard the schedule will generate report for. (example: B23OjNs5ZCyn5VdMwOBoLo3PjgRnJSAlNTKEDAcpuDG2CIgRe9KFXMofm2H2) (wire: dashboardId) |
schedule_id | string | Identifier of the dashboard report schedule. (example: RdQHYPh2jxoS90DXtKfA7nAJV2rsQ9BncpfY7IkjNzQWi52ug85W7r6Rrmtd) (wire: scheduleId) |
cron_expression | string | Cron-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_notification | object | The base class of all connection types. (wire: emailNotification) |
export_width | integer | Pixel width of the exported PDF or PNG. If absent, the default width is used. (wire: exportWidth) |
is_active | boolean | Is the dashboard report schedule active (wire: isActive) |
report_format | string | File 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_type | string | Run 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) |
theme | string | Theme 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_range | object | (wire: timeRange) |
time_zone | string | Time 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_values | object | (wire: variableValues) |
Paginated list of dashboard report schedules created by the user.
| Name | Datatype | Description |
|---|---|---|
dashboard_id | string | Identifier of dashboard the schedule will generate report for. (example: B23OjNs5ZCyn5VdMwOBoLo3PjgRnJSAlNTKEDAcpuDG2CIgRe9KFXMofm2H2) (wire: dashboardId) |
schedule_id | string | Identifier of the dashboard report schedule. (example: RdQHYPh2jxoS90DXtKfA7nAJV2rsQ9BncpfY7IkjNzQWi52ug85W7r6Rrmtd) (wire: scheduleId) |
cron_expression | string | Cron-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_notification | object | The base class of all connection types. (wire: emailNotification) |
export_width | integer | Pixel width of the exported PDF or PNG. If absent, the default width is used. (wire: exportWidth) |
is_active | boolean | Is the dashboard report schedule active (wire: isActive) |
report_format | string | File 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_type | string | Run 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) |
theme | string | Theme 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_range | object | (wire: timeRange) |
time_zone | string | Time 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_values | object | (wire: variableValues) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | schedule_id, region | Get the schedule of a scheduled dashboard report by the given identifier. | |
list | select | region | dashboard_id, limit, token | List all dashboard report schedules created by the user. |
create | insert | region, dashboard_id, email_notification, report_format, schedule_type, time_zone | 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'. | |
update | update | schedule_id, region, dashboard_id, email_notification, report_format, schedule_type, time_zone | Update the schedule of a scheduled dashboard report by the given identifier. | |
delete | delete | schedule_id, region | Delete 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.
| Name | Datatype | Description |
|---|---|---|
region | string | Sumo 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_id | string | UUID of the dashboard report schedule to delete. (wire: scheduleId) |
dashboard_id | string | UUID of the dashboard that the report shedules are associated with. (wire: dashboardId) |
limit | integer (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) |
token | string | Continuation 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
- list
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
;
List all dashboard report schedules created by the user.
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 region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND dashboard_id = '{{ dashboard_id }}'
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: report_schedules
props:
- name: region
value: "{{ region }}"
description: Required parameter for the report_schedules resource.
- name: dashboard_id
value: "{{ dashboard_id }}"
description: |
Identifier of dashboard the schedule will generate report for.
- name: time_range
value:
type: "{{ type }}"
- name: variable_values
value:
data: "{{ data }}"
richData: "{{ richData }}"
- name: report_format
value: "{{ report_format }}"
description: |
File format of the report. Can be `Pdf` or `Png`. `Pdf` is portable document format. `Png` is portable graphics image format.
- name: schedule_type
value: "{{ schedule_type }}"
description: |
Run 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`
- name: cron_expression
value: "{{ cron_expression }}"
description: |
Cron-like expression specifying the report's schedule. Field scheduleType must be set to "Custom", otherwise, scheduleType takes precedence over cronExpression.
- name: time_zone
value: "{{ time_zone }}"
description: |
Time 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.
- name: email_notification
description: |
The base class of all connection types.
value:
connectionType: "{{ connectionType }}"
recipients:
- "{{ recipients }}"
subject: "{{ subject }}"
messageBody: "{{ messageBody }}"
timeZone: "{{ timeZone }}"
includeQuery: {{ includeQuery }}
includeResultSet: {{ includeResultSet }}
- name: is_active
value: {{ is_active }}
description: |
Is the dashboard report schedule active
default: true
- name: theme
value: "{{ theme }}"
description: |
Theme for the report rendering. Must be `Light` or `Dark`. If absent, the dashboard's own theme is used.
- name: export_width
value: {{ export_width }}
description: |
Pixel width of the exported PDF or PNG. If absent, the default width is used.
UPDATE examples
- update
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
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
;