diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json index 8dce807da01d..b5988fc4f27a 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json @@ -58,11 +58,11 @@ "description": "The name of Cognitive Services account." }, { - "name": "parameters", + "name": "account", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/CognitiveServicesAccountCreateParameters" + "$ref": "#/definitions/CognitiveServicesAccount" }, "description": "The parameters to provide for the created account." }, @@ -124,12 +124,11 @@ "description": "The name of Cognitive Services account." }, { - "name": "parameters", + "name": "account", "in": "body", "required": true, - "x-ms-client-flatten": true, "schema": { - "$ref": "#/definitions/CognitiveServicesAccountUpdateParameters" + "$ref": "#/definitions/CognitiveServicesAccount" }, "description": "The parameters to provide for the created account." }, @@ -638,7 +637,7 @@ "tags": [ "CognitiveServicesAccounts" ], - "operationId": "CheckSkuAvailability_List", + "operationId": "CheckSkuAvailability", "description": "Check available SKUs.", "x-ms-examples": { "Check SKU Availability": { @@ -718,64 +717,10 @@ } }, "definitions": { - "CognitiveServicesAccountCreateParameters": { - "properties": { - "sku": { - "$ref": "#/definitions/Sku", - "description": "Required. Gets or sets the SKU of the resource." - }, - "kind": { - "$ref": "#/definitions/CognitiveServicesAccountKind", - "description": "Required. Gets or sets the Kind of the resource." - }, - "location": { - "type": "string", - "description": "Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update the request will succeed." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters." - }, - "properties": { - "type": "object", - "description": "Must exist in the request. Must be an empty object. Must not be null." - } - }, - "required": [ - "sku", - "kind", - "location", - "properties" - ], - "description": "The parameters to provide for the account." - }, "CognitiveServicesAccountKind": { "type": "string", "description": "Required. Indicates the type of cognitive service account." }, - "CognitiveServicesAccountUpdateParameters": { - "properties": { - "sku": { - "$ref": "#/definitions/Sku", - "description": "Gets or sets the SKU of the resource." - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters." - }, - "properties": { - "type": "object", - "description": "Additional properties for Account. Only provided fields will be updated." - } - }, - "description": "The parameters to provide for the account." - }, "Sku": { "properties": { "name": { @@ -812,7 +757,8 @@ "properties": { "etag": { "type": "string", - "description": "Entity Tag" + "description": "Entity Tag", + "readOnly": true }, "id": { "type": "string", @@ -820,8 +766,8 @@ "readOnly": true }, "kind": { - "type": "string", - "description": "Type of cognitive service account." + "$ref": "#/definitions/CognitiveServicesAccountKind", + "description": "The Kind of the resource." }, "location": { "type": "string", @@ -833,7 +779,6 @@ "readOnly": true }, "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/CognitiveServicesAccountProperties", "description": "Properties of Cognitive Services account." }, @@ -894,11 +839,13 @@ }, "endpoint": { "type": "string", - "description": "Endpoint of the created account." + "description": "Endpoint of the created account.", + "readOnly": true }, "internalId": { "type": "string", - "description": "The internal identifier." + "description": "The internal identifier.", + "readOnly": true }, "customSubDomainName": { "type": "string", @@ -907,10 +854,39 @@ "networkAcls": { "$ref": "#/definitions/NetworkRuleSet", "description": "A collection of rules governing the accessibility from specific network locations." + }, + "apiProperties": { + "$ref": "#/definitions/CognitiveServicesAccountApiProperties", + "description": "The api properties for special APIs." } }, "description": "Properties of Cognitive Services account." }, + "CognitiveServicesAccountApiProperties": { + "properties": { + "qnaRuntimeEndpoint": { + "type": "string", + "description": "(QnAMaker Only) The runtime endpoint of QnAMaker." + }, + "statisticsEnabled": { + "type": "boolean", + "description": "(Bing Search Only) The flag to enable statistics of Bing Search." + }, + "eventHubConnectionString": { + "type": "string", + "description": "(Personalization Only) The flag to enable statistics of Bing Search.", + "pattern": "^( *)Endpoint=sb://(.*);( *)SharedAccessKeyName=(.*);( *)SharedAccessKey=(.*)$", + "maxLength": 1000 + }, + "storageAccountConnectionString": { + "type": "string", + "description": "(Personalization Only) The storage account connection string.", + "pattern": "^(( *)DefaultEndpointsProtocol=(http|https)( *);( *))?AccountName=(.*)AccountKey=(.*)EndpointSuffix=(.*)$", + "maxLength": 1000 + } + }, + "description": "The api properties for special APIs." + }, "CognitiveServicesAccountKeys": { "properties": { "key1": { @@ -1383,18 +1359,6 @@ }, "NetworkRuleSet": { "properties": { - "bypass": { - "type": "string", - "description": "Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'.", - "enum": [ - "AzureServices", - "None" - ], - "x-ms-enum": { - "name": "NetworkRuleBypassOptions", - "modelAsString": true - } - }, "defaultAction": { "type": "string", "description": "The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.", diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/CreateAccount.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/CreateAccount.json index a03d569cebb0..0fb6620ac0c8 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/CreateAccount.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/CreateAccount.json @@ -4,7 +4,7 @@ "subscriptionId": "f9b96b36-1f5e-4021-8959-51527e26e6d3", "resourceGroupName": "felixwa-01", "accountName": "testCreate1", - "parameters": { + "account": { "location": "West US", "kind": "Emotion", "sku": { diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/UpdateAccount.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/UpdateAccount.json index 85ccd6e423c5..5202d73879af 100644 --- a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/UpdateAccount.json +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/UpdateAccount.json @@ -4,7 +4,7 @@ "subscriptionId": "f9b96b36-1f5e-4021-8959-51527e26e6d3", "resourceGroupName": "bvttest", "accountName": "bingSearch", - "parameters": { + "account": { "sku": { "name": "S2" }