/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *

* Describes a key pair. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class KeyPairInfo implements Serializable, Cloneable { /** *

* The ID of the key pair. *

*/ private String keyPairId; /** *

* If you used CreateKeyPair to create the key pair: *

* *

* If you used ImportKeyPair to provide Amazon Web Services the public key: *

* */ private String keyFingerprint; /** *

* The name of the key pair. *

*/ private String keyName; /** *

* The type of key pair. *

*/ private String keyType; /** *

* Any tags applied to the key pair. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* The public key material. *

*/ private String publicKey; /** *

* If you used Amazon EC2 to create the key pair, this is the date and time when the key was created, in ISO 8601 date-time format, in the UTC time * zone. *

*

* If you imported an existing key pair to Amazon EC2, this is the date and time the key was imported, in ISO 8601 date-time format, in the UTC time * zone. *

*/ private java.util.Date createTime; /** *

* The ID of the key pair. *

* * @param keyPairId * The ID of the key pair. */ public void setKeyPairId(String keyPairId) { this.keyPairId = keyPairId; } /** *

* The ID of the key pair. *

* * @return The ID of the key pair. */ public String getKeyPairId() { return this.keyPairId; } /** *

* The ID of the key pair. *

* * @param keyPairId * The ID of the key pair. * @return Returns a reference to this object so that method calls can be chained together. */ public KeyPairInfo withKeyPairId(String keyPairId) { setKeyPairId(keyPairId); return this; } /** *

* If you used CreateKeyPair to create the key pair: *

* *

* If you used ImportKeyPair to provide Amazon Web Services the public key: *

* * * @param keyFingerprint * If you used CreateKeyPair to create the key pair:

* *

* If you used ImportKeyPair to provide Amazon Web Services the public key: *

*