/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Lightsail { namespace Model { /** *

The parameters for gaining temporary access to one of your Amazon Lightsail * instances.

See Also:

AWS * API Reference

*/ class InstanceAccessDetails { public: AWS_LIGHTSAIL_API InstanceAccessDetails(); AWS_LIGHTSAIL_API InstanceAccessDetails(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API InstanceAccessDetails& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

For SSH access, the public key to use when accessing your instance For * OpenSSH clients (e.g., command line SSH), you should save this value to * tempkey-cert.pub.

*/ inline const Aws::String& GetCertKey() const{ return m_certKey; } /** *

For SSH access, the public key to use when accessing your instance For * OpenSSH clients (e.g., command line SSH), you should save this value to * tempkey-cert.pub.

*/ inline bool CertKeyHasBeenSet() const { return m_certKeyHasBeenSet; } /** *

For SSH access, the public key to use when accessing your instance For * OpenSSH clients (e.g., command line SSH), you should save this value to * tempkey-cert.pub.

*/ inline void SetCertKey(const Aws::String& value) { m_certKeyHasBeenSet = true; m_certKey = value; } /** *

For SSH access, the public key to use when accessing your instance For * OpenSSH clients (e.g., command line SSH), you should save this value to * tempkey-cert.pub.

*/ inline void SetCertKey(Aws::String&& value) { m_certKeyHasBeenSet = true; m_certKey = std::move(value); } /** *

For SSH access, the public key to use when accessing your instance For * OpenSSH clients (e.g., command line SSH), you should save this value to * tempkey-cert.pub.

*/ inline void SetCertKey(const char* value) { m_certKeyHasBeenSet = true; m_certKey.assign(value); } /** *

For SSH access, the public key to use when accessing your instance For * OpenSSH clients (e.g., command line SSH), you should save this value to * tempkey-cert.pub.

*/ inline InstanceAccessDetails& WithCertKey(const Aws::String& value) { SetCertKey(value); return *this;} /** *

For SSH access, the public key to use when accessing your instance For * OpenSSH clients (e.g., command line SSH), you should save this value to * tempkey-cert.pub.

*/ inline InstanceAccessDetails& WithCertKey(Aws::String&& value) { SetCertKey(std::move(value)); return *this;} /** *

For SSH access, the public key to use when accessing your instance For * OpenSSH clients (e.g., command line SSH), you should save this value to * tempkey-cert.pub.

*/ inline InstanceAccessDetails& WithCertKey(const char* value) { SetCertKey(value); return *this;} /** *

For SSH access, the date on which the temporary keys expire.

*/ inline const Aws::Utils::DateTime& GetExpiresAt() const{ return m_expiresAt; } /** *

For SSH access, the date on which the temporary keys expire.

*/ inline bool ExpiresAtHasBeenSet() const { return m_expiresAtHasBeenSet; } /** *

For SSH access, the date on which the temporary keys expire.

*/ inline void SetExpiresAt(const Aws::Utils::DateTime& value) { m_expiresAtHasBeenSet = true; m_expiresAt = value; } /** *

For SSH access, the date on which the temporary keys expire.

*/ inline void SetExpiresAt(Aws::Utils::DateTime&& value) { m_expiresAtHasBeenSet = true; m_expiresAt = std::move(value); } /** *

For SSH access, the date on which the temporary keys expire.

*/ inline InstanceAccessDetails& WithExpiresAt(const Aws::Utils::DateTime& value) { SetExpiresAt(value); return *this;} /** *

For SSH access, the date on which the temporary keys expire.

*/ inline InstanceAccessDetails& WithExpiresAt(Aws::Utils::DateTime&& value) { SetExpiresAt(std::move(value)); return *this;} /** *

The public IP address of the Amazon Lightsail instance.

*/ inline const Aws::String& GetIpAddress() const{ return m_ipAddress; } /** *

The public IP address of the Amazon Lightsail instance.

*/ inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; } /** *

The public IP address of the Amazon Lightsail instance.

*/ inline void SetIpAddress(const Aws::String& value) { m_ipAddressHasBeenSet = true; m_ipAddress = value; } /** *

The public IP address of the Amazon Lightsail instance.

*/ inline void SetIpAddress(Aws::String&& value) { m_ipAddressHasBeenSet = true; m_ipAddress = std::move(value); } /** *

The public IP address of the Amazon Lightsail instance.

*/ inline void SetIpAddress(const char* value) { m_ipAddressHasBeenSet = true; m_ipAddress.assign(value); } /** *

The public IP address of the Amazon Lightsail instance.

*/ inline InstanceAccessDetails& WithIpAddress(const Aws::String& value) { SetIpAddress(value); return *this;} /** *

The public IP address of the Amazon Lightsail instance.

*/ inline InstanceAccessDetails& WithIpAddress(Aws::String&& value) { SetIpAddress(std::move(value)); return *this;} /** *

The public IP address of the Amazon Lightsail instance.

*/ inline InstanceAccessDetails& WithIpAddress(const char* value) { SetIpAddress(value); return *this;} /** *

For RDP access, the password for your Amazon Lightsail instance. Password * will be an empty string if the password for your new instance is not ready yet. * When you create an instance, it can take up to 15 minutes for the instance to be * ready.

If you create an instance using any key pair other than the * default (LightsailDefaultKeyPair), password will * always be an empty string.

If you change the Administrator password on * the instance, Lightsail will continue to return the original password value. * When accessing the instance using RDP, you need to manually enter the * Administrator password after changing it from the default.

*/ inline const Aws::String& GetPassword() const{ return m_password; } /** *

For RDP access, the password for your Amazon Lightsail instance. Password * will be an empty string if the password for your new instance is not ready yet. * When you create an instance, it can take up to 15 minutes for the instance to be * ready.

If you create an instance using any key pair other than the * default (LightsailDefaultKeyPair), password will * always be an empty string.

If you change the Administrator password on * the instance, Lightsail will continue to return the original password value. * When accessing the instance using RDP, you need to manually enter the * Administrator password after changing it from the default.

*/ inline bool PasswordHasBeenSet() const { return m_passwordHasBeenSet; } /** *

For RDP access, the password for your Amazon Lightsail instance. Password * will be an empty string if the password for your new instance is not ready yet. * When you create an instance, it can take up to 15 minutes for the instance to be * ready.

If you create an instance using any key pair other than the * default (LightsailDefaultKeyPair), password will * always be an empty string.

If you change the Administrator password on * the instance, Lightsail will continue to return the original password value. * When accessing the instance using RDP, you need to manually enter the * Administrator password after changing it from the default.

*/ inline void SetPassword(const Aws::String& value) { m_passwordHasBeenSet = true; m_password = value; } /** *

For RDP access, the password for your Amazon Lightsail instance. Password * will be an empty string if the password for your new instance is not ready yet. * When you create an instance, it can take up to 15 minutes for the instance to be * ready.

If you create an instance using any key pair other than the * default (LightsailDefaultKeyPair), password will * always be an empty string.

If you change the Administrator password on * the instance, Lightsail will continue to return the original password value. * When accessing the instance using RDP, you need to manually enter the * Administrator password after changing it from the default.

*/ inline void SetPassword(Aws::String&& value) { m_passwordHasBeenSet = true; m_password = std::move(value); } /** *

For RDP access, the password for your Amazon Lightsail instance. Password * will be an empty string if the password for your new instance is not ready yet. * When you create an instance, it can take up to 15 minutes for the instance to be * ready.

If you create an instance using any key pair other than the * default (LightsailDefaultKeyPair), password will * always be an empty string.

If you change the Administrator password on * the instance, Lightsail will continue to return the original password value. * When accessing the instance using RDP, you need to manually enter the * Administrator password after changing it from the default.

*/ inline void SetPassword(const char* value) { m_passwordHasBeenSet = true; m_password.assign(value); } /** *

For RDP access, the password for your Amazon Lightsail instance. Password * will be an empty string if the password for your new instance is not ready yet. * When you create an instance, it can take up to 15 minutes for the instance to be * ready.

If you create an instance using any key pair other than the * default (LightsailDefaultKeyPair), password will * always be an empty string.

If you change the Administrator password on * the instance, Lightsail will continue to return the original password value. * When accessing the instance using RDP, you need to manually enter the * Administrator password after changing it from the default.

*/ inline InstanceAccessDetails& WithPassword(const Aws::String& value) { SetPassword(value); return *this;} /** *

For RDP access, the password for your Amazon Lightsail instance. Password * will be an empty string if the password for your new instance is not ready yet. * When you create an instance, it can take up to 15 minutes for the instance to be * ready.

If you create an instance using any key pair other than the * default (LightsailDefaultKeyPair), password will * always be an empty string.

If you change the Administrator password on * the instance, Lightsail will continue to return the original password value. * When accessing the instance using RDP, you need to manually enter the * Administrator password after changing it from the default.

*/ inline InstanceAccessDetails& WithPassword(Aws::String&& value) { SetPassword(std::move(value)); return *this;} /** *

For RDP access, the password for your Amazon Lightsail instance. Password * will be an empty string if the password for your new instance is not ready yet. * When you create an instance, it can take up to 15 minutes for the instance to be * ready.

If you create an instance using any key pair other than the * default (LightsailDefaultKeyPair), password will * always be an empty string.

If you change the Administrator password on * the instance, Lightsail will continue to return the original password value. * When accessing the instance using RDP, you need to manually enter the * Administrator password after changing it from the default.

*/ inline InstanceAccessDetails& WithPassword(const char* value) { SetPassword(value); return *this;} /** *

For a Windows Server-based instance, an object with the data you can use to * retrieve your password. This is only needed if password is empty * and the instance is not new (and therefore the password is not ready yet). When * you create an instance, it can take up to 15 minutes for the instance to be * ready.

*/ inline const PasswordData& GetPasswordData() const{ return m_passwordData; } /** *

For a Windows Server-based instance, an object with the data you can use to * retrieve your password. This is only needed if password is empty * and the instance is not new (and therefore the password is not ready yet). When * you create an instance, it can take up to 15 minutes for the instance to be * ready.

*/ inline bool PasswordDataHasBeenSet() const { return m_passwordDataHasBeenSet; } /** *

For a Windows Server-based instance, an object with the data you can use to * retrieve your password. This is only needed if password is empty * and the instance is not new (and therefore the password is not ready yet). When * you create an instance, it can take up to 15 minutes for the instance to be * ready.

*/ inline void SetPasswordData(const PasswordData& value) { m_passwordDataHasBeenSet = true; m_passwordData = value; } /** *

For a Windows Server-based instance, an object with the data you can use to * retrieve your password. This is only needed if password is empty * and the instance is not new (and therefore the password is not ready yet). When * you create an instance, it can take up to 15 minutes for the instance to be * ready.

*/ inline void SetPasswordData(PasswordData&& value) { m_passwordDataHasBeenSet = true; m_passwordData = std::move(value); } /** *

For a Windows Server-based instance, an object with the data you can use to * retrieve your password. This is only needed if password is empty * and the instance is not new (and therefore the password is not ready yet). When * you create an instance, it can take up to 15 minutes for the instance to be * ready.

*/ inline InstanceAccessDetails& WithPasswordData(const PasswordData& value) { SetPasswordData(value); return *this;} /** *

For a Windows Server-based instance, an object with the data you can use to * retrieve your password. This is only needed if password is empty * and the instance is not new (and therefore the password is not ready yet). When * you create an instance, it can take up to 15 minutes for the instance to be * ready.

*/ inline InstanceAccessDetails& WithPasswordData(PasswordData&& value) { SetPasswordData(std::move(value)); return *this;} /** *

For SSH access, the temporary private key. For OpenSSH clients (e.g., command * line SSH), you should save this value to tempkey).

*/ inline const Aws::String& GetPrivateKey() const{ return m_privateKey; } /** *

For SSH access, the temporary private key. For OpenSSH clients (e.g., command * line SSH), you should save this value to tempkey).

*/ inline bool PrivateKeyHasBeenSet() const { return m_privateKeyHasBeenSet; } /** *

For SSH access, the temporary private key. For OpenSSH clients (e.g., command * line SSH), you should save this value to tempkey).

*/ inline void SetPrivateKey(const Aws::String& value) { m_privateKeyHasBeenSet = true; m_privateKey = value; } /** *

For SSH access, the temporary private key. For OpenSSH clients (e.g., command * line SSH), you should save this value to tempkey).

*/ inline void SetPrivateKey(Aws::String&& value) { m_privateKeyHasBeenSet = true; m_privateKey = std::move(value); } /** *

For SSH access, the temporary private key. For OpenSSH clients (e.g., command * line SSH), you should save this value to tempkey).

*/ inline void SetPrivateKey(const char* value) { m_privateKeyHasBeenSet = true; m_privateKey.assign(value); } /** *

For SSH access, the temporary private key. For OpenSSH clients (e.g., command * line SSH), you should save this value to tempkey).

*/ inline InstanceAccessDetails& WithPrivateKey(const Aws::String& value) { SetPrivateKey(value); return *this;} /** *

For SSH access, the temporary private key. For OpenSSH clients (e.g., command * line SSH), you should save this value to tempkey).

*/ inline InstanceAccessDetails& WithPrivateKey(Aws::String&& value) { SetPrivateKey(std::move(value)); return *this;} /** *

For SSH access, the temporary private key. For OpenSSH clients (e.g., command * line SSH), you should save this value to tempkey).

*/ inline InstanceAccessDetails& WithPrivateKey(const char* value) { SetPrivateKey(value); return *this;} /** *

The protocol for these Amazon Lightsail instance access details.

*/ inline const InstanceAccessProtocol& GetProtocol() const{ return m_protocol; } /** *

The protocol for these Amazon Lightsail instance access details.

*/ inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; } /** *

The protocol for these Amazon Lightsail instance access details.

*/ inline void SetProtocol(const InstanceAccessProtocol& value) { m_protocolHasBeenSet = true; m_protocol = value; } /** *

The protocol for these Amazon Lightsail instance access details.

*/ inline void SetProtocol(InstanceAccessProtocol&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); } /** *

The protocol for these Amazon Lightsail instance access details.

*/ inline InstanceAccessDetails& WithProtocol(const InstanceAccessProtocol& value) { SetProtocol(value); return *this;} /** *

The protocol for these Amazon Lightsail instance access details.

*/ inline InstanceAccessDetails& WithProtocol(InstanceAccessProtocol&& value) { SetProtocol(std::move(value)); return *this;} /** *

The name of this Amazon Lightsail instance.

*/ inline const Aws::String& GetInstanceName() const{ return m_instanceName; } /** *

The name of this Amazon Lightsail instance.

*/ inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; } /** *

The name of this Amazon Lightsail instance.

*/ inline void SetInstanceName(const Aws::String& value) { m_instanceNameHasBeenSet = true; m_instanceName = value; } /** *

The name of this Amazon Lightsail instance.

*/ inline void SetInstanceName(Aws::String&& value) { m_instanceNameHasBeenSet = true; m_instanceName = std::move(value); } /** *

The name of this Amazon Lightsail instance.

*/ inline void SetInstanceName(const char* value) { m_instanceNameHasBeenSet = true; m_instanceName.assign(value); } /** *

The name of this Amazon Lightsail instance.

*/ inline InstanceAccessDetails& WithInstanceName(const Aws::String& value) { SetInstanceName(value); return *this;} /** *

The name of this Amazon Lightsail instance.

*/ inline InstanceAccessDetails& WithInstanceName(Aws::String&& value) { SetInstanceName(std::move(value)); return *this;} /** *

The name of this Amazon Lightsail instance.

*/ inline InstanceAccessDetails& WithInstanceName(const char* value) { SetInstanceName(value); return *this;} /** *

The user name to use when logging in to the Amazon Lightsail instance.

*/ inline const Aws::String& GetUsername() const{ return m_username; } /** *

The user name to use when logging in to the Amazon Lightsail instance.

*/ inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; } /** *

The user name to use when logging in to the Amazon Lightsail instance.

*/ inline void SetUsername(const Aws::String& value) { m_usernameHasBeenSet = true; m_username = value; } /** *

The user name to use when logging in to the Amazon Lightsail instance.

*/ inline void SetUsername(Aws::String&& value) { m_usernameHasBeenSet = true; m_username = std::move(value); } /** *

The user name to use when logging in to the Amazon Lightsail instance.

*/ inline void SetUsername(const char* value) { m_usernameHasBeenSet = true; m_username.assign(value); } /** *

The user name to use when logging in to the Amazon Lightsail instance.

*/ inline InstanceAccessDetails& WithUsername(const Aws::String& value) { SetUsername(value); return *this;} /** *

The user name to use when logging in to the Amazon Lightsail instance.

*/ inline InstanceAccessDetails& WithUsername(Aws::String&& value) { SetUsername(std::move(value)); return *this;} /** *

The user name to use when logging in to the Amazon Lightsail instance.

*/ inline InstanceAccessDetails& WithUsername(const char* value) { SetUsername(value); return *this;} /** *

Describes the public SSH host keys or the RDP certificate.

*/ inline const Aws::Vector& GetHostKeys() const{ return m_hostKeys; } /** *

Describes the public SSH host keys or the RDP certificate.

*/ inline bool HostKeysHasBeenSet() const { return m_hostKeysHasBeenSet; } /** *

Describes the public SSH host keys or the RDP certificate.

*/ inline void SetHostKeys(const Aws::Vector& value) { m_hostKeysHasBeenSet = true; m_hostKeys = value; } /** *

Describes the public SSH host keys or the RDP certificate.

*/ inline void SetHostKeys(Aws::Vector&& value) { m_hostKeysHasBeenSet = true; m_hostKeys = std::move(value); } /** *

Describes the public SSH host keys or the RDP certificate.

*/ inline InstanceAccessDetails& WithHostKeys(const Aws::Vector& value) { SetHostKeys(value); return *this;} /** *

Describes the public SSH host keys or the RDP certificate.

*/ inline InstanceAccessDetails& WithHostKeys(Aws::Vector&& value) { SetHostKeys(std::move(value)); return *this;} /** *

Describes the public SSH host keys or the RDP certificate.

*/ inline InstanceAccessDetails& AddHostKeys(const HostKeyAttributes& value) { m_hostKeysHasBeenSet = true; m_hostKeys.push_back(value); return *this; } /** *

Describes the public SSH host keys or the RDP certificate.

*/ inline InstanceAccessDetails& AddHostKeys(HostKeyAttributes&& value) { m_hostKeysHasBeenSet = true; m_hostKeys.push_back(std::move(value)); return *this; } private: Aws::String m_certKey; bool m_certKeyHasBeenSet = false; Aws::Utils::DateTime m_expiresAt; bool m_expiresAtHasBeenSet = false; Aws::String m_ipAddress; bool m_ipAddressHasBeenSet = false; Aws::String m_password; bool m_passwordHasBeenSet = false; PasswordData m_passwordData; bool m_passwordDataHasBeenSet = false; Aws::String m_privateKey; bool m_privateKeyHasBeenSet = false; InstanceAccessProtocol m_protocol; bool m_protocolHasBeenSet = false; Aws::String m_instanceName; bool m_instanceNameHasBeenSet = false; Aws::String m_username; bool m_usernameHasBeenSet = false; Aws::Vector m_hostKeys; bool m_hostKeysHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws