timestamp_format
Creates, updates, deletes, gets or lists a timestamp_format resource.
Overview​
| Name | timestamp_format |
| Type | Resource |
| Id | sumologic.policies.timestamp_format |
Fields​
The following fields are returned by SELECT queries:
- get
The Alert Timestamp Format policy.
| Name | Datatype | Description |
|---|---|---|
timestamp_format | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | region | 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. | |
update | update | region, timestamp_format | 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. |
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) |
SELECT examples​
- get
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​
- update
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;