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 |
Deletes the specified key pair by removing the public key from Amazon Lightsail.
You can delete key pairs that were created using the ImportKeyPair and CreateKeyPair actions, as well as the Lightsail default key pair. A new default key pair will not be created unless you launch an instance without specifying a custom key pair, or you call the DownloadDefaultKeyPair API.
The delete key pair
operation supports tag-based access control via
resource tags applied to the resource identified by key pair name
. For
more information, see the
Amazon Lightsail Developer Guide.
Synopsis
- data DeleteKeyPair = DeleteKeyPair' {}
- newDeleteKeyPair :: Text -> DeleteKeyPair
- deleteKeyPair_expectedFingerprint :: Lens' DeleteKeyPair (Maybe Text)
- deleteKeyPair_keyPairName :: Lens' DeleteKeyPair Text
- data DeleteKeyPairResponse = DeleteKeyPairResponse' {
- operation :: Maybe Operation
- httpStatus :: Int
- newDeleteKeyPairResponse :: Int -> DeleteKeyPairResponse
- deleteKeyPairResponse_operation :: Lens' DeleteKeyPairResponse (Maybe Operation)
- deleteKeyPairResponse_httpStatus :: Lens' DeleteKeyPairResponse Int
Creating a Request
data DeleteKeyPair Source #
See: newDeleteKeyPair
smart constructor.
DeleteKeyPair' | |
|
Instances
Create a value of DeleteKeyPair
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:expectedFingerprint:DeleteKeyPair'
, deleteKeyPair_expectedFingerprint
- The RSA fingerprint of the Lightsail default key pair to delete.
The expectedFingerprint
parameter is required only when specifying to
delete a Lightsail default key pair.
DeleteKeyPair
, deleteKeyPair_keyPairName
- The name of the key pair to delete.
Request Lenses
deleteKeyPair_expectedFingerprint :: Lens' DeleteKeyPair (Maybe Text) Source #
The RSA fingerprint of the Lightsail default key pair to delete.
The expectedFingerprint
parameter is required only when specifying to
delete a Lightsail default key pair.
deleteKeyPair_keyPairName :: Lens' DeleteKeyPair Text Source #
The name of the key pair to delete.
Destructuring the Response
data DeleteKeyPairResponse Source #
See: newDeleteKeyPairResponse
smart constructor.
DeleteKeyPairResponse' | |
|
Instances
newDeleteKeyPairResponse Source #
Create a value of DeleteKeyPairResponse
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:operation:DeleteKeyPairResponse'
, deleteKeyPairResponse_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:httpStatus:DeleteKeyPairResponse'
, deleteKeyPairResponse_httpStatus
- The response's http status code.
Response Lenses
deleteKeyPairResponse_operation :: Lens' DeleteKeyPairResponse (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.
deleteKeyPairResponse_httpStatus :: Lens' DeleteKeyPairResponse Int Source #
The response's http status code.