{-# 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.CreateDomain -- 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 @CreateDomain@ operation creates a new domain. The domain name -- should be unique among the domains associated with the Access Key ID -- provided in the request. The @CreateDomain@ operation may take 10 or -- more seconds to complete. -- -- The client can create up to 100 domains per account. -- -- If the client requires additional domains, go to -- . module Amazonka.SDB.CreateDomain ( -- * Creating a Request CreateDomain (..), newCreateDomain, -- * Request Lenses createDomain_domainName, -- * Destructuring the Response CreateDomainResponse (..), newCreateDomainResponse, ) 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:/ 'newCreateDomain' smart constructor. data CreateDomain = CreateDomain' { -- | The name of the domain to create. The name can range between 3 and 255 -- characters and can contain the following characters: a-z, A-Z, 0-9, -- \'_\', \'-\', and \'.\'. domainName :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'CreateDomain' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'domainName', 'createDomain_domainName' - The name of the domain to create. The name can range between 3 and 255 -- characters and can contain the following characters: a-z, A-Z, 0-9, -- \'_\', \'-\', and \'.\'. newCreateDomain :: -- | 'domainName' Prelude.Text -> CreateDomain newCreateDomain pDomainName_ = CreateDomain' {domainName = pDomainName_} -- | The name of the domain to create. The name can range between 3 and 255 -- characters and can contain the following characters: a-z, A-Z, 0-9, -- \'_\', \'-\', and \'.\'. createDomain_domainName :: Lens.Lens' CreateDomain Prelude.Text createDomain_domainName = Lens.lens (\CreateDomain' {domainName} -> domainName) (\s@CreateDomain' {} a -> s {domainName = a} :: CreateDomain) instance Core.AWSRequest CreateDomain where type AWSResponse CreateDomain = CreateDomainResponse request overrides = Request.postQuery (overrides defaultService) response = Response.receiveNull CreateDomainResponse' instance Prelude.Hashable CreateDomain where hashWithSalt _salt CreateDomain' {..} = _salt `Prelude.hashWithSalt` domainName instance Prelude.NFData CreateDomain where rnf CreateDomain' {..} = Prelude.rnf domainName instance Data.ToHeaders CreateDomain where toHeaders = Prelude.const Prelude.mempty instance Data.ToPath CreateDomain where toPath = Prelude.const "/" instance Data.ToQuery CreateDomain where toQuery CreateDomain' {..} = Prelude.mconcat [ "Action" Data.=: ("CreateDomain" :: Prelude.ByteString), "Version" Data.=: ("2009-04-15" :: Prelude.ByteString), "DomainName" Data.=: domainName ] -- | /See:/ 'newCreateDomainResponse' smart constructor. data CreateDomainResponse = CreateDomainResponse' { } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'CreateDomainResponse' with all optional fields omitted. -- -- Use or to modify other optional fields. newCreateDomainResponse :: CreateDomainResponse newCreateDomainResponse = CreateDomainResponse' instance Prelude.NFData CreateDomainResponse where rnf _ = ()