From 77f0b1f873b36cbcd9f2cf05724165877d49278f Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Wed, 11 Mar 2020 17:58:08 -0700 Subject: [PATCH 1/3] capacity is a mandatory parameter --- .../preview/2019-12-01-preview/apimdeployment.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json index fa820c5a0170..e9afc7056c8a 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json @@ -1250,11 +1250,12 @@ "capacity": { "type": "integer", "format": "int32", - "description": "Capacity of the SKU (number of deployed units of the SKU)." + "description": "Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0." } }, "required": [ - "name" + "name", + "capacity" ], "description": "API Management service resource SKU properties." }, From cd0a068663c66f4ca90a44b64b47b67f455cc18b Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Sat, 14 Mar 2020 11:28:40 -0700 Subject: [PATCH 2/3] fix examples and model validation issue --- .../2019-12-01-preview/apimdeployment.json | 3 + .../ApiManagementCreateServiceHavingMsi.json | 3 +- ...CreateServiceWithUserAssignedIdentity.json | 137 ++++++++++++++++++ 3 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json index e9afc7056c8a..60df6115ebd9 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json @@ -248,6 +248,9 @@ }, "ApiManagementCreateServiceWithSystemCertificates": { "$ref": "./examples/ApiManagementCreateServiceWithSystemCertificates.json" + }, + "ApiManagementCreateServiceWithUserAssignedIdentity":{ + "$ref": "./examples/ApiManagementCreateServiceWithUserAssignedIdentity.json" } }, "parameters": [ diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceHavingMsi.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceHavingMsi.json index 594ac0d96b47..8fb2e7b79560 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceHavingMsi.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceHavingMsi.json @@ -10,7 +10,8 @@ "publisherName": "autorestsdk" }, "sku": { - "name": "Consumption" + "name": "Consumption", + "capacity": 0 }, "identity": { "type": "SystemAssigned" diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json new file mode 100644 index 000000000000..9b5b08ce23b1 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "serviceName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2019-12-01-preview", + "subscriptionId": "subid", + "parameters": { + "properties": { + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": {} + } + }, + "location": "West US", + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "responses": { + "201": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2019-12-01-preview" + }, + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "location": "West US", + "etag": "AAAAAAAFzyQ=", + "properties": { + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Created", + "targetProvisioningState": "Activating", + "createdAtUtc": "2020-03-12T01:05:33.4573398Z", + "hostnameConfigurations": [ + { + "type": "Proxy", + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false, + "defaultSslBinding": true + } + ], + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { + } + } + } + } + }, + "200": { + "body": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "location": "West US", + "etag": "AAAAAAAFzyk=", + "properties": { + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2020-03-12T01:05:33.4573398Z", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false, + "defaultSslBinding": true + } + ], + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False" + }, + "virtualNetworkType": "None", + "disableGateway": false + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { + "principalId": "3e099fbe-6e62-4649-9f54-a119fc1ba85e", + "clientId": "5a2c6b8e-0905-45b7-a772-993c9418137f" + } + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2019-12-01-preview" + } + } + } +} \ No newline at end of file From b542d897a1ccb0ed3770d3bce9b5446d9ea40614 Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Sat, 14 Mar 2020 11:40:16 -0700 Subject: [PATCH 3/3] fix prettier check --- .../2019-12-01-preview/apimdeployment.json | 2 +- ...CreateServiceWithUserAssignedIdentity.json | 81 +++++++++---------- 2 files changed, 41 insertions(+), 42 deletions(-) diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json index 60df6115ebd9..d2c39f3c94fe 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/apimdeployment.json @@ -249,7 +249,7 @@ "ApiManagementCreateServiceWithSystemCertificates": { "$ref": "./examples/ApiManagementCreateServiceWithSystemCertificates.json" }, - "ApiManagementCreateServiceWithUserAssignedIdentity":{ + "ApiManagementCreateServiceWithUserAssignedIdentity": { "$ref": "./examples/ApiManagementCreateServiceWithUserAssignedIdentity.json" } }, diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json index 9b5b08ce23b1..eaebda541b0a 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2019-12-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json @@ -67,8 +67,7 @@ "identity": { "type": "UserAssigned", "userAssignedIdentities": { - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { - } + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": {} } } } @@ -79,54 +78,54 @@ "name": "apimService1", "type": "Microsoft.ApiManagement/service", "tags": { - "tag1": "value1", - "tag2": "value2", - "tag3": "value3" + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" }, "location": "West US", "etag": "AAAAAAAFzyk=", "properties": { - "publisherEmail": "apim@autorestsdk.com", - "publisherName": "autorestsdk", - "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", - "provisioningState": "Succeeded", - "targetProvisioningState": "", - "createdAtUtc": "2020-03-12T01:05:33.4573398Z", - "gatewayUrl": "https://apimService1.azure-api.net", - "hostnameConfigurations": [ - { - "type": "Proxy", - "hostName": "apimService1.azure-api.net", - "negotiateClientCertificate": false, - "defaultSslBinding": true - } - ], - "customProperties": { - "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", - "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False", - "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", - "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", - "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", - "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False" - }, - "virtualNetworkType": "None", - "disableGateway": false + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2020-03-12T01:05:33.4573398Z", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false, + "defaultSslBinding": true + } + ], + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False" + }, + "virtualNetworkType": "None", + "disableGateway": false }, "sku": { - "name": "Consumption", - "capacity": 0 + "name": "Consumption", + "capacity": 0 }, "identity": { - "type": "UserAssigned", - "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "userAssignedIdentities": { - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { - "principalId": "3e099fbe-6e62-4649-9f54-a119fc1ba85e", - "clientId": "5a2c6b8e-0905-45b7-a772-993c9418137f" - } + "type": "UserAssigned", + "tenantId": "XXXXX-86f1-41af-XXXX-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { + "principalId": "XXXXX-6e62-4649-9f54-a119fc1ba85e", + "clientId": "5a2c6b8e-0905-XXXX-a772-993c9418137f" } + } } - } + } }, "202": { "headers": { @@ -134,4 +133,4 @@ } } } -} \ No newline at end of file +}