libZSservicesZSamazonka-lightsailZSamazonka-lightsail
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Lightsail.CreateDisk

Description

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

Creating a Request

data CreateDisk Source #

See: newCreateDisk smart constructor.

Constructors

CreateDisk' 

Fields

  • addOns :: Maybe [AddOnRequest]

    An array of objects that represent the add-ons to enable for the new disk.

  • tags :: Maybe [Tag]

    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.

  • diskName :: Text

    The unique Lightsail disk name (e.g., my-disk).

  • availabilityZone :: Text

    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.

  • sizeInGb :: Int

    The size of the disk in GB (e.g., 32).

Instances

Instances details
Eq CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Read CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Show CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Generic CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Associated Types

type Rep CreateDisk :: Type -> Type #

NFData CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Methods

rnf :: CreateDisk -> () #

Hashable CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

ToJSON CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

AWSRequest CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Associated Types

type AWSResponse CreateDisk #

ToHeaders CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Methods

toHeaders :: CreateDisk -> [Header] #

ToPath CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

ToQuery CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

type Rep CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

type Rep CreateDisk = D1 ('MetaData "CreateDisk" "Amazonka.Lightsail.CreateDisk" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "CreateDisk'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "addOns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AddOnRequest])) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag]))) :*: (S1 ('MetaSel ('Just "diskName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "availabilityZone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sizeInGb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))
type AWSResponse CreateDisk Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

newCreateDisk Source #

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.

Constructors

CreateDiskResponse' 

Fields

  • operations :: Maybe [Operation]

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq CreateDiskResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Read CreateDiskResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Show CreateDiskResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Generic CreateDiskResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Associated Types

type Rep CreateDiskResponse :: Type -> Type #

NFData CreateDiskResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

Methods

rnf :: CreateDiskResponse -> () #

type Rep CreateDiskResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDisk

type Rep CreateDiskResponse = D1 ('MetaData "CreateDiskResponse" "Amazonka.Lightsail.CreateDisk" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "CreateDiskResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "operations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Operation])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.