...
AWS SDK for Go API Reference
We announced the upcoming end-of-support for AWS SDK for Go (v1). We recommend that you migrate to AWS SDK for Go v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
import "github.com/aws/aws-sdk-go/service/ec2instanceconnect"
Overview
Examples
Constants

Overview ▾

Package ec2instanceconnect provides the client and types for making API requests to AWS EC2 Instance Connect.

This is the Amazon EC2 Instance Connect API Reference. It provides descriptions, syntax, and usage examples for each of the actions for Amazon EC2 Instance Connect. 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.

To view the Amazon EC2 Instance Connect content in the Amazon EC2 User Guide, see Connect to your Linux instance using EC2 Instance Connect (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html).

For Amazon EC2 APIs, see the Amazon EC2 API Reference (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html).

See https://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02 for more information on this service.

See ec2instanceconnect package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/ec2instanceconnect/

Using the Client

To contact AWS EC2 Instance Connect with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the AWS EC2 Instance Connect client EC2InstanceConnect for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/ec2instanceconnect/#New

The stub package, ec2instanceconnectiface, can be used to provide alternative implementations of service clients, such as mocking the client for testing.

Types ▾

type EC2InstanceConnect
func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2InstanceConnect
func (c *EC2InstanceConnect) SendSSHPublicKey(input *SendSSHPublicKeyInput) (*SendSSHPublicKeyOutput, error)
func (c *EC2InstanceConnect) SendSSHPublicKeyRequest(input *SendSSHPublicKeyInput) (req *request.Request, output *SendSSHPublicKeyOutput)
func (c *EC2InstanceConnect) SendSSHPublicKeyWithContext(ctx aws.Context, input *SendSSHPublicKeyInput, opts ...request.Option) (*SendSSHPublicKeyOutput, error)
func (c *EC2InstanceConnect) SendSerialConsoleSSHPublicKey(input *SendSerialConsoleSSHPublicKeyInput) (*SendSerialConsoleSSHPublicKeyOutput, error)
func (c *EC2InstanceConnect) SendSerialConsoleSSHPublicKeyRequest(input *SendSerialConsoleSSHPublicKeyInput) (req *request.Request, output *SendSerialConsoleSSHPublicKeyOutput)
func (c *EC2InstanceConnect) SendSerialConsoleSSHPublicKeyWithContext(ctx aws.Context, input *SendSerialConsoleSSHPublicKeyInput, opts ...request.Option) (*SendSerialConsoleSSHPublicKeyOutput, error)
type AuthException
type EC2InstanceNotFoundException
type EC2InstanceStateInvalidException
type EC2InstanceTypeInvalidException
type EC2InstanceUnavailableException
type InvalidArgsException
type SendSSHPublicKeyInput
type SendSSHPublicKeyOutput
type SendSerialConsoleSSHPublicKeyInput
type SendSerialConsoleSSHPublicKeyOutput
type SerialConsoleAccessDisabledException
type SerialConsoleSessionLimitExceededException
type SerialConsoleSessionUnavailableException
type SerialConsoleSessionUnsupportedException
type ServiceException
type ThrottlingException

Constants ▾

const (

    // ErrCodeAuthException for service response error code
    // "AuthException".
    //
    // Either your AWS credentials are not valid or you do not have access to the
    // EC2 instance.
    ErrCodeAuthException = "AuthException"

    // ErrCodeEC2InstanceNotFoundException for service response error code
    // "EC2InstanceNotFoundException".
    //
    // The specified instance was not found.
    ErrCodeEC2InstanceNotFoundException = "EC2InstanceNotFoundException"

    // ErrCodeEC2InstanceStateInvalidException for service response error code
    // "EC2InstanceStateInvalidException".
    //
    // 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.
    ErrCodeEC2InstanceStateInvalidException = "EC2InstanceStateInvalidException"

    // ErrCodeEC2InstanceTypeInvalidException for service response error code
    // "EC2InstanceTypeInvalidException".
    //
    // The instance type is not supported for connecting via the serial console.
    // Only Nitro instance types are currently supported.
    ErrCodeEC2InstanceTypeInvalidException = "EC2InstanceTypeInvalidException"

    // ErrCodeEC2InstanceUnavailableException for service response error code
    // "EC2InstanceUnavailableException".
    //
    // The instance is currently unavailable. Wait a few minutes and try again.
    ErrCodeEC2InstanceUnavailableException = "EC2InstanceUnavailableException"

    // ErrCodeInvalidArgsException for service response error code
    // "InvalidArgsException".
    //
    // One of the parameters is not valid.
    ErrCodeInvalidArgsException = "InvalidArgsException"

    // ErrCodeSerialConsoleAccessDisabledException for service response error code
    // "SerialConsoleAccessDisabledException".
    //
    // Your account is not authorized to use the EC2 Serial Console. To authorize
    // your account, run the EnableSerialConsoleAccess API. For more information,
    // see EnableSerialConsoleAccess (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EnableSerialConsoleAccess.html)
    // in the Amazon EC2 API Reference.
    ErrCodeSerialConsoleAccessDisabledException = "SerialConsoleAccessDisabledException"

    // ErrCodeSerialConsoleSessionLimitExceededException for service response error code
    // "SerialConsoleSessionLimitExceededException".
    //
    // The instance currently has 1 active serial console session. Only 1 session
    // is supported at a time.
    ErrCodeSerialConsoleSessionLimitExceededException = "SerialConsoleSessionLimitExceededException"

    // ErrCodeSerialConsoleSessionUnavailableException for service response error code
    // "SerialConsoleSessionUnavailableException".
    //
    // Unable to start a serial console session. Please try again.
    ErrCodeSerialConsoleSessionUnavailableException = "SerialConsoleSessionUnavailableException"

    // ErrCodeSerialConsoleSessionUnsupportedException for service response error code
    // "SerialConsoleSessionUnsupportedException".
    //
    // Your instance's BIOS version is unsupported for serial console connection.
    // Reboot your instance to update its BIOS, and then try again to connect.
    ErrCodeSerialConsoleSessionUnsupportedException = "SerialConsoleSessionUnsupportedException"

    // ErrCodeServiceException for service response error code
    // "ServiceException".
    //
    // The service encountered an error. Follow the instructions in the error message
    // and try again.
    ErrCodeServiceException = "ServiceException"

    // ErrCodeThrottlingException for service response error code
    // "ThrottlingException".
    //
    // 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.
    ErrCodeThrottlingException = "ThrottlingException"
)
const (
    ServiceName = "EC2 Instance Connect" // Name of service.
    EndpointsID = "ec2-instance-connect" // ID to lookup a service endpoint with.
    ServiceID   = "EC2 Instance Connect" // ServiceID is a unique identifier of a specific service.
)

Service information constants

type AuthException

type AuthException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

Either your AWS credentials are not valid or you do not have access to the EC2 instance.

func (*AuthException) Code

func (s *AuthException) Code() string

Code returns the exception type name.

func (*AuthException) Error

func (s *AuthException) Error() string

func (AuthException) GoString

func (s AuthException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*AuthException) Message

func (s *AuthException) Message() string

Message returns the exception's message.

func (*AuthException) OrigErr

func (s *AuthException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*AuthException) RequestID

func (s *AuthException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*AuthException) StatusCode

func (s *AuthException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (AuthException) String

func (s AuthException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type EC2InstanceConnect

type EC2InstanceConnect struct {
    *client.Client
}

EC2InstanceConnect provides the API operation methods for making requests to AWS EC2 Instance Connect. See this package's package overview docs for details on the service.

EC2InstanceConnect methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2InstanceConnect

New creates a new instance of the EC2InstanceConnect client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

mySession := session.Must(session.NewSession())

// Create a EC2InstanceConnect client from just a session.
svc := ec2instanceconnect.New(mySession)

// Create a EC2InstanceConnect client with additional configuration
svc := ec2instanceconnect.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*EC2InstanceConnect) SendSSHPublicKey

func (c *EC2InstanceConnect) SendSSHPublicKey(input *SendSSHPublicKeyInput) (*SendSSHPublicKeyOutput, error)

SendSSHPublicKey API operation for AWS EC2 Instance Connect.

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 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html) in the Amazon EC2 User Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS EC2 Instance Connect's API operation SendSSHPublicKey for usage and error information.

Returned Error Types:

  • AuthException Either your AWS credentials are not valid or you do not have access to the EC2 instance.

  • InvalidArgsException One of the parameters is not valid.

  • ServiceException The service encountered an error. Follow the instructions in the error message and try again.

  • ThrottlingException 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.

  • EC2InstanceNotFoundException The specified instance was not found.

  • EC2InstanceStateInvalidException 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.

  • EC2InstanceUnavailableException The instance is currently unavailable. Wait a few minutes and try again.

See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/SendSSHPublicKey

Example (Shared00)

To push an SSH key to an EC2 instance The following example pushes a sample SSH public key to the EC2 instance i-abcd1234 in AZ us-west-2b for use by the instance OS user ec2-user.

Code:

package ec2instanceconnect_test

import (
    "fmt"
    "strings"
    "time"

    "github.com/aws/aws-sdk-go/aws"
    "github.com/aws/aws-sdk-go/aws/awserr"
    "github.com/aws/aws-sdk-go/aws/session"
    "github.com/aws/aws-sdk-go/service/ec2instanceconnect"
)

var _ time.Duration
var _ strings.Reader
var _ aws.Config

func parseTime(layout, value string) *time.Time {
    t, err := time.Parse(layout, value)
    if err != nil {
        panic(err)
    }
    return &t
}

// To push an SSH key to an EC2 instance
// The following example pushes a sample SSH public key to the EC2 instance i-abcd1234
// in AZ us-west-2b for use by the instance OS user ec2-user.
func ExampleEC2InstanceConnect_SendSSHPublicKey_shared00() {
    svc := ec2instanceconnect.New(session.New())
    input := &ec2instanceconnect.SendSSHPublicKeyInput{
        AvailabilityZone: aws.String("us-west-2a"),
        InstanceId:       aws.String("i-abcd1234"),
        InstanceOSUser:   aws.String("ec2-user"),
        SSHPublicKey:     aws.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3FlHqj2eqCdrGHuA6dRjfZXQ4HX5lXEIRHaNbxEwE5Te7xNF7StwhrDtiV7IdT5fDqbRyGw/szPj3xGkNTVoElCZ2dDFb2qYZ1WLIpZwj/UhO9l2mgfjR56UojjQut5Jvn2KZ1OcyrNO0J83kCaJCV7JoVbXY79FBMUccYNY45zmv9+1FMCfY6i2jdIhwR6+yLk8oubL8lIPyq7X+6b9S0yKCkB7Peml1DvghlybpAIUrC9vofHt6XP4V1i0bImw1IlljQS+DUmULRFSccATDscCX9ajnj7Crhm0HAZC0tBPXpFdHkPwL3yzYo546SCS9LKEwz62ymxxbL9k7h09t"),
    }

    result, err := svc.SendSSHPublicKey(input)
    if err != nil {
        if aerr, ok := err.(awserr.Error); ok {
            switch aerr.Code() {
            case ec2instanceconnect.ErrCodeAuthException:
                fmt.Println(ec2instanceconnect.ErrCodeAuthException, aerr.Error())
            case ec2instanceconnect.ErrCodeInvalidArgsException:
                fmt.Println(ec2instanceconnect.ErrCodeInvalidArgsException, aerr.Error())
            case ec2instanceconnect.ErrCodeServiceException:
                fmt.Println(ec2instanceconnect.ErrCodeServiceException, aerr.Error())
            case ec2instanceconnect.ErrCodeThrottlingException:
                fmt.Println(ec2instanceconnect.ErrCodeThrottlingException, aerr.Error())
            case ec2instanceconnect.ErrCodeEC2InstanceNotFoundException:
                fmt.Println(ec2instanceconnect.ErrCodeEC2InstanceNotFoundException, aerr.Error())
            case ec2instanceconnect.ErrCodeEC2InstanceStateInvalidException:
                fmt.Println(ec2instanceconnect.ErrCodeEC2InstanceStateInvalidException, aerr.Error())
            case ec2instanceconnect.ErrCodeEC2InstanceUnavailableException:
                fmt.Println(ec2instanceconnect.ErrCodeEC2InstanceUnavailableException, aerr.Error())
            default:
                fmt.Println(aerr.Error())
            }
        } else {
            // Print the error, cast err to awserr.Error to get the Code and
            // Message from an error.
            fmt.Println(err.Error())
        }
        return
    }

    fmt.Println(result)
}

