ec2instanceconnect

package
v1.42.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package ec2instanceconnect provides the client and types for making API requests to AWS 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.

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

Index

Examples

Constants

View Source
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"

	// 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"
)
View Source
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

Variables

This section is empty.

Functions

This section is empty.

Types

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

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 generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package main

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 main() {
	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)
}
Output:

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

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.

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

Code returns the exception type name.

func (*EC2InstanceNotFoundException) Error

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

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 added in v1.42.9

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 added in v1.42.9

Code returns the exception type name.

func (*EC2InstanceStateInvalidException) Error added in v1.42.9

func (EC2InstanceStateInvalidException) GoString added in v1.42.9

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 added in v1.42.9

Message returns the exception's message.

func (*EC2InstanceStateInvalidException) OrigErr added in v1.42.9

OrigErr always returns nil, satisfies awserr.Error interface.

func (*EC2InstanceStateInvalidException) RequestID added in v1.42.9

RequestID returns the service's response RequestID for request.

func (*EC2InstanceStateInvalidException) StatusCode added in v1.42.9

func (s *EC2InstanceStateInvalidException) StatusCode() int

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

func (EC2InstanceStateInvalidException) String added in v1.42.9

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

Code returns the exception type name.

func (*EC2InstanceTypeInvalidException) Error

func (EC2InstanceTypeInvalidException) GoString

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

Message returns the exception's message.

func (*EC2InstanceTypeInvalidException) OrigErr

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

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 added in v1.42.9

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 added in v1.42.9

Code returns the exception type name.

func (*EC2InstanceUnavailableException) Error added in v1.42.9

func (EC2InstanceUnavailableException) GoString added in v1.42.9

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 added in v1.42.9

Message returns the exception's message.

func (*EC2InstanceUnavailableException) OrigErr added in v1.42.9

OrigErr always returns nil, satisfies awserr.Error interface.

func (*EC2InstanceUnavailableException) RequestID added in v1.42.9

func (s *EC2InstanceUnavailableException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*EC2InstanceUnavailableException) StatusCode added in v1.42.9

func (s *EC2InstanceUnavailableException) StatusCode() int

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

func (EC2InstanceUnavailableException) String added in v1.42.9

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

SetRequestId sets the RequestId field's value.

func (*SendSSHPublicKeyOutput) SetSuccess

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

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

SetInstanceId sets the InstanceId field's value.

func (*SendSerialConsoleSSHPublicKeyInput) SetSSHPublicKey

SetSSHPublicKey sets the SSHPublicKey field's value.

func (*SendSerialConsoleSSHPublicKeyInput) SetSerialPort

SetSerialPort sets the SerialPort field's value.

func (SendSerialConsoleSSHPublicKeyInput) 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

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

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

SetRequestId sets the RequestId field's value.

func (*SendSerialConsoleSSHPublicKeyOutput) SetSuccess

SetSuccess sets the Success field's value.

func (SendSerialConsoleSSHPublicKeyOutput) 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

Code returns the exception type name.

func (*SerialConsoleAccessDisabledException) Error

func (SerialConsoleAccessDisabledException) GoString

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

Message returns the exception's message.

func (*SerialConsoleAccessDisabledException) OrigErr

OrigErr always returns nil, satisfies awserr.Error interface.

func (*SerialConsoleAccessDisabledException) RequestID

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

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

Code returns the exception type name.

func (*SerialConsoleSessionLimitExceededException) Error

func (SerialConsoleSessionLimitExceededException) GoString

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

Message returns the exception's message.

func (*SerialConsoleSessionLimitExceededException) OrigErr

OrigErr always returns nil, satisfies awserr.Error interface.

func (*SerialConsoleSessionLimitExceededException) RequestID

RequestID returns the service's response RequestID for request.

func (*SerialConsoleSessionLimitExceededException) StatusCode

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

func (SerialConsoleSessionLimitExceededException) 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

Code returns the exception type name.

func (*SerialConsoleSessionUnavailableException) Error

func (SerialConsoleSessionUnavailableException) GoString

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

Message returns the exception's message.

func (*SerialConsoleSessionUnavailableException) OrigErr

OrigErr always returns nil, satisfies awserr.Error interface.

func (*SerialConsoleSessionUnavailableException) RequestID

RequestID returns the service's response RequestID for request.

func (*SerialConsoleSessionUnavailableException) StatusCode

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

func (SerialConsoleSessionUnavailableException) 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".

Directories

Path Synopsis
Package ec2instanceconnectiface provides an interface to enable mocking the AWS EC2 Instance Connect service client for testing your code.
Package ec2instanceconnectiface provides an interface to enable mocking the AWS EC2 Instance Connect service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL