VirtualMachineDiskOperationsExtensions.BeginCreatingDataDisk Method (IVirtualMachineDiskOperations, String, String, String, VirtualMachineDataDiskCreateParameters)
The Create Data Disk operation adds a data disk to a virtual machine. There are three ways to create the data disk using the Add Data Disk operation. Option 1 - Attach an empty data disk to the role by specifying the disk label and location of the disk image. Do not include the DiskName and SourceMediaLink elements in the request body. Include the MediaLink element and reference a blob that is in the same geographical region as the role. You can also omit the MediaLink element. In this usage, Azure will create the data disk in the storage account configured as default for the role. Option 2 - Attach an existing data disk that is in the image repository. Do not include the DiskName and SourceMediaLink elements in the request body. Specify the data disk to use by including the DiskName element. Note: If included the in the response body, the MediaLink and LogicalDiskSizeInGB elements are ignored. Option 3 - Specify the location of a blob in your storage account that contain a disk image to use. Include the SourceMediaLink element. Note: If the MediaLink element isincluded, it is ignored. (see https://msdn.microsoft.com/library/windowsazure/jj157199.aspx for more information)
Namespace: Microsoft.WindowsAzure.Management.Compute
Assembly: Microsoft.WindowsAzure.Management.Compute (in Microsoft.WindowsAzure.Management.Compute.dll)
Syntax
public static AzureOperationResponse BeginCreatingDataDisk(
this IVirtualMachineDiskOperations operations,
string serviceName,
string deploymentName,
string roleName,
VirtualMachineDataDiskCreateParameters parameters
)
public:
[ExtensionAttribute]
static AzureOperationResponse^ BeginCreatingDataDisk(
IVirtualMachineDiskOperations^ operations,
String^ serviceName,
String^ deploymentName,
String^ roleName,
VirtualMachineDataDiskCreateParameters^ parameters
)
static member BeginCreatingDataDisk :
operations:IVirtualMachineDiskOperations *
serviceName:string *
deploymentName:string *
roleName:string *
parameters:VirtualMachineDataDiskCreateParameters -> AzureOperationResponse
<ExtensionAttribute>
Public Shared Function BeginCreatingDataDisk (
operations As IVirtualMachineDiskOperations,
serviceName As String,
deploymentName As String,
roleName As String,
parameters As VirtualMachineDataDiskCreateParameters
) As AzureOperationResponse
Parameters
operations
Type: Microsoft.WindowsAzure.Management.Compute.IVirtualMachineDiskOperationsReference to the Microsoft.WindowsAzure.Management.Compute.IVirtualMachineDiskOperations.
serviceName
Type: System.StringRequired. The name of your service.
deploymentName
Type: System.StringRequired. The name of the deployment.
roleName
Type: System.StringRequired. The name of the role to add the data disk to.
parameters
Type: Microsoft.WindowsAzure.Management.Compute.Models.VirtualMachineDataDiskCreateParametersRequired. Parameters supplied to the Create Virtual Machine Data Disk operation.
Return Value
Type: Microsoft.Azure.AzureOperationResponse
A standard service response including an HTTP status code and request ID.
See Also
VirtualMachineDiskOperationsExtensions Class
Microsoft.WindowsAzure.Management.Compute Namespace
Return to top