Share via


IndexesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

AIProjectClient's

<xref:indexes> attribute.

Constructor

IndexesOperations(*args, **kwargs)

Methods

create_or_update

Create a new or update an existing Index with the given version id.

delete

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.

get

Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist.

list

List the latest version of each Index.

list_versions

List all versions of the given Index.

create_or_update

Create a new or update an existing Index with the given version id.

create_or_update(name: str, version: str, index: _models.Index, *, content_type: str = 'application/merge-patch+json', **kwargs: Any) -> _models.Index

Parameters

Name Description
name
Required
str

The name of the resource. Required.

version
Required
str

The specific version id of the Index to create or update. Required.

index
Required
Index or <xref:JSON> or IO[bytes]

The Index to create or update. Is one of the following types: Index, JSON, IO[bytes] Required.

Returns

Type Description

Index. The Index is compatible with MutableMapping

Exceptions

Type Description

delete

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(name: str, version: str, **kwargs: Any) -> None

Parameters

Name Description
name
Required
str

The name of the resource. Required.

version
Required
str

The version of the Index to delete. Required.

Returns

Type Description

None

Exceptions

Type Description

get

Get the specific version of the Index. The service returns 404 Not Found error if the Index does not exist.

get(name: str, version: str, **kwargs: Any) -> Index

Parameters

Name Description
name
Required
str

The name of the resource. Required.

version
Required
str

The specific version id of the Index to retrieve. Required.

Returns

Type Description

Index. The Index is compatible with MutableMapping

Exceptions

Type Description

list

List the latest version of each Index.

list(**kwargs: Any) -> ItemPaged[Index]

Returns

Type Description

An iterator like instance of Index

Exceptions

Type Description

list_versions

List all versions of the given Index.

list_versions(name: str, **kwargs: Any) -> ItemPaged[Index]

Parameters

Name Description
name
Required
str

The name of the resource. Required.

Returns

Type Description

An iterator like instance of Index

Exceptions

Type Description