amazonka-lightsail-2.0: Amazon Lightsail SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Lightsail.DeleteKeyPair

Description

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

Creating a Request

data DeleteKeyPair Source #

See: newDeleteKeyPair smart constructor.

Constructors

DeleteKeyPair' 

Fields

  • expectedFingerprint :: Maybe Text

    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.

  • keyPairName :: Text

    The name of the key pair to delete.

Instances

Instances details
ToJSON DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

ToHeaders DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

ToPath DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

ToQuery DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

AWSRequest DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

Associated Types

type AWSResponse DeleteKeyPair #

Generic DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

Associated Types

type Rep DeleteKeyPair :: Type -> Type #

Read DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

Show DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

NFData DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

Methods

rnf :: DeleteKeyPair -> () #

Eq DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

Hashable DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

type AWSResponse DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

type Rep DeleteKeyPair Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

type Rep DeleteKeyPair = D1 ('MetaData "DeleteKeyPair" "Amazonka.Lightsail.DeleteKeyPair" "amazonka-lightsail-2.0-77hvsZhtZFxFduYae8QaN0" 'False) (C1 ('MetaCons "DeleteKeyPair'" 'PrefixI 'True) (S1 ('MetaSel ('Just "expectedFingerprint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "keyPairName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newDeleteKeyPair Source #

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.

Constructors

DeleteKeyPairResponse' 

Fields

  • operation :: Maybe 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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic DeleteKeyPairResponse Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

Associated Types

type Rep DeleteKeyPairResponse :: Type -> Type #

Read DeleteKeyPairResponse Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

Show DeleteKeyPairResponse Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

NFData DeleteKeyPairResponse Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

Methods

rnf :: DeleteKeyPairResponse -> () #

Eq DeleteKeyPairResponse Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

type Rep DeleteKeyPairResponse Source # 
Instance details

Defined in Amazonka.Lightsail.DeleteKeyPair

type Rep DeleteKeyPairResponse = D1 ('MetaData "DeleteKeyPairResponse" "Amazonka.Lightsail.DeleteKeyPair" "amazonka-lightsail-2.0-77hvsZhtZFxFduYae8QaN0" 'False) (C1 ('MetaCons "DeleteKeyPairResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "operation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Operation)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.