libZSservicesZSamazonka-opsworks-cmZSamazonka-opsworks-cm
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.OpsWorksCM.RestoreServer

Description

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.

Restoring from a backup is performed by creating a new EC2 instance. If restoration is successful, and the server is in a HEALTHY state, AWS OpsWorks CM switches traffic over to the new instance. After restoration is finished, the old EC2 instance is maintained in a Running or Stopped state, but is eventually terminated.

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.

Synopsis

Creating a Request

data RestoreServer Source #

See: newRestoreServer smart constructor.

Constructors

RestoreServer' 

Fields

  • keyPair :: Maybe Text

    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.

  • instanceType :: Maybe Text

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

  • backupId :: Text

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

  • serverName :: Text

    The name of the server that you want to restore.

Instances

Instances details
Eq RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

Read RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

Show RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

Generic RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

Associated Types

type Rep RestoreServer :: Type -> Type #

NFData RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

Methods

rnf :: RestoreServer -> () #

Hashable RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

ToJSON RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

AWSRequest RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

Associated Types

type AWSResponse RestoreServer #

ToHeaders RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

ToPath RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

ToQuery RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

type Rep RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

type Rep RestoreServer = D1 ('MetaData "RestoreServer" "Amazonka.OpsWorksCM.RestoreServer" "libZSservicesZSamazonka-opsworks-cmZSamazonka-opsworks-cm" 'False) (C1 ('MetaCons "RestoreServer'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "keyPair") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "instanceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "backupId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "serverName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse RestoreServer Source # 
Instance details

Defined in Amazonka.OpsWorksCM.RestoreServer

newRestoreServer Source #

Create a value of RestoreServer with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:keyPair:RestoreServer', restoreServer_keyPair - 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.

$sel:instanceType:RestoreServer', restoreServer_instanceType - The type of instance to restore. Valid values must be specified in the following format: ^([cm][34]|t2).* For example, m5.large. Valid values are m5.large, r5.xlarge, and r5.2xlarge. If you do not specify this parameter, RestoreServer uses the instance type from the specified backup.

$sel:backupId:RestoreServer', restoreServer_backupId - The ID of the backup that you want to use to restore a server.

$sel:serverName:RestoreServer', restoreServer_serverName - The name of the server that you want to restore.

Request Lenses

restoreServer_keyPair :: 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.

restoreServer_instanceType :: Lens' RestoreServer (Maybe Text) Source #

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

restoreServer_backupId :: Lens' RestoreServer Text Source #

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

restoreServer_serverName :: Lens' RestoreServer Text Source #

The name of the server that you want to restore.

Destructuring the Response

data RestoreServerResponse Source #

See: newRestoreServerResponse smart constructor.

Constructors

RestoreServerResponse' 

Fields

newRestoreServerResponse Source #

Create a value of RestoreServerResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:server:RestoreServerResponse', restoreServerResponse_server - Undocumented member.

$sel:httpStatus:RestoreServerResponse', restoreServerResponse_httpStatus - The response's http status code.

Response Lenses