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.

CapacityReservation

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

type CapacityReservation struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string"` AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` CreateDate *time.Time `locationName:"createDate" type:"timestamp"` EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` EndDate *time.Time `locationName:"endDate" type:"timestamp"` EndDateType *string `locationName:"endDateType" type:"string" enum:"EndDateType"` EphemeralStorage *bool `locationName:"ephemeralStorage" type:"boolean"` InstanceMatchCriteria *string `locationName:"instanceMatchCriteria" type:"string" enum:"InstanceMatchCriteria"` InstancePlatform *string `locationName:"instancePlatform" type:"string" enum:"CapacityReservationInstancePlatform"` InstanceType *string `locationName:"instanceType" type:"string"` State *string `locationName:"state" type:"string" enum:"CapacityReservationState"` Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` Tenancy *string `locationName:"tenancy" type:"string" enum:"CapacityReservationTenancy"` TotalInstanceCount *int64 `locationName:"totalInstanceCount" type:"integer"` }

Describes a Capacity Reservation.

AvailabilityZone

Type: *string

The Availability Zone in which the capacity is reserved.

AvailableInstanceCount

Type: *int64

The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

CapacityReservationId

Type: *string

The ID of the Capacity Reservation.

CreateDate

Type: *time.Time

The date and time at which the Capacity Reservation was created.

EbsOptimized

Type: *bool

Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.

EndDate

Type: *time.Time

The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

EndDateType

Type: *string

Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

  • unlimited - The Capacity Reservation remains active until you explicitly cancel it.

  • limited - The Capacity Reservation expires automatically at a specified date and time.

EphemeralStorage

Type: *bool

Indicates whether the Capacity Reservation supports instances with temporary, block-level storage.

InstanceMatchCriteria

Type: *string

Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

  • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.

  • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

InstancePlatform

Type: *string

The type of operating system for which the Capacity Reservation reserves capacity.

InstanceType

Type: *string

The type of instance for which the Capacity Reservation reserves capacity.

State

Type: *string

The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

  • active - The Capacity Reservation is active and the capacity is available for your use.

  • cancelled - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.

  • expired - The Capacity Reservation was manually cancelled. The reserved capacity is no longer available for your use.

  • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.

  • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.

Tags

Describes a tag.

Tenancy

Type: *string

Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

  • default - The Capacity Reservation is created on hardware that is shared with other AWS accounts.

  • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account.

TotalInstanceCount

Type: *int64

The number of instances for which the Capacity Reservation reserves capacity.

Method

GoString

func (s CapacityReservation) GoString() string

GoString returns the string representation

SetAvailabilityZone

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

SetAvailabilityZone sets the AvailabilityZone field's value.

SetAvailableInstanceCount

func (s *CapacityReservation) SetAvailableInstanceCount(v int64) *CapacityReservation

SetAvailableInstanceCount sets the AvailableInstanceCount field's value.

SetCapacityReservationId

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

SetCapacityReservationId sets the CapacityReservationId field's value.

SetCreateDate

func (s *CapacityReservation) SetCreateDate(v time.Time) *CapacityReservation

SetCreateDate sets the CreateDate field's value.

SetEbsOptimized

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

SetEbsOptimized sets the EbsOptimized field's value.

SetEndDate

func (s *CapacityReservation) SetEndDate(v time.Time) *CapacityReservation

SetEndDate sets the EndDate field's value.

SetEndDateType

func (s *CapacityReservation) SetEndDateType(v string) *CapacityReservation

SetEndDateType sets the EndDateType field's value.

SetEphemeralStorage

func (s *CapacityReservation) SetEphemeralStorage(v bool) *CapacityReservation

SetEphemeralStorage sets the EphemeralStorage field's value.

SetInstanceMatchCriteria

func (s *CapacityReservation) SetInstanceMatchCriteria(v string) *CapacityReservation

SetInstanceMatchCriteria sets the InstanceMatchCriteria field's value.

SetInstancePlatform

func (s *CapacityReservation) SetInstancePlatform(v string) *CapacityReservation

SetInstancePlatform sets the InstancePlatform field's value.

SetInstanceType

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

SetInstanceType sets the InstanceType field's value.

SetState

func (s *CapacityReservation) SetState(v string) *CapacityReservation

SetState sets the State field's value.

SetTags

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

SetTags sets the Tags field's value.

SetTenancy

func (s *CapacityReservation) SetTenancy(v string) *CapacityReservation

SetTenancy sets the Tenancy field's value.

SetTotalInstanceCount

func (s *CapacityReservation) SetTotalInstanceCount(v int64) *CapacityReservation

SetTotalInstanceCount sets the TotalInstanceCount field's value.

String

func (s CapacityReservation) String() string

String returns the string representation

On this page: