Skip to main content

triggers

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

Overview

Nametriggers
TypeResource
Idaws.devops_agent.triggers

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
actionobjectAction a Trigger performs when it fires
agent_space_idstringUnique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters) (pattern: <code>[a-zA-Z0-9-]{1,64}</code>)
conditionobjectDefines the firing condition for a Trigger
created_atstring (date-time)Timestamp when this Trigger was created
statusstringThe status of a Trigger
trigger_idstringGeneric resource identifier (allows alphanumeric characters, hyphens, and underscores; 1-128 characters) (pattern: <code>[a-zA-Z0-9_.-]+</code>)
type_stringHow a Trigger is fired
updated_atstring (date-time)Timestamp when this Trigger was last updated

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_triggerselectagent_space_id, trigger_id, regionGets a Trigger from the specified agent space
list_triggersselectagent_space_id, regionstatus, nextToken, maxResultsLists Triggers in the specified agent space
create_triggerinsertagent_space_id, region, type, condition, actionCreates a new Trigger in the specified agent space
update_triggerupdateagent_space_id, trigger_id, regionUpdates the status of an existing Trigger
delete_triggerdeleteagent_space_id, trigger_id, regionDeletes a Trigger from the specified agent space

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 Trigger
regionstringAWS region (default: us-east-1)
trigger_idstringThe unique identifier of the Trigger to delete
maxResultsintegerThe maximum number of results to return in a single response
nextTokenstringPagination token from a previous response to retrieve the next page of results
statusstringFilter results to Triggers in this status

SELECT examples

Gets a Trigger from the specified agent space

SELECT
action,
agent_space_id,
condition,
created_at,
status,
trigger_id,
type_,
updated_at
FROM aws.devops_agent.triggers
WHERE agent_space_id = '{{ agent_space_id }}' -- required
AND trigger_id = '{{ trigger_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new Trigger in the specified agent space

INSERT INTO aws.devops_agent.triggers (
type,
condition,
action,
status,
clientToken,
agent_space_id,
region
)
SELECT
'{{ type }}' /* required */,
'{{ condition }}' /* required */,
'{{ action }}' /* required */,
'{{ status }}',
'{{ clientToken }}',
'{{ agent_space_id }}',
'{{ region }}'
RETURNING
trigger
;

UPDATE examples

Updates the status of an existing Trigger

UPDATE aws.devops_agent.triggers
SET
status = '{{ status }}',
clientToken = '{{ clientToken }}'
WHERE
agent_space_id = '{{ agent_space_id }}' --required
AND trigger_id = '{{ trigger_id }}' --required
AND region = '{{ region }}' --required
RETURNING
trigger;

DELETE examples

Deletes a Trigger from the specified agent space

DELETE FROM aws.devops_agent.triggers
WHERE agent_space_id = '{{ agent_space_id }}' --required
AND trigger_id = '{{ trigger_id }}' --required
AND region = '{{ region }}' --required
;