/* * 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.ec2instanceconnect; import javax.annotation.Generated; import com.amazonaws.services.ec2instanceconnect.model.*; /** * Interface for accessing EC2 Instance Connect asynchronously. Each asynchronous method will return a Java Future * object representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive * notification when an asynchronous operation completes. *

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.ec2instanceconnect.AbstractAWSEC2InstanceConnectAsync} instead. *

*

*

* Amazon EC2 Instance Connect enables system administrators to publish one-time use SSH public keys to EC2, providing * users a simple and secure way to connect to their instances. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AWSEC2InstanceConnectAsync extends AWSEC2InstanceConnect { /** *

* Pushes an SSH public key to the specified EC2 instance for use by the specified user. The key remains for 60 * seconds. For more information, see Connect to * your Linux instance using EC2 Instance Connect in the Amazon EC2 User Guide. *

* * @param sendSSHPublicKeyRequest * @return A Java Future containing the result of the SendSSHPublicKey operation returned by the service. * @sample AWSEC2InstanceConnectAsync.SendSSHPublicKey * @see AWS API Documentation */ java.util.concurrent.Future sendSSHPublicKeyAsync(SendSSHPublicKeyRequest sendSSHPublicKeyRequest); /** *

* Pushes an SSH public key to the specified EC2 instance for use by the specified user. The key remains for 60 * seconds. For more information, see Connect to * your Linux instance using EC2 Instance Connect in the Amazon EC2 User Guide. *

* * @param sendSSHPublicKeyRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the SendSSHPublicKey operation returned by the service. * @sample AWSEC2InstanceConnectAsyncHandler.SendSSHPublicKey * @see AWS API Documentation */ java.util.concurrent.Future sendSSHPublicKeyAsync(SendSSHPublicKeyRequest sendSSHPublicKeyRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Pushes an SSH public key to the specified EC2 instance. The key remains for 60 seconds, which gives you 60 * seconds to establish a serial console connection to the instance using SSH. For more information, see EC2 Serial Console in the * Amazon EC2 User Guide. *

* * @param sendSerialConsoleSSHPublicKeyRequest * @return A Java Future containing the result of the SendSerialConsoleSSHPublicKey operation returned by the * service. * @sample AWSEC2InstanceConnectAsync.SendSerialConsoleSSHPublicKey * @see AWS API Documentation */ java.util.concurrent.Future sendSerialConsoleSSHPublicKeyAsync( SendSerialConsoleSSHPublicKeyRequest sendSerialConsoleSSHPublicKeyRequest); /** *

* Pushes an SSH public key to the specified EC2 instance. The key remains for 60 seconds, which gives you 60 * seconds to establish a serial console connection to the instance using SSH. For more information, see EC2 Serial Console in the * Amazon EC2 User Guide. *

* * @param sendSerialConsoleSSHPublicKeyRequest * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the SendSerialConsoleSSHPublicKey operation returned by the * service. * @sample AWSEC2InstanceConnectAsyncHandler.SendSerialConsoleSSHPublicKey * @see AWS API Documentation */ java.util.concurrent.Future sendSerialConsoleSSHPublicKeyAsync( SendSerialConsoleSSHPublicKeyRequest sendSerialConsoleSSHPublicKeyRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); }