{-# 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.SageMaker.CreateDomain
(
CreateDomain (..),
newCreateDomain,
createDomain_homeEfsFileSystemKmsKeyId,
createDomain_kmsKeyId,
createDomain_appNetworkAccessType,
createDomain_tags,
createDomain_domainName,
createDomain_authMode,
createDomain_defaultUserSettings,
createDomain_subnetIds,
createDomain_vpcId,
CreateDomainResponse (..),
newCreateDomainResponse,
createDomainResponse_domainArn,
createDomainResponse_url,
createDomainResponse_httpStatus,
)
where
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
import Amazonka.SageMaker.Types
data CreateDomain = CreateDomain'
{
CreateDomain -> Maybe Text
homeEfsFileSystemKmsKeyId :: Prelude.Maybe Prelude.Text,
CreateDomain -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
CreateDomain -> Maybe AppNetworkAccessType
appNetworkAccessType :: Prelude.Maybe AppNetworkAccessType,
CreateDomain -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateDomain -> Text
domainName :: Prelude.Text,
CreateDomain -> AuthMode
authMode :: AuthMode,
CreateDomain -> UserSettings
defaultUserSettings :: UserSettings,
CreateDomain -> NonEmpty Text
subnetIds :: Prelude.NonEmpty Prelude.Text,
CreateDomain -> Text
vpcId :: Prelude.Text
}
deriving (CreateDomain -> CreateDomain -> Bool
(CreateDomain -> CreateDomain -> Bool)
-> (CreateDomain -> CreateDomain -> Bool) -> Eq CreateDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDomain -> CreateDomain -> Bool
$c/= :: CreateDomain -> CreateDomain -> Bool
== :: CreateDomain -> CreateDomain -> Bool
$c== :: CreateDomain -> CreateDomain -> Bool
Prelude.Eq, ReadPrec [CreateDomain]
ReadPrec CreateDomain
Int -> ReadS CreateDomain
ReadS [CreateDomain]
(Int -> ReadS CreateDomain)
-> ReadS [CreateDomain]
-> ReadPrec CreateDomain
-> ReadPrec [CreateDomain]
-> Read CreateDomain
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDomain]
$creadListPrec :: ReadPrec [CreateDomain]
readPrec :: ReadPrec CreateDomain
$creadPrec :: ReadPrec CreateDomain
readList :: ReadS [CreateDomain]
$creadList :: ReadS [CreateDomain]
readsPrec :: Int -> ReadS CreateDomain
$creadsPrec :: Int -> ReadS CreateDomain
Prelude.Read, Int -> CreateDomain -> ShowS
[CreateDomain] -> ShowS
CreateDomain -> String
(Int -> CreateDomain -> ShowS)
-> (CreateDomain -> String)
-> ([CreateDomain] -> ShowS)
-> Show CreateDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDomain] -> ShowS
$cshowList :: [CreateDomain] -> ShowS
show :: CreateDomain -> String
$cshow :: CreateDomain -> String
showsPrec :: Int -> CreateDomain -> ShowS
$cshowsPrec :: Int -> CreateDomain -> ShowS
Prelude.Show, (forall x. CreateDomain -> Rep CreateDomain x)
-> (forall x. Rep CreateDomain x -> CreateDomain)
-> Generic CreateDomain
forall x. Rep CreateDomain x -> CreateDomain
forall x. CreateDomain -> Rep CreateDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDomain x -> CreateDomain
$cfrom :: forall x. CreateDomain -> Rep CreateDomain x
Prelude.Generic)
newCreateDomain ::
Prelude.Text ->
AuthMode ->
UserSettings ->
Prelude.NonEmpty Prelude.Text ->
Prelude.Text ->
CreateDomain
newCreateDomain :: Text
-> AuthMode
-> UserSettings
-> NonEmpty Text
-> Text
-> CreateDomain
newCreateDomain
Text
pDomainName_
AuthMode
pAuthMode_
UserSettings
pDefaultUserSettings_
NonEmpty Text
pSubnetIds_
Text
pVpcId_ =
CreateDomain' :: Maybe Text
-> Maybe Text
-> Maybe AppNetworkAccessType
-> Maybe [Tag]
-> Text
-> AuthMode
-> UserSettings
-> NonEmpty Text
-> Text
-> CreateDomain
CreateDomain'
{ $sel:homeEfsFileSystemKmsKeyId:CreateDomain' :: Maybe Text
homeEfsFileSystemKmsKeyId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:CreateDomain' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:appNetworkAccessType:CreateDomain' :: Maybe AppNetworkAccessType
appNetworkAccessType = Maybe AppNetworkAccessType
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateDomain' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:CreateDomain' :: Text
domainName = Text
pDomainName_,
$sel:authMode:CreateDomain' :: AuthMode
authMode = AuthMode
pAuthMode_,
$sel:defaultUserSettings:CreateDomain' :: UserSettings
defaultUserSettings = UserSettings
pDefaultUserSettings_,
$sel:subnetIds:CreateDomain' :: NonEmpty Text
subnetIds = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pSubnetIds_,
$sel:vpcId:CreateDomain' :: Text
vpcId = Text
pVpcId_
}
createDomain_homeEfsFileSystemKmsKeyId :: Lens.Lens' CreateDomain (Prelude.Maybe Prelude.Text)
createDomain_homeEfsFileSystemKmsKeyId :: (Maybe Text -> f (Maybe Text)) -> CreateDomain -> f CreateDomain
createDomain_homeEfsFileSystemKmsKeyId = (CreateDomain -> Maybe Text)
-> (CreateDomain -> Maybe Text -> CreateDomain)
-> Lens CreateDomain CreateDomain (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomain' {Maybe Text
homeEfsFileSystemKmsKeyId :: Maybe Text
$sel:homeEfsFileSystemKmsKeyId:CreateDomain' :: CreateDomain -> Maybe Text
homeEfsFileSystemKmsKeyId} -> Maybe Text
homeEfsFileSystemKmsKeyId) (\s :: CreateDomain
s@CreateDomain' {} Maybe Text
a -> CreateDomain
s {$sel:homeEfsFileSystemKmsKeyId:CreateDomain' :: Maybe Text
homeEfsFileSystemKmsKeyId = Maybe Text
a} :: CreateDomain)
createDomain_kmsKeyId :: Lens.Lens' CreateDomain (Prelude.Maybe Prelude.Text)
createDomain_kmsKeyId :: (Maybe Text -> f (Maybe Text)) -> CreateDomain -> f CreateDomain
createDomain_kmsKeyId = (CreateDomain -> Maybe Text)
-> (CreateDomain -> Maybe Text -> CreateDomain)
-> Lens CreateDomain CreateDomain (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomain' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:CreateDomain' :: CreateDomain -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: CreateDomain
s@CreateDomain' {} Maybe Text
a -> CreateDomain
s {$sel:kmsKeyId:CreateDomain' :: Maybe Text
kmsKeyId = Maybe Text
a} :: CreateDomain)
createDomain_appNetworkAccessType :: Lens.Lens' CreateDomain (Prelude.Maybe AppNetworkAccessType)
createDomain_appNetworkAccessType :: (Maybe AppNetworkAccessType -> f (Maybe AppNetworkAccessType))
-> CreateDomain -> f CreateDomain
createDomain_appNetworkAccessType = (CreateDomain -> Maybe AppNetworkAccessType)
-> (CreateDomain -> Maybe AppNetworkAccessType -> CreateDomain)
-> Lens
CreateDomain
CreateDomain
(Maybe AppNetworkAccessType)
(Maybe AppNetworkAccessType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomain' {Maybe AppNetworkAccessType
appNetworkAccessType :: Maybe AppNetworkAccessType
$sel:appNetworkAccessType:CreateDomain' :: CreateDomain -> Maybe AppNetworkAccessType
appNetworkAccessType} -> Maybe AppNetworkAccessType
appNetworkAccessType) (\s :: CreateDomain
s@CreateDomain' {} Maybe AppNetworkAccessType
a -> CreateDomain
s {$sel:appNetworkAccessType:CreateDomain' :: Maybe AppNetworkAccessType
appNetworkAccessType = Maybe AppNetworkAccessType
a} :: CreateDomain)
createDomain_tags :: Lens.Lens' CreateDomain (Prelude.Maybe [Tag])
createDomain_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> CreateDomain -> f CreateDomain
createDomain_tags = (CreateDomain -> Maybe [Tag])
-> (CreateDomain -> Maybe [Tag] -> CreateDomain)
-> Lens CreateDomain CreateDomain (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomain' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDomain' :: CreateDomain -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDomain
s@CreateDomain' {} Maybe [Tag]
a -> CreateDomain
s {$sel:tags:CreateDomain' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDomain) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDomain -> f CreateDomain)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDomain
-> f CreateDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [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 AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createDomain_domainName :: Lens.Lens' CreateDomain Prelude.Text
createDomain_domainName :: (Text -> f Text) -> CreateDomain -> f CreateDomain
createDomain_domainName = (CreateDomain -> Text)
-> (CreateDomain -> Text -> CreateDomain)
-> Lens CreateDomain CreateDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomain' {Text
domainName :: Text
$sel:domainName:CreateDomain' :: CreateDomain -> Text
domainName} -> Text
domainName) (\s :: CreateDomain
s@CreateDomain' {} Text
a -> CreateDomain
s {$sel:domainName:CreateDomain' :: Text
domainName = Text
a} :: CreateDomain)
createDomain_authMode :: Lens.Lens' CreateDomain AuthMode
createDomain_authMode :: (AuthMode -> f AuthMode) -> CreateDomain -> f CreateDomain
createDomain_authMode = (CreateDomain -> AuthMode)
-> (CreateDomain -> AuthMode -> CreateDomain)
-> Lens CreateDomain CreateDomain AuthMode AuthMode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomain' {AuthMode
authMode :: AuthMode
$sel:authMode:CreateDomain' :: CreateDomain -> AuthMode
authMode} -> AuthMode
authMode) (\s :: CreateDomain
s@CreateDomain' {} AuthMode
a -> CreateDomain
s {$sel:authMode:CreateDomain' :: AuthMode
authMode = AuthMode
a} :: CreateDomain)
createDomain_defaultUserSettings :: Lens.Lens' CreateDomain UserSettings
createDomain_defaultUserSettings :: (UserSettings -> f UserSettings) -> CreateDomain -> f CreateDomain
createDomain_defaultUserSettings = (CreateDomain -> UserSettings)
-> (CreateDomain -> UserSettings -> CreateDomain)
-> Lens CreateDomain CreateDomain UserSettings UserSettings
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomain' {UserSettings
defaultUserSettings :: UserSettings
$sel:defaultUserSettings:CreateDomain' :: CreateDomain -> UserSettings
defaultUserSettings} -> UserSettings
defaultUserSettings) (\s :: CreateDomain
s@CreateDomain' {} UserSettings
a -> CreateDomain
s {$sel:defaultUserSettings:CreateDomain' :: UserSettings
defaultUserSettings = UserSettings
a} :: CreateDomain)
createDomain_subnetIds :: Lens.Lens' CreateDomain (Prelude.NonEmpty Prelude.Text)
createDomain_subnetIds :: (NonEmpty Text -> f (NonEmpty Text))
-> CreateDomain -> f CreateDomain
createDomain_subnetIds = (CreateDomain -> NonEmpty Text)
-> (CreateDomain -> NonEmpty Text -> CreateDomain)
-> Lens CreateDomain CreateDomain (NonEmpty Text) (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomain' {NonEmpty Text
subnetIds :: NonEmpty Text
$sel:subnetIds:CreateDomain' :: CreateDomain -> NonEmpty Text
subnetIds} -> NonEmpty Text
subnetIds) (\s :: CreateDomain
s@CreateDomain' {} NonEmpty Text
a -> CreateDomain
s {$sel:subnetIds:CreateDomain' :: NonEmpty Text
subnetIds = NonEmpty Text
a} :: CreateDomain) ((NonEmpty Text -> f (NonEmpty Text))
-> CreateDomain -> f CreateDomain)
-> ((NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> CreateDomain
-> f CreateDomain
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createDomain_vpcId :: Lens.Lens' CreateDomain Prelude.Text
createDomain_vpcId :: (Text -> f Text) -> CreateDomain -> f CreateDomain
createDomain_vpcId = (CreateDomain -> Text)
-> (CreateDomain -> Text -> CreateDomain)
-> Lens CreateDomain CreateDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomain' {Text
vpcId :: Text
$sel:vpcId:CreateDomain' :: CreateDomain -> Text
vpcId} -> Text
vpcId) (\s :: CreateDomain
s@CreateDomain' {} Text
a -> CreateDomain
s {$sel:vpcId:CreateDomain' :: Text
vpcId = Text
a} :: CreateDomain)
instance Core.AWSRequest CreateDomain where
type AWSResponse CreateDomain = CreateDomainResponse
request :: CreateDomain -> Request CreateDomain
request = Service -> CreateDomain -> Request CreateDomain
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDomain)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateDomain))
-> Logger
-> Service
-> Proxy CreateDomain
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDomain)))
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 -> Maybe Text -> Int -> CreateDomainResponse
CreateDomainResponse'
(Maybe Text -> Maybe Text -> Int -> CreateDomainResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateDomainResponse)
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
"DomainArn")
Either String (Maybe Text -> Int -> CreateDomainResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateDomainResponse)
forall (f :: * -> *) a b. Applicative f => 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
"Url")
Either String (Int -> CreateDomainResponse)
-> Either String Int -> Either String CreateDomainResponse
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 CreateDomain
instance Prelude.NFData CreateDomain
instance Core.ToHeaders CreateDomain where
toHeaders :: CreateDomain -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateDomain -> 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
"SageMaker.CreateDomain" :: 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 CreateDomain where
toJSON :: CreateDomain -> Value
toJSON CreateDomain' {Maybe [Tag]
Maybe Text
Maybe AppNetworkAccessType
NonEmpty Text
Text
AuthMode
UserSettings
vpcId :: Text
subnetIds :: NonEmpty Text
defaultUserSettings :: UserSettings
authMode :: AuthMode
domainName :: Text
tags :: Maybe [Tag]
appNetworkAccessType :: Maybe AppNetworkAccessType
kmsKeyId :: Maybe Text
homeEfsFileSystemKmsKeyId :: Maybe Text
$sel:vpcId:CreateDomain' :: CreateDomain -> Text
$sel:subnetIds:CreateDomain' :: CreateDomain -> NonEmpty Text
$sel:defaultUserSettings:CreateDomain' :: CreateDomain -> UserSettings
$sel:authMode:CreateDomain' :: CreateDomain -> AuthMode
$sel:domainName:CreateDomain' :: CreateDomain -> Text
$sel:tags:CreateDomain' :: CreateDomain -> Maybe [Tag]
$sel:appNetworkAccessType:CreateDomain' :: CreateDomain -> Maybe AppNetworkAccessType
$sel:kmsKeyId:CreateDomain' :: CreateDomain -> Maybe Text
$sel:homeEfsFileSystemKmsKeyId:CreateDomain' :: CreateDomain -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"HomeEfsFileSystemKmsKeyId" 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
homeEfsFileSystemKmsKeyId,
(Text
"KmsKeyId" 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
kmsKeyId,
(Text
"AppNetworkAccessType" Text -> AppNetworkAccessType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AppNetworkAccessType -> Pair)
-> Maybe AppNetworkAccessType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AppNetworkAccessType
appNetworkAccessType,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AuthMode" Text -> AuthMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AuthMode
authMode),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DefaultUserSettings" Text -> UserSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= UserSettings
defaultUserSettings),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SubnetIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
subnetIds),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"VpcId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vpcId)
]
)
instance Core.ToPath CreateDomain where
toPath :: CreateDomain -> ByteString
toPath = ByteString -> CreateDomain -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateDomain where
toQuery :: CreateDomain -> QueryString
toQuery = QueryString -> CreateDomain -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateDomainResponse = CreateDomainResponse'
{
CreateDomainResponse -> Maybe Text
domainArn :: Prelude.Maybe Prelude.Text,
CreateDomainResponse -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
CreateDomainResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateDomainResponse -> CreateDomainResponse -> Bool
(CreateDomainResponse -> CreateDomainResponse -> Bool)
-> (CreateDomainResponse -> CreateDomainResponse -> Bool)
-> Eq CreateDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDomainResponse -> CreateDomainResponse -> Bool
$c/= :: CreateDomainResponse -> CreateDomainResponse -> Bool
== :: CreateDomainResponse -> CreateDomainResponse -> Bool
$c== :: CreateDomainResponse -> CreateDomainResponse -> Bool
Prelude.Eq, ReadPrec [CreateDomainResponse]
ReadPrec CreateDomainResponse
Int -> ReadS CreateDomainResponse
ReadS [CreateDomainResponse]
(Int -> ReadS CreateDomainResponse)
-> ReadS [CreateDomainResponse]
-> ReadPrec CreateDomainResponse
-> ReadPrec [CreateDomainResponse]
-> Read CreateDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDomainResponse]
$creadListPrec :: ReadPrec [CreateDomainResponse]
readPrec :: ReadPrec CreateDomainResponse
$creadPrec :: ReadPrec CreateDomainResponse
readList :: ReadS [CreateDomainResponse]
$creadList :: ReadS [CreateDomainResponse]
readsPrec :: Int -> ReadS CreateDomainResponse
$creadsPrec :: Int -> ReadS CreateDomainResponse
Prelude.Read, Int -> CreateDomainResponse -> ShowS
[CreateDomainResponse] -> ShowS
CreateDomainResponse -> String
(Int -> CreateDomainResponse -> ShowS)
-> (CreateDomainResponse -> String)
-> ([CreateDomainResponse] -> ShowS)
-> Show CreateDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDomainResponse] -> ShowS
$cshowList :: [CreateDomainResponse] -> ShowS
show :: CreateDomainResponse -> String
$cshow :: CreateDomainResponse -> String
showsPrec :: Int -> CreateDomainResponse -> ShowS
$cshowsPrec :: Int -> CreateDomainResponse -> ShowS
Prelude.Show, (forall x. CreateDomainResponse -> Rep CreateDomainResponse x)
-> (forall x. Rep CreateDomainResponse x -> CreateDomainResponse)
-> Generic CreateDomainResponse
forall x. Rep CreateDomainResponse x -> CreateDomainResponse
forall x. CreateDomainResponse -> Rep CreateDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDomainResponse x -> CreateDomainResponse
$cfrom :: forall x. CreateDomainResponse -> Rep CreateDomainResponse x
Prelude.Generic)
newCreateDomainResponse ::
Prelude.Int ->
CreateDomainResponse
newCreateDomainResponse :: Int -> CreateDomainResponse
newCreateDomainResponse Int
pHttpStatus_ =
CreateDomainResponse' :: Maybe Text -> Maybe Text -> Int -> CreateDomainResponse
CreateDomainResponse'
{ $sel:domainArn:CreateDomainResponse' :: Maybe Text
domainArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:url:CreateDomainResponse' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateDomainResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createDomainResponse_domainArn :: Lens.Lens' CreateDomainResponse (Prelude.Maybe Prelude.Text)
createDomainResponse_domainArn :: (Maybe Text -> f (Maybe Text))
-> CreateDomainResponse -> f CreateDomainResponse
createDomainResponse_domainArn = (CreateDomainResponse -> Maybe Text)
-> (CreateDomainResponse -> Maybe Text -> CreateDomainResponse)
-> Lens
CreateDomainResponse CreateDomainResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainResponse' {Maybe Text
domainArn :: Maybe Text
$sel:domainArn:CreateDomainResponse' :: CreateDomainResponse -> Maybe Text
domainArn} -> Maybe Text
domainArn) (\s :: CreateDomainResponse
s@CreateDomainResponse' {} Maybe Text
a -> CreateDomainResponse
s {$sel:domainArn:CreateDomainResponse' :: Maybe Text
domainArn = Maybe Text
a} :: CreateDomainResponse)
createDomainResponse_url :: Lens.Lens' CreateDomainResponse (Prelude.Maybe Prelude.Text)
createDomainResponse_url :: (Maybe Text -> f (Maybe Text))
-> CreateDomainResponse -> f CreateDomainResponse
createDomainResponse_url = (CreateDomainResponse -> Maybe Text)
-> (CreateDomainResponse -> Maybe Text -> CreateDomainResponse)
-> Lens
CreateDomainResponse CreateDomainResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainResponse' {Maybe Text
url :: Maybe Text
$sel:url:CreateDomainResponse' :: CreateDomainResponse -> Maybe Text
url} -> Maybe Text
url) (\s :: CreateDomainResponse
s@CreateDomainResponse' {} Maybe Text
a -> CreateDomainResponse
s {$sel:url:CreateDomainResponse' :: Maybe Text
url = Maybe Text
a} :: CreateDomainResponse)
createDomainResponse_httpStatus :: Lens.Lens' CreateDomainResponse Prelude.Int
createDomainResponse_httpStatus :: (Int -> f Int) -> CreateDomainResponse -> f CreateDomainResponse
createDomainResponse_httpStatus = (CreateDomainResponse -> Int)
-> (CreateDomainResponse -> Int -> CreateDomainResponse)
-> Lens CreateDomainResponse CreateDomainResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDomainResponse' :: CreateDomainResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDomainResponse
s@CreateDomainResponse' {} Int
a -> CreateDomainResponse
s {$sel:httpStatus:CreateDomainResponse' :: Int
httpStatus = Int
a} :: CreateDomainResponse)
instance Prelude.NFData CreateDomainResponse