Copyright | (c) 2013-2017 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Restores a backup to a server that is in a CONNECTION_LOST
, HEALTHY
, RUNNING
, UNHEALTHY
, or TERMINATED
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 the server's client devices (nodes) should continue to work.
This operation is asynchronous.
An 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 not valid.
- restoreServer :: Text -> Text -> RestoreServer
- data RestoreServer
- rsKeyPair :: Lens' RestoreServer (Maybe Text)
- rsInstanceType :: Lens' RestoreServer (Maybe Text)
- rsBackupId :: Lens' RestoreServer Text
- rsServerName :: Lens' RestoreServer Text
- restoreServerResponse :: Int -> RestoreServerResponse
- data RestoreServerResponse
- rsrsResponseStatus :: Lens' RestoreServerResponse Int
Creating a Request
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 the administrator no longer has 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,m4.large
. Valid values aret2.medium
,m4.large
, andm4.2xlarge
. 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 Source #
See: restoreServer
smart constructor.
Request Lenses
rsKeyPair :: Lens' RestoreServer (Maybe Text) Source #
The name of the key pair to set on the new EC2 instance. This can be helpful if the administrator no longer has the SSH key.
rsInstanceType :: Lens' RestoreServer (Maybe Text) Source #
The type of the instance to create. Valid values must be specified in the following format: ^([cm][34]|t2).*
For example, m4.large
. Valid values are t2.medium
, m4.large
, and m4.2xlarge
. If you do not specify this parameter, RestoreServer uses the instance type from the specified backup.
rsBackupId :: Lens' RestoreServer Text Source #
The ID of the backup that you want to use to restore a server.
rsServerName :: Lens' RestoreServer Text Source #
The name of the server that you want to restore.
Destructuring the Response
restoreServerResponse Source #
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:
rsrsResponseStatus
- -- | The response status code.
data RestoreServerResponse Source #
See: restoreServerResponse
smart constructor.
Response Lenses
rsrsResponseStatus :: Lens' RestoreServerResponse Int Source #
- - | The response status code.