// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.networkcloud.generated;

import com.azure.resourcemanager.networkcloud.models.VirtualMachineVolumeParameters;

/** Samples for VirtualMachines DetachVolume. */
public final class VirtualMachinesDetachVolumeSamples {
    /*
     * x-ms-original-file: specification/networkcloud/resource-manager/Microsoft.NetworkCloud/preview/2023-05-01-preview/examples/VirtualMachines_DetachVolume.json
     */
    /**
     * Sample code: Detach volume from virtual machine.
     *
     * @param manager Entry point to NetworkCloudManager.
     */
    public static void detachVolumeFromVirtualMachine(
        com.azure.resourcemanager.networkcloud.NetworkCloudManager manager) {
        manager
            .virtualMachines()
            .detachVolume(
                "resourceGroupName",
                "virtualMachineName",
                new VirtualMachineVolumeParameters()
                    .withVolumeId(
                        "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/volumes/volumeName"),
                com.azure.core.util.Context.NONE);
    }
}
