We recommend new projects start with resources from the AWS provider.
aws-native.ec2.CapacityReservation
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Resource Type definition for AWS::EC2::CapacityReservation
Create CapacityReservation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CapacityReservation(name: string, args: CapacityReservationArgs, opts?: CustomResourceOptions);
@overload
def CapacityReservation(resource_name: str,
args: CapacityReservationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CapacityReservation(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_type: Optional[str] = None,
instance_platform: Optional[str] = None,
instance_count: Optional[int] = None,
out_post_arn: Optional[str] = None,
end_date_type: Optional[str] = None,
ephemeral_storage: Optional[bool] = None,
availability_zone_id: Optional[str] = None,
end_date: Optional[str] = None,
ebs_optimized: Optional[bool] = None,
availability_zone: Optional[str] = None,
instance_match_criteria: Optional[str] = None,
placement_group_arn: Optional[str] = None,
tag_specifications: Optional[Sequence[CapacityReservationTagSpecificationArgs]] = None,
tenancy: Optional[str] = None,
unused_reservation_billing_owner_id: Optional[str] = None)
func NewCapacityReservation(ctx *Context, name string, args CapacityReservationArgs, opts ...ResourceOption) (*CapacityReservation, error)
public CapacityReservation(string name, CapacityReservationArgs args, CustomResourceOptions? opts = null)
public CapacityReservation(String name, CapacityReservationArgs args)
public CapacityReservation(String name, CapacityReservationArgs args, CustomResourceOptions options)
type: aws-native:ec2:CapacityReservation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CapacityReservationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CapacityReservationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CapacityReservationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CapacityReservationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CapacityReservationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CapacityReservation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CapacityReservation resource accepts the following input properties:
- Instance
Count int 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
- Instance
Platform string - The type of operating system for which to reserve capacity.
- Instance
Type string The instance type for which to reserve capacity.
You can request future-dated Capacity Reservations for instance types in the C, M, R, I, and T instance families only.
For more information, see Instance types in the Amazon EC2 User Guide .
- Availability
Zone string - The Availability Zone in which to create the Capacity Reservation.
- Availability
Zone stringId - The Availability Zone ID of the Capacity Reservation.
- Ebs
Optimized bool - Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
- End
Date 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 ifEndDateType
islimited
. OmitEndDate
ifEndDateType
isunlimited
.If the
EndDateType
islimited
, 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.
- End
Date stringType - 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 anEndDate
if theEndDateType
isunlimited
.limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.
- Ephemeral
Storage bool - Deprecated.
- Instance
Match stringCriteria 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
- Out
Post stringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
- Placement
Group stringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .
- List<Pulumi.
Aws Native. Ec2. Inputs. Capacity Reservation Tag Specification> - The tags to apply to the Capacity Reservation during launch.
- Tenancy string
- Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
default
- The Capacity Reservation is created on hardware that is shared with other AWS accounts .dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .
- Unused
Reservation stringBilling Owner Id The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation. A request will be sent to the specified account. That account must accept the request for the billing to be assigned to their account. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations .
You can assign billing only for shared Capacity Reservations. To share a Capacity Reservation, you must add it to a resource share. For more information, see AWS::RAM::ResourceShare .
- Instance
Count int 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
- Instance
Platform string - The type of operating system for which to reserve capacity.
- Instance
Type string The instance type for which to reserve capacity.
You can request future-dated Capacity Reservations for instance types in the C, M, R, I, and T instance families only.
For more information, see Instance types in the Amazon EC2 User Guide .
- Availability
Zone string - The Availability Zone in which to create the Capacity Reservation.
- Availability
Zone stringId - The Availability Zone ID of the Capacity Reservation.
- Ebs
Optimized bool - Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
- End
Date 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 ifEndDateType
islimited
. OmitEndDate
ifEndDateType
isunlimited
.If the
EndDateType
islimited
, 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.
- End
Date stringType - 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 anEndDate
if theEndDateType
isunlimited
.limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.
- Ephemeral
Storage bool - Deprecated.
- Instance
Match stringCriteria 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
- Out
Post stringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
- Placement
Group stringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .
- []Capacity
Reservation Tag Specification Args - The tags to apply to the Capacity Reservation during launch.
- Tenancy string
- Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
default
- The Capacity Reservation is created on hardware that is shared with other AWS accounts .dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .
- Unused
Reservation stringBilling Owner Id The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation. A request will be sent to the specified account. That account must accept the request for the billing to be assigned to their account. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations .
You can assign billing only for shared Capacity Reservations. To share a Capacity Reservation, you must add it to a resource share. For more information, see AWS::RAM::ResourceShare .
- instance
Count Integer 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
- instance
Platform String - The type of operating system for which to reserve capacity.
- instance
Type String The instance type for which to reserve capacity.
You can request future-dated Capacity Reservations for instance types in the C, M, R, I, and T instance families only.
For more information, see Instance types in the Amazon EC2 User Guide .
- availability
Zone String - The Availability Zone in which to create the Capacity Reservation.
- availability
Zone StringId - The Availability Zone ID of the Capacity Reservation.
- ebs
Optimized Boolean - Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
- end
Date 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 ifEndDateType
islimited
. OmitEndDate
ifEndDateType
isunlimited
.If the
EndDateType
islimited
, 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.
- end
Date StringType - 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 anEndDate
if theEndDateType
isunlimited
.limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.
- ephemeral
Storage Boolean - Deprecated.
- instance
Match StringCriteria 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
- out
Post StringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
- placement
Group StringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .
- List<Capacity
Reservation Tag Specification> - The tags to apply to the Capacity Reservation during launch.
- tenancy String
- Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
default
- The Capacity Reservation is created on hardware that is shared with other AWS accounts .dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .
- unused
Reservation StringBilling Owner Id The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation. A request will be sent to the specified account. That account must accept the request for the billing to be assigned to their account. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations .
You can assign billing only for shared Capacity Reservations. To share a Capacity Reservation, you must add it to a resource share. For more information, see AWS::RAM::ResourceShare .
- instance
Count number 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
- instance
Platform string - The type of operating system for which to reserve capacity.
- instance
Type string The instance type for which to reserve capacity.
You can request future-dated Capacity Reservations for instance types in the C, M, R, I, and T instance families only.
For more information, see Instance types in the Amazon EC2 User Guide .
- availability
Zone string - The Availability Zone in which to create the Capacity Reservation.
- availability
Zone stringId - The Availability Zone ID of the Capacity Reservation.
- ebs
Optimized boolean - Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
- end
Date 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 ifEndDateType
islimited
. OmitEndDate
ifEndDateType
isunlimited
.If the
EndDateType
islimited
, 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.
- end
Date stringType - 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 anEndDate
if theEndDateType
isunlimited
.limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.
- ephemeral
Storage boolean - Deprecated.
- instance
Match stringCriteria 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
- out
Post stringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
- placement
Group stringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .
- Capacity
Reservation Tag Specification[] - The tags to apply to the Capacity Reservation during launch.
- tenancy string
- Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
default
- The Capacity Reservation is created on hardware that is shared with other AWS accounts .dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .
- unused
Reservation stringBilling Owner Id The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation. A request will be sent to the specified account. That account must accept the request for the billing to be assigned to their account. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations .
You can assign billing only for shared Capacity Reservations. To share a Capacity Reservation, you must add it to a resource share. For more information, see AWS::RAM::ResourceShare .
- instance_
count int 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
- instance_
platform str - The type of operating system for which to reserve capacity.
- instance_
type str The instance type for which to reserve capacity.
You can request future-dated Capacity Reservations for instance types in the C, M, R, I, and T instance families only.
For more information, see Instance types in the Amazon EC2 User Guide .
- availability_
zone str - The Availability Zone in which to create the Capacity Reservation.
- availability_
zone_ strid - The Availability Zone ID of the Capacity Reservation.
- ebs_
optimized bool - Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
- end_
date str 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 ifEndDateType
islimited
. OmitEndDate
ifEndDateType
isunlimited
.If the
EndDateType
islimited
, 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.
- end_
date_ strtype - 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 anEndDate
if theEndDateType
isunlimited
.limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.
- ephemeral_
storage bool - Deprecated.
- instance_
match_ strcriteria 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
- out_
post_ strarn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
- placement_
group_ strarn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .
- tag_
specifications Sequence[CapacityReservation Tag Specification Args] - The tags to apply to the Capacity Reservation during launch.
- tenancy str
- Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
default
- The Capacity Reservation is created on hardware that is shared with other AWS accounts .dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .
- unused_
reservation_ strbilling_ owner_ id The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation. A request will be sent to the specified account. That account must accept the request for the billing to be assigned to their account. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations .
You can assign billing only for shared Capacity Reservations. To share a Capacity Reservation, you must add it to a resource share. For more information, see AWS::RAM::ResourceShare .
- instance
Count Number 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
- instance
Platform String - The type of operating system for which to reserve capacity.
- instance
Type String The instance type for which to reserve capacity.
You can request future-dated Capacity Reservations for instance types in the C, M, R, I, and T instance families only.
For more information, see Instance types in the Amazon EC2 User Guide .
- availability
Zone String - The Availability Zone in which to create the Capacity Reservation.
- availability
Zone StringId - The Availability Zone ID of the Capacity Reservation.
- ebs
Optimized Boolean - Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
- end
Date 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 ifEndDateType
islimited
. OmitEndDate
ifEndDateType
isunlimited
.If the
EndDateType
islimited
, 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.
- end
Date StringType - 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 anEndDate
if theEndDateType
isunlimited
.limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value if theEndDateType
value islimited
.
- ephemeral
Storage Boolean - Deprecated.
- instance
Match StringCriteria 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
- out
Post StringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
- placement
Group StringArn Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .
- List<Property Map>
- The tags to apply to the Capacity Reservation during launch.
- tenancy String
- Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
default
- The Capacity Reservation is created on hardware that is shared with other AWS accounts .dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .
- unused
Reservation StringBilling Owner Id The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation. A request will be sent to the specified account. That account must accept the request for the billing to be assigned to their account. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations .
You can assign billing only for shared Capacity Reservations. To share a Capacity Reservation, you must add it to a resource share. For more information, see AWS::RAM::ResourceShare .
Outputs
All input properties are implicitly available as output properties. Additionally, the CapacityReservation resource produces the following output properties:
- Available
Instance intCount - Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example:
9
. - Aws
Id string - The ID of the Capacity Reservation.
- Capacity
Allocation List<Pulumi.Set Aws Native. Ec2. Outputs. Capacity Reservation Capacity Allocation> - Capacity
Reservation stringArn - The Amazon Resource Name (ARN) of the Capacity Reservation.
- Capacity
Reservation stringFleet Id - 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.
- Commitment
Info Pulumi.Aws Native. Ec2. Outputs. Commitment Info Properties - Create
Date string - The date and time at which the Capacity Reservation was created.
- Delivery
Preference 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. - Id string
- The provider-assigned unique ID for this managed resource.
- Owner
Id string - The ID of the AWS account that owns the Capacity Reservation.
- Reservation
Type string - The type of Capacity Reservation.
- Start
Date string - The date and time at which the Capacity Reservation was started.
- State 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.
- Total
Instance intCount - Returns the total number of instances for which the Capacity Reservation reserves capacity. For example:
15
.
- Available
Instance intCount - Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example:
9
. - Aws
Id string - The ID of the Capacity Reservation.
- Capacity
Allocation []CapacitySet Reservation Capacity Allocation - Capacity
Reservation stringArn - The Amazon Resource Name (ARN) of the Capacity Reservation.
- Capacity
Reservation stringFleet Id - 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.
- Commitment
Info CommitmentInfo Properties - Create
Date string - The date and time at which the Capacity Reservation was created.
- Delivery
Preference 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. - Id string
- The provider-assigned unique ID for this managed resource.
- Owner
Id string - The ID of the AWS account that owns the Capacity Reservation.
- Reservation
Type string - The type of Capacity Reservation.
- Start
Date string - The date and time at which the Capacity Reservation was started.
- State 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.
- Total
Instance intCount - Returns the total number of instances for which the Capacity Reservation reserves capacity. For example:
15
.
- available
Instance IntegerCount - Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example:
9
. - aws
Id String - The ID of the Capacity Reservation.
- capacity
Allocation List<CapacitySet Reservation Capacity Allocation> - capacity
Reservation StringArn - The Amazon Resource Name (ARN) of the Capacity Reservation.
- capacity
Reservation StringFleet Id - 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.
- commitment
Info CommitmentInfo Properties - create
Date String - The date and time at which the Capacity Reservation was created.
- delivery
Preference 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. - id String
- The provider-assigned unique ID for this managed resource.
- owner
Id String - The ID of the AWS account that owns the Capacity Reservation.
- reservation
Type String - The type of Capacity Reservation.
- start
Date String - The date and time at which the Capacity Reservation was started.
- state 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.
- total
Instance IntegerCount - Returns the total number of instances for which the Capacity Reservation reserves capacity. For example:
15
.
- available
Instance numberCount - Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example:
9
. - aws
Id string - The ID of the Capacity Reservation.
- capacity
Allocation CapacitySet Reservation Capacity Allocation[] - capacity
Reservation stringArn - The Amazon Resource Name (ARN) of the Capacity Reservation.
- capacity
Reservation stringFleet Id - 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.
- commitment
Info CommitmentInfo Properties - create
Date string - The date and time at which the Capacity Reservation was created.
- delivery
Preference 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. - id string
- The provider-assigned unique ID for this managed resource.
- owner
Id string - The ID of the AWS account that owns the Capacity Reservation.
- reservation
Type string - The type of Capacity Reservation.
- start
Date string - The date and time at which the Capacity Reservation was started.
- state 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.
- total
Instance numberCount - Returns the total number of instances for which the Capacity Reservation reserves capacity. For example:
15
.
- available_
instance_ intcount - Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example:
9
. - aws_
id str - The ID of the Capacity Reservation.
- capacity_
allocation_ Sequence[Capacityset Reservation Capacity Allocation] - capacity_
reservation_ strarn - The Amazon Resource Name (ARN) of the Capacity Reservation.
- capacity_
reservation_ strfleet_ id - 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.
- commitment_
info CommitmentInfo Properties - create_
date str - The date and time at which the Capacity Reservation was created.
- delivery_
preference str - 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. - id str
- The provider-assigned unique ID for this managed resource.
- owner_
id str - The ID of the AWS account that owns the Capacity Reservation.
- reservation_
type str - The type of Capacity Reservation.
- start_
date str - The date and time at which the Capacity Reservation was started.
- state str
- 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.
- total_
instance_ intcount - Returns the total number of instances for which the Capacity Reservation reserves capacity. For example:
15
.
- available
Instance NumberCount - Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example:
9
. - aws
Id String - The ID of the Capacity Reservation.
- capacity
Allocation List<Property Map>Set - capacity
Reservation StringArn - The Amazon Resource Name (ARN) of the Capacity Reservation.
- capacity
Reservation StringFleet Id - 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.
- commitment
Info Property Map - create
Date String - The date and time at which the Capacity Reservation was created.
- delivery
Preference 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. - id String
- The provider-assigned unique ID for this managed resource.
- owner
Id String - The ID of the AWS account that owns the Capacity Reservation.
- reservation
Type String - The type of Capacity Reservation.
- start
Date String - The date and time at which the Capacity Reservation was started.
- state 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.
- total
Instance NumberCount - Returns the total number of instances for which the Capacity Reservation reserves capacity. For example:
15
.
Supporting Types
CapacityReservationCapacityAllocation, CapacityReservationCapacityAllocationArgs
- Allocation
Type string - The usage type.
used
indicates that the instance capacity is in use by instances that are running in the Capacity Reservation. - Count int
- The amount of instance capacity associated with the usage. For example a value of
4
indicates that instance capacity for 4 instances is currently in use.
- Allocation
Type string - The usage type.
used
indicates that the instance capacity is in use by instances that are running in the Capacity Reservation. - Count int
- The amount of instance capacity associated with the usage. For example a value of
4
indicates that instance capacity for 4 instances is currently in use.
- allocation
Type String - The usage type.
used
indicates that the instance capacity is in use by instances that are running in the Capacity Reservation. - count Integer
- The amount of instance capacity associated with the usage. For example a value of
4
indicates that instance capacity for 4 instances is currently in use.
- allocation
Type string - The usage type.
used
indicates that the instance capacity is in use by instances that are running in the Capacity Reservation. - count number
- The amount of instance capacity associated with the usage. For example a value of
4
indicates that instance capacity for 4 instances is currently in use.
- allocation_
type str - The usage type.
used
indicates that the instance capacity is in use by instances that are running in the Capacity Reservation. - count int
- The amount of instance capacity associated with the usage. For example a value of
4
indicates that instance capacity for 4 instances is currently in use.
- allocation
Type String - The usage type.
used
indicates that the instance capacity is in use by instances that are running in the Capacity Reservation. - count Number
- The amount of instance capacity associated with the usage. For example a value of
4
indicates that instance capacity for 4 instances is currently in use.
CapacityReservationTag, CapacityReservationTagArgs
CapacityReservationTagSpecification, CapacityReservationTagSpecificationArgs
- Resource
Type string - The type of resource to tag. Specify
capacity-reservation
. - List<Pulumi.
Aws Native. Ec2. Inputs. Capacity Reservation Tag> - The tags to apply to the resource.
- Resource
Type string - The type of resource to tag. Specify
capacity-reservation
. - []Capacity
Reservation Tag - The tags to apply to the resource.
- resource
Type String - The type of resource to tag. Specify
capacity-reservation
. - List<Capacity
Reservation Tag> - The tags to apply to the resource.
- resource
Type string - The type of resource to tag. Specify
capacity-reservation
. - Capacity
Reservation Tag[] - The tags to apply to the resource.
- resource_
type str - The type of resource to tag. Specify
capacity-reservation
. - Sequence[Capacity
Reservation Tag] - The tags to apply to the resource.
- resource
Type String - The type of resource to tag. Specify
capacity-reservation
. - List<Property Map>
- The tags to apply to the resource.
CommitmentInfoProperties, CommitmentInfoPropertiesArgs
- Commitment
End stringDate - The date and time at which the commitment duration expires, in the ISO8601 format in the UTC time zone (
YYYY-MM-DDThh:mm:ss.sssZ
). You can't decrease the instance count or cancel the Capacity Reservation before this date and time. - Committed
Instance intCount - The instance capacity that you committed to when you requested the future-dated Capacity Reservation.
- Commitment
End stringDate - The date and time at which the commitment duration expires, in the ISO8601 format in the UTC time zone (
YYYY-MM-DDThh:mm:ss.sssZ
). You can't decrease the instance count or cancel the Capacity Reservation before this date and time. - Committed
Instance intCount - The instance capacity that you committed to when you requested the future-dated Capacity Reservation.
- commitment
End StringDate - The date and time at which the commitment duration expires, in the ISO8601 format in the UTC time zone (
YYYY-MM-DDThh:mm:ss.sssZ
). You can't decrease the instance count or cancel the Capacity Reservation before this date and time. - committed
Instance IntegerCount - The instance capacity that you committed to when you requested the future-dated Capacity Reservation.
- commitment
End stringDate - The date and time at which the commitment duration expires, in the ISO8601 format in the UTC time zone (
YYYY-MM-DDThh:mm:ss.sssZ
). You can't decrease the instance count or cancel the Capacity Reservation before this date and time. - committed
Instance numberCount - The instance capacity that you committed to when you requested the future-dated Capacity Reservation.
- commitment_
end_ strdate - The date and time at which the commitment duration expires, in the ISO8601 format in the UTC time zone (
YYYY-MM-DDThh:mm:ss.sssZ
). You can't decrease the instance count or cancel the Capacity Reservation before this date and time. - committed_
instance_ intcount - The instance capacity that you committed to when you requested the future-dated Capacity Reservation.
- commitment
End StringDate - The date and time at which the commitment duration expires, in the ISO8601 format in the UTC time zone (
YYYY-MM-DDThh:mm:ss.sssZ
). You can't decrease the instance count or cancel the Capacity Reservation before this date and time. - committed
Instance NumberCount - The instance capacity that you committed to when you requested the future-dated Capacity Reservation.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.