question

govindagoudpatil avatar image
0 Votes"
govindagoudpatil asked ·

Azure Migrate Rest API 2018-02-02 not supported

I am trying to automate the Migration grouping and assessment using available Azure Rest API 2018-02-02 , I don't know when new version going to be available for public use . Please give some insight on this


Getting Below Error .


az : ERROR: Bad Request({"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'centralus' and API version
'2018-02-02' for type 'migrateprojects'. The supported api-versions are '2018-09-01-preview, 2019-06-01'. The supported locations are 'centralus, eastasia,
southeastasia, northeurope, westeurope, westus2, australiasoutheast, uksouth, ukwest, canadacentral, centralindia, southindia, japaneast, japanwest, brazilsouth,
koreasouth, koreacentral, francecentral'."}})
At line:1 char:1
+ az rest --method get --uri "https://management.azure.com/subscription ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (ERROR: Bad Requ...cecentral'."}}):String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError




When i Use New version as specified above i get below error which is not descriptive


az : ERROR: Internal Server Error({"Message":"An error has occurred."})
At line:1 char:1
+ az rest --method get --uri "https://management.azure.com/subscription ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (ERROR: Internal...as occurred."}):String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError


azure-migrate
· 4
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Which API endpoint you are trying to hit ? can you please provide the API request details by omitting your PII information.

0 Votes 0 ·

Are you still having this issue ?

0 Votes 0 ·

@govindagoudpatil Please ensure that the Microsoft.Migrate provider is registered on the subscription where you are trying to invoke the REST APIs. If the provider is registered, can you please paste the entire URL that you are hitting?

0 Votes 0 ·

$subscriptionId = ''
$resourceGroup = '
'
$migrateProjectName = '
**'
$groupName='TestGroup1'

$azmigrateurl = 'https://management.azure.com/subscriptions/'+$subscriptionId+'/resourceGroups/'+$resourceGroup+'/providers/Microsoft.Migrate/migrateprojects/'+$migrateProjectName+'/groups/'+ $groupName+'?api-version=2018-09-01-preview'


$machin1="/subscriptions//resourceGroups/migratePOC/providers/Microsoft.Migrate/migrateprojects/migratePOC/machines/***"

$machineList = @($machin1)

$propObject = [PSCustomObject]@{

"machines" = $machineList

}


$request = [PSCustomObject]@{
"etag"="123456"
"properties" = $propObject

}


$requestBody = ConvertTo-Json $request
az rest --method Put --uri $azmigrateurl --body $requestBody






0 Votes 0 ·

1 Answer

Jerryzy-MSFT avatar image
0 Votes"
Jerryzy-MSFT answered ·

Hi ,

Welcome to Microsoft Q&A Forum.
This forum mainly discussed about Partner Center API related question, as this question is mainly about Azure Migration API, I would suggest you could create a thread in this forum:

Azure API Management



Thanks for your understanding

Best Regards

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.