{-# 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.CreatePatchBaseline
(
CreatePatchBaseline (..),
newCreatePatchBaseline,
createPatchBaseline_approvalRules,
createPatchBaseline_clientToken,
createPatchBaseline_operatingSystem,
createPatchBaseline_globalFilters,
createPatchBaseline_approvedPatchesComplianceLevel,
createPatchBaseline_rejectedPatchesAction,
createPatchBaseline_approvedPatches,
createPatchBaseline_approvedPatchesEnableNonSecurity,
createPatchBaseline_rejectedPatches,
createPatchBaseline_sources,
createPatchBaseline_description,
createPatchBaseline_tags,
createPatchBaseline_name,
CreatePatchBaselineResponse (..),
newCreatePatchBaselineResponse,
createPatchBaselineResponse_baselineId,
createPatchBaselineResponse_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 CreatePatchBaseline = CreatePatchBaseline'
{
CreatePatchBaseline -> Maybe PatchRuleGroup
approvalRules :: Prelude.Maybe PatchRuleGroup,
CreatePatchBaseline -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreatePatchBaseline -> Maybe OperatingSystem
operatingSystem :: Prelude.Maybe OperatingSystem,
CreatePatchBaseline -> Maybe PatchFilterGroup
globalFilters :: Prelude.Maybe PatchFilterGroup,
CreatePatchBaseline -> Maybe PatchComplianceLevel
approvedPatchesComplianceLevel :: Prelude.Maybe PatchComplianceLevel,
CreatePatchBaseline -> Maybe PatchAction
rejectedPatchesAction :: Prelude.Maybe PatchAction,
CreatePatchBaseline -> Maybe [Text]
approvedPatches :: Prelude.Maybe [Prelude.Text],
CreatePatchBaseline -> Maybe Bool
approvedPatchesEnableNonSecurity :: Prelude.Maybe Prelude.Bool,
CreatePatchBaseline -> Maybe [Text]
rejectedPatches :: Prelude.Maybe [Prelude.Text],
CreatePatchBaseline -> Maybe [PatchSource]
sources :: Prelude.Maybe [PatchSource],
CreatePatchBaseline -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreatePatchBaseline -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreatePatchBaseline -> Text
name :: Prelude.Text
}
deriving (CreatePatchBaseline -> CreatePatchBaseline -> Bool
(CreatePatchBaseline -> CreatePatchBaseline -> Bool)
-> (CreatePatchBaseline -> CreatePatchBaseline -> Bool)
-> Eq CreatePatchBaseline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePatchBaseline -> CreatePatchBaseline -> Bool
$c/= :: CreatePatchBaseline -> CreatePatchBaseline -> Bool
== :: CreatePatchBaseline -> CreatePatchBaseline -> Bool
$c== :: CreatePatchBaseline -> CreatePatchBaseline -> Bool
Prelude.Eq, Int -> CreatePatchBaseline -> ShowS
[CreatePatchBaseline] -> ShowS
CreatePatchBaseline -> String
(Int -> CreatePatchBaseline -> ShowS)
-> (CreatePatchBaseline -> String)
-> ([CreatePatchBaseline] -> ShowS)
-> Show CreatePatchBaseline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePatchBaseline] -> ShowS
$cshowList :: [CreatePatchBaseline] -> ShowS
show :: CreatePatchBaseline -> String
$cshow :: CreatePatchBaseline -> String
showsPrec :: Int -> CreatePatchBaseline -> ShowS
$cshowsPrec :: Int -> CreatePatchBaseline -> ShowS
Prelude.Show, (forall x. CreatePatchBaseline -> Rep CreatePatchBaseline x)
-> (forall x. Rep CreatePatchBaseline x -> CreatePatchBaseline)
-> Generic CreatePatchBaseline
forall x. Rep CreatePatchBaseline x -> CreatePatchBaseline
forall x. CreatePatchBaseline -> Rep CreatePatchBaseline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreatePatchBaseline x -> CreatePatchBaseline
$cfrom :: forall x. CreatePatchBaseline -> Rep CreatePatchBaseline x
Prelude.Generic)
newCreatePatchBaseline ::
Prelude.Text ->
CreatePatchBaseline
newCreatePatchBaseline :: Text -> CreatePatchBaseline
newCreatePatchBaseline Text
pName_ =
CreatePatchBaseline' :: Maybe PatchRuleGroup
-> Maybe Text
-> Maybe OperatingSystem
-> Maybe PatchFilterGroup
-> Maybe PatchComplianceLevel
-> Maybe PatchAction
-> Maybe [Text]
-> Maybe Bool
-> Maybe [Text]
-> Maybe [PatchSource]
-> Maybe Text
-> Maybe [Tag]
-> Text
-> CreatePatchBaseline
CreatePatchBaseline'
{ $sel:approvalRules:CreatePatchBaseline' :: Maybe PatchRuleGroup
approvalRules =
Maybe PatchRuleGroup
forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:CreatePatchBaseline' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:operatingSystem:CreatePatchBaseline' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
forall a. Maybe a
Prelude.Nothing,
$sel:globalFilters:CreatePatchBaseline' :: Maybe PatchFilterGroup
globalFilters = Maybe PatchFilterGroup
forall a. Maybe a
Prelude.Nothing,
$sel:approvedPatchesComplianceLevel:CreatePatchBaseline' :: Maybe PatchComplianceLevel
approvedPatchesComplianceLevel = Maybe PatchComplianceLevel
forall a. Maybe a
Prelude.Nothing,
$sel:rejectedPatchesAction:CreatePatchBaseline' :: Maybe PatchAction
rejectedPatchesAction = Maybe PatchAction
forall a. Maybe a
Prelude.Nothing,
$sel:approvedPatches:CreatePatchBaseline' :: Maybe [Text]
approvedPatches = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:approvedPatchesEnableNonSecurity:CreatePatchBaseline' :: Maybe Bool
approvedPatchesEnableNonSecurity = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:rejectedPatches:CreatePatchBaseline' :: Maybe [Text]
rejectedPatches = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:sources:CreatePatchBaseline' :: Maybe [PatchSource]
sources = Maybe [PatchSource]
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreatePatchBaseline' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreatePatchBaseline' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreatePatchBaseline' :: Text
name = Text
pName_
}
createPatchBaseline_approvalRules :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe PatchRuleGroup)
createPatchBaseline_approvalRules :: (Maybe PatchRuleGroup -> f (Maybe PatchRuleGroup))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_approvalRules = (CreatePatchBaseline -> Maybe PatchRuleGroup)
-> (CreatePatchBaseline
-> Maybe PatchRuleGroup -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline
CreatePatchBaseline
(Maybe PatchRuleGroup)
(Maybe PatchRuleGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe PatchRuleGroup
approvalRules :: Maybe PatchRuleGroup
$sel:approvalRules:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe PatchRuleGroup
approvalRules} -> Maybe PatchRuleGroup
approvalRules) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe PatchRuleGroup
a -> CreatePatchBaseline
s {$sel:approvalRules:CreatePatchBaseline' :: Maybe PatchRuleGroup
approvalRules = Maybe PatchRuleGroup
a} :: CreatePatchBaseline)
createPatchBaseline_clientToken :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe Prelude.Text)
createPatchBaseline_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_clientToken = (CreatePatchBaseline -> Maybe Text)
-> (CreatePatchBaseline -> Maybe Text -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline CreatePatchBaseline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe Text
a -> CreatePatchBaseline
s {$sel:clientToken:CreatePatchBaseline' :: Maybe Text
clientToken = Maybe Text
a} :: CreatePatchBaseline)
createPatchBaseline_operatingSystem :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe OperatingSystem)
createPatchBaseline_operatingSystem :: (Maybe OperatingSystem -> f (Maybe OperatingSystem))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_operatingSystem = (CreatePatchBaseline -> Maybe OperatingSystem)
-> (CreatePatchBaseline
-> Maybe OperatingSystem -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline
CreatePatchBaseline
(Maybe OperatingSystem)
(Maybe OperatingSystem)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe OperatingSystem
operatingSystem :: Maybe OperatingSystem
$sel:operatingSystem:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe OperatingSystem
operatingSystem} -> Maybe OperatingSystem
operatingSystem) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe OperatingSystem
a -> CreatePatchBaseline
s {$sel:operatingSystem:CreatePatchBaseline' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
a} :: CreatePatchBaseline)
createPatchBaseline_globalFilters :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe PatchFilterGroup)
createPatchBaseline_globalFilters :: (Maybe PatchFilterGroup -> f (Maybe PatchFilterGroup))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_globalFilters = (CreatePatchBaseline -> Maybe PatchFilterGroup)
-> (CreatePatchBaseline
-> Maybe PatchFilterGroup -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline
CreatePatchBaseline
(Maybe PatchFilterGroup)
(Maybe PatchFilterGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe PatchFilterGroup
globalFilters :: Maybe PatchFilterGroup
$sel:globalFilters:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe PatchFilterGroup
globalFilters} -> Maybe PatchFilterGroup
globalFilters) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe PatchFilterGroup
a -> CreatePatchBaseline
s {$sel:globalFilters:CreatePatchBaseline' :: Maybe PatchFilterGroup
globalFilters = Maybe PatchFilterGroup
a} :: CreatePatchBaseline)
createPatchBaseline_approvedPatchesComplianceLevel :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe PatchComplianceLevel)
createPatchBaseline_approvedPatchesComplianceLevel :: (Maybe PatchComplianceLevel -> f (Maybe PatchComplianceLevel))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_approvedPatchesComplianceLevel = (CreatePatchBaseline -> Maybe PatchComplianceLevel)
-> (CreatePatchBaseline
-> Maybe PatchComplianceLevel -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline
CreatePatchBaseline
(Maybe PatchComplianceLevel)
(Maybe PatchComplianceLevel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe PatchComplianceLevel
approvedPatchesComplianceLevel :: Maybe PatchComplianceLevel
$sel:approvedPatchesComplianceLevel:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe PatchComplianceLevel
approvedPatchesComplianceLevel} -> Maybe PatchComplianceLevel
approvedPatchesComplianceLevel) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe PatchComplianceLevel
a -> CreatePatchBaseline
s {$sel:approvedPatchesComplianceLevel:CreatePatchBaseline' :: Maybe PatchComplianceLevel
approvedPatchesComplianceLevel = Maybe PatchComplianceLevel
a} :: CreatePatchBaseline)
createPatchBaseline_rejectedPatchesAction :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe PatchAction)
createPatchBaseline_rejectedPatchesAction :: (Maybe PatchAction -> f (Maybe PatchAction))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_rejectedPatchesAction = (CreatePatchBaseline -> Maybe PatchAction)
-> (CreatePatchBaseline
-> Maybe PatchAction -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline
CreatePatchBaseline
(Maybe PatchAction)
(Maybe PatchAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe PatchAction
rejectedPatchesAction :: Maybe PatchAction
$sel:rejectedPatchesAction:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe PatchAction
rejectedPatchesAction} -> Maybe PatchAction
rejectedPatchesAction) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe PatchAction
a -> CreatePatchBaseline
s {$sel:rejectedPatchesAction:CreatePatchBaseline' :: Maybe PatchAction
rejectedPatchesAction = Maybe PatchAction
a} :: CreatePatchBaseline)
createPatchBaseline_approvedPatches :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe [Prelude.Text])
createPatchBaseline_approvedPatches :: (Maybe [Text] -> f (Maybe [Text]))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_approvedPatches = (CreatePatchBaseline -> Maybe [Text])
-> (CreatePatchBaseline -> Maybe [Text] -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline
CreatePatchBaseline
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe [Text]
approvedPatches :: Maybe [Text]
$sel:approvedPatches:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe [Text]
approvedPatches} -> Maybe [Text]
approvedPatches) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe [Text]
a -> CreatePatchBaseline
s {$sel:approvedPatches:CreatePatchBaseline' :: Maybe [Text]
approvedPatches = Maybe [Text]
a} :: CreatePatchBaseline) ((Maybe [Text] -> f (Maybe [Text]))
-> CreatePatchBaseline -> f CreatePatchBaseline)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreatePatchBaseline
-> f CreatePatchBaseline
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
createPatchBaseline_approvedPatchesEnableNonSecurity :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe Prelude.Bool)
createPatchBaseline_approvedPatchesEnableNonSecurity :: (Maybe Bool -> f (Maybe Bool))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_approvedPatchesEnableNonSecurity = (CreatePatchBaseline -> Maybe Bool)
-> (CreatePatchBaseline -> Maybe Bool -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline CreatePatchBaseline (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe Bool
approvedPatchesEnableNonSecurity :: Maybe Bool
$sel:approvedPatchesEnableNonSecurity:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe Bool
approvedPatchesEnableNonSecurity} -> Maybe Bool
approvedPatchesEnableNonSecurity) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe Bool
a -> CreatePatchBaseline
s {$sel:approvedPatchesEnableNonSecurity:CreatePatchBaseline' :: Maybe Bool
approvedPatchesEnableNonSecurity = Maybe Bool
a} :: CreatePatchBaseline)
createPatchBaseline_rejectedPatches :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe [Prelude.Text])
createPatchBaseline_rejectedPatches :: (Maybe [Text] -> f (Maybe [Text]))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_rejectedPatches = (CreatePatchBaseline -> Maybe [Text])
-> (CreatePatchBaseline -> Maybe [Text] -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline
CreatePatchBaseline
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe [Text]
rejectedPatches :: Maybe [Text]
$sel:rejectedPatches:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe [Text]
rejectedPatches} -> Maybe [Text]
rejectedPatches) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe [Text]
a -> CreatePatchBaseline
s {$sel:rejectedPatches:CreatePatchBaseline' :: Maybe [Text]
rejectedPatches = Maybe [Text]
a} :: CreatePatchBaseline) ((Maybe [Text] -> f (Maybe [Text]))
-> CreatePatchBaseline -> f CreatePatchBaseline)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreatePatchBaseline
-> f CreatePatchBaseline
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
createPatchBaseline_sources :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe [PatchSource])
createPatchBaseline_sources :: (Maybe [PatchSource] -> f (Maybe [PatchSource]))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_sources = (CreatePatchBaseline -> Maybe [PatchSource])
-> (CreatePatchBaseline
-> Maybe [PatchSource] -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline
CreatePatchBaseline
(Maybe [PatchSource])
(Maybe [PatchSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe [PatchSource]
sources :: Maybe [PatchSource]
$sel:sources:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe [PatchSource]
sources} -> Maybe [PatchSource]
sources) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe [PatchSource]
a -> CreatePatchBaseline
s {$sel:sources:CreatePatchBaseline' :: Maybe [PatchSource]
sources = Maybe [PatchSource]
a} :: CreatePatchBaseline) ((Maybe [PatchSource] -> f (Maybe [PatchSource]))
-> CreatePatchBaseline -> f CreatePatchBaseline)
-> ((Maybe [PatchSource] -> f (Maybe [PatchSource]))
-> Maybe [PatchSource] -> f (Maybe [PatchSource]))
-> (Maybe [PatchSource] -> f (Maybe [PatchSource]))
-> CreatePatchBaseline
-> f CreatePatchBaseline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [PatchSource] [PatchSource] [PatchSource] [PatchSource]
-> Iso
(Maybe [PatchSource])
(Maybe [PatchSource])
(Maybe [PatchSource])
(Maybe [PatchSource])
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 [PatchSource] [PatchSource] [PatchSource] [PatchSource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createPatchBaseline_description :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe Prelude.Text)
createPatchBaseline_description :: (Maybe Text -> f (Maybe Text))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_description = (CreatePatchBaseline -> Maybe Text)
-> (CreatePatchBaseline -> Maybe Text -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline CreatePatchBaseline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe Text
description :: Maybe Text
$sel:description:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe Text
description} -> Maybe Text
description) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe Text
a -> CreatePatchBaseline
s {$sel:description:CreatePatchBaseline' :: Maybe Text
description = Maybe Text
a} :: CreatePatchBaseline)
createPatchBaseline_tags :: Lens.Lens' CreatePatchBaseline (Prelude.Maybe [Tag])
createPatchBaseline_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_tags = (CreatePatchBaseline -> Maybe [Tag])
-> (CreatePatchBaseline -> Maybe [Tag] -> CreatePatchBaseline)
-> Lens
CreatePatchBaseline CreatePatchBaseline (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Maybe [Tag]
a -> CreatePatchBaseline
s {$sel:tags:CreatePatchBaseline' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreatePatchBaseline) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePatchBaseline -> f CreatePatchBaseline)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePatchBaseline
-> f CreatePatchBaseline
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createPatchBaseline_name :: Lens.Lens' CreatePatchBaseline Prelude.Text
createPatchBaseline_name :: (Text -> f Text) -> CreatePatchBaseline -> f CreatePatchBaseline
createPatchBaseline_name = (CreatePatchBaseline -> Text)
-> (CreatePatchBaseline -> Text -> CreatePatchBaseline)
-> Lens CreatePatchBaseline CreatePatchBaseline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaseline' {Text
name :: Text
$sel:name:CreatePatchBaseline' :: CreatePatchBaseline -> Text
name} -> Text
name) (\s :: CreatePatchBaseline
s@CreatePatchBaseline' {} Text
a -> CreatePatchBaseline
s {$sel:name:CreatePatchBaseline' :: Text
name = Text
a} :: CreatePatchBaseline)
instance Core.AWSRequest CreatePatchBaseline where
type
AWSResponse CreatePatchBaseline =
CreatePatchBaselineResponse
request :: CreatePatchBaseline -> Request CreatePatchBaseline
request = Service -> CreatePatchBaseline -> Request CreatePatchBaseline
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreatePatchBaseline
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreatePatchBaseline)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreatePatchBaseline))
-> Logger
-> Service
-> Proxy CreatePatchBaseline
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreatePatchBaseline)))
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 -> CreatePatchBaselineResponse
CreatePatchBaselineResponse'
(Maybe Text -> Int -> CreatePatchBaselineResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreatePatchBaselineResponse)
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
"BaselineId")
Either String (Int -> CreatePatchBaselineResponse)
-> Either String Int -> Either String CreatePatchBaselineResponse
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 CreatePatchBaseline
instance Prelude.NFData CreatePatchBaseline
instance Core.ToHeaders CreatePatchBaseline where
toHeaders :: CreatePatchBaseline -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreatePatchBaseline -> 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.CreatePatchBaseline" ::
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 CreatePatchBaseline where
toJSON :: CreatePatchBaseline -> Value
toJSON CreatePatchBaseline' {Maybe Bool
Maybe [Text]
Maybe [PatchSource]
Maybe [Tag]
Maybe Text
Maybe OperatingSystem
Maybe PatchAction
Maybe PatchComplianceLevel
Maybe PatchFilterGroup
Maybe PatchRuleGroup
Text
name :: Text
tags :: Maybe [Tag]
description :: Maybe Text
sources :: Maybe [PatchSource]
rejectedPatches :: Maybe [Text]
approvedPatchesEnableNonSecurity :: Maybe Bool
approvedPatches :: Maybe [Text]
rejectedPatchesAction :: Maybe PatchAction
approvedPatchesComplianceLevel :: Maybe PatchComplianceLevel
globalFilters :: Maybe PatchFilterGroup
operatingSystem :: Maybe OperatingSystem
clientToken :: Maybe Text
approvalRules :: Maybe PatchRuleGroup
$sel:name:CreatePatchBaseline' :: CreatePatchBaseline -> Text
$sel:tags:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe [Tag]
$sel:description:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe Text
$sel:sources:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe [PatchSource]
$sel:rejectedPatches:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe [Text]
$sel:approvedPatchesEnableNonSecurity:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe Bool
$sel:approvedPatches:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe [Text]
$sel:rejectedPatchesAction:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe PatchAction
$sel:approvedPatchesComplianceLevel:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe PatchComplianceLevel
$sel:globalFilters:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe PatchFilterGroup
$sel:operatingSystem:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe OperatingSystem
$sel:clientToken:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe Text
$sel:approvalRules:CreatePatchBaseline' :: CreatePatchBaseline -> Maybe PatchRuleGroup
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ApprovalRules" Text -> PatchRuleGroup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PatchRuleGroup -> Pair) -> Maybe PatchRuleGroup -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PatchRuleGroup
approvalRules,
(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
"OperatingSystem" Text -> OperatingSystem -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(OperatingSystem -> Pair) -> Maybe OperatingSystem -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OperatingSystem
operatingSystem,
(Text
"GlobalFilters" Text -> PatchFilterGroup -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PatchFilterGroup -> Pair) -> Maybe PatchFilterGroup -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PatchFilterGroup
globalFilters,
(Text
"ApprovedPatchesComplianceLevel" Text -> PatchComplianceLevel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(PatchComplianceLevel -> Pair)
-> Maybe PatchComplianceLevel -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PatchComplianceLevel
approvedPatchesComplianceLevel,
(Text
"RejectedPatchesAction" Text -> PatchAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(PatchAction -> Pair) -> Maybe PatchAction -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PatchAction
rejectedPatchesAction,
(Text
"ApprovedPatches" 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]
approvedPatches,
(Text
"ApprovedPatchesEnableNonSecurity" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
approvedPatchesEnableNonSecurity,
(Text
"RejectedPatches" 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]
rejectedPatches,
(Text
"Sources" Text -> [PatchSource] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([PatchSource] -> Pair) -> Maybe [PatchSource] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PatchSource]
sources,
(Text
"Description" 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
description,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)
instance Core.ToPath CreatePatchBaseline where
toPath :: CreatePatchBaseline -> ByteString
toPath = ByteString -> CreatePatchBaseline -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreatePatchBaseline where
toQuery :: CreatePatchBaseline -> QueryString
toQuery = QueryString -> CreatePatchBaseline -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreatePatchBaselineResponse = CreatePatchBaselineResponse'
{
CreatePatchBaselineResponse -> Maybe Text
baselineId :: Prelude.Maybe Prelude.Text,
CreatePatchBaselineResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreatePatchBaselineResponse -> CreatePatchBaselineResponse -> Bool
(CreatePatchBaselineResponse
-> CreatePatchBaselineResponse -> Bool)
-> (CreatePatchBaselineResponse
-> CreatePatchBaselineResponse -> Bool)
-> Eq CreatePatchBaselineResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePatchBaselineResponse -> CreatePatchBaselineResponse -> Bool
$c/= :: CreatePatchBaselineResponse -> CreatePatchBaselineResponse -> Bool
== :: CreatePatchBaselineResponse -> CreatePatchBaselineResponse -> Bool
$c== :: CreatePatchBaselineResponse -> CreatePatchBaselineResponse -> Bool
Prelude.Eq, ReadPrec [CreatePatchBaselineResponse]
ReadPrec CreatePatchBaselineResponse
Int -> ReadS CreatePatchBaselineResponse
ReadS [CreatePatchBaselineResponse]
(Int -> ReadS CreatePatchBaselineResponse)
-> ReadS [CreatePatchBaselineResponse]
-> ReadPrec CreatePatchBaselineResponse
-> ReadPrec [CreatePatchBaselineResponse]
-> Read CreatePatchBaselineResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePatchBaselineResponse]
$creadListPrec :: ReadPrec [CreatePatchBaselineResponse]
readPrec :: ReadPrec CreatePatchBaselineResponse
$creadPrec :: ReadPrec CreatePatchBaselineResponse
readList :: ReadS [CreatePatchBaselineResponse]
$creadList :: ReadS [CreatePatchBaselineResponse]
readsPrec :: Int -> ReadS CreatePatchBaselineResponse
$creadsPrec :: Int -> ReadS CreatePatchBaselineResponse
Prelude.Read, Int -> CreatePatchBaselineResponse -> ShowS
[CreatePatchBaselineResponse] -> ShowS
CreatePatchBaselineResponse -> String
(Int -> CreatePatchBaselineResponse -> ShowS)
-> (CreatePatchBaselineResponse -> String)
-> ([CreatePatchBaselineResponse] -> ShowS)
-> Show CreatePatchBaselineResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePatchBaselineResponse] -> ShowS
$cshowList :: [CreatePatchBaselineResponse] -> ShowS
show :: CreatePatchBaselineResponse -> String
$cshow :: CreatePatchBaselineResponse -> String
showsPrec :: Int -> CreatePatchBaselineResponse -> ShowS
$cshowsPrec :: Int -> CreatePatchBaselineResponse -> ShowS
Prelude.Show, (forall x.
CreatePatchBaselineResponse -> Rep CreatePatchBaselineResponse x)
-> (forall x.
Rep CreatePatchBaselineResponse x -> CreatePatchBaselineResponse)
-> Generic CreatePatchBaselineResponse
forall x.
Rep CreatePatchBaselineResponse x -> CreatePatchBaselineResponse
forall x.
CreatePatchBaselineResponse -> Rep CreatePatchBaselineResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreatePatchBaselineResponse x -> CreatePatchBaselineResponse
$cfrom :: forall x.
CreatePatchBaselineResponse -> Rep CreatePatchBaselineResponse x
Prelude.Generic)
newCreatePatchBaselineResponse ::
Prelude.Int ->
CreatePatchBaselineResponse
newCreatePatchBaselineResponse :: Int -> CreatePatchBaselineResponse
newCreatePatchBaselineResponse Int
pHttpStatus_ =
CreatePatchBaselineResponse' :: Maybe Text -> Int -> CreatePatchBaselineResponse
CreatePatchBaselineResponse'
{ $sel:baselineId:CreatePatchBaselineResponse' :: Maybe Text
baselineId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreatePatchBaselineResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createPatchBaselineResponse_baselineId :: Lens.Lens' CreatePatchBaselineResponse (Prelude.Maybe Prelude.Text)
createPatchBaselineResponse_baselineId :: (Maybe Text -> f (Maybe Text))
-> CreatePatchBaselineResponse -> f CreatePatchBaselineResponse
createPatchBaselineResponse_baselineId = (CreatePatchBaselineResponse -> Maybe Text)
-> (CreatePatchBaselineResponse
-> Maybe Text -> CreatePatchBaselineResponse)
-> Lens
CreatePatchBaselineResponse
CreatePatchBaselineResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaselineResponse' {Maybe Text
baselineId :: Maybe Text
$sel:baselineId:CreatePatchBaselineResponse' :: CreatePatchBaselineResponse -> Maybe Text
baselineId} -> Maybe Text
baselineId) (\s :: CreatePatchBaselineResponse
s@CreatePatchBaselineResponse' {} Maybe Text
a -> CreatePatchBaselineResponse
s {$sel:baselineId:CreatePatchBaselineResponse' :: Maybe Text
baselineId = Maybe Text
a} :: CreatePatchBaselineResponse)
createPatchBaselineResponse_httpStatus :: Lens.Lens' CreatePatchBaselineResponse Prelude.Int
createPatchBaselineResponse_httpStatus :: (Int -> f Int)
-> CreatePatchBaselineResponse -> f CreatePatchBaselineResponse
createPatchBaselineResponse_httpStatus = (CreatePatchBaselineResponse -> Int)
-> (CreatePatchBaselineResponse
-> Int -> CreatePatchBaselineResponse)
-> Lens
CreatePatchBaselineResponse CreatePatchBaselineResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePatchBaselineResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreatePatchBaselineResponse' :: CreatePatchBaselineResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreatePatchBaselineResponse
s@CreatePatchBaselineResponse' {} Int
a -> CreatePatchBaselineResponse
s {$sel:httpStatus:CreatePatchBaselineResponse' :: Int
httpStatus = Int
a} :: CreatePatchBaselineResponse)
instance Prelude.NFData CreatePatchBaselineResponse