Represents a Persistent Disk resource. See Disks documentation for more information.
For a list of methods for this resource, see the end of this page.
Resource representations
A Persistent Disk resource.
{ "kind": "compute#disk", "id": unsigned long, "creationTimestamp": string, "zone": string, "status": string, "name": string, "description": string, "sizeGb": long, "sourceSnapshot": string, "sourceSnapshotId": string, "options": string, "selfLink": string, "sourceImage": string, "sourceImageId": string, "type": string, "licenses": [ string ] }
Property name | Value | Description | Notes |
---|---|---|---|
creationTimestamp
|
string
|
[Output Only] Creation timestamp in RFC3339 text format. | |
description
|
string
|
An optional textual description of the resource; provided by the client when the resource is created. | |
id
|
unsigned long
|
[Output Only] Unique identifier for the resource, generated by the server. | |
kind
|
string
|
[Output Only]
The type of resource. Always
compute#disk
for Disk resources.
|
|
licenses[]
|
list
|
Public visible licenses. | |
name
|
string
|
Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with
RFC1035
. Specifically, the name must be 1-63 characters long and match the regular expression
[a-z]([-a-z0-9]*[a-z0-9])?
which means
the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
|
|
options
|
string
|
Internal use only. | |
selfLink
|
string
|
[Output Only] Server-defined fully-qualified URL for this resource. | |
sizeGb
|
long
|
Size of the persistent disk, specified in GB. You can specify
this when creating a persistent disk using the
sourceImage
or
sourceSnapshot
parameter, or specify it as alone to create an empty persistent disk.
If you specify this option along with
sourceImage
or
sourceSnapshot
, the value of
sizeGb
must not be less than the size of the
sourceImage
or the size of the snapshot (560 GB).
|
|
sourceImage
|
string
|
The source image used to create this disk. If the source image is deleted from the system, this field will not be set, even if an image with the same name has been re-created. | |
sourceImageId
|
string
|
The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. | |
sourceSnapshot
|
string
|
The source snapshot used to create this disk. If the source snapshot is deleted from the system, this field will be cleared, and will not be set even if a snapshot with the same name is re-created. This parameter is required if
sourceImage
and
sizeGb
are not specified.
|
|
sourceSnapshotId
|
string
|
The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID ID would identify the exact version of the snapshot that was used. | |
status
|
string
|
[Output Only]
The disk creation status.
Acceptable values are:
|
|
type
|
string
|
URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created.
For example:
https://www.googleapis.com/compute/v1/projects/<project-id>/zones/<zone>/diskTypes/<disk-type> |
|
zone
|
string
|
The fully-qualified URL for the zone where the persistent disk resides. A persistent disk must reside in the same zone as the instance to which it is attached. |
Methods
The following are valid Disk resource methods:
- aggregatedList
- Retrieves the list of disks grouped by scope.
- createSnapshot
- Creates a snapshot of this disk.
- delete
- Deletes the specified persistent disk resource.
- get
- Returns the specified persistent disk resource.
- insert
- Creates a persistent disk resource in the specified project using the data included in the request.
- list
- Retrieves the list of persistent disk resources contained within the specified zone.