import * as core from "@terrascript/core"; export interface CapacityReservationArgs extends core.ResourceArgs { /** * (Required) The Availability Zone in which to create the Capacity Reservation. */ availabilityZone: string | core.StringOut; /** * (Optional) Indicates whether the Capacity Reservation supports EBS-optimized instances. */ ebsOptimized?: boolean | core.BooleanOut; /** * (Optional) 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. Valid val * ues: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) */ endDate?: string | core.StringOut; /** * (Optional) Indicates the way in which the Capacity Reservation ends. Specify either `unlimited` or ` * limited`. */ endDateType?: string | core.StringOut; /** * (Optional) Indicates whether the Capacity Reservation supports instances with temporary, block-level * storage. */ ephemeralStorage?: boolean | core.BooleanOut; /** * (Required) The number of instances for which to reserve capacity. */ instanceCount: number | core.NumberOut; /** * (Optional) Indicates the type of instance launches that the Capacity Reservation accepts. Specify ei * ther `open` or `targeted`. */ instanceMatchCriteria?: string | core.StringOut; /** * (Required) The type of operating system for which to reserve capacity. Valid options are `Linux/UNIX * , `Red Hat Enterprise Linux`, `SUSE Linux`, `Windows`, `Windows with SQL Server`, `Windows with SQL * Server Enterprise`, `Windows with SQL Server Standard` or `Windows with SQL Server Web`. */ instancePlatform: string | core.StringOut; /** * (Required) The instance type for which to reserve capacity. */ instanceType: string | core.StringOut; /** * (Optional) The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation * . */ outpostArn?: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block) */ tagsAll?: core.Map | core.MapOut; /** * (Optional) Indicates the tenancy of the Capacity Reservation. Specify either `default` or `dedicated * . */ tenancy?: string | core.StringOut; } export class CapacityReservation extends core.Resource { /** * The ARN of the Capacity Reservation. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Required) The Availability Zone in which to create the Capacity Reservation. */ @core.attr(String) public availabilityZone!: string | core.StringOut; /** * (Optional) Indicates whether the Capacity Reservation supports EBS-optimized instances. */ @core.attr(Boolean) public ebsOptimized?: boolean | core.BooleanOut; /** * (Optional) 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. Valid val * ues: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) */ @core.attr(String) public endDate?: string | core.StringOut; /** * (Optional) Indicates the way in which the Capacity Reservation ends. Specify either `unlimited` or ` * limited`. */ @core.attr(String) public endDateType?: string | core.StringOut; /** * (Optional) Indicates whether the Capacity Reservation supports instances with temporary, block-level * storage. */ @core.attr(Boolean) public ephemeralStorage?: boolean | core.BooleanOut; /** * The Capacity Reservation ID. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required) The number of instances for which to reserve capacity. */ @core.attr(Number) public instanceCount!: number | core.NumberOut; /** * (Optional) Indicates the type of instance launches that the Capacity Reservation accepts. Specify ei * ther `open` or `targeted`. */ @core.attr(String) public instanceMatchCriteria?: string | core.StringOut; /** * (Required) The type of operating system for which to reserve capacity. Valid options are `Linux/UNIX * , `Red Hat Enterprise Linux`, `SUSE Linux`, `Windows`, `Windows with SQL Server`, `Windows with SQL * Server Enterprise`, `Windows with SQL Server Standard` or `Windows with SQL Server Web`. */ @core.attr(String) public instancePlatform!: string | core.StringOut; /** * (Required) The instance type for which to reserve capacity. */ @core.attr(String) public instanceType!: string | core.StringOut; /** * (Optional) The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation * . */ @core.attr(String) public outpostArn?: string | core.StringOut; /** * The ID of the AWS account that owns the Capacity Reservation. */ @core.attr(String, { computed: true }) public ownerId!: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev * el. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block) */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional) Indicates the tenancy of the Capacity Reservation. Specify either `default` or `dedicated * . */ @core.attr(String) public tenancy?: string | core.StringOut; constructor(name: string, args?: CapacityReservationArgs) { super(name, "aws_ec2_capacity_reservation", args); } public override getNamespace(): string { return "aws_ec2"; } }