/* * Copyright 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. */ /* * Do not modify this file. This file is generated from the ec2-instance-connect-2018-04-02.normal.json service model. */ using System; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using Amazon.Runtime; using Amazon.EC2InstanceConnect.Model; namespace Amazon.EC2InstanceConnect { /// /// Interface for accessing EC2InstanceConnect /// /// 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. /// public partial interface IAmazonEC2InstanceConnect : IAmazonService, IDisposable { #region SendSerialConsoleSSHPublicKey /// /// 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. /// /// Container for the necessary parameters to execute the SendSerialConsoleSSHPublicKey service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the SendSerialConsoleSSHPublicKey service method, as returned by EC2InstanceConnect. /// /// Either your AWS credentials are not valid or you do not have access to the EC2 instance. /// /// /// The specified instance was not found. /// /// /// Unable to connect because the instance is not in a valid state. Connecting to a stopped /// or terminated instance is not supported. If the instance is stopped, start your instance, /// and try to connect again. /// /// /// The instance type is not supported for connecting via the serial console. Only Nitro /// instance types are currently supported. /// /// /// The instance is currently unavailable. Wait a few minutes and try again. /// /// /// One of the parameters is not valid. /// /// /// Your account is not authorized to use the EC2 Serial Console. To authorize your account, /// run the EnableSerialConsoleAccess API. For more information, see EnableSerialConsoleAccess /// in the Amazon EC2 API Reference. /// /// /// The instance currently has 1 active serial console session. Only 1 session is supported /// at a time. /// /// /// Unable to start a serial console session. Please try again. /// /// /// The service encountered an error. Follow the instructions in the error message and /// try again. /// /// /// The requests were made too frequently and have been throttled. Wait a while and try /// again. To increase the limit on your request frequency, contact AWS Support. /// /// REST API Reference for SendSerialConsoleSSHPublicKey Operation Task SendSerialConsoleSSHPublicKeyAsync(SendSerialConsoleSSHPublicKeyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion #region SendSSHPublicKey /// /// 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. /// /// Container for the necessary parameters to execute the SendSSHPublicKey service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the SendSSHPublicKey service method, as returned by EC2InstanceConnect. /// /// Either your AWS credentials are not valid or you do not have access to the EC2 instance. /// /// /// The specified instance was not found. /// /// /// Unable to connect because the instance is not in a valid state. Connecting to a stopped /// or terminated instance is not supported. If the instance is stopped, start your instance, /// and try to connect again. /// /// /// The instance is currently unavailable. Wait a few minutes and try again. /// /// /// One of the parameters is not valid. /// /// /// The service encountered an error. Follow the instructions in the error message and /// try again. /// /// /// The requests were made too frequently and have been throttled. Wait a while and try /// again. To increase the limit on your request frequency, contact AWS Support. /// /// REST API Reference for SendSSHPublicKey Operation Task SendSSHPublicKeyAsync(SendSSHPublicKeyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion } }