AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

Instance

import "github.com/aws/aws-sdk-go/service/ec2"

type Instance struct { AmiLaunchIndex *int64 `locationName:"amiLaunchIndex" type:"integer"` Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` CapacityReservationSpecification *CapacityReservationSpecificationResponse `locationName:"capacityReservationSpecification" type:"structure"` ClientToken *string `locationName:"clientToken" type:"string"` CpuOptions *CpuOptions `locationName:"cpuOptions" type:"structure"` EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` ElasticGpuAssociations []*ElasticGpuAssociation `locationName:"elasticGpuAssociationSet" locationNameList:"item" type:"list"` ElasticInferenceAcceleratorAssociations []*ElasticInferenceAcceleratorAssociation `locationName:"elasticInferenceAcceleratorAssociationSet" locationNameList:"item" type:"list"` EnaSupport *bool `locationName:"enaSupport" type:"boolean"` HibernationOptions *HibernationOptions `locationName:"hibernationOptions" type:"structure"` Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` ImageId *string `locationName:"imageId" type:"string"` InstanceId *string `locationName:"instanceId" type:"string"` InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string" enum:"InstanceLifecycleType"` InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` KernelId *string `locationName:"kernelId" type:"string"` KeyName *string `locationName:"keyName" type:"string"` LaunchTime *time.Time `locationName:"launchTime" type:"timestamp"` Licenses []*LicenseConfiguration `locationName:"licenseSet" locationNameList:"item" type:"list"` Monitoring *Monitoring `locationName:"monitoring" type:"structure"` NetworkInterfaces []*InstanceNetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` Placement *Placement `locationName:"placement" type:"structure"` Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` PrivateDnsName *string `locationName:"privateDnsName" type:"string"` PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` PublicDnsName *string `locationName:"dnsName" type:"string"` PublicIpAddress *string `locationName:"ipAddress" type:"string"` RamdiskId *string `locationName:"ramdiskId" type:"string"` RootDeviceName *string `locationName:"rootDeviceName" type:"string"` RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"` SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` State *InstanceState `locationName:"instanceState" type:"structure"` StateReason *StateReason `locationName:"stateReason" type:"structure"` StateTransitionReason *string `locationName:"reason" type:"string"` SubnetId *string `locationName:"subnetId" type:"string"` Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"` VpcId *string `locationName:"vpcId" type:"string"` }

Describes an instance.

AmiLaunchIndex

Type: *int64

The AMI launch index, which can be used to find this instance in the launch group.

Architecture

Type: *string

The architecture of the image.

BlockDeviceMappings

Describes a block device mapping.

CapacityReservationId

Type: *string

The ID of the Capacity Reservation.

CapacityReservationSpecification

Describes the instance's Capacity Reservation targeting preferences. The action returns the capacityReservationPreference response element if the instance is configured to run in On-Demand capacity, or if it is configured in run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone). The action returns the capacityReservationTarget response element if the instance explicily targets a specific Capacity Reservation.

ClientToken

Type: *string

The idempotency token you provided when you launched the instance, if applicable.

CpuOptions

The CPU options for the instance.

EbsOptimized

Type: *bool

Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

ElasticGpuAssociations

Describes the association between an instance and an Elastic Graphics accelerator.

ElasticInferenceAcceleratorAssociations

Describes the association between an instance and an elastic inference accelerator.

EnaSupport

Type: *bool

Specifies whether enhanced networking with ENA is enabled.

HibernationOptions

Indicates whether your instance is configured for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). Hibernation is currently supported only for Amazon Linux. For more information, see Hibernate Your Instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) in the Amazon Elastic Compute Cloud User Guide.

Hypervisor

Type: *string

The hypervisor type of the instance.

IamInstanceProfile

Describes an IAM instance profile.

ImageId

Type: *string

The ID of the AMI used to launch the instance.

InstanceId

Type: *string

The ID of the instance.

InstanceLifecycle

Type: *string

Indicates whether this is a Spot Instance or a Scheduled Instance.

InstanceType

Type: *string

The instance type.

KernelId

Type: *string

The kernel associated with this instance, if applicable.

KeyName

Type: *string

The name of the key pair, if this instance was launched with an associated key pair.

LaunchTime

Type: *time.Time

The time the instance was launched.

Licenses

Describes a license configuration.

Monitoring

Describes the monitoring of an instance.

NetworkInterfaces

Describes a network interface.

Placement

Describes the placement of an instance.

Platform

Type: *string

The value is Windows for Windows instances; otherwise blank.

PrivateDnsName

Type: *string

(IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

[EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

PrivateIpAddress

Type: *string

The private IPv4 address assigned to the instance.

ProductCodes

Describes a product code.

PublicDnsName

Type: *string

(IPv4 only) The public DNS name assigned to the instance. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

PublicIpAddress

Type: *string

The public IPv4 address assigned to the instance, if applicable.

RamdiskId

Type: *string

The RAM disk associated with this instance, if applicable.

RootDeviceName

Type: *string

The device name of the root device volume (for example, /dev/sda1).

RootDeviceType

Type: *string

The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

SecurityGroups

Describes a security group.

SourceDestCheck

Type: *bool

Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) in the Amazon Virtual Private Cloud User Guide.

SpotInstanceRequestId

Type: *string

If the request is a Spot Instance request, the ID of the request.

SriovNetSupport

Type: *string

Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

State

Describes the current state of an instance.

StateReason

Describes a state change.

StateTransitionReason

Type: *string

The reason for the most recent state transition. This might be an empty string.

SubnetId

Type: *string

[EC2-VPC] The ID of the subnet in which the instance is running.

Tags

Describes a tag.

VirtualizationType

Type: *string

The virtualization type of the instance.

VpcId

Type: *string

[EC2-VPC] The ID of the VPC in which the instance is running.

Method

GoString

func (s Instance) GoString() string

GoString returns the string representation

SetAmiLaunchIndex

func (s *Instance) SetAmiLaunchIndex(v int64) *Instance

SetAmiLaunchIndex sets the AmiLaunchIndex field's value.

SetArchitecture

func (s *Instance) SetArchitecture(v string) *Instance

SetArchitecture sets the Architecture field's value.

SetBlockDeviceMappings

func (s *Instance) SetBlockDeviceMappings(v []*InstanceBlockDeviceMapping) *Instance

SetBlockDeviceMappings sets the BlockDeviceMappings field's value.

SetCapacityReservationId

func (s *Instance) SetCapacityReservationId(v string) *Instance

SetCapacityReservationId sets the CapacityReservationId field's value.

SetCapacityReservationSpecification

func (s *Instance) SetCapacityReservationSpecification(v *CapacityReservationSpecificationResponse) *Instance

SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value.

SetClientToken

func (s *Instance) SetClientToken(v string) *Instance

SetClientToken sets the ClientToken field's value.

SetCpuOptions

func (s *Instance) SetCpuOptions(v *CpuOptions) *Instance

SetCpuOptions sets the CpuOptions field's value.

SetEbsOptimized

func (s *Instance) SetEbsOptimized(v bool) *Instance

SetEbsOptimized sets the EbsOptimized field's value.

SetElasticGpuAssociations

func (s *Instance) SetElasticGpuAssociations(v []*ElasticGpuAssociation) *Instance

SetElasticGpuAssociations sets the ElasticGpuAssociations field's value.

SetElasticInferenceAcceleratorAssociations

func (s *Instance) SetElasticInferenceAcceleratorAssociations(v []*ElasticInferenceAcceleratorAssociation) *Instance

SetElasticInferenceAcceleratorAssociations sets the ElasticInferenceAcceleratorAssociations field's value.

SetEnaSupport

func (s *Instance) SetEnaSupport(v bool) *Instance

SetEnaSupport sets the EnaSupport field's value.

SetHibernationOptions

func (s *Instance) SetHibernationOptions(v *HibernationOptions) *Instance

SetHibernationOptions sets the HibernationOptions field's value.

SetHypervisor

func (s *Instance) SetHypervisor(v string) *Instance

SetHypervisor sets the Hypervisor field's value.

SetIamInstanceProfile

func (s *Instance) SetIamInstanceProfile(v *IamInstanceProfile) *Instance

SetIamInstanceProfile sets the IamInstanceProfile field's value.

SetImageId

func (s *Instance) SetImageId(v string) *Instance

SetImageId sets the ImageId field's value.

SetInstanceId

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

SetInstanceId sets the InstanceId field's value.

SetInstanceLifecycle

func (s *Instance) SetInstanceLifecycle(v string) *Instance

SetInstanceLifecycle sets the InstanceLifecycle field's value.

SetInstanceType

func (s *Instance) SetInstanceType(v string) *Instance

SetInstanceType sets the InstanceType field's value.

SetKernelId

func (s *Instance) SetKernelId(v string) *Instance

SetKernelId sets the KernelId field's value.

SetKeyName

func (s *Instance) SetKeyName(v string) *Instance

SetKeyName sets the KeyName field's value.

SetLaunchTime

func (s *Instance) SetLaunchTime(v time.Time) *Instance

SetLaunchTime sets the LaunchTime field's value.

SetLicenses

func (s *Instance) SetLicenses(v []*LicenseConfiguration) *Instance

SetLicenses sets the Licenses field's value.

SetMonitoring

func (s *Instance) SetMonitoring(v *Monitoring) *Instance

SetMonitoring sets the Monitoring field's value.

SetNetworkInterfaces

func (s *Instance) SetNetworkInterfaces(v []*InstanceNetworkInterface) *Instance

SetNetworkInterfaces sets the NetworkInterfaces field's value.

SetPlacement

func (s *Instance) SetPlacement(v *Placement) *Instance

SetPlacement sets the Placement field's value.

SetPlatform

func (s *Instance) SetPlatform(v string) *Instance

SetPlatform sets the Platform field's value.

SetPrivateDnsName

func (s *Instance) SetPrivateDnsName(v string) *Instance

SetPrivateDnsName sets the PrivateDnsName field's value.

SetPrivateIpAddress

func (s *Instance) SetPrivateIpAddress(v string) *Instance

SetPrivateIpAddress sets the PrivateIpAddress field's value.

SetProductCodes

func (s *Instance) SetProductCodes(v []*ProductCode) *Instance

SetProductCodes sets the ProductCodes field's value.

SetPublicDnsName

func (s *Instance) SetPublicDnsName(v string) *Instance

SetPublicDnsName sets the PublicDnsName field's value.

SetPublicIpAddress

func (s *Instance) SetPublicIpAddress(v string) *Instance

SetPublicIpAddress sets the PublicIpAddress field's value.

SetRamdiskId

func (s *Instance) SetRamdiskId(v string) *Instance

SetRamdiskId sets the RamdiskId field's value.

SetRootDeviceName

func (s *Instance) SetRootDeviceName(v string) *Instance

SetRootDeviceName sets the RootDeviceName field's value.

SetRootDeviceType

func (s *Instance) SetRootDeviceType(v string) *Instance

SetRootDeviceType sets the RootDeviceType field's value.

SetSecurityGroups

func (s *Instance) SetSecurityGroups(v []*GroupIdentifier) *Instance

SetSecurityGroups sets the SecurityGroups field's value.

SetSourceDestCheck

func (s *Instance) SetSourceDestCheck(v bool) *Instance

SetSourceDestCheck sets the SourceDestCheck field's value.

SetSpotInstanceRequestId

func (s *Instance) SetSpotInstanceRequestId(v string) *Instance

SetSpotInstanceRequestId sets the SpotInstanceRequestId field's value.

SetSriovNetSupport

func (s *Instance) SetSriovNetSupport(v string) *Instance

SetSriovNetSupport sets the SriovNetSupport field's value.

SetState

func (s *Instance) SetState(v *InstanceState) *Instance

SetState sets the State field's value.

SetStateReason

func (s *Instance) SetStateReason(v *StateReason) *Instance

SetStateReason sets the StateReason field's value.

SetStateTransitionReason

func (s *Instance) SetStateTransitionReason(v string) *Instance

SetStateTransitionReason sets the StateTransitionReason field's value.

SetSubnetId

func (s *Instance) SetSubnetId(v string) *Instance

SetSubnetId sets the SubnetId field's value.

SetTags

func (s *Instance) SetTags(v []*Tag) *Instance

SetTags sets the Tags field's value.

SetVirtualizationType

func (s *Instance) SetVirtualizationType(v string) *Instance

SetVirtualizationType sets the VirtualizationType field's value.

SetVpcId

func (s *Instance) SetVpcId(v string) *Instance

SetVpcId sets the VpcId field's value.

String

func (s Instance) String() string

String returns the string representation

On this page: