amazonka-ec2-2.0: Amazon Elastic Compute Cloud 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.EC2.DescribeKeyPairs

Description

Describes the specified key pairs or all of your key pairs.

For more information about key pairs, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

data DescribeKeyPairs Source #

See: newDescribeKeyPairs smart constructor.

Constructors

DescribeKeyPairs' 

Fields

  • dryRun :: Maybe Bool

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • filters :: Maybe [Filter]

    The filters.

    • key-pair-id - The ID of the key pair.
    • fingerprint - The fingerprint of the key pair.
    • key-name - The name of the key pair.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.
  • includePublicKey :: Maybe Bool

    If true, the public key material is included in the response.

    Default: false

  • keyNames :: Maybe [Text]

    The key pair names.

    Default: Describes all of your key pairs.

  • keyPairIds :: Maybe [Text]

    The IDs of the key pairs.

Instances

Instances details
ToHeaders DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

ToPath DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

ToQuery DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

AWSRequest DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

Associated Types

type AWSResponse DescribeKeyPairs #

Generic DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

Associated Types

type Rep DescribeKeyPairs :: Type -> Type #

Read DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

Show DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

NFData DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

Methods

rnf :: DescribeKeyPairs -> () #

Eq DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

Hashable DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

type AWSResponse DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

type Rep DescribeKeyPairs Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

type Rep DescribeKeyPairs = D1 ('MetaData "DescribeKeyPairs" "Amazonka.EC2.DescribeKeyPairs" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DescribeKeyPairs'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "filters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Filter]))) :*: (S1 ('MetaSel ('Just "includePublicKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "keyNames") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "keyPairIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))))))

newDescribeKeyPairs :: DescribeKeyPairs Source #

Create a value of DescribeKeyPairs 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:dryRun:DescribeKeyPairs', describeKeyPairs_dryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

$sel:filters:DescribeKeyPairs', describeKeyPairs_filters - The filters.

  • key-pair-id - The ID of the key pair.
  • fingerprint - The fingerprint of the key pair.
  • key-name - The name of the key pair.
  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
  • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

$sel:includePublicKey:DescribeKeyPairs', describeKeyPairs_includePublicKey - If true, the public key material is included in the response.

Default: false

$sel:keyNames:DescribeKeyPairs', describeKeyPairs_keyNames - The key pair names.

Default: Describes all of your key pairs.

$sel:keyPairIds:DescribeKeyPairs', describeKeyPairs_keyPairIds - The IDs of the key pairs.

Request Lenses

describeKeyPairs_dryRun :: Lens' DescribeKeyPairs (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

describeKeyPairs_filters :: Lens' DescribeKeyPairs (Maybe [Filter]) Source #

The filters.

  • key-pair-id - The ID of the key pair.
  • fingerprint - The fingerprint of the key pair.
  • key-name - The name of the key pair.
  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
  • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

describeKeyPairs_includePublicKey :: Lens' DescribeKeyPairs (Maybe Bool) Source #

If true, the public key material is included in the response.

Default: false

describeKeyPairs_keyNames :: Lens' DescribeKeyPairs (Maybe [Text]) Source #

The key pair names.

Default: Describes all of your key pairs.

Destructuring the Response

data DescribeKeyPairsResponse Source #

See: newDescribeKeyPairsResponse smart constructor.

Constructors

DescribeKeyPairsResponse' 

Fields

Instances

Instances details
Generic DescribeKeyPairsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

Associated Types

type Rep DescribeKeyPairsResponse :: Type -> Type #

Read DescribeKeyPairsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

Show DescribeKeyPairsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

NFData DescribeKeyPairsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

Eq DescribeKeyPairsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

type Rep DescribeKeyPairsResponse Source # 
Instance details

Defined in Amazonka.EC2.DescribeKeyPairs

type Rep DescribeKeyPairsResponse = D1 ('MetaData "DescribeKeyPairsResponse" "Amazonka.EC2.DescribeKeyPairs" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "DescribeKeyPairsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "keyPairs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [KeyPairInfo])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newDescribeKeyPairsResponse Source #

Create a value of DescribeKeyPairsResponse 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:keyPairs:DescribeKeyPairsResponse', describeKeyPairsResponse_keyPairs - Information about the key pairs.

$sel:httpStatus:DescribeKeyPairsResponse', describeKeyPairsResponse_httpStatus - The response's http status code.

Response Lenses