import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Information about an existing EC2 Capacity Block reservation. * * This data source returns only Capacity Reservations whose `reservationType` is `capacity-block`. Use the `aws.ec2.CapacityReservation` data source to look up On-Demand Capacity Reservations (ODCR). * * At least one of `id` or `filter` must be specified. Filter combinations that match multiple Capacity Block reservations will return an error. * * ## Example Usage * * ### Lookup by ID * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getCapacityBlockReservation({ * id: "cr-0123456789abcdef0", * }); * ``` * * ### Lookup by filter * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getCapacityBlockReservation({ * filters: [ * { * name: "instance-type", * values: ["p4d.24xlarge"], * }, * { * name: "state", * values: ["active"], * }, * ], * }); * ``` * * ### Lookup by tag * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getCapacityBlockReservation({ * filters: [{ * name: "tag:Project", * values: ["ml-training"], * }], * }); * ``` */ export declare function getCapacityBlockReservation(args?: GetCapacityBlockReservationArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getCapacityBlockReservation. */ export interface GetCapacityBlockReservationArgs { /** * Configuration block(s) for filtering. Detailed below. */ filters?: inputs.ec2.GetCapacityBlockReservationFilter[]; /** * ID of the Capacity Block reservation to retrieve. */ id?: string; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: string; } /** * A collection of values returned by getCapacityBlockReservation. */ export interface GetCapacityBlockReservationResult { /** * ARN of the Capacity Block reservation. */ readonly arn: string; /** * Availability Zone in which the capacity is reserved. */ readonly availabilityZone: string; /** * ID of the Availability Zone in which the capacity is reserved. */ readonly availabilityZoneId: string; /** * Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation. */ readonly availableInstanceCount: number; /** * ID of the underlying Capacity Block. */ readonly capacityBlockId: string; /** * Information about your commitment for a future-dated Capacity Block reservation. See `commitmentInfo` Attribute Reference below. */ readonly commitmentInfo: outputs.ec2.GetCapacityBlockReservationCommitmentInfo; /** * Date and time the Capacity Block reservation was created in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8). */ readonly createdDate: string; /** * Delivery method for a future-dated Capacity Block reservation. Either `fixed` or `incremental`. */ readonly deliveryPreference: string; /** * Whether the Capacity Block reservation supports EBS-optimized instances. */ readonly ebsOptimized: boolean; /** * Date and time the Capacity Block reservation expires in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8). */ readonly endDate: string; /** * End type of the Capacity Block reservation. Either `limited` or `unlimited`. */ readonly endDateType: string; readonly filters?: outputs.ec2.GetCapacityBlockReservationFilter[]; readonly id: string; /** * Number of instances allocated as interruptible capacity within the Capacity Block reservation. */ readonly instanceCount: number; /** * Type of instance launches that the Capacity Block accepts. Either `open` or `targeted`. */ readonly instanceMatchCriteria: string; /** * Operating system platform for which the Capacity Block reserves capacity. */ readonly instancePlatform: string; /** * Instance type for which the Capacity Block reserves capacity. */ readonly instanceType: string; /** * Information about the interruptible capacity allocation, if applicable. See `interruptibleCapacityAllocation` Attribute Reference below. */ readonly interruptibleCapacityAllocation: outputs.ec2.GetCapacityBlockReservationInterruptibleCapacityAllocation; /** * Information about an interrupted Capacity Block reservation, if applicable. See `interruptionInfo` Attribute Reference below. */ readonly interruptionInfo: outputs.ec2.GetCapacityBlockReservationInterruptionInfo; /** * ARN of the Outpost on which the Capacity Block was created, if applicable. */ readonly outpostArn: string; /** * ID of the AWS account that owns the Capacity Block reservation. */ readonly ownerId: string; /** * ARN of the cluster placement group in which the Capacity Block was created, if applicable. */ readonly placementGroupArn: string; readonly region: string; /** * Type of Capacity Reservation. Always `capacity-block` for this data source. */ readonly reservationType: string; /** * Date and time the Capacity Block reservation was started in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8). */ readonly startDate: string; /** * Current state of the Capacity Block reservation. One of `active`, `expired`, `cancelled`, `pending`, `failed`, `scheduled`, `payment-pending`, `payment-failed`, or `assessing`. */ readonly state: string; /** * Map of tags assigned to the Capacity Block reservation. */ readonly tags: { [key: string]: string; }; /** * Tenancy of the Capacity Block. Either `default` or `dedicated`. */ readonly tenancy: string; } /** * Information about an existing EC2 Capacity Block reservation. * * This data source returns only Capacity Reservations whose `reservationType` is `capacity-block`. Use the `aws.ec2.CapacityReservation` data source to look up On-Demand Capacity Reservations (ODCR). * * At least one of `id` or `filter` must be specified. Filter combinations that match multiple Capacity Block reservations will return an error. * * ## Example Usage * * ### Lookup by ID * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getCapacityBlockReservation({ * id: "cr-0123456789abcdef0", * }); * ``` * * ### Lookup by filter * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getCapacityBlockReservation({ * filters: [ * { * name: "instance-type", * values: ["p4d.24xlarge"], * }, * { * name: "state", * values: ["active"], * }, * ], * }); * ``` * * ### Lookup by tag * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getCapacityBlockReservation({ * filters: [{ * name: "tag:Project", * values: ["ml-training"], * }], * }); * ``` */ export declare function getCapacityBlockReservationOutput(args?: GetCapacityBlockReservationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getCapacityBlockReservation. */ export interface GetCapacityBlockReservationOutputArgs { /** * Configuration block(s) for filtering. Detailed below. */ filters?: pulumi.Input[] | undefined>; /** * ID of the Capacity Block reservation to retrieve. */ id?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; } //# sourceMappingURL=getCapacityBlockReservation.d.ts.map