| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.Lightsail.CreateKeyPair
Description
Creates a custom SSH key pair that you can use with an Amazon Lightsail instance.
Use the DownloadDefaultKeyPair action to create a Lightsail default key pair in an Amazon Web Services Region where a default key pair does not currently exist.
The create key pair operation supports tag-based access control via
request tags. For more information, see the
Amazon Lightsail Developer Guide.
Synopsis
- data CreateKeyPair = CreateKeyPair' {
- tags :: Maybe [Tag]
- keyPairName :: Text
- newCreateKeyPair :: Text -> CreateKeyPair
- createKeyPair_tags :: Lens' CreateKeyPair (Maybe [Tag])
- createKeyPair_keyPairName :: Lens' CreateKeyPair Text
- data CreateKeyPairResponse = CreateKeyPairResponse' {}
- newCreateKeyPairResponse :: Int -> CreateKeyPairResponse
- createKeyPairResponse_keyPair :: Lens' CreateKeyPairResponse (Maybe KeyPair)
- createKeyPairResponse_operation :: Lens' CreateKeyPairResponse (Maybe Operation)
- createKeyPairResponse_privateKeyBase64 :: Lens' CreateKeyPairResponse (Maybe Text)
- createKeyPairResponse_publicKeyBase64 :: Lens' CreateKeyPairResponse (Maybe Text)
- createKeyPairResponse_httpStatus :: Lens' CreateKeyPairResponse Int
Creating a Request
data CreateKeyPair Source #
See: newCreateKeyPair smart constructor.
Constructors
| CreateKeyPair' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> CreateKeyPair |
Create a value of CreateKeyPair 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:
CreateKeyPair, createKeyPair_tags - The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
CreateKeyPair, createKeyPair_keyPairName - The name for your new key pair.
Request Lenses
createKeyPair_tags :: Lens' CreateKeyPair (Maybe [Tag]) Source #
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
createKeyPair_keyPairName :: Lens' CreateKeyPair Text Source #
The name for your new key pair.
Destructuring the Response
data CreateKeyPairResponse Source #
See: newCreateKeyPairResponse smart constructor.
Constructors
| CreateKeyPairResponse' | |
Fields
| |
Instances
newCreateKeyPairResponse Source #
Create a value of CreateKeyPairResponse 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:CreateKeyPairResponse', createKeyPairResponse_keyPair - An array of key-value pairs containing information about the new key
pair you just created.
$sel:operation:CreateKeyPairResponse', createKeyPairResponse_operation - An array of objects that describe the result of the action, such as the
status of the request, the timestamp of the request, and the resources
affected by the request.
$sel:privateKeyBase64:CreateKeyPairResponse', createKeyPairResponse_privateKeyBase64 - A base64-encoded RSA private key.
$sel:publicKeyBase64:CreateKeyPairResponse', createKeyPairResponse_publicKeyBase64 - A base64-encoded public key of the ssh-rsa type.
$sel:httpStatus:CreateKeyPairResponse', createKeyPairResponse_httpStatus - The response's http status code.
Response Lenses
createKeyPairResponse_keyPair :: Lens' CreateKeyPairResponse (Maybe KeyPair) Source #
An array of key-value pairs containing information about the new key pair you just created.
createKeyPairResponse_operation :: Lens' CreateKeyPairResponse (Maybe Operation) Source #
An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.
createKeyPairResponse_privateKeyBase64 :: Lens' CreateKeyPairResponse (Maybe Text) Source #
A base64-encoded RSA private key.
createKeyPairResponse_publicKeyBase64 :: Lens' CreateKeyPairResponse (Maybe Text) Source #
A base64-encoded public key of the ssh-rsa type.
createKeyPairResponse_httpStatus :: Lens' CreateKeyPairResponse Int Source #
The response's http status code.