paws.compute (version 0.1.0)

ec2_purchase_scheduled_instances: Purchases one or more Scheduled Instances with the specified schedule

Description

Purchases one or more Scheduled Instances with the specified schedule.

Usage

ec2_purchase_scheduled_instances(ClientToken, DryRun, PurchaseRequests)

Arguments

ClientToken

Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency.

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.

PurchaseRequests

[required] One or more purchase requests.

Request syntax

svc$purchase_scheduled_instances(
  ClientToken = "string",
  DryRun = TRUE|FALSE,
  PurchaseRequests = list(
    list(
      InstanceCount = 123,
      PurchaseToken = "string"
    )
  )
)

Details

Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call DescribeScheduledInstanceAvailability to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call RunScheduledInstances during each scheduled time period.

After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.

Examples

Run this code
# NOT RUN {
# This example purchases a Scheduled Instance.
# }
# NOT RUN {
svc$purchase_scheduled_instances(
  PurchaseRequests = list(
    list(
      InstanceCount = 1L,
      PurchaseToken = "eyJ2IjoiMSIsInMiOjEsImMiOi..."
    )
  )
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab