We recommend new projects start with resources from the AWS provider.
aws-native.ec2.getCapacityReservation
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Resource Type definition for AWS::EC2::CapacityReservation
Using getCapacityReservation
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCapacityReservation(args: GetCapacityReservationArgs, opts?: InvokeOptions): Promise<GetCapacityReservationResult>
function getCapacityReservationOutput(args: GetCapacityReservationOutputArgs, opts?: InvokeOptions): Output<GetCapacityReservationResult>def get_capacity_reservation(id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetCapacityReservationResult
def get_capacity_reservation_output(id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetCapacityReservationResult]func LookupCapacityReservation(ctx *Context, args *LookupCapacityReservationArgs, opts ...InvokeOption) (*LookupCapacityReservationResult, error)
func LookupCapacityReservationOutput(ctx *Context, args *LookupCapacityReservationOutputArgs, opts ...InvokeOption) LookupCapacityReservationResultOutput> Note: This function is named LookupCapacityReservation in the Go SDK.
public static class GetCapacityReservation 
{
    public static Task<GetCapacityReservationResult> InvokeAsync(GetCapacityReservationArgs args, InvokeOptions? opts = null)
    public static Output<GetCapacityReservationResult> Invoke(GetCapacityReservationInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCapacityReservationResult> getCapacityReservation(GetCapacityReservationArgs args, InvokeOptions options)
public static Output<GetCapacityReservationResult> getCapacityReservation(GetCapacityReservationArgs args, InvokeOptions options)
fn::invoke:
  function: aws-native:ec2:getCapacityReservation
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Id string
- The ID of the Capacity Reservation.
- Id string
- The ID of the Capacity Reservation.
- id String
- The ID of the Capacity Reservation.
- id string
- The ID of the Capacity Reservation.
- id str
- The ID of the Capacity Reservation.
- id String
- The ID of the Capacity Reservation.
getCapacityReservation Result
The following output properties are available:
- AvailableInstance intCount 
- Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example: 9.
- EndDate 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 - expiredwhen it reaches its end date and time.- You must provide an - EndDatevalue if- EndDateTypeis- limited. Omit- EndDateif- EndDateTypeis- unlimited.- If the - EndDateTypeis- limited, 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. 
- EndDate 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 an- EndDateif the- EndDateTypeis- unlimited.
- limited- The Capacity Reservation expires automatically at a specified date and time. You must provide an- EndDatevalue if the- EndDateTypevalue is- limited.
 
- Id string
- The ID of the Capacity Reservation.
- InstanceCount 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.xlargeinstances, you must request at least 25 instances ( 25 * m5.xlarge = 100 vCPUs ).- Valid range: 1 - 1000 
- InstanceMatch 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
- TotalInstance intCount 
- Returns the total number of instances for which the Capacity Reservation reserves capacity. For example: 15.
- AvailableInstance intCount 
- Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example: 9.
- EndDate 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 - expiredwhen it reaches its end date and time.- You must provide an - EndDatevalue if- EndDateTypeis- limited. Omit- EndDateif- EndDateTypeis- unlimited.- If the - EndDateTypeis- limited, 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. 
- EndDate 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 an- EndDateif the- EndDateTypeis- unlimited.
- limited- The Capacity Reservation expires automatically at a specified date and time. You must provide an- EndDatevalue if the- EndDateTypevalue is- limited.
 
- Id string
- The ID of the Capacity Reservation.
- InstanceCount 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.xlargeinstances, you must request at least 25 instances ( 25 * m5.xlarge = 100 vCPUs ).- Valid range: 1 - 1000 
- InstanceMatch 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
- TotalInstance intCount 
- Returns the total number of instances for which the Capacity Reservation reserves capacity. For example: 15.
- availableInstance IntegerCount 
- Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example: 9.
- endDate 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 - expiredwhen it reaches its end date and time.- You must provide an - EndDatevalue if- EndDateTypeis- limited. Omit- EndDateif- EndDateTypeis- unlimited.- If the - EndDateTypeis- limited, 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. 
- endDate 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 an- EndDateif the- EndDateTypeis- unlimited.
- limited- The Capacity Reservation expires automatically at a specified date and time. You must provide an- EndDatevalue if the- EndDateTypevalue is- limited.
 
- id String
- The ID of the Capacity Reservation.
- instanceCount 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.xlargeinstances, you must request at least 25 instances ( 25 * m5.xlarge = 100 vCPUs ).- Valid range: 1 - 1000 
- instanceMatch 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
- totalInstance IntegerCount 
- Returns the total number of instances for which the Capacity Reservation reserves capacity. For example: 15.
- availableInstance numberCount 
- Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example: 9.
- endDate 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 - expiredwhen it reaches its end date and time.- You must provide an - EndDatevalue if- EndDateTypeis- limited. Omit- EndDateif- EndDateTypeis- unlimited.- If the - EndDateTypeis- limited, 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. 
- endDate 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 an- EndDateif the- EndDateTypeis- unlimited.
- limited- The Capacity Reservation expires automatically at a specified date and time. You must provide an- EndDatevalue if the- EndDateTypevalue is- limited.
 
- id string
- The ID of the Capacity Reservation.
- instanceCount 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.xlargeinstances, you must request at least 25 instances ( 25 * m5.xlarge = 100 vCPUs ).- Valid range: 1 - 1000 
- instanceMatch 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
- totalInstance 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.
- 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 - expiredwhen it reaches its end date and time.- You must provide an - EndDatevalue if- EndDateTypeis- limited. Omit- EndDateif- EndDateTypeis- unlimited.- If the - EndDateTypeis- limited, 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 an- EndDateif the- EndDateTypeis- unlimited.
- limited- The Capacity Reservation expires automatically at a specified date and time. You must provide an- EndDatevalue if the- EndDateTypevalue is- limited.
 
- id str
- The ID of the Capacity Reservation.
- 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.xlargeinstances, you must request at least 25 instances ( 25 * m5.xlarge = 100 vCPUs ).- Valid range: 1 - 1000 
- 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
- total_instance_ intcount 
- Returns the total number of instances for which the Capacity Reservation reserves capacity. For example: 15.
- availableInstance NumberCount 
- Returns the remaining capacity, which indicates the number of instances that can be launched in the Capacity Reservation. For example: 9.
- endDate 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 - expiredwhen it reaches its end date and time.- You must provide an - EndDatevalue if- EndDateTypeis- limited. Omit- EndDateif- EndDateTypeis- unlimited.- If the - EndDateTypeis- limited, 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. 
- endDate 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 an- EndDateif the- EndDateTypeis- unlimited.
- limited- The Capacity Reservation expires automatically at a specified date and time. You must provide an- EndDatevalue if the- EndDateTypevalue is- limited.
 
- id String
- The ID of the Capacity Reservation.
- instanceCount 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.xlargeinstances, you must request at least 25 instances ( 25 * m5.xlarge = 100 vCPUs ).- Valid range: 1 - 1000 
- instanceMatch 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
- totalInstance NumberCount 
- Returns the total number of instances for which the Capacity Reservation reserves capacity. For example: 15.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.