{-# 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.APIGateway.CreateDomainName
(
CreateDomainName (..),
newCreateDomainName,
createDomainName_certificateName,
createDomainName_ownershipVerificationCertificateArn,
createDomainName_regionalCertificateArn,
createDomainName_certificateArn,
createDomainName_securityPolicy,
createDomainName_mutualTlsAuthentication,
createDomainName_certificatePrivateKey,
createDomainName_regionalCertificateName,
createDomainName_certificateBody,
createDomainName_certificateChain,
createDomainName_endpointConfiguration,
createDomainName_tags,
createDomainName_domainName,
DomainName (..),
newDomainName,
domainName_regionalHostedZoneId,
domainName_certificateName,
domainName_ownershipVerificationCertificateArn,
domainName_regionalCertificateArn,
domainName_certificateArn,
domainName_distributionHostedZoneId,
domainName_securityPolicy,
domainName_domainName,
domainName_mutualTlsAuthentication,
domainName_regionalCertificateName,
domainName_regionalDomainName,
domainName_certificateUploadDate,
domainName_distributionDomainName,
domainName_domainNameStatusMessage,
domainName_endpointConfiguration,
domainName_domainNameStatus,
domainName_tags,
)
where
import Amazonka.APIGateway.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 CreateDomainName = CreateDomainName'
{
CreateDomainName -> Maybe Text
certificateName :: Prelude.Maybe Prelude.Text,
CreateDomainName -> Maybe Text
ownershipVerificationCertificateArn :: Prelude.Maybe Prelude.Text,
CreateDomainName -> Maybe Text
regionalCertificateArn :: Prelude.Maybe Prelude.Text,
CreateDomainName -> Maybe Text
certificateArn :: Prelude.Maybe Prelude.Text,
CreateDomainName -> Maybe SecurityPolicy
securityPolicy :: Prelude.Maybe SecurityPolicy,
CreateDomainName -> Maybe MutualTlsAuthenticationInput
mutualTlsAuthentication :: Prelude.Maybe MutualTlsAuthenticationInput,
CreateDomainName -> Maybe Text
certificatePrivateKey :: Prelude.Maybe Prelude.Text,
CreateDomainName -> Maybe Text
regionalCertificateName :: Prelude.Maybe Prelude.Text,
CreateDomainName -> Maybe Text
certificateBody :: Prelude.Maybe Prelude.Text,
CreateDomainName -> Maybe Text
certificateChain :: Prelude.Maybe Prelude.Text,
CreateDomainName -> Maybe EndpointConfiguration
endpointConfiguration :: Prelude.Maybe EndpointConfiguration,
CreateDomainName -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateDomainName -> Text
domainName :: Prelude.Text
}
deriving (CreateDomainName -> CreateDomainName -> Bool
(CreateDomainName -> CreateDomainName -> Bool)
-> (CreateDomainName -> CreateDomainName -> Bool)
-> Eq CreateDomainName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDomainName -> CreateDomainName -> Bool
$c/= :: CreateDomainName -> CreateDomainName -> Bool
== :: CreateDomainName -> CreateDomainName -> Bool
$c== :: CreateDomainName -> CreateDomainName -> Bool
Prelude.Eq, ReadPrec [CreateDomainName]
ReadPrec CreateDomainName
Int -> ReadS CreateDomainName
ReadS [CreateDomainName]
(Int -> ReadS CreateDomainName)
-> ReadS [CreateDomainName]
-> ReadPrec CreateDomainName
-> ReadPrec [CreateDomainName]
-> Read CreateDomainName
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDomainName]
$creadListPrec :: ReadPrec [CreateDomainName]
readPrec :: ReadPrec CreateDomainName
$creadPrec :: ReadPrec CreateDomainName
readList :: ReadS [CreateDomainName]
$creadList :: ReadS [CreateDomainName]
readsPrec :: Int -> ReadS CreateDomainName
$creadsPrec :: Int -> ReadS CreateDomainName
Prelude.Read, Int -> CreateDomainName -> ShowS
[CreateDomainName] -> ShowS
CreateDomainName -> String
(Int -> CreateDomainName -> ShowS)
-> (CreateDomainName -> String)
-> ([CreateDomainName] -> ShowS)
-> Show CreateDomainName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDomainName] -> ShowS
$cshowList :: [CreateDomainName] -> ShowS
show :: CreateDomainName -> String
$cshow :: CreateDomainName -> String
showsPrec :: Int -> CreateDomainName -> ShowS
$cshowsPrec :: Int -> CreateDomainName -> ShowS
Prelude.Show, (forall x. CreateDomainName -> Rep CreateDomainName x)
-> (forall x. Rep CreateDomainName x -> CreateDomainName)
-> Generic CreateDomainName
forall x. Rep CreateDomainName x -> CreateDomainName
forall x. CreateDomainName -> Rep CreateDomainName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDomainName x -> CreateDomainName
$cfrom :: forall x. CreateDomainName -> Rep CreateDomainName x
Prelude.Generic)
newCreateDomainName ::
Prelude.Text ->
CreateDomainName
newCreateDomainName :: Text -> CreateDomainName
newCreateDomainName Text
pDomainName_ =
CreateDomainName' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SecurityPolicy
-> Maybe MutualTlsAuthenticationInput
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EndpointConfiguration
-> Maybe (HashMap Text Text)
-> Text
-> CreateDomainName
CreateDomainName'
{ $sel:certificateName:CreateDomainName' :: Maybe Text
certificateName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ownershipVerificationCertificateArn:CreateDomainName' :: Maybe Text
ownershipVerificationCertificateArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:regionalCertificateArn:CreateDomainName' :: Maybe Text
regionalCertificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificateArn:CreateDomainName' :: Maybe Text
certificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:securityPolicy:CreateDomainName' :: Maybe SecurityPolicy
securityPolicy = Maybe SecurityPolicy
forall a. Maybe a
Prelude.Nothing,
$sel:mutualTlsAuthentication:CreateDomainName' :: Maybe MutualTlsAuthenticationInput
mutualTlsAuthentication = Maybe MutualTlsAuthenticationInput
forall a. Maybe a
Prelude.Nothing,
$sel:certificatePrivateKey:CreateDomainName' :: Maybe Text
certificatePrivateKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:regionalCertificateName:CreateDomainName' :: Maybe Text
regionalCertificateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificateBody:CreateDomainName' :: Maybe Text
certificateBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificateChain:CreateDomainName' :: Maybe Text
certificateChain = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endpointConfiguration:CreateDomainName' :: Maybe EndpointConfiguration
endpointConfiguration = Maybe EndpointConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateDomainName' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:domainName:CreateDomainName' :: Text
domainName = Text
pDomainName_
}
createDomainName_certificateName :: Lens.Lens' CreateDomainName (Prelude.Maybe Prelude.Text)
createDomainName_certificateName :: (Maybe Text -> f (Maybe Text))
-> CreateDomainName -> f CreateDomainName
createDomainName_certificateName = (CreateDomainName -> Maybe Text)
-> (CreateDomainName -> Maybe Text -> CreateDomainName)
-> Lens CreateDomainName CreateDomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe Text
certificateName :: Maybe Text
$sel:certificateName:CreateDomainName' :: CreateDomainName -> Maybe Text
certificateName} -> Maybe Text
certificateName) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe Text
a -> CreateDomainName
s {$sel:certificateName:CreateDomainName' :: Maybe Text
certificateName = Maybe Text
a} :: CreateDomainName)
createDomainName_ownershipVerificationCertificateArn :: Lens.Lens' CreateDomainName (Prelude.Maybe Prelude.Text)
createDomainName_ownershipVerificationCertificateArn :: (Maybe Text -> f (Maybe Text))
-> CreateDomainName -> f CreateDomainName
createDomainName_ownershipVerificationCertificateArn = (CreateDomainName -> Maybe Text)
-> (CreateDomainName -> Maybe Text -> CreateDomainName)
-> Lens CreateDomainName CreateDomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe Text
ownershipVerificationCertificateArn :: Maybe Text
$sel:ownershipVerificationCertificateArn:CreateDomainName' :: CreateDomainName -> Maybe Text
ownershipVerificationCertificateArn} -> Maybe Text
ownershipVerificationCertificateArn) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe Text
a -> CreateDomainName
s {$sel:ownershipVerificationCertificateArn:CreateDomainName' :: Maybe Text
ownershipVerificationCertificateArn = Maybe Text
a} :: CreateDomainName)
createDomainName_regionalCertificateArn :: Lens.Lens' CreateDomainName (Prelude.Maybe Prelude.Text)
createDomainName_regionalCertificateArn :: (Maybe Text -> f (Maybe Text))
-> CreateDomainName -> f CreateDomainName
createDomainName_regionalCertificateArn = (CreateDomainName -> Maybe Text)
-> (CreateDomainName -> Maybe Text -> CreateDomainName)
-> Lens CreateDomainName CreateDomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe Text
regionalCertificateArn :: Maybe Text
$sel:regionalCertificateArn:CreateDomainName' :: CreateDomainName -> Maybe Text
regionalCertificateArn} -> Maybe Text
regionalCertificateArn) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe Text
a -> CreateDomainName
s {$sel:regionalCertificateArn:CreateDomainName' :: Maybe Text
regionalCertificateArn = Maybe Text
a} :: CreateDomainName)
createDomainName_certificateArn :: Lens.Lens' CreateDomainName (Prelude.Maybe Prelude.Text)
createDomainName_certificateArn :: (Maybe Text -> f (Maybe Text))
-> CreateDomainName -> f CreateDomainName
createDomainName_certificateArn = (CreateDomainName -> Maybe Text)
-> (CreateDomainName -> Maybe Text -> CreateDomainName)
-> Lens CreateDomainName CreateDomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe Text
certificateArn :: Maybe Text
$sel:certificateArn:CreateDomainName' :: CreateDomainName -> Maybe Text
certificateArn} -> Maybe Text
certificateArn) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe Text
a -> CreateDomainName
s {$sel:certificateArn:CreateDomainName' :: Maybe Text
certificateArn = Maybe Text
a} :: CreateDomainName)
createDomainName_securityPolicy :: Lens.Lens' CreateDomainName (Prelude.Maybe SecurityPolicy)
createDomainName_securityPolicy :: (Maybe SecurityPolicy -> f (Maybe SecurityPolicy))
-> CreateDomainName -> f CreateDomainName
createDomainName_securityPolicy = (CreateDomainName -> Maybe SecurityPolicy)
-> (CreateDomainName -> Maybe SecurityPolicy -> CreateDomainName)
-> Lens
CreateDomainName
CreateDomainName
(Maybe SecurityPolicy)
(Maybe SecurityPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe SecurityPolicy
securityPolicy :: Maybe SecurityPolicy
$sel:securityPolicy:CreateDomainName' :: CreateDomainName -> Maybe SecurityPolicy
securityPolicy} -> Maybe SecurityPolicy
securityPolicy) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe SecurityPolicy
a -> CreateDomainName
s {$sel:securityPolicy:CreateDomainName' :: Maybe SecurityPolicy
securityPolicy = Maybe SecurityPolicy
a} :: CreateDomainName)
createDomainName_mutualTlsAuthentication :: Lens.Lens' CreateDomainName (Prelude.Maybe MutualTlsAuthenticationInput)
createDomainName_mutualTlsAuthentication :: (Maybe MutualTlsAuthenticationInput
-> f (Maybe MutualTlsAuthenticationInput))
-> CreateDomainName -> f CreateDomainName
createDomainName_mutualTlsAuthentication = (CreateDomainName -> Maybe MutualTlsAuthenticationInput)
-> (CreateDomainName
-> Maybe MutualTlsAuthenticationInput -> CreateDomainName)
-> Lens
CreateDomainName
CreateDomainName
(Maybe MutualTlsAuthenticationInput)
(Maybe MutualTlsAuthenticationInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe MutualTlsAuthenticationInput
mutualTlsAuthentication :: Maybe MutualTlsAuthenticationInput
$sel:mutualTlsAuthentication:CreateDomainName' :: CreateDomainName -> Maybe MutualTlsAuthenticationInput
mutualTlsAuthentication} -> Maybe MutualTlsAuthenticationInput
mutualTlsAuthentication) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe MutualTlsAuthenticationInput
a -> CreateDomainName
s {$sel:mutualTlsAuthentication:CreateDomainName' :: Maybe MutualTlsAuthenticationInput
mutualTlsAuthentication = Maybe MutualTlsAuthenticationInput
a} :: CreateDomainName)
createDomainName_certificatePrivateKey :: Lens.Lens' CreateDomainName (Prelude.Maybe Prelude.Text)
createDomainName_certificatePrivateKey :: (Maybe Text -> f (Maybe Text))
-> CreateDomainName -> f CreateDomainName
createDomainName_certificatePrivateKey = (CreateDomainName -> Maybe Text)
-> (CreateDomainName -> Maybe Text -> CreateDomainName)
-> Lens CreateDomainName CreateDomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe Text
certificatePrivateKey :: Maybe Text
$sel:certificatePrivateKey:CreateDomainName' :: CreateDomainName -> Maybe Text
certificatePrivateKey} -> Maybe Text
certificatePrivateKey) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe Text
a -> CreateDomainName
s {$sel:certificatePrivateKey:CreateDomainName' :: Maybe Text
certificatePrivateKey = Maybe Text
a} :: CreateDomainName)
createDomainName_regionalCertificateName :: Lens.Lens' CreateDomainName (Prelude.Maybe Prelude.Text)
createDomainName_regionalCertificateName :: (Maybe Text -> f (Maybe Text))
-> CreateDomainName -> f CreateDomainName
createDomainName_regionalCertificateName = (CreateDomainName -> Maybe Text)
-> (CreateDomainName -> Maybe Text -> CreateDomainName)
-> Lens CreateDomainName CreateDomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe Text
regionalCertificateName :: Maybe Text
$sel:regionalCertificateName:CreateDomainName' :: CreateDomainName -> Maybe Text
regionalCertificateName} -> Maybe Text
regionalCertificateName) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe Text
a -> CreateDomainName
s {$sel:regionalCertificateName:CreateDomainName' :: Maybe Text
regionalCertificateName = Maybe Text
a} :: CreateDomainName)
createDomainName_certificateBody :: Lens.Lens' CreateDomainName (Prelude.Maybe Prelude.Text)
createDomainName_certificateBody :: (Maybe Text -> f (Maybe Text))
-> CreateDomainName -> f CreateDomainName
createDomainName_certificateBody = (CreateDomainName -> Maybe Text)
-> (CreateDomainName -> Maybe Text -> CreateDomainName)
-> Lens CreateDomainName CreateDomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe Text
certificateBody :: Maybe Text
$sel:certificateBody:CreateDomainName' :: CreateDomainName -> Maybe Text
certificateBody} -> Maybe Text
certificateBody) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe Text
a -> CreateDomainName
s {$sel:certificateBody:CreateDomainName' :: Maybe Text
certificateBody = Maybe Text
a} :: CreateDomainName)
createDomainName_certificateChain :: Lens.Lens' CreateDomainName (Prelude.Maybe Prelude.Text)
createDomainName_certificateChain :: (Maybe Text -> f (Maybe Text))
-> CreateDomainName -> f CreateDomainName
createDomainName_certificateChain = (CreateDomainName -> Maybe Text)
-> (CreateDomainName -> Maybe Text -> CreateDomainName)
-> Lens CreateDomainName CreateDomainName (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe Text
certificateChain :: Maybe Text
$sel:certificateChain:CreateDomainName' :: CreateDomainName -> Maybe Text
certificateChain} -> Maybe Text
certificateChain) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe Text
a -> CreateDomainName
s {$sel:certificateChain:CreateDomainName' :: Maybe Text
certificateChain = Maybe Text
a} :: CreateDomainName)
createDomainName_endpointConfiguration :: Lens.Lens' CreateDomainName (Prelude.Maybe EndpointConfiguration)
createDomainName_endpointConfiguration :: (Maybe EndpointConfiguration -> f (Maybe EndpointConfiguration))
-> CreateDomainName -> f CreateDomainName
createDomainName_endpointConfiguration = (CreateDomainName -> Maybe EndpointConfiguration)
-> (CreateDomainName
-> Maybe EndpointConfiguration -> CreateDomainName)
-> Lens
CreateDomainName
CreateDomainName
(Maybe EndpointConfiguration)
(Maybe EndpointConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe EndpointConfiguration
endpointConfiguration :: Maybe EndpointConfiguration
$sel:endpointConfiguration:CreateDomainName' :: CreateDomainName -> Maybe EndpointConfiguration
endpointConfiguration} -> Maybe EndpointConfiguration
endpointConfiguration) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe EndpointConfiguration
a -> CreateDomainName
s {$sel:endpointConfiguration:CreateDomainName' :: Maybe EndpointConfiguration
endpointConfiguration = Maybe EndpointConfiguration
a} :: CreateDomainName)
createDomainName_tags :: Lens.Lens' CreateDomainName (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createDomainName_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateDomainName -> f CreateDomainName
createDomainName_tags = (CreateDomainName -> Maybe (HashMap Text Text))
-> (CreateDomainName
-> Maybe (HashMap Text Text) -> CreateDomainName)
-> Lens
CreateDomainName
CreateDomainName
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateDomainName' :: CreateDomainName -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateDomainName
s@CreateDomainName' {} Maybe (HashMap Text Text)
a -> CreateDomainName
s {$sel:tags:CreateDomainName' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateDomainName) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateDomainName -> f CreateDomainName)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateDomainName
-> f CreateDomainName
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createDomainName_domainName :: Lens.Lens' CreateDomainName Prelude.Text
createDomainName_domainName :: (Text -> f Text) -> CreateDomainName -> f CreateDomainName
createDomainName_domainName = (CreateDomainName -> Text)
-> (CreateDomainName -> Text -> CreateDomainName)
-> Lens CreateDomainName CreateDomainName Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDomainName' {Text
domainName :: Text
$sel:domainName:CreateDomainName' :: CreateDomainName -> Text
domainName} -> Text
domainName) (\s :: CreateDomainName
s@CreateDomainName' {} Text
a -> CreateDomainName
s {$sel:domainName:CreateDomainName' :: Text
domainName = Text
a} :: CreateDomainName)
instance Core.AWSRequest CreateDomainName where
type AWSResponse CreateDomainName = DomainName
request :: CreateDomainName -> Request CreateDomainName
request = Service -> CreateDomainName -> Request CreateDomainName
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateDomainName
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDomainName)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateDomainName))
-> Logger
-> Service
-> Proxy CreateDomainName
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDomainName)))
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 -> Object -> Either String DomainName
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
instance Prelude.Hashable CreateDomainName
instance Prelude.NFData CreateDomainName
instance Core.ToHeaders CreateDomainName where
toHeaders :: CreateDomainName -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateDomainName -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Accept"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"application/json" :: Prelude.ByteString)
]
)
instance Core.ToJSON CreateDomainName where
toJSON :: CreateDomainName -> Value
toJSON CreateDomainName' {Maybe Text
Maybe (HashMap Text Text)
Maybe EndpointConfiguration
Maybe MutualTlsAuthenticationInput
Maybe SecurityPolicy
Text
domainName :: Text
tags :: Maybe (HashMap Text Text)
endpointConfiguration :: Maybe EndpointConfiguration
certificateChain :: Maybe Text
certificateBody :: Maybe Text
regionalCertificateName :: Maybe Text
certificatePrivateKey :: Maybe Text
mutualTlsAuthentication :: Maybe MutualTlsAuthenticationInput
securityPolicy :: Maybe SecurityPolicy
certificateArn :: Maybe Text
regionalCertificateArn :: Maybe Text
ownershipVerificationCertificateArn :: Maybe Text
certificateName :: Maybe Text
$sel:domainName:CreateDomainName' :: CreateDomainName -> Text
$sel:tags:CreateDomainName' :: CreateDomainName -> Maybe (HashMap Text Text)
$sel:endpointConfiguration:CreateDomainName' :: CreateDomainName -> Maybe EndpointConfiguration
$sel:certificateChain:CreateDomainName' :: CreateDomainName -> Maybe Text
$sel:certificateBody:CreateDomainName' :: CreateDomainName -> Maybe Text
$sel:regionalCertificateName:CreateDomainName' :: CreateDomainName -> Maybe Text
$sel:certificatePrivateKey:CreateDomainName' :: CreateDomainName -> Maybe Text
$sel:mutualTlsAuthentication:CreateDomainName' :: CreateDomainName -> Maybe MutualTlsAuthenticationInput
$sel:securityPolicy:CreateDomainName' :: CreateDomainName -> Maybe SecurityPolicy
$sel:certificateArn:CreateDomainName' :: CreateDomainName -> Maybe Text
$sel:regionalCertificateArn:CreateDomainName' :: CreateDomainName -> Maybe Text
$sel:ownershipVerificationCertificateArn:CreateDomainName' :: CreateDomainName -> Maybe Text
$sel:certificateName:CreateDomainName' :: CreateDomainName -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"certificateName" 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
certificateName,
(Text
"ownershipVerificationCertificateArn" 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
ownershipVerificationCertificateArn,
(Text
"regionalCertificateArn" 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
regionalCertificateArn,
(Text
"certificateArn" 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
certificateArn,
(Text
"securityPolicy" Text -> SecurityPolicy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SecurityPolicy -> Pair) -> Maybe SecurityPolicy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SecurityPolicy
securityPolicy,
(Text
"mutualTlsAuthentication" Text -> MutualTlsAuthenticationInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MutualTlsAuthenticationInput -> Pair)
-> Maybe MutualTlsAuthenticationInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MutualTlsAuthenticationInput
mutualTlsAuthentication,
(Text
"certificatePrivateKey" 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
certificatePrivateKey,
(Text
"regionalCertificateName" 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
regionalCertificateName,
(Text
"certificateBody" 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
certificateBody,
(Text
"certificateChain" 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
certificateChain,
(Text
"endpointConfiguration" Text -> EndpointConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EndpointConfiguration -> Pair)
-> Maybe EndpointConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EndpointConfiguration
endpointConfiguration,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
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)
]
)
instance Core.ToPath CreateDomainName where
toPath :: CreateDomainName -> ByteString
toPath = ByteString -> CreateDomainName -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/domainnames"
instance Core.ToQuery CreateDomainName where
toQuery :: CreateDomainName -> QueryString
toQuery = QueryString -> CreateDomainName -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty