Home NewsX Announcing Public Preview of new attach/detach disks API for VMs/VMSS

Announcing Public Preview of new attach/detach disks API for VMs/VMSS

by info.odysseyx@gmail.com
0 comment 14 views


We’re excited to announce the public preview of a new API that makes attaching and detaching disks to VMs faster and easier. The new API is designed to reduce the number of API calls and latency associated with disk operations. Simplifies the input required to connect disks and allows you to connect/disconnect multiple disks with a single request. The new API is compatible with single-instance VMs, VMSS Universal, and VMSS Flex.

The new API offers several advantages over the existing Disk Management API. Here are some of the benefits you can expect from using the new API:

  • faster and more efficient: New API reduces the number of API calls and reduces latency associated with attaching and detaching disks. For example, you can only mention the disk that needs to be attached/detached, you don’t need to mention the LUN number. This helps avoid the GET API call required to get a list of all disks and LUN numbers in use.
  • Easier and more intuitive: New API simplifies disk management workflows by allowing you to attach and detach multiple disks in a single request and reducing input parameters.
  • Separate limit limit – Currently customers must make VM update API requests to attach/detach disks and are limited to a maximum of 12 requests per minute per VM. With this new API, customers will gain a quota of X additional requests per VM per minute, on top of the 12 already available for the VM Update API.

One of the most common tasks for cloud users is managing disk resources. If you need to add storage, back up data, or migrate to another instance, you must attach and detach disks from the virtual machine. This new API is designed to reduce the number of API calls and latency associated with disk operations.

The new API is provided as a RESTful endpoint that can be accessed from any programming language or tool. Because the API is in public preview, there are no SLA guarantees for the API.

How to use the API?

POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/aaaaaaaaaaaaaaaaaaaa/attachDetachDataDisks?api-version=2024-03-01

{
  "dataDisksToAttach": [
    {
      
      "diskId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/Disk1"
    },
    {
      "lun": 2,
      "diskId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/Disk2",
      "diskEncryptionSet": {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
      },
      "caching": "ReadWrite",
      "deleteOption": "Detach",
      "writeAcceleratorEnabled": false
    }
  ],
  "dataDisksToDetach": [
    {
      "diskId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_1_disk1_1a4e784bdafa49baa780eb2d128ff65x",
      "detachOption": "ForceDetach"
    },
    {
      "diskId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_4_disk4_4d4e784bdafa49baa780eb2d256ff41z"
    }
  ]
}

For more information, see: API documentation.





Source link

You may also like

Leave a Comment

Our Company

Welcome to OdysseyX, your one-stop destination for the latest news and opportunities across various domains.

Newsletter

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

Laest News

@2024 – All Right Reserved. Designed and Developed by OdysseyX