amazonka-sdb-2.0: gen/Amazonka/SDB/DeleteDomain.hs
{-# 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 #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Amazonka.SDB.DeleteDomain
-- Copyright : (c) 2013-2023 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- The @DeleteDomain@ operation deletes a domain. Any items (and their
-- attributes) in the domain are deleted as well. The @DeleteDomain@
-- operation might take 10 or more seconds to complete.
module Amazonka.SDB.DeleteDomain
( -- * Creating a Request
DeleteDomain (..),
newDeleteDomain,
-- * Request Lenses
deleteDomain_domainName,
-- * Destructuring the Response
DeleteDomainResponse (..),
newDeleteDomainResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SDB.Types
-- | /See:/ 'newDeleteDomain' smart constructor.
data DeleteDomain = DeleteDomain'
{ -- | The name of the domain to delete.
domainName :: Prelude.Text
}
deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)
-- |
-- Create a value of 'DeleteDomain' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'domainName', 'deleteDomain_domainName' - The name of the domain to delete.
newDeleteDomain ::
-- | 'domainName'
Prelude.Text ->
DeleteDomain
newDeleteDomain pDomainName_ =
DeleteDomain' {domainName = pDomainName_}
-- | The name of the domain to delete.
deleteDomain_domainName :: Lens.Lens' DeleteDomain Prelude.Text
deleteDomain_domainName = Lens.lens (\DeleteDomain' {domainName} -> domainName) (\s@DeleteDomain' {} a -> s {domainName = a} :: DeleteDomain)
instance Core.AWSRequest DeleteDomain where
type AWSResponse DeleteDomain = DeleteDomainResponse
request overrides =
Request.postQuery (overrides defaultService)
response = Response.receiveNull DeleteDomainResponse'
instance Prelude.Hashable DeleteDomain where
hashWithSalt _salt DeleteDomain' {..} =
_salt `Prelude.hashWithSalt` domainName
instance Prelude.NFData DeleteDomain where
rnf DeleteDomain' {..} = Prelude.rnf domainName
instance Data.ToHeaders DeleteDomain where
toHeaders = Prelude.const Prelude.mempty
instance Data.ToPath DeleteDomain where
toPath = Prelude.const "/"
instance Data.ToQuery DeleteDomain where
toQuery DeleteDomain' {..} =
Prelude.mconcat
[ "Action"
Data.=: ("DeleteDomain" :: Prelude.ByteString),
"Version"
Data.=: ("2009-04-15" :: Prelude.ByteString),
"DomainName" Data.=: domainName
]
-- | /See:/ 'newDeleteDomainResponse' smart constructor.
data DeleteDomainResponse = DeleteDomainResponse'
{
}
deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)
-- |
-- Create a value of 'DeleteDomainResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newDeleteDomainResponse ::
DeleteDomainResponse
newDeleteDomainResponse = DeleteDomainResponse'
instance Prelude.NFData DeleteDomainResponse where
rnf _ = ()