1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getComputeCapacityReservationInstances
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.Core.getComputeCapacityReservationInstances

Explore with Pulumi AI

This data source provides the list of Compute Capacity Reservation Instances in Oracle Cloud Infrastructure Core service.

Lists the instances launched under a capacity reservation. You can filter results by specifying criteria.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testComputeCapacityReservationInstances = oci.Core.getComputeCapacityReservationInstances({
    capacityReservationId: testCapacityReservation.id,
    availabilityDomain: computeCapacityReservationInstanceAvailabilityDomain,
    compartmentId: compartmentId,
});
Copy
import pulumi
import pulumi_oci as oci

test_compute_capacity_reservation_instances = oci.Core.get_compute_capacity_reservation_instances(capacity_reservation_id=test_capacity_reservation["id"],
    availability_domain=compute_capacity_reservation_instance_availability_domain,
    compartment_id=compartment_id)
Copy
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.GetComputeCapacityReservationInstances(ctx, &core.GetComputeCapacityReservationInstancesArgs{
			CapacityReservationId: testCapacityReservation.Id,
			AvailabilityDomain:    pulumi.StringRef(computeCapacityReservationInstanceAvailabilityDomain),
			CompartmentId:         pulumi.StringRef(compartmentId),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testComputeCapacityReservationInstances = Oci.Core.GetComputeCapacityReservationInstances.Invoke(new()
    {
        CapacityReservationId = testCapacityReservation.Id,
        AvailabilityDomain = computeCapacityReservationInstanceAvailabilityDomain,
        CompartmentId = compartmentId,
    });

});
Copy
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.GetComputeCapacityReservationInstancesArgs;
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 testComputeCapacityReservationInstances = CoreFunctions.getComputeCapacityReservationInstances(GetComputeCapacityReservationInstancesArgs.builder()
            .capacityReservationId(testCapacityReservation.id())
            .availabilityDomain(computeCapacityReservationInstanceAvailabilityDomain)
            .compartmentId(compartmentId)
            .build());

    }
}
Copy
variables:
  testComputeCapacityReservationInstances:
    fn::invoke:
      function: oci:Core:getComputeCapacityReservationInstances
      arguments:
        capacityReservationId: ${testCapacityReservation.id}
        availabilityDomain: ${computeCapacityReservationInstanceAvailabilityDomain}
        compartmentId: ${compartmentId}
Copy

Using getComputeCapacityReservationInstances

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 getComputeCapacityReservationInstances(args: GetComputeCapacityReservationInstancesArgs, opts?: InvokeOptions): Promise<GetComputeCapacityReservationInstancesResult>
function getComputeCapacityReservationInstancesOutput(args: GetComputeCapacityReservationInstancesOutputArgs, opts?: InvokeOptions): Output<GetComputeCapacityReservationInstancesResult>
Copy
def get_compute_capacity_reservation_instances(availability_domain: Optional[str] = None,
                                               capacity_reservation_id: Optional[str] = None,
                                               compartment_id: Optional[str] = None,
                                               filters: Optional[Sequence[_core.GetComputeCapacityReservationInstancesFilter]] = None,
                                               opts: Optional[InvokeOptions] = None) -> GetComputeCapacityReservationInstancesResult
def get_compute_capacity_reservation_instances_output(availability_domain: Optional[pulumi.Input[str]] = None,
                                               capacity_reservation_id: Optional[pulumi.Input[str]] = None,
                                               compartment_id: Optional[pulumi.Input[str]] = None,
                                               filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetComputeCapacityReservationInstancesFilterArgs]]]] = None,
                                               opts: Optional[InvokeOptions] = None) -> Output[GetComputeCapacityReservationInstancesResult]
Copy
func GetComputeCapacityReservationInstances(ctx *Context, args *GetComputeCapacityReservationInstancesArgs, opts ...InvokeOption) (*GetComputeCapacityReservationInstancesResult, error)
func GetComputeCapacityReservationInstancesOutput(ctx *Context, args *GetComputeCapacityReservationInstancesOutputArgs, opts ...InvokeOption) GetComputeCapacityReservationInstancesResultOutput
Copy

> Note: This function is named GetComputeCapacityReservationInstances in the Go SDK.

