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.

CreateFleetInput

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

type CreateFleetInput struct { ClientToken *string `type:"string"` DryRun *bool `type:"boolean"` ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` LaunchTemplateConfigs []*FleetLaunchTemplateConfigRequest `locationNameList:"item" type:"list" required:"true"` OnDemandOptions *OnDemandOptionsRequest `type:"structure"` ReplaceUnhealthyInstances *bool `type:"boolean"` SpotOptions *SpotOptionsRequest `type:"structure"` TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` TerminateInstancesWithExpiration *bool `type:"boolean"` Type *string `type:"string" enum:"FleetType"` ValidFrom *time.Time `type:"timestamp"` ValidUntil *time.Time `type:"timestamp"` }

ClientToken

Type: *string

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).

DryRun

Type: *bool

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

ExcessCapacityTerminationPolicy

Type: *string

Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

LaunchTemplateConfigs

Describes a launch template and overrides.

OnDemandOptions

The allocation strategy of On-Demand Instances in an EC2 Fleet.

ReplaceUnhealthyInstances

Type: *bool

Indicates whether EC2 Fleet should replace unhealthy instances.

SpotOptions

Describes the configuration of Spot Instances in an EC2 Fleet request.

TagSpecifications

The tags to apply to a resource when the resource is being created.

TargetCapacitySpecification

The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain, you can specify a target capacity of 0 and add capacity later.

TerminateInstancesWithExpiration

Type: *bool

Indicates whether running instances should be terminated when the EC2 Fleet expires.

Type

Type: *string

The type of the request. By default, the EC2 Fleet places an asynchronous request for your desired capacity, and maintains it by replenishing interrupted Spot Instances (maintain). A value of instant places a synchronous one-time request, and returns errors for any instances that could not be launched. A value of request places an asynchronous one-time request without maintaining capacity or submitting requests in alternative capacity pools if capacity is unavailable. For more information, see EC2 Fleet Request Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-configuration-strategies.html#ec2-fleet-request-type) in the Amazon Elastic Compute Cloud User Guide.

ValidFrom

Type: *time.Time

The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.

ValidUntil

Type: *time.Time

The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.

Method

GoString

func (s CreateFleetInput) GoString() string

GoString returns the string representation

SetClientToken

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

SetClientToken sets the ClientToken field's value.

SetDryRun

func (s *CreateFleetInput) SetDryRun(v bool) *CreateFleetInput

SetDryRun sets the DryRun field's value.

SetExcessCapacityTerminationPolicy

func (s *CreateFleetInput) SetExcessCapacityTerminationPolicy(v string) *CreateFleetInput

SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value.

SetLaunchTemplateConfigs

func (s *CreateFleetInput) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfigRequest) *CreateFleetInput

SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value.

SetOnDemandOptions

func (s *CreateFleetInput) SetOnDemandOptions(v *OnDemandOptionsRequest) *CreateFleetInput

SetOnDemandOptions sets the OnDemandOptions field's value.

SetReplaceUnhealthyInstances

func (s *CreateFleetInput) SetReplaceUnhealthyInstances(v bool) *CreateFleetInput

SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value.

SetSpotOptions

func (s *CreateFleetInput) SetSpotOptions(v *SpotOptionsRequest) *CreateFleetInput

SetSpotOptions sets the SpotOptions field's value.

SetTagSpecifications

func (s *CreateFleetInput) SetTagSpecifications(v []*TagSpecification) *CreateFleetInput

SetTagSpecifications sets the TagSpecifications field's value.

SetTargetCapacitySpecification

func (s *CreateFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *CreateFleetInput

SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value.

SetTerminateInstancesWithExpiration

func (s *CreateFleetInput) SetTerminateInstancesWithExpiration(v bool) *CreateFleetInput

SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value.

SetType

func (s *CreateFleetInput) SetType(v string) *CreateFleetInput

SetType sets the Type field's value.

SetValidFrom

func (s *CreateFleetInput) SetValidFrom(v time.Time) *CreateFleetInput

SetValidFrom sets the ValidFrom field's value.

SetValidUntil

func (s *CreateFleetInput) SetValidUntil(v time.Time) *CreateFleetInput

SetValidUntil sets the ValidUntil field's value.

String

func (s CreateFleetInput) String() string

String returns the string representation

Validate

func (s *CreateFleetInput) Validate() error

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

On this page: