Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,49 @@
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkDomainAvailability": {
"post": {
"tags": [
"CognitiveServicesAccounts"
],
"operationId": "Locations_CheckDomainAvailabilityPost",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be good if we can rename operation id to Locations_CheckDomainAvailability, no need to include underneath HTTP verb in the method name

"description": "Check available SKUs.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the description correct? I thought this API is to check availability of domain name.

"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."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could say "Check Domain Availability parameter."

}
],
"responses": {
"200": {
"description": "OK.",
"schema": {
"$ref": "#/definitions/CheckDomainAvailabilityResult"
}
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}