Skip to content

Commit

Permalink
Add custom hostname sites endpoint (#16745)
Browse files Browse the repository at this point in the history
* Add custom hostname sites endpoint

* Fix models
  • Loading branch information
calvinsID authored Nov 12, 2021
1 parent 8d7e1f2 commit c0a3d9e
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ csrs
currentbillingfeatures
currentuser
customerinsights
customhostname
customhostnames
customimages
customimagesearch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,42 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites": {
"get": {
"summary": "Get custom hostnames under this subscription",
"operationId": "ListCustomHostNameSites",
"parameters": [
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/CustomHostnameSitesCollection"
}
},
"default": {
"description": "App Service error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-examples": {
"Get custom hostnames under subscription": {
"$ref": "./examples/ListCustomHostNameSites.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations": {
"get": {
"summary": "Gets list of available geo regions plus ministamps",
Expand Down Expand Up @@ -797,6 +833,57 @@
}
}
},
"CustomHostnameSites": {
"description": "A hostname and its assigned sites",
"type": "object",
"allOf": [
{
"$ref": "./CommonDefinitions.json#/definitions/ProxyOnlyResource"
}
],
"properties": {
"properties": {
"description": "CustomHostnameSites resource specific properties",
"type": "object",
"properties": {
"customHostname": {
"type": "string"
},
"region": {
"type": "string"
},
"siteResourceIds": {
"type": "array",
"items": {
"$ref": "./CommonDefinitions.json#/definitions/Identifier"
}
}
},
"x-ms-client-flatten": true
}
}
},
"CustomHostnameSitesCollection": {
"description": "Collection of custom hostname sites",
"required": [
"value"
],
"type": "object",
"properties": {
"value": {
"description": "Collection of resources.",
"type": "array",
"items": {
"$ref": "#/definitions/CustomHostnameSites"
}
},
"nextLink": {
"description": "Link to next page of resources.",
"type": "string",
"readOnly": true
}
}
},
"DeploymentLocations": {
"description": "List of available locations (regions or App Service Environments) for\ndeployment of App Service resources.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"api-version": "2021-03-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"properties": {
"customHostname": "mywebapp.azurewebsites.net",
"region": "West US",
"siteResourceIds": [
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/westus-rg/providers/Microsoft.Web/sites/mywebapp"
}
]
}
},
{
"properties": {
"customHostname": "www.example.com",
"region": "West US 2",
"siteResourceIds": [
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app1"
},
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app2"
},
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app3"
}
]
}
}
],
"nextLink": null
}
}
}
}

0 comments on commit c0a3d9e

Please sign in to comment.