indexes
Creates, updates, deletes, gets or lists an indexes resource.
Overview
| Name | indexes |
| Type | Resource |
| Id | azure.ai_projects.indexes |
Fields
The following fields are returned by SELECT queries:
- get
- list_versions
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Asset ID, a unique identifier for the asset. |
name | string | The name of the resource. Required. |
description | string | The asset description text. |
tags | object | Tag dictionary. Tags can be added, removed, and updated. |
type | string | Type of index. Required. Known values are: "AzureSearch", "CosmosDBNoSqlVectorStore", and "ManagedAzureSearch". |
version | string | The version of the resource. Required. |
| Name | Datatype | Description |
|---|---|---|
id | string | Asset ID, a unique identifier for the asset. |
name | string | The name of the resource. Required. |
description | string | The asset description text. |
tags | object | Tag dictionary. Tags can be added, removed, and updated. |
type | string | Type of index. Required. Known values are: "AzureSearch", "CosmosDBNoSqlVectorStore", and "ManagedAzureSearch". |
version | string | The version of the resource. Required. |
| Name | Datatype | Description |
|---|---|---|
id | string | Asset ID, a unique identifier for the asset. |
name | string | The name of the resource. Required. |
description | string | The asset description text. |
tags | object | Tag dictionary. Tags can be added, removed, and updated. |
type | string | Type of index. Required. Known values are: "AzureSearch", "CosmosDBNoSqlVectorStore", and "ManagedAzureSearch". |
version | string | The version of the resource. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name, version, endpoint | Get a version. Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist. | |
list_versions | select | name, endpoint | List versions. List all versions of the given Index. | |
list | select | endpoint | List latest versions. List the latest version of each Index. | |
create_or_update | insert | name, version, endpoint, type | Create or update a version. Create a new or update an existing Index with the given version id. | |
create_or_update | replace | name, version, endpoint, type | Create or update a version. Create a new or update an existing Index with the given version id. | |
delete | delete | name, version, endpoint | Delete a version. Delete the specific version of the Index. The service returns 204 No Content if the Index was deleted successfully or if the Index does not exist. |
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 |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
name | string | The name of the resource. Required. |
version | string | The version of the Index to delete. Required. |
SELECT examples
- get
- list_versions
- list
Get a version. Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist.
SELECT
id,
name,
description,
tags,
type,
version
FROM azure.ai_projects.indexes
WHERE name = '{{ name }}' -- required
AND version = '{{ version }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
List versions. List all versions of the given Index.
SELECT
id,
name,
description,
tags,
type,
version
FROM azure.ai_projects.indexes
WHERE name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
List latest versions. List the latest version of each Index.
SELECT
id,
name,
description,
tags,
type,
version
FROM azure.ai_projects.indexes
WHERE endpoint = '{{ endpoint }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create or update a version. Create a new or update an existing Index with the given version id.
INSERT INTO azure.ai_projects.indexes (
type,
description,
tags,
name,
version,
endpoint
)
SELECT
'{{ type }}' /* required */,
'{{ description }}',
'{{ tags }}',
'{{ name }}',
'{{ version }}',
'{{ endpoint }}'
RETURNING
id,
name,
description,
tags,
type,
version
;
# Description fields are for documentation purposes
- name: indexes
props:
- name: name
value: "{{ name }}"
description: Required parameter for the indexes resource.
- name: version
value: "{{ version }}"
description: Required parameter for the indexes resource.
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the indexes resource.
- name: type
value: "{{ type }}"
description: |
Type of index. Required. Known values are: "AzureSearch", "CosmosDBNoSqlVectorStore", and "ManagedAzureSearch".
- name: description
value: "{{ description }}"
description: |
The asset description text.
- name: tags
value: "{{ tags }}"
description: |
Tag dictionary. Tags can be added, removed, and updated.
REPLACE examples
- create_or_update
Create or update a version. Create a new or update an existing Index with the given version id.
REPLACE azure.ai_projects.indexes
SET
type = '{{ type }}',
description = '{{ description }}',
tags = '{{ tags }}'
WHERE
name = '{{ name }}' --required
AND version = '{{ version }}' --required
AND endpoint = '{{ endpoint }}' --required
AND type = '{{ type }}' --required
RETURNING
id,
name,
description,
tags,
type,
version;
DELETE examples
- delete
Delete a version. Delete the specific version of the Index. The service returns 204 No Content if the Index was deleted successfully or if the Index does not exist.
DELETE FROM azure.ai_projects.indexes
WHERE name = '{{ name }}' --required
AND version = '{{ version }}' --required
AND endpoint = '{{ endpoint }}' --required
;