AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the DescribeKeyPairs operation. 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.
Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z
public class DescribeKeyPairsRequest : AmazonEC2Request IAmazonWebServiceRequest
The DescribeKeyPairsRequest type exposes the following members
Name | Description | |
---|---|---|
DescribeKeyPairsRequest() |
Name | Type | Description | |
---|---|---|---|
Filters | System.Collections.Generic.List<Amazon.EC2.Model.Filter> |
Gets and sets the property Filters. The filters.
|
|
IncludePublicKey | System.Boolean |
Gets and sets the property IncludePublicKey.
If
Default: |
|
KeyNames | System.Collections.Generic.List<System.String> |
Gets and sets the property KeyNames. The key pair names. Default: Describes all of your key pairs. |
|
KeyPairIds | System.Collections.Generic.List<System.String> |
Gets and sets the property KeyPairIds. The IDs of the key pairs. |
This example displays the fingerprint for the specified key.
var client = new AmazonEC2Client(); var response = client.DescribeKeyPairs(new DescribeKeyPairsRequest { KeyNames = new List<string> { "my-key-pair" } }); List<KeyPairInfo> keyPairs = response.KeyPairs;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5