{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Lightsail.CreateInstancesFromSnapshot
(
CreateInstancesFromSnapshot (..),
newCreateInstancesFromSnapshot,
createInstancesFromSnapshot_addOns,
createInstancesFromSnapshot_attachedDiskMapping,
createInstancesFromSnapshot_instanceSnapshotName,
createInstancesFromSnapshot_ipAddressType,
createInstancesFromSnapshot_keyPairName,
createInstancesFromSnapshot_restoreDate,
createInstancesFromSnapshot_sourceInstanceName,
createInstancesFromSnapshot_tags,
createInstancesFromSnapshot_useLatestRestorableAutoSnapshot,
createInstancesFromSnapshot_userData,
createInstancesFromSnapshot_instanceNames,
createInstancesFromSnapshot_availabilityZone,
createInstancesFromSnapshot_bundleId,
CreateInstancesFromSnapshotResponse (..),
newCreateInstancesFromSnapshotResponse,
createInstancesFromSnapshotResponse_operations,
createInstancesFromSnapshotResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateInstancesFromSnapshot = CreateInstancesFromSnapshot'
{
CreateInstancesFromSnapshot -> Maybe [AddOnRequest]
addOns :: Prelude.Maybe [AddOnRequest],
CreateInstancesFromSnapshot -> Maybe (HashMap Text [DiskMap])
attachedDiskMapping :: Prelude.Maybe (Prelude.HashMap Prelude.Text [DiskMap]),
CreateInstancesFromSnapshot -> Maybe Text
instanceSnapshotName :: Prelude.Maybe Prelude.Text,
CreateInstancesFromSnapshot -> Maybe IpAddressType
ipAddressType :: Prelude.Maybe IpAddressType,
CreateInstancesFromSnapshot -> Maybe Text
keyPairName :: Prelude.Maybe Prelude.Text,
CreateInstancesFromSnapshot -> Maybe Text
restoreDate :: Prelude.Maybe Prelude.Text,
CreateInstancesFromSnapshot -> Maybe Text
sourceInstanceName :: Prelude.Maybe Prelude.Text,
CreateInstancesFromSnapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateInstancesFromSnapshot -> Maybe Bool
useLatestRestorableAutoSnapshot :: Prelude.Maybe Prelude.Bool,
CreateInstancesFromSnapshot -> Maybe Text
userData :: Prelude.Maybe Prelude.Text,
CreateInstancesFromSnapshot -> [Text]
instanceNames :: [Prelude.Text],
CreateInstancesFromSnapshot -> Text
availabilityZone :: Prelude.Text,
CreateInstancesFromSnapshot -> Text
bundleId :: Prelude.Text
}
deriving (CreateInstancesFromSnapshot -> CreateInstancesFromSnapshot -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateInstancesFromSnapshot -> CreateInstancesFromSnapshot -> Bool
$c/= :: CreateInstancesFromSnapshot -> CreateInstancesFromSnapshot -> Bool
== :: CreateInstancesFromSnapshot -> CreateInstancesFromSnapshot -> Bool
$c== :: CreateInstancesFromSnapshot -> CreateInstancesFromSnapshot -> Bool
Prelude.Eq, ReadPrec [CreateInstancesFromSnapshot]
ReadPrec CreateInstancesFromSnapshot
Int -> ReadS CreateInstancesFromSnapshot
ReadS [CreateInstancesFromSnapshot]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateInstancesFromSnapshot]
$creadListPrec :: ReadPrec [CreateInstancesFromSnapshot]
readPrec :: ReadPrec CreateInstancesFromSnapshot
$creadPrec :: ReadPrec CreateInstancesFromSnapshot
readList :: ReadS [CreateInstancesFromSnapshot]
$creadList :: ReadS [CreateInstancesFromSnapshot]
readsPrec :: Int -> ReadS CreateInstancesFromSnapshot
$creadsPrec :: Int -> ReadS CreateInstancesFromSnapshot
Prelude.Read, Int -> CreateInstancesFromSnapshot -> ShowS
[CreateInstancesFromSnapshot] -> ShowS
CreateInstancesFromSnapshot -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateInstancesFromSnapshot] -> ShowS
$cshowList :: [CreateInstancesFromSnapshot] -> ShowS
show :: CreateInstancesFromSnapshot -> String
$cshow :: CreateInstancesFromSnapshot -> String
showsPrec :: Int -> CreateInstancesFromSnapshot -> ShowS
$cshowsPrec :: Int -> CreateInstancesFromSnapshot -> ShowS
Prelude.Show, forall x.
Rep CreateInstancesFromSnapshot x -> CreateInstancesFromSnapshot
forall x.
CreateInstancesFromSnapshot -> Rep CreateInstancesFromSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateInstancesFromSnapshot x -> CreateInstancesFromSnapshot
$cfrom :: forall x.
CreateInstancesFromSnapshot -> Rep CreateInstancesFromSnapshot x
Prelude.Generic)
newCreateInstancesFromSnapshot ::
Prelude.Text ->
Prelude.Text ->
CreateInstancesFromSnapshot
newCreateInstancesFromSnapshot :: Text -> Text -> CreateInstancesFromSnapshot
newCreateInstancesFromSnapshot
Text
pAvailabilityZone_
Text
pBundleId_ =
CreateInstancesFromSnapshot'
{ $sel:addOns:CreateInstancesFromSnapshot' :: Maybe [AddOnRequest]
addOns =
forall a. Maybe a
Prelude.Nothing,
$sel:attachedDiskMapping:CreateInstancesFromSnapshot' :: Maybe (HashMap Text [DiskMap])
attachedDiskMapping = forall a. Maybe a
Prelude.Nothing,
$sel:instanceSnapshotName:CreateInstancesFromSnapshot' :: Maybe Text
instanceSnapshotName = forall a. Maybe a
Prelude.Nothing,
$sel:ipAddressType:CreateInstancesFromSnapshot' :: Maybe IpAddressType
ipAddressType = forall a. Maybe a
Prelude.Nothing,
$sel:keyPairName:CreateInstancesFromSnapshot' :: Maybe Text
keyPairName = forall a. Maybe a
Prelude.Nothing,
$sel:restoreDate:CreateInstancesFromSnapshot' :: Maybe Text
restoreDate = forall a. Maybe a
Prelude.Nothing,
$sel:sourceInstanceName:CreateInstancesFromSnapshot' :: Maybe Text
sourceInstanceName = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateInstancesFromSnapshot' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:useLatestRestorableAutoSnapshot:CreateInstancesFromSnapshot' :: Maybe Bool
useLatestRestorableAutoSnapshot =
forall a. Maybe a
Prelude.Nothing,
$sel:userData:CreateInstancesFromSnapshot' :: Maybe Text
userData = forall a. Maybe a
Prelude.Nothing,
$sel:instanceNames:CreateInstancesFromSnapshot' :: [Text]
instanceNames = forall a. Monoid a => a
Prelude.mempty,
$sel:availabilityZone:CreateInstancesFromSnapshot' :: Text
availabilityZone = Text
pAvailabilityZone_,
$sel:bundleId:CreateInstancesFromSnapshot' :: Text
bundleId = Text
pBundleId_
}
createInstancesFromSnapshot_addOns :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe [AddOnRequest])
createInstancesFromSnapshot_addOns :: Lens' CreateInstancesFromSnapshot (Maybe [AddOnRequest])
createInstancesFromSnapshot_addOns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe [AddOnRequest]
addOns :: Maybe [AddOnRequest]
$sel:addOns:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe [AddOnRequest]
addOns} -> Maybe [AddOnRequest]
addOns) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe [AddOnRequest]
a -> CreateInstancesFromSnapshot
s {$sel:addOns:CreateInstancesFromSnapshot' :: Maybe [AddOnRequest]
addOns = Maybe [AddOnRequest]
a} :: CreateInstancesFromSnapshot) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInstancesFromSnapshot_attachedDiskMapping :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe (Prelude.HashMap Prelude.Text [DiskMap]))
createInstancesFromSnapshot_attachedDiskMapping :: Lens' CreateInstancesFromSnapshot (Maybe (HashMap Text [DiskMap]))
createInstancesFromSnapshot_attachedDiskMapping = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe (HashMap Text [DiskMap])
attachedDiskMapping :: Maybe (HashMap Text [DiskMap])
$sel:attachedDiskMapping:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe (HashMap Text [DiskMap])
attachedDiskMapping} -> Maybe (HashMap Text [DiskMap])
attachedDiskMapping) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe (HashMap Text [DiskMap])
a -> CreateInstancesFromSnapshot
s {$sel:attachedDiskMapping:CreateInstancesFromSnapshot' :: Maybe (HashMap Text [DiskMap])
attachedDiskMapping = Maybe (HashMap Text [DiskMap])
a} :: CreateInstancesFromSnapshot) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInstancesFromSnapshot_instanceSnapshotName :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe Prelude.Text)
createInstancesFromSnapshot_instanceSnapshotName :: Lens' CreateInstancesFromSnapshot (Maybe Text)
createInstancesFromSnapshot_instanceSnapshotName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe Text
instanceSnapshotName :: Maybe Text
$sel:instanceSnapshotName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
instanceSnapshotName} -> Maybe Text
instanceSnapshotName) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe Text
a -> CreateInstancesFromSnapshot
s {$sel:instanceSnapshotName:CreateInstancesFromSnapshot' :: Maybe Text
instanceSnapshotName = Maybe Text
a} :: CreateInstancesFromSnapshot)
createInstancesFromSnapshot_ipAddressType :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe IpAddressType)
createInstancesFromSnapshot_ipAddressType :: Lens' CreateInstancesFromSnapshot (Maybe IpAddressType)
createInstancesFromSnapshot_ipAddressType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe IpAddressType
ipAddressType :: Maybe IpAddressType
$sel:ipAddressType:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe IpAddressType
ipAddressType} -> Maybe IpAddressType
ipAddressType) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe IpAddressType
a -> CreateInstancesFromSnapshot
s {$sel:ipAddressType:CreateInstancesFromSnapshot' :: Maybe IpAddressType
ipAddressType = Maybe IpAddressType
a} :: CreateInstancesFromSnapshot)
createInstancesFromSnapshot_keyPairName :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe Prelude.Text)
createInstancesFromSnapshot_keyPairName :: Lens' CreateInstancesFromSnapshot (Maybe Text)
createInstancesFromSnapshot_keyPairName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe Text
keyPairName :: Maybe Text
$sel:keyPairName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
keyPairName} -> Maybe Text
keyPairName) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe Text
a -> CreateInstancesFromSnapshot
s {$sel:keyPairName:CreateInstancesFromSnapshot' :: Maybe Text
keyPairName = Maybe Text
a} :: CreateInstancesFromSnapshot)
createInstancesFromSnapshot_restoreDate :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe Prelude.Text)
createInstancesFromSnapshot_restoreDate :: Lens' CreateInstancesFromSnapshot (Maybe Text)
createInstancesFromSnapshot_restoreDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe Text
restoreDate :: Maybe Text
$sel:restoreDate:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
restoreDate} -> Maybe Text
restoreDate) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe Text
a -> CreateInstancesFromSnapshot
s {$sel:restoreDate:CreateInstancesFromSnapshot' :: Maybe Text
restoreDate = Maybe Text
a} :: CreateInstancesFromSnapshot)
createInstancesFromSnapshot_sourceInstanceName :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe Prelude.Text)
createInstancesFromSnapshot_sourceInstanceName :: Lens' CreateInstancesFromSnapshot (Maybe Text)
createInstancesFromSnapshot_sourceInstanceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe Text
sourceInstanceName :: Maybe Text
$sel:sourceInstanceName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
sourceInstanceName} -> Maybe Text
sourceInstanceName) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe Text
a -> CreateInstancesFromSnapshot
s {$sel:sourceInstanceName:CreateInstancesFromSnapshot' :: Maybe Text
sourceInstanceName = Maybe Text
a} :: CreateInstancesFromSnapshot)
createInstancesFromSnapshot_tags :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe [Tag])
createInstancesFromSnapshot_tags :: Lens' CreateInstancesFromSnapshot (Maybe [Tag])
createInstancesFromSnapshot_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe [Tag]
a -> CreateInstancesFromSnapshot
s {$sel:tags:CreateInstancesFromSnapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateInstancesFromSnapshot) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInstancesFromSnapshot_useLatestRestorableAutoSnapshot :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe Prelude.Bool)
createInstancesFromSnapshot_useLatestRestorableAutoSnapshot :: Lens' CreateInstancesFromSnapshot (Maybe Bool)
createInstancesFromSnapshot_useLatestRestorableAutoSnapshot = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe Bool
useLatestRestorableAutoSnapshot :: Maybe Bool
$sel:useLatestRestorableAutoSnapshot:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Bool
useLatestRestorableAutoSnapshot} -> Maybe Bool
useLatestRestorableAutoSnapshot) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe Bool
a -> CreateInstancesFromSnapshot
s {$sel:useLatestRestorableAutoSnapshot:CreateInstancesFromSnapshot' :: Maybe Bool
useLatestRestorableAutoSnapshot = Maybe Bool
a} :: CreateInstancesFromSnapshot)
createInstancesFromSnapshot_userData :: Lens.Lens' CreateInstancesFromSnapshot (Prelude.Maybe Prelude.Text)
createInstancesFromSnapshot_userData :: Lens' CreateInstancesFromSnapshot (Maybe Text)
createInstancesFromSnapshot_userData = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Maybe Text
userData :: Maybe Text
$sel:userData:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
userData} -> Maybe Text
userData) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Maybe Text
a -> CreateInstancesFromSnapshot
s {$sel:userData:CreateInstancesFromSnapshot' :: Maybe Text
userData = Maybe Text
a} :: CreateInstancesFromSnapshot)
createInstancesFromSnapshot_instanceNames :: Lens.Lens' CreateInstancesFromSnapshot [Prelude.Text]
createInstancesFromSnapshot_instanceNames :: Lens' CreateInstancesFromSnapshot [Text]
createInstancesFromSnapshot_instanceNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {[Text]
instanceNames :: [Text]
$sel:instanceNames:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> [Text]
instanceNames} -> [Text]
instanceNames) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} [Text]
a -> CreateInstancesFromSnapshot
s {$sel:instanceNames:CreateInstancesFromSnapshot' :: [Text]
instanceNames = [Text]
a} :: CreateInstancesFromSnapshot) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInstancesFromSnapshot_availabilityZone :: Lens.Lens' CreateInstancesFromSnapshot Prelude.Text
createInstancesFromSnapshot_availabilityZone :: Lens' CreateInstancesFromSnapshot Text
createInstancesFromSnapshot_availabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Text
availabilityZone :: Text
$sel:availabilityZone:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Text
availabilityZone} -> Text
availabilityZone) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Text
a -> CreateInstancesFromSnapshot
s {$sel:availabilityZone:CreateInstancesFromSnapshot' :: Text
availabilityZone = Text
a} :: CreateInstancesFromSnapshot)
createInstancesFromSnapshot_bundleId :: Lens.Lens' CreateInstancesFromSnapshot Prelude.Text
createInstancesFromSnapshot_bundleId :: Lens' CreateInstancesFromSnapshot Text
createInstancesFromSnapshot_bundleId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshot' {Text
bundleId :: Text
$sel:bundleId:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Text
bundleId} -> Text
bundleId) (\s :: CreateInstancesFromSnapshot
s@CreateInstancesFromSnapshot' {} Text
a -> CreateInstancesFromSnapshot
s {$sel:bundleId:CreateInstancesFromSnapshot' :: Text
bundleId = Text
a} :: CreateInstancesFromSnapshot)
instance Core.AWSRequest CreateInstancesFromSnapshot where
type
AWSResponse CreateInstancesFromSnapshot =
CreateInstancesFromSnapshotResponse
request :: (Service -> Service)
-> CreateInstancesFromSnapshot
-> Request CreateInstancesFromSnapshot
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateInstancesFromSnapshot
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateInstancesFromSnapshot)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [Operation] -> Int -> CreateInstancesFromSnapshotResponse
CreateInstancesFromSnapshotResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"operations" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateInstancesFromSnapshot where
hashWithSalt :: Int -> CreateInstancesFromSnapshot -> Int
hashWithSalt Int
_salt CreateInstancesFromSnapshot' {[Text]
Maybe Bool
Maybe [AddOnRequest]
Maybe [Tag]
Maybe Text
Maybe (HashMap Text [DiskMap])
Maybe IpAddressType
Text
bundleId :: Text
availabilityZone :: Text
instanceNames :: [Text]
userData :: Maybe Text
useLatestRestorableAutoSnapshot :: Maybe Bool
tags :: Maybe [Tag]
sourceInstanceName :: Maybe Text
restoreDate :: Maybe Text
keyPairName :: Maybe Text
ipAddressType :: Maybe IpAddressType
instanceSnapshotName :: Maybe Text
attachedDiskMapping :: Maybe (HashMap Text [DiskMap])
addOns :: Maybe [AddOnRequest]
$sel:bundleId:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Text
$sel:availabilityZone:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Text
$sel:instanceNames:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> [Text]
$sel:userData:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:useLatestRestorableAutoSnapshot:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Bool
$sel:tags:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe [Tag]
$sel:sourceInstanceName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:restoreDate:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:keyPairName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:ipAddressType:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe IpAddressType
$sel:instanceSnapshotName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:attachedDiskMapping:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe (HashMap Text [DiskMap])
$sel:addOns:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe [AddOnRequest]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AddOnRequest]
addOns
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text [DiskMap])
attachedDiskMapping
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceSnapshotName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpAddressType
ipAddressType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
keyPairName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
restoreDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceInstanceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
useLatestRestorableAutoSnapshot
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userData
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
instanceNames
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
availabilityZone
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
bundleId
instance Prelude.NFData CreateInstancesFromSnapshot where
rnf :: CreateInstancesFromSnapshot -> ()
rnf CreateInstancesFromSnapshot' {[Text]
Maybe Bool
Maybe [AddOnRequest]
Maybe [Tag]
Maybe Text
Maybe (HashMap Text [DiskMap])
Maybe IpAddressType
Text
bundleId :: Text
availabilityZone :: Text
instanceNames :: [Text]
userData :: Maybe Text
useLatestRestorableAutoSnapshot :: Maybe Bool
tags :: Maybe [Tag]
sourceInstanceName :: Maybe Text
restoreDate :: Maybe Text
keyPairName :: Maybe Text
ipAddressType :: Maybe IpAddressType
instanceSnapshotName :: Maybe Text
attachedDiskMapping :: Maybe (HashMap Text [DiskMap])
addOns :: Maybe [AddOnRequest]
$sel:bundleId:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Text
$sel:availabilityZone:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Text
$sel:instanceNames:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> [Text]
$sel:userData:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:useLatestRestorableAutoSnapshot:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Bool
$sel:tags:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe [Tag]
$sel:sourceInstanceName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:restoreDate:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:keyPairName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:ipAddressType:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe IpAddressType
$sel:instanceSnapshotName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:attachedDiskMapping:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe (HashMap Text [DiskMap])
$sel:addOns:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe [AddOnRequest]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [AddOnRequest]
addOns
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text [DiskMap])
attachedDiskMapping
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceSnapshotName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpAddressType
ipAddressType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
keyPairName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
restoreDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceInstanceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
useLatestRestorableAutoSnapshot
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userData
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
instanceNames
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
availabilityZone
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
bundleId
instance Data.ToHeaders CreateInstancesFromSnapshot where
toHeaders :: CreateInstancesFromSnapshot -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"Lightsail_20161128.CreateInstancesFromSnapshot" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateInstancesFromSnapshot where
toJSON :: CreateInstancesFromSnapshot -> Value
toJSON CreateInstancesFromSnapshot' {[Text]
Maybe Bool
Maybe [AddOnRequest]
Maybe [Tag]
Maybe Text
Maybe (HashMap Text [DiskMap])
Maybe IpAddressType
Text
bundleId :: Text
availabilityZone :: Text
instanceNames :: [Text]
userData :: Maybe Text
useLatestRestorableAutoSnapshot :: Maybe Bool
tags :: Maybe [Tag]
sourceInstanceName :: Maybe Text
restoreDate :: Maybe Text
keyPairName :: Maybe Text
ipAddressType :: Maybe IpAddressType
instanceSnapshotName :: Maybe Text
attachedDiskMapping :: Maybe (HashMap Text [DiskMap])
addOns :: Maybe [AddOnRequest]
$sel:bundleId:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Text
$sel:availabilityZone:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Text
$sel:instanceNames:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> [Text]
$sel:userData:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:useLatestRestorableAutoSnapshot:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Bool
$sel:tags:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe [Tag]
$sel:sourceInstanceName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:restoreDate:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:keyPairName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:ipAddressType:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe IpAddressType
$sel:instanceSnapshotName:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe Text
$sel:attachedDiskMapping:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe (HashMap Text [DiskMap])
$sel:addOns:CreateInstancesFromSnapshot' :: CreateInstancesFromSnapshot -> Maybe [AddOnRequest]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"addOns" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AddOnRequest]
addOns,
(Key
"attachedDiskMapping" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text [DiskMap])
attachedDiskMapping,
(Key
"instanceSnapshotName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
instanceSnapshotName,
(Key
"ipAddressType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IpAddressType
ipAddressType,
(Key
"keyPairName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
keyPairName,
(Key
"restoreDate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
restoreDate,
(Key
"sourceInstanceName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceInstanceName,
(Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Key
"useLatestRestorableAutoSnapshot" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useLatestRestorableAutoSnapshot,
(Key
"userData" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
userData,
forall a. a -> Maybe a
Prelude.Just (Key
"instanceNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
instanceNames),
forall a. a -> Maybe a
Prelude.Just
(Key
"availabilityZone" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
availabilityZone),
forall a. a -> Maybe a
Prelude.Just (Key
"bundleId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
bundleId)
]
)
instance Data.ToPath CreateInstancesFromSnapshot where
toPath :: CreateInstancesFromSnapshot -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateInstancesFromSnapshot where
toQuery :: CreateInstancesFromSnapshot -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateInstancesFromSnapshotResponse = CreateInstancesFromSnapshotResponse'
{
CreateInstancesFromSnapshotResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
CreateInstancesFromSnapshotResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateInstancesFromSnapshotResponse
-> CreateInstancesFromSnapshotResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateInstancesFromSnapshotResponse
-> CreateInstancesFromSnapshotResponse -> Bool
$c/= :: CreateInstancesFromSnapshotResponse
-> CreateInstancesFromSnapshotResponse -> Bool
== :: CreateInstancesFromSnapshotResponse
-> CreateInstancesFromSnapshotResponse -> Bool
$c== :: CreateInstancesFromSnapshotResponse
-> CreateInstancesFromSnapshotResponse -> Bool
Prelude.Eq, ReadPrec [CreateInstancesFromSnapshotResponse]
ReadPrec CreateInstancesFromSnapshotResponse
Int -> ReadS CreateInstancesFromSnapshotResponse
ReadS [CreateInstancesFromSnapshotResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateInstancesFromSnapshotResponse]
$creadListPrec :: ReadPrec [CreateInstancesFromSnapshotResponse]
readPrec :: ReadPrec CreateInstancesFromSnapshotResponse
$creadPrec :: ReadPrec CreateInstancesFromSnapshotResponse
readList :: ReadS [CreateInstancesFromSnapshotResponse]
$creadList :: ReadS [CreateInstancesFromSnapshotResponse]
readsPrec :: Int -> ReadS CreateInstancesFromSnapshotResponse
$creadsPrec :: Int -> ReadS CreateInstancesFromSnapshotResponse
Prelude.Read, Int -> CreateInstancesFromSnapshotResponse -> ShowS
[CreateInstancesFromSnapshotResponse] -> ShowS
CreateInstancesFromSnapshotResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateInstancesFromSnapshotResponse] -> ShowS
$cshowList :: [CreateInstancesFromSnapshotResponse] -> ShowS
show :: CreateInstancesFromSnapshotResponse -> String
$cshow :: CreateInstancesFromSnapshotResponse -> String
showsPrec :: Int -> CreateInstancesFromSnapshotResponse -> ShowS
$cshowsPrec :: Int -> CreateInstancesFromSnapshotResponse -> ShowS
Prelude.Show, forall x.
Rep CreateInstancesFromSnapshotResponse x
-> CreateInstancesFromSnapshotResponse
forall x.
CreateInstancesFromSnapshotResponse
-> Rep CreateInstancesFromSnapshotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateInstancesFromSnapshotResponse x
-> CreateInstancesFromSnapshotResponse
$cfrom :: forall x.
CreateInstancesFromSnapshotResponse
-> Rep CreateInstancesFromSnapshotResponse x
Prelude.Generic)
newCreateInstancesFromSnapshotResponse ::
Prelude.Int ->
CreateInstancesFromSnapshotResponse
newCreateInstancesFromSnapshotResponse :: Int -> CreateInstancesFromSnapshotResponse
newCreateInstancesFromSnapshotResponse Int
pHttpStatus_ =
CreateInstancesFromSnapshotResponse'
{ $sel:operations:CreateInstancesFromSnapshotResponse' :: Maybe [Operation]
operations =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateInstancesFromSnapshotResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createInstancesFromSnapshotResponse_operations :: Lens.Lens' CreateInstancesFromSnapshotResponse (Prelude.Maybe [Operation])
createInstancesFromSnapshotResponse_operations :: Lens' CreateInstancesFromSnapshotResponse (Maybe [Operation])
createInstancesFromSnapshotResponse_operations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshotResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:CreateInstancesFromSnapshotResponse' :: CreateInstancesFromSnapshotResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: CreateInstancesFromSnapshotResponse
s@CreateInstancesFromSnapshotResponse' {} Maybe [Operation]
a -> CreateInstancesFromSnapshotResponse
s {$sel:operations:CreateInstancesFromSnapshotResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: CreateInstancesFromSnapshotResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createInstancesFromSnapshotResponse_httpStatus :: Lens.Lens' CreateInstancesFromSnapshotResponse Prelude.Int
createInstancesFromSnapshotResponse_httpStatus :: Lens' CreateInstancesFromSnapshotResponse Int
createInstancesFromSnapshotResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateInstancesFromSnapshotResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateInstancesFromSnapshotResponse' :: CreateInstancesFromSnapshotResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateInstancesFromSnapshotResponse
s@CreateInstancesFromSnapshotResponse' {} Int
a -> CreateInstancesFromSnapshotResponse
s {$sel:httpStatus:CreateInstancesFromSnapshotResponse' :: Int
httpStatus = Int
a} :: CreateInstancesFromSnapshotResponse)
instance
Prelude.NFData
CreateInstancesFromSnapshotResponse
where
rnf :: CreateInstancesFromSnapshotResponse -> ()
rnf CreateInstancesFromSnapshotResponse' {Int
Maybe [Operation]
httpStatus :: Int
operations :: Maybe [Operation]
$sel:httpStatus:CreateInstancesFromSnapshotResponse' :: CreateInstancesFromSnapshotResponse -> Int
$sel:operations:CreateInstancesFromSnapshotResponse' :: CreateInstancesFromSnapshotResponse -> Maybe [Operation]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Operation]
operations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus