Skip to main content

timestamp_format

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

Overview​

Nametimestamp_format
TypeResource
Idsumologic.policies.timestamp_format

Fields​

The following fields are returned by SELECT queries:

The Alert Timestamp Format policy.

NameDatatypeDescription
timestamp_formatstringThe timestamp format used in alert notification payloads. Valid values: ISO, LEGACY. ISO format: yyyy-MM-dd HH:mm:ss z. LEGACY format: MM/dd/yyyy hh:mm:ss a z. (example: LEGACY) (wire: timestampFormat)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregionGet the Alert Timestamp Format policy. This policy controls the date/time format used in alert and recovery notification payloads across all connections and monitor types. When set to ISO, timestamps use the format yyyy-MM-dd HH:mm:ss z. When set to LEGACY, timestamps use the format MM/dd/yyyy hh:mm:ss a z.
updateupdateregion, timestamp_formatSet the Alert Timestamp Format policy. This policy controls the date/time format used in alert and recovery notification payloads across all connections and monitor types. When set to ISO, timestamps use the format yyyy-MM-dd HH:mm:ss z. When set to LEGACY, timestamps use the format MM/dd/yyyy hh:mm:ss a z.

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)

SELECT examples​

Get the Alert Timestamp Format policy. This policy controls the date/time format used in alert and recovery notification payloads across all connections and monitor types. When set to ISO, timestamps use the format yyyy-MM-dd HH:mm:ss z. When set to LEGACY, timestamps use the format MM/dd/yyyy hh:mm:ss a z.

SELECT
timestamp_format
FROM sumologic.policies.timestamp_format
WHERE region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;

UPDATE examples​

Set the Alert Timestamp Format policy. This policy controls the date/time format used in alert and recovery notification payloads across all connections and monitor types. When set to ISO, timestamps use the format yyyy-MM-dd HH:mm:ss z. When set to LEGACY, timestamps use the format MM/dd/yyyy hh:mm:ss a z.

UPDATE sumologic.policies.timestamp_format
SET
timestamp_format = '{{ timestamp_format }}'
WHERE
region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
AND timestamp_format = '{{ timestamp_format }}' --required
RETURNING
timestamp_format;