Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 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,
});
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)
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
})
}
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,
});
});
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());
}
}
variables:
testComputeCapacityReservationInstances:
fn::invoke:
Function: oci:Core:getComputeCapacityReservationInstances
Arguments:
capacityReservationId: ${testCapacityReservation.id}
availabilityDomain: ${computeCapacityReservationInstanceAvailabilityDomain}
compartmentId: ${compartmentId}
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>
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]
func GetComputeCapacityReservationInstances(ctx *Context, args *GetComputeCapacityReservationInstancesArgs, opts ...InvokeOption) (*GetComputeCapacityReservationInstancesResult, error)
func GetComputeCapacityReservationInstancesOutput(ctx *Context, args *GetComputeCapacityReservationInstancesOutputArgs, opts ...InvokeOption) GetComputeCapacityReservationInstancesResultOutput
> 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)
}
public static CompletableFuture<GetComputeCapacityReservationInstancesResult> getComputeCapacityReservationInstances(GetComputeCapacityReservationInstancesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Core/getComputeCapacityReservationInstances:getComputeCapacityReservationInstances
arguments:
# arguments dictionary
The following arguments are supported:
- Capacity
Reservation stringId - The OCID of the compute capacity reservation.
- Availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- Compartment
Id string - The OCID of the compartment.
- Filters
List<Get
Compute Capacity Reservation Instances Filter>
- Capacity
Reservation stringId - The OCID of the compute capacity reservation.
- Availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- Compartment
Id string - The OCID of the compartment.
- Filters
[]Get
Compute Capacity Reservation Instances Filter
- capacity
Reservation StringId - The OCID of the compute capacity reservation.
- availability
Domain String - The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id String - The OCID of the compartment.
- filters
List<Get
Compute Capacity Reservation Instances Filter>
- capacity
Reservation stringId - The OCID of the compute capacity reservation.
- availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id string - The OCID of the compartment.
- filters
Get
Compute Capacity Reservation Instances Filter[]
- capacity_
reservation_ strid - 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
Sequence[core.
Get Compute Capacity Reservation Instances Filter]
- capacity
Reservation StringId - The OCID of the compute capacity reservation.
- availability
Domain String - The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id String - The OCID of the compartment.
- filters List<Property Map>
getComputeCapacityReservationInstances Result
The following output properties are available:
- Capacity
Reservation stringId - Capacity
Reservation List<GetInstances Compute Capacity Reservation Instances Capacity Reservation Instance> - The list of capacity_reservation_instances.
- Id string
- The provider-assigned unique ID for this managed resource.
- Availability
Domain string - The availability domain the instance is running in.
- Compartment
Id string - The OCID of the compartment that contains the instance.
- Filters
List<Get
Compute Capacity Reservation Instances Filter>
- Capacity
Reservation stringId - Capacity
Reservation []GetInstances Compute Capacity Reservation Instances Capacity Reservation Instance - The list of capacity_reservation_instances.
- Id string
- The provider-assigned unique ID for this managed resource.
- Availability
Domain string - The availability domain the instance is running in.
- Compartment
Id string - The OCID of the compartment that contains the instance.
- Filters
[]Get
Compute Capacity Reservation Instances Filter
- capacity
Reservation StringId - capacity
Reservation List<GetInstances Compute Capacity Reservation Instances Capacity Reservation Instance> - The list of capacity_reservation_instances.
- id String
- The provider-assigned unique ID for this managed resource.
- availability
Domain String - The availability domain the instance is running in.
- compartment
Id String - The OCID of the compartment that contains the instance.
- filters
List<Get
Compute Capacity Reservation Instances Filter>
- capacity
Reservation stringId - capacity
Reservation GetInstances Compute Capacity Reservation Instances Capacity Reservation Instance[] - The list of capacity_reservation_instances.
- id string
- The provider-assigned unique ID for this managed resource.
- availability
Domain string - The availability domain the instance is running in.
- compartment
Id string - The OCID of the compartment that contains the instance.
- filters
Get
Compute Capacity Reservation Instances Filter[]
- capacity_
reservation_ strid - capacity_
reservation_ Sequence[core.instances Get Compute Capacity Reservation Instances Capacity Reservation Instance] - 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.
Get Compute Capacity Reservation Instances Filter]
- capacity
Reservation StringId - capacity
Reservation List<Property Map>Instances - The list of capacity_reservation_instances.
- id String
- The provider-assigned unique ID for this managed resource.
- availability
Domain String - The availability domain the instance is running in.
- compartment
Id String - The OCID of the compartment that contains the instance.
- filters List<Property Map>
Supporting Types
GetComputeCapacityReservationInstancesCapacityReservationInstance
- Availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- Cluster
Placement stringGroup Id - The OCID of the cluster placement group of the instance.
- Compartment
Id string - The OCID of the compartment.
- Fault
Domain string - The fault domain the instance is running in.
- Id string
- The OCID of the instance.
- Shape string
- The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
- Shape
Configs List<GetCompute Capacity Reservation Instances Capacity Reservation Instance Shape Config> - The shape configuration requested when launching instances in a compute capacity reservation.
- Availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- Cluster
Placement stringGroup Id - The OCID of the cluster placement group of the instance.
- Compartment
Id string - The OCID of the compartment.
- Fault
Domain string - The fault domain the instance is running in.
- Id string
- The OCID of the instance.
- Shape string
- The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
- Shape
Configs []GetCompute Capacity Reservation Instances Capacity Reservation Instance Shape Config - The shape configuration requested when launching instances in a compute capacity reservation.
- availability
Domain String - The name of the availability domain. Example:
Uocm:PHX-AD-1
- cluster
Placement StringGroup Id - The OCID of the cluster placement group of the instance.
- compartment
Id String - The OCID of the compartment.
- fault
Domain String - The fault domain the instance is running in.
- id String
- The OCID of the instance.
- shape String
- The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
- shape
Configs List<GetCompute Capacity Reservation Instances Capacity Reservation Instance Shape Config> - The shape configuration requested when launching instances in a compute capacity reservation.
- availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- cluster
Placement stringGroup Id - The OCID of the cluster placement group of the instance.
- compartment
Id string - The OCID of the compartment.
- fault
Domain string - The fault domain the instance is running in.
- id string
- The OCID of the instance.
- shape string
- The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
- shape
Configs GetCompute Capacity Reservation Instances Capacity Reservation Instance Shape Config[] - The shape configuration requested when launching instances in a compute capacity reservation.
- availability_
domain str - The name of the availability domain. Example:
Uocm:PHX-AD-1
- cluster_
placement_ strgroup_ id - The OCID of the cluster placement group of the instance.
- compartment_
id str - The OCID of the compartment.
- fault_
domain str - The fault domain the instance is running in.
- id str
- The OCID of the instance.
- shape 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 Sequence[core.Get Compute Capacity Reservation Instances Capacity Reservation Instance Shape Config] - The shape configuration requested when launching instances in a compute capacity reservation.
- availability
Domain String - The name of the availability domain. Example:
Uocm:PHX-AD-1
- cluster
Placement StringGroup Id - The OCID of the cluster placement group of the instance.
- compartment
Id String - The OCID of the compartment.
- fault
Domain String - The fault domain the instance is running in.
- id String
- The OCID of the instance.
- shape String
- The shape of the instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance.
- shape
Configs List<Property Map> - The shape configuration requested when launching instances in a compute capacity reservation.
GetComputeCapacityReservationInstancesCapacityReservationInstanceShapeConfig
- Memory
In doubleGbs - The total amount of memory available to the instance, in gigabytes.
- Ocpus double
- The total number of OCPUs available to the instance.
- Memory
In float64Gbs - The total amount of memory available to the instance, in gigabytes.
- Ocpus float64
- The total number of OCPUs available to the instance.
- memory
In DoubleGbs - The total amount of memory available to the instance, in gigabytes.
- ocpus Double
- The total number of OCPUs available to the instance.
- memory
In 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.
- memory
In NumberGbs - The total amount of memory available to the instance, in gigabytes.
- ocpus Number
- The total number of OCPUs available to the instance.
GetComputeCapacityReservationInstancesFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.