diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/Certificates.json b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/Certificates.json index f28c7e76ecc3..70fb39a44396 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/Certificates.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/Certificates.json @@ -304,6 +304,55 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}/hostNameBindings": { + "get": { + "tags": [ + "Certificates" + ], + "summary": "Gets all hostname bindings a certificate is used in.", + "operationId": "Certificates_ListHostnameBindings", + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of the certificate.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/HostNameBindingCollection" + } + }, + "default": { + "description": "App Service error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "List hostname bindings using certificate": { + "$ref": "./examples/ListHostnameBindingsOfCertificate.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/CommonDefinitions.json b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/CommonDefinitions.json index 3b89173e97a9..b05b5df3e737 100644 --- a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/CommonDefinitions.json +++ b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/CommonDefinitions.json @@ -1183,6 +1183,147 @@ } } }, + "HostNameBinding": { + "description": "A hostname binding object.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyOnlyResource" + } + ], + "properties": { + "properties": { + "description": "HostNameBinding resource specific properties", + "type": "object", + "properties": { + "siteName": { + "description": "App Service app name.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "domainId": { + "description": "Fully qualified ARM domain resource URI.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "azureResourceName": { + "description": "Azure resource name.", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "azureResourceType": { + "description": "Azure resource type.", + "enum": [ + "Website", + "TrafficManager" + ], + "type": "string", + "x-ms-enum": { + "name": "AzureResourceType", + "modelAsString": false + }, + "x-ms-mutability": [ + "create", + "read" + ] + }, + "customHostNameDnsRecordType": { + "description": "Custom DNS record type.", + "enum": [ + "CName", + "A" + ], + "type": "string", + "x-ms-enum": { + "name": "CustomHostNameDnsRecordType", + "modelAsString": false + }, + "x-ms-mutability": [ + "create", + "read" + ] + }, + "hostNameType": { + "description": "Hostname type.", + "enum": [ + "Verified", + "Managed" + ], + "type": "string", + "x-ms-enum": { + "name": "HostNameType", + "modelAsString": false + }, + "x-ms-mutability": [ + "create", + "read" + ] + }, + "sslState": { + "description": "SSL type", + "enum": [ + "Disabled", + "SniEnabled", + "IpBasedEnabled" + ], + "type": "string", + "x-ms-enum": { + "name": "SslState", + "modelAsString": false + }, + "x-ms-mutability": [ + "create", + "read" + ] + }, + "thumbprint": { + "description": "SSL certificate thumbprint", + "type": "string", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "virtualIP": { + "description": "Virtual IP address assigned to the hostname if IP based SSL is enabled.", + "type": "string", + "readOnly": true + } + }, + "x-ms-client-flatten": true + } + } + }, + "HostNameBindingCollection": { + "description": "Collection of hostname bindings.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/HostNameBinding" + } + }, + "nextLink": { + "description": "Link to next page of resources.", + "type": "string", + "readOnly": true + } + } + }, "HostNameSslState": { "description": "SSL-enabled hostname.", "type": "object", diff --git a/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListHostnameBindingsOfCertificate.json b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListHostnameBindingsOfCertificate.json new file mode 100644 index 000000000000..eec7cc024560 --- /dev/null +++ b/specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListHostnameBindingsOfCertificate.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "contosoRG", + "name": "contosoCertificate", + "api-version": "2021-03-01" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "name": "example.com", + "properties": { + "siteName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoRG/providers/Microsoft.Web/sites/contosoSite1", + "domainId": null, + "sslState": "SniEnabled", + "thumbprint": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + }, + { + "name": "www.example.com", + "properties": { + "siteName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoRG/providers/Microsoft.Web/sites/contosoSite2", + "domainId": null, + "sslState": "IpBasedEnabled", + "thumbprint": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + }, + { + "name": "test.example.com", + "properties": { + "siteName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contosoRG/providers/Microsoft.Web/sites/contosoSite3", + "domainId": null, + "sslState": "SniEnabled", + "thumbprint": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + } + } + ], + "nextLink": null + } + } + } +}