Package com.azure.ai.contentsafety
Class BlocklistAsyncClient
java.lang.Object
com.azure.ai.contentsafety.BlocklistAsyncClient
Initializes a new instance of the asynchronous BlocklistClient type.
-
Method Summary
Modifier and TypeMethodDescriptionaddOrUpdateBlocklistItems(String name, AddOrUpdateTextBlocklistItemsOptions options) Add or update BlocklistItems To Text Blocklist Add or update blocklistItems to a text blocklist.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> addOrUpdateBlocklistItemsWithResponse(String name, com.azure.core.util.BinaryData options, com.azure.core.http.rest.RequestOptions requestOptions) Add or update BlocklistItems To Text Blocklist Add or update blocklistItems to a text blocklist.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> createOrUpdateTextBlocklistWithResponse(String name, com.azure.core.util.BinaryData options, com.azure.core.http.rest.RequestOptions requestOptions) Create Or Update Text Blocklist Updates a text blocklist.deleteTextBlocklist(String name) Delete Text Blocklist By blocklistName Deletes a text blocklist.deleteTextBlocklistWithResponse(String name, com.azure.core.http.rest.RequestOptions requestOptions) Delete Text Blocklist By blocklistName Deletes a text blocklist.getTextBlocklist(String name) Get Text Blocklist By blocklistName Returns text blocklist details.getTextBlocklistItem(String name, String blocklistItemId) Get BlocklistItem By blocklistName And blocklistItemId Get blocklistItem by blocklistName and blocklistItemId from a text blocklist.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getTextBlocklistItemWithResponse(String name, String blocklistItemId, com.azure.core.http.rest.RequestOptions requestOptions) Get BlocklistItem By blocklistName And blocklistItemId Get blocklistItem by blocklistName and blocklistItemId from a text blocklist.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getTextBlocklistWithResponse(String name, com.azure.core.http.rest.RequestOptions requestOptions) Get Text Blocklist By blocklistName Returns text blocklist details.com.azure.core.http.rest.PagedFlux<TextBlocklistItem> listTextBlocklistItems(String name) Get All BlocklistItems By blocklistName Get all blocklistItems in a text blocklist.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listTextBlocklistItems(String name, com.azure.core.http.rest.RequestOptions requestOptions) Get All BlocklistItems By blocklistName Get all blocklistItems in a text blocklist.com.azure.core.http.rest.PagedFlux<TextBlocklistItem> listTextBlocklistItems(String name, Integer top, Integer skip) Get All BlocklistItems By blocklistName Get all blocklistItems in a text blocklist.com.azure.core.http.rest.PagedFlux<TextBlocklist> Get All Text Blocklists Get all text blocklists details.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listTextBlocklists(com.azure.core.http.rest.RequestOptions requestOptions) Get All Text Blocklists Get all text blocklists details.removeBlocklistItems(String name, RemoveTextBlocklistItemsOptions options) Remove BlocklistItems From Text Blocklist Remove blocklistItems from a text blocklist.removeBlocklistItemsWithResponse(String name, com.azure.core.util.BinaryData options, com.azure.core.http.rest.RequestOptions requestOptions) Remove BlocklistItems From Text Blocklist Remove blocklistItems from a text blocklist.
-
Method Details
-
addOrUpdateBlocklistItemsWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> addOrUpdateBlocklistItemsWithResponse(String name, com.azure.core.util.BinaryData options, com.azure.core.http.rest.RequestOptions requestOptions) Add or update BlocklistItems To Text Blocklist Add or update blocklistItems to a text blocklist. You can add or update at most 100 blocklistItems in one request.Request Body Schema
{ blocklistItems (Required): [ (Required){ blocklistItemId: String (Required) description: String (Optional) text: String (Required) } ] }Response Body Schema
{ blocklistItems (Required): [ (Required){ blocklistItemId: String (Required) description: String (Optional) text: String (Required) } ] }- Parameters:
name- Text blocklist name.options- Options for adding or updating blocklist items.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the response of adding blocklistItems to the text blocklist along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
createOrUpdateTextBlocklistWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> createOrUpdateTextBlocklistWithResponse(String name, com.azure.core.util.BinaryData options, com.azure.core.http.rest.RequestOptions requestOptions) Create Or Update Text Blocklist Updates a text blocklist. If the blocklistName does not exist, a new blocklist will be created.Request Body Schema
{ blocklistName: String (Required) description: String (Optional) }Response Body Schema
{ blocklistName: String (Required) description: String (Optional) }- Parameters:
name- Text blocklist name.options- The resource instance.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- text Blocklist along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
deleteTextBlocklistWithResponse
public Mono<com.azure.core.http.rest.Response<Void>> deleteTextBlocklistWithResponse(String name, com.azure.core.http.rest.RequestOptions requestOptions) Delete Text Blocklist By blocklistName Deletes a text blocklist.- Parameters:
name- Text blocklist name.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
getTextBlocklistWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getTextBlocklistWithResponse(String name, com.azure.core.http.rest.RequestOptions requestOptions) Get Text Blocklist By blocklistName Returns text blocklist details.Response Body Schema
{ blocklistName: String (Required) description: String (Optional) }- Parameters:
name- Text blocklist name.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- text Blocklist along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
getTextBlocklistItemWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getTextBlocklistItemWithResponse(String name, String blocklistItemId, com.azure.core.http.rest.RequestOptions requestOptions) Get BlocklistItem By blocklistName And blocklistItemId Get blocklistItem by blocklistName and blocklistItemId from a text blocklist.Response Body Schema
{ blocklistItemId: String (Required) description: String (Optional) text: String (Required) }- Parameters:
name- Text blocklist name.blocklistItemId- The service will generate a BlocklistItemId, which will be a UUID.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- blocklistItem by blocklistName and blocklistItemId from a text blocklist along with
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
listTextBlocklistItems
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listTextBlocklistItems(String name, com.azure.core.http.rest.RequestOptions requestOptions) Get All BlocklistItems By blocklistName Get all blocklistItems in a text blocklist.Query Parameters
You can add these to a request withQuery Parameters Name Type Required Description top Integer No The number of result items to return. skip Integer No The number of result items to skip. maxpagesize Integer No The maximum number of result items per page. RequestOptions.addQueryParam(java.lang.String, java.lang.String)Response Body Schema
{ blocklistItemId: String (Required) description: String (Optional) text: String (Required) }- Parameters:
name- Text blocklist name.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- all blocklistItems in a text blocklist as paginated response with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
listTextBlocklists
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listTextBlocklists(com.azure.core.http.rest.RequestOptions requestOptions) Get All Text Blocklists Get all text blocklists details.Response Body Schema
{ blocklistName: String (Required) description: String (Optional) }- Parameters:
requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- all text blocklists details as paginated response with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
removeBlocklistItemsWithResponse
public Mono<com.azure.core.http.rest.Response<Void>> removeBlocklistItemsWithResponse(String name, com.azure.core.util.BinaryData options, com.azure.core.http.rest.RequestOptions requestOptions) Remove BlocklistItems From Text Blocklist Remove blocklistItems from a text blocklist. You can remove at most 100 BlocklistItems in one request.Request Body Schema
{ blocklistItemIds (Required): [ String (Required) ] }- Parameters:
name- Text blocklist name.options- Options for removing blocklist items.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
Responseon successful completion ofMono. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.
-
addOrUpdateBlocklistItems
public Mono<AddOrUpdateTextBlocklistItemsResult> addOrUpdateBlocklistItems(String name, AddOrUpdateTextBlocklistItemsOptions options) Add or update BlocklistItems To Text Blocklist Add or update blocklistItems to a text blocklist. You can add or update at most 100 blocklistItems in one request.- Parameters:
name- Text blocklist name.options- Options for adding or updating blocklist items.- Returns:
- the response of adding blocklistItems to the text blocklist on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteTextBlocklist
Delete Text Blocklist By blocklistName Deletes a text blocklist.- Parameters:
name- Text blocklist name.- Returns:
- A
Monothat completes when a successful response is received. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getTextBlocklist
Get Text Blocklist By blocklistName Returns text blocklist details.- Parameters:
name- Text blocklist name.- Returns:
- text Blocklist on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getTextBlocklistItem
Get BlocklistItem By blocklistName And blocklistItemId Get blocklistItem by blocklistName and blocklistItemId from a text blocklist.- Parameters:
name- Text blocklist name.blocklistItemId- The service will generate a BlocklistItemId, which will be a UUID.- Returns:
- blocklistItem by blocklistName and blocklistItemId from a text blocklist on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listTextBlocklistItems
public com.azure.core.http.rest.PagedFlux<TextBlocklistItem> listTextBlocklistItems(String name, Integer top, Integer skip) Get All BlocklistItems By blocklistName Get all blocklistItems in a text blocklist.- Parameters:
name- Text blocklist name.top- The number of result items to return.skip- The number of result items to skip.- Returns:
- all blocklistItems in a text blocklist as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listTextBlocklistItems
Get All BlocklistItems By blocklistName Get all blocklistItems in a text blocklist.- Parameters:
name- Text blocklist name.- Returns:
- all blocklistItems in a text blocklist as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listTextBlocklists
Get All Text Blocklists Get all text blocklists details.- Returns:
- all text blocklists details as paginated response with
PagedFlux. - Throws:
com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
removeBlocklistItems
Remove BlocklistItems From Text Blocklist Remove blocklistItems from a text blocklist. You can remove at most 100 BlocklistItems in one request.- Parameters:
name- Text blocklist name.options- Options for removing blocklist items.- Returns:
- A
Monothat completes when a successful response is received. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-