List Compute Disks
Retrieves a list of persistent disks contained within the specified zone.
External Documentation
To learn more, visit the GCP documentation.
Basic Parameters
Parameter | Description |
---|---|
Project | Project ID for this request. |
Return All Pages | Automatically fetch all resources, page by page. |
Zone | The name of the zone for this request. |
Advanced Parameters
Parameter | Description |
---|---|
Filter | A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either = , != , > , or < . For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance . You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) |
Max Results | The maximum number of results per page that should be returned. If the number of available results is larger than maxResults , Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500 , inclusive. (Default: 500 ). |
Order By | Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc" . This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by name or creationTimestamp desc is supported. |
Return Partial Success | Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. |
Example Output
{
"kind": "compute#diskList",
"id": "projects/blink/zones/us-central1-a/disks",
"items": [
{
"kind": "compute#disk",
"id": "5122914973818841609",
"creationTimestamp": "2022-12-29T09:56:54.788-08:00",
"name": "test-instance",
"sizeGb": "10",
"zone": "https://blinkops.com",
"status": "READY",
"selfLink": "https://blinkops.com",
"sourceImage": "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-11-bullseye-v20221206",
"sourceImageId": "3029264037887216418",
"type": "https://blinkops.com",
"licenses": [
"https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-11-bullseye"
],
"guestOsFeatures": [
{
"type": "UEFI_COMPATIBLE"
},
{
"type": "VIRTIO_SCSI_MULTIQUEUE"
},
{
"type": "GVNIC"
}
],
"lastAttachTimestamp": "2022-12-29T09:56:54.789-08:00",
"users": [
"https://blinkops.com"
],
"labelFingerprint": "42WmSpB8rSM=",
"licenseCodes": [
"3853522013536123851"
],
"physicalBlockSizeBytes": "4096",
"architecture": "X86_64"
}
],
"selfLink": "https://blinkops.com"
}
Workflow Library Example
List Compute Disks with Gcp and Send Results Via Email
Preview this Workflow on desktop