module Network.AWS.OpsWorks.UpdateLayer
(
updateLayer
, UpdateLayer
, ulCustomInstanceProfileARN
, ulInstallUpdatesOnBoot
, ulCustomSecurityGroupIds
, ulLifecycleEventConfiguration
, ulShortname
, ulCustomRecipes
, ulVolumeConfigurations
, ulCustomJSON
, ulEnableAutoHealing
, ulPackages
, ulName
, ulAttributes
, ulAutoAssignPublicIPs
, ulUseEBSOptimizedInstances
, ulAutoAssignElasticIPs
, ulLayerId
, updateLayerResponse
, UpdateLayerResponse
) where
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)
, _ulInstallUpdatesOnBoot :: !(Maybe Bool)
, _ulCustomSecurityGroupIds :: !(Maybe [Text])
, _ulLifecycleEventConfiguration :: !(Maybe LifecycleEventConfiguration)
, _ulShortname :: !(Maybe Text)
, _ulCustomRecipes :: !(Maybe Recipes)
, _ulVolumeConfigurations :: !(Maybe [VolumeConfiguration])
, _ulCustomJSON :: !(Maybe Text)
, _ulEnableAutoHealing :: !(Maybe Bool)
, _ulPackages :: !(Maybe [Text])
, _ulName :: !(Maybe Text)
, _ulAttributes :: !(Maybe (Map LayerAttributesKeys 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
, _ulInstallUpdatesOnBoot = Nothing
, _ulCustomSecurityGroupIds = Nothing
, _ulLifecycleEventConfiguration = Nothing
, _ulShortname = Nothing
, _ulCustomRecipes = Nothing
, _ulVolumeConfigurations = Nothing
, _ulCustomJSON = Nothing
, _ulEnableAutoHealing = Nothing
, _ulPackages = Nothing
, _ulName = Nothing
, _ulAttributes = Nothing
, _ulAutoAssignPublicIPs = Nothing
, _ulUseEBSOptimizedInstances = Nothing
, _ulAutoAssignElasticIPs = Nothing
, _ulLayerId = pLayerId_
}
ulCustomInstanceProfileARN :: Lens' UpdateLayer (Maybe Text)
ulCustomInstanceProfileARN = lens _ulCustomInstanceProfileARN (\ s a -> s{_ulCustomInstanceProfileARN = a});
ulInstallUpdatesOnBoot :: Lens' UpdateLayer (Maybe Bool)
ulInstallUpdatesOnBoot = lens _ulInstallUpdatesOnBoot (\ s a -> s{_ulInstallUpdatesOnBoot = a});
ulCustomSecurityGroupIds :: Lens' UpdateLayer [Text]
ulCustomSecurityGroupIds = lens _ulCustomSecurityGroupIds (\ s a -> s{_ulCustomSecurityGroupIds = a}) . _Default . _Coerce;
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});
ulVolumeConfigurations :: Lens' UpdateLayer [VolumeConfiguration]
ulVolumeConfigurations = lens _ulVolumeConfigurations (\ s a -> s{_ulVolumeConfigurations = a}) . _Default . _Coerce;
ulCustomJSON :: Lens' UpdateLayer (Maybe Text)
ulCustomJSON = lens _ulCustomJSON (\ s a -> s{_ulCustomJSON = a});
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;
ulName :: Lens' UpdateLayer (Maybe Text)
ulName = lens _ulName (\ s a -> s{_ulName = a});
ulAttributes :: Lens' UpdateLayer (HashMap LayerAttributesKeys Text)
ulAttributes = lens _ulAttributes (\ s a -> s{_ulAttributes = a}) . _Default . _Map;
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 Sv UpdateLayer = OpsWorks
type Rs UpdateLayer = UpdateLayerResponse
request = postJSON
response = receiveNull UpdateLayerResponse'
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
["CustomInstanceProfileArn" .=
_ulCustomInstanceProfileARN,
"InstallUpdatesOnBoot" .= _ulInstallUpdatesOnBoot,
"CustomSecurityGroupIds" .=
_ulCustomSecurityGroupIds,
"LifecycleEventConfiguration" .=
_ulLifecycleEventConfiguration,
"Shortname" .= _ulShortname,
"CustomRecipes" .= _ulCustomRecipes,
"VolumeConfigurations" .= _ulVolumeConfigurations,
"CustomJson" .= _ulCustomJSON,
"EnableAutoHealing" .= _ulEnableAutoHealing,
"Packages" .= _ulPackages, "Name" .= _ulName,
"Attributes" .= _ulAttributes,
"AutoAssignPublicIps" .= _ulAutoAssignPublicIPs,
"UseEbsOptimizedInstances" .=
_ulUseEBSOptimizedInstances,
"AutoAssignElasticIps" .= _ulAutoAssignElasticIPs,
"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'