published on Tuesday, Jul 14, 2026 by Pulumi
published on Tuesday, Jul 14, 2026 by Pulumi
Information about an existing EC2 Capacity Block reservation.
This data source returns only Capacity Reservations whose reservationType is capacity-block. Use the aws.ec2.CapacityReservation data source to look up On-Demand Capacity Reservations (ODCR).
At least one of id or filter must be specified. Filter combinations that match multiple Capacity Block reservations will return an error.
Example Usage
Lookup by ID
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2.getCapacityBlockReservation({
id: "cr-0123456789abcdef0",
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.get_capacity_block_reservation(id="cr-0123456789abcdef0")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.LookupCapacityBlockReservation(ctx, &ec2.LookupCapacityBlockReservationArgs{
Id: pulumi.StringRef("cr-0123456789abcdef0"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ec2.GetCapacityBlockReservation.Invoke(new()
{
Id = "cr-0123456789abcdef0",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetCapacityBlockReservationArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Ec2Functions.getCapacityBlockReservation(GetCapacityBlockReservationArgs.builder()
.id("cr-0123456789abcdef0")
.build());
}
}
variables:
example:
fn::invoke:
function: aws:ec2:getCapacityBlockReservation
arguments:
id: cr-0123456789abcdef0
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_ec2_getcapacityblockreservation" "example" {
id = "cr-0123456789abcdef0"
}
Lookup by filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2.getCapacityBlockReservation({
filters: [
{
name: "instance-type",
values: ["p4d.24xlarge"],
},
{
name: "state",
values: ["active"],
},
],
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.get_capacity_block_reservation(filters=[
{
"name": "instance-type",
"values": ["p4d.24xlarge"],
},
{
"name": "state",
"values": ["active"],
},
])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.LookupCapacityBlockReservation(ctx, &ec2.LookupCapacityBlockReservationArgs{
Filters: []ec2.GetCapacityBlockReservationFilter{
{
Name: "instance-type",
Values: []string{
"p4d.24xlarge",
},
},
{
Name: "state",
Values: []string{
"active",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ec2.GetCapacityBlockReservation.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2.Inputs.GetCapacityBlockReservationFilterInputArgs
{
Name = "instance-type",
Values = new[]
{
"p4d.24xlarge",
},
},
new Aws.Ec2.Inputs.GetCapacityBlockReservationFilterInputArgs
{
Name = "state",
Values = new[]
{
"active",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetCapacityBlockReservationArgs;
import com.pulumi.aws.ec2.inputs.GetCapacityBlockReservationFilterArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Ec2Functions.getCapacityBlockReservation(GetCapacityBlockReservationArgs.builder()
.filters(
GetCapacityBlockReservationFilterArgs.builder()
.name("instance-type")
.values("p4d.24xlarge")
.build(),
GetCapacityBlockReservationFilterArgs.builder()
.name("state")
.values("active")
.build())
.build());
}
}
variables:
example:
fn::invoke:
function: aws:ec2:getCapacityBlockReservation
arguments:
filters:
- name: instance-type
values:
- p4d.24xlarge
- name: state
values:
- active
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_ec2_getcapacityblockreservation" "example" {
filters {
name = "instance-type"
values = ["p4d.24xlarge"]
}
filters {
name = "state"
values = ["active"]
}
}
Lookup by tag
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2.getCapacityBlockReservation({
filters: [{
name: "tag:Project",
values: ["ml-training"],
}],
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.get_capacity_block_reservation(filters=[{
"name": "tag:Project",
"values": ["ml-training"],
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2.LookupCapacityBlockReservation(ctx, &ec2.LookupCapacityBlockReservationArgs{
Filters: []ec2.GetCapacityBlockReservationFilter{
{
Name: "tag:Project",
Values: []string{
"ml-training",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ec2.GetCapacityBlockReservation.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2.Inputs.GetCapacityBlockReservationFilterInputArgs
{
Name = "tag:Project",
Values = new[]
{
"ml-training",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetCapacityBlockReservationArgs;
import com.pulumi.aws.ec2.inputs.GetCapacityBlockReservationFilterArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = Ec2Functions.getCapacityBlockReservation(GetCapacityBlockReservationArgs.builder()
.filters(GetCapacityBlockReservationFilterArgs.builder()
.name("tag:Project")
.values("ml-training")
.build())
.build());
}
}
variables:
example:
fn::invoke:
function: aws:ec2:getCapacityBlockReservation
arguments:
filters:
- name: tag:Project
values:
- ml-training
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
data "aws_ec2_getcapacityblockreservation" "example" {
filters {
name = "tag:Project"
values = ["ml-training"]
}
}
Using getCapacityBlockReservation
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 getCapacityBlockReservation(args: GetCapacityBlockReservationArgs, opts?: InvokeOptions): Promise<GetCapacityBlockReservationResult>
function getCapacityBlockReservationOutput(args: GetCapacityBlockReservationOutputArgs, opts?: InvokeOptions): Output<GetCapacityBlockReservationResult>def get_capacity_block_reservation(filters: Optional[Sequence[GetCapacityBlockReservationFilter]] = None,
id: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCapacityBlockReservationResult
def get_capacity_block_reservation_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetCapacityBlockReservationFilterArgs]]]] = None,
id: pulumi.Input[Optional[str]] = None,
region: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCapacityBlockReservationResult]func LookupCapacityBlockReservation(ctx *Context, args *LookupCapacityBlockReservationArgs, opts ...InvokeOption) (*LookupCapacityBlockReservationResult, error)
func LookupCapacityBlockReservationOutput(ctx *Context, args *LookupCapacityBlockReservationOutputArgs, opts ...InvokeOption) LookupCapacityBlockReservationResultOutput> Note: This function is named LookupCapacityBlockReservation in the Go SDK.
public static class GetCapacityBlockReservation
{
public static Task<GetCapacityBlockReservationResult> InvokeAsync(GetCapacityBlockReservationArgs args, InvokeOptions? opts = null)
public static Output<GetCapacityBlockReservationResult> Invoke(GetCapacityBlockReservationInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCapacityBlockReservationResult> getCapacityBlockReservation(GetCapacityBlockReservationArgs args, InvokeOptions options)
public static Output<GetCapacityBlockReservationResult> getCapacityBlockReservation(GetCapacityBlockReservationArgs args, InvokeOptions options)
fn::invoke:
function: aws:ec2/getCapacityBlockReservation:getCapacityBlockReservation
arguments:
# arguments dictionarydata "aws_ec2_getcapacityblockreservation" "name" {
# arguments
}The following arguments are supported:
- Filters
List<Get
Capacity Block Reservation Filter> - Configuration block(s) for filtering. Detailed below.
- Id string
- ID of the Capacity Block reservation to retrieve.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Filters
[]Get
Capacity Block Reservation Filter - Configuration block(s) for filtering. Detailed below.
- Id string
- ID of the Capacity Block reservation to retrieve.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- filters list(object)
- Configuration block(s) for filtering. Detailed below.
- id string
- ID of the Capacity Block reservation to retrieve.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- filters
List<Get
Capacity Block Reservation Filter> - Configuration block(s) for filtering. Detailed below.
- id String
- ID of the Capacity Block reservation to retrieve.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- filters
Get
Capacity Block Reservation Filter[] - Configuration block(s) for filtering. Detailed below.
- id string
- ID of the Capacity Block reservation to retrieve.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- filters
Sequence[Get
Capacity Block Reservation Filter] - Configuration block(s) for filtering. Detailed below.
- id str
- ID of the Capacity Block reservation to retrieve.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- filters List<Property Map>
- Configuration block(s) for filtering. Detailed below.
- id String
- ID of the Capacity Block reservation to retrieve.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
getCapacityBlockReservation Result
The following output properties are available:
- Arn string
- ARN of the Capacity Block reservation.
- Availability
Zone string - Availability Zone in which the capacity is reserved.
- Availability
Zone stringId - ID of the Availability Zone in which the capacity is reserved.
- Available
Instance intCount - Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
- Capacity
Block stringId - ID of the underlying Capacity Block.
- Commitment
Info GetCapacity Block Reservation Commitment Info - Information about your commitment for a future-dated Capacity Block reservation. See
commitmentInfoAttribute Reference below. - Created
Date string - Date and time the Capacity Block reservation was created in RFC3339 format.
- Delivery
Preference string - Delivery method for a future-dated Capacity Block reservation. Either
fixedorincremental. - Ebs
Optimized bool - Whether the Capacity Block reservation supports EBS-optimized instances.
- End
Date string - Date and time the Capacity Block reservation expires in RFC3339 format.
- End
Date stringType - End type of the Capacity Block reservation. Either
limitedorunlimited. - Id string
- Instance
Count int - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- Instance
Match stringCriteria - Type of instance launches that the Capacity Block accepts. Either
openortargeted. - Instance
Platform string - Operating system platform for which the Capacity Block reserves capacity.
- Instance
Type string - Instance type for which the Capacity Block reserves capacity.
- Interruptible
Capacity GetAllocation Capacity Block Reservation Interruptible Capacity Allocation - Information about the interruptible capacity allocation, if applicable. See
interruptibleCapacityAllocationAttribute Reference below. - Interruption
Info GetCapacity Block Reservation Interruption Info - Information about an interrupted Capacity Block reservation, if applicable. See
interruptionInfoAttribute Reference below. - Outpost
Arn string - ARN of the Outpost on which the Capacity Block was created, if applicable.
- Owner
Id string - ID of the AWS account that owns the Capacity Block reservation.
- Placement
Group stringArn - ARN of the cluster placement group in which the Capacity Block was created, if applicable.
- Region string
- Reservation
Type string - Type of Capacity Reservation. Always
capacity-blockfor this data source. - Start
Date string - Date and time the Capacity Block reservation was started in RFC3339 format.
- State string
- Current state of the Capacity Block reservation. One of
active,expired,cancelled,pending,failed,scheduled,payment-pending,payment-failed, orassessing. - Dictionary<string, string>
- Map of tags assigned to the Capacity Block reservation.
- Tenancy string
- Tenancy of the Capacity Block. Either
defaultordedicated. - Filters
List<Get
Capacity Block Reservation Filter>
- Arn string
- ARN of the Capacity Block reservation.
- Availability
Zone string - Availability Zone in which the capacity is reserved.
- Availability
Zone stringId - ID of the Availability Zone in which the capacity is reserved.
- Available
Instance intCount - Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
- Capacity
Block stringId - ID of the underlying Capacity Block.
- Commitment
Info GetCapacity Block Reservation Commitment Info - Information about your commitment for a future-dated Capacity Block reservation. See
commitmentInfoAttribute Reference below. - Created
Date string - Date and time the Capacity Block reservation was created in RFC3339 format.
- Delivery
Preference string - Delivery method for a future-dated Capacity Block reservation. Either
fixedorincremental. - Ebs
Optimized bool - Whether the Capacity Block reservation supports EBS-optimized instances.
- End
Date string - Date and time the Capacity Block reservation expires in RFC3339 format.
- End
Date stringType - End type of the Capacity Block reservation. Either
limitedorunlimited. - Id string
- Instance
Count int - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- Instance
Match stringCriteria - Type of instance launches that the Capacity Block accepts. Either
openortargeted. - Instance
Platform string - Operating system platform for which the Capacity Block reserves capacity.
- Instance
Type string - Instance type for which the Capacity Block reserves capacity.
- Interruptible
Capacity GetAllocation Capacity Block Reservation Interruptible Capacity Allocation - Information about the interruptible capacity allocation, if applicable. See
interruptibleCapacityAllocationAttribute Reference below. - Interruption
Info GetCapacity Block Reservation Interruption Info - Information about an interrupted Capacity Block reservation, if applicable. See
interruptionInfoAttribute Reference below. - Outpost
Arn string - ARN of the Outpost on which the Capacity Block was created, if applicable.
- Owner
Id string - ID of the AWS account that owns the Capacity Block reservation.
- Placement
Group stringArn - ARN of the cluster placement group in which the Capacity Block was created, if applicable.
- Region string
- Reservation
Type string - Type of Capacity Reservation. Always
capacity-blockfor this data source. - Start
Date string - Date and time the Capacity Block reservation was started in RFC3339 format.
- State string
- Current state of the Capacity Block reservation. One of
active,expired,cancelled,pending,failed,scheduled,payment-pending,payment-failed, orassessing. - map[string]string
- Map of tags assigned to the Capacity Block reservation.
- Tenancy string
- Tenancy of the Capacity Block. Either
defaultordedicated. - Filters
[]Get
Capacity Block Reservation Filter
- arn string
- ARN of the Capacity Block reservation.
- availability_
zone string - Availability Zone in which the capacity is reserved.
- availability_
zone_ stringid - ID of the Availability Zone in which the capacity is reserved.
- available_
instance_ numbercount - Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
- capacity_
block_ stringid - ID of the underlying Capacity Block.
- commitment_
info object - Information about your commitment for a future-dated Capacity Block reservation. See
commitmentInfoAttribute Reference below. - created_
date string - Date and time the Capacity Block reservation was created in RFC3339 format.
- delivery_
preference string - Delivery method for a future-dated Capacity Block reservation. Either
fixedorincremental. - ebs_
optimized bool - Whether the Capacity Block reservation supports EBS-optimized instances.
- end_
date string - Date and time the Capacity Block reservation expires in RFC3339 format.
- end_
date_ stringtype - End type of the Capacity Block reservation. Either
limitedorunlimited. - id string
- instance_
count number - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- instance_
match_ stringcriteria - Type of instance launches that the Capacity Block accepts. Either
openortargeted. - instance_
platform string - Operating system platform for which the Capacity Block reserves capacity.
- instance_
type string - Instance type for which the Capacity Block reserves capacity.
- interruptible_
capacity_ objectallocation - Information about the interruptible capacity allocation, if applicable. See
interruptibleCapacityAllocationAttribute Reference below. - interruption_
info object - Information about an interrupted Capacity Block reservation, if applicable. See
interruptionInfoAttribute Reference below. - outpost_
arn string - ARN of the Outpost on which the Capacity Block was created, if applicable.
- owner_
id string - ID of the AWS account that owns the Capacity Block reservation.
- placement_
group_ stringarn - ARN of the cluster placement group in which the Capacity Block was created, if applicable.
- region string
- reservation_
type string - Type of Capacity Reservation. Always
capacity-blockfor this data source. - start_
date string - Date and time the Capacity Block reservation was started in RFC3339 format.
- state string
- Current state of the Capacity Block reservation. One of
active,expired,cancelled,pending,failed,scheduled,payment-pending,payment-failed, orassessing. - map(string)
- Map of tags assigned to the Capacity Block reservation.
- tenancy string
- Tenancy of the Capacity Block. Either
defaultordedicated. - filters list(object)
- arn String
- ARN of the Capacity Block reservation.
- availability
Zone String - Availability Zone in which the capacity is reserved.
- availability
Zone StringId - ID of the Availability Zone in which the capacity is reserved.
- available
Instance IntegerCount - Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
- capacity
Block StringId - ID of the underlying Capacity Block.
- commitment
Info GetCapacity Block Reservation Commitment Info - Information about your commitment for a future-dated Capacity Block reservation. See
commitmentInfoAttribute Reference below. - created
Date String - Date and time the Capacity Block reservation was created in RFC3339 format.
- delivery
Preference String - Delivery method for a future-dated Capacity Block reservation. Either
fixedorincremental. - ebs
Optimized Boolean - Whether the Capacity Block reservation supports EBS-optimized instances.
- end
Date String - Date and time the Capacity Block reservation expires in RFC3339 format.
- end
Date StringType - End type of the Capacity Block reservation. Either
limitedorunlimited. - id String
- instance
Count Integer - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- instance
Match StringCriteria - Type of instance launches that the Capacity Block accepts. Either
openortargeted. - instance
Platform String - Operating system platform for which the Capacity Block reserves capacity.
- instance
Type String - Instance type for which the Capacity Block reserves capacity.
- interruptible
Capacity GetAllocation Capacity Block Reservation Interruptible Capacity Allocation - Information about the interruptible capacity allocation, if applicable. See
interruptibleCapacityAllocationAttribute Reference below. - interruption
Info GetCapacity Block Reservation Interruption Info - Information about an interrupted Capacity Block reservation, if applicable. See
interruptionInfoAttribute Reference below. - outpost
Arn String - ARN of the Outpost on which the Capacity Block was created, if applicable.
- owner
Id String - ID of the AWS account that owns the Capacity Block reservation.
- placement
Group StringArn - ARN of the cluster placement group in which the Capacity Block was created, if applicable.
- region String
- reservation
Type String - Type of Capacity Reservation. Always
capacity-blockfor this data source. - start
Date String - Date and time the Capacity Block reservation was started in RFC3339 format.
- state String
- Current state of the Capacity Block reservation. One of
active,expired,cancelled,pending,failed,scheduled,payment-pending,payment-failed, orassessing. - Map<String,String>
- Map of tags assigned to the Capacity Block reservation.
- tenancy String
- Tenancy of the Capacity Block. Either
defaultordedicated. - filters
List<Get
Capacity Block Reservation Filter>
- arn string
- ARN of the Capacity Block reservation.
- availability
Zone string - Availability Zone in which the capacity is reserved.
- availability
Zone stringId - ID of the Availability Zone in which the capacity is reserved.
- available
Instance numberCount - Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
- capacity
Block stringId - ID of the underlying Capacity Block.
- commitment
Info GetCapacity Block Reservation Commitment Info - Information about your commitment for a future-dated Capacity Block reservation. See
commitmentInfoAttribute Reference below. - created
Date string - Date and time the Capacity Block reservation was created in RFC3339 format.
- delivery
Preference string - Delivery method for a future-dated Capacity Block reservation. Either
fixedorincremental. - ebs
Optimized boolean - Whether the Capacity Block reservation supports EBS-optimized instances.
- end
Date string - Date and time the Capacity Block reservation expires in RFC3339 format.
- end
Date stringType - End type of the Capacity Block reservation. Either
limitedorunlimited. - id string
- instance
Count number - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- instance
Match stringCriteria - Type of instance launches that the Capacity Block accepts. Either
openortargeted. - instance
Platform string - Operating system platform for which the Capacity Block reserves capacity.
- instance
Type string - Instance type for which the Capacity Block reserves capacity.
- interruptible
Capacity GetAllocation Capacity Block Reservation Interruptible Capacity Allocation - Information about the interruptible capacity allocation, if applicable. See
interruptibleCapacityAllocationAttribute Reference below. - interruption
Info GetCapacity Block Reservation Interruption Info - Information about an interrupted Capacity Block reservation, if applicable. See
interruptionInfoAttribute Reference below. - outpost
Arn string - ARN of the Outpost on which the Capacity Block was created, if applicable.
- owner
Id string - ID of the AWS account that owns the Capacity Block reservation.
- placement
Group stringArn - ARN of the cluster placement group in which the Capacity Block was created, if applicable.
- region string
- reservation
Type string - Type of Capacity Reservation. Always
capacity-blockfor this data source. - start
Date string - Date and time the Capacity Block reservation was started in RFC3339 format.
- state string
- Current state of the Capacity Block reservation. One of
active,expired,cancelled,pending,failed,scheduled,payment-pending,payment-failed, orassessing. - {[key: string]: string}
- Map of tags assigned to the Capacity Block reservation.
- tenancy string
- Tenancy of the Capacity Block. Either
defaultordedicated. - filters
Get
Capacity Block Reservation Filter[]
- arn str
- ARN of the Capacity Block reservation.
- availability_
zone str - Availability Zone in which the capacity is reserved.
- availability_
zone_ strid - ID of the Availability Zone in which the capacity is reserved.
- available_
instance_ intcount - Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
- capacity_
block_ strid - ID of the underlying Capacity Block.
- commitment_
info GetCapacity Block Reservation Commitment Info - Information about your commitment for a future-dated Capacity Block reservation. See
commitmentInfoAttribute Reference below. - created_
date str - Date and time the Capacity Block reservation was created in RFC3339 format.
- delivery_
preference str - Delivery method for a future-dated Capacity Block reservation. Either
fixedorincremental. - ebs_
optimized bool - Whether the Capacity Block reservation supports EBS-optimized instances.
- end_
date str - Date and time the Capacity Block reservation expires in RFC3339 format.
- end_
date_ strtype - End type of the Capacity Block reservation. Either
limitedorunlimited. - id str
- instance_
count int - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- instance_
match_ strcriteria - Type of instance launches that the Capacity Block accepts. Either
openortargeted. - instance_
platform str - Operating system platform for which the Capacity Block reserves capacity.
- instance_
type str - Instance type for which the Capacity Block reserves capacity.
- interruptible_
capacity_ Getallocation Capacity Block Reservation Interruptible Capacity Allocation - Information about the interruptible capacity allocation, if applicable. See
interruptibleCapacityAllocationAttribute Reference below. - interruption_
info GetCapacity Block Reservation Interruption Info - Information about an interrupted Capacity Block reservation, if applicable. See
interruptionInfoAttribute Reference below. - outpost_
arn str - ARN of the Outpost on which the Capacity Block was created, if applicable.
- owner_
id str - ID of the AWS account that owns the Capacity Block reservation.
- placement_
group_ strarn - ARN of the cluster placement group in which the Capacity Block was created, if applicable.
- region str
- reservation_
type str - Type of Capacity Reservation. Always
capacity-blockfor this data source. - start_
date str - Date and time the Capacity Block reservation was started in RFC3339 format.
- state str
- Current state of the Capacity Block reservation. One of
active,expired,cancelled,pending,failed,scheduled,payment-pending,payment-failed, orassessing. - Mapping[str, str]
- Map of tags assigned to the Capacity Block reservation.
- tenancy str
- Tenancy of the Capacity Block. Either
defaultordedicated. - filters
Sequence[Get
Capacity Block Reservation Filter]
- arn String
- ARN of the Capacity Block reservation.
- availability
Zone String - Availability Zone in which the capacity is reserved.
- availability
Zone StringId - ID of the Availability Zone in which the capacity is reserved.
- available
Instance NumberCount - Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
- capacity
Block StringId - ID of the underlying Capacity Block.
- commitment
Info Property Map - Information about your commitment for a future-dated Capacity Block reservation. See
commitmentInfoAttribute Reference below. - created
Date String - Date and time the Capacity Block reservation was created in RFC3339 format.
- delivery
Preference String - Delivery method for a future-dated Capacity Block reservation. Either
fixedorincremental. - ebs
Optimized Boolean - Whether the Capacity Block reservation supports EBS-optimized instances.
- end
Date String - Date and time the Capacity Block reservation expires in RFC3339 format.
- end
Date StringType - End type of the Capacity Block reservation. Either
limitedorunlimited. - id String
- instance
Count Number - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- instance
Match StringCriteria - Type of instance launches that the Capacity Block accepts. Either
openortargeted. - instance
Platform String - Operating system platform for which the Capacity Block reserves capacity.
- instance
Type String - Instance type for which the Capacity Block reserves capacity.
- interruptible
Capacity Property MapAllocation - Information about the interruptible capacity allocation, if applicable. See
interruptibleCapacityAllocationAttribute Reference below. - interruption
Info Property Map - Information about an interrupted Capacity Block reservation, if applicable. See
interruptionInfoAttribute Reference below. - outpost
Arn String - ARN of the Outpost on which the Capacity Block was created, if applicable.
- owner
Id String - ID of the AWS account that owns the Capacity Block reservation.
- placement
Group StringArn - ARN of the cluster placement group in which the Capacity Block was created, if applicable.
- region String
- reservation
Type String - Type of Capacity Reservation. Always
capacity-blockfor this data source. - start
Date String - Date and time the Capacity Block reservation was started in RFC3339 format.
- state String
- Current state of the Capacity Block reservation. One of
active,expired,cancelled,pending,failed,scheduled,payment-pending,payment-failed, orassessing. - Map<String>
- Map of tags assigned to the Capacity Block reservation.
- tenancy String
- Tenancy of the Capacity Block. Either
defaultordedicated. - filters List<Property Map>
Supporting Types
GetCapacityBlockReservationCommitmentInfo
- Commitment
End stringDate - Date and time the commitment duration ends in RFC3339 format.
- Committed
Instance intCount - Number of instances committed to the Capacity Block reservation.
- Commitment
End stringDate - Date and time the commitment duration ends in RFC3339 format.
- Committed
Instance intCount - Number of instances committed to the Capacity Block reservation.
- commitment_
end_ stringdate - Date and time the commitment duration ends in RFC3339 format.
- committed_
instance_ numbercount - Number of instances committed to the Capacity Block reservation.
- commitment
End StringDate - Date and time the commitment duration ends in RFC3339 format.
- committed
Instance IntegerCount - Number of instances committed to the Capacity Block reservation.
- commitment
End stringDate - Date and time the commitment duration ends in RFC3339 format.
- committed
Instance numberCount - Number of instances committed to the Capacity Block reservation.
- commitment_
end_ strdate - Date and time the commitment duration ends in RFC3339 format.
- committed_
instance_ intcount - Number of instances committed to the Capacity Block reservation.
- commitment
End StringDate - Date and time the commitment duration ends in RFC3339 format.
- committed
Instance NumberCount - Number of instances committed to the Capacity Block reservation.
GetCapacityBlockReservationFilter
- Name string
- Name of the filter field. See the DescribeCapacityReservations API Reference for valid values. Common filters include
instance-type,availability-zone,state,instance-platform,tenancy,outpost-arn,placement-group-arn,instance-match-criteria, andtag:<KEY>. - Values List<string>
- Set of values that are accepted for the given filter field. A Capacity Block reservation will be selected if any one of the given values matches.
- Name string
- Name of the filter field. See the DescribeCapacityReservations API Reference for valid values. Common filters include
instance-type,availability-zone,state,instance-platform,tenancy,outpost-arn,placement-group-arn,instance-match-criteria, andtag:<KEY>. - Values []string
- Set of values that are accepted for the given filter field. A Capacity Block reservation will be selected if any one of the given values matches.
- name string
- Name of the filter field. See the DescribeCapacityReservations API Reference for valid values. Common filters include
instance-type,availability-zone,state,instance-platform,tenancy,outpost-arn,placement-group-arn,instance-match-criteria, andtag:<KEY>. - values list(string)
- Set of values that are accepted for the given filter field. A Capacity Block reservation will be selected if any one of the given values matches.
- name String
- Name of the filter field. See the DescribeCapacityReservations API Reference for valid values. Common filters include
instance-type,availability-zone,state,instance-platform,tenancy,outpost-arn,placement-group-arn,instance-match-criteria, andtag:<KEY>. - values List<String>
- Set of values that are accepted for the given filter field. A Capacity Block reservation will be selected if any one of the given values matches.
- name string
- Name of the filter field. See the DescribeCapacityReservations API Reference for valid values. Common filters include
instance-type,availability-zone,state,instance-platform,tenancy,outpost-arn,placement-group-arn,instance-match-criteria, andtag:<KEY>. - values string[]
- Set of values that are accepted for the given filter field. A Capacity Block reservation will be selected if any one of the given values matches.
- name str
- Name of the filter field. See the DescribeCapacityReservations API Reference for valid values. Common filters include
instance-type,availability-zone,state,instance-platform,tenancy,outpost-arn,placement-group-arn,instance-match-criteria, andtag:<KEY>. - values Sequence[str]
- Set of values that are accepted for the given filter field. A Capacity Block reservation will be selected if any one of the given values matches.
- name String
- Name of the filter field. See the DescribeCapacityReservations API Reference for valid values. Common filters include
instance-type,availability-zone,state,instance-platform,tenancy,outpost-arn,placement-group-arn,instance-match-criteria, andtag:<KEY>. - values List<String>
- Set of values that are accepted for the given filter field. A Capacity Block reservation will be selected if any one of the given values matches.
GetCapacityBlockReservationInterruptibleCapacityAllocation
- Instance
Count int - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- Interruptible
Capacity stringReservation Id - ID of the interruptible Capacity Reservation associated with this allocation.
- Interruption
Type string - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - Status string
- Status of the interruptible capacity allocation. One of
pending,confirmed, orcancelled. - Target
Instance intCount - Target number of interruptible instances for the allocation.
- Instance
Count int - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- Interruptible
Capacity stringReservation Id - ID of the interruptible Capacity Reservation associated with this allocation.
- Interruption
Type string - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - Status string
- Status of the interruptible capacity allocation. One of
pending,confirmed, orcancelled. - Target
Instance intCount - Target number of interruptible instances for the allocation.
- instance_
count number - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- interruptible_
capacity_ stringreservation_ id - ID of the interruptible Capacity Reservation associated with this allocation.
- interruption_
type string - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - status string
- Status of the interruptible capacity allocation. One of
pending,confirmed, orcancelled. - target_
instance_ numbercount - Target number of interruptible instances for the allocation.
- instance
Count Integer - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- interruptible
Capacity StringReservation Id - ID of the interruptible Capacity Reservation associated with this allocation.
- interruption
Type String - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - status String
- Status of the interruptible capacity allocation. One of
pending,confirmed, orcancelled. - target
Instance IntegerCount - Target number of interruptible instances for the allocation.
- instance
Count number - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- interruptible
Capacity stringReservation Id - ID of the interruptible Capacity Reservation associated with this allocation.
- interruption
Type string - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - status string
- Status of the interruptible capacity allocation. One of
pending,confirmed, orcancelled. - target
Instance numberCount - Target number of interruptible instances for the allocation.
- instance_
count int - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- interruptible_
capacity_ strreservation_ id - ID of the interruptible Capacity Reservation associated with this allocation.
- interruption_
type str - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - status str
- Status of the interruptible capacity allocation. One of
pending,confirmed, orcancelled. - target_
instance_ intcount - Target number of interruptible instances for the allocation.
- instance
Count Number - Number of instances allocated as interruptible capacity within the Capacity Block reservation.
- interruptible
Capacity StringReservation Id - ID of the interruptible Capacity Reservation associated with this allocation.
- interruption
Type String - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - status String
- Status of the interruptible capacity allocation. One of
pending,confirmed, orcancelled. - target
Instance NumberCount - Target number of interruptible instances for the allocation.
GetCapacityBlockReservationInterruptionInfo
- Interruption
Type string - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - Source
Capacity stringReservation Id - ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
- Interruption
Type string - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - Source
Capacity stringReservation Id - ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
- interruption_
type string - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - source_
capacity_ stringreservation_ id - ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
- interruption
Type String - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - source
Capacity StringReservation Id - ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
- interruption
Type string - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - source
Capacity stringReservation Id - ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
- interruption_
type str - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - source_
capacity_ strreservation_ id - ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
- interruption
Type String - Type of interruption that occurred. Either
spot-interruptionorcapacity-block-interruption. - source
Capacity StringReservation Id - ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Tuesday, Jul 14, 2026 by Pulumi