/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace OpsWorksCM { namespace Model { /** */ class RestoreServerRequest : public OpsWorksCMRequest { public: AWS_OPSWORKSCM_API RestoreServerRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "RestoreServer"; } AWS_OPSWORKSCM_API Aws::String SerializePayload() const override; AWS_OPSWORKSCM_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

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

*/ inline const Aws::String& GetBackupId() const{ return m_backupId; } /** *

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

*/ inline bool BackupIdHasBeenSet() const { return m_backupIdHasBeenSet; } /** *

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

*/ inline void SetBackupId(const Aws::String& value) { m_backupIdHasBeenSet = true; m_backupId = value; } /** *

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

*/ inline void SetBackupId(Aws::String&& value) { m_backupIdHasBeenSet = true; m_backupId = std::move(value); } /** *

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

*/ inline void SetBackupId(const char* value) { m_backupIdHasBeenSet = true; m_backupId.assign(value); } /** *

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

*/ inline RestoreServerRequest& WithBackupId(const Aws::String& value) { SetBackupId(value); return *this;} /** *

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

*/ inline RestoreServerRequest& WithBackupId(Aws::String&& value) { SetBackupId(std::move(value)); return *this;} /** *

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

*/ inline RestoreServerRequest& WithBackupId(const char* value) { SetBackupId(value); return *this;} /** *

The name of the server that you want to restore.

*/ inline const Aws::String& GetServerName() const{ return m_serverName; } /** *

The name of the server that you want to restore.

*/ inline bool ServerNameHasBeenSet() const { return m_serverNameHasBeenSet; } /** *

The name of the server that you want to restore.

*/ inline void SetServerName(const Aws::String& value) { m_serverNameHasBeenSet = true; m_serverName = value; } /** *

The name of the server that you want to restore.

*/ inline void SetServerName(Aws::String&& value) { m_serverNameHasBeenSet = true; m_serverName = std::move(value); } /** *

The name of the server that you want to restore.

*/ inline void SetServerName(const char* value) { m_serverNameHasBeenSet = true; m_serverName.assign(value); } /** *

The name of the server that you want to restore.

*/ inline RestoreServerRequest& WithServerName(const Aws::String& value) { SetServerName(value); return *this;} /** *

The name of the server that you want to restore.

*/ inline RestoreServerRequest& WithServerName(Aws::String&& value) { SetServerName(std::move(value)); return *this;} /** *

The name of the server that you want to restore.

*/ inline RestoreServerRequest& WithServerName(const char* value) { SetServerName(value); return *this;} /** *

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.

*/ inline const Aws::String& GetInstanceType() const{ return m_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.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

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.

*/ inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

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.

*/ inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

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.

*/ inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); } /** *

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.

*/ inline RestoreServerRequest& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;} /** *

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.

*/ inline RestoreServerRequest& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;} /** *

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.

*/ inline RestoreServerRequest& WithInstanceType(const char* value) { SetInstanceType(value); return *this;} /** *

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.

*/ inline const Aws::String& GetKeyPair() const{ return m_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.

*/ inline bool KeyPairHasBeenSet() const { return m_keyPairHasBeenSet; } /** *

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.

*/ inline void SetKeyPair(const Aws::String& value) { m_keyPairHasBeenSet = true; m_keyPair = value; } /** *

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.

*/ inline void SetKeyPair(Aws::String&& value) { m_keyPairHasBeenSet = true; m_keyPair = std::move(value); } /** *

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.

*/ inline void SetKeyPair(const char* value) { m_keyPairHasBeenSet = true; m_keyPair.assign(value); } /** *

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.

*/ inline RestoreServerRequest& WithKeyPair(const Aws::String& value) { SetKeyPair(value); return *this;} /** *

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.

*/ inline RestoreServerRequest& WithKeyPair(Aws::String&& value) { SetKeyPair(std::move(value)); return *this;} /** *

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.

*/ inline RestoreServerRequest& WithKeyPair(const char* value) { SetKeyPair(value); return *this;} private: Aws::String m_backupId; bool m_backupIdHasBeenSet = false; Aws::String m_serverName; bool m_serverNameHasBeenSet = false; Aws::String m_instanceType; bool m_instanceTypeHasBeenSet = false; Aws::String m_keyPair; bool m_keyPairHasBeenSet = false; }; } // namespace Model } // namespace OpsWorksCM } // namespace Aws