Skip to content

Commit

Permalink
Swagger for listHostnameBindings endpoint (#16516)
Browse files Browse the repository at this point in the history
* Swagger for listHostnameBindings endpoint

* Re-add Microsoft.CertificateRegistration and Microsoft.DomainRegistration APIs since they do not get pulled in by OpenApiHub (#15917)

* ops

Co-authored-by: Naveed Aziz <naveeda@microsoft.com>
  • Loading branch information
calvinsID and naveedaz authored Oct 28, 2021
1 parent ac33054 commit c3c7ca7
Show file tree
Hide file tree
Showing 3 changed files with 235 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}

0 comments on commit c3c7ca7

Please sign in to comment.