Skip to main content

assets

Creates, updates, deletes, gets or lists an assets resource.

Overview

Nameassets
TypeResource
Idaws.devops_agent.assets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
asset_idstringThe unique identifier for this asset (pattern: <code>[a-zA-Z0-9_.-]+</code>)
asset_typestringThe type of asset (e.g. skill, artifact)
created_atstring (date-time)Timestamp when this asset was created
metadataobjectThe metadata for this asset
updated_atstring (date-time)Timestamp when this asset was last updated
versionintegerThe version number of this asset

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_assetselectagent_space_id, asset_id, regionassetVersionGets an asset from the specified agent space
list_assetsselectagent_space_id, regionassetType, updatedAfter, updatedBefore, nextToken, maxResultsLists assets in the specified agent space
create_assetinsertagent_space_id, region, assetType, contentCreates a new asset in the specified agent space
update_assetupdateagent_space_id, asset_id, regionUpdates an asset in the specified agent space
delete_assetdeleteagent_space_id, asset_id, regionDeletes an asset and all its files 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 asset
asset_idstringThe unique identifier of the asset to delete
regionstringAWS region (default: us-east-1)
assetTypestringFilter results to only assets of this type
assetVersionintegerThe specific version of the asset to retrieve. If omitted, the latest version is returned.
maxResultsintegerThe maximum number of results to return in a single response
nextTokenstringPagination token from a previous response to retrieve the next page of results
updatedAfterstring (date-time)Filter results to only assets updated after this timestamp
updatedBeforestring (date-time)Filter results to only assets updated before this timestamp

SELECT examples

Gets an asset from the specified agent space

SELECT
asset_id,
asset_type,
created_at,
metadata,
updated_at,
version
FROM aws.devops_agent.assets
WHERE agent_space_id = '{{ agent_space_id }}' -- required
AND asset_id = '{{ asset_id }}' -- required
AND region = '{{ region }}' -- required
AND assetVersion = '{{ assetVersion }}'
;

INSERT examples

Creates a new asset in the specified agent space

INSERT INTO aws.devops_agent.assets (
assetType,
metadata,
content,
clientToken,
agent_space_id,
region
)
SELECT
'{{ assetType }}' /* required */,
'{{ metadata }}',
'{{ content }}' /* required */,
'{{ clientToken }}',
'{{ agent_space_id }}',
'{{ region }}'
RETURNING
asset
;

UPDATE examples

Updates an asset in the specified agent space

UPDATE aws.devops_agent.assets
SET
metadata = '{{ metadata }}',
content = '{{ content }}',
clientToken = '{{ clientToken }}'
WHERE
agent_space_id = '{{ agent_space_id }}' --required
AND asset_id = '{{ asset_id }}' --required
AND region = '{{ region }}' --required
RETURNING
asset;

DELETE examples

Deletes an asset and all its files from the specified agent space

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