paws.compute (version 0.1.0)

ec2_cancel_spot_fleet_requests: Cancels the specified Spot Fleet requests

Description

Cancels the specified Spot Fleet requests.

Usage

ec2_cancel_spot_fleet_requests(DryRun, SpotFleetRequestIds,
  TerminateInstances)

Arguments

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.

SpotFleetRequestIds

[required] The IDs of the Spot Fleet requests.

TerminateInstances

[required] Indicates whether to terminate instances for a Spot Fleet request if it is canceled successfully.

Request syntax

svc$cancel_spot_fleet_requests(
  DryRun = TRUE|FALSE,
  SpotFleetRequestIds = list(
    "string"
  ),
  TerminateInstances = TRUE|FALSE
)

Details

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.

Examples

Run this code
# 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 DataCamp Workspace