{-# 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.SendCommand
(
SendCommand (..),
newSendCommand,
sendCommand_serviceRoleArn,
sendCommand_notificationConfig,
sendCommand_documentHashType,
sendCommand_cloudWatchOutputConfig,
sendCommand_outputS3KeyPrefix,
sendCommand_maxErrors,
sendCommand_instanceIds,
sendCommand_outputS3Region,
sendCommand_targets,
sendCommand_parameters,
sendCommand_documentHash,
sendCommand_documentVersion,
sendCommand_timeoutSeconds,
sendCommand_comment,
sendCommand_outputS3BucketName,
sendCommand_maxConcurrency,
sendCommand_documentName,
SendCommandResponse (..),
newSendCommandResponse,
sendCommandResponse_command,
sendCommandResponse_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 SendCommand = SendCommand'
{
SendCommand -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
SendCommand -> Maybe NotificationConfig
notificationConfig :: Prelude.Maybe NotificationConfig,
SendCommand -> Maybe DocumentHashType
documentHashType :: Prelude.Maybe DocumentHashType,
SendCommand -> Maybe CloudWatchOutputConfig
cloudWatchOutputConfig :: Prelude.Maybe CloudWatchOutputConfig,
SendCommand -> Maybe Text
outputS3KeyPrefix :: Prelude.Maybe Prelude.Text,
SendCommand -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
SendCommand -> Maybe [Text]
instanceIds :: Prelude.Maybe [Prelude.Text],
SendCommand -> Maybe Text
outputS3Region :: Prelude.Maybe Prelude.Text,
SendCommand -> Maybe [Target]
targets :: Prelude.Maybe [Target],
SendCommand -> Maybe (HashMap Text [Text])
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
SendCommand -> Maybe Text
documentHash :: Prelude.Maybe Prelude.Text,
SendCommand -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
SendCommand -> Maybe Natural
timeoutSeconds :: Prelude.Maybe Prelude.Natural,
SendCommand -> Maybe Text
comment :: Prelude.Maybe Prelude.Text,
SendCommand -> Maybe Text
outputS3BucketName :: Prelude.Maybe Prelude.Text,
SendCommand -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text,
SendCommand -> Text
documentName :: Prelude.Text
}
deriving (SendCommand -> SendCommand -> Bool
(SendCommand -> SendCommand -> Bool)
-> (SendCommand -> SendCommand -> Bool) -> Eq SendCommand
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendCommand -> SendCommand -> Bool
$c/= :: SendCommand -> SendCommand -> Bool
== :: SendCommand -> SendCommand -> Bool
$c== :: SendCommand -> SendCommand -> Bool
Prelude.Eq, ReadPrec [SendCommand]
ReadPrec SendCommand
Int -> ReadS SendCommand
ReadS [SendCommand]
(Int -> ReadS SendCommand)
-> ReadS [SendCommand]
-> ReadPrec SendCommand
-> ReadPrec [SendCommand]
-> Read SendCommand
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendCommand]
$creadListPrec :: ReadPrec [SendCommand]
readPrec :: ReadPrec SendCommand
$creadPrec :: ReadPrec SendCommand
readList :: ReadS [SendCommand]
$creadList :: ReadS [SendCommand]
readsPrec :: Int -> ReadS SendCommand
$creadsPrec :: Int -> ReadS SendCommand
Prelude.Read, Int -> SendCommand -> ShowS
[SendCommand] -> ShowS
SendCommand -> String
(Int -> SendCommand -> ShowS)
-> (SendCommand -> String)
-> ([SendCommand] -> ShowS)
-> Show SendCommand
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendCommand] -> ShowS
$cshowList :: [SendCommand] -> ShowS
show :: SendCommand -> String
$cshow :: SendCommand -> String
showsPrec :: Int -> SendCommand -> ShowS
$cshowsPrec :: Int -> SendCommand -> ShowS
Prelude.Show, (forall x. SendCommand -> Rep SendCommand x)
-> (forall x. Rep SendCommand x -> SendCommand)
-> Generic SendCommand
forall x. Rep SendCommand x -> SendCommand
forall x. SendCommand -> Rep SendCommand x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendCommand x -> SendCommand
$cfrom :: forall x. SendCommand -> Rep SendCommand x
Prelude.Generic)
newSendCommand ::
Prelude.Text ->
SendCommand
newSendCommand :: Text -> SendCommand
newSendCommand Text
pDocumentName_ =
SendCommand' :: Maybe Text
-> Maybe NotificationConfig
-> Maybe DocumentHashType
-> Maybe CloudWatchOutputConfig
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [Target]
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> SendCommand
SendCommand'
{ $sel:serviceRoleArn:SendCommand' :: Maybe Text
serviceRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:notificationConfig:SendCommand' :: Maybe NotificationConfig
notificationConfig = Maybe NotificationConfig
forall a. Maybe a
Prelude.Nothing,
$sel:documentHashType:SendCommand' :: Maybe DocumentHashType
documentHashType = Maybe DocumentHashType
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchOutputConfig:SendCommand' :: Maybe CloudWatchOutputConfig
cloudWatchOutputConfig = Maybe CloudWatchOutputConfig
forall a. Maybe a
Prelude.Nothing,
$sel:outputS3KeyPrefix:SendCommand' :: Maybe Text
outputS3KeyPrefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxErrors:SendCommand' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceIds:SendCommand' :: Maybe [Text]
instanceIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:outputS3Region:SendCommand' :: Maybe Text
outputS3Region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targets:SendCommand' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:SendCommand' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
$sel:documentHash:SendCommand' :: Maybe Text
documentHash = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:documentVersion:SendCommand' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timeoutSeconds:SendCommand' :: Maybe Natural
timeoutSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:comment:SendCommand' :: Maybe Text
comment = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:outputS3BucketName:SendCommand' :: Maybe Text
outputS3BucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxConcurrency:SendCommand' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:documentName:SendCommand' :: Text
documentName = Text
pDocumentName_
}
sendCommand_serviceRoleArn :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Text)
sendCommand_serviceRoleArn :: (Maybe Text -> f (Maybe Text)) -> SendCommand -> f SendCommand
sendCommand_serviceRoleArn = (SendCommand -> Maybe Text)
-> (SendCommand -> Maybe Text -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Text
serviceRoleArn :: Maybe Text
$sel:serviceRoleArn:SendCommand' :: SendCommand -> Maybe Text
serviceRoleArn} -> Maybe Text
serviceRoleArn) (\s :: SendCommand
s@SendCommand' {} Maybe Text
a -> SendCommand
s {$sel:serviceRoleArn:SendCommand' :: Maybe Text
serviceRoleArn = Maybe Text
a} :: SendCommand)
sendCommand_notificationConfig :: Lens.Lens' SendCommand (Prelude.Maybe NotificationConfig)
sendCommand_notificationConfig :: (Maybe NotificationConfig -> f (Maybe NotificationConfig))
-> SendCommand -> f SendCommand
sendCommand_notificationConfig = (SendCommand -> Maybe NotificationConfig)
-> (SendCommand -> Maybe NotificationConfig -> SendCommand)
-> Lens
SendCommand
SendCommand
(Maybe NotificationConfig)
(Maybe NotificationConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe NotificationConfig
notificationConfig :: Maybe NotificationConfig
$sel:notificationConfig:SendCommand' :: SendCommand -> Maybe NotificationConfig
notificationConfig} -> Maybe NotificationConfig
notificationConfig) (\s :: SendCommand
s@SendCommand' {} Maybe NotificationConfig
a -> SendCommand
s {$sel:notificationConfig:SendCommand' :: Maybe NotificationConfig
notificationConfig = Maybe NotificationConfig
a} :: SendCommand)
sendCommand_documentHashType :: Lens.Lens' SendCommand (Prelude.Maybe DocumentHashType)
sendCommand_documentHashType :: (Maybe DocumentHashType -> f (Maybe DocumentHashType))
-> SendCommand -> f SendCommand
sendCommand_documentHashType = (SendCommand -> Maybe DocumentHashType)
-> (SendCommand -> Maybe DocumentHashType -> SendCommand)
-> Lens
SendCommand
SendCommand
(Maybe DocumentHashType)
(Maybe DocumentHashType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe DocumentHashType
documentHashType :: Maybe DocumentHashType
$sel:documentHashType:SendCommand' :: SendCommand -> Maybe DocumentHashType
documentHashType} -> Maybe DocumentHashType
documentHashType) (\s :: SendCommand
s@SendCommand' {} Maybe DocumentHashType
a -> SendCommand
s {$sel:documentHashType:SendCommand' :: Maybe DocumentHashType
documentHashType = Maybe DocumentHashType
a} :: SendCommand)
sendCommand_cloudWatchOutputConfig :: Lens.Lens' SendCommand (Prelude.Maybe CloudWatchOutputConfig)
sendCommand_cloudWatchOutputConfig :: (Maybe CloudWatchOutputConfig -> f (Maybe CloudWatchOutputConfig))
-> SendCommand -> f SendCommand
sendCommand_cloudWatchOutputConfig = (SendCommand -> Maybe CloudWatchOutputConfig)
-> (SendCommand -> Maybe CloudWatchOutputConfig -> SendCommand)
-> Lens
SendCommand
SendCommand
(Maybe CloudWatchOutputConfig)
(Maybe CloudWatchOutputConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe CloudWatchOutputConfig
cloudWatchOutputConfig :: Maybe CloudWatchOutputConfig
$sel:cloudWatchOutputConfig:SendCommand' :: SendCommand -> Maybe CloudWatchOutputConfig
cloudWatchOutputConfig} -> Maybe CloudWatchOutputConfig
cloudWatchOutputConfig) (\s :: SendCommand
s@SendCommand' {} Maybe CloudWatchOutputConfig
a -> SendCommand
s {$sel:cloudWatchOutputConfig:SendCommand' :: Maybe CloudWatchOutputConfig
cloudWatchOutputConfig = Maybe CloudWatchOutputConfig
a} :: SendCommand)
sendCommand_outputS3KeyPrefix :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Text)
sendCommand_outputS3KeyPrefix :: (Maybe Text -> f (Maybe Text)) -> SendCommand -> f SendCommand
sendCommand_outputS3KeyPrefix = (SendCommand -> Maybe Text)
-> (SendCommand -> Maybe Text -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Text
outputS3KeyPrefix :: Maybe Text
$sel:outputS3KeyPrefix:SendCommand' :: SendCommand -> Maybe Text
outputS3KeyPrefix} -> Maybe Text
outputS3KeyPrefix) (\s :: SendCommand
s@SendCommand' {} Maybe Text
a -> SendCommand
s {$sel:outputS3KeyPrefix:SendCommand' :: Maybe Text
outputS3KeyPrefix = Maybe Text
a} :: SendCommand)
sendCommand_maxErrors :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Text)
sendCommand_maxErrors :: (Maybe Text -> f (Maybe Text)) -> SendCommand -> f SendCommand
sendCommand_maxErrors = (SendCommand -> Maybe Text)
-> (SendCommand -> Maybe Text -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:SendCommand' :: SendCommand -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: SendCommand
s@SendCommand' {} Maybe Text
a -> SendCommand
s {$sel:maxErrors:SendCommand' :: Maybe Text
maxErrors = Maybe Text
a} :: SendCommand)
sendCommand_instanceIds :: Lens.Lens' SendCommand (Prelude.Maybe [Prelude.Text])
sendCommand_instanceIds :: (Maybe [Text] -> f (Maybe [Text])) -> SendCommand -> f SendCommand
sendCommand_instanceIds = (SendCommand -> Maybe [Text])
-> (SendCommand -> Maybe [Text] -> SendCommand)
-> Lens SendCommand SendCommand (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe [Text]
instanceIds :: Maybe [Text]
$sel:instanceIds:SendCommand' :: SendCommand -> Maybe [Text]
instanceIds} -> Maybe [Text]
instanceIds) (\s :: SendCommand
s@SendCommand' {} Maybe [Text]
a -> SendCommand
s {$sel:instanceIds:SendCommand' :: Maybe [Text]
instanceIds = Maybe [Text]
a} :: SendCommand) ((Maybe [Text] -> f (Maybe [Text]))
-> SendCommand -> f SendCommand)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SendCommand
-> f SendCommand
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendCommand_outputS3Region :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Text)
sendCommand_outputS3Region :: (Maybe Text -> f (Maybe Text)) -> SendCommand -> f SendCommand
sendCommand_outputS3Region = (SendCommand -> Maybe Text)
-> (SendCommand -> Maybe Text -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Text
outputS3Region :: Maybe Text
$sel:outputS3Region:SendCommand' :: SendCommand -> Maybe Text
outputS3Region} -> Maybe Text
outputS3Region) (\s :: SendCommand
s@SendCommand' {} Maybe Text
a -> SendCommand
s {$sel:outputS3Region:SendCommand' :: Maybe Text
outputS3Region = Maybe Text
a} :: SendCommand)
sendCommand_targets :: Lens.Lens' SendCommand (Prelude.Maybe [Target])
sendCommand_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> SendCommand -> f SendCommand
sendCommand_targets = (SendCommand -> Maybe [Target])
-> (SendCommand -> Maybe [Target] -> SendCommand)
-> Lens SendCommand SendCommand (Maybe [Target]) (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:SendCommand' :: SendCommand -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: SendCommand
s@SendCommand' {} Maybe [Target]
a -> SendCommand
s {$sel:targets:SendCommand' :: Maybe [Target]
targets = Maybe [Target]
a} :: SendCommand) ((Maybe [Target] -> f (Maybe [Target]))
-> SendCommand -> f SendCommand)
-> ((Maybe [Target] -> f (Maybe [Target]))
-> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> SendCommand
-> f SendCommand
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Target] [Target] [Target] [Target]
-> Iso
(Maybe [Target]) (Maybe [Target]) (Maybe [Target]) (Maybe [Target])
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 [Target] [Target] [Target] [Target]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendCommand_parameters :: Lens.Lens' SendCommand (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
sendCommand_parameters :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> SendCommand -> f SendCommand
sendCommand_parameters = (SendCommand -> Maybe (HashMap Text [Text]))
-> (SendCommand -> Maybe (HashMap Text [Text]) -> SendCommand)
-> Lens
SendCommand
SendCommand
(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 (\SendCommand' {Maybe (HashMap Text [Text])
parameters :: Maybe (HashMap Text [Text])
$sel:parameters:SendCommand' :: SendCommand -> Maybe (HashMap Text [Text])
parameters} -> Maybe (HashMap Text [Text])
parameters) (\s :: SendCommand
s@SendCommand' {} Maybe (HashMap Text [Text])
a -> SendCommand
s {$sel:parameters:SendCommand' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
a} :: SendCommand) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> SendCommand -> f SendCommand)
-> ((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])))
-> SendCommand
-> f SendCommand
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
sendCommand_documentHash :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Text)
sendCommand_documentHash :: (Maybe Text -> f (Maybe Text)) -> SendCommand -> f SendCommand
sendCommand_documentHash = (SendCommand -> Maybe Text)
-> (SendCommand -> Maybe Text -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Text
documentHash :: Maybe Text
$sel:documentHash:SendCommand' :: SendCommand -> Maybe Text
documentHash} -> Maybe Text
documentHash) (\s :: SendCommand
s@SendCommand' {} Maybe Text
a -> SendCommand
s {$sel:documentHash:SendCommand' :: Maybe Text
documentHash = Maybe Text
a} :: SendCommand)
sendCommand_documentVersion :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Text)
sendCommand_documentVersion :: (Maybe Text -> f (Maybe Text)) -> SendCommand -> f SendCommand
sendCommand_documentVersion = (SendCommand -> Maybe Text)
-> (SendCommand -> Maybe Text -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:SendCommand' :: SendCommand -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: SendCommand
s@SendCommand' {} Maybe Text
a -> SendCommand
s {$sel:documentVersion:SendCommand' :: Maybe Text
documentVersion = Maybe Text
a} :: SendCommand)
sendCommand_timeoutSeconds :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Natural)
sendCommand_timeoutSeconds :: (Maybe Natural -> f (Maybe Natural))
-> SendCommand -> f SendCommand
sendCommand_timeoutSeconds = (SendCommand -> Maybe Natural)
-> (SendCommand -> Maybe Natural -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Natural
timeoutSeconds :: Maybe Natural
$sel:timeoutSeconds:SendCommand' :: SendCommand -> Maybe Natural
timeoutSeconds} -> Maybe Natural
timeoutSeconds) (\s :: SendCommand
s@SendCommand' {} Maybe Natural
a -> SendCommand
s {$sel:timeoutSeconds:SendCommand' :: Maybe Natural
timeoutSeconds = Maybe Natural
a} :: SendCommand)
sendCommand_comment :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Text)
sendCommand_comment :: (Maybe Text -> f (Maybe Text)) -> SendCommand -> f SendCommand
sendCommand_comment = (SendCommand -> Maybe Text)
-> (SendCommand -> Maybe Text -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Text
comment :: Maybe Text
$sel:comment:SendCommand' :: SendCommand -> Maybe Text
comment} -> Maybe Text
comment) (\s :: SendCommand
s@SendCommand' {} Maybe Text
a -> SendCommand
s {$sel:comment:SendCommand' :: Maybe Text
comment = Maybe Text
a} :: SendCommand)
sendCommand_outputS3BucketName :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Text)
sendCommand_outputS3BucketName :: (Maybe Text -> f (Maybe Text)) -> SendCommand -> f SendCommand
sendCommand_outputS3BucketName = (SendCommand -> Maybe Text)
-> (SendCommand -> Maybe Text -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Text
outputS3BucketName :: Maybe Text
$sel:outputS3BucketName:SendCommand' :: SendCommand -> Maybe Text
outputS3BucketName} -> Maybe Text
outputS3BucketName) (\s :: SendCommand
s@SendCommand' {} Maybe Text
a -> SendCommand
s {$sel:outputS3BucketName:SendCommand' :: Maybe Text
outputS3BucketName = Maybe Text
a} :: SendCommand)
sendCommand_maxConcurrency :: Lens.Lens' SendCommand (Prelude.Maybe Prelude.Text)
sendCommand_maxConcurrency :: (Maybe Text -> f (Maybe Text)) -> SendCommand -> f SendCommand
sendCommand_maxConcurrency = (SendCommand -> Maybe Text)
-> (SendCommand -> Maybe Text -> SendCommand)
-> Lens SendCommand SendCommand (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:SendCommand' :: SendCommand -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: SendCommand
s@SendCommand' {} Maybe Text
a -> SendCommand
s {$sel:maxConcurrency:SendCommand' :: Maybe Text
maxConcurrency = Maybe Text
a} :: SendCommand)
sendCommand_documentName :: Lens.Lens' SendCommand Prelude.Text
sendCommand_documentName :: (Text -> f Text) -> SendCommand -> f SendCommand
sendCommand_documentName = (SendCommand -> Text)
-> (SendCommand -> Text -> SendCommand)
-> Lens SendCommand SendCommand Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommand' {Text
documentName :: Text
$sel:documentName:SendCommand' :: SendCommand -> Text
documentName} -> Text
documentName) (\s :: SendCommand
s@SendCommand' {} Text
a -> SendCommand
s {$sel:documentName:SendCommand' :: Text
documentName = Text
a} :: SendCommand)
instance Core.AWSRequest SendCommand where
type AWSResponse SendCommand = SendCommandResponse
request :: SendCommand -> Request SendCommand
request = Service -> SendCommand -> Request SendCommand
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy SendCommand
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SendCommand)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse SendCommand))
-> Logger
-> Service
-> Proxy SendCommand
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SendCommand)))
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 Command -> Int -> SendCommandResponse
SendCommandResponse'
(Maybe Command -> Int -> SendCommandResponse)
-> Either String (Maybe Command)
-> Either String (Int -> SendCommandResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Command)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Command")
Either String (Int -> SendCommandResponse)
-> Either String Int -> Either String SendCommandResponse
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 SendCommand
instance Prelude.NFData SendCommand
instance Core.ToHeaders SendCommand where
toHeaders :: SendCommand -> ResponseHeaders
toHeaders =
ResponseHeaders -> SendCommand -> 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.SendCommand" :: 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 SendCommand where
toJSON :: SendCommand -> Value
toJSON SendCommand' {Maybe Natural
Maybe [Text]
Maybe [Target]
Maybe Text
Maybe (HashMap Text [Text])
Maybe CloudWatchOutputConfig
Maybe DocumentHashType
Maybe NotificationConfig
Text
documentName :: Text
maxConcurrency :: Maybe Text
outputS3BucketName :: Maybe Text
comment :: Maybe Text
timeoutSeconds :: Maybe Natural
documentVersion :: Maybe Text
documentHash :: Maybe Text
parameters :: Maybe (HashMap Text [Text])
targets :: Maybe [Target]
outputS3Region :: Maybe Text
instanceIds :: Maybe [Text]
maxErrors :: Maybe Text
outputS3KeyPrefix :: Maybe Text
cloudWatchOutputConfig :: Maybe CloudWatchOutputConfig
documentHashType :: Maybe DocumentHashType
notificationConfig :: Maybe NotificationConfig
serviceRoleArn :: Maybe Text
$sel:documentName:SendCommand' :: SendCommand -> Text
$sel:maxConcurrency:SendCommand' :: SendCommand -> Maybe Text
$sel:outputS3BucketName:SendCommand' :: SendCommand -> Maybe Text
$sel:comment:SendCommand' :: SendCommand -> Maybe Text
$sel:timeoutSeconds:SendCommand' :: SendCommand -> Maybe Natural
$sel:documentVersion:SendCommand' :: SendCommand -> Maybe Text
$sel:documentHash:SendCommand' :: SendCommand -> Maybe Text
$sel:parameters:SendCommand' :: SendCommand -> Maybe (HashMap Text [Text])
$sel:targets:SendCommand' :: SendCommand -> Maybe [Target]
$sel:outputS3Region:SendCommand' :: SendCommand -> Maybe Text
$sel:instanceIds:SendCommand' :: SendCommand -> Maybe [Text]
$sel:maxErrors:SendCommand' :: SendCommand -> Maybe Text
$sel:outputS3KeyPrefix:SendCommand' :: SendCommand -> Maybe Text
$sel:cloudWatchOutputConfig:SendCommand' :: SendCommand -> Maybe CloudWatchOutputConfig
$sel:documentHashType:SendCommand' :: SendCommand -> Maybe DocumentHashType
$sel:notificationConfig:SendCommand' :: SendCommand -> Maybe NotificationConfig
$sel:serviceRoleArn:SendCommand' :: SendCommand -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ServiceRoleArn" 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
serviceRoleArn,
(Text
"NotificationConfig" Text -> NotificationConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NotificationConfig -> Pair)
-> Maybe NotificationConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationConfig
notificationConfig,
(Text
"DocumentHashType" Text -> DocumentHashType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DocumentHashType -> Pair) -> Maybe DocumentHashType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentHashType
documentHashType,
(Text
"CloudWatchOutputConfig" Text -> CloudWatchOutputConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CloudWatchOutputConfig -> Pair)
-> Maybe CloudWatchOutputConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchOutputConfig
cloudWatchOutputConfig,
(Text
"OutputS3KeyPrefix" 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
outputS3KeyPrefix,
(Text
"MaxErrors" 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
maxErrors,
(Text
"InstanceIds" 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]
instanceIds,
(Text
"OutputS3Region" 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
outputS3Region,
(Text
"Targets" Text -> [Target] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Target] -> Pair) -> Maybe [Target] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Target]
targets,
(Text
"Parameters" 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])
parameters,
(Text
"DocumentHash" 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
documentHash,
(Text
"DocumentVersion" 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
documentVersion,
(Text
"TimeoutSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeoutSeconds,
(Text
"Comment" 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
comment,
(Text
"OutputS3BucketName" 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
outputS3BucketName,
(Text
"MaxConcurrency" 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
maxConcurrency,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DocumentName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
documentName)
]
)
instance Core.ToPath SendCommand where
toPath :: SendCommand -> ByteString
toPath = ByteString -> SendCommand -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SendCommand where
toQuery :: SendCommand -> QueryString
toQuery = QueryString -> SendCommand -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SendCommandResponse = SendCommandResponse'
{
SendCommandResponse -> Maybe Command
command :: Prelude.Maybe Command,
SendCommandResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SendCommandResponse -> SendCommandResponse -> Bool
(SendCommandResponse -> SendCommandResponse -> Bool)
-> (SendCommandResponse -> SendCommandResponse -> Bool)
-> Eq SendCommandResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendCommandResponse -> SendCommandResponse -> Bool
$c/= :: SendCommandResponse -> SendCommandResponse -> Bool
== :: SendCommandResponse -> SendCommandResponse -> Bool
$c== :: SendCommandResponse -> SendCommandResponse -> Bool
Prelude.Eq, ReadPrec [SendCommandResponse]
ReadPrec SendCommandResponse
Int -> ReadS SendCommandResponse
ReadS [SendCommandResponse]
(Int -> ReadS SendCommandResponse)
-> ReadS [SendCommandResponse]
-> ReadPrec SendCommandResponse
-> ReadPrec [SendCommandResponse]
-> Read SendCommandResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendCommandResponse]
$creadListPrec :: ReadPrec [SendCommandResponse]
readPrec :: ReadPrec SendCommandResponse
$creadPrec :: ReadPrec SendCommandResponse
readList :: ReadS [SendCommandResponse]
$creadList :: ReadS [SendCommandResponse]
readsPrec :: Int -> ReadS SendCommandResponse
$creadsPrec :: Int -> ReadS SendCommandResponse
Prelude.Read, Int -> SendCommandResponse -> ShowS
[SendCommandResponse] -> ShowS
SendCommandResponse -> String
(Int -> SendCommandResponse -> ShowS)
-> (SendCommandResponse -> String)
-> ([SendCommandResponse] -> ShowS)
-> Show SendCommandResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendCommandResponse] -> ShowS
$cshowList :: [SendCommandResponse] -> ShowS
show :: SendCommandResponse -> String
$cshow :: SendCommandResponse -> String
showsPrec :: Int -> SendCommandResponse -> ShowS
$cshowsPrec :: Int -> SendCommandResponse -> ShowS
Prelude.Show, (forall x. SendCommandResponse -> Rep SendCommandResponse x)
-> (forall x. Rep SendCommandResponse x -> SendCommandResponse)
-> Generic SendCommandResponse
forall x. Rep SendCommandResponse x -> SendCommandResponse
forall x. SendCommandResponse -> Rep SendCommandResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendCommandResponse x -> SendCommandResponse
$cfrom :: forall x. SendCommandResponse -> Rep SendCommandResponse x
Prelude.Generic)
newSendCommandResponse ::
Prelude.Int ->
SendCommandResponse
newSendCommandResponse :: Int -> SendCommandResponse
newSendCommandResponse Int
pHttpStatus_ =
SendCommandResponse' :: Maybe Command -> Int -> SendCommandResponse
SendCommandResponse'
{ $sel:command:SendCommandResponse' :: Maybe Command
command = Maybe Command
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SendCommandResponse' :: Int
httpStatus = Int
pHttpStatus_
}
sendCommandResponse_command :: Lens.Lens' SendCommandResponse (Prelude.Maybe Command)
sendCommandResponse_command :: (Maybe Command -> f (Maybe Command))
-> SendCommandResponse -> f SendCommandResponse
sendCommandResponse_command = (SendCommandResponse -> Maybe Command)
-> (SendCommandResponse -> Maybe Command -> SendCommandResponse)
-> Lens
SendCommandResponse
SendCommandResponse
(Maybe Command)
(Maybe Command)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommandResponse' {Maybe Command
command :: Maybe Command
$sel:command:SendCommandResponse' :: SendCommandResponse -> Maybe Command
command} -> Maybe Command
command) (\s :: SendCommandResponse
s@SendCommandResponse' {} Maybe Command
a -> SendCommandResponse
s {$sel:command:SendCommandResponse' :: Maybe Command
command = Maybe Command
a} :: SendCommandResponse)
sendCommandResponse_httpStatus :: Lens.Lens' SendCommandResponse Prelude.Int
sendCommandResponse_httpStatus :: (Int -> f Int) -> SendCommandResponse -> f SendCommandResponse
sendCommandResponse_httpStatus = (SendCommandResponse -> Int)
-> (SendCommandResponse -> Int -> SendCommandResponse)
-> Lens SendCommandResponse SendCommandResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendCommandResponse' {Int
httpStatus :: Int
$sel:httpStatus:SendCommandResponse' :: SendCommandResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SendCommandResponse
s@SendCommandResponse' {} Int
a -> SendCommandResponse
s {$sel:httpStatus:SendCommandResponse' :: Int
httpStatus = Int
a} :: SendCommandResponse)
instance Prelude.NFData SendCommandResponse