Do Azure Python SDK or API supports for fetching Azure vm username reserved keywords, and also minimum and maximum size validations for additional disk size of azure vm ?

narsimha 20 Reputation points
2023-12-21T05:38:05.5533333+00:00

Hi All,

I need Azure vm username reserved keywords and minimum and maximum values of azure disk size using python sdk or API's.

suggest me any API's or SDK methods to solve this.

Thanks.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,480 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
590 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 35,011 Reputation points Microsoft Employee
    2023-12-22T17:41:02.87+00:00

    @narsimha

    I understand you wish to fetch these values through REST API or Python SDK. The disallowed values for Admin Username can be found here:

    Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    These values are not fetchable via Python or REST API. If needed you could code these values into script/code.

    For "minimum and maximum values of azure disk size" this depends on the disk type. You cannot shrink a disk, so the current size would typically be the minimum size, for new disks the minimum is 4 GiB. The maximum size for OS disks 4,095 GiB, though by default the MBR limits this to 2 TiB. Again, this is not something that can be fetched. If you wish to enforce these limits, you will need to set them in your code. More information on this page.

    Hope this helps! Let me know if you still have question.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A!

    User's image

    0 comments No comments