RaiBlocklistItemsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
CognitiveServicesManagementClient's
<xref:rai_blocklist_items> attribute.
Constructor
RaiBlocklistItemsOperations(*args, **kwargs)
Methods
| batch_add |
Batch operation to add blocklist items. |
| batch_delete |
Batch operation to delete blocklist items. |
| begin_delete |
Deletes the specified blocklist Item associated with the custom blocklist. |
| create_or_update |
Update the state of specified blocklist item associated with the Azure OpenAI account. |
| get |
Gets the specified custom blocklist Item associated with the custom blocklist. |
| list |
Gets the blocklist items associated with the custom blocklist. |
batch_add
Batch operation to add blocklist items.
batch_add(resource_group_name: str, account_name: str, rai_blocklist_name: str, rai_blocklist_items: List[_models.RaiBlocklistItemBulkRequest], *, content_type: str = 'application/json', **kwargs: Any) -> _models.RaiBlocklist
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
account_name
Required
|
The name of Cognitive Services account. Required. |
|
rai_blocklist_name
Required
|
The name of the RaiBlocklist associated with the Cognitive Services Account. Required. |
|
rai_blocklist_items
Required
|
Properties describing the custom blocklist items. Is either a [RaiBlocklistItemBulkRequest] type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
RaiBlocklist or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
batch_delete
Batch operation to delete blocklist items.
batch_delete(resource_group_name: str, account_name: str, rai_blocklist_name: str, rai_blocklist_items_names: MutableMapping[str, Any], **kwargs: Any) -> None
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
account_name
Required
|
The name of Cognitive Services account. Required. |
|
rai_blocklist_name
Required
|
The name of the RaiBlocklist associated with the Cognitive Services Account. Required. |
|
rai_blocklist_items_names
Required
|
<xref:JSON>
List of RAI Blocklist Items Names. Required. |
Returns
| Type | Description |
|---|---|
|
None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
begin_delete
Deletes the specified blocklist Item associated with the custom blocklist.
begin_delete(resource_group_name: str, account_name: str, rai_blocklist_name: str, rai_blocklist_item_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
account_name
Required
|
The name of Cognitive Services account. Required. |
|
rai_blocklist_name
Required
|
The name of the RaiBlocklist associated with the Cognitive Services Account. Required. |
|
rai_blocklist_item_name
Required
|
The name of the RaiBlocklist Item associated with the custom blocklist. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns either None or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
create_or_update
Update the state of specified blocklist item associated with the Azure OpenAI account.
create_or_update(resource_group_name: str, account_name: str, rai_blocklist_name: str, rai_blocklist_item_name: str, rai_blocklist_item: _models.RaiBlocklistItem, *, content_type: str = 'application/json', **kwargs: Any) -> _models.RaiBlocklistItem
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
account_name
Required
|
The name of Cognitive Services account. Required. |
|
rai_blocklist_name
Required
|
The name of the RaiBlocklist associated with the Cognitive Services Account. Required. |
|
rai_blocklist_item_name
Required
|
The name of the RaiBlocklist Item associated with the custom blocklist. Required. |
|
rai_blocklist_item
Required
|
Properties describing the custom blocklist. Is either a RaiBlocklistItem type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
RaiBlocklistItem or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
get
Gets the specified custom blocklist Item associated with the custom blocklist.
get(resource_group_name: str, account_name: str, rai_blocklist_name: str, rai_blocklist_item_name: str, **kwargs: Any) -> RaiBlocklistItem
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
account_name
Required
|
The name of Cognitive Services account. Required. |
|
rai_blocklist_name
Required
|
The name of the RaiBlocklist associated with the Cognitive Services Account. Required. |
|
rai_blocklist_item_name
Required
|
The name of the RaiBlocklist Item associated with the custom blocklist. Required. |
Returns
| Type | Description |
|---|---|
|
RaiBlocklistItem or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list
Gets the blocklist items associated with the custom blocklist.
list(resource_group_name: str, account_name: str, rai_blocklist_name: str, **kwargs: Any) -> ItemPaged[RaiBlocklistItem]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
account_name
Required
|
The name of Cognitive Services account. Required. |
|
rai_blocklist_name
Required
|
The name of the RaiBlocklist associated with the Cognitive Services Account. Required. |
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either RaiBlocklistItem or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
Attributes
models
models = <module 'azure.mgmt.cognitiveservices.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv86\\Lib\\site-packages\\azure\\mgmt\\cognitiveservices\\models\\__init__.py'>