amazonka-ec2-2.0: Amazon Elastic Compute Cloud SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.EC2.CreateFleet

Description

Launches an EC2 Fleet.

You can create a single EC2 Fleet that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.

For more information, see EC2 Fleet in the Amazon EC2 User Guide.

Synopsis

Creating a Request

data CreateFleet Source #

See: newCreateFleet smart constructor.

Constructors

CreateFleet' 

Fields

  • clientToken :: Maybe Text

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

  • context :: Maybe Text

    Reserved.

  • dryRun :: Maybe 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 :: Maybe FleetExcessCapacityTerminationPolicy

    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.

  • onDemandOptions :: Maybe OnDemandOptionsRequest

    Describes the configuration of On-Demand Instances in an EC2 Fleet.

  • replaceUnhealthyInstances :: Maybe Bool

    Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.

  • spotOptions :: Maybe SpotOptionsRequest

    Describes the configuration of Spot Instances in an EC2 Fleet.

  • tagSpecifications :: Maybe [TagSpecification]

    The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tagging your resources.

    If the fleet type is instant, specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

    If the fleet type is maintain or request, specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance. To tag instances at launch, specify the tags in a launch template.

  • terminateInstancesWithExpiration :: Maybe Bool

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

  • type' :: Maybe FleetType

    The fleet type. The default value is maintain.

    • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
    • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.
    • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

    For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

  • validFrom :: Maybe ISO8601

    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 :: Maybe ISO8601

    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.

  • launchTemplateConfigs :: [FleetLaunchTemplateConfigRequest]

    The configuration for the EC2 Fleet.

  • targetCapacitySpecification :: TargetCapacitySpecificationRequest

    The number of units to request.

Instances

Instances details
ToHeaders CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

Methods

toHeaders :: CreateFleet -> [Header] #

ToPath CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

ToQuery CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

AWSRequest CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

Associated Types

type AWSResponse CreateFleet #

Generic CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

Associated Types

type Rep CreateFleet :: Type -> Type #

Read CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

Show CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

NFData CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

Methods

rnf :: CreateFleet -> () #

Eq CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

Hashable CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

type AWSResponse CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

type Rep CreateFleet Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