public static class GetComputeCapacityReservationInstances 
{
    public static Task<GetComputeCapacityReservationInstancesResult> InvokeAsync(GetComputeCapacityReservationInstancesArgs args, InvokeOptions? opts = null)
    public static Output<GetComputeCapacityReservationInstancesResult> Invoke(GetComputeCapacityReservationInstancesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetComputeCapacityReservationInstancesResult> getComputeCapacityReservationInstances(GetComputeCapacityReservationInstancesArgs args, InvokeOptions options)
public static Output<GetComputeCapacityReservationInstancesResult> getComputeCapacityReservationInstances(GetComputeCapacityReservationInstancesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Core/getComputeCapacityReservationInstances:getComputeCapacityReservationInstances
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CapacityReservationId This property is required. string
The OCID of the compute capacity reservation.
AvailabilityDomain string
The name of the availability domain. Example: Uocm:PHX-AD-1
CompartmentId string
The OCID of the compartment.
Filters Changes to this property will trigger replacement. List<GetComputeCapacityReservationInstancesFilter>
CapacityReservationId This property is required. string
The OCID of the compute capacity reservation.
AvailabilityDomain string
The name of the availability domain. Example: Uocm:PHX-AD-1
CompartmentId string
The OCID of the compartment.
Filters Changes to this property will trigger replacement. []GetComputeCapacityReservationInstancesFilter
capacityReservationId This property is required. String
The OCID of the compute capacity reservation.
availabilityDomain String
The name of the availability domain. Example: Uocm:PHX-AD-1
compartmentId String
The OCID of the compartment.
filters Changes to this property will trigger replacement. List<GetComputeCapacityReservationInstancesFilter>
capacityReservationId This property is required. string
The OCID of the compute capacity reservation.
availabilityDomain string
The name of the availability domain. Example: Uocm:PHX-AD-1
compartmentId string
The OCID of the compartment.
filters Changes to this property will trigger replacement. GetComputeCapacityReservationInstancesFilter[]
capacity_reservation_id This property is required. str
The OCID of the compute capacity reservation.
availability_domain str
The name of the availability domain. Example: Uocm:PHX-AD-1
compartment_id str
The OCID of the compartment.
filters Changes to this property will trigger replacement. Sequence[core.GetComputeCapacityReservationInstancesFilter]
capacityReservationId This property is required. String
The OCID of the compute capacity reservation.
availabilityDomain String
The name of the availability domain. Example: Uocm:PHX-AD-1
compartmentId String
The OCID of the compartment.
filters Changes to this property will trigger replacement. List<Property Map>

getComputeCapacityReservationInstances Result

The following output properties are available:

CapacityReservationId string
CapacityReservationInstances List<GetComputeCapacityReservationInstancesCapacityReservationInstance>
The list of capacity_reservation_instances.
Id string
The provider-assigned unique ID for this managed resource.
AvailabilityDomain string
The availability domain the instance is running in.
CompartmentId string
The OCID of the compartment that contains the instance.
Filters List<GetComputeCapacityReservationInstancesFilter>
CapacityReservationId string
CapacityReservationInstances []GetComputeCapacityReservationInstancesCapacityReservationInstance
The list of capacity_reservation_instances.
Id string
The provider-assigned unique ID for this managed resource.
AvailabilityDomain string
The availability domain the instance is running in.
CompartmentId string
The OCID of the compartment that contains the instance.
Filters []GetComputeCapacityReservationInstancesFilter
capacityReservationId String
capacityReservationInstances List<GetComputeCapacityReservationInstancesCapacityReservationInstance>
The list of capacity_reservation_instances.
id String
The provider-assigned unique ID for this managed resource.
availabilityDomain String
The availability domain the instance is running in.
compartmentId String
The OCID of the compartment that contains the instance.
filters List<GetComputeCapacityReservationInstancesFilter>
capacityReservationId string
capacityReservationInstances GetComputeCapacityReservationInstancesCapacityReservationInstance[]
The list of capacity_reservation_instances.
id string
The provider-assigned unique ID for this managed resource.
availabilityDomain string
The availability domain the instance is running in.
compartmentId string
The OCID of the compartment that contains the instance.
filters GetComputeCapacityReservationInstancesFilter[]
capacity_reservation_id str
capacity_reservation_instances Sequence[core.GetComputeCapacityReservationInstancesCapacityReservationInstance]
The list of capacity_reservation_instances.
id str
The provider-assigned unique ID for this managed resource.
availability_domain str
The availability domain the instance is running in.
compartment_id str
The OCID of the compartment that contains the instance.
filters Sequence[core.GetComputeCapacityReservationInstancesFilter]
capacityReservationId String
capacityReservationInstances List<Property Map>
The list of capacity_reservation_instances.
id String
The provider-assigned unique ID for this managed resource.
availabilityDomain String
The availability domain the instance is running in.
compartmentId String
The OCID of the compartment that contains the instance.
filters List<Property Map>

Supporting Types

GetComputeCapacityReservationInstancesCapacityReservationInstance

AvailabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
ClusterPlacementGroupId This property is required. string
The OCID of the cluster placement group of the instance.
CompartmentId This property is required. string
The OCID of the compartment.
FaultDomain This property is required. string
The fault domain the instance is running in.
Id This property is required. string
The OCID of the instance.
Shape This property is required. string
The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
ShapeConfigs This property is required. List<GetComputeCapacityReservationInstancesCapacityReservationInstanceShapeConfig>
The shape configuration requested when launching instances in a compute capacity reservation.
AvailabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
ClusterPlacementGroupId This property is required. string
The OCID of the cluster placement group of the instance.
CompartmentId This property is required. string
The OCID of the compartment.
FaultDomain This property is required. string
The fault domain the instance is running in.
Id This property is required. string
The OCID of the instance.
Shape This property is required. string
The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
ShapeConfigs This property is required. []GetComputeCapacityReservationInstancesCapacityReservationInstanceShapeConfig
The shape configuration requested when launching instances in a compute capacity reservation.
availabilityDomain This property is required. String
The name of the availability domain. Example: Uocm:PHX-AD-1
clusterPlacementGroupId This property is required. String
The OCID of the cluster placement group of the instance.
compartmentId This property is required. String
The OCID of the compartment.
faultDomain This property is required. String
The fault domain the instance is running in.
id This property is required. String
The OCID of the instance.
shape This property is required. String
The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
shapeConfigs This property is required. List<GetComputeCapacityReservationInstancesCapacityReservationInstanceShapeConfig>
The shape configuration requested when launching instances in a compute capacity reservation.
availabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
clusterPlacementGroupId This property is required. string
The OCID of the cluster placement group of the instance.
compartmentId This property is required. string
The OCID of the compartment.
faultDomain This property is required. string
The fault domain the instance is running in.
id This property is required. string
The OCID of the instance.
shape This property is required. string
The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
shapeConfigs This property is required. GetComputeCapacityReservationInstancesCapacityReservationInstanceShapeConfig[]
The shape configuration requested when launching instances in a compute capacity reservation.
availability_domain This property is required. str
The name of the availability domain. Example: Uocm:PHX-AD-1
cluster_placement_group_id This property is required. str
The OCID of the cluster placement group of the instance.
compartment_id This property is required. str
The OCID of the compartment.
fault_domain This property is required. str
The fault domain the instance is running in.
id This property is required. str
The OCID of the instance.
shape This property is required. str
The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
shape_configs This property is required. Sequence[core.GetComputeCapacityReservationInstancesCapacityReservationInstanceShapeConfig]
The shape configuration requested when launching instances in a compute capacity reservation.
availabilityDomain This property is required. String
The name of the availability domain. Example: Uocm:PHX-AD-1
clusterPlacementGroupId This property is required. String
The OCID of the cluster placement group of the instance.
compartmentId This property is required. String
The OCID of the compartment.
faultDomain This property is required. String
The fault domain the instance is running in.
id This property is required. String
The OCID of the instance.
shape This property is required. String
The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
shapeConfigs This property is required. List<Property Map>
The shape configuration requested when launching instances in a compute capacity reservation.

GetComputeCapacityReservationInstancesCapacityReservationInstanceShapeConfig

MemoryInGbs This property is required. double
The total amount of memory available to the instance, in gigabytes.
Ocpus This property is required. double
The total number of OCPUs available to the instance.
MemoryInGbs This property is required. float64
The total amount of memory available to the instance, in gigabytes.
Ocpus This property is required. float64
The total number of OCPUs available to the instance.
memoryInGbs This property is required. Double
The total amount of memory available to the instance, in gigabytes.
ocpus This property is required. Double
The total number of OCPUs available to the instance.
memoryInGbs This property is required. number
The total amount of memory available to the instance, in gigabytes.
ocpus This property is required. number
The total number of OCPUs available to the instance.
memory_in_gbs This property is required. float
The total amount of memory available to the instance, in gigabytes.
ocpus This property is required. float
The total number of OCPUs available to the instance.
memoryInGbs This property is required. Number
The total amount of memory available to the instance, in gigabytes.
ocpus This property is required. Number
The total number of OCPUs available to the instance.

GetComputeCapacityReservationInstancesFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.