From c1297ec7f1b937645333bf04d260dcce0a4da946 Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Mon, 2 Aug 2021 20:44:02 -0700 Subject: [PATCH] fix update service (#15478) --- .../2021-04-01-preview/apimdeployment.json | 13 +++ ...iManagementServiceGetServiceHavingMsi.json | 89 ++++++++++++++ ...anagementUpdateServiceToNewVnetAndAZs.json | 110 ++++++++++++++++++ 3 files changed, 212 insertions(+) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimdeployment.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimdeployment.json index d042081b262b..2746004fb326 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimdeployment.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimdeployment.json @@ -331,6 +331,9 @@ }, "ApiManagementUpdateServicePublisherDetails": { "$ref": "./examples/ApiManagementUpdateServicePublisherDetails.json" + }, + "ApiManagementUpdateServiceToNewVnetAndAvailabilityZones": { + "$ref": "./examples/ApiManagementUpdateServiceToNewVnetAndAZs.json" } }, "parameters": [ @@ -385,6 +388,9 @@ "ApiManagementServiceGetService": { "$ref": "./examples/ApiManagementServiceGetService.json" }, + "ApiManagementServiceGetServiceHavingMsi": { + "$ref": "./examples/ApiManagementServiceGetServiceHavingMsi.json" + }, "ApiManagementServiceGetMultiRegionInternalVnet": { "$ref": "./examples/ApiManagementServiceGetMultiRegionInternalVnet.json" } @@ -1589,6 +1595,13 @@ "type": "string", "description": "ETag of the resource.", "readOnly": true + }, + "zones": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of availability zones denoting where the resource needs to come from." } }, "allOf": [ diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json new file mode 100644 index 000000000000..afd687d849d2 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "tags": {}, + "location": "West Europe", + "etag": "AAAAAAAENfI=", + "properties": { + "publisherEmail": "foo@contoso.com", + "publisherName": "Contoso", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2016-04-12T00:20:15.6018952Z", + "gatewayUrl": "https://apimService1.azure-api.net", + "gatewayRegionalUrl": "https://apimService1-westeurope-01.regional.azure-api.net", + "portalUrl": "https://apimService1.portal.azure-api.net", + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "managementApiUrl": "https://apimService1.management.azure-api.net", + "scmUrl": "https://apimService1.scm.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false, + "defaultSslBinding": false, + "certificateSource": "BuiltIn" + }, + { + "type": "Proxy", + "hostName": "proxy.msitesting.net", + "keyVaultId": "https://samir-msi-keyvault.vault.azure.net/secrets/msicertificate", + "negotiateClientCertificate": false, + "certificate": { + "expiry": "2020-12-18T11:11:47+00:00", + "thumbprint": "9833D531D7A45XXXXXA85908BD3692E0BD3F", + "subject": "CN=*.msitesting.net" + }, + "defaultSslBinding": true, + "certificateSource": "KeyVault" + } + ], + "publicIPAddresses": [ + "13.94.xxx.188" + ], + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/dfVirtualNetwork/subnets/backendSubnet" + }, + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False" + }, + "virtualNetworkType": "External", + "disableGateway": false + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "ca1d33f7-xxxx-42ec-xxxx-d526a1ee953a", + "tenantId": "72f988bf-xxxx-41af-xxxx-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { + "principalId": "95194df2-9208-xxxx-xxxx-a10d2af9b5a3", + "clientId": "aaff9c7d-xxxx-4db2-xxxx-ab0e3e7806cf" + } + } + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json new file mode 100644 index 000000000000..59d901ecd262 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2021-04-01-preview", + "subscriptionId": "subid", + "parameters": { + "properties": { + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimService1v2/subnets/default" + }, + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apimService1ip", + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "zones": [ + "1", + "2" + ] + } + }, + "responses": { + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2021-04-01-preview" + } + }, + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "tags": {}, + "location": "West Europe", + "etag": "AAAAAABlaZ0=", + "properties": { + "publisherEmail": "foobar@contoso.com", + "publisherName": "Microsoft", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2016-04-12T00:20:15.6018952Z", + "gatewayUrl": "https://apimService1.azure-api.net", + "gatewayRegionalUrl": "https://apimService1-westeurope-01.regional.azure-api.net", + "portalUrl": "https://apimService1.portal.azure-api.net", + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "managementApiUrl": "https://apimService1.management.azure-api.net", + "scmUrl": "https://apimService1.scm.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false, + "defaultSslBinding": false, + "certificateSource": "BuiltIn" + }, + { + "type": "Proxy", + "hostName": "proxy.msitesting.net", + "keyVaultId": "https://demo-msi-keyvault.vault.azure.net/secrets/msicertificate", + "negotiateClientCertificate": false, + "certificate": { + "expiry": "2020-12-18T11:11:47+00:00", + "thumbprint": "9833D531D7A4XXXX766F2A85908BD3692E0BD3F", + "subject": "CN=*.msitesting.net" + }, + "defaultSslBinding": true, + "certificateSource": "Custom" + } + ], + "publicIPAddresses": [ + "13.94.XXX.188" + ], + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimService1v2/subnets/default" + }, + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apimService1ip", + "virtualNetworkType": "External", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False" + }, + "disableGateway": false + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "identity": { + "type": "SystemAssigned", + "principalId": "ca1d33f7-XXXX-42ec-b3e9-XXXX", + "tenantId": "72f988bf-XXXX-41af-91ab-2d7cd011db47" + }, + "zones": [ + "1", + "2" + ] + } + } + } +}