Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
See: Compute Engine API Reference for compute.instances.attachDisk
.
Synopsis
- type InstancesAttachDiskResource = "compute" :> ("v1" :> ("projects" :> (Capture "project" Text :> ("zones" :> (Capture "zone" Text :> ("instances" :> (Capture "instance" Text :> ("attachDisk" :> (QueryParam "requestId" Text :> (QueryParam "forceAttach" Bool :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] AttachedDisk :> Post '[JSON] Operation))))))))))))
- instancesAttachDisk :: Text -> Text -> AttachedDisk -> Text -> InstancesAttachDisk
- data InstancesAttachDisk
- insRequestId :: Lens' InstancesAttachDisk (Maybe Text)
- insProject :: Lens' InstancesAttachDisk Text
- insZone :: Lens' InstancesAttachDisk Text
- insPayload :: Lens' InstancesAttachDisk AttachedDisk
- insForceAttach :: Lens' InstancesAttachDisk (Maybe Bool)
- insInstance :: Lens' InstancesAttachDisk Text
REST Resource
type InstancesAttachDiskResource = "compute" :> ("v1" :> ("projects" :> (Capture "project" Text :> ("zones" :> (Capture "zone" Text :> ("instances" :> (Capture "instance" Text :> ("attachDisk" :> (QueryParam "requestId" Text :> (QueryParam "forceAttach" Bool :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] AttachedDisk :> Post '[JSON] Operation)))))))))))) Source #
A resource alias for compute.instances.attachDisk
method which the
InstancesAttachDisk
request conforms to.
Creating a Request
Creates a value of InstancesAttachDisk
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data InstancesAttachDisk Source #
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
See: instancesAttachDisk
smart constructor.
Instances
Request Lenses
insRequestId :: Lens' InstancesAttachDisk (Maybe Text) Source #
An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
insProject :: Lens' InstancesAttachDisk Text Source #
Project ID for this request.
insPayload :: Lens' InstancesAttachDisk AttachedDisk Source #
Multipart request metadata.
insForceAttach :: Lens' InstancesAttachDisk (Maybe Bool) Source #
Whether to force attach the disk even if it's currently attached to another instance. This is only available for regional disks.
insInstance :: Lens' InstancesAttachDisk Text Source #
The instance name for this request.