@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)
163 lines (162 loc) • 10.8 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
/**
* Resource Type definition for AWS::EC2::CapacityReservationFleet
*
* ## Example Usage
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const ec2CapacityReservationFleetCanary = new aws_native.ec2.CapacityReservationFleet("ec2CapacityReservationFleetCanary", {
* allocationStrategy: "prioritized",
* instanceTypeSpecifications: [
* {
* instanceType: "c4.large",
* instancePlatform: "Linux/UNIX",
* availabilityZone: "us-east-1a",
* weight: 1,
* priority: 1,
* },
* {
* instanceType: "c5.large",
* instancePlatform: "Linux/UNIX",
* availabilityZone: "us-east-1a",
* weight: 1,
* priority: 2,
* },
* ],
* tenancy: aws_native.ec2.CapacityReservationFleetTenancy.Default,
* totalTargetCapacity: 2,
* instanceMatchCriteria: aws_native.ec2.CapacityReservationFleetInstanceMatchCriteria.Open,
* });
*
* ```
*/
export declare class CapacityReservationFleet extends pulumi.CustomResource {
/**
* Get an existing CapacityReservationFleet resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): CapacityReservationFleet;
/**
* Returns true if the given object is an instance of CapacityReservationFleet. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is CapacityReservationFleet;
/**
* The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. Currently, only the `prioritized` allocation strategy is supported. For more information, see [Allocation strategy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy) in the *Amazon EC2 User Guide* .
*
* Valid values: `prioritized`
*/
readonly allocationStrategy: pulumi.Output<string | undefined>;
/**
* The ID of the Capacity Reservation Fleet.
*/
readonly capacityReservationFleetId: pulumi.Output<string>;
/**
* The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to `expired` and all of the Capacity Reservations in the Fleet expire.
*
* The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify `5/31/2019` , `13:30:55` , the Capacity Reservation Fleet is guaranteed to expire between `13:30:55` and `14:30:55` on `5/31/2019` .
*/
readonly endDate: pulumi.Output<string | undefined>;
/**
* Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.
*
* Currently, Capacity Reservation Fleets support `open` instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.
*/
readonly instanceMatchCriteria: pulumi.Output<enums.ec2.CapacityReservationFleetInstanceMatchCriteria | undefined>;
/**
* Information about the instance types for which to reserve the capacity.
*/
readonly instanceTypeSpecifications: pulumi.Output<outputs.ec2.CapacityReservationFleetInstanceTypeSpecification[] | undefined>;
/**
* Used to add an end date to a Capacity Reservation Fleet that has no end date and time. To add an end date to a Capacity Reservation Fleet, specify `true` for this paramater and specify the end date and time (in UTC time format) for the *EndDate* parameter.
*/
readonly noRemoveEndDate: pulumi.Output<boolean | undefined>;
/**
* Used to remove an end date from a Capacity Reservation Fleet that is configured to end automatically at a specific date and time. To remove the end date from a Capacity Reservation Fleet, specify `true` for this paramater and omit the *EndDate* parameter.
*/
readonly removeEndDate: pulumi.Output<boolean | undefined>;
/**
* The tags to assign to the Capacity Reservation Fleet. The tags are automatically assigned to the Capacity Reservations in the Fleet.
*/
readonly tagSpecifications: pulumi.Output<outputs.ec2.CapacityReservationFleetTagSpecification[] | undefined>;
/**
* Indicates the tenancy of the Capacity Reservation Fleet. All Capacity Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of the following tenancy settings:
*
* - `default` - The Capacity Reservation Fleet is created on hardware that is shared with other AWS accounts .
* - `dedicated` - The Capacity Reservations are created on single-tenant hardware that is dedicated to a single AWS account .
*/
readonly tenancy: pulumi.Output<enums.ec2.CapacityReservationFleetTenancy | undefined>;
/**
* The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value, together with the instance type weights that you assign to each instance type used by the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see [Total target capacity](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity) in the *Amazon EC2 User Guide* .
*/
readonly totalTargetCapacity: pulumi.Output<number | undefined>;
/**
* Create a CapacityReservationFleet resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: CapacityReservationFleetArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a CapacityReservationFleet resource.
*/
export interface CapacityReservationFleetArgs {
/**
* The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. Currently, only the `prioritized` allocation strategy is supported. For more information, see [Allocation strategy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy) in the *Amazon EC2 User Guide* .
*
* Valid values: `prioritized`
*/
allocationStrategy?: pulumi.Input<string>;
/**
* The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to `expired` and all of the Capacity Reservations in the Fleet expire.
*
* The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify `5/31/2019` , `13:30:55` , the Capacity Reservation Fleet is guaranteed to expire between `13:30:55` and `14:30:55` on `5/31/2019` .
*/
endDate?: pulumi.Input<string>;
/**
* Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.
*
* Currently, Capacity Reservation Fleets support `open` instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.
*/
instanceMatchCriteria?: pulumi.Input<enums.ec2.CapacityReservationFleetInstanceMatchCriteria>;
/**
* Information about the instance types for which to reserve the capacity.
*/
instanceTypeSpecifications?: pulumi.Input<pulumi.Input<inputs.ec2.CapacityReservationFleetInstanceTypeSpecificationArgs>[]>;
/**
* Used to add an end date to a Capacity Reservation Fleet that has no end date and time. To add an end date to a Capacity Reservation Fleet, specify `true` for this paramater and specify the end date and time (in UTC time format) for the *EndDate* parameter.
*/
noRemoveEndDate?: pulumi.Input<boolean>;
/**
* Used to remove an end date from a Capacity Reservation Fleet that is configured to end automatically at a specific date and time. To remove the end date from a Capacity Reservation Fleet, specify `true` for this paramater and omit the *EndDate* parameter.
*/
removeEndDate?: pulumi.Input<boolean>;
/**
* The tags to assign to the Capacity Reservation Fleet. The tags are automatically assigned to the Capacity Reservations in the Fleet.
*/
tagSpecifications?: pulumi.Input<pulumi.Input<inputs.ec2.CapacityReservationFleetTagSpecificationArgs>[]>;
/**
* Indicates the tenancy of the Capacity Reservation Fleet. All Capacity Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of the following tenancy settings:
*
* - `default` - The Capacity Reservation Fleet is created on hardware that is shared with other AWS accounts .
* - `dedicated` - The Capacity Reservations are created on single-tenant hardware that is dedicated to a single AWS account .
*/
tenancy?: pulumi.Input<enums.ec2.CapacityReservationFleetTenancy>;
/**
* The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value, together with the instance type weights that you assign to each instance type used by the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see [Total target capacity](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity) in the *Amazon EC2 User Guide* .
*/
totalTargetCapacity?: pulumi.Input<number>;
}