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 22fe04767512..e79fb409b218 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 @@ -675,6 +675,49 @@ } } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkDomainAvailability": { + "post": { + "tags": [ + "CognitiveServicesAccounts" + ], + "operationId": "Locations_CheckDomainAvailabilityPost", + "description": "Check available SKUs.", + "x-ms-examples": { + "Check Domain Availability": { + "$ref": "./examples/CheckDomainAvailability.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/locationParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "x-ms-client-flatten": true, + "schema": { + "$ref": "#/definitions/CheckDomainAvailabilityParameter" + }, + "description": "Check Domain Availability POST body." + } + ], + "responses": { + "200": { + "description": "OK.", + "schema": { + "$ref": "#/definitions/CheckDomainAvailabilityResult" + } + } + } + } } }, "definitions": { @@ -1130,6 +1173,23 @@ "type" ] }, + "CheckDomainAvailabilityParameter": { + "description": "Check Domain availability parameter.", + "properties": { + "subdomainName": { + "type": "string", + "description": "The subdomain name to use." + }, + "type": { + "type": "string", + "description": "The Type of the resource." + } + }, + "required": [ + "subdomainName", + "type" + ] + }, "CheckSkuAvailabilityResultList": { "description": "Check SKU availability result list.", "properties": { @@ -1142,6 +1202,27 @@ } } }, + "CheckDomainAvailabilityResult": { + "description": "Check Domain availability result.", + "properties": { + "isSubdomainAvailable": { + "type": "boolean", + "description": "Indicates the given SKU is available or not." + }, + "reason": { + "type": "string", + "description": "Reason why the SKU is not available." + }, + "subdomainName": { + "type": "string", + "description": "The subdomain name to use." + }, + "type": { + "type": "string", + "description": "The Type of the resource." + } + } + }, "CheckSkuAvailabilityResult": { "description": "Check SKU availability result.", "properties": { diff --git a/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/CheckDomainAvailability.json b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/CheckDomainAvailability.json new file mode 100644 index 000000000000..65fe3be46b54 --- /dev/null +++ b/specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/examples/CheckDomainAvailability.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2017-04-18", + "subscriptionId": "f9b96b36-1f5e-4021-8959-51527e26e6d3", + "location": "westus", + "parameters": { + "subdomainName": "contosodemoapp1", + "type": "Microsoft.CognitiveServices/accounts" + } + }, + "responses": { + "200": { + "body": { + "isSubdomainAvailable": false, + "reason": "Sub domain name 'contosodemoapp1' is not valid", + "subdomainName": "contosodemoapp1", + "type": "Microsoft.CognitiveServices/accounts" + } + } + } +}