Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a block storage disk that can be attached to an Amazon Lightsail
instance in the same Availability Zone (e.g., us-east-2a
).
The create disk
operation supports tag-based access control via
request tags. For more information, see the
Amazon Lightsail Developer Guide.
Synopsis
- data CreateDisk = CreateDisk' {}
- newCreateDisk :: Text -> Text -> Int -> CreateDisk
- createDisk_addOns :: Lens' CreateDisk (Maybe [AddOnRequest])
- createDisk_tags :: Lens' CreateDisk (Maybe [Tag])
- createDisk_diskName :: Lens' CreateDisk Text
- createDisk_availabilityZone :: Lens' CreateDisk Text
- createDisk_sizeInGb :: Lens' CreateDisk Int
- data CreateDiskResponse = CreateDiskResponse' {
- operations :: Maybe [Operation]
- httpStatus :: Int
- newCreateDiskResponse :: Int -> CreateDiskResponse
- createDiskResponse_operations :: Lens' CreateDiskResponse (Maybe [Operation])
- createDiskResponse_httpStatus :: Lens' CreateDiskResponse Int
Creating a Request
data CreateDisk Source #
See: newCreateDisk
smart constructor.
CreateDisk' | |
|
Instances
:: Text | |
-> Text | |
-> Int | |
-> CreateDisk |
Create a value of CreateDisk
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:addOns:CreateDisk'
, createDisk_addOns
- An array of objects that represent the add-ons to enable for the new
disk.
$sel:tags:CreateDisk'
, createDisk_tags
- The tag keys and optional values to add to the resource during create.
Use the TagResource
action to tag a resource after it's created.
$sel:diskName:CreateDisk'
, createDisk_diskName
- The unique Lightsail disk name (e.g., my-disk
).
$sel:availabilityZone:CreateDisk'
, createDisk_availabilityZone
- The Availability Zone where you want to create the disk (e.g.,
us-east-2a
). Use the same Availability Zone as the Lightsail instance
to which you want to attach the disk.
Use the get regions
operation to list the Availability Zones where
Lightsail is currently available.
$sel:sizeInGb:CreateDisk'
, createDisk_sizeInGb
- The size of the disk in GB (e.g., 32
).
Request Lenses
createDisk_addOns :: Lens' CreateDisk (Maybe [AddOnRequest]) Source #
An array of objects that represent the add-ons to enable for the new disk.
createDisk_tags :: Lens' CreateDisk (Maybe [Tag]) Source #
The tag keys and optional values to add to the resource during create.
Use the TagResource
action to tag a resource after it's created.
createDisk_diskName :: Lens' CreateDisk Text Source #
The unique Lightsail disk name (e.g., my-disk
).
createDisk_availabilityZone :: Lens' CreateDisk Text Source #
The Availability Zone where you want to create the disk (e.g.,
us-east-2a
). Use the same Availability Zone as the Lightsail instance
to which you want to attach the disk.
Use the get regions
operation to list the Availability Zones where
Lightsail is currently available.
createDisk_sizeInGb :: Lens' CreateDisk Int Source #
The size of the disk in GB (e.g., 32
).
Destructuring the Response
data CreateDiskResponse Source #
See: newCreateDiskResponse
smart constructor.
CreateDiskResponse' | |
|
Instances
newCreateDiskResponse Source #
Create a value of CreateDiskResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:operations:CreateDiskResponse'
, createDiskResponse_operations
- An array of objects that describe the result of the action, such as the
status of the request, the timestamp of the request, and the resources
affected by the request.
$sel:httpStatus:CreateDiskResponse'
, createDiskResponse_httpStatus
- The response's http status code.
Response Lenses
createDiskResponse_operations :: Lens' CreateDiskResponse (Maybe [Operation]) Source #
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
createDiskResponse_httpStatus :: Lens' CreateDiskResponse Int Source #
The response's http status code.