Skip to content

Commit

Permalink
Bring Back action UpdateHostname and UploadCertificate (Azure#1861)
Browse files Browse the repository at this point in the history
* Document the Api Schema Contract

* Example for Create call and missing the pageable link

* Fix the ApiSchemaDocument object.

* Bring back UpdateHostname and UploadCertificate Operation

* Fix description
  • Loading branch information
solankisamir authored and sarangan12 committed Oct 18, 2017
1 parent 72b1471 commit 7887c45
Show file tree
Hide file tree
Showing 3 changed files with 395 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,103 @@
},
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/uploadcertificate": {
"post": {
"tags": [
"ApiManagementService"
],
"operationId": "ApiManagementService_UploadCertificate",
"description": "Upload Custom Domain SSL certificate for an API Management service. This operation will be deprecated in future releases.",
"x-ms-examples": {
"ApiManagementServiceUploadProxyCertificate": {
"$ref": "./examples/ApiManagementServiceUploadProxyCertificate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ApiManagementServiceUploadCertificateParameters"
},
"description": "Parameters supplied to the Upload SSL certificate for an API Management service operation."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Successfully uploaded certificate to the API Management Service.",
"schema": {
"$ref": "#/definitions/CertificateInformation"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/updatehostname": {
"post": {
"tags": [
"ApiManagementService"
],
"operationId": "ApiManagementService_UpdateHostname",
"description": "Creates, updates, or deletes the custom hostnames for an API Management service. The custom hostname can be applied to the Proxy and Portal endpoint. This is a long running operation and could take several minutes to complete. This operation will be deprecated in the next version update.",
"x-ms-examples": {
"ApiManagementServiceUpdateHostName": {
"$ref": "./examples/ApiManagementServiceUpdateHostName.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ApiManagementServiceUpdateHostnameParameters"
},
"description": "Parameters supplied to the UpdateHostname operation."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Service was successfully updated with desired hostnames.",
"schema": {
"$ref": "#/definitions/ApiManagementServiceResource"
}
},
"202": {
"description": "Accepted. The location header contains the URL where the status of the long running operation can be checked. The response also includes the unmodified ApiManagementServiceResource.",
"schema": {
"$ref": "#/definitions/ApiManagementServiceResource"
}
}
},
"x-ms-long-running-operation": true
}
}
},
"definitions": {
Expand Down Expand Up @@ -1044,6 +1141,99 @@
},
"description": "Parameter supplied to the Apply Network configuration operation."
},
"ApiManagementServiceUploadCertificateParameters": {
"properties": {
"type": {
"type": "string",
"description": "Hostname type.",
"enum": [
"Proxy",
"Portal",
"Management",
"Scm"
],
"x-ms-enum": {
"name": "HostnameType",
"modelAsString": false
}
},
"certificate": {
"type": "string",
"description": "Base64 Encoded certificate."
},
"certificate_password": {
"type": "string",
"description": "Certificate password."
}
},
"required": [
"type",
"certificate",
"certificate_password"
],
"description": "Parameters supplied to the Upload SSL certificate for an API Management service operation."
},
"HostnameConfigurationOld": {
"properties": {
"type": {
"type": "string",
"description": "Hostname type.",
"enum": [
"Proxy",
"Portal",
"Management",
"Scm"
],
"x-ms-enum": {
"name": "HostnameType",
"modelAsString": false
}
},
"hostname": {
"type": "string",
"description": "Hostname to configure."
},
"certificate": {
"$ref": "#/definitions/CertificateInformation",
"description": "Certificate information."
}
},
"required": [
"type",
"hostname",
"certificate"
],
"description": "Custom hostname configuration."
},
"ApiManagementServiceUpdateHostnameParameters": {
"properties": {
"update": {
"type": "array",
"items": {
"$ref": "#/definitions/HostnameConfigurationOld"
},
"description": "Hostnames to create or update."
},
"delete": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Proxy",
"Portal",
"Management",
"Scm"
],
"x-ms-enum": {
"name": "HostnameType",
"modelAsString": false
}
},
"description": "Hostnames types to delete."
}
},
"description": "Parameters supplied to the UpdateHostname operation."
},
"Operation": {
"description": "REST API operation",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2017-03-01",
"subscriptionId": "subid",
"parameters": {
"update": [
{
"type": "Proxy",
"hostname": "internalproxy2.contoso.com",
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"subject": "CN=*.contoso.com"
}
},
{
"type": "Portal",
"hostname": "internalportal2.contoso.com",
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"subject": "CN=*.contoso.com"
}
},
{
"type": "Management",
"hostname": "internalmgmt2.contoso.com",
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"subject": "CN=*.contoso.com"
}
},
{
"type": "Scm",
"hostname": "internalscm2.contoso.com",
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"subject": "CN=*.contoso.com"
}
}
]
}
},
"responses": {
"202": {
"headers": {
"location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2016-10-10"
},
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {},
"location": "Central US",
"etag": "AAAAAAAYP5M=",
"properties": {
"publisherEmail": "contoso@microsoft.com",
"publisherName": "admin",
"notificationSenderEmail": "contoso@live.com",
"provisioningState": "Succeeded",
"targetProvisioningState": "",
"createdAtUtc": "2017-06-28T23:01:33.0667959Z",
"gatewayUrl": "https://apimService1.azure-api.net",
"portalUrl": "https://apimService1.portal.azure-api.net",
"managementApiUrl": "https://apimService1.management.azure-api.net",
"scmUrl": "https://apimService1.scm.azure-api.net",
"staticIps": [
"52.173.22.222"
],
"additionalLocations": [
{
"location": "West US",
"sku": {
"name": "Premium",
"capacity": 1
},
"staticIps": [
"40.78.99.244"
]
}
],
"virtualNetworkType": "None"
},
"sku": {
"name": "Premium",
"capacity": 1
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1",
"name": "apimService1",
"type": "Microsoft.ApiManagement/service",
"tags": {},
"location": "Central US",
"etag": "AAAAAAAYP5M=",
"properties": {
"publisherEmail": "contoso@microsoft.com",
"publisherName": "admin",
"notificationSenderEmail": "contoso@live.com",
"provisioningState": "Succeeded",
"targetProvisioningState": "",
"createdAtUtc": "2017-06-28T23:01:33.0667959Z",
"gatewayUrl": "https://apimService1.azure-api.net",
"portalUrl": "https://apimService1.portal.azure-api.net",
"managementApiUrl": "https://apimService1.management.azure-api.net",
"scmUrl": "https://apimService1.scm.azure-api.net",
"hostnameConfigurations": [
{
"type": "Proxy",
"hostName": "internalproxy2.contoso.net",
"negotiateClientCertificate": false,
"defaultSslBinding": true,
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"subject": "CN=*.contoso.net"
}
},
{
"type": "Portal",
"hostName": "internalportal2.contoso.net",
"negotiateClientCertificate": false,
"defaultSslBinding": false,
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"subject": "CN=*.contoso.net"
}
},
{
"type": "Management",
"hostName": "internalmgmt2.contoso.net",
"negotiateClientCertificate": false,
"defaultSslBinding": false,
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"subject": "CN=*.contoso.net"
}
},
{
"type": "Scm",
"hostName": "internalscm2.contoso.net",
"negotiateClientCertificate": false,
"defaultSslBinding": false,
"certificate": {
"expiry": "2018-03-17T21:55:07+00:00",
"thumbprint": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"subject": "CN=*.contoso.net"
}
}
],
"staticIps": [
"52.173.22.222"
],
"additionalLocations": [
{
"location": "West US",
"sku": {
"name": "Premium",
"capacity": 1
},
"staticIps": [
"40.78.99.244"
]
}
],
"virtualNetworkType": "None"
},
"sku": {
"name": "Premium",
"capacity": 1
}
}
}
}
}
Loading

0 comments on commit 7887c45

Please sign in to comment.