Skip to content

Commit

Permalink
Cognitive Services 2024-04-01-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
tianxin-ms committed Mar 29, 2024
1 parent 0a714ec commit 4eac467
Show file tree
Hide file tree
Showing 6 changed files with 526 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2523,6 +2523,126 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/addRaiBlocklistItems": {
"post": {
"tags": [
"RaiBlocklists"
],
"operationId": "RaiBlocklistItems_Add",
"description": "Batch operation to add blocklist items.",
"x-ms-examples": {
"AddRaiBlocklistItems": {
"$ref": "./examples/AddRaiBlocklistItems.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/raiBlocklistNameParameter"
},
{
"name": "raiBlocklistItems",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RaiBlocklistItems"
},
"description": "Properties describing the custom blocklist."
}
],
"responses": {
"200": {
"description": "Added the blocklist Items successfully.",
"schema": {
"$ref": "#/definitions/RaiBlockListResult"
}
},
"201": {
"description": "Added the blocklist Items successfully.",
"schema": {
"$ref": "#/definitions/RaiBlockListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/raiBlocklists/{raiBlocklistName}/deleteRaiBlocklistItems": {
"post": {
"tags": [
"RaiBlocklists"
],
"operationId": "RaiBlocklistItems_Delete",
"description": "Batch operation to delete blocklist items.",
"x-ms-examples": {
"DeleteRaiBlocklistItems": {
"$ref": "./examples/DeleteRaiBlocklistItems.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/raiBlocklistNameParameter"
},
{
"name": "raiBlocklistItemsNames",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RaiBlocklistItemsRequestBody"
},
"description": "List of RAI Blocklist Items Names."
}
],
"responses": {
"200": {
"description": "Added the blocklist Items successfully.",
"schema": {
"$ref": "#/definitions/RaiBlockListResult"
}
},
"201": {
"description": "Added the blocklist Items successfully.",
"schema": {
"$ref": "#/definitions/RaiBlockListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/raiContentFilters": {
"get": {
"tags": [
Expand Down Expand Up @@ -3066,6 +3186,167 @@
"final-state-via": "location"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/defenderForAISettings/{defenderForAISettingName}": {
"get": {
"tags": [
"DefenderForAISettings"
],
"operationId": "DefenderForAISettings_Get",
"description": "Gets the specified Defender for AI setting by name.",
"x-ms-examples": {
"GetDefenderForAISetting": {
"$ref": "./examples/GetDefenderForAISetting.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/defenderForAISettingNameParameter"
}
],
"responses": {
"200": {
"description": "OK -- Get the defender setting name successfully.",
"schema": {
"$ref": "#/definitions/DefinderForAISetting"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"DefenderForAISettings"
],
"operationId": "DefenderForAISettings_CreateOrUpdate",
"description": "Creates or Updates the specified Defender for AI setting.",
"x-ms-examples": {
"PutDefenderForAISetting": {
"$ref": "./examples/PutDefenderForAISetting.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/defenderForAISettingNameParameter"
},
{
"name": "defenderForAISettings",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DefinderForAISetting"
},
"description": "Properties describing the Defender for AI setting."
}
],
"responses": {
"200": {
"description": "Created/updated the Defender for AI setting successfully.",
"schema": {
"$ref": "#/definitions/DefinderForAISetting"
}
},
"201": {
"description": "Created/updated the Defender for AI setting successfully.",
"schema": {
"$ref": "#/definitions/DefinderForAISetting"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"DefenderForAISettings"
],
"operationId": "DefenderForAISettings_Update",
"description": "Updates the specified Defender for AI setting.",
"x-ms-examples": {
"UpdateDefenderForAISetting": {
"$ref": "./examples/UpdateDefenderForAISetting.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/accountNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/defenderForAISettingNameParameter"
},
{
"name": "defenderForAISettings",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DefinderForAISetting"
},
"description": "Properties describing the Defender for AI setting."
}
],
"responses": {
"200": {
"description": "Updated the Defender for AI setting successfully.",
"schema": {
"$ref": "#/definitions/DefinderForAISetting"
}
},
"201": {
"description": "Updated the Defender for AI setting successfully.",
"schema": {
"$ref": "#/definitions/DefinderForAISetting"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -5445,6 +5726,23 @@
},
"description": "The list of cognitive services RAI Blocklist Items."
},
"RaiBlocklistItems": {
"description": "The list of Cognitive Services RaiBlocklist Items.",
"type": "array",
"items": {
"$ref": "#/definitions/RaiBlocklistItem"
},
"x-ms-identifiers": [
"name"
]
},
"RaiBlocklistItemsRequestBody": {
"description": "The list of Cognitive Services RaiBlocklist Items Names.",
"type": "object",
"items": {
"type": "string"
}
},
"RaiBlocklistItem": {
"description": "Cognitive Services RaiBlocklist Item.",
"type": "object",
Expand Down Expand Up @@ -5652,6 +5950,60 @@
}
}
}
},
"DefinderForAISetting": {
"type": "object",
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource"
}
],
"properties": {
"systemData": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
"readOnly": true
},
"etag": {
"type": "string",
"readOnly": true,
"description": "Resource Etag."
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-ms-mutability": [
"read",
"create",
"update"
],
"description": "Resource tags."
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/DefenderForAISettingProperties"
}
},
"description": "The Defender for AI resource."
},
"DefenderForAISettingProperties": {
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"Disabled",
"Enabled"
],
"x-ms-enum": {
"name": "DefenderForAISettingState",
"modelAsString": true
},
"description": "Defender for AI state on the AI resource."
}
},
"description": "The Defender for AI resource properties."
}
},
"parameters": {
Expand Down Expand Up @@ -5759,6 +6111,15 @@
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$",
"description": "The name of the encryptionScope associated with the Cognitive Services Account",
"x-ms-parameter-location": "method"
},
"defenderForAISettingNameParameter": {
"name": "defenderForAISettingName",
"in": "path",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$",
"description": "The name of the defender for AI setting.",
"x-ms-parameter-location": "method"
}
}
}
Loading

0 comments on commit 4eac467

Please sign in to comment.