workspace_configurations
Creates, updates, deletes, gets or lists a workspace_configurations resource.
Overview
| Name | workspace_configurations |
| Type | Resource |
| Id | aws.amp.workspace_configurations |
Fields
The following fields are returned by SELECT queries:
- describe_workspace_configuration
| Name | Datatype | Description |
|---|---|---|
limits_per_label_set | array | This is an array of structures, where each structure displays one label sets for the workspace and the limits for that label set. |
out_of_order_time_window_in_seconds | integer | This field displays the out of order time window in seconds for accepting out of order samples. |
retention_period_in_days | integer | This field displays how many days that metrics are retained in the workspace. |
rule_query_offset_in_seconds | integer | This field displays the duration in seconds that rule evaluation queries are offset into the past. |
status | object | This structure displays the current status of the workspace configuration, and might also contain a reason for that status. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_workspace_configuration | select | workspace_id, region | Use this operation to return information about the configuration of a workspace. The configuration details returned include workspace configuration status, label set limits, and retention period. | |
update_workspace_configuration | update | workspace_id, region | Use this operation to create or update the label sets, label set limits, and retention period of a workspace. You must specify at least one of limitsPerLabelSet or retentionPeriodInDays for the request to be valid. |
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 | AWS region (default: us-east-1) |
workspace_id | string | The ID of the workspace that you want to update. To find the IDs of your workspaces, use the ListWorkspaces operation. |
SELECT examples
- describe_workspace_configuration
Use this operation to return information about the configuration of a workspace. The configuration details returned include workspace configuration status, label set limits, and retention period.
SELECT
limits_per_label_set,
out_of_order_time_window_in_seconds,
retention_period_in_days,
rule_query_offset_in_seconds,
status
FROM aws.amp.workspace_configurations
WHERE workspace_id = '{{ workspace_id }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- update_workspace_configuration
Use this operation to create or update the label sets, label set limits, and retention period of a workspace. You must specify at least one of limitsPerLabelSet or retentionPeriodInDays for the request to be valid.
UPDATE aws.amp.workspace_configurations
SET
clientToken = '{{ clientToken }}',
limitsPerLabelSet = '{{ limitsPerLabelSet }}',
retentionPeriodInDays = {{ retentionPeriodInDays }},
outOfOrderTimeWindowInSeconds = {{ outOfOrderTimeWindowInSeconds }},
ruleQueryOffsetInSeconds = {{ ruleQueryOffsetInSeconds }}
WHERE
workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
RETURNING
status;