func (*EC2InstanceConnect) SendSSHPublicKeyRequest

func (c *EC2InstanceConnect) SendSSHPublicKeyRequest(input *SendSSHPublicKeyInput) (req *request.Request, output *SendSSHPublicKeyOutput)

SendSSHPublicKeyRequest generates a "aws/request.Request" representing the client's request for the SendSSHPublicKey operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See SendSSHPublicKey for more information on using the SendSSHPublicKey API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the SendSSHPublicKeyRequest method.
req, resp := client.SendSSHPublicKeyRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/SendSSHPublicKey

func (*EC2InstanceConnect) SendSSHPublicKeyWithContext

func (c *EC2InstanceConnect) SendSSHPublicKeyWithContext(ctx aws.Context, input *SendSSHPublicKeyInput, opts ...request.Option) (*SendSSHPublicKeyOutput, error)

SendSSHPublicKeyWithContext is the same as SendSSHPublicKey with the addition of the ability to pass a context and additional request options.

See SendSSHPublicKey for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*EC2InstanceConnect) SendSerialConsoleSSHPublicKey

func (c *EC2InstanceConnect) SendSerialConsoleSSHPublicKey(input *SendSerialConsoleSSHPublicKeyInput) (*SendSerialConsoleSSHPublicKeyOutput, error)

SendSerialConsoleSSHPublicKey API operation for AWS EC2 Instance Connect.

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 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-serial-console.html) in the Amazon EC2 User Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS EC2 Instance Connect's API operation SendSerialConsoleSSHPublicKey for usage and error information.

Returned Error Types:

  • AuthException Either your AWS credentials are not valid or you do not have access to the EC2 instance.

  • SerialConsoleAccessDisabledException Your account is not authorized to use the EC2 Serial Console. To authorize your account, run the EnableSerialConsoleAccess API. For more information, see EnableSerialConsoleAccess (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EnableSerialConsoleAccess.html) in the Amazon EC2 API Reference.

  • InvalidArgsException One of the parameters is not valid.

  • ServiceException The service encountered an error. Follow the instructions in the error message and try again.

  • ThrottlingException 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.

  • EC2InstanceNotFoundException The specified instance was not found.

  • EC2InstanceTypeInvalidException The instance type is not supported for connecting via the serial console. Only Nitro instance types are currently supported.

  • SerialConsoleSessionLimitExceededException The instance currently has 1 active serial console session. Only 1 session is supported at a time.

  • SerialConsoleSessionUnavailableException Unable to start a serial console session. Please try again.

  • EC2InstanceStateInvalidException 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.

  • EC2InstanceUnavailableException The instance is currently unavailable. Wait a few minutes and try again.

  • SerialConsoleSessionUnsupportedException Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect.

See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/SendSerialConsoleSSHPublicKey

func (*EC2InstanceConnect) SendSerialConsoleSSHPublicKeyRequest

func (c *EC2InstanceConnect) SendSerialConsoleSSHPublicKeyRequest(input *SendSerialConsoleSSHPublicKeyInput) (req *request.Request, output *SendSerialConsoleSSHPublicKeyOutput)

SendSerialConsoleSSHPublicKeyRequest generates a "aws/request.Request" representing the client's request for the SendSerialConsoleSSHPublicKey operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See SendSerialConsoleSSHPublicKey for more information on using the SendSerialConsoleSSHPublicKey API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the SendSerialConsoleSSHPublicKeyRequest method.
req, resp := client.SendSerialConsoleSSHPublicKeyRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/SendSerialConsoleSSHPublicKey

func (*EC2InstanceConnect) SendSerialConsoleSSHPublicKeyWithContext

func (c *EC2InstanceConnect) SendSerialConsoleSSHPublicKeyWithContext(ctx aws.Context, input *SendSerialConsoleSSHPublicKeyInput, opts ...request.Option) (*SendSerialConsoleSSHPublicKeyOutput, error)

SendSerialConsoleSSHPublicKeyWithContext is the same as SendSerialConsoleSSHPublicKey with the addition of the ability to pass a context and additional request options.

See SendSerialConsoleSSHPublicKey for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

type EC2InstanceNotFoundException

type EC2InstanceNotFoundException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

