alert_manager_definitions
Creates, updates, deletes, gets or lists an alert_manager_definitions resource.
Overview
| Name | alert_manager_definitions |
| Type | Resource |
| Id | aws.amp.alert_manager_definitions |
Fields
The following fields are returned by SELECT queries:
- describe_alert_manager_definition
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time that the alert manager definition was created. |
data | string (byte) | The base-64 encoded blob that is alert manager definition. For details about the alert manager definition, see AlertManagedDefinitionData. |
modified_at | string (date-time) | The date and time that the alert manager definition was most recently changed. |
status | object | A structure that displays the current status of the alert manager definition.. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_alert_manager_definition | select | workspace_id, region | Retrieves the full information about the alert manager definition for a workspace. | |
create_alert_manager_definition | insert | workspace_id, region, data | The CreateAlertManagerDefinition operation creates the alert manager definition in a workspace. If a workspace already has an alert manager definition, don't use this operation to update it. Instead, use PutAlertManagerDefinition. | |
put_alert_manager_definition | replace | workspace_id, region, data | Updates an existing alert manager definition in a workspace. If the workspace does not already have an alert manager definition, don't use this operation to create it. Instead, use CreateAlertManagerDefinition. | |
delete_alert_manager_definition | delete | workspace_id, region | clientToken | Deletes the alert manager definition from a workspace. |
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 to delete the alert manager definition from. |
clientToken | string | A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. |
SELECT examples
- describe_alert_manager_definition
Retrieves the full information about the alert manager definition for a workspace.
SELECT
created_at,
data,
modified_at,
status
FROM aws.amp.alert_manager_definitions
WHERE workspace_id = '{{ workspace_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_alert_manager_definition
- Manifest
The CreateAlertManagerDefinition operation creates the alert manager definition in a workspace. If a workspace already has an alert manager definition, don't use this operation to update it. Instead, use PutAlertManagerDefinition.
INSERT INTO aws.amp.alert_manager_definitions (
data,
clientToken,
workspace_id,
region
)
SELECT
'{{ data }}' /* required */,
'{{ clientToken }}',
'{{ workspace_id }}',
'{{ region }}'
RETURNING
status
;
# Description fields are for documentation purposes
- name: alert_manager_definitions
props:
- name: workspace_id
value: "{{ workspace_id }}"
description: Required parameter for the alert_manager_definitions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the alert_manager_definitions resource.
- name: data
value: "{{ data }}"
description: |
The base-64 encoded blob that is alert manager definition. For details about the alert manager definition, see AlertManagedDefinitionData.
- name: clientToken
value: "{{ clientToken }}"
description: |
An identifier used to ensure the idempotency of a write request.
REPLACE examples
- put_alert_manager_definition
Updates an existing alert manager definition in a workspace. If the workspace does not already have an alert manager definition, don't use this operation to create it. Instead, use CreateAlertManagerDefinition.
REPLACE aws.amp.alert_manager_definitions
SET
data = '{{ data }}',
clientToken = '{{ clientToken }}'
WHERE
workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
AND data = '{{ data }}' --required
RETURNING
status;
DELETE examples
- delete_alert_manager_definition
Deletes the alert manager definition from a workspace.
DELETE FROM aws.amp.alert_manager_definitions
WHERE workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;