{-# 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.SSM.RegisterTargetWithMaintenanceWindow
(
RegisterTargetWithMaintenanceWindow (..),
newRegisterTargetWithMaintenanceWindow,
registerTargetWithMaintenanceWindow_clientToken,
registerTargetWithMaintenanceWindow_ownerInformation,
registerTargetWithMaintenanceWindow_name,
registerTargetWithMaintenanceWindow_description,
registerTargetWithMaintenanceWindow_windowId,
registerTargetWithMaintenanceWindow_resourceType,
registerTargetWithMaintenanceWindow_targets,
RegisterTargetWithMaintenanceWindowResponse (..),
newRegisterTargetWithMaintenanceWindowResponse,
registerTargetWithMaintenanceWindowResponse_windowTargetId,
registerTargetWithMaintenanceWindowResponse_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.SSM.Types
data RegisterTargetWithMaintenanceWindow = RegisterTargetWithMaintenanceWindow'
{
RegisterTargetWithMaintenanceWindow -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
RegisterTargetWithMaintenanceWindow -> Maybe (Sensitive Text)
ownerInformation :: Prelude.Maybe (Core.Sensitive Prelude.Text),
RegisterTargetWithMaintenanceWindow -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
RegisterTargetWithMaintenanceWindow -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
RegisterTargetWithMaintenanceWindow -> Text
windowId :: Prelude.Text,
RegisterTargetWithMaintenanceWindow
-> MaintenanceWindowResourceType
resourceType :: MaintenanceWindowResourceType,
RegisterTargetWithMaintenanceWindow -> [Target]
targets :: [Target]
}
deriving (RegisterTargetWithMaintenanceWindow
-> RegisterTargetWithMaintenanceWindow -> Bool
(RegisterTargetWithMaintenanceWindow
-> RegisterTargetWithMaintenanceWindow -> Bool)
-> (RegisterTargetWithMaintenanceWindow
-> RegisterTargetWithMaintenanceWindow -> Bool)
-> Eq RegisterTargetWithMaintenanceWindow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterTargetWithMaintenanceWindow
-> RegisterTargetWithMaintenanceWindow -> Bool
$c/= :: RegisterTargetWithMaintenanceWindow
-> RegisterTargetWithMaintenanceWindow -> Bool
== :: RegisterTargetWithMaintenanceWindow
-> RegisterTargetWithMaintenanceWindow -> Bool
$c== :: RegisterTargetWithMaintenanceWindow
-> RegisterTargetWithMaintenanceWindow -> Bool
Prelude.Eq, Int -> RegisterTargetWithMaintenanceWindow -> ShowS
[RegisterTargetWithMaintenanceWindow] -> ShowS
RegisterTargetWithMaintenanceWindow -> String
(Int -> RegisterTargetWithMaintenanceWindow -> ShowS)
-> (RegisterTargetWithMaintenanceWindow -> String)
-> ([RegisterTargetWithMaintenanceWindow] -> ShowS)
-> Show RegisterTargetWithMaintenanceWindow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterTargetWithMaintenanceWindow] -> ShowS
$cshowList :: [RegisterTargetWithMaintenanceWindow] -> ShowS
show :: RegisterTargetWithMaintenanceWindow -> String
$cshow :: RegisterTargetWithMaintenanceWindow -> String
showsPrec :: Int -> RegisterTargetWithMaintenanceWindow -> ShowS
$cshowsPrec :: Int -> RegisterTargetWithMaintenanceWindow -> ShowS
Prelude.Show, (forall x.
RegisterTargetWithMaintenanceWindow
-> Rep RegisterTargetWithMaintenanceWindow x)
-> (forall x.
Rep RegisterTargetWithMaintenanceWindow x
-> RegisterTargetWithMaintenanceWindow)
-> Generic RegisterTargetWithMaintenanceWindow
forall x.
Rep RegisterTargetWithMaintenanceWindow x
-> RegisterTargetWithMaintenanceWindow
forall x.
RegisterTargetWithMaintenanceWindow
-> Rep RegisterTargetWithMaintenanceWindow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RegisterTargetWithMaintenanceWindow x
-> RegisterTargetWithMaintenanceWindow
$cfrom :: forall x.
RegisterTargetWithMaintenanceWindow
-> Rep RegisterTargetWithMaintenanceWindow x
Prelude.Generic)
newRegisterTargetWithMaintenanceWindow ::
Prelude.Text ->
MaintenanceWindowResourceType ->
RegisterTargetWithMaintenanceWindow
newRegisterTargetWithMaintenanceWindow :: Text
-> MaintenanceWindowResourceType
-> RegisterTargetWithMaintenanceWindow
newRegisterTargetWithMaintenanceWindow
Text
pWindowId_
MaintenanceWindowResourceType
pResourceType_ =
RegisterTargetWithMaintenanceWindow' :: Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Text
-> MaintenanceWindowResourceType
-> [Target]
-> RegisterTargetWithMaintenanceWindow
RegisterTargetWithMaintenanceWindow'
{ $sel:clientToken:RegisterTargetWithMaintenanceWindow' :: Maybe Text
clientToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ownerInformation:RegisterTargetWithMaintenanceWindow' :: Maybe (Sensitive Text)
ownerInformation = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:RegisterTargetWithMaintenanceWindow' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:RegisterTargetWithMaintenanceWindow' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:windowId:RegisterTargetWithMaintenanceWindow' :: Text
windowId = Text
pWindowId_,
$sel:resourceType:RegisterTargetWithMaintenanceWindow' :: MaintenanceWindowResourceType
resourceType = MaintenanceWindowResourceType
pResourceType_,
$sel:targets:RegisterTargetWithMaintenanceWindow' :: [Target]
targets = [Target]
forall a. Monoid a => a
Prelude.mempty
}
registerTargetWithMaintenanceWindow_clientToken :: Lens.Lens' RegisterTargetWithMaintenanceWindow (Prelude.Maybe Prelude.Text)
registerTargetWithMaintenanceWindow_clientToken :: (Maybe Text -> f (Maybe Text))
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
registerTargetWithMaintenanceWindow_clientToken = (RegisterTargetWithMaintenanceWindow -> Maybe Text)
-> (RegisterTargetWithMaintenanceWindow
-> Maybe Text -> RegisterTargetWithMaintenanceWindow)
-> Lens
RegisterTargetWithMaintenanceWindow
RegisterTargetWithMaintenanceWindow
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTargetWithMaintenanceWindow' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: RegisterTargetWithMaintenanceWindow
s@RegisterTargetWithMaintenanceWindow' {} Maybe Text
a -> RegisterTargetWithMaintenanceWindow
s {$sel:clientToken:RegisterTargetWithMaintenanceWindow' :: Maybe Text
clientToken = Maybe Text
a} :: RegisterTargetWithMaintenanceWindow)
registerTargetWithMaintenanceWindow_ownerInformation :: Lens.Lens' RegisterTargetWithMaintenanceWindow (Prelude.Maybe Prelude.Text)
registerTargetWithMaintenanceWindow_ownerInformation :: (Maybe Text -> f (Maybe Text))
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
registerTargetWithMaintenanceWindow_ownerInformation = (RegisterTargetWithMaintenanceWindow -> Maybe (Sensitive Text))
-> (RegisterTargetWithMaintenanceWindow
-> Maybe (Sensitive Text) -> RegisterTargetWithMaintenanceWindow)
-> Lens
RegisterTargetWithMaintenanceWindow
RegisterTargetWithMaintenanceWindow
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTargetWithMaintenanceWindow' {Maybe (Sensitive Text)
ownerInformation :: Maybe (Sensitive Text)
$sel:ownerInformation:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Maybe (Sensitive Text)
ownerInformation} -> Maybe (Sensitive Text)
ownerInformation) (\s :: RegisterTargetWithMaintenanceWindow
s@RegisterTargetWithMaintenanceWindow' {} Maybe (Sensitive Text)
a -> RegisterTargetWithMaintenanceWindow
s {$sel:ownerInformation:RegisterTargetWithMaintenanceWindow' :: Maybe (Sensitive Text)
ownerInformation = Maybe (Sensitive Text)
a} :: RegisterTargetWithMaintenanceWindow) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
registerTargetWithMaintenanceWindow_name :: Lens.Lens' RegisterTargetWithMaintenanceWindow (Prelude.Maybe Prelude.Text)
registerTargetWithMaintenanceWindow_name :: (Maybe Text -> f (Maybe Text))
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
registerTargetWithMaintenanceWindow_name = (RegisterTargetWithMaintenanceWindow -> Maybe Text)
-> (RegisterTargetWithMaintenanceWindow
-> Maybe Text -> RegisterTargetWithMaintenanceWindow)
-> Lens
RegisterTargetWithMaintenanceWindow
RegisterTargetWithMaintenanceWindow
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTargetWithMaintenanceWindow' {Maybe Text
name :: Maybe Text
$sel:name:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Maybe Text
name} -> Maybe Text
name) (\s :: RegisterTargetWithMaintenanceWindow
s@RegisterTargetWithMaintenanceWindow' {} Maybe Text
a -> RegisterTargetWithMaintenanceWindow
s {$sel:name:RegisterTargetWithMaintenanceWindow' :: Maybe Text
name = Maybe Text
a} :: RegisterTargetWithMaintenanceWindow)
registerTargetWithMaintenanceWindow_description :: Lens.Lens' RegisterTargetWithMaintenanceWindow (Prelude.Maybe Prelude.Text)
registerTargetWithMaintenanceWindow_description :: (Maybe Text -> f (Maybe Text))
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
registerTargetWithMaintenanceWindow_description = (RegisterTargetWithMaintenanceWindow -> Maybe (Sensitive Text))
-> (RegisterTargetWithMaintenanceWindow
-> Maybe (Sensitive Text) -> RegisterTargetWithMaintenanceWindow)
-> Lens
RegisterTargetWithMaintenanceWindow
RegisterTargetWithMaintenanceWindow
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTargetWithMaintenanceWindow' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: RegisterTargetWithMaintenanceWindow
s@RegisterTargetWithMaintenanceWindow' {} Maybe (Sensitive Text)
a -> RegisterTargetWithMaintenanceWindow
s {$sel:description:RegisterTargetWithMaintenanceWindow' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: RegisterTargetWithMaintenanceWindow) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
registerTargetWithMaintenanceWindow_windowId :: Lens.Lens' RegisterTargetWithMaintenanceWindow Prelude.Text
registerTargetWithMaintenanceWindow_windowId :: (Text -> f Text)
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
registerTargetWithMaintenanceWindow_windowId = (RegisterTargetWithMaintenanceWindow -> Text)
-> (RegisterTargetWithMaintenanceWindow
-> Text -> RegisterTargetWithMaintenanceWindow)
-> Lens
RegisterTargetWithMaintenanceWindow
RegisterTargetWithMaintenanceWindow
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTargetWithMaintenanceWindow' {Text
windowId :: Text
$sel:windowId:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Text
windowId} -> Text
windowId) (\s :: RegisterTargetWithMaintenanceWindow
s@RegisterTargetWithMaintenanceWindow' {} Text
a -> RegisterTargetWithMaintenanceWindow
s {$sel:windowId:RegisterTargetWithMaintenanceWindow' :: Text
windowId = Text
a} :: RegisterTargetWithMaintenanceWindow)
registerTargetWithMaintenanceWindow_resourceType :: Lens.Lens' RegisterTargetWithMaintenanceWindow MaintenanceWindowResourceType
registerTargetWithMaintenanceWindow_resourceType :: (MaintenanceWindowResourceType -> f MaintenanceWindowResourceType)
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
registerTargetWithMaintenanceWindow_resourceType = (RegisterTargetWithMaintenanceWindow
-> MaintenanceWindowResourceType)
-> (RegisterTargetWithMaintenanceWindow
-> MaintenanceWindowResourceType
-> RegisterTargetWithMaintenanceWindow)
-> Lens
RegisterTargetWithMaintenanceWindow
RegisterTargetWithMaintenanceWindow
MaintenanceWindowResourceType
MaintenanceWindowResourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTargetWithMaintenanceWindow' {MaintenanceWindowResourceType
resourceType :: MaintenanceWindowResourceType
$sel:resourceType:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow
-> MaintenanceWindowResourceType
resourceType} -> MaintenanceWindowResourceType
resourceType) (\s :: RegisterTargetWithMaintenanceWindow
s@RegisterTargetWithMaintenanceWindow' {} MaintenanceWindowResourceType
a -> RegisterTargetWithMaintenanceWindow
s {$sel:resourceType:RegisterTargetWithMaintenanceWindow' :: MaintenanceWindowResourceType
resourceType = MaintenanceWindowResourceType
a} :: RegisterTargetWithMaintenanceWindow)
registerTargetWithMaintenanceWindow_targets :: Lens.Lens' RegisterTargetWithMaintenanceWindow [Target]
registerTargetWithMaintenanceWindow_targets :: ([Target] -> f [Target])
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
registerTargetWithMaintenanceWindow_targets = (RegisterTargetWithMaintenanceWindow -> [Target])
-> (RegisterTargetWithMaintenanceWindow
-> [Target] -> RegisterTargetWithMaintenanceWindow)
-> Lens
RegisterTargetWithMaintenanceWindow
RegisterTargetWithMaintenanceWindow
[Target]
[Target]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTargetWithMaintenanceWindow' {[Target]
targets :: [Target]
$sel:targets:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> [Target]
targets} -> [Target]
targets) (\s :: RegisterTargetWithMaintenanceWindow
s@RegisterTargetWithMaintenanceWindow' {} [Target]
a -> RegisterTargetWithMaintenanceWindow
s {$sel:targets:RegisterTargetWithMaintenanceWindow' :: [Target]
targets = [Target]
a} :: RegisterTargetWithMaintenanceWindow) (([Target] -> f [Target])
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow)
-> (([Target] -> f [Target]) -> [Target] -> f [Target])
-> ([Target] -> f [Target])
-> RegisterTargetWithMaintenanceWindow
-> f RegisterTargetWithMaintenanceWindow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Target] -> f [Target]) -> [Target] -> f [Target]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
RegisterTargetWithMaintenanceWindow
where
type
AWSResponse RegisterTargetWithMaintenanceWindow =
RegisterTargetWithMaintenanceWindowResponse
request :: RegisterTargetWithMaintenanceWindow
-> Request RegisterTargetWithMaintenanceWindow
request = Service
-> RegisterTargetWithMaintenanceWindow
-> Request RegisterTargetWithMaintenanceWindow
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RegisterTargetWithMaintenanceWindow
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse RegisterTargetWithMaintenanceWindow)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse RegisterTargetWithMaintenanceWindow))
-> Logger
-> Service
-> Proxy RegisterTargetWithMaintenanceWindow
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse RegisterTargetWithMaintenanceWindow)))
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 -> Int -> RegisterTargetWithMaintenanceWindowResponse
RegisterTargetWithMaintenanceWindowResponse'
(Maybe Text -> Int -> RegisterTargetWithMaintenanceWindowResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> RegisterTargetWithMaintenanceWindowResponse)
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
"WindowTargetId")
Either String (Int -> RegisterTargetWithMaintenanceWindowResponse)
-> Either String Int
-> Either String RegisterTargetWithMaintenanceWindowResponse
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
RegisterTargetWithMaintenanceWindow
instance
Prelude.NFData
RegisterTargetWithMaintenanceWindow
instance
Core.ToHeaders
RegisterTargetWithMaintenanceWindow
where
toHeaders :: RegisterTargetWithMaintenanceWindow -> ResponseHeaders
toHeaders =
ResponseHeaders
-> RegisterTargetWithMaintenanceWindow -> 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
"AmazonSSM.RegisterTargetWithMaintenanceWindow" ::
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
RegisterTargetWithMaintenanceWindow
where
toJSON :: RegisterTargetWithMaintenanceWindow -> Value
toJSON RegisterTargetWithMaintenanceWindow' {[Target]
Maybe Text
Maybe (Sensitive Text)
Text
MaintenanceWindowResourceType
targets :: [Target]
resourceType :: MaintenanceWindowResourceType
windowId :: Text
description :: Maybe (Sensitive Text)
name :: Maybe Text
ownerInformation :: Maybe (Sensitive Text)
clientToken :: Maybe Text
$sel:targets:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> [Target]
$sel:resourceType:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow
-> MaintenanceWindowResourceType
$sel:windowId:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Text
$sel:description:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Maybe (Sensitive Text)
$sel:name:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Maybe Text
$sel:ownerInformation:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Maybe (Sensitive Text)
$sel:clientToken:RegisterTargetWithMaintenanceWindow' :: RegisterTargetWithMaintenanceWindow -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ClientToken" 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
clientToken,
(Text
"OwnerInformation" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
ownerInformation,
(Text
"Name" 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
name,
(Text
"Description" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
description,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WindowId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
windowId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ResourceType" Text -> MaintenanceWindowResourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MaintenanceWindowResourceType
resourceType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Targets" Text -> [Target] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Target]
targets)
]
)
instance
Core.ToPath
RegisterTargetWithMaintenanceWindow
where
toPath :: RegisterTargetWithMaintenanceWindow -> ByteString
toPath = ByteString -> RegisterTargetWithMaintenanceWindow -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
RegisterTargetWithMaintenanceWindow
where
toQuery :: RegisterTargetWithMaintenanceWindow -> QueryString
toQuery = QueryString -> RegisterTargetWithMaintenanceWindow -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RegisterTargetWithMaintenanceWindowResponse = RegisterTargetWithMaintenanceWindowResponse'
{
RegisterTargetWithMaintenanceWindowResponse -> Maybe Text
windowTargetId :: Prelude.Maybe Prelude.Text,
RegisterTargetWithMaintenanceWindowResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RegisterTargetWithMaintenanceWindowResponse
-> RegisterTargetWithMaintenanceWindowResponse -> Bool
(RegisterTargetWithMaintenanceWindowResponse
-> RegisterTargetWithMaintenanceWindowResponse -> Bool)
-> (RegisterTargetWithMaintenanceWindowResponse
-> RegisterTargetWithMaintenanceWindowResponse -> Bool)
-> Eq RegisterTargetWithMaintenanceWindowResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterTargetWithMaintenanceWindowResponse
-> RegisterTargetWithMaintenanceWindowResponse -> Bool
$c/= :: RegisterTargetWithMaintenanceWindowResponse
-> RegisterTargetWithMaintenanceWindowResponse -> Bool
== :: RegisterTargetWithMaintenanceWindowResponse
-> RegisterTargetWithMaintenanceWindowResponse -> Bool
$c== :: RegisterTargetWithMaintenanceWindowResponse
-> RegisterTargetWithMaintenanceWindowResponse -> Bool
Prelude.Eq, ReadPrec [RegisterTargetWithMaintenanceWindowResponse]
ReadPrec RegisterTargetWithMaintenanceWindowResponse
Int -> ReadS RegisterTargetWithMaintenanceWindowResponse
ReadS [RegisterTargetWithMaintenanceWindowResponse]
(Int -> ReadS RegisterTargetWithMaintenanceWindowResponse)
-> ReadS [RegisterTargetWithMaintenanceWindowResponse]
-> ReadPrec RegisterTargetWithMaintenanceWindowResponse
-> ReadPrec [RegisterTargetWithMaintenanceWindowResponse]
-> Read RegisterTargetWithMaintenanceWindowResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterTargetWithMaintenanceWindowResponse]
$creadListPrec :: ReadPrec [RegisterTargetWithMaintenanceWindowResponse]
readPrec :: ReadPrec RegisterTargetWithMaintenanceWindowResponse
$creadPrec :: ReadPrec RegisterTargetWithMaintenanceWindowResponse
readList :: ReadS [RegisterTargetWithMaintenanceWindowResponse]
$creadList :: ReadS [RegisterTargetWithMaintenanceWindowResponse]
readsPrec :: Int -> ReadS RegisterTargetWithMaintenanceWindowResponse
$creadsPrec :: Int -> ReadS RegisterTargetWithMaintenanceWindowResponse
Prelude.Read, Int -> RegisterTargetWithMaintenanceWindowResponse -> ShowS
[RegisterTargetWithMaintenanceWindowResponse] -> ShowS
RegisterTargetWithMaintenanceWindowResponse -> String
(Int -> RegisterTargetWithMaintenanceWindowResponse -> ShowS)
-> (RegisterTargetWithMaintenanceWindowResponse -> String)
-> ([RegisterTargetWithMaintenanceWindowResponse] -> ShowS)
-> Show RegisterTargetWithMaintenanceWindowResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterTargetWithMaintenanceWindowResponse] -> ShowS
$cshowList :: [RegisterTargetWithMaintenanceWindowResponse] -> ShowS
show :: RegisterTargetWithMaintenanceWindowResponse -> String
$cshow :: RegisterTargetWithMaintenanceWindowResponse -> String
showsPrec :: Int -> RegisterTargetWithMaintenanceWindowResponse -> ShowS
$cshowsPrec :: Int -> RegisterTargetWithMaintenanceWindowResponse -> ShowS
Prelude.Show, (forall x.
RegisterTargetWithMaintenanceWindowResponse
-> Rep RegisterTargetWithMaintenanceWindowResponse x)
-> (forall x.
Rep RegisterTargetWithMaintenanceWindowResponse x
-> RegisterTargetWithMaintenanceWindowResponse)
-> Generic RegisterTargetWithMaintenanceWindowResponse
forall x.
Rep RegisterTargetWithMaintenanceWindowResponse x
-> RegisterTargetWithMaintenanceWindowResponse
forall x.
RegisterTargetWithMaintenanceWindowResponse
-> Rep RegisterTargetWithMaintenanceWindowResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RegisterTargetWithMaintenanceWindowResponse x
-> RegisterTargetWithMaintenanceWindowResponse
$cfrom :: forall x.
RegisterTargetWithMaintenanceWindowResponse
-> Rep RegisterTargetWithMaintenanceWindowResponse x
Prelude.Generic)
newRegisterTargetWithMaintenanceWindowResponse ::
Prelude.Int ->
RegisterTargetWithMaintenanceWindowResponse
newRegisterTargetWithMaintenanceWindowResponse :: Int -> RegisterTargetWithMaintenanceWindowResponse
newRegisterTargetWithMaintenanceWindowResponse
Int
pHttpStatus_ =
RegisterTargetWithMaintenanceWindowResponse' :: Maybe Text -> Int -> RegisterTargetWithMaintenanceWindowResponse
RegisterTargetWithMaintenanceWindowResponse'
{ $sel:windowTargetId:RegisterTargetWithMaintenanceWindowResponse' :: Maybe Text
windowTargetId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RegisterTargetWithMaintenanceWindowResponse' :: Int
httpStatus = Int
pHttpStatus_
}
registerTargetWithMaintenanceWindowResponse_windowTargetId :: Lens.Lens' RegisterTargetWithMaintenanceWindowResponse (Prelude.Maybe Prelude.Text)
registerTargetWithMaintenanceWindowResponse_windowTargetId :: (Maybe Text -> f (Maybe Text))
-> RegisterTargetWithMaintenanceWindowResponse
-> f RegisterTargetWithMaintenanceWindowResponse
registerTargetWithMaintenanceWindowResponse_windowTargetId = (RegisterTargetWithMaintenanceWindowResponse -> Maybe Text)
-> (RegisterTargetWithMaintenanceWindowResponse
-> Maybe Text -> RegisterTargetWithMaintenanceWindowResponse)
-> Lens
RegisterTargetWithMaintenanceWindowResponse
RegisterTargetWithMaintenanceWindowResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTargetWithMaintenanceWindowResponse' {Maybe Text
windowTargetId :: Maybe Text
$sel:windowTargetId:RegisterTargetWithMaintenanceWindowResponse' :: RegisterTargetWithMaintenanceWindowResponse -> Maybe Text
windowTargetId} -> Maybe Text
windowTargetId) (\s :: RegisterTargetWithMaintenanceWindowResponse
s@RegisterTargetWithMaintenanceWindowResponse' {} Maybe Text
a -> RegisterTargetWithMaintenanceWindowResponse
s {$sel:windowTargetId:RegisterTargetWithMaintenanceWindowResponse' :: Maybe Text
windowTargetId = Maybe Text
a} :: RegisterTargetWithMaintenanceWindowResponse)
registerTargetWithMaintenanceWindowResponse_httpStatus :: Lens.Lens' RegisterTargetWithMaintenanceWindowResponse Prelude.Int
registerTargetWithMaintenanceWindowResponse_httpStatus :: (Int -> f Int)
-> RegisterTargetWithMaintenanceWindowResponse
-> f RegisterTargetWithMaintenanceWindowResponse
registerTargetWithMaintenanceWindowResponse_httpStatus = (RegisterTargetWithMaintenanceWindowResponse -> Int)
-> (RegisterTargetWithMaintenanceWindowResponse
-> Int -> RegisterTargetWithMaintenanceWindowResponse)
-> Lens
RegisterTargetWithMaintenanceWindowResponse
RegisterTargetWithMaintenanceWindowResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTargetWithMaintenanceWindowResponse' {Int
httpStatus :: Int
$sel:httpStatus:RegisterTargetWithMaintenanceWindowResponse' :: RegisterTargetWithMaintenanceWindowResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RegisterTargetWithMaintenanceWindowResponse
s@RegisterTargetWithMaintenanceWindowResponse' {} Int
a -> RegisterTargetWithMaintenanceWindowResponse
s {$sel:httpStatus:RegisterTargetWithMaintenanceWindowResponse' :: Int
httpStatus = Int
a} :: RegisterTargetWithMaintenanceWindowResponse)
instance
Prelude.NFData
RegisterTargetWithMaintenanceWindowResponse