The specified instance was not found.

func (*EC2InstanceNotFoundException) Code

func (s *EC2InstanceNotFoundException) Code() string

Code returns the exception type name.

func (*EC2InstanceNotFoundException) Error

func (s *EC2InstanceNotFoundException) Error() string

func (EC2InstanceNotFoundException) GoString

func (s EC2InstanceNotFoundException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*EC2InstanceNotFoundException) Message

func (s *EC2InstanceNotFoundException) Message() string

Message returns the exception's message.

func (*EC2InstanceNotFoundException) OrigErr

func (s *EC2InstanceNotFoundException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*EC2InstanceNotFoundException) RequestID

func (s *EC2InstanceNotFoundException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*EC2InstanceNotFoundException) StatusCode

func (s *EC2InstanceNotFoundException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (EC2InstanceNotFoundException) String

func (s EC2InstanceNotFoundException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type EC2InstanceStateInvalidException

type EC2InstanceStateInvalidException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

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.

func (*EC2InstanceStateInvalidException) Code

func (s *EC2InstanceStateInvalidException) Code() string

Code returns the exception type name.

func (*EC2InstanceStateInvalidException) Error

func (s *EC2InstanceStateInvalidException) Error() string

func (EC2InstanceStateInvalidException) GoString

func (s EC2InstanceStateInvalidException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*EC2InstanceStateInvalidException) Message

func (s *EC2InstanceStateInvalidException) Message() string

Message returns the exception's message.

func (*EC2InstanceStateInvalidException) OrigErr

func (s *EC2InstanceStateInvalidException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*EC2InstanceStateInvalidException) RequestID

func (s *EC2InstanceStateInvalidException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*EC2InstanceStateInvalidException) StatusCode

func (s *EC2InstanceStateInvalidException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (EC2InstanceStateInvalidException) String

func (s EC2InstanceStateInvalidException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type EC2InstanceTypeInvalidException

type EC2InstanceTypeInvalidException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

The instance type is not supported for connecting via the serial console. Only Nitro instance types are currently supported.

func (*EC2InstanceTypeInvalidException) Code

func (s *EC2InstanceTypeInvalidException) Code() string

Code returns the exception type name.

func (*EC2InstanceTypeInvalidException) Error

func (s *EC2InstanceTypeInvalidException) Error() string

func (EC2InstanceTypeInvalidException) GoString

func (s EC2InstanceTypeInvalidException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*EC2InstanceTypeInvalidException) Message

func (s *EC2InstanceTypeInvalidException) Message() string

Message returns the exception's message.

func (*EC2InstanceTypeInvalidException) OrigErr

func (s *EC2InstanceTypeInvalidException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*EC2InstanceTypeInvalidException) RequestID

func (s *EC2InstanceTypeInvalidException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*EC2InstanceTypeInvalidException) StatusCode

func (s *EC2InstanceTypeInvalidException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (EC2InstanceTypeInvalidException) String

func (s EC2InstanceTypeInvalidException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type EC2InstanceUnavailableException

type EC2InstanceUnavailableException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

The instance is currently unavailable. Wait a few minutes and try again.

func (*EC2InstanceUnavailableException) Code

func (s *EC2InstanceUnavailableException) Code() string

Code returns the exception type name.

func (*EC2InstanceUnavailableException) Error

func (s *EC2InstanceUnavailableException) Error() string

func (EC2InstanceUnavailableException) GoString

func (s EC2InstanceUnavailableException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*EC2InstanceUnavailableException) Message

func (s *EC2InstanceUnavailableException) Message() string

Message returns the exception's message.

func (*EC2InstanceUnavailableException) OrigErr

func (s *EC2InstanceUnavailableException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*EC2InstanceUnavailableException) RequestID

func (s *EC2InstanceUnavailableException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*EC2InstanceUnavailableException) StatusCode

func (s *EC2InstanceUnavailableException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (EC2InstanceUnavailableException) String

func (s EC2InstanceUnavailableException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type InvalidArgsException

type InvalidArgsException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

One of the parameters is not valid.

func (*InvalidArgsException) Code

func (s *InvalidArgsException) Code() string

Code returns the exception type name.

func (*InvalidArgsException) Error

func (s *InvalidArgsException) Error() string

func (InvalidArgsException) GoString

func (s InvalidArgsException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*InvalidArgsException) Message

func (s *InvalidArgsException) Message() string

Message returns the exception's message.

func (*InvalidArgsException) OrigErr

func (s *InvalidArgsException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidArgsException) RequestID

func (s *InvalidArgsException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidArgsException) StatusCode

func (s *InvalidArgsException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidArgsException) String

func (s InvalidArgsException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type SendSSHPublicKeyInput

type SendSSHPublicKeyInput struct {

    // The Availability Zone in which the EC2 instance was launched.
    AvailabilityZone *string `min:"6" type:"string"`

    // The ID of the EC2 instance.
    //
    // InstanceId is a required field
    InstanceId *string `min:"10" type:"string" required:"true"`

    // The OS user on the EC2 instance for whom the key can be used to authenticate.
    //
    // InstanceOSUser is a required field
    InstanceOSUser *string `min:"1" type:"string" required:"true"`

    // The public key material. To use the public key, you must have the matching
    // private key.
    //
    // SSHPublicKey is a required field
    SSHPublicKey *string `min:"80" type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (SendSSHPublicKeyInput) GoString

func (s SendSSHPublicKeyInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SendSSHPublicKeyInput) SetAvailabilityZone

func (s *SendSSHPublicKeyInput) SetAvailabilityZone(v string) *SendSSHPublicKeyInput

SetAvailabilityZone sets the AvailabilityZone field's value.

func (*SendSSHPublicKeyInput) SetInstanceId

func (s *SendSSHPublicKeyInput) SetInstanceId(v string) *SendSSHPublicKeyInput

SetInstanceId sets the InstanceId field's value.

func (*SendSSHPublicKeyInput) SetInstanceOSUser

func (s *SendSSHPublicKeyInput) SetInstanceOSUser(v string) *SendSSHPublicKeyInput

SetInstanceOSUser sets the InstanceOSUser field's value.

func (*SendSSHPublicKeyInput) SetSSHPublicKey

func (s *SendSSHPublicKeyInput) SetSSHPublicKey(v string) *SendSSHPublicKeyInput

SetSSHPublicKey sets the SSHPublicKey field's value.

func (SendSSHPublicKeyInput) String

func (s SendSSHPublicKeyInput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SendSSHPublicKeyInput) Validate

func (s *SendSSHPublicKeyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type SendSSHPublicKeyOutput

type SendSSHPublicKeyOutput struct {

    // The ID of the request. Please provide this ID when contacting AWS Support
    // for assistance.
    RequestId *string `type:"string"`

    // Is true if the request succeeds and an error otherwise.
    Success *bool `type:"boolean"`
    // contains filtered or unexported fields
}

func (SendSSHPublicKeyOutput) GoString

func (s SendSSHPublicKeyOutput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SendSSHPublicKeyOutput) SetRequestId

func (s *SendSSHPublicKeyOutput) SetRequestId(v string) *SendSSHPublicKeyOutput

SetRequestId sets the RequestId field's value.

func (*SendSSHPublicKeyOutput) SetSuccess

func (s *SendSSHPublicKeyOutput) SetSuccess(v bool) *SendSSHPublicKeyOutput

SetSuccess sets the Success field's value.

func (SendSSHPublicKeyOutput) String

func (s SendSSHPublicKeyOutput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type SendSerialConsoleSSHPublicKeyInput

type SendSerialConsoleSSHPublicKeyInput struct {

    // The ID of the EC2 instance.
    //
    // InstanceId is a required field
    InstanceId *string `min:"10" type:"string" required:"true"`

    // The public key material. To use the public key, you must have the matching
    // private key. For information about the supported key formats and lengths,
    // see Requirements for key pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#how-to-generate-your-own-key-and-import-it-to-aws)
    // in the Amazon EC2 User Guide.
    //
    // SSHPublicKey is a required field
    SSHPublicKey *string `min:"80" type:"string" required:"true"`

    // The serial port of the EC2 instance. Currently only port 0 is supported.
    //
    // Default: 0
    SerialPort *int64 `type:"integer"`
    // contains filtered or unexported fields
}

func (SendSerialConsoleSSHPublicKeyInput) GoString

func (s SendSerialConsoleSSHPublicKeyInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SendSerialConsoleSSHPublicKeyInput) SetInstanceId

func (s *SendSerialConsoleSSHPublicKeyInput) SetInstanceId(v string) *SendSerialConsoleSSHPublicKeyInput

SetInstanceId sets the InstanceId field's value.

func (*SendSerialConsoleSSHPublicKeyInput) SetSSHPublicKey

func (s *SendSerialConsoleSSHPublicKeyInput) SetSSHPublicKey(v string) *SendSerialConsoleSSHPublicKeyInput

SetSSHPublicKey sets the SSHPublicKey field's value.

func (*SendSerialConsoleSSHPublicKeyInput) SetSerialPort

func (s *SendSerialConsoleSSHPublicKeyInput) SetSerialPort(v int64) *SendSerialConsoleSSHPublicKeyInput

SetSerialPort sets the SerialPort field's value.

func (SendSerialConsoleSSHPublicKeyInput) String

func (s SendSerialConsoleSSHPublicKeyInput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SendSerialConsoleSSHPublicKeyInput) Validate

func (s *SendSerialConsoleSSHPublicKeyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type SendSerialConsoleSSHPublicKeyOutput

type SendSerialConsoleSSHPublicKeyOutput struct {

    // The ID of the request. Please provide this ID when contacting AWS Support
    // for assistance.
    RequestId *string `type:"string"`

    // Is true if the request succeeds and an error otherwise.
    Success *bool `type:"boolean"`
    // contains filtered or unexported fields
}

func (SendSerialConsoleSSHPublicKeyOutput) GoString

func (s SendSerialConsoleSSHPublicKeyOutput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SendSerialConsoleSSHPublicKeyOutput) SetRequestId

func (s *SendSerialConsoleSSHPublicKeyOutput) SetRequestId(v string) *SendSerialConsoleSSHPublicKeyOutput

SetRequestId sets the RequestId field's value.

func (*SendSerialConsoleSSHPublicKeyOutput) SetSuccess

func (s *SendSerialConsoleSSHPublicKeyOutput) SetSuccess(v bool) *SendSerialConsoleSSHPublicKeyOutput

SetSuccess sets the Success field's value.

func (SendSerialConsoleSSHPublicKeyOutput) String

func (s SendSerialConsoleSSHPublicKeyOutput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type SerialConsoleAccessDisabledException

type SerialConsoleAccessDisabledException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

Your account is not authorized to use the EC2 Serial Console. To authorize your account, run the EnableSerialConsoleAccess API. For more information, see EnableSerialConsoleAccess (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EnableSerialConsoleAccess.html) in the Amazon EC2 API Reference.

func (*SerialConsoleAccessDisabledException) Code

func (s *SerialConsoleAccessDisabledException) Code() string

Code returns the exception type name.

func (*SerialConsoleAccessDisabledException) Error

func (s *SerialConsoleAccessDisabledException) Error() string

func (SerialConsoleAccessDisabledException) GoString

func (s SerialConsoleAccessDisabledException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SerialConsoleAccessDisabledException) Message

func (s *SerialConsoleAccessDisabledException) Message() string

Message returns the exception's message.

func (*SerialConsoleAccessDisabledException) OrigErr

func (s *SerialConsoleAccessDisabledException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*SerialConsoleAccessDisabledException) RequestID

func (s *SerialConsoleAccessDisabledException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*SerialConsoleAccessDisabledException) StatusCode

func (s *SerialConsoleAccessDisabledException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (SerialConsoleAccessDisabledException) String

func (s SerialConsoleAccessDisabledException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type SerialConsoleSessionLimitExceededException

type SerialConsoleSessionLimitExceededException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

The instance currently has 1 active serial console session. Only 1 session is supported at a time.

func (*SerialConsoleSessionLimitExceededException) Code

func (s *SerialConsoleSessionLimitExceededException) Code() string

Code returns the exception type name.

func (*SerialConsoleSessionLimitExceededException) Error

func (s *SerialConsoleSessionLimitExceededException) Error() string

func (SerialConsoleSessionLimitExceededException) GoString

func (s SerialConsoleSessionLimitExceededException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SerialConsoleSessionLimitExceededException) Message

func (s *SerialConsoleSessionLimitExceededException) Message() string

Message returns the exception's message.

func (*SerialConsoleSessionLimitExceededException) OrigErr

func (s *SerialConsoleSessionLimitExceededException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*SerialConsoleSessionLimitExceededException) RequestID

func (s *SerialConsoleSessionLimitExceededException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*SerialConsoleSessionLimitExceededException) StatusCode

func (s *SerialConsoleSessionLimitExceededException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (SerialConsoleSessionLimitExceededException) String

func (s SerialConsoleSessionLimitExceededException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type SerialConsoleSessionUnavailableException

type SerialConsoleSessionUnavailableException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

Unable to start a serial console session. Please try again.

func (*SerialConsoleSessionUnavailableException) Code

func (s *SerialConsoleSessionUnavailableException) Code() string

Code returns the exception type name.

func (*SerialConsoleSessionUnavailableException) Error

func (s *SerialConsoleSessionUnavailableException) Error() string

func (SerialConsoleSessionUnavailableException) GoString

func (s SerialConsoleSessionUnavailableException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SerialConsoleSessionUnavailableException) Message

func (s *SerialConsoleSessionUnavailableException) Message() string

Message returns the exception's message.

func (*SerialConsoleSessionUnavailableException) OrigErr

func (s *SerialConsoleSessionUnavailableException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*SerialConsoleSessionUnavailableException) RequestID

func (s *SerialConsoleSessionUnavailableException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*SerialConsoleSessionUnavailableException) StatusCode

func (s *SerialConsoleSessionUnavailableException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (SerialConsoleSessionUnavailableException) String

func (s SerialConsoleSessionUnavailableException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type SerialConsoleSessionUnsupportedException

type SerialConsoleSessionUnsupportedException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

Your instance's BIOS version is unsupported for serial console connection. Reboot your instance to update its BIOS, and then try again to connect.

func (*SerialConsoleSessionUnsupportedException) Code

func (s *SerialConsoleSessionUnsupportedException) Code() string

Code returns the exception type name.

func (*SerialConsoleSessionUnsupportedException) Error

func (s *SerialConsoleSessionUnsupportedException) Error() string

func (SerialConsoleSessionUnsupportedException) GoString

func (s SerialConsoleSessionUnsupportedException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*SerialConsoleSessionUnsupportedException) Message

func (s *SerialConsoleSessionUnsupportedException) Message() string

Message returns the exception's message.

func (*SerialConsoleSessionUnsupportedException) OrigErr

func (s *SerialConsoleSessionUnsupportedException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*SerialConsoleSessionUnsupportedException) RequestID

func (s *SerialConsoleSessionUnsupportedException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*SerialConsoleSessionUnsupportedException) StatusCode

func (s *SerialConsoleSessionUnsupportedException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (SerialConsoleSessionUnsupportedException) String

func (s SerialConsoleSessionUnsupportedException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type ServiceException

type ServiceException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

The service encountered an error. Follow the instructions in the error message and try again.

func (*ServiceException) Code

func (s *ServiceException) Code() string

Code returns the exception type name.

func (*ServiceException) Error

func (s *ServiceException) Error() string

func (ServiceException) GoString

func (s ServiceException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*ServiceException) Message

func (s *ServiceException) Message() string

Message returns the exception's message.

func (*ServiceException) OrigErr

func (s *ServiceException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*ServiceException) RequestID

func (s *ServiceException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*ServiceException) StatusCode

func (s *ServiceException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (ServiceException) String

func (s ServiceException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type ThrottlingException

type ThrottlingException struct {
    RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

    Message_ *string `locationName:"Message" type:"string"`
    // contains filtered or unexported fields
}

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.

func (*ThrottlingException) Code

func (s *ThrottlingException) Code() string

Code returns the exception type name.

func (*ThrottlingException) Error

func (s *ThrottlingException) Error() string

func (ThrottlingException) GoString

func (s ThrottlingException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*ThrottlingException) Message

func (s *ThrottlingException) Message() string

Message returns the exception's message.

func (*ThrottlingException) OrigErr

func (s *ThrottlingException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*ThrottlingException) RequestID

func (s *ThrottlingException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*ThrottlingException) StatusCode

func (s *ThrottlingException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (ThrottlingException) String

func (s ThrottlingException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".