assets
Creates, updates, deletes, gets or lists an assets resource.
Overview
| Name | assets |
| Type | Resource |
| Id | aws.devops_agent.assets |
Fields
The following fields are returned by SELECT queries:
- get_asset
- list_assets
| Name | Datatype | Description |
|---|---|---|
asset_id | string | The unique identifier for this asset (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
asset_type | string | The type of asset (e.g. skill, artifact) |
created_at | string (date-time) | Timestamp when this asset was created |
metadata | object | The metadata for this asset |
updated_at | string (date-time) | Timestamp when this asset was last updated |
version | integer | The version number of this asset |
| Name | Datatype | Description |
|---|---|---|
asset_id | string | The unique identifier for this asset (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
asset_type | string | The type of asset (e.g. skill, artifact) |
created_at | string (date-time) | Timestamp when this asset was created |
metadata | object | The metadata for this asset |
updated_at | string (date-time) | Timestamp when this asset was last updated |
version | integer | The version number of this asset |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_asset | select | agent_space_id, asset_id, region | assetVersion | Gets an asset from the specified agent space |
list_assets | select | agent_space_id, region | assetType, updatedAfter, updatedBefore, nextToken, maxResults | Lists assets in the specified agent space |
create_asset | insert | agent_space_id, region, assetType, content | Creates a new asset in the specified agent space | |
update_asset | update | agent_space_id, asset_id, region | Updates an asset in the specified agent space | |
delete_asset | delete | agent_space_id, asset_id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
agent_space_id | string | The unique identifier for the agent space containing the asset |
asset_id | string | The unique identifier of the asset to delete |
region | string | AWS region (default: us-east-1) |
assetType | string | Filter results to only assets of this type |
assetVersion | integer | The specific version of the asset to retrieve. If omitted, the latest version is returned. |
maxResults | integer | The maximum number of results to return in a single response |
nextToken | string | Pagination token from a previous response to retrieve the next page of results |
updatedAfter | string (date-time) | Filter results to only assets updated after this timestamp |
updatedBefore | string (date-time) | Filter results to only assets updated before this timestamp |
SELECT examples
- get_asset
- list_assets
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 }}'
;
Lists assets in 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 region = '{{ region }}' -- required
AND assetType = '{{ assetType }}'
AND updatedAfter = '{{ updatedAfter }}'
AND updatedBefore = '{{ updatedBefore }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_asset
- Manifest
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
;
# Description fields are for documentation purposes
- name: assets
props:
- name: agent_space_id
value: "{{ agent_space_id }}"
description: Required parameter for the assets resource.
- name: region
value: "{{ region }}"
description: Required parameter for the assets resource.
- name: assetType
value: "{{ assetType }}"
description: |
The type of asset (e.g. skill, artifact)
- name: metadata
value: "{{ metadata }}"
- name: content
description: |
Content for an asset: a single file, a zip bundle, or a source URL to import from
value:
file:
path: "{{ path }}"
body:
bytes: "{{ bytes }}"
text: "{{ text }}"
metadata: "{{ metadata }}"
zip:
zipFile: "{{ zipFile }}"
sourceUrl:
url: "{{ url }}"
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_asset
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
- delete_asset
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
;