Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data CreateFleet = CreateFleet' {
- clientToken :: Maybe Text
- context :: Maybe Text
- dryRun :: Maybe Bool
- excessCapacityTerminationPolicy :: Maybe FleetExcessCapacityTerminationPolicy
- onDemandOptions :: Maybe OnDemandOptionsRequest
- replaceUnhealthyInstances :: Maybe Bool
- spotOptions :: Maybe SpotOptionsRequest
- tagSpecifications :: Maybe [TagSpecification]
- terminateInstancesWithExpiration :: Maybe Bool
- type' :: Maybe FleetType
- validFrom :: Maybe ISO8601
- validUntil :: Maybe ISO8601
- launchTemplateConfigs :: [FleetLaunchTemplateConfigRequest]
- targetCapacitySpecification :: TargetCapacitySpecificationRequest
- newCreateFleet :: TargetCapacitySpecificationRequest -> CreateFleet
- createFleet_clientToken :: Lens' CreateFleet (Maybe Text)
- createFleet_context :: Lens' CreateFleet (Maybe Text)
- createFleet_dryRun :: Lens' CreateFleet (Maybe Bool)
- createFleet_excessCapacityTerminationPolicy :: Lens' CreateFleet (Maybe FleetExcessCapacityTerminationPolicy)
- createFleet_onDemandOptions :: Lens' CreateFleet (Maybe OnDemandOptionsRequest)
- createFleet_replaceUnhealthyInstances :: Lens' CreateFleet (Maybe Bool)
- createFleet_spotOptions :: Lens' CreateFleet (Maybe SpotOptionsRequest)
- createFleet_tagSpecifications :: Lens' CreateFleet (Maybe [TagSpecification])
- createFleet_terminateInstancesWithExpiration :: Lens' CreateFleet (Maybe Bool)
- createFleet_type :: Lens' CreateFleet (Maybe FleetType)
- createFleet_validFrom :: Lens' CreateFleet (Maybe UTCTime)
- createFleet_validUntil :: Lens' CreateFleet (Maybe UTCTime)
- createFleet_launchTemplateConfigs :: Lens' CreateFleet [FleetLaunchTemplateConfigRequest]
- createFleet_targetCapacitySpecification :: Lens' CreateFleet TargetCapacitySpecificationRequest
- data CreateFleetResponse = CreateFleetResponse' {
- errors :: Maybe [CreateFleetError]
- fleetId :: Maybe Text
- instances :: Maybe [CreateFleetInstance]
- httpStatus :: Int
- newCreateFleetResponse :: Int -> CreateFleetResponse
- createFleetResponse_errors :: Lens' CreateFleetResponse (Maybe [CreateFleetError])
- createFleetResponse_fleetId :: Lens' CreateFleetResponse (Maybe Text)
- createFleetResponse_instances :: Lens' CreateFleetResponse (Maybe [CreateFleetInstance])
- createFleetResponse_httpStatus :: Lens' CreateFleetResponse Int
Creating a Request
data CreateFleet Source #
See: newCreateFleet
smart constructor.
CreateFleet' | |
|
Instances
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_context :: Lens' CreateFleet (Maybe Text) Source #
Reserved.
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.
createFleet_launchTemplateConfigs :: Lens' CreateFleet [FleetLaunchTemplateConfigRequest] Source #
The configuration for the EC2 Fleet.
createFleet_targetCapacitySpecification :: Lens' CreateFleet TargetCapacitySpecificationRequest Source #
The number of units to request.
Destructuring the Response
data CreateFleetResponse Source #
See: newCreateFleetResponse
smart constructor.
CreateFleetResponse' | |
|
Instances
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_fleetId :: Lens' CreateFleetResponse (Maybe Text) Source #
The ID of the EC2 Fleet.
createFleetResponse_instances :: Lens' CreateFleetResponse (Maybe [CreateFleetInstance]) Source #
Information about the instances that were launched by the fleet.
Supported only for fleets of type instant
.
createFleetResponse_httpStatus :: Lens' CreateFleetResponse Int Source #
The response's http status code.