{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.SSM.GetMaintenanceWindowExecutionTaskInvocation
(
getMaintenanceWindowExecutionTaskInvocation
, GetMaintenanceWindowExecutionTaskInvocation
, gmwetiWindowExecutionId
, gmwetiTaskId
, gmwetiInvocationId
, getMaintenanceWindowExecutionTaskInvocationResponse
, GetMaintenanceWindowExecutionTaskInvocationResponse
, gmwetirsStatus
, gmwetirsExecutionId
, gmwetirsTaskExecutionId
, gmwetirsStartTime
, gmwetirsInvocationId
, gmwetirsOwnerInformation
, gmwetirsTaskType
, gmwetirsWindowTargetId
, gmwetirsWindowExecutionId
, gmwetirsStatusDetails
, gmwetirsEndTime
, gmwetirsParameters
, gmwetirsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SSM.Types
import Network.AWS.SSM.Types.Product
data GetMaintenanceWindowExecutionTaskInvocation = GetMaintenanceWindowExecutionTaskInvocation'
{ _gmwetiWindowExecutionId :: !Text
, _gmwetiTaskId :: !Text
, _gmwetiInvocationId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getMaintenanceWindowExecutionTaskInvocation
:: Text
-> Text
-> Text
-> GetMaintenanceWindowExecutionTaskInvocation
getMaintenanceWindowExecutionTaskInvocation pWindowExecutionId_ pTaskId_ pInvocationId_ =
GetMaintenanceWindowExecutionTaskInvocation'
{ _gmwetiWindowExecutionId = pWindowExecutionId_
, _gmwetiTaskId = pTaskId_
, _gmwetiInvocationId = pInvocationId_
}
gmwetiWindowExecutionId :: Lens' GetMaintenanceWindowExecutionTaskInvocation Text
gmwetiWindowExecutionId = lens _gmwetiWindowExecutionId (\ s a -> s{_gmwetiWindowExecutionId = a})
gmwetiTaskId :: Lens' GetMaintenanceWindowExecutionTaskInvocation Text
gmwetiTaskId = lens _gmwetiTaskId (\ s a -> s{_gmwetiTaskId = a})
gmwetiInvocationId :: Lens' GetMaintenanceWindowExecutionTaskInvocation Text
gmwetiInvocationId = lens _gmwetiInvocationId (\ s a -> s{_gmwetiInvocationId = a})
instance AWSRequest
GetMaintenanceWindowExecutionTaskInvocation
where
type Rs GetMaintenanceWindowExecutionTaskInvocation =
GetMaintenanceWindowExecutionTaskInvocationResponse
request = postJSON ssm
response
= receiveJSON
(\ s h x ->
GetMaintenanceWindowExecutionTaskInvocationResponse'
<$>
(x .?> "Status") <*> (x .?> "ExecutionId") <*>
(x .?> "TaskExecutionId")
<*> (x .?> "StartTime")
<*> (x .?> "InvocationId")
<*> (x .?> "OwnerInformation")
<*> (x .?> "TaskType")
<*> (x .?> "WindowTargetId")
<*> (x .?> "WindowExecutionId")
<*> (x .?> "StatusDetails")
<*> (x .?> "EndTime")
<*> (x .?> "Parameters")
<*> (pure (fromEnum s)))
instance Hashable
GetMaintenanceWindowExecutionTaskInvocation
where
instance NFData
GetMaintenanceWindowExecutionTaskInvocation
where
instance ToHeaders
GetMaintenanceWindowExecutionTaskInvocation
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AmazonSSM.GetMaintenanceWindowExecutionTaskInvocation"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON
GetMaintenanceWindowExecutionTaskInvocation
where
toJSON
GetMaintenanceWindowExecutionTaskInvocation'{..}
= object
(catMaybes
[Just
("WindowExecutionId" .= _gmwetiWindowExecutionId),
Just ("TaskId" .= _gmwetiTaskId),
Just ("InvocationId" .= _gmwetiInvocationId)])
instance ToPath
GetMaintenanceWindowExecutionTaskInvocation
where
toPath = const "/"
instance ToQuery
GetMaintenanceWindowExecutionTaskInvocation
where
toQuery = const mempty
data GetMaintenanceWindowExecutionTaskInvocationResponse = GetMaintenanceWindowExecutionTaskInvocationResponse'
{ _gmwetirsStatus :: !(Maybe MaintenanceWindowExecutionStatus)
, _gmwetirsExecutionId :: !(Maybe Text)
, _gmwetirsTaskExecutionId :: !(Maybe Text)
, _gmwetirsStartTime :: !(Maybe POSIX)
, _gmwetirsInvocationId :: !(Maybe Text)
, _gmwetirsOwnerInformation :: !(Maybe (Sensitive Text))
, _gmwetirsTaskType :: !(Maybe MaintenanceWindowTaskType)
, _gmwetirsWindowTargetId :: !(Maybe Text)
, _gmwetirsWindowExecutionId :: !(Maybe Text)
, _gmwetirsStatusDetails :: !(Maybe Text)
, _gmwetirsEndTime :: !(Maybe POSIX)
, _gmwetirsParameters :: !(Maybe (Sensitive Text))
, _gmwetirsResponseStatus :: !Int
} deriving (Eq, Show, Data, Typeable, Generic)
getMaintenanceWindowExecutionTaskInvocationResponse
:: Int
-> GetMaintenanceWindowExecutionTaskInvocationResponse
getMaintenanceWindowExecutionTaskInvocationResponse pResponseStatus_ =
GetMaintenanceWindowExecutionTaskInvocationResponse'
{ _gmwetirsStatus = Nothing
, _gmwetirsExecutionId = Nothing
, _gmwetirsTaskExecutionId = Nothing
, _gmwetirsStartTime = Nothing
, _gmwetirsInvocationId = Nothing
, _gmwetirsOwnerInformation = Nothing
, _gmwetirsTaskType = Nothing
, _gmwetirsWindowTargetId = Nothing
, _gmwetirsWindowExecutionId = Nothing
, _gmwetirsStatusDetails = Nothing
, _gmwetirsEndTime = Nothing
, _gmwetirsParameters = Nothing
, _gmwetirsResponseStatus = pResponseStatus_
}
gmwetirsStatus :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe MaintenanceWindowExecutionStatus)
gmwetirsStatus = lens _gmwetirsStatus (\ s a -> s{_gmwetirsStatus = a})
gmwetirsExecutionId :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe Text)
gmwetirsExecutionId = lens _gmwetirsExecutionId (\ s a -> s{_gmwetirsExecutionId = a})
gmwetirsTaskExecutionId :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe Text)
gmwetirsTaskExecutionId = lens _gmwetirsTaskExecutionId (\ s a -> s{_gmwetirsTaskExecutionId = a})
gmwetirsStartTime :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe UTCTime)
gmwetirsStartTime = lens _gmwetirsStartTime (\ s a -> s{_gmwetirsStartTime = a}) . mapping _Time
gmwetirsInvocationId :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe Text)
gmwetirsInvocationId = lens _gmwetirsInvocationId (\ s a -> s{_gmwetirsInvocationId = a})
gmwetirsOwnerInformation :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe Text)
gmwetirsOwnerInformation = lens _gmwetirsOwnerInformation (\ s a -> s{_gmwetirsOwnerInformation = a}) . mapping _Sensitive
gmwetirsTaskType :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe MaintenanceWindowTaskType)
gmwetirsTaskType = lens _gmwetirsTaskType (\ s a -> s{_gmwetirsTaskType = a})
gmwetirsWindowTargetId :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe Text)
gmwetirsWindowTargetId = lens _gmwetirsWindowTargetId (\ s a -> s{_gmwetirsWindowTargetId = a})
gmwetirsWindowExecutionId :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe Text)
gmwetirsWindowExecutionId = lens _gmwetirsWindowExecutionId (\ s a -> s{_gmwetirsWindowExecutionId = a})
gmwetirsStatusDetails :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe Text)
gmwetirsStatusDetails = lens _gmwetirsStatusDetails (\ s a -> s{_gmwetirsStatusDetails = a})
gmwetirsEndTime :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe UTCTime)
gmwetirsEndTime = lens _gmwetirsEndTime (\ s a -> s{_gmwetirsEndTime = a}) . mapping _Time
gmwetirsParameters :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse (Maybe Text)
gmwetirsParameters = lens _gmwetirsParameters (\ s a -> s{_gmwetirsParameters = a}) . mapping _Sensitive
gmwetirsResponseStatus :: Lens' GetMaintenanceWindowExecutionTaskInvocationResponse Int
gmwetirsResponseStatus = lens _gmwetirsResponseStatus (\ s a -> s{_gmwetirsResponseStatus = a})
instance NFData
GetMaintenanceWindowExecutionTaskInvocationResponse
where