I am writing a python script which will make use of azure python sdk, and inside the script I have some cases of usage of begin_create_or_update
function, which is common for most modules in azure python sdk.
However, I am having trouble figuring out the proper json pattern for each object to specify in begin_create_or_update
function. I am using the git directory of azure samples as reference to figure out the proper pattern for the json. But I cannot find any official documentation regarding to required and optional argument formats for the json in begin_create_or_update
function. For example, I have no clue what kind of arguments I should provide in json if I want to create a virtual machine scale set.
I found this link which states that the usage of json patterns in the function is possible, but does not provide any link for proper documentation.
I have also found some similarities between the json view of objects in portal azure and json pattern which is required in begin_create_or_update
function. My question is if there is an official documentation for the json arguments for each type of object which begin_create_or_update
function might refer to, and how can I make use of the json view in azure portal in order to figure out the pattern of json in the sdk.
Just like ARM templates, the SDK uses the Azure API to do things like manage a VM. With that in mind, I believe you will find that the ARM template reference documentation has what you are looking for, documentation on the resource formats.
This vault sample code isn't too old and therefore probably pretty close to the latest version of the API. The Microsoft.KeyVault vaults documentation is the relevant documentation.
The one gotcha is that the SDK uses snake case e.g access_policies
whereas the ARM templates use camelcase e.g accessPolicies
.
Here is a VMSS sample, and here is the respective reference documentation. Unfortunately you see there isn't a 1:1 match as the sample is 3 years old, so you would have to find the right API version in the ARM template documentation to get a perfect comparison.
Perhaps the API version differences between what you see in the portal vs in samples is why you said you see similarities but not an exact match. Also the differences in case as mentioned above.
I hope this is what you were looking for.