Megosztás a következőn keresztül:


List Custom Host Name Sites - List Custom Host Name Sites

Get custom hostnames under this subscription

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites?api-version=2024-04-01
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites?hostname={hostname}&api-version=2024-04-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).

api-version
query True

string

API Version

hostname
query

string

Specific hostname

Responses

Name Type Description
200 OK

CustomHostnameSitesCollection

OK

Other Status Codes

DefaultErrorResponse

App Service error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get custom hostnames under subscription
Get specific custom hostname under subscription

Get custom hostnames under subscription

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/customhostnameSites?api-version=2024-04-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/customhostnameSites/mywebapp.azurewebsites.net",
      "name": "mywebapp.azurewebsites.net",
      "type": "Microsoft.Web/customhostnameSites",
      "properties": {
        "customHostname": "mywebapp.azurewebsites.net",
        "region": "West US",
        "siteResourceIds": [
          {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus-rg/providers/Microsoft.Web/sites/mywebapp"
          }
        ]
      }
    },
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/customhostnameSites/www.example.com",
      "name": "www.example.com",
      "type": "Microsoft.Web/customhostnameSites",
      "properties": {
        "customHostname": "www.example.com",
        "region": "West US 2",
        "siteResourceIds": [
          {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app1"
          },
          {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app2"
          },
          {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app3"
          }
        ]
      }
    }
  ],
  "nextLink": null
}

Get specific custom hostname under subscription

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/customhostnameSites?hostname=www.example.com&api-version=2024-04-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/customhostnameSites/www.example.com",
      "name": "www.example.com",
      "type": "Microsoft.Web/customhostnameSites",
      "properties": {
        "customHostname": "www.example.com",
        "region": "West US 2",
        "siteResourceIds": [
          {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app1"
          },
          {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app2"
          },
          {
            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/westus2-rg/providers/Microsoft.Web/sites/westus2app3"
          }
        ]
      }
    }
  ],
  "nextLink": null
}

Definitions

Name Description
CustomHostnameSites

A hostname and its assigned sites

CustomHostnameSitesCollection

Collection of custom hostname sites

DefaultErrorResponse

App Service error response.

Details
Error

Error model.

Identifier

A domain specific resource identifier.

CustomHostnameSites

A hostname and its assigned sites

Name Type Description
id

string

Resource Id.

kind

string

Kind of resource.

name

string

Resource Name.

properties.customHostname

string

properties.region

string

properties.siteResourceIds

Identifier[]

A domain specific resource identifier.

type

string

Resource type.

CustomHostnameSitesCollection

Collection of custom hostname sites

Name Type Description
nextLink

string

Link to next page of resources.

value

CustomHostnameSites[]

Collection of resources.

DefaultErrorResponse

App Service error response.

Name Type Description
error

Error

Error model.

Details

Name Type Description
code

string

Standardized string to programmatically identify the error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

Error

Error model.

Name Type Description
code

string

Standardized string to programmatically identify the error.

details

Details[]

Detailed errors.

innererror

string

More information to debug error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

Identifier

A domain specific resource identifier.

Name Type Description
id

string

Resource Id.

kind

string

Kind of resource.

name

string

Resource Name.

properties.id

string

String representation of the identity.

type

string

Resource type.