type Rep CreateFleet = D1 ('MetaData "CreateFleet" "Amazonka.EC2.CreateFleet" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateFleet'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "context") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "excessCapacityTerminationPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FleetExcessCapacityTerminationPolicy)) :*: S1 ('MetaSel ('Just "onDemandOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe OnDemandOptionsRequest))) :*: (S1 ('MetaSel ('Just "replaceUnhealthyInstances") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "spotOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SpotOptionsRequest))))) :*: ((S1 ('MetaSel ('Just "tagSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TagSpecification])) :*: (S1 ('MetaSel ('Just "terminateInstancesWithExpiration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FleetType)))) :*: ((S1 ('MetaSel ('Just "validFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ISO8601)) :*: S1 ('MetaSel ('Just "validUntil") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ISO8601))) :*: (S1 ('MetaSel ('Just "launchTemplateConfigs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [FleetLaunchTemplateConfigRequest]) :*: S1 ('MetaSel ('Just "targetCapacitySpecification") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TargetCapacitySpecificationRequest))))))

newCreateFleet Source #

Create a value of CreateFleet with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreateFleet, createFleet_clientToken - Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

CreateFleet, createFleet_context - Reserved.

$sel:dryRun:CreateFleet', createFleet_dryRun - 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.

CreateFleet, createFleet_excessCapacityTerminationPolicy - 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.

CreateFleet, createFleet_onDemandOptions - Describes the configuration of On-Demand Instances in an EC2 Fleet.

CreateFleet, createFleet_replaceUnhealthyInstances - Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.

CreateFleet, createFleet_spotOptions - Describes the configuration of Spot Instances in an EC2 Fleet.

CreateFleet, createFleet_tagSpecifications - The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tagging your resources.

If the fleet type is instant, specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

If the fleet type is maintain or request, specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance. To tag instances at launch, specify the tags in a launch template.

CreateFleet, createFleet_terminateInstancesWithExpiration - Indicates whether running instances should be terminated when the EC2 Fleet expires.

CreateFleet, createFleet_type - The fleet type. The default value is maintain.

  • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
  • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.
  • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

CreateFleet, createFleet_validFrom - 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.

CreateFleet, createFleet_validUntil - 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.

CreateFleet, createFleet_launchTemplateConfigs - The configuration for the EC2 Fleet.

CreateFleet, createFleet_targetCapacitySpecification - The number of units to request.

Request Lenses

createFleet_clientToken :: Lens' CreateFleet (Maybe Text) Source #

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

createFleet_dryRun :: Lens' CreateFleet (Maybe Bool) Source #

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.

createFleet_excessCapacityTerminationPolicy :: Lens' CreateFleet (Maybe FleetExcessCapacityTerminationPolicy) Source #

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.

createFleet_onDemandOptions :: Lens' CreateFleet (Maybe OnDemandOptionsRequest) Source #

Describes the configuration of On-Demand Instances in an EC2 Fleet.

createFleet_replaceUnhealthyInstances :: Lens' CreateFleet (Maybe Bool) Source #

Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.

createFleet_spotOptions :: Lens' CreateFleet (Maybe SpotOptionsRequest) Source #

Describes the configuration of Spot Instances in an EC2 Fleet.

createFleet_tagSpecifications :: Lens' CreateFleet (Maybe [TagSpecification]) Source #

The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tagging your resources.

If the fleet type is instant, specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

If the fleet type is maintain or request, specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance. To tag instances at launch, specify the tags in a launch template.

createFleet_terminateInstancesWithExpiration :: Lens' CreateFleet (Maybe Bool) Source #

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

createFleet_type :: Lens' CreateFleet (Maybe FleetType) Source #

The fleet type. The default value is maintain.

  • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
  • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.
  • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

For more information, see EC2 Fleet request types in the Amazon EC2 User Guide.

createFleet_validFrom :: Lens' CreateFleet (Maybe UTCTime) Source #

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.

createFleet_validUntil :: Lens' CreateFleet (Maybe UTCTime) Source #

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.

Destructuring the Response

data CreateFleetResponse Source #

See: newCreateFleetResponse smart constructor.

Constructors

CreateFleetResponse' 

Fields

Instances

Instances details
Generic CreateFleetResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

Associated Types

type Rep CreateFleetResponse :: Type -> Type #

Read CreateFleetResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

Show CreateFleetResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

NFData CreateFleetResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

Methods

rnf :: CreateFleetResponse -> () #

Eq CreateFleetResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

type Rep CreateFleetResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateFleet

type Rep CreateFleetResponse = D1 ('MetaData "CreateFleetResponse" "Amazonka.EC2.CreateFleet" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateFleetResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "errors") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [CreateFleetError])) :*: S1 ('MetaSel ('Just "fleetId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "instances") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [CreateFleetInstance])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateFleetResponse Source #

Create a value of CreateFleetResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreateFleetResponse, createFleetResponse_errors - Information about the instances that could not be launched by the fleet. Supported only for fleets of type instant.

CreateFleetResponse, createFleetResponse_fleetId - The ID of the EC2 Fleet.

CreateFleetResponse, createFleetResponse_instances - Information about the instances that were launched by the fleet. Supported only for fleets of type instant.

$sel:httpStatus:CreateFleetResponse', createFleetResponse_httpStatus - The response's http status code.

Response Lenses

createFleetResponse_errors :: Lens' CreateFleetResponse (Maybe [CreateFleetError]) Source #

Information about the instances that could not be launched by the fleet. Supported only for fleets of type instant.

createFleetResponse_instances :: Lens' CreateFleetResponse (Maybe [CreateFleetInstance]) Source #

Information about the instances that were launched by the fleet. Supported only for fleets of type instant.