module Network.AWS.OpsWorks.UpdateLayer
(
updateLayer
, UpdateLayer
, ulCustomInstanceProfileARN
, ulCustomSecurityGroupIds
, ulInstallUpdatesOnBoot
, ulLifecycleEventConfiguration
, ulShortname
, ulCustomRecipes
, ulCustomJSON
, ulVolumeConfigurations
, ulEnableAutoHealing
, ulPackages
, ulAttributes
, ulName
, ulAutoAssignPublicIPs
, ulUseEBSOptimizedInstances
, ulAutoAssignElasticIPs
, ulLayerId
, updateLayerResponse
, UpdateLayerResponse
) where
import Network.AWS.Lens
import Network.AWS.OpsWorks.Types
import Network.AWS.OpsWorks.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateLayer = UpdateLayer'
{ _ulCustomInstanceProfileARN :: !(Maybe Text)
, _ulCustomSecurityGroupIds :: !(Maybe [Text])
, _ulInstallUpdatesOnBoot :: !(Maybe Bool)
, _ulLifecycleEventConfiguration :: !(Maybe LifecycleEventConfiguration)
, _ulShortname :: !(Maybe Text)
, _ulCustomRecipes :: !(Maybe Recipes)
, _ulCustomJSON :: !(Maybe Text)
, _ulVolumeConfigurations :: !(Maybe [VolumeConfiguration])
, _ulEnableAutoHealing :: !(Maybe Bool)
, _ulPackages :: !(Maybe [Text])
, _ulAttributes :: !(Maybe (Map LayerAttributesKeys Text))
, _ulName :: !(Maybe Text)
, _ulAutoAssignPublicIPs :: !(Maybe Bool)
, _ulUseEBSOptimizedInstances :: !(Maybe Bool)
, _ulAutoAssignElasticIPs :: !(Maybe Bool)
, _ulLayerId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateLayer
:: Text
-> UpdateLayer
updateLayer pLayerId_ =
UpdateLayer'
{ _ulCustomInstanceProfileARN = Nothing
, _ulCustomSecurityGroupIds = Nothing
, _ulInstallUpdatesOnBoot = Nothing
, _ulLifecycleEventConfiguration = Nothing
, _ulShortname = Nothing
, _ulCustomRecipes = Nothing
, _ulCustomJSON = Nothing
, _ulVolumeConfigurations = Nothing
, _ulEnableAutoHealing = Nothing
, _ulPackages = Nothing
, _ulAttributes = Nothing
, _ulName = Nothing
, _ulAutoAssignPublicIPs = Nothing
, _ulUseEBSOptimizedInstances = Nothing
, _ulAutoAssignElasticIPs = Nothing
, _ulLayerId = pLayerId_
}
ulCustomInstanceProfileARN :: Lens' UpdateLayer (Maybe Text)
ulCustomInstanceProfileARN = lens _ulCustomInstanceProfileARN (\ s a -> s{_ulCustomInstanceProfileARN = a});
ulCustomSecurityGroupIds :: Lens' UpdateLayer [Text]
ulCustomSecurityGroupIds = lens _ulCustomSecurityGroupIds (\ s a -> s{_ulCustomSecurityGroupIds = a}) . _Default . _Coerce;
ulInstallUpdatesOnBoot :: Lens' UpdateLayer (Maybe Bool)
ulInstallUpdatesOnBoot = lens _ulInstallUpdatesOnBoot (\ s a -> s{_ulInstallUpdatesOnBoot = a});
ulLifecycleEventConfiguration :: Lens' UpdateLayer (Maybe LifecycleEventConfiguration)
ulLifecycleEventConfiguration = lens _ulLifecycleEventConfiguration (\ s a -> s{_ulLifecycleEventConfiguration = a});
ulShortname :: Lens' UpdateLayer (Maybe Text)
ulShortname = lens _ulShortname (\ s a -> s{_ulShortname = a});
ulCustomRecipes :: Lens' UpdateLayer (Maybe Recipes)
ulCustomRecipes = lens _ulCustomRecipes (\ s a -> s{_ulCustomRecipes = a});
ulCustomJSON :: Lens' UpdateLayer (Maybe Text)
ulCustomJSON = lens _ulCustomJSON (\ s a -> s{_ulCustomJSON = a});
ulVolumeConfigurations :: Lens' UpdateLayer [VolumeConfiguration]
ulVolumeConfigurations = lens _ulVolumeConfigurations (\ s a -> s{_ulVolumeConfigurations = a}) . _Default . _Coerce;
ulEnableAutoHealing :: Lens' UpdateLayer (Maybe Bool)
ulEnableAutoHealing = lens _ulEnableAutoHealing (\ s a -> s{_ulEnableAutoHealing = a});
ulPackages :: Lens' UpdateLayer [Text]
ulPackages = lens _ulPackages (\ s a -> s{_ulPackages = a}) . _Default . _Coerce;
ulAttributes :: Lens' UpdateLayer (HashMap LayerAttributesKeys Text)
ulAttributes = lens _ulAttributes (\ s a -> s{_ulAttributes = a}) . _Default . _Map;
ulName :: Lens' UpdateLayer (Maybe Text)
ulName = lens _ulName (\ s a -> s{_ulName = a});
ulAutoAssignPublicIPs :: Lens' UpdateLayer (Maybe Bool)
ulAutoAssignPublicIPs = lens _ulAutoAssignPublicIPs (\ s a -> s{_ulAutoAssignPublicIPs = a});
ulUseEBSOptimizedInstances :: Lens' UpdateLayer (Maybe Bool)
ulUseEBSOptimizedInstances = lens _ulUseEBSOptimizedInstances (\ s a -> s{_ulUseEBSOptimizedInstances = a});
ulAutoAssignElasticIPs :: Lens' UpdateLayer (Maybe Bool)
ulAutoAssignElasticIPs = lens _ulAutoAssignElasticIPs (\ s a -> s{_ulAutoAssignElasticIPs = a});
ulLayerId :: Lens' UpdateLayer Text
ulLayerId = lens _ulLayerId (\ s a -> s{_ulLayerId = a});
instance AWSRequest UpdateLayer where
type Rs UpdateLayer = UpdateLayerResponse
request = postJSON opsWorks
response = receiveNull UpdateLayerResponse'
instance Hashable UpdateLayer
instance NFData UpdateLayer
instance ToHeaders UpdateLayer where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OpsWorks_20130218.UpdateLayer" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateLayer where
toJSON UpdateLayer'{..}
= object
(catMaybes
[("CustomInstanceProfileArn" .=) <$>
_ulCustomInstanceProfileARN,
("CustomSecurityGroupIds" .=) <$>
_ulCustomSecurityGroupIds,
("InstallUpdatesOnBoot" .=) <$>
_ulInstallUpdatesOnBoot,
("LifecycleEventConfiguration" .=) <$>
_ulLifecycleEventConfiguration,
("Shortname" .=) <$> _ulShortname,
("CustomRecipes" .=) <$> _ulCustomRecipes,
("CustomJson" .=) <$> _ulCustomJSON,
("VolumeConfigurations" .=) <$>
_ulVolumeConfigurations,
("EnableAutoHealing" .=) <$> _ulEnableAutoHealing,
("Packages" .=) <$> _ulPackages,
("Attributes" .=) <$> _ulAttributes,
("Name" .=) <$> _ulName,
("AutoAssignPublicIps" .=) <$>
_ulAutoAssignPublicIPs,
("UseEbsOptimizedInstances" .=) <$>
_ulUseEBSOptimizedInstances,
("AutoAssignElasticIps" .=) <$>
_ulAutoAssignElasticIPs,
Just ("LayerId" .= _ulLayerId)])
instance ToPath UpdateLayer where
toPath = const "/"
instance ToQuery UpdateLayer where
toQuery = const mempty
data UpdateLayerResponse =
UpdateLayerResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
updateLayerResponse
:: UpdateLayerResponse
updateLayerResponse = UpdateLayerResponse'
instance NFData UpdateLayerResponse