{-# 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.Cloud9.CreateEnvironmentEC2
(
CreateEnvironmentEC2 (..),
newCreateEnvironmentEC2,
createEnvironmentEC2_automaticStopTimeMinutes,
createEnvironmentEC2_subnetId,
createEnvironmentEC2_ownerArn,
createEnvironmentEC2_imageId,
createEnvironmentEC2_clientRequestToken,
createEnvironmentEC2_connectionType,
createEnvironmentEC2_description,
createEnvironmentEC2_dryRun,
createEnvironmentEC2_tags,
createEnvironmentEC2_name,
createEnvironmentEC2_instanceType,
CreateEnvironmentEC2Response (..),
newCreateEnvironmentEC2Response,
createEnvironmentEC2Response_environmentId,
createEnvironmentEC2Response_httpStatus,
)
where
import Amazonka.Cloud9.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateEnvironmentEC2 = CreateEnvironmentEC2'
{
CreateEnvironmentEC2 -> Maybe Int
automaticStopTimeMinutes :: Prelude.Maybe Prelude.Int,
CreateEnvironmentEC2 -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2 -> Maybe Text
ownerArn :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2 -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2 -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2 -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
CreateEnvironmentEC2 -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
CreateEnvironmentEC2 -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag])
tags :: Prelude.Maybe (Core.Sensitive [Core.Sensitive Tag]),
CreateEnvironmentEC2 -> Text
name :: Prelude.Text,
CreateEnvironmentEC2 -> Text
instanceType :: Prelude.Text
}
deriving (CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
(CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool)
-> (CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool)
-> Eq CreateEnvironmentEC2
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
$c/= :: CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
== :: CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
$c== :: CreateEnvironmentEC2 -> CreateEnvironmentEC2 -> Bool
Prelude.Eq, Int -> CreateEnvironmentEC2 -> ShowS
[CreateEnvironmentEC2] -> ShowS
CreateEnvironmentEC2 -> String
(Int -> CreateEnvironmentEC2 -> ShowS)
-> (CreateEnvironmentEC2 -> String)
-> ([CreateEnvironmentEC2] -> ShowS)
-> Show CreateEnvironmentEC2
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEnvironmentEC2] -> ShowS
$cshowList :: [CreateEnvironmentEC2] -> ShowS
show :: CreateEnvironmentEC2 -> String
$cshow :: CreateEnvironmentEC2 -> String
showsPrec :: Int -> CreateEnvironmentEC2 -> ShowS
$cshowsPrec :: Int -> CreateEnvironmentEC2 -> ShowS
Prelude.Show, (forall x. CreateEnvironmentEC2 -> Rep CreateEnvironmentEC2 x)
-> (forall x. Rep CreateEnvironmentEC2 x -> CreateEnvironmentEC2)
-> Generic CreateEnvironmentEC2
forall x. Rep CreateEnvironmentEC2 x -> CreateEnvironmentEC2
forall x. CreateEnvironmentEC2 -> Rep CreateEnvironmentEC2 x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEnvironmentEC2 x -> CreateEnvironmentEC2
$cfrom :: forall x. CreateEnvironmentEC2 -> Rep CreateEnvironmentEC2 x
Prelude.Generic)
newCreateEnvironmentEC2 ::
Prelude.Text ->
Prelude.Text ->
CreateEnvironmentEC2
newCreateEnvironmentEC2 :: Text -> Text -> CreateEnvironmentEC2
newCreateEnvironmentEC2 Text
pName_ Text
pInstanceType_ =
CreateEnvironmentEC2' :: Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ConnectionType
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe (Sensitive [Sensitive Tag])
-> Text
-> Text
-> CreateEnvironmentEC2
CreateEnvironmentEC2'
{ $sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: Maybe Int
automaticStopTimeMinutes =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:CreateEnvironmentEC2' :: Maybe Text
subnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ownerArn:CreateEnvironmentEC2' :: Maybe Text
ownerArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageId:CreateEnvironmentEC2' :: Maybe Text
imageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:CreateEnvironmentEC2' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:connectionType:CreateEnvironmentEC2' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateEnvironmentEC2' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:CreateEnvironmentEC2' :: Maybe Bool
dryRun = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateEnvironmentEC2' :: Maybe (Sensitive [Sensitive Tag])
tags = Maybe (Sensitive [Sensitive Tag])
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateEnvironmentEC2' :: Text
name = Text
pName_,
$sel:instanceType:CreateEnvironmentEC2' :: Text
instanceType = Text
pInstanceType_
}
createEnvironmentEC2_automaticStopTimeMinutes :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Int)
createEnvironmentEC2_automaticStopTimeMinutes :: (Maybe Int -> f (Maybe Int))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_automaticStopTimeMinutes = (CreateEnvironmentEC2 -> Maybe Int)
-> (CreateEnvironmentEC2 -> Maybe Int -> CreateEnvironmentEC2)
-> Lens
CreateEnvironmentEC2 CreateEnvironmentEC2 (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Int
automaticStopTimeMinutes :: Maybe Int
$sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Int
automaticStopTimeMinutes} -> Maybe Int
automaticStopTimeMinutes) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Int
a -> CreateEnvironmentEC2
s {$sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: Maybe Int
automaticStopTimeMinutes = Maybe Int
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_subnetId :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_subnetId :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_subnetId = (CreateEnvironmentEC2 -> Maybe Text)
-> (CreateEnvironmentEC2 -> Maybe Text -> CreateEnvironmentEC2)
-> Lens
CreateEnvironmentEC2 CreateEnvironmentEC2 (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Text
a -> CreateEnvironmentEC2
s {$sel:subnetId:CreateEnvironmentEC2' :: Maybe Text
subnetId = Maybe Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_ownerArn :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_ownerArn :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_ownerArn = (CreateEnvironmentEC2 -> Maybe Text)
-> (CreateEnvironmentEC2 -> Maybe Text -> CreateEnvironmentEC2)
-> Lens
CreateEnvironmentEC2 CreateEnvironmentEC2 (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Text
ownerArn :: Maybe Text
$sel:ownerArn:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
ownerArn} -> Maybe Text
ownerArn) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Text
a -> CreateEnvironmentEC2
s {$sel:ownerArn:CreateEnvironmentEC2' :: Maybe Text
ownerArn = Maybe Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_imageId :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_imageId :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_imageId = (CreateEnvironmentEC2 -> Maybe Text)
-> (CreateEnvironmentEC2 -> Maybe Text -> CreateEnvironmentEC2)
-> Lens
CreateEnvironmentEC2 CreateEnvironmentEC2 (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Text
imageId :: Maybe Text
$sel:imageId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Text
a -> CreateEnvironmentEC2
s {$sel:imageId:CreateEnvironmentEC2' :: Maybe Text
imageId = Maybe Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_clientRequestToken :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_clientRequestToken = (CreateEnvironmentEC2 -> Maybe Text)
-> (CreateEnvironmentEC2 -> Maybe Text -> CreateEnvironmentEC2)
-> Lens
CreateEnvironmentEC2 CreateEnvironmentEC2 (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Text
a -> CreateEnvironmentEC2
s {$sel:clientRequestToken:CreateEnvironmentEC2' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_connectionType :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe ConnectionType)
createEnvironmentEC2_connectionType :: (Maybe ConnectionType -> f (Maybe ConnectionType))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_connectionType = (CreateEnvironmentEC2 -> Maybe ConnectionType)
-> (CreateEnvironmentEC2
-> Maybe ConnectionType -> CreateEnvironmentEC2)
-> Lens
CreateEnvironmentEC2
CreateEnvironmentEC2
(Maybe ConnectionType)
(Maybe ConnectionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe ConnectionType
a -> CreateEnvironmentEC2
s {$sel:connectionType:CreateEnvironmentEC2' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_description :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Text)
createEnvironmentEC2_description :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_description = (CreateEnvironmentEC2 -> Maybe (Sensitive Text))
-> (CreateEnvironmentEC2
-> Maybe (Sensitive Text) -> CreateEnvironmentEC2)
-> Lens
CreateEnvironmentEC2
CreateEnvironmentEC2
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe (Sensitive Text)
a -> CreateEnvironmentEC2
s {$sel:description:CreateEnvironmentEC2' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: CreateEnvironmentEC2) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> CreateEnvironmentEC2
-> f CreateEnvironmentEC2
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
createEnvironmentEC2_dryRun :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe Prelude.Bool)
createEnvironmentEC2_dryRun :: (Maybe Bool -> f (Maybe Bool))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_dryRun = (CreateEnvironmentEC2 -> Maybe Bool)
-> (CreateEnvironmentEC2 -> Maybe Bool -> CreateEnvironmentEC2)
-> Lens
CreateEnvironmentEC2 CreateEnvironmentEC2 (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe Bool
a -> CreateEnvironmentEC2
s {$sel:dryRun:CreateEnvironmentEC2' :: Maybe Bool
dryRun = Maybe Bool
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_tags :: Lens.Lens' CreateEnvironmentEC2 (Prelude.Maybe [Tag])
createEnvironmentEC2_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_tags = (CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag]))
-> (CreateEnvironmentEC2
-> Maybe (Sensitive [Sensitive Tag]) -> CreateEnvironmentEC2)
-> Lens
CreateEnvironmentEC2
CreateEnvironmentEC2
(Maybe (Sensitive [Sensitive Tag]))
(Maybe (Sensitive [Sensitive Tag]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Maybe (Sensitive [Sensitive Tag])
tags :: Maybe (Sensitive [Sensitive Tag])
$sel:tags:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag])
tags} -> Maybe (Sensitive [Sensitive Tag])
tags) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Maybe (Sensitive [Sensitive Tag])
a -> CreateEnvironmentEC2
s {$sel:tags:CreateEnvironmentEC2' :: Maybe (Sensitive [Sensitive Tag])
tags = Maybe (Sensitive [Sensitive Tag])
a} :: CreateEnvironmentEC2) ((Maybe (Sensitive [Sensitive Tag])
-> f (Maybe (Sensitive [Sensitive Tag])))
-> CreateEnvironmentEC2 -> f CreateEnvironmentEC2)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe (Sensitive [Sensitive Tag])
-> f (Maybe (Sensitive [Sensitive Tag])))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateEnvironmentEC2
-> f CreateEnvironmentEC2
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(Sensitive [Sensitive Tag]) (Sensitive [Sensitive Tag]) [Tag] [Tag]
-> Iso
(Maybe (Sensitive [Sensitive Tag]))
(Maybe (Sensitive [Sensitive Tag]))
(Maybe [Tag])
(Maybe [Tag])
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 (Exchange [Tag] [Tag] [Sensitive Tag] (Identity [Sensitive Tag])
-> Exchange
[Tag]
[Tag]
(Sensitive [Sensitive Tag])
(Identity (Sensitive [Sensitive Tag]))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Exchange [Tag] [Tag] [Sensitive Tag] (Identity [Sensitive Tag])
-> Exchange
[Tag]
[Tag]
(Sensitive [Sensitive Tag])
(Identity (Sensitive [Sensitive Tag])))
-> (Exchange [Tag] [Tag] [Tag] (Identity [Tag])
-> Exchange [Tag] [Tag] [Sensitive Tag] (Identity [Sensitive Tag]))
-> AnIso
(Sensitive [Sensitive Tag]) (Sensitive [Sensitive Tag]) [Tag] [Tag]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange [Tag] [Tag] [Tag] (Identity [Tag])
-> Exchange [Tag] [Tag] [Sensitive Tag] (Identity [Sensitive Tag])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
createEnvironmentEC2_name :: Lens.Lens' CreateEnvironmentEC2 Prelude.Text
createEnvironmentEC2_name :: (Text -> f Text) -> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_name = (CreateEnvironmentEC2 -> Text)
-> (CreateEnvironmentEC2 -> Text -> CreateEnvironmentEC2)
-> Lens CreateEnvironmentEC2 CreateEnvironmentEC2 Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Text
name :: Text
$sel:name:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
name} -> Text
name) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Text
a -> CreateEnvironmentEC2
s {$sel:name:CreateEnvironmentEC2' :: Text
name = Text
a} :: CreateEnvironmentEC2)
createEnvironmentEC2_instanceType :: Lens.Lens' CreateEnvironmentEC2 Prelude.Text
createEnvironmentEC2_instanceType :: (Text -> f Text) -> CreateEnvironmentEC2 -> f CreateEnvironmentEC2
createEnvironmentEC2_instanceType = (CreateEnvironmentEC2 -> Text)
-> (CreateEnvironmentEC2 -> Text -> CreateEnvironmentEC2)
-> Lens CreateEnvironmentEC2 CreateEnvironmentEC2 Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2' {Text
instanceType :: Text
$sel:instanceType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
instanceType} -> Text
instanceType) (\s :: CreateEnvironmentEC2
s@CreateEnvironmentEC2' {} Text
a -> CreateEnvironmentEC2
s {$sel:instanceType:CreateEnvironmentEC2' :: Text
instanceType = Text
a} :: CreateEnvironmentEC2)
instance Core.AWSRequest CreateEnvironmentEC2 where
type
AWSResponse CreateEnvironmentEC2 =
CreateEnvironmentEC2Response
request :: CreateEnvironmentEC2 -> Request CreateEnvironmentEC2
request = Service -> CreateEnvironmentEC2 -> Request CreateEnvironmentEC2
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateEnvironmentEC2
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateEnvironmentEC2)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateEnvironmentEC2))
-> Logger
-> Service
-> Proxy CreateEnvironmentEC2
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateEnvironmentEC2)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateEnvironmentEC2Response
CreateEnvironmentEC2Response'
(Maybe Text -> Int -> CreateEnvironmentEC2Response)
-> Either String (Maybe Text)
-> Either String (Int -> CreateEnvironmentEC2Response)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"environmentId")
Either String (Int -> CreateEnvironmentEC2Response)
-> Either String Int -> Either String CreateEnvironmentEC2Response
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateEnvironmentEC2
instance Prelude.NFData CreateEnvironmentEC2
instance Core.ToHeaders CreateEnvironmentEC2 where
toHeaders :: CreateEnvironmentEC2 -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateEnvironmentEC2 -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSCloud9WorkspaceManagementService.CreateEnvironmentEC2" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateEnvironmentEC2 where
toJSON :: CreateEnvironmentEC2 -> Value
toJSON CreateEnvironmentEC2' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive [Sensitive Tag])
Maybe (Sensitive Text)
Maybe ConnectionType
Text
instanceType :: Text
name :: Text
tags :: Maybe (Sensitive [Sensitive Tag])
dryRun :: Maybe Bool
description :: Maybe (Sensitive Text)
connectionType :: Maybe ConnectionType
clientRequestToken :: Maybe Text
imageId :: Maybe Text
ownerArn :: Maybe Text
subnetId :: Maybe Text
automaticStopTimeMinutes :: Maybe Int
$sel:instanceType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
$sel:name:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Text
$sel:tags:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive [Sensitive Tag])
$sel:dryRun:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Bool
$sel:description:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe (Sensitive Text)
$sel:connectionType:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe ConnectionType
$sel:clientRequestToken:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:imageId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:ownerArn:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:subnetId:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Text
$sel:automaticStopTimeMinutes:CreateEnvironmentEC2' :: CreateEnvironmentEC2 -> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"automaticStopTimeMinutes" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
automaticStopTimeMinutes,
(Text
"subnetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
subnetId,
(Text
"ownerArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ownerArn,
(Text
"imageId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageId,
(Text
"clientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
(Text
"connectionType" Text -> ConnectionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ConnectionType -> Pair) -> Maybe ConnectionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionType
connectionType,
(Text
"description" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
description,
(Text
"dryRun" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
dryRun,
(Text
"tags" Text -> Sensitive [Sensitive Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive [Sensitive Tag] -> Pair)
-> Maybe (Sensitive [Sensitive Tag]) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive [Sensitive Tag])
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"instanceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
instanceType)
]
)
instance Core.ToPath CreateEnvironmentEC2 where
toPath :: CreateEnvironmentEC2 -> ByteString
toPath = ByteString -> CreateEnvironmentEC2 -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateEnvironmentEC2 where
toQuery :: CreateEnvironmentEC2 -> QueryString
toQuery = QueryString -> CreateEnvironmentEC2 -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateEnvironmentEC2Response = CreateEnvironmentEC2Response'
{
CreateEnvironmentEC2Response -> Maybe Text
environmentId :: Prelude.Maybe Prelude.Text,
CreateEnvironmentEC2Response -> Int
httpStatus :: Prelude.Int
}
deriving (CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
(CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool)
-> (CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool)
-> Eq CreateEnvironmentEC2Response
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
$c/= :: CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
== :: CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
$c== :: CreateEnvironmentEC2Response
-> CreateEnvironmentEC2Response -> Bool
Prelude.Eq, ReadPrec [CreateEnvironmentEC2Response]
ReadPrec CreateEnvironmentEC2Response
Int -> ReadS CreateEnvironmentEC2Response
ReadS [CreateEnvironmentEC2Response]
(Int -> ReadS CreateEnvironmentEC2Response)
-> ReadS [CreateEnvironmentEC2Response]
-> ReadPrec CreateEnvironmentEC2Response
-> ReadPrec [CreateEnvironmentEC2Response]
-> Read CreateEnvironmentEC2Response
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEnvironmentEC2Response]
$creadListPrec :: ReadPrec [CreateEnvironmentEC2Response]
readPrec :: ReadPrec CreateEnvironmentEC2Response
$creadPrec :: ReadPrec CreateEnvironmentEC2Response
readList :: ReadS [CreateEnvironmentEC2Response]
$creadList :: ReadS [CreateEnvironmentEC2Response]
readsPrec :: Int -> ReadS CreateEnvironmentEC2Response
$creadsPrec :: Int -> ReadS CreateEnvironmentEC2Response
Prelude.Read, Int -> CreateEnvironmentEC2Response -> ShowS
[CreateEnvironmentEC2Response] -> ShowS
CreateEnvironmentEC2Response -> String
(Int -> CreateEnvironmentEC2Response -> ShowS)
-> (CreateEnvironmentEC2Response -> String)
-> ([CreateEnvironmentEC2Response] -> ShowS)
-> Show CreateEnvironmentEC2Response
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEnvironmentEC2Response] -> ShowS
$cshowList :: [CreateEnvironmentEC2Response] -> ShowS
show :: CreateEnvironmentEC2Response -> String
$cshow :: CreateEnvironmentEC2Response -> String
showsPrec :: Int -> CreateEnvironmentEC2Response -> ShowS
$cshowsPrec :: Int -> CreateEnvironmentEC2Response -> ShowS
Prelude.Show, (forall x.
CreateEnvironmentEC2Response -> Rep CreateEnvironmentEC2Response x)
-> (forall x.
Rep CreateEnvironmentEC2Response x -> CreateEnvironmentEC2Response)
-> Generic CreateEnvironmentEC2Response
forall x.
Rep CreateEnvironmentEC2Response x -> CreateEnvironmentEC2Response
forall x.
CreateEnvironmentEC2Response -> Rep CreateEnvironmentEC2Response x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEnvironmentEC2Response x -> CreateEnvironmentEC2Response
$cfrom :: forall x.
CreateEnvironmentEC2Response -> Rep CreateEnvironmentEC2Response x
Prelude.Generic)
newCreateEnvironmentEC2Response ::
Prelude.Int ->
CreateEnvironmentEC2Response
newCreateEnvironmentEC2Response :: Int -> CreateEnvironmentEC2Response
newCreateEnvironmentEC2Response Int
pHttpStatus_ =
CreateEnvironmentEC2Response' :: Maybe Text -> Int -> CreateEnvironmentEC2Response
CreateEnvironmentEC2Response'
{ $sel:environmentId:CreateEnvironmentEC2Response' :: Maybe Text
environmentId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateEnvironmentEC2Response' :: Int
httpStatus = Int
pHttpStatus_
}
createEnvironmentEC2Response_environmentId :: Lens.Lens' CreateEnvironmentEC2Response (Prelude.Maybe Prelude.Text)
createEnvironmentEC2Response_environmentId :: (Maybe Text -> f (Maybe Text))
-> CreateEnvironmentEC2Response -> f CreateEnvironmentEC2Response
createEnvironmentEC2Response_environmentId = (CreateEnvironmentEC2Response -> Maybe Text)
-> (CreateEnvironmentEC2Response
-> Maybe Text -> CreateEnvironmentEC2Response)
-> Lens
CreateEnvironmentEC2Response
CreateEnvironmentEC2Response
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2Response' {Maybe Text
environmentId :: Maybe Text
$sel:environmentId:CreateEnvironmentEC2Response' :: CreateEnvironmentEC2Response -> Maybe Text
environmentId} -> Maybe Text
environmentId) (\s :: CreateEnvironmentEC2Response
s@CreateEnvironmentEC2Response' {} Maybe Text
a -> CreateEnvironmentEC2Response
s {$sel:environmentId:CreateEnvironmentEC2Response' :: Maybe Text
environmentId = Maybe Text
a} :: CreateEnvironmentEC2Response)
createEnvironmentEC2Response_httpStatus :: Lens.Lens' CreateEnvironmentEC2Response Prelude.Int
createEnvironmentEC2Response_httpStatus :: (Int -> f Int)
-> CreateEnvironmentEC2Response -> f CreateEnvironmentEC2Response
createEnvironmentEC2Response_httpStatus = (CreateEnvironmentEC2Response -> Int)
-> (CreateEnvironmentEC2Response
-> Int -> CreateEnvironmentEC2Response)
-> Lens
CreateEnvironmentEC2Response CreateEnvironmentEC2Response Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEnvironmentEC2Response' {Int
httpStatus :: Int
$sel:httpStatus:CreateEnvironmentEC2Response' :: CreateEnvironmentEC2Response -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateEnvironmentEC2Response
s@CreateEnvironmentEC2Response' {} Int
a -> CreateEnvironmentEC2Response
s {$sel:httpStatus:CreateEnvironmentEC2Response' :: Int
httpStatus = Int
a} :: CreateEnvironmentEC2Response)
instance Prelude.NFData CreateEnvironmentEC2Response