Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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 Launching an EC2 Fleet in the Amazon Elastic Compute Cloud User Guide .
- createFleet :: TargetCapacitySpecificationRequest -> CreateFleet
- data CreateFleet
- cfClientToken :: Lens' CreateFleet (Maybe Text)
- cfSpotOptions :: Lens' CreateFleet (Maybe SpotOptionsRequest)
- cfExcessCapacityTerminationPolicy :: Lens' CreateFleet (Maybe FleetExcessCapacityTerminationPolicy)
- cfTagSpecifications :: Lens' CreateFleet [TagSpecification]
- cfValidUntil :: Lens' CreateFleet (Maybe UTCTime)
- cfTerminateInstancesWithExpiration :: Lens' CreateFleet (Maybe Bool)
- cfType :: Lens' CreateFleet (Maybe FleetType)
- cfValidFrom :: Lens' CreateFleet (Maybe UTCTime)
- cfReplaceUnhealthyInstances :: Lens' CreateFleet (Maybe Bool)
- cfDryRun :: Lens' CreateFleet (Maybe Bool)
- cfLaunchTemplateConfigs :: Lens' CreateFleet [FleetLaunchTemplateConfigRequest]
- cfTargetCapacitySpecification :: Lens' CreateFleet TargetCapacitySpecificationRequest
- createFleetResponse :: Int -> CreateFleetResponse
- data CreateFleetResponse
- cfrsFleetId :: Lens' CreateFleetResponse (Maybe Text)
- cfrsResponseStatus :: Lens' CreateFleetResponse Int
Creating a Request
Creates a value of CreateFleet
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cfClientToken
- Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .cfSpotOptions
- IncludesSpotAllocationStrategy
andSpotInstanceInterruptionBehavior
inside this structure.cfExcessCapacityTerminationPolicy
- 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.cfTagSpecifications
- The tags for an EC2 Fleet resource.cfValidUntil
- The end date and time of the request, in UTC format (for example, YYYY -MM -DD THH :MM :SS Z). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. The default end date is 7 days from the current date.cfTerminateInstancesWithExpiration
- Indicates whether running instances should be terminated when the EC2 Fleet expires.cfType
- The type of request. Indicates whether the EC2 Fleet onlyrequests
the target capacity, or also attempts tomaintain
it. If you request a certain target capacity, EC2 Fleet only places the required requests. It does not attempt to replenish instances if capacity is diminished, and does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default:maintain
.cfValidFrom
- The start date and time of the request, in UTC format (for example, YYYY -MM -DD THH :MM :SS Z). The default is to start fulfilling the request immediately.cfReplaceUnhealthyInstances
- Indicates whether EC2 Fleet should replace unhealthy instances.cfDryRun
- 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 isDryRunOperation
. Otherwise, it isUnauthorizedOperation
.cfLaunchTemplateConfigs
- The configuration for the EC2 Fleet.cfTargetCapacitySpecification
- TheTotalTargetCapacity
,OnDemandTargetCapacity
,SpotTargetCapacity
, andDefaultCapacityType
structure.
data CreateFleet Source #
See: createFleet
smart constructor.
Request Lenses
cfClientToken :: Lens' CreateFleet (Maybe Text) Source #
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .
cfSpotOptions :: Lens' CreateFleet (Maybe SpotOptionsRequest) Source #
Includes SpotAllocationStrategy
and SpotInstanceInterruptionBehavior
inside this structure.
cfExcessCapacityTerminationPolicy :: 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.
cfTagSpecifications :: Lens' CreateFleet [TagSpecification] Source #
The tags for an EC2 Fleet resource.
cfValidUntil :: Lens' CreateFleet (Maybe UTCTime) Source #
The end date and time of the request, in UTC format (for example, YYYY -MM -DD THH :MM :SS Z). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. The default end date is 7 days from the current date.
cfTerminateInstancesWithExpiration :: Lens' CreateFleet (Maybe Bool) Source #
Indicates whether running instances should be terminated when the EC2 Fleet expires.
cfType :: Lens' CreateFleet (Maybe FleetType) Source #
The type of request. Indicates whether the EC2 Fleet only requests
the target capacity, or also attempts to maintain
it. If you request a certain target capacity, EC2 Fleet only places the required requests. It does not attempt to replenish instances if capacity is diminished, and does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: maintain
.
cfValidFrom :: Lens' CreateFleet (Maybe UTCTime) Source #
The start date and time of the request, in UTC format (for example, YYYY -MM -DD THH :MM :SS Z). The default is to start fulfilling the request immediately.
cfReplaceUnhealthyInstances :: Lens' CreateFleet (Maybe Bool) Source #
Indicates whether EC2 Fleet should replace unhealthy instances.
cfDryRun :: 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
.
cfLaunchTemplateConfigs :: Lens' CreateFleet [FleetLaunchTemplateConfigRequest] Source #
The configuration for the EC2 Fleet.
cfTargetCapacitySpecification :: Lens' CreateFleet TargetCapacitySpecificationRequest Source #
The TotalTargetCapacity
, OnDemandTargetCapacity
, SpotTargetCapacity
, and DefaultCapacityType
structure.
Destructuring the Response
Creates a value of CreateFleetResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cfrsFleetId
- The ID of the EC2 Fleet.cfrsResponseStatus
- -- | The response status code.
data CreateFleetResponse Source #
See: createFleetResponse
smart constructor.
Response Lenses
cfrsFleetId :: Lens' CreateFleetResponse (Maybe Text) Source #
The ID of the EC2 Fleet.
cfrsResponseStatus :: Lens' CreateFleetResponse Int Source #
- - | The response status code.