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.

CapacityReservationSpecification

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

type CapacityReservationSpecification struct { CapacityReservationPreference *string `type:"string" enum:"CapacityReservationPreference"` CapacityReservationTarget *CapacityReservationTarget `type:"structure"` }

Describes an instance's Capacity Reservation targeting option. You can specify only one parameter at a time. If you specify CapacityReservationPreference and CapacityReservationTarget, the request fails.

Use the CapacityReservationPreference parameter to configure the instance to run as an On-Demand Instance or to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone). Use the CapacityReservationTarget parameter to explicitly target a specific Capacity Reservation.

CapacityReservationPreference

Type: *string

Indicates the instance's Capacity Reservation preferences. Possible preferences include:

  • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

  • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.

CapacityReservationTarget

Describes a target Capacity Reservation.

Method

GoString

func (s CapacityReservationSpecification) GoString() string

GoString returns the string representation

SetCapacityReservationPreference

func (s *CapacityReservationSpecification) SetCapacityReservationPreference(v string) *CapacityReservationSpecification

SetCapacityReservationPreference sets the CapacityReservationPreference field's value.

SetCapacityReservationTarget

func (s *CapacityReservationSpecification) SetCapacityReservationTarget(v *CapacityReservationTarget) *CapacityReservationSpecification

SetCapacityReservationTarget sets the CapacityReservationTarget field's value.

String

func (s CapacityReservationSpecification) String() string

String returns the string representation

On this page: