/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Xml { class XmlDocument; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes a key pair.

See Also:

AWS API * Reference

*/ class CreateKeyPairResponse { public: AWS_EC2_API CreateKeyPairResponse(); AWS_EC2_API CreateKeyPairResponse(const Aws::AmazonWebServiceResult& result); AWS_EC2_API CreateKeyPairResponse& operator=(const Aws::AmazonWebServiceResult& result); /** *
  • For RSA key pairs, the key fingerprint is the SHA-1 digest of the * DER encoded private key.

  • For ED25519 key pairs, the key * fingerprint is the base64-encoded SHA-256 digest, which is the default for * OpenSSH, starting with OpenSSH 6.8.

*/ inline const Aws::String& GetKeyFingerprint() const{ return m_keyFingerprint; } /** *
  • For RSA key pairs, the key fingerprint is the SHA-1 digest of the * DER encoded private key.

  • For ED25519 key pairs, the key * fingerprint is the base64-encoded SHA-256 digest, which is the default for * OpenSSH, starting with OpenSSH 6.8.

*/ inline void SetKeyFingerprint(const Aws::String& value) { m_keyFingerprint = value; } /** *
  • For RSA key pairs, the key fingerprint is the SHA-1 digest of the * DER encoded private key.

  • For ED25519 key pairs, the key * fingerprint is the base64-encoded SHA-256 digest, which is the default for * OpenSSH, starting with OpenSSH 6.8.

*/ inline void SetKeyFingerprint(Aws::String&& value) { m_keyFingerprint = std::move(value); } /** *
  • For RSA key pairs, the key fingerprint is the SHA-1 digest of the * DER encoded private key.

  • For ED25519 key pairs, the key * fingerprint is the base64-encoded SHA-256 digest, which is the default for * OpenSSH, starting with OpenSSH 6.8.

*/ inline void SetKeyFingerprint(const char* value) { m_keyFingerprint.assign(value); } /** *
  • For RSA key pairs, the key fingerprint is the SHA-1 digest of the * DER encoded private key.

  • For ED25519 key pairs, the key * fingerprint is the base64-encoded SHA-256 digest, which is the default for * OpenSSH, starting with OpenSSH 6.8.

*/ inline CreateKeyPairResponse& WithKeyFingerprint(const Aws::String& value) { SetKeyFingerprint(value); return *this;} /** *
  • For RSA key pairs, the key fingerprint is the SHA-1 digest of the * DER encoded private key.

  • For ED25519 key pairs, the key * fingerprint is the base64-encoded SHA-256 digest, which is the default for * OpenSSH, starting with OpenSSH 6.8.

*/ inline CreateKeyPairResponse& WithKeyFingerprint(Aws::String&& value) { SetKeyFingerprint(std::move(value)); return *this;} /** *
  • For RSA key pairs, the key fingerprint is the SHA-1 digest of the * DER encoded private key.

  • For ED25519 key pairs, the key * fingerprint is the base64-encoded SHA-256 digest, which is the default for * OpenSSH, starting with OpenSSH 6.8.

*/ inline CreateKeyPairResponse& WithKeyFingerprint(const char* value) { SetKeyFingerprint(value); return *this;} /** *

An unencrypted PEM encoded RSA or ED25519 private key.

*/ inline const Aws::String& GetKeyMaterial() const{ return m_keyMaterial; } /** *

An unencrypted PEM encoded RSA or ED25519 private key.

*/ inline void SetKeyMaterial(const Aws::String& value) { m_keyMaterial = value; } /** *

An unencrypted PEM encoded RSA or ED25519 private key.

*/ inline void SetKeyMaterial(Aws::String&& value) { m_keyMaterial = std::move(value); } /** *

An unencrypted PEM encoded RSA or ED25519 private key.

*/ inline void SetKeyMaterial(const char* value) { m_keyMaterial.assign(value); } /** *

An unencrypted PEM encoded RSA or ED25519 private key.

*/ inline CreateKeyPairResponse& WithKeyMaterial(const Aws::String& value) { SetKeyMaterial(value); return *this;} /** *

An unencrypted PEM encoded RSA or ED25519 private key.

*/ inline CreateKeyPairResponse& WithKeyMaterial(Aws::String&& value) { SetKeyMaterial(std::move(value)); return *this;} /** *

An unencrypted PEM encoded RSA or ED25519 private key.

*/ inline CreateKeyPairResponse& WithKeyMaterial(const char* value) { SetKeyMaterial(value); return *this;} /** *

The name of the key pair.

*/ inline const Aws::String& GetKeyName() const{ return m_keyName; } /** *

The name of the key pair.

*/ inline void SetKeyName(const Aws::String& value) { m_keyName = value; } /** *

The name of the key pair.

*/ inline void SetKeyName(Aws::String&& value) { m_keyName = std::move(value); } /** *

The name of the key pair.

*/ inline void SetKeyName(const char* value) { m_keyName.assign(value); } /** *

The name of the key pair.

*/ inline CreateKeyPairResponse& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;} /** *

The name of the key pair.

*/ inline CreateKeyPairResponse& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;} /** *

The name of the key pair.

*/ inline CreateKeyPairResponse& WithKeyName(const char* value) { SetKeyName(value); return *this;} /** *

The ID of the key pair.

*/ inline const Aws::String& GetKeyPairId() const{ return m_keyPairId; } /** *

The ID of the key pair.

*/ inline void SetKeyPairId(const Aws::String& value) { m_keyPairId = value; } /** *

The ID of the key pair.

*/ inline void SetKeyPairId(Aws::String&& value) { m_keyPairId = std::move(value); } /** *

The ID of the key pair.

*/ inline void SetKeyPairId(const char* value) { m_keyPairId.assign(value); } /** *

The ID of the key pair.

*/ inline CreateKeyPairResponse& WithKeyPairId(const Aws::String& value) { SetKeyPairId(value); return *this;} /** *

The ID of the key pair.

*/ inline CreateKeyPairResponse& WithKeyPairId(Aws::String&& value) { SetKeyPairId(std::move(value)); return *this;} /** *

The ID of the key pair.

*/ inline CreateKeyPairResponse& WithKeyPairId(const char* value) { SetKeyPairId(value); return *this;} /** *

Any tags applied to the key pair.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Any tags applied to the key pair.

*/ inline void SetTags(const Aws::Vector& value) { m_tags = value; } /** *

Any tags applied to the key pair.

*/ inline void SetTags(Aws::Vector&& value) { m_tags = std::move(value); } /** *

Any tags applied to the key pair.

*/ inline CreateKeyPairResponse& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Any tags applied to the key pair.

*/ inline CreateKeyPairResponse& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Any tags applied to the key pair.

*/ inline CreateKeyPairResponse& AddTags(const Tag& value) { m_tags.push_back(value); return *this; } /** *

Any tags applied to the key pair.

*/ inline CreateKeyPairResponse& AddTags(Tag&& value) { m_tags.push_back(std::move(value)); return *this; } inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } inline CreateKeyPairResponse& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} inline CreateKeyPairResponse& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} private: Aws::String m_keyFingerprint; Aws::String m_keyMaterial; Aws::String m_keyName; Aws::String m_keyPairId; Aws::Vector m_tags; ResponseMetadata m_responseMetadata; }; } // namespace Model } // namespace EC2 } // namespace Aws