google-cloud-compute-0.1.0.0: GCP Client for Haskell
Copyright(c) 2025
LicenseMIT
Maintainer
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Google.Cloud.Compute.Disk

Description

This module provides a Haskell client for Google Cloud Compute Engine Disk operations.

Synopsis

Documentation

listDisks Source #

Arguments

:: String

GCP Project ID

-> String

Zone name

-> Maybe ListDisksQuery

Optional query parameters

-> IO (Either String DiskResponse)

List result or error}

List disks in a zone

Example:

listDisks "my-project" "us-central1-a" Nothing

insertDisk Source #

Arguments

:: String

GCP Project ID

-> String

Zone name

-> InsertDiskOps

Disk configuration

-> Maybe InsertDiskQuery

Optional query parameters

-> IO (Either String InsertDiskResponse)

Operation or error}

Create a new persistent disk

Example:

insertDisk "my-project" "us-central1-a" (defaultInsertOps "disk1" "100") Nothing

data DiskResponse Source #

Response format for disk listing operations

Constructors

DiskResponse 

Fields

data InsertDiskOps Source #

Disk creation options

Constructors

InsertDiskOps 

Fields

type InsertDiskResponse = Operation Source #

Alias for operation response from disk insertion

data Operation Source #

Long-running operation resource

Constructors

Operation 

Fields

deleteDisk Source #

Arguments

:: String

GCP Project ID

-> String

Zone name

-> String

Disk name to delete

-> Maybe DeleteDiskQuery

Optional force deletion

-> IO (Either String Operation)

Operation or error

Deletes a disk with optional query parameters

Delete a persistent disk

Example:

deleteDisk "my-project" "us-central1-a" "old-disk" (Just DeleteDiskQuery { force = True })

createDiskSnapshot Source #

Arguments

:: String

GCP Project ID

-> String

Zone name

-> String

Source disk name

-> CreateSnapshotOps

Snapshot configuration

-> Maybe CreateSnapshotQuery

Optional guest flush

-> IO (Either String CreateSnapshotResp)

Operation or error

Creates a snapshot of a disk with optional query parameters | Create disk snapshot

Example:

createDiskSnapshot "my-project" "us-central1-a" "source-disk" 
  (defaultCreateSnapshotOps "daily-backup") Nothing

type CreateSnapshotResp = Operation Source #

Alias for operation response from snapshot creation

data CreateSnapshotOps Source #

Snapshot creation options

Constructors

CreateSnapshotOps 

Fields

data Warning Source #

Represents a warning object returned by Google Cloud API operations

Constructors

Warning 

Fields

data WarningData Source #

Key-value pair providing additional context for warnings

Constructors

WarningData 

Fields

  • key :: String

    Metadata key describing the warning aspect

  • value :: String

    Metadata value associated with the key

defaultCreateSnapshotOps :: String -> CreateSnapshotOps Source #

Default snapshot creation options

Creates minimal valid configuration with required snapshot name. Additional fields can be added using record update syntax:

defaultCreateSnapshotOps "backup" { description = Just "Daily backup" }

defaultInsertOps :: String -> String -> InsertDiskOps Source #

Default disk creation options

Creates minimal valid configuration with required name and size. Other fields can be added using record update syntax:

defaultInsertOps "new-disk" "50" { type_ = Just "pd-ssd" }