EN
Данное содержимое не доступно на вашем языке, используйте версию на английском языке.
Эта тема еще не получила оценку - Оценить эту тему

Update Data Disk

The Update Data Disk operation updates the specified data disk attached to the specified virtual machine.

Request

The Update Data Disk request is specified as follows. Replace <subscription-id> with your subscription ID, <service-name> with the name of your hosted service, <deployment-name> with the name of your deployment, <role-name> with the name of the virtual machine, and <lun> with the logical unit number of the disk:

 

Method Request URI HTTP Version

PUT

https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments/<deployment-name>/roles/<role-name>/DataDisks/<lun>

HTTP/1.1

URI Parameters

None.

Request Headers

The following table describes the request headers.

 

Request Header Description

x-ms-version

Required. Specifies the version of the operation to use for this request. Currently this header should be set to 2012-03-01.

Request Body

The format of the request body is as follows:

noteNote
New configuration file is embedded in the body


<DataVirtualHardDisk xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <HostCaching>None|ReadOnly|ReadWrite</HostCaching>
  <DiskLabel>newDiskLabel</DiskLabel>
  <DiskName>newOrExistingDiskName</DiskName> 
  <Lun>1</Lun>
  <LogicalDiskSizeInGB>10</LogicalDiskSizeInGB>
  <MediaLink>http://contoso.blob.core.windows.net/disks/mydatadisk.vhd</MediaLink>
</DataVirtualHardDisk>

The following table describes the key elements of the request body:

 

Element name Description

HostCaching

Optional. Specifies the platform caching behavior of data disk blob for read/write efficiency. The default vault is ReadOnly.

Possible values are:

  • None

  • ReadOnly

  • ReadWrite

WarningWarning
Setting this property impacts the consistency of the disk.

DiskLabel

Optional. Specifies the description for the data disk in the image repository. When you attach a disk, either by directly referencing a media using the MediaLink element or specifying the target disk size, you can use the DiskLabel element to customize the label property of the target data disk.

DiskName

Optional. Specifies the name of a data disk in the image repository to use to update data disk attached to the virtual machine. Windows Azure uses the specified image to create the data disk for the machine and populates this field with the ID.

Lun

Required. Specifies the Logical Unit Number (LUN) for the disk. The LUN specifies the slot in which the data drive appears when mounted for usage by the virtual machine.

Valid LUN values are 0 through 15.

LogicalDiskSizeInGB

Optional. Specifies the size, in GB, of an empty disk to attach to the virtual machine.

Windows Azure creates the empty disk based on size preference and attaches the newly created disk to the virtual machine.

MediaLink

Required. Specifies the location of physical blob that contains the data disk. This link refers to a blob in customer storage account.

Example:

http://example.blob.core.windows.net/disks/mydatadisk.vhd

Response

The response includes an HTTP status code, a set of response headers, and a response body.

Status Code

A successful operation returns status code 200 (OK). For information about status codes, see Service Management Status and Error Codes.

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

 

Response Header Description

x-ms-request-id

A value that uniquely identifies a request made against the Management service. For an asynchronous operation, you can call get operation status with the value of the header to determine whether the operation is complete, has failed, or is still in progress. See Tracking Asynchronous Service Management Requests for more information.

Response Body

None.

Authorization

Only the account owner may call this operation.

Remarks

Была ли вам полезна эта информация?
(1500 символов осталось)
© 2013 Microsoft. Все права защищены.
facebook page visit twitter rss feed newsletter