@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)
108 lines • 5.18 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.CapacityReservationFleet = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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,
* });
*
* ```
*/
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, id, opts) {
return new CapacityReservationFleet(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* 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) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === CapacityReservationFleet.__pulumiType;
}
/**
* 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, args, opts) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
resourceInputs["allocationStrategy"] = args ? args.allocationStrategy : undefined;
resourceInputs["endDate"] = args ? args.endDate : undefined;
resourceInputs["instanceMatchCriteria"] = args ? args.instanceMatchCriteria : undefined;
resourceInputs["instanceTypeSpecifications"] = args ? args.instanceTypeSpecifications : undefined;
resourceInputs["noRemoveEndDate"] = args ? args.noRemoveEndDate : undefined;
resourceInputs["removeEndDate"] = args ? args.removeEndDate : undefined;
resourceInputs["tagSpecifications"] = args ? args.tagSpecifications : undefined;
resourceInputs["tenancy"] = args ? args.tenancy : undefined;
resourceInputs["totalTargetCapacity"] = args ? args.totalTargetCapacity : undefined;
resourceInputs["capacityReservationFleetId"] = undefined /*out*/;
}
else {
resourceInputs["allocationStrategy"] = undefined /*out*/;
resourceInputs["capacityReservationFleetId"] = undefined /*out*/;
resourceInputs["endDate"] = undefined /*out*/;
resourceInputs["instanceMatchCriteria"] = undefined /*out*/;
resourceInputs["instanceTypeSpecifications"] = undefined /*out*/;
resourceInputs["noRemoveEndDate"] = undefined /*out*/;
resourceInputs["removeEndDate"] = undefined /*out*/;
resourceInputs["tagSpecifications"] = undefined /*out*/;
resourceInputs["tenancy"] = undefined /*out*/;
resourceInputs["totalTargetCapacity"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["allocationStrategy", "endDate", "instanceMatchCriteria", "instanceTypeSpecifications[*]", "tagSpecifications[*]", "tenancy"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(CapacityReservationFleet.__pulumiType, name, resourceInputs, opts);
}
}
exports.CapacityReservationFleet = CapacityReservationFleet;
/** @internal */
CapacityReservationFleet.__pulumiType = 'aws-native:ec2:CapacityReservationFleet';
//# sourceMappingURL=capacityReservationFleet.js.map