-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While using "begin_create_or_update" getting error related to location property #35532
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @amjads1 @avirishuv @Drewm3 @Vaibhav-Agar. |
Hi @mehulrjangale - It looks like the VirtualMachine takes location as a required keyword argument. The argument Thanks! |
Hi @mehulrjangale. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @swathipil, I've the following code:
The problem is I think VirtualMachineUpdate does not have location parameter. |
Hi, please use the model
|
@ChenxiJiang333 @swathipil Will it work if I want to update the VM ? |
It works for both to create or update the VM. |
It worked, thanks! |
Hi @mehulrjangale. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation. |
Hi @mehulrjangale, since you haven’t asked that we |
Type of issue
Code doesn't work
Description
[Enter feedback here]
I'm using azure-mgmt-compute==30.4.0 and above version. I'm facing the following issue. I tried to add the location parameter manually, but that doesn't work either. The document doesn't call it out clearly.
_Failed
Traceback (most recent call last):
File "/usr/src/tmp/acbbf3f2-fbdc-4ecf-b209-00c26e01e385/runbooks/rotateVm.py", line 42, in
compute_client.virtual_machines.begin_create_or_update(resource_group_name, vm_name, update_vm)
File "C:\userenv\lib\site-packages\azure\core\tracing\decorator.py", line 78, in wrapper_use_tracer
return func(*args, **kwargs)
File "C:\userenv\lib\site-packages\azure\mgmt\compute\v2024_03_01\operations_operations.py", line 15291, in begin_create_or_update
raw_result = self._create_or_update_initial(
File "C:\userenv\lib\site-packages\azure\mgmt\compute\v2024_03_01\operations_operations.py", line 15158, in create_or_update_initial
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: (LocationRequired) The location property is required for this definition.
Code: LocationRequired
Message: The location property is required for this definition.
Page URL
https://learn.microsoft.com/en-us/python/api/overview/azure/mgmt-compute-readme?view=azure-python
Content source URL
https://github.com/MicrosoftDocs/azure-docs-sdk-python/blob/main/docs-ref-services/latest/mgmt-compute-readme.md
Document Version Independent Id
c377eb24-55a2-545b-6b53-ba4d375c4134
Article author
@azure-sdk
Metadata
The text was updated successfully, but these errors were encountered: