amazonka-opsworks-cm-1.4.5: Amazon OpsWorks for Chef Automate SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.OpsWorksCM.RestoreServer

Contents

Description

Restores a backup to a server that is in a RUNNING , FAILED , or HEALTHY state. When you run RestoreServer, the server's EC2 instance is deleted, and a new EC2 instance is configured. RestoreServer maintains the existing server endpoint, so configuration management of all of the server's client devices should continue to work.

This operation is asynchronous.

A InvalidStateException is thrown when the server is not in a valid state. A ResourceNotFoundException is thrown when the server does not exist. A ValidationException is raised when parameters of the request are invalid.

Synopsis

Creating a Request

restoreServer #

Creates a value of RestoreServer with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • rsKeyPair - The name of the key pair to set on the new EC2 instance. This can be helpful if any of the administrators who manage the server no longer have the SSH key.
  • rsInstanceType - The type of the instance to create. Valid values must be specified in the following format: ^([cm][34]|t2).* For example, c3.large . If you do not specify this parameter, RestoreServer uses the instance type from the specified backup.
  • rsBackupId - The ID of the backup that you want to use to restore a server.
  • rsServerName - The name of the server that you want to restore.

data RestoreServer #

See: restoreServer smart constructor.

Instances

Eq RestoreServer # 
Data RestoreServer # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RestoreServer -> c RestoreServer #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RestoreServer #

toConstr :: RestoreServer -> Constr #

dataTypeOf :: RestoreServer -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c RestoreServer) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RestoreServer) #

gmapT :: (forall b. Data b => b -> b) -> RestoreServer -> RestoreServer #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RestoreServer -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RestoreServer -> r #

gmapQ :: (forall d. Data d => d -> u) -> RestoreServer -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RestoreServer -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RestoreServer -> m RestoreServer #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RestoreServer -> m RestoreServer #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RestoreServer -> m RestoreServer #

Read RestoreServer # 
Show RestoreServer # 
Generic RestoreServer # 

Associated Types

type Rep RestoreServer :: * -> * #

Hashable RestoreServer # 
ToJSON RestoreServer # 
NFData RestoreServer # 

Methods

rnf :: RestoreServer -> () #

AWSRequest RestoreServer # 
ToQuery RestoreServer # 
ToPath RestoreServer # 
ToHeaders RestoreServer # 
type Rep RestoreServer # 
type Rep RestoreServer = D1 (MetaData "RestoreServer" "Network.AWS.OpsWorksCM.RestoreServer" "amazonka-opsworks-cm-1.4.5-AhfVC6jsAX0FFNzDXhBrcp" False) (C1 (MetaCons "RestoreServer'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_rsKeyPair") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_rsInstanceType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_rsBackupId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_rsServerName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs RestoreServer # 

Request Lenses

rsKeyPair :: Lens' RestoreServer (Maybe Text) #

The name of the key pair to set on the new EC2 instance. This can be helpful if any of the administrators who manage the server no longer have the SSH key.

rsInstanceType :: Lens' RestoreServer (Maybe Text) #

The type of the instance to create. Valid values must be specified in the following format: ^([cm][34]|t2).* For example, c3.large . If you do not specify this parameter, RestoreServer uses the instance type from the specified backup.

rsBackupId :: Lens' RestoreServer Text #

The ID of the backup that you want to use to restore a server.

rsServerName :: Lens' RestoreServer Text #

The name of the server that you want to restore.

Destructuring the Response

restoreServerResponse #

Creates a value of RestoreServerResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data RestoreServerResponse #

See: restoreServerResponse smart constructor.

Instances

Eq RestoreServerResponse # 
Data RestoreServerResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RestoreServerResponse -> c RestoreServerResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RestoreServerResponse #

toConstr :: RestoreServerResponse -> Constr #

dataTypeOf :: RestoreServerResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c RestoreServerResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RestoreServerResponse) #

gmapT :: (forall b. Data b => b -> b) -> RestoreServerResponse -> RestoreServerResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RestoreServerResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RestoreServerResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> RestoreServerResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RestoreServerResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RestoreServerResponse -> m RestoreServerResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RestoreServerResponse -> m RestoreServerResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RestoreServerResponse -> m RestoreServerResponse #

Read RestoreServerResponse # 
Show RestoreServerResponse # 
Generic RestoreServerResponse # 
NFData RestoreServerResponse # 

Methods

rnf :: RestoreServerResponse -> () #

type Rep RestoreServerResponse # 
type Rep RestoreServerResponse = D1 (MetaData "RestoreServerResponse" "Network.AWS.OpsWorksCM.RestoreServer" "amazonka-opsworks-cm-1.4.5-AhfVC6jsAX0FFNzDXhBrcp" True) (C1 (MetaCons "RestoreServerResponse'" PrefixI True) (S1 (MetaSel (Just Symbol "_rsrsResponseStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

Response Lenses

rsrsResponseStatus :: Lens' RestoreServerResponse Int #

  • - | The response status code.