
Cancels the specified Spot Fleet requests.
ec2_cancel_spot_fleet_requests(DryRun, SpotFleetRequestIds,
TerminateInstances)
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
.
[required] The IDs of the Spot Fleet requests.
[required] Indicates whether to terminate instances for a Spot Fleet request if it is canceled successfully.
svc$cancel_spot_fleet_requests( DryRun = TRUE|FALSE, SpotFleetRequestIds = list( "string" ), TerminateInstances = TRUE|FALSE )
After you cancel a Spot Fleet request, the Spot Fleet launches no new
Spot Instances. You must specify whether the Spot Fleet should also
terminate its Spot Instances. If you terminate the instances, the Spot
Fleet request enters the cancelled_terminating
state. Otherwise, the
Spot Fleet request enters the cancelled_running
state and the
instances continue to run until they are interrupted or you terminate
them manually.
# NOT RUN {
# This example cancels the specified Spot fleet request and terminates its
# associated Spot Instances.
# }
# NOT RUN {
svc$cancel_spot_fleet_requests(
SpotFleetRequestIds = list(
"sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
),
TerminateInstances = TRUE
)
# }
# NOT RUN {
# This example cancels the specified Spot fleet request without
# terminating its associated Spot Instances.
# }
# NOT RUN {
svc$cancel_spot_fleet_requests(
SpotFleetRequestIds = list(
"sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE"
),
TerminateInstances = FALSE
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab