{-# 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.EC2.CreateIpamPool
(
CreateIpamPool (..),
newCreateIpamPool,
createIpamPool_allocationDefaultNetmaskLength,
createIpamPool_allocationMaxNetmaskLength,
createIpamPool_allocationMinNetmaskLength,
createIpamPool_allocationResourceTags,
createIpamPool_autoImport,
createIpamPool_awsService,
createIpamPool_clientToken,
createIpamPool_description,
createIpamPool_dryRun,
createIpamPool_locale,
createIpamPool_publiclyAdvertisable,
createIpamPool_sourceIpamPoolId,
createIpamPool_tagSpecifications,
createIpamPool_ipamScopeId,
createIpamPool_addressFamily,
CreateIpamPoolResponse (..),
newCreateIpamPoolResponse,
createIpamPoolResponse_ipamPool,
createIpamPoolResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateIpamPool = CreateIpamPool'
{
CreateIpamPool -> Maybe Natural
allocationDefaultNetmaskLength :: Prelude.Maybe Prelude.Natural,
CreateIpamPool -> Maybe Natural
allocationMaxNetmaskLength :: Prelude.Maybe Prelude.Natural,
CreateIpamPool -> Maybe Natural
allocationMinNetmaskLength :: Prelude.Maybe Prelude.Natural,
CreateIpamPool -> Maybe [RequestIpamResourceTag]
allocationResourceTags :: Prelude.Maybe [RequestIpamResourceTag],
CreateIpamPool -> Maybe Bool
autoImport :: Prelude.Maybe Prelude.Bool,
CreateIpamPool -> Maybe IpamPoolAwsService
awsService :: Prelude.Maybe IpamPoolAwsService,
CreateIpamPool -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateIpamPool -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateIpamPool -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
CreateIpamPool -> Maybe Text
locale :: Prelude.Maybe Prelude.Text,
CreateIpamPool -> Maybe Bool
publiclyAdvertisable :: Prelude.Maybe Prelude.Bool,
CreateIpamPool -> Maybe Text
sourceIpamPoolId :: Prelude.Maybe Prelude.Text,
CreateIpamPool -> Maybe [TagSpecification]
tagSpecifications :: Prelude.Maybe [TagSpecification],
CreateIpamPool -> Text
ipamScopeId :: Prelude.Text,
CreateIpamPool -> AddressFamily
addressFamily :: AddressFamily
}
deriving (CreateIpamPool -> CreateIpamPool -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIpamPool -> CreateIpamPool -> Bool
$c/= :: CreateIpamPool -> CreateIpamPool -> Bool
== :: CreateIpamPool -> CreateIpamPool -> Bool
$c== :: CreateIpamPool -> CreateIpamPool -> Bool
Prelude.Eq, ReadPrec [CreateIpamPool]
ReadPrec CreateIpamPool
Int -> ReadS CreateIpamPool
ReadS [CreateIpamPool]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIpamPool]
$creadListPrec :: ReadPrec [CreateIpamPool]
readPrec :: ReadPrec CreateIpamPool
$creadPrec :: ReadPrec CreateIpamPool
readList :: ReadS [CreateIpamPool]
$creadList :: ReadS [CreateIpamPool]
readsPrec :: Int -> ReadS CreateIpamPool
$creadsPrec :: Int -> ReadS CreateIpamPool
Prelude.Read, Int -> CreateIpamPool -> ShowS
[CreateIpamPool] -> ShowS
CreateIpamPool -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIpamPool] -> ShowS
$cshowList :: [CreateIpamPool] -> ShowS
show :: CreateIpamPool -> String
$cshow :: CreateIpamPool -> String
showsPrec :: Int -> CreateIpamPool -> ShowS
$cshowsPrec :: Int -> CreateIpamPool -> ShowS
Prelude.Show, forall x. Rep CreateIpamPool x -> CreateIpamPool
forall x. CreateIpamPool -> Rep CreateIpamPool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIpamPool x -> CreateIpamPool
$cfrom :: forall x. CreateIpamPool -> Rep CreateIpamPool x
Prelude.Generic)
newCreateIpamPool ::
Prelude.Text ->
AddressFamily ->
CreateIpamPool
newCreateIpamPool :: Text -> AddressFamily -> CreateIpamPool
newCreateIpamPool Text
pIpamScopeId_ AddressFamily
pAddressFamily_ =
CreateIpamPool'
{ $sel:allocationDefaultNetmaskLength:CreateIpamPool' :: Maybe Natural
allocationDefaultNetmaskLength =
forall a. Maybe a
Prelude.Nothing,
$sel:allocationMaxNetmaskLength:CreateIpamPool' :: Maybe Natural
allocationMaxNetmaskLength = forall a. Maybe a
Prelude.Nothing,
$sel:allocationMinNetmaskLength:CreateIpamPool' :: Maybe Natural
allocationMinNetmaskLength = forall a. Maybe a
Prelude.Nothing,
$sel:allocationResourceTags:CreateIpamPool' :: Maybe [RequestIpamResourceTag]
allocationResourceTags = forall a. Maybe a
Prelude.Nothing,
$sel:autoImport:CreateIpamPool' :: Maybe Bool
autoImport = forall a. Maybe a
Prelude.Nothing,
$sel:awsService:CreateIpamPool' :: Maybe IpamPoolAwsService
awsService = forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:CreateIpamPool' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateIpamPool' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:CreateIpamPool' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:locale:CreateIpamPool' :: Maybe Text
locale = forall a. Maybe a
Prelude.Nothing,
$sel:publiclyAdvertisable:CreateIpamPool' :: Maybe Bool
publiclyAdvertisable = forall a. Maybe a
Prelude.Nothing,
$sel:sourceIpamPoolId:CreateIpamPool' :: Maybe Text
sourceIpamPoolId = forall a. Maybe a
Prelude.Nothing,
$sel:tagSpecifications:CreateIpamPool' :: Maybe [TagSpecification]
tagSpecifications = forall a. Maybe a
Prelude.Nothing,
$sel:ipamScopeId:CreateIpamPool' :: Text
ipamScopeId = Text
pIpamScopeId_,
$sel:addressFamily:CreateIpamPool' :: AddressFamily
addressFamily = AddressFamily
pAddressFamily_
}
createIpamPool_allocationDefaultNetmaskLength :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Natural)
createIpamPool_allocationDefaultNetmaskLength :: Lens' CreateIpamPool (Maybe Natural)
createIpamPool_allocationDefaultNetmaskLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Natural
allocationDefaultNetmaskLength :: Maybe Natural
$sel:allocationDefaultNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
allocationDefaultNetmaskLength} -> Maybe Natural
allocationDefaultNetmaskLength) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Natural
a -> CreateIpamPool
s {$sel:allocationDefaultNetmaskLength:CreateIpamPool' :: Maybe Natural
allocationDefaultNetmaskLength = Maybe Natural
a} :: CreateIpamPool)
createIpamPool_allocationMaxNetmaskLength :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Natural)
createIpamPool_allocationMaxNetmaskLength :: Lens' CreateIpamPool (Maybe Natural)
createIpamPool_allocationMaxNetmaskLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Natural
allocationMaxNetmaskLength :: Maybe Natural
$sel:allocationMaxNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
allocationMaxNetmaskLength} -> Maybe Natural
allocationMaxNetmaskLength) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Natural
a -> CreateIpamPool
s {$sel:allocationMaxNetmaskLength:CreateIpamPool' :: Maybe Natural
allocationMaxNetmaskLength = Maybe Natural
a} :: CreateIpamPool)
createIpamPool_allocationMinNetmaskLength :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Natural)
createIpamPool_allocationMinNetmaskLength :: Lens' CreateIpamPool (Maybe Natural)
createIpamPool_allocationMinNetmaskLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Natural
allocationMinNetmaskLength :: Maybe Natural
$sel:allocationMinNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
allocationMinNetmaskLength} -> Maybe Natural
allocationMinNetmaskLength) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Natural
a -> CreateIpamPool
s {$sel:allocationMinNetmaskLength:CreateIpamPool' :: Maybe Natural
allocationMinNetmaskLength = Maybe Natural
a} :: CreateIpamPool)
createIpamPool_allocationResourceTags :: Lens.Lens' CreateIpamPool (Prelude.Maybe [RequestIpamResourceTag])
createIpamPool_allocationResourceTags :: Lens' CreateIpamPool (Maybe [RequestIpamResourceTag])
createIpamPool_allocationResourceTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe [RequestIpamResourceTag]
allocationResourceTags :: Maybe [RequestIpamResourceTag]
$sel:allocationResourceTags:CreateIpamPool' :: CreateIpamPool -> Maybe [RequestIpamResourceTag]
allocationResourceTags} -> Maybe [RequestIpamResourceTag]
allocationResourceTags) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe [RequestIpamResourceTag]
a -> CreateIpamPool
s {$sel:allocationResourceTags:CreateIpamPool' :: Maybe [RequestIpamResourceTag]
allocationResourceTags = Maybe [RequestIpamResourceTag]
a} :: CreateIpamPool) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIpamPool_autoImport :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Bool)
createIpamPool_autoImport :: Lens' CreateIpamPool (Maybe Bool)
createIpamPool_autoImport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Bool
autoImport :: Maybe Bool
$sel:autoImport:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
autoImport} -> Maybe Bool
autoImport) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Bool
a -> CreateIpamPool
s {$sel:autoImport:CreateIpamPool' :: Maybe Bool
autoImport = Maybe Bool
a} :: CreateIpamPool)
createIpamPool_awsService :: Lens.Lens' CreateIpamPool (Prelude.Maybe IpamPoolAwsService)
createIpamPool_awsService :: Lens' CreateIpamPool (Maybe IpamPoolAwsService)
createIpamPool_awsService = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe IpamPoolAwsService
awsService :: Maybe IpamPoolAwsService
$sel:awsService:CreateIpamPool' :: CreateIpamPool -> Maybe IpamPoolAwsService
awsService} -> Maybe IpamPoolAwsService
awsService) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe IpamPoolAwsService
a -> CreateIpamPool
s {$sel:awsService:CreateIpamPool' :: Maybe IpamPoolAwsService
awsService = Maybe IpamPoolAwsService
a} :: CreateIpamPool)
createIpamPool_clientToken :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Text)
createIpamPool_clientToken :: Lens' CreateIpamPool (Maybe Text)
createIpamPool_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateIpamPool' :: CreateIpamPool -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Text
a -> CreateIpamPool
s {$sel:clientToken:CreateIpamPool' :: Maybe Text
clientToken = Maybe Text
a} :: CreateIpamPool)
createIpamPool_description :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Text)
createIpamPool_description :: Lens' CreateIpamPool (Maybe Text)
createIpamPool_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Text
description :: Maybe Text
$sel:description:CreateIpamPool' :: CreateIpamPool -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Text
a -> CreateIpamPool
s {$sel:description:CreateIpamPool' :: Maybe Text
description = Maybe Text
a} :: CreateIpamPool)
createIpamPool_dryRun :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Bool)
createIpamPool_dryRun :: Lens' CreateIpamPool (Maybe Bool)
createIpamPool_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Bool
a -> CreateIpamPool
s {$sel:dryRun:CreateIpamPool' :: Maybe Bool
dryRun = Maybe Bool
a} :: CreateIpamPool)
createIpamPool_locale :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Text)
createIpamPool_locale :: Lens' CreateIpamPool (Maybe Text)
createIpamPool_locale = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Text
locale :: Maybe Text
$sel:locale:CreateIpamPool' :: CreateIpamPool -> Maybe Text
locale} -> Maybe Text
locale) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Text
a -> CreateIpamPool
s {$sel:locale:CreateIpamPool' :: Maybe Text
locale = Maybe Text
a} :: CreateIpamPool)
createIpamPool_publiclyAdvertisable :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Bool)
createIpamPool_publiclyAdvertisable :: Lens' CreateIpamPool (Maybe Bool)
createIpamPool_publiclyAdvertisable = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Bool
publiclyAdvertisable :: Maybe Bool
$sel:publiclyAdvertisable:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
publiclyAdvertisable} -> Maybe Bool
publiclyAdvertisable) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Bool
a -> CreateIpamPool
s {$sel:publiclyAdvertisable:CreateIpamPool' :: Maybe Bool
publiclyAdvertisable = Maybe Bool
a} :: CreateIpamPool)
createIpamPool_sourceIpamPoolId :: Lens.Lens' CreateIpamPool (Prelude.Maybe Prelude.Text)
createIpamPool_sourceIpamPoolId :: Lens' CreateIpamPool (Maybe Text)
createIpamPool_sourceIpamPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe Text
sourceIpamPoolId :: Maybe Text
$sel:sourceIpamPoolId:CreateIpamPool' :: CreateIpamPool -> Maybe Text
sourceIpamPoolId} -> Maybe Text
sourceIpamPoolId) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe Text
a -> CreateIpamPool
s {$sel:sourceIpamPoolId:CreateIpamPool' :: Maybe Text
sourceIpamPoolId = Maybe Text
a} :: CreateIpamPool)
createIpamPool_tagSpecifications :: Lens.Lens' CreateIpamPool (Prelude.Maybe [TagSpecification])
createIpamPool_tagSpecifications :: Lens' CreateIpamPool (Maybe [TagSpecification])
createIpamPool_tagSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Maybe [TagSpecification]
tagSpecifications :: Maybe [TagSpecification]
$sel:tagSpecifications:CreateIpamPool' :: CreateIpamPool -> Maybe [TagSpecification]
tagSpecifications} -> Maybe [TagSpecification]
tagSpecifications) (\s :: CreateIpamPool
s@CreateIpamPool' {} Maybe [TagSpecification]
a -> CreateIpamPool
s {$sel:tagSpecifications:CreateIpamPool' :: Maybe [TagSpecification]
tagSpecifications = Maybe [TagSpecification]
a} :: CreateIpamPool) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIpamPool_ipamScopeId :: Lens.Lens' CreateIpamPool Prelude.Text
createIpamPool_ipamScopeId :: Lens' CreateIpamPool Text
createIpamPool_ipamScopeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {Text
ipamScopeId :: Text
$sel:ipamScopeId:CreateIpamPool' :: CreateIpamPool -> Text
ipamScopeId} -> Text
ipamScopeId) (\s :: CreateIpamPool
s@CreateIpamPool' {} Text
a -> CreateIpamPool
s {$sel:ipamScopeId:CreateIpamPool' :: Text
ipamScopeId = Text
a} :: CreateIpamPool)
createIpamPool_addressFamily :: Lens.Lens' CreateIpamPool AddressFamily
createIpamPool_addressFamily :: Lens' CreateIpamPool AddressFamily
createIpamPool_addressFamily = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPool' {AddressFamily
addressFamily :: AddressFamily
$sel:addressFamily:CreateIpamPool' :: CreateIpamPool -> AddressFamily
addressFamily} -> AddressFamily
addressFamily) (\s :: CreateIpamPool
s@CreateIpamPool' {} AddressFamily
a -> CreateIpamPool
s {$sel:addressFamily:CreateIpamPool' :: AddressFamily
addressFamily = AddressFamily
a} :: CreateIpamPool)
instance Core.AWSRequest CreateIpamPool where
type
AWSResponse CreateIpamPool =
CreateIpamPoolResponse
request :: (Service -> Service) -> CreateIpamPool -> Request CreateIpamPool
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateIpamPool
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateIpamPool)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe IpamPool -> Int -> CreateIpamPoolResponse
CreateIpamPoolResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ipamPool")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateIpamPool where
hashWithSalt :: Int -> CreateIpamPool -> Int
hashWithSalt Int
_salt CreateIpamPool' {Maybe Bool
Maybe Natural
Maybe [RequestIpamResourceTag]
Maybe [TagSpecification]
Maybe Text
Maybe IpamPoolAwsService
Text
AddressFamily
addressFamily :: AddressFamily
ipamScopeId :: Text
tagSpecifications :: Maybe [TagSpecification]
sourceIpamPoolId :: Maybe Text
publiclyAdvertisable :: Maybe Bool
locale :: Maybe Text
dryRun :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
awsService :: Maybe IpamPoolAwsService
autoImport :: Maybe Bool
allocationResourceTags :: Maybe [RequestIpamResourceTag]
allocationMinNetmaskLength :: Maybe Natural
allocationMaxNetmaskLength :: Maybe Natural
allocationDefaultNetmaskLength :: Maybe Natural
$sel:addressFamily:CreateIpamPool' :: CreateIpamPool -> AddressFamily
$sel:ipamScopeId:CreateIpamPool' :: CreateIpamPool -> Text
$sel:tagSpecifications:CreateIpamPool' :: CreateIpamPool -> Maybe [TagSpecification]
$sel:sourceIpamPoolId:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:publiclyAdvertisable:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
$sel:locale:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:dryRun:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
$sel:description:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:clientToken:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:awsService:CreateIpamPool' :: CreateIpamPool -> Maybe IpamPoolAwsService
$sel:autoImport:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
$sel:allocationResourceTags:CreateIpamPool' :: CreateIpamPool -> Maybe [RequestIpamResourceTag]
$sel:allocationMinNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
$sel:allocationMaxNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
$sel:allocationDefaultNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
allocationDefaultNetmaskLength
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
allocationMaxNetmaskLength
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
allocationMinNetmaskLength
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [RequestIpamResourceTag]
allocationResourceTags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
autoImport
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpamPoolAwsService
awsService
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
locale
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
publiclyAdvertisable
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceIpamPoolId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [TagSpecification]
tagSpecifications
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ipamScopeId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AddressFamily
addressFamily
instance Prelude.NFData CreateIpamPool where
rnf :: CreateIpamPool -> ()
rnf CreateIpamPool' {Maybe Bool
Maybe Natural
Maybe [RequestIpamResourceTag]
Maybe [TagSpecification]
Maybe Text
Maybe IpamPoolAwsService
Text
AddressFamily
addressFamily :: AddressFamily
ipamScopeId :: Text
tagSpecifications :: Maybe [TagSpecification]
sourceIpamPoolId :: Maybe Text
publiclyAdvertisable :: Maybe Bool
locale :: Maybe Text
dryRun :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
awsService :: Maybe IpamPoolAwsService
autoImport :: Maybe Bool
allocationResourceTags :: Maybe [RequestIpamResourceTag]
allocationMinNetmaskLength :: Maybe Natural
allocationMaxNetmaskLength :: Maybe Natural
allocationDefaultNetmaskLength :: Maybe Natural
$sel:addressFamily:CreateIpamPool' :: CreateIpamPool -> AddressFamily
$sel:ipamScopeId:CreateIpamPool' :: CreateIpamPool -> Text
$sel:tagSpecifications:CreateIpamPool' :: CreateIpamPool -> Maybe [TagSpecification]
$sel:sourceIpamPoolId:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:publiclyAdvertisable:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
$sel:locale:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:dryRun:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
$sel:description:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:clientToken:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:awsService:CreateIpamPool' :: CreateIpamPool -> Maybe IpamPoolAwsService
$sel:autoImport:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
$sel:allocationResourceTags:CreateIpamPool' :: CreateIpamPool -> Maybe [RequestIpamResourceTag]
$sel:allocationMinNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
$sel:allocationMaxNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
$sel:allocationDefaultNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
allocationDefaultNetmaskLength
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
allocationMaxNetmaskLength
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
allocationMinNetmaskLength
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RequestIpamResourceTag]
allocationResourceTags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
autoImport
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpamPoolAwsService
awsService
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
locale
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
publiclyAdvertisable
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceIpamPoolId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [TagSpecification]
tagSpecifications
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
ipamScopeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf AddressFamily
addressFamily
instance Data.ToHeaders CreateIpamPool where
toHeaders :: CreateIpamPool -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath CreateIpamPool where
toPath :: CreateIpamPool -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateIpamPool where
toQuery :: CreateIpamPool -> QueryString
toQuery CreateIpamPool' {Maybe Bool
Maybe Natural
Maybe [RequestIpamResourceTag]
Maybe [TagSpecification]
Maybe Text
Maybe IpamPoolAwsService
Text
AddressFamily
addressFamily :: AddressFamily
ipamScopeId :: Text
tagSpecifications :: Maybe [TagSpecification]
sourceIpamPoolId :: Maybe Text
publiclyAdvertisable :: Maybe Bool
locale :: Maybe Text
dryRun :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
awsService :: Maybe IpamPoolAwsService
autoImport :: Maybe Bool
allocationResourceTags :: Maybe [RequestIpamResourceTag]
allocationMinNetmaskLength :: Maybe Natural
allocationMaxNetmaskLength :: Maybe Natural
allocationDefaultNetmaskLength :: Maybe Natural
$sel:addressFamily:CreateIpamPool' :: CreateIpamPool -> AddressFamily
$sel:ipamScopeId:CreateIpamPool' :: CreateIpamPool -> Text
$sel:tagSpecifications:CreateIpamPool' :: CreateIpamPool -> Maybe [TagSpecification]
$sel:sourceIpamPoolId:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:publiclyAdvertisable:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
$sel:locale:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:dryRun:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
$sel:description:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:clientToken:CreateIpamPool' :: CreateIpamPool -> Maybe Text
$sel:awsService:CreateIpamPool' :: CreateIpamPool -> Maybe IpamPoolAwsService
$sel:autoImport:CreateIpamPool' :: CreateIpamPool -> Maybe Bool
$sel:allocationResourceTags:CreateIpamPool' :: CreateIpamPool -> Maybe [RequestIpamResourceTag]
$sel:allocationMinNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
$sel:allocationMaxNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
$sel:allocationDefaultNetmaskLength:CreateIpamPool' :: CreateIpamPool -> Maybe Natural
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateIpamPool" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"AllocationDefaultNetmaskLength"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
allocationDefaultNetmaskLength,
ByteString
"AllocationMaxNetmaskLength"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
allocationMaxNetmaskLength,
ByteString
"AllocationMinNetmaskLength"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
allocationMinNetmaskLength,
forall a. ToQuery a => a -> QueryString
Data.toQuery
( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"AllocationResourceTag"
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RequestIpamResourceTag]
allocationResourceTags
),
ByteString
"AutoImport" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
autoImport,
ByteString
"AwsService" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe IpamPoolAwsService
awsService,
ByteString
"ClientToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientToken,
ByteString
"Description" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
description,
ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
ByteString
"Locale" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
locale,
ByteString
"PubliclyAdvertisable" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
publiclyAdvertisable,
ByteString
"SourceIpamPoolId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
sourceIpamPoolId,
forall a. ToQuery a => a -> QueryString
Data.toQuery
( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"TagSpecification"
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagSpecification]
tagSpecifications
),
ByteString
"IpamScopeId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
ipamScopeId,
ByteString
"AddressFamily" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: AddressFamily
addressFamily
]
data CreateIpamPoolResponse = CreateIpamPoolResponse'
{
CreateIpamPoolResponse -> Maybe IpamPool
ipamPool :: Prelude.Maybe IpamPool,
CreateIpamPoolResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateIpamPoolResponse -> CreateIpamPoolResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIpamPoolResponse -> CreateIpamPoolResponse -> Bool
$c/= :: CreateIpamPoolResponse -> CreateIpamPoolResponse -> Bool
== :: CreateIpamPoolResponse -> CreateIpamPoolResponse -> Bool
$c== :: CreateIpamPoolResponse -> CreateIpamPoolResponse -> Bool
Prelude.Eq, ReadPrec [CreateIpamPoolResponse]
ReadPrec CreateIpamPoolResponse
Int -> ReadS CreateIpamPoolResponse
ReadS [CreateIpamPoolResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIpamPoolResponse]
$creadListPrec :: ReadPrec [CreateIpamPoolResponse]
readPrec :: ReadPrec CreateIpamPoolResponse
$creadPrec :: ReadPrec CreateIpamPoolResponse
readList :: ReadS [CreateIpamPoolResponse]
$creadList :: ReadS [CreateIpamPoolResponse]
readsPrec :: Int -> ReadS CreateIpamPoolResponse
$creadsPrec :: Int -> ReadS CreateIpamPoolResponse
Prelude.Read, Int -> CreateIpamPoolResponse -> ShowS
[CreateIpamPoolResponse] -> ShowS
CreateIpamPoolResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIpamPoolResponse] -> ShowS
$cshowList :: [CreateIpamPoolResponse] -> ShowS
show :: CreateIpamPoolResponse -> String
$cshow :: CreateIpamPoolResponse -> String
showsPrec :: Int -> CreateIpamPoolResponse -> ShowS
$cshowsPrec :: Int -> CreateIpamPoolResponse -> ShowS
Prelude.Show, forall x. Rep CreateIpamPoolResponse x -> CreateIpamPoolResponse
forall x. CreateIpamPoolResponse -> Rep CreateIpamPoolResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIpamPoolResponse x -> CreateIpamPoolResponse
$cfrom :: forall x. CreateIpamPoolResponse -> Rep CreateIpamPoolResponse x
Prelude.Generic)
newCreateIpamPoolResponse ::
Prelude.Int ->
CreateIpamPoolResponse
newCreateIpamPoolResponse :: Int -> CreateIpamPoolResponse
newCreateIpamPoolResponse Int
pHttpStatus_ =
CreateIpamPoolResponse'
{ $sel:ipamPool:CreateIpamPoolResponse' :: Maybe IpamPool
ipamPool = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateIpamPoolResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createIpamPoolResponse_ipamPool :: Lens.Lens' CreateIpamPoolResponse (Prelude.Maybe IpamPool)
createIpamPoolResponse_ipamPool :: Lens' CreateIpamPoolResponse (Maybe IpamPool)
createIpamPoolResponse_ipamPool = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPoolResponse' {Maybe IpamPool
ipamPool :: Maybe IpamPool
$sel:ipamPool:CreateIpamPoolResponse' :: CreateIpamPoolResponse -> Maybe IpamPool
ipamPool} -> Maybe IpamPool
ipamPool) (\s :: CreateIpamPoolResponse
s@CreateIpamPoolResponse' {} Maybe IpamPool
a -> CreateIpamPoolResponse
s {$sel:ipamPool:CreateIpamPoolResponse' :: Maybe IpamPool
ipamPool = Maybe IpamPool
a} :: CreateIpamPoolResponse)
createIpamPoolResponse_httpStatus :: Lens.Lens' CreateIpamPoolResponse Prelude.Int
createIpamPoolResponse_httpStatus :: Lens' CreateIpamPoolResponse Int
createIpamPoolResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIpamPoolResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateIpamPoolResponse' :: CreateIpamPoolResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateIpamPoolResponse
s@CreateIpamPoolResponse' {} Int
a -> CreateIpamPoolResponse
s {$sel:httpStatus:CreateIpamPoolResponse' :: Int
httpStatus = Int
a} :: CreateIpamPoolResponse)
instance Prelude.NFData CreateIpamPoolResponse where
rnf :: CreateIpamPoolResponse -> ()
rnf CreateIpamPoolResponse' {Int
Maybe IpamPool
httpStatus :: Int
ipamPool :: Maybe IpamPool
$sel:httpStatus:CreateIpamPoolResponse' :: CreateIpamPoolResponse -> Int
$sel:ipamPool:CreateIpamPoolResponse' :: CreateIpamPoolResponse -> Maybe IpamPool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe IpamPool
ipamPool
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus