Skip to main content

goals

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

Overview

Namegoals
TypeResource
Idaws.devops_agent.goals

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_space_arnstringThe unique identifier for the agent space containing this goal
contentobjectContent of the goal
created_atstring (date-time)Timestamp when this goal was created
evaluation_scheduleobjectGoal Schedule. Allows to schedule the goal to run periodically, as well as disable a goal temporarily
goal_idstringThe unique identifier for this goal
goal_typestringType of goal based on its origin (CUSTOMER_DEFINED, ONCALL_REPORT)
last_evaluated_atstring (date-time)Timestamp when the goal was last evaluated
last_successful_task_idstringID of the most recent successful task associated with this goal
last_task_idstringID of the most recent task associated with this goal
statusstringPossible states of a goal throughout its lifecycle (ACTIVE, PAUSED, COMPLETE)
title_stringThe title of the goal
updated_atstring (date-time)Timestamp when this goal was last updated
versionintegerVersion number for optimistic locking

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_goalsselectagent_space_id, regionLists goals in the specified agent space with optional filtering
update_goalupdateagent_space_id, goal_id, regionUpdate an existing goal

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
agent_space_idstringThe unique identifier for the agent space containing the goal
goal_idstringThe unique identifier of the goal to update
regionstringAWS region (default: us-east-1)

SELECT examples

Lists goals in the specified agent space with optional filtering

SELECT
agent_space_arn,
content,
created_at,
evaluation_schedule,
goal_id,
goal_type,
last_evaluated_at,
last_successful_task_id,
last_task_id,
status,
title_,
updated_at,
version
FROM aws.devops_agent.goals
WHERE agent_space_id = '{{ agent_space_id }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Update an existing goal

UPDATE aws.devops_agent.goals
SET
evaluationSchedule = '{{ evaluationSchedule }}',
clientToken = '{{ clientToken }}'
WHERE
agent_space_id = '{{ agent_space_id }}' --required
AND goal_id = '{{ goal_id }}' --required
AND region = '{{ region }}' --required
RETURNING
goal;