1. Packages
  2. Packages
  3. AWS
  4. API Docs
  5. ec2
  6. getCapacityBlockReservation
Viewing docs for AWS v7.37.0
published on Tuesday, Jul 14, 2026 by Pulumi
aws logo
Viewing docs for AWS v7.37.0
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 dictionary
    data "aws_ec2_getcapacityblockreservation" "name" {
        # arguments
    }

    The following arguments are supported:

    Filters List<GetCapacityBlockReservationFilter>
    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 []GetCapacityBlockReservationFilter
    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<GetCapacityBlockReservationFilter>
    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 GetCapacityBlockReservationFilter[]
    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[GetCapacityBlockReservationFilter]
    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.
    AvailabilityZone string
    Availability Zone in which the capacity is reserved.
    AvailabilityZoneId string
    ID of the Availability Zone in which the capacity is reserved.
    AvailableInstanceCount int
    Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
    CapacityBlockId string
    ID of the underlying Capacity Block.
    CommitmentInfo GetCapacityBlockReservationCommitmentInfo
    Information about your commitment for a future-dated Capacity Block reservation. See commitmentInfo Attribute Reference below.
    CreatedDate string
    Date and time the Capacity Block reservation was created in RFC3339 format.
    DeliveryPreference string
    Delivery method for a future-dated Capacity Block reservation. Either fixed or incremental.
    EbsOptimized bool
    Whether the Capacity Block reservation supports EBS-optimized instances.
    EndDate string
    Date and time the Capacity Block reservation expires in RFC3339 format.
    EndDateType string
    End type of the Capacity Block reservation. Either limited or unlimited.
    Id string
    InstanceCount int
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    InstanceMatchCriteria string
    Type of instance launches that the Capacity Block accepts. Either open or targeted.
    InstancePlatform string
    Operating system platform for which the Capacity Block reserves capacity.
    InstanceType string
    Instance type for which the Capacity Block reserves capacity.
    InterruptibleCapacityAllocation GetCapacityBlockReservationInterruptibleCapacityAllocation
    Information about the interruptible capacity allocation, if applicable. See interruptibleCapacityAllocation Attribute Reference below.
    InterruptionInfo GetCapacityBlockReservationInterruptionInfo
    Information about an interrupted Capacity Block reservation, if applicable. See interruptionInfo Attribute Reference below.
    OutpostArn string
    ARN of the Outpost on which the Capacity Block was created, if applicable.
    OwnerId string
    ID of the AWS account that owns the Capacity Block reservation.
    PlacementGroupArn string
    ARN of the cluster placement group in which the Capacity Block was created, if applicable.
    Region string
    ReservationType string
    Type of Capacity Reservation. Always capacity-block for this data source.
    StartDate 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, or assessing.
    Tags Dictionary<string, string>
    Map of tags assigned to the Capacity Block reservation.
    Tenancy string
    Tenancy of the Capacity Block. Either default or dedicated.
    Filters List<GetCapacityBlockReservationFilter>
    Arn string
    ARN of the Capacity Block reservation.
    AvailabilityZone string
    Availability Zone in which the capacity is reserved.
    AvailabilityZoneId string
    ID of the Availability Zone in which the capacity is reserved.
    AvailableInstanceCount int
    Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
    CapacityBlockId string
    ID of the underlying Capacity Block.
    CommitmentInfo GetCapacityBlockReservationCommitmentInfo
    Information about your commitment for a future-dated Capacity Block reservation. See commitmentInfo Attribute Reference below.
    CreatedDate string
    Date and time the Capacity Block reservation was created in RFC3339 format.
    DeliveryPreference string
    Delivery method for a future-dated Capacity Block reservation. Either fixed or incremental.
    EbsOptimized bool
    Whether the Capacity Block reservation supports EBS-optimized instances.
    EndDate string
    Date and time the Capacity Block reservation expires in RFC3339 format.
    EndDateType string
    End type of the Capacity Block reservation. Either limited or unlimited.
    Id string
    InstanceCount int
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    InstanceMatchCriteria string
    Type of instance launches that the Capacity Block accepts. Either open or targeted.
    InstancePlatform string
    Operating system platform for which the Capacity Block reserves capacity.
    InstanceType string
    Instance type for which the Capacity Block reserves capacity.
    InterruptibleCapacityAllocation GetCapacityBlockReservationInterruptibleCapacityAllocation
    Information about the interruptible capacity allocation, if applicable. See interruptibleCapacityAllocation Attribute Reference below.
    InterruptionInfo GetCapacityBlockReservationInterruptionInfo
    Information about an interrupted Capacity Block reservation, if applicable. See interruptionInfo Attribute Reference below.
    OutpostArn string
    ARN of the Outpost on which the Capacity Block was created, if applicable.
    OwnerId string
    ID of the AWS account that owns the Capacity Block reservation.
    PlacementGroupArn string
    ARN of the cluster placement group in which the Capacity Block was created, if applicable.
    Region string
    ReservationType string
    Type of Capacity Reservation. Always capacity-block for this data source.
    StartDate 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, or assessing.
    Tags map[string]string
    Map of tags assigned to the Capacity Block reservation.
    Tenancy string
    Tenancy of the Capacity Block. Either default or dedicated.
    Filters []GetCapacityBlockReservationFilter
    arn string
    ARN of the Capacity Block reservation.
    availability_zone string
    Availability Zone in which the capacity is reserved.
    availability_zone_id string
    ID of the Availability Zone in which the capacity is reserved.
    available_instance_count number
    Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
    capacity_block_id string
    ID of the underlying Capacity Block.
    commitment_info object
    Information about your commitment for a future-dated Capacity Block reservation. See commitmentInfo Attribute 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 fixed or incremental.
    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_type string
    End type of the Capacity Block reservation. Either limited or unlimited.
    id string
    instance_count number
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    instance_match_criteria string
    Type of instance launches that the Capacity Block accepts. Either open or targeted.
    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_allocation object
    Information about the interruptible capacity allocation, if applicable. See interruptibleCapacityAllocation Attribute Reference below.
    interruption_info object
    Information about an interrupted Capacity Block reservation, if applicable. See interruptionInfo Attribute 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_arn string
    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-block for 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, or assessing.
    tags map(string)
    Map of tags assigned to the Capacity Block reservation.
    tenancy string
    Tenancy of the Capacity Block. Either default or dedicated.
    filters list(object)
    arn String
    ARN of the Capacity Block reservation.
    availabilityZone String
    Availability Zone in which the capacity is reserved.
    availabilityZoneId String
    ID of the Availability Zone in which the capacity is reserved.
    availableInstanceCount Integer
    Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
    capacityBlockId String
    ID of the underlying Capacity Block.
    commitmentInfo GetCapacityBlockReservationCommitmentInfo
    Information about your commitment for a future-dated Capacity Block reservation. See commitmentInfo Attribute Reference below.
    createdDate String
    Date and time the Capacity Block reservation was created in RFC3339 format.
    deliveryPreference String
    Delivery method for a future-dated Capacity Block reservation. Either fixed or incremental.
    ebsOptimized Boolean
    Whether the Capacity Block reservation supports EBS-optimized instances.
    endDate String
    Date and time the Capacity Block reservation expires in RFC3339 format.
    endDateType String
    End type of the Capacity Block reservation. Either limited or unlimited.
    id String
    instanceCount Integer
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    instanceMatchCriteria String
    Type of instance launches that the Capacity Block accepts. Either open or targeted.
    instancePlatform String
    Operating system platform for which the Capacity Block reserves capacity.
    instanceType String
    Instance type for which the Capacity Block reserves capacity.
    interruptibleCapacityAllocation GetCapacityBlockReservationInterruptibleCapacityAllocation
    Information about the interruptible capacity allocation, if applicable. See interruptibleCapacityAllocation Attribute Reference below.
    interruptionInfo GetCapacityBlockReservationInterruptionInfo
    Information about an interrupted Capacity Block reservation, if applicable. See interruptionInfo Attribute Reference below.
    outpostArn String
    ARN of the Outpost on which the Capacity Block was created, if applicable.
    ownerId String
    ID of the AWS account that owns the Capacity Block reservation.
    placementGroupArn String
    ARN of the cluster placement group in which the Capacity Block was created, if applicable.
    region String
    reservationType String
    Type of Capacity Reservation. Always capacity-block for this data source.
    startDate 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, or assessing.
    tags Map<String,String>
    Map of tags assigned to the Capacity Block reservation.
    tenancy String
    Tenancy of the Capacity Block. Either default or dedicated.
    filters List<GetCapacityBlockReservationFilter>
    arn string
    ARN of the Capacity Block reservation.
    availabilityZone string
    Availability Zone in which the capacity is reserved.
    availabilityZoneId string
    ID of the Availability Zone in which the capacity is reserved.
    availableInstanceCount number
    Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
    capacityBlockId string
    ID of the underlying Capacity Block.
    commitmentInfo GetCapacityBlockReservationCommitmentInfo
    Information about your commitment for a future-dated Capacity Block reservation. See commitmentInfo Attribute Reference below.
    createdDate string
    Date and time the Capacity Block reservation was created in RFC3339 format.
    deliveryPreference string
    Delivery method for a future-dated Capacity Block reservation. Either fixed or incremental.
    ebsOptimized boolean
    Whether the Capacity Block reservation supports EBS-optimized instances.
    endDate string
    Date and time the Capacity Block reservation expires in RFC3339 format.
    endDateType string
    End type of the Capacity Block reservation. Either limited or unlimited.
    id string
    instanceCount number
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    instanceMatchCriteria string
    Type of instance launches that the Capacity Block accepts. Either open or targeted.
    instancePlatform string
    Operating system platform for which the Capacity Block reserves capacity.
    instanceType string
    Instance type for which the Capacity Block reserves capacity.
    interruptibleCapacityAllocation GetCapacityBlockReservationInterruptibleCapacityAllocation
    Information about the interruptible capacity allocation, if applicable. See interruptibleCapacityAllocation Attribute Reference below.
    interruptionInfo GetCapacityBlockReservationInterruptionInfo
    Information about an interrupted Capacity Block reservation, if applicable. See interruptionInfo Attribute Reference below.
    outpostArn string
    ARN of the Outpost on which the Capacity Block was created, if applicable.
    ownerId string
    ID of the AWS account that owns the Capacity Block reservation.
    placementGroupArn string
    ARN of the cluster placement group in which the Capacity Block was created, if applicable.
    region string
    reservationType string
    Type of Capacity Reservation. Always capacity-block for this data source.
    startDate 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, or assessing.
    tags {[key: string]: string}
    Map of tags assigned to the Capacity Block reservation.
    tenancy string
    Tenancy of the Capacity Block. Either default or dedicated.
    filters GetCapacityBlockReservationFilter[]
    arn str
    ARN of the Capacity Block reservation.
    availability_zone str
    Availability Zone in which the capacity is reserved.
    availability_zone_id str
    ID of the Availability Zone in which the capacity is reserved.
    available_instance_count int
    Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
    capacity_block_id str
    ID of the underlying Capacity Block.
    commitment_info GetCapacityBlockReservationCommitmentInfo
    Information about your commitment for a future-dated Capacity Block reservation. See commitmentInfo Attribute 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 fixed or incremental.
    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_type str
    End type of the Capacity Block reservation. Either limited or unlimited.
    id str
    instance_count int
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    instance_match_criteria str
    Type of instance launches that the Capacity Block accepts. Either open or targeted.
    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_allocation GetCapacityBlockReservationInterruptibleCapacityAllocation
    Information about the interruptible capacity allocation, if applicable. See interruptibleCapacityAllocation Attribute Reference below.
    interruption_info GetCapacityBlockReservationInterruptionInfo
    Information about an interrupted Capacity Block reservation, if applicable. See interruptionInfo Attribute 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_arn str
    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-block for 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, or assessing.
    tags Mapping[str, str]
    Map of tags assigned to the Capacity Block reservation.
    tenancy str
    Tenancy of the Capacity Block. Either default or dedicated.
    filters Sequence[GetCapacityBlockReservationFilter]
    arn String
    ARN of the Capacity Block reservation.
    availabilityZone String
    Availability Zone in which the capacity is reserved.
    availabilityZoneId String
    ID of the Availability Zone in which the capacity is reserved.
    availableInstanceCount Number
    Remaining capacity, indicating the number of instances that can still be launched into the Capacity Block reservation.
    capacityBlockId String
    ID of the underlying Capacity Block.
    commitmentInfo Property Map
    Information about your commitment for a future-dated Capacity Block reservation. See commitmentInfo Attribute Reference below.
    createdDate String
    Date and time the Capacity Block reservation was created in RFC3339 format.
    deliveryPreference String
    Delivery method for a future-dated Capacity Block reservation. Either fixed or incremental.
    ebsOptimized Boolean
    Whether the Capacity Block reservation supports EBS-optimized instances.
    endDate String
    Date and time the Capacity Block reservation expires in RFC3339 format.
    endDateType String
    End type of the Capacity Block reservation. Either limited or unlimited.
    id String
    instanceCount Number
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    instanceMatchCriteria String
    Type of instance launches that the Capacity Block accepts. Either open or targeted.
    instancePlatform String
    Operating system platform for which the Capacity Block reserves capacity.
    instanceType String
    Instance type for which the Capacity Block reserves capacity.
    interruptibleCapacityAllocation Property Map
    Information about the interruptible capacity allocation, if applicable. See interruptibleCapacityAllocation Attribute Reference below.
    interruptionInfo Property Map
    Information about an interrupted Capacity Block reservation, if applicable. See interruptionInfo Attribute Reference below.
    outpostArn String
    ARN of the Outpost on which the Capacity Block was created, if applicable.
    ownerId String
    ID of the AWS account that owns the Capacity Block reservation.
    placementGroupArn String
    ARN of the cluster placement group in which the Capacity Block was created, if applicable.
    region String
    reservationType String
    Type of Capacity Reservation. Always capacity-block for this data source.
    startDate 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, or assessing.
    tags Map<String>
    Map of tags assigned to the Capacity Block reservation.
    tenancy String
    Tenancy of the Capacity Block. Either default or dedicated.
    filters List<Property Map>

    Supporting Types

    GetCapacityBlockReservationCommitmentInfo

    CommitmentEndDate string
    Date and time the commitment duration ends in RFC3339 format.
    CommittedInstanceCount int
    Number of instances committed to the Capacity Block reservation.
    CommitmentEndDate string
    Date and time the commitment duration ends in RFC3339 format.
    CommittedInstanceCount int
    Number of instances committed to the Capacity Block reservation.
    commitment_end_date string
    Date and time the commitment duration ends in RFC3339 format.
    committed_instance_count number
    Number of instances committed to the Capacity Block reservation.
    commitmentEndDate String
    Date and time the commitment duration ends in RFC3339 format.
    committedInstanceCount Integer
    Number of instances committed to the Capacity Block reservation.
    commitmentEndDate string
    Date and time the commitment duration ends in RFC3339 format.
    committedInstanceCount number
    Number of instances committed to the Capacity Block reservation.
    commitment_end_date str
    Date and time the commitment duration ends in RFC3339 format.
    committed_instance_count int
    Number of instances committed to the Capacity Block reservation.
    commitmentEndDate String
    Date and time the commitment duration ends in RFC3339 format.
    committedInstanceCount Number
    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, and tag:<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, and tag:<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, and tag:<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, and tag:<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, and tag:<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, and tag:<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, and tag:<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

    InstanceCount int
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    InterruptibleCapacityReservationId string
    ID of the interruptible Capacity Reservation associated with this allocation.
    InterruptionType string
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    Status string
    Status of the interruptible capacity allocation. One of pending, confirmed, or cancelled.
    TargetInstanceCount int
    Target number of interruptible instances for the allocation.
    InstanceCount int
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    InterruptibleCapacityReservationId string
    ID of the interruptible Capacity Reservation associated with this allocation.
    InterruptionType string
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    Status string
    Status of the interruptible capacity allocation. One of pending, confirmed, or cancelled.
    TargetInstanceCount int
    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_reservation_id string
    ID of the interruptible Capacity Reservation associated with this allocation.
    interruption_type string
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    status string
    Status of the interruptible capacity allocation. One of pending, confirmed, or cancelled.
    target_instance_count number
    Target number of interruptible instances for the allocation.
    instanceCount Integer
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    interruptibleCapacityReservationId String
    ID of the interruptible Capacity Reservation associated with this allocation.
    interruptionType String
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    status String
    Status of the interruptible capacity allocation. One of pending, confirmed, or cancelled.
    targetInstanceCount Integer
    Target number of interruptible instances for the allocation.
    instanceCount number
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    interruptibleCapacityReservationId string
    ID of the interruptible Capacity Reservation associated with this allocation.
    interruptionType string
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    status string
    Status of the interruptible capacity allocation. One of pending, confirmed, or cancelled.
    targetInstanceCount number
    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_reservation_id str
    ID of the interruptible Capacity Reservation associated with this allocation.
    interruption_type str
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    status str
    Status of the interruptible capacity allocation. One of pending, confirmed, or cancelled.
    target_instance_count int
    Target number of interruptible instances for the allocation.
    instanceCount Number
    Number of instances allocated as interruptible capacity within the Capacity Block reservation.
    interruptibleCapacityReservationId String
    ID of the interruptible Capacity Reservation associated with this allocation.
    interruptionType String
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    status String
    Status of the interruptible capacity allocation. One of pending, confirmed, or cancelled.
    targetInstanceCount Number
    Target number of interruptible instances for the allocation.

    GetCapacityBlockReservationInterruptionInfo

    InterruptionType string
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    SourceCapacityReservationId string
    ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
    InterruptionType string
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    SourceCapacityReservationId string
    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-interruption or capacity-block-interruption.
    source_capacity_reservation_id string
    ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
    interruptionType String
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    sourceCapacityReservationId String
    ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
    interruptionType string
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    sourceCapacityReservationId string
    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-interruption or capacity-block-interruption.
    source_capacity_reservation_id str
    ID of the source Capacity Reservation that originally held the capacity, if the reservation was created as a result of an interruption.
    interruptionType String
    Type of interruption that occurred. Either spot-interruption or capacity-block-interruption.
    sourceCapacityReservationId String
    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 aws Terraform Provider.
    aws logo
    Viewing docs for AWS v7.37.0
    published on Tuesday, Jul 14, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial