Skip to main content

ai_agents_templates

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

Overview​

Nameai_agents_templates
TypeResource
Idovh.public_cloud.ai_agents_templates

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringUnique identifier of the template
created_atstring (date-time)Date of the template creation (wire: createdAt)
resource_statusstringReflects the readiness of the template: READY, or DELETING on the response to its deletion (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus)
sourcestringDistinguishes built-in (code-defined) from user-authored templates (BUILTIN, USER)
target_specobjectDesired specification to replace the template with (wire: targetSpec)
updated_atstring (date-time)Date of the last template update (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselecttemplate_id, project_idThe ready-made configurations OVHcloud publishes are not returned here. They are served by the preset/template node.
listselectproject_idx_pagination_cursor, x_pagination_sizeThe ready-made configurations OVHcloud publishes are absent from this list. They are served by the preset/template node.
createinsertproject_id, target_specRegisters a reusable configuration that a later agent creation can name through targetSpec.template.id. A template stores a configuration. It runs nothing by itself. targetSpec.name must be unique within the project's namespace.
updateupdatetemplate_id, project_id, target_specReplaces the template's target spec as a whole: a field left out of the body is not preserved, and targetSpec.config is mandatory. Secrets inside that configuration read back as [REDACTED]. Send the sentinel back unchanged to keep the stored value. Configuration blocks OVHcloud reserves or does not offer are left out of a read, and a body that does not restate them drops them from the stored template. Agents already created from this template are unaffected, since a template is read once, at agent creation time.
deletedeletetemplate_id, project_idDeletion is asynchronous: the response describes the template with resourceStatus: DELETING. Agents already created from it are unaffected, since a template is read once, at agent creation time.

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
template_idstringTemplate ID (wire: templateId)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

The ready-made configurations OVHcloud publishes are not returned here. They are served by the preset/template node.

SELECT
id,
created_at,
resource_status,
source,
target_spec,
updated_at
FROM ovh.public_cloud.ai_agents_templates
WHERE template_id = '{{ template_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Registers a reusable configuration that a later agent creation can name through targetSpec.template.id. A template stores a configuration. It runs nothing by itself. targetSpec.name must be unique within the project's namespace.

INSERT INTO ovh.public_cloud.ai_agents_templates (
target_spec,
project_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ project_id }}'
RETURNING
id,
created_at,
resource_status,
source,
target_spec,
updated_at
;

UPDATE examples​

Replaces the template's target spec as a whole: a field left out of the body is not preserved, and targetSpec.config is mandatory. Secrets inside that configuration read back as [REDACTED]. Send the sentinel back unchanged to keep the stored value. Configuration blocks OVHcloud reserves or does not offer are left out of a read, and a body that does not restate them drops them from the stored template. Agents already created from this template are unaffected, since a template is read once, at agent creation time.

UPDATE ovh.public_cloud.ai_agents_templates
SET
target_spec = '{{ target_spec }}'
WHERE
template_id = '{{ template_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND target_spec = '{{ target_spec }}' --required
RETURNING
id,
created_at,
resource_status,
source,
target_spec,
updated_at;

DELETE examples​

Deletion is asynchronous: the response describes the template with resourceStatus: DELETING. Agents already created from it are unaffected, since a template is read once, at agent creation time.

DELETE FROM ovh.public_cloud.ai_agents_templates
WHERE template_id = '{{ template_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;