Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Core.getComputeCapacityReservation
Explore with Pulumi AI
This data source provides details about a specific Compute Capacity Reservation resource in Oracle Cloud Infrastructure Core service.
Gets information about the specified compute capacity reservation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testComputeCapacityReservation = oci.Core.getComputeCapacityReservation({
    capacityReservationId: testCapacityReservation.id,
});
import pulumi
import pulumi_oci as oci
test_compute_capacity_reservation = oci.Core.get_compute_capacity_reservation(capacity_reservation_id=test_capacity_reservation["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.GetComputeCapacityReservation(ctx, &core.GetComputeCapacityReservationArgs{
			CapacityReservationId: testCapacityReservation.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testComputeCapacityReservation = Oci.Core.GetComputeCapacityReservation.Invoke(new()
    {
        CapacityReservationId = testCapacityReservation.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetComputeCapacityReservationArgs;
import java.util.List;
import java.util.ArrayList;
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 testComputeCapacityReservation = CoreFunctions.getComputeCapacityReservation(GetComputeCapacityReservationArgs.builder()
            .capacityReservationId(testCapacityReservation.id())
            .build());
    }
}
variables:
  testComputeCapacityReservation:
    fn::invoke:
      function: oci:Core:getComputeCapacityReservation
      arguments:
        capacityReservationId: ${testCapacityReservation.id}
Using getComputeCapacityReservation
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 getComputeCapacityReservation(args: GetComputeCapacityReservationArgs, opts?: InvokeOptions): Promise<GetComputeCapacityReservationResult>
function getComputeCapacityReservationOutput(args: GetComputeCapacityReservationOutputArgs, opts?: InvokeOptions): Output<GetComputeCapacityReservationResult>def get_compute_capacity_reservation(capacity_reservation_id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetComputeCapacityReservationResult
def get_compute_capacity_reservation_output(capacity_reservation_id: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetComputeCapacityReservationResult]func LookupComputeCapacityReservation(ctx *Context, args *LookupComputeCapacityReservationArgs, opts ...InvokeOption) (*LookupComputeCapacityReservationResult, error)
func LookupComputeCapacityReservationOutput(ctx *Context, args *LookupComputeCapacityReservationOutputArgs, opts ...InvokeOption) LookupComputeCapacityReservationResultOutput> Note: This function is named LookupComputeCapacityReservation in the Go SDK.
public static class GetComputeCapacityReservation 
{
    public static Task<GetComputeCapacityReservationResult> InvokeAsync(GetComputeCapacityReservationArgs args, InvokeOptions? opts = null)
    public static Output<GetComputeCapacityReservationResult> Invoke(GetComputeCapacityReservationInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetComputeCapacityReservationResult> getComputeCapacityReservation(GetComputeCapacityReservationArgs args, InvokeOptions options)
public static Output<GetComputeCapacityReservationResult> getComputeCapacityReservation(GetComputeCapacityReservationArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Core/getComputeCapacityReservation:getComputeCapacityReservation
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CapacityReservation stringId 
- The OCID of the compute capacity reservation.
- CapacityReservation stringId 
- The OCID of the compute capacity reservation.
- capacityReservation StringId 
- The OCID of the compute capacity reservation.
- capacityReservation stringId 
- The OCID of the compute capacity reservation.
- capacity_reservation_ strid 
- The OCID of the compute capacity reservation.
- capacityReservation StringId 
- The OCID of the compute capacity reservation.
getComputeCapacityReservation Result
The following output properties are available:
- AvailabilityDomain string
- The availability domain of the compute capacity reservation. Example: Uocm:PHX-AD-1
- CapacityReservation stringId 
- CompartmentId string
- The OCID of the compartment containing the compute capacity reservation.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- The OCID of the compute capacity reservation.
- InstanceReservation List<GetConfigs Compute Capacity Reservation Instance Reservation Config> 
- The capacity configurations for the capacity reservation.
- IsDefault boolReservation 
- Whether this capacity reservation is the default. For more information, see Capacity Reservations.
- ReservedInstance stringCount 
- The number of instances for which capacity will be held with this compute capacity reservation. This number is the sum of the values of the reservedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- State string
- The current state of the compute capacity reservation.
- TimeCreated string
- The date and time the compute capacity reservation was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- TimeUpdated string
- The date and time the compute capacity reservation was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- UsedInstance stringCount 
- The total number of instances currently consuming space in this compute capacity reservation. This number is the sum of the values of the usedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- AvailabilityDomain string
- The availability domain of the compute capacity reservation. Example: Uocm:PHX-AD-1
- CapacityReservation stringId 
- CompartmentId string
- The OCID of the compartment containing the compute capacity reservation.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- The OCID of the compute capacity reservation.
- InstanceReservation []GetConfigs Compute Capacity Reservation Instance Reservation Config 
- The capacity configurations for the capacity reservation.
- IsDefault boolReservation 
- Whether this capacity reservation is the default. For more information, see Capacity Reservations.
- ReservedInstance stringCount 
- The number of instances for which capacity will be held with this compute capacity reservation. This number is the sum of the values of the reservedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- State string
- The current state of the compute capacity reservation.
- TimeCreated string
- The date and time the compute capacity reservation was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- TimeUpdated string
- The date and time the compute capacity reservation was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- UsedInstance stringCount 
- The total number of instances currently consuming space in this compute capacity reservation. This number is the sum of the values of the usedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- availabilityDomain String
- The availability domain of the compute capacity reservation. Example: Uocm:PHX-AD-1
- capacityReservation StringId 
- compartmentId String
- The OCID of the compartment containing the compute capacity reservation.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- The OCID of the compute capacity reservation.
- instanceReservation List<GetConfigs Compute Capacity Reservation Instance Reservation Config> 
- The capacity configurations for the capacity reservation.
- isDefault BooleanReservation 
- Whether this capacity reservation is the default. For more information, see Capacity Reservations.
- reservedInstance StringCount 
- The number of instances for which capacity will be held with this compute capacity reservation. This number is the sum of the values of the reservedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- state String
- The current state of the compute capacity reservation.
- timeCreated String
- The date and time the compute capacity reservation was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- timeUpdated String
- The date and time the compute capacity reservation was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- usedInstance StringCount 
- The total number of instances currently consuming space in this compute capacity reservation. This number is the sum of the values of the usedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- availabilityDomain string
- The availability domain of the compute capacity reservation. Example: Uocm:PHX-AD-1
- capacityReservation stringId 
- compartmentId string
- The OCID of the compartment containing the compute capacity reservation.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id string
- The OCID of the compute capacity reservation.
- instanceReservation GetConfigs Compute Capacity Reservation Instance Reservation Config[] 
- The capacity configurations for the capacity reservation.
- isDefault booleanReservation 
- Whether this capacity reservation is the default. For more information, see Capacity Reservations.
- reservedInstance stringCount 
- The number of instances for which capacity will be held with this compute capacity reservation. This number is the sum of the values of the reservedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- state string
- The current state of the compute capacity reservation.
- timeCreated string
- The date and time the compute capacity reservation was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- timeUpdated string
- The date and time the compute capacity reservation was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- usedInstance stringCount 
- The total number of instances currently consuming space in this compute capacity reservation. This number is the sum of the values of the usedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- availability_domain str
- The availability domain of the compute capacity reservation. Example: Uocm:PHX-AD-1
- capacity_reservation_ strid 
- compartment_id str
- The OCID of the compartment containing the compute capacity reservation.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- display_name str
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id str
- The OCID of the compute capacity reservation.
- instance_reservation_ Sequence[Getconfigs Compute Capacity Reservation Instance Reservation Config] 
- The capacity configurations for the capacity reservation.
- is_default_ boolreservation 
- Whether this capacity reservation is the default. For more information, see Capacity Reservations.
- reserved_instance_ strcount 
- The number of instances for which capacity will be held with this compute capacity reservation. This number is the sum of the values of the reservedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- state str
- The current state of the compute capacity reservation.
- time_created str
- The date and time the compute capacity reservation was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- time_updated str
- The date and time the compute capacity reservation was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- used_instance_ strcount 
- The total number of instances currently consuming space in this compute capacity reservation. This number is the sum of the values of the usedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- availabilityDomain String
- The availability domain of the compute capacity reservation. Example: Uocm:PHX-AD-1
- capacityReservation StringId 
- compartmentId String
- The OCID of the compartment containing the compute capacity reservation.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- The OCID of the compute capacity reservation.
- instanceReservation List<Property Map>Configs 
- The capacity configurations for the capacity reservation.
- isDefault BooleanReservation 
- Whether this capacity reservation is the default. For more information, see Capacity Reservations.
- reservedInstance StringCount 
- The number of instances for which capacity will be held with this compute capacity reservation. This number is the sum of the values of the reservedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
- state String
- The current state of the compute capacity reservation.
- timeCreated String
- The date and time the compute capacity reservation was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- timeUpdated String
- The date and time the compute capacity reservation was updated, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- usedInstance StringCount 
- The total number of instances currently consuming space in this compute capacity reservation. This number is the sum of the values of the usedCountfields for all of the instance capacity configurations under this reservation. The purpose of this field is to calculate the percentage usage of the reservation.
Supporting Types
GetComputeCapacityReservationInstanceReservationConfig      
- ClusterConfigs List<GetCompute Capacity Reservation Instance Reservation Config Cluster Config> 
- The HPC cluster configuration requested when launching instances in a compute capacity reservation.
- ClusterPlacement stringGroup Id 
- The OCID of the cluster placement group for this instance reservation capacity configuration.
- FaultDomain string
- The fault domain of this capacity configuration. If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. For more information, see Capacity Reservations.
- InstanceShape string
- The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling ListComputeCapacityReservationInstanceShapes.
- InstanceShape List<GetConfigs Compute Capacity Reservation Instance Reservation Config Instance Shape Config> 
- The shape configuration requested when launching instances in a compute capacity reservation.
- ReservedCount string
- The total number of instances that can be launched from the capacity configuration.
- UsedCount string
- The amount of capacity in use out of the total capacity reserved in this capacity configuration.
- ClusterConfigs []GetCompute Capacity Reservation Instance Reservation Config Cluster Config 
- The HPC cluster configuration requested when launching instances in a compute capacity reservation.
- ClusterPlacement stringGroup Id 
- The OCID of the cluster placement group for this instance reservation capacity configuration.
- FaultDomain string
- The fault domain of this capacity configuration. If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. For more information, see Capacity Reservations.
- InstanceShape string
- The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling ListComputeCapacityReservationInstanceShapes.
- InstanceShape []GetConfigs Compute Capacity Reservation Instance Reservation Config Instance Shape Config 
- The shape configuration requested when launching instances in a compute capacity reservation.
- ReservedCount string
- The total number of instances that can be launched from the capacity configuration.
- UsedCount string
- The amount of capacity in use out of the total capacity reserved in this capacity configuration.
- clusterConfigs List<GetCompute Capacity Reservation Instance Reservation Config Cluster Config> 
- The HPC cluster configuration requested when launching instances in a compute capacity reservation.
- clusterPlacement StringGroup Id 
- The OCID of the cluster placement group for this instance reservation capacity configuration.
- faultDomain String
- The fault domain of this capacity configuration. If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. For more information, see Capacity Reservations.
- instanceShape String
- The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling ListComputeCapacityReservationInstanceShapes.
- instanceShape List<GetConfigs Compute Capacity Reservation Instance Reservation Config Instance Shape Config> 
- The shape configuration requested when launching instances in a compute capacity reservation.
- reservedCount String
- The total number of instances that can be launched from the capacity configuration.
- usedCount String
- The amount of capacity in use out of the total capacity reserved in this capacity configuration.
- clusterConfigs GetCompute Capacity Reservation Instance Reservation Config Cluster Config[] 
- The HPC cluster configuration requested when launching instances in a compute capacity reservation.
- clusterPlacement stringGroup Id 
- The OCID of the cluster placement group for this instance reservation capacity configuration.
- faultDomain string
- The fault domain of this capacity configuration. If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. For more information, see Capacity Reservations.
- instanceShape string
- The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling ListComputeCapacityReservationInstanceShapes.
- instanceShape GetConfigs Compute Capacity Reservation Instance Reservation Config Instance Shape Config[] 
- The shape configuration requested when launching instances in a compute capacity reservation.
- reservedCount string
- The total number of instances that can be launched from the capacity configuration.
- usedCount string
- The amount of capacity in use out of the total capacity reserved in this capacity configuration.
- cluster_configs Sequence[GetCompute Capacity Reservation Instance Reservation Config Cluster Config] 
- The HPC cluster configuration requested when launching instances in a compute capacity reservation.
- cluster_placement_ strgroup_ id 
- The OCID of the cluster placement group for this instance reservation capacity configuration.
- fault_domain str
- The fault domain of this capacity configuration. If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. For more information, see Capacity Reservations.
- instance_shape str
- The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling ListComputeCapacityReservationInstanceShapes.
- instance_shape_ Sequence[Getconfigs Compute Capacity Reservation Instance Reservation Config Instance Shape Config] 
- The shape configuration requested when launching instances in a compute capacity reservation.
- reserved_count str
- The total number of instances that can be launched from the capacity configuration.
- used_count str
- The amount of capacity in use out of the total capacity reserved in this capacity configuration.
- clusterConfigs List<Property Map>
- The HPC cluster configuration requested when launching instances in a compute capacity reservation.
- clusterPlacement StringGroup Id 
- The OCID of the cluster placement group for this instance reservation capacity configuration.
- faultDomain String
- The fault domain of this capacity configuration. If a value is not supplied, this capacity configuration is applicable to all fault domains in the specified availability domain. For more information, see Capacity Reservations.
- instanceShape String
- The shape to use when launching instances using compute capacity reservations. The shape determines the number of CPUs, the amount of memory, and other resources allocated to the instance. You can list all available shapes by calling ListComputeCapacityReservationInstanceShapes.
- instanceShape List<Property Map>Configs 
- The shape configuration requested when launching instances in a compute capacity reservation.
- reservedCount String
- The total number of instances that can be launched from the capacity configuration.
- usedCount String
- The amount of capacity in use out of the total capacity reserved in this capacity configuration.
GetComputeCapacityReservationInstanceReservationConfigClusterConfig        
- HpcIsland stringId 
- The OCID of the HPC island.
- NetworkBlock List<string>Ids 
- The list of OCIDs of the network blocks.
- HpcIsland stringId 
- The OCID of the HPC island.
- NetworkBlock []stringIds 
- The list of OCIDs of the network blocks.
- hpcIsland StringId 
- The OCID of the HPC island.
- networkBlock List<String>Ids 
- The list of OCIDs of the network blocks.
- hpcIsland stringId 
- The OCID of the HPC island.
- networkBlock string[]Ids 
- The list of OCIDs of the network blocks.
- hpc_island_ strid 
- The OCID of the HPC island.
- network_block_ Sequence[str]ids 
- The list of OCIDs of the network blocks.
- hpcIsland StringId 
- The OCID of the HPC island.
- networkBlock List<String>Ids 
- The list of OCIDs of the network blocks.
GetComputeCapacityReservationInstanceReservationConfigInstanceShapeConfig         
- MemoryIn doubleGbs 
- The total amount of memory available to the instance, in gigabytes.
- Ocpus double
- The total number of OCPUs available to the instance.
- MemoryIn float64Gbs 
- The total amount of memory available to the instance, in gigabytes.
- Ocpus float64
- The total number of OCPUs available to the instance.
- memoryIn DoubleGbs 
- The total amount of memory available to the instance, in gigabytes.
- ocpus Double
- The total number of OCPUs available to the instance.
- memoryIn numberGbs 
- The total amount of memory available to the instance, in gigabytes.
- ocpus number
- The total number of OCPUs available to the instance.
- memory_in_ floatgbs 
- The total amount of memory available to the instance, in gigabytes.
- ocpus float
- The total number of OCPUs available to the instance.
- memoryIn NumberGbs 
- The total amount of memory available to the instance, in gigabytes.
- ocpus Number
- The total number of OCPUs available to the instance.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.