1

I'm trying to update the region of the created azure management api service instance using the rest api.

URL - https://management.azure.com/subscriptions/b0474e6c-9d1c-4b84-87f5-27ef6aad5e5e/resourceGroups/res1/providers/Microsoft.ApiManagement/service/cloud1?api-version=2017-03-01

Body

{ "parameters": { "serviceName": "cloud1", "resourceGroupName": "res1", "api-version": "2017-03-01", "subscriptionId": "b0474e6c-9d1c-4b84-87f5-27ef6aad5e5e", "parameters": { "location": "North Central US" } }, "responses": { "200": { "id": "/subscriptions/b0474e6c-9d1c-4b84-87f5-27ef6aad5e5e/resourceGroups/res1/providers/Microsoft.ApiManagement/service/cloud1", "name": "", "type": "Microsoft.ApiManagement/service", "tags": {}, "location": "Central US", "etag": "AAAAAACYO/A=", "properties": { "publisherEmail": "", "publisherName": "", "notificationSenderEmail": "[email protected]", "provisioningState": "Succeeded", "targetProvisioningState": "", "createdAtUtc": "2017-02-14T04:33:06.0312071Z", "gatewayUrl": "https://cloud1.azure-api.net", "portalUrl": "https://cloud1.portal.azure-api.net", "managementApiUrl": "https://cloud1.management.azure-api.net", "scmUrl": "https://cloud1.scm.azure-api.net", "hostnameConfigurations": [], "staticIps": [ "40.66.160.152" ], "additionalLocations": null, "virtualNetworkConfiguration": null, "customProperties": null, "virtualNetworkType": "None" }, "sku": { "name": "Developer", "capacity": 1 } } } } 

Headers

Authorization Bearer Content-Type application/json

I'm getting below error.

{ "error": { "code": "InvalidRequestContent", "message": "The request content was invalid and could not be deserialized: 'Could not find member 'parameters' on object of type 'ResourceDefinition'. Path 'parameters', line 2, position 15.'." } } 

Am I doing anything wrong??

1 Answer 1

2

The payload is invalid, it should be the same as with service creation:

{ "location": "westus", "properties": { "publisherEmail": "...", "publisherName": "..." }, "sku": { "name": "Developer", "capacity": 1 } } 

But on top of that it is not supported to change master region of APIM service, you'll have to create new service and delete old one.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.