UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

119 lines (118 loc) 7.33 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Resource Type definition for AWS::EC2::CapacityReservation */ export declare function getCapacityReservation(args: GetCapacityReservationArgs, opts?: pulumi.InvokeOptions): Promise<GetCapacityReservationResult>; export interface GetCapacityReservationArgs { /** * The ID of the Capacity Reservation. */ id: string; } export interface GetCapacityReservationResult { /** * Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example: `9` . */ readonly availableInstanceCount?: number; readonly capacityAllocationSet?: outputs.ec2.CapacityReservationCapacityAllocation[]; /** * The Amazon Resource Name (ARN) of the Capacity Reservation. */ readonly capacityReservationArn?: string; /** * The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet. */ readonly capacityReservationFleetId?: string; readonly commitmentInfo?: outputs.ec2.CommitmentInfoProperties; /** * The date and time at which the Capacity Reservation was created. */ readonly createDate?: string; /** * The delivery method for a future-dated Capacity Reservation. `incremental` indicates that the requested capacity is delivered in addition to any running instances and reserved capacity that you have in your account at the requested date and time. */ readonly deliveryPreference?: string; /** * The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to `expired` when it reaches its end date and time. * * You must provide an `EndDate` value if `EndDateType` is `limited` . Omit `EndDate` if `EndDateType` is `unlimited` . * * If the `EndDateType` is `limited` , the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019. * * If you are requesting a future-dated Capacity Reservation, you can't specify an end date and time that is within the commitment duration. */ readonly endDate?: string; /** * Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types: * * - `unlimited` - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an `EndDate` if the `EndDateType` is `unlimited` . * - `limited` - The Capacity Reservation expires automatically at a specified date and time. You must provide an `EndDate` value if the `EndDateType` value is `limited` . */ readonly endDateType?: string; /** * The ID of the Capacity Reservation. */ readonly id?: string; /** * The number of instances for which to reserve capacity. * * > You can request future-dated Capacity Reservations for an instance count with a minimum of 100 vCPUs. For example, if you request a future-dated Capacity Reservation for `m5.xlarge` instances, you must request at least 25 instances ( *25 * m5.xlarge = 100 vCPUs* ). * * Valid range: 1 - 1000 */ readonly instanceCount?: number; /** * Indicates the type of instance launches that the Capacity Reservation accepts. The options include: * * - `open` - The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying any additional parameters. * - `targeted` - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity. * * > If you are requesting a future-dated Capacity Reservation, you must specify `targeted` . * * Default: `open` */ readonly instanceMatchCriteria?: string; /** * The ID of the AWS account that owns the Capacity Reservation. */ readonly ownerId?: string; /** * The type of Capacity Reservation. */ readonly reservationType?: string; /** * The date and time at which the Capacity Reservation was started. */ readonly startDate?: string; /** * The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states: * * - `active` - The capacity is available for use. * - `expired` - The Capacity Reservation expired automatically at the date and time specified in your reservation request. The reserved capacity is no longer available for your use. * - `cancelled` - The Capacity Reservation was canceled. The reserved capacity is no longer available for your use. * - `pending` - The Capacity Reservation request was successful but the capacity provisioning is still pending. * - `failed` - The Capacity Reservation request has failed. A request can fail due to request parameters that are not valid, capacity constraints, or instance limit constraints. You can view a failed request for 60 minutes. * - `scheduled` - ( *Future-dated Capacity Reservations* ) The future-dated Capacity Reservation request was approved and the Capacity Reservation is scheduled for delivery on the requested start date. * - `payment-pending` - ( *Capacity Blocks* ) The upfront payment has not been processed yet. * - `payment-failed` - ( *Capacity Blocks* ) The upfront payment was not processed in the 12-hour time frame. Your Capacity Block was released. * - `assessing` - ( *Future-dated Capacity Reservations* ) Amazon EC2 is assessing your request for a future-dated Capacity Reservation. * - `delayed` - ( *Future-dated Capacity Reservations* ) Amazon EC2 encountered a delay in provisioning the requested future-dated Capacity Reservation. Amazon EC2 is unable to deliver the requested capacity by the requested start date and time. * - `unsupported` - ( *Future-dated Capacity Reservations* ) Amazon EC2 can't support the future-dated Capacity Reservation request due to capacity constraints. You can view unsupported requests for 30 days. The Capacity Reservation will not be delivered. */ readonly state?: string; /** * Returns the total number of instances for which the Capacity Reservation reserves capacity. For example: `15` . */ readonly totalInstanceCount?: number; } /** * Resource Type definition for AWS::EC2::CapacityReservation */ export declare function getCapacityReservationOutput(args: GetCapacityReservationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCapacityReservationResult>; export interface GetCapacityReservationOutputArgs { /** * The ID of the Capacity Reservation. */ id: pulumi.Input<string>; }