1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getBlockVolumeReplicas
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Core.getBlockVolumeReplicas

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Block Volume Replicas in Oracle Cloud Infrastructure Core service.

Lists the block volume replicas in the specified compartment and availability domain.

Example Usage

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

const testBlockVolumeReplicas = oci.Core.getBlockVolumeReplicas({
    availabilityDomain: blockVolumeReplicaAvailabilityDomain,
    compartmentId: compartmentId,
    displayName: blockVolumeReplicaDisplayName,
    state: blockVolumeReplicaState,
    volumeGroupReplicaId: testVolumeGroupReplica.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_block_volume_replicas = oci.Core.get_block_volume_replicas(availability_domain=block_volume_replica_availability_domain,
    compartment_id=compartment_id,
    display_name=block_volume_replica_display_name,
    state=block_volume_replica_state,
    volume_group_replica_id=test_volume_group_replica["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.GetBlockVolumeReplicas(ctx, &core.GetBlockVolumeReplicasArgs{
			AvailabilityDomain:   pulumi.StringRef(blockVolumeReplicaAvailabilityDomain),
			CompartmentId:        pulumi.StringRef(compartmentId),
			DisplayName:          pulumi.StringRef(blockVolumeReplicaDisplayName),
			State:                pulumi.StringRef(blockVolumeReplicaState),
			VolumeGroupReplicaId: pulumi.StringRef(testVolumeGroupReplica.Id),
		}, 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 testBlockVolumeReplicas = Oci.Core.GetBlockVolumeReplicas.Invoke(new()
    {
        AvailabilityDomain = blockVolumeReplicaAvailabilityDomain,
        CompartmentId = compartmentId,
        DisplayName = blockVolumeReplicaDisplayName,
        State = blockVolumeReplicaState,
        VolumeGroupReplicaId = testVolumeGroupReplica.Id,
    });

});
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.GetBlockVolumeReplicasArgs;
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 testBlockVolumeReplicas = CoreFunctions.getBlockVolumeReplicas(GetBlockVolumeReplicasArgs.builder()
            .availabilityDomain(blockVolumeReplicaAvailabilityDomain)
            .compartmentId(compartmentId)
            .displayName(blockVolumeReplicaDisplayName)
            .state(blockVolumeReplicaState)
            .volumeGroupReplicaId(testVolumeGroupReplica.id())
            .build());

    }
}
Copy
variables:
  testBlockVolumeReplicas:
    fn::invoke:
      function: oci:Core:getBlockVolumeReplicas
      arguments:
        availabilityDomain: ${blockVolumeReplicaAvailabilityDomain}
        compartmentId: ${compartmentId}
        displayName: ${blockVolumeReplicaDisplayName}
        state: ${blockVolumeReplicaState}
        volumeGroupReplicaId: ${testVolumeGroupReplica.id}
Copy

Using getBlockVolumeReplicas

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 getBlockVolumeReplicas(args: GetBlockVolumeReplicasArgs, opts?: InvokeOptions): Promise<GetBlockVolumeReplicasResult>
function getBlockVolumeReplicasOutput(args: GetBlockVolumeReplicasOutputArgs, opts?: InvokeOptions): Output<GetBlockVolumeReplicasResult>
Copy
def get_block_volume_replicas(availability_domain: Optional[str] = None,
                              compartment_id: Optional[str] = None,
                              display_name: Optional[str] = None,
                              filters: Optional[Sequence[_core.GetBlockVolumeReplicasFilter]] = None,
                              state: Optional[str] = None,
                              volume_group_replica_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetBlockVolumeReplicasResult
def get_block_volume_replicas_output(availability_domain: Optional[pulumi.Input[str]] = None,
                              compartment_id: Optional[pulumi.Input[str]] = None,
                              display_name: Optional[pulumi.Input[str]] = None,
                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetBlockVolumeReplicasFilterArgs]]]] = None,
                              state: Optional[pulumi.Input[str]] = None,
                              volume_group_replica_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetBlockVolumeReplicasResult]
Copy
func GetBlockVolumeReplicas(ctx *Context, args *GetBlockVolumeReplicasArgs, opts ...InvokeOption) (*GetBlockVolumeReplicasResult, error)
func GetBlockVolumeReplicasOutput(ctx *Context, args *GetBlockVolumeReplicasOutputArgs, opts ...InvokeOption) GetBlockVolumeReplicasResultOutput
Copy

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

public static class GetBlockVolumeReplicas 
{
    public static Task<GetBlockVolumeReplicasResult> InvokeAsync(GetBlockVolumeReplicasArgs args, InvokeOptions? opts = null)
    public static Output<GetBlockVolumeReplicasResult> Invoke(GetBlockVolumeReplicasInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetBlockVolumeReplicasResult> getBlockVolumeReplicas(GetBlockVolumeReplicasArgs args, InvokeOptions options)
public static Output<GetBlockVolumeReplicasResult> getBlockVolumeReplicas(GetBlockVolumeReplicasArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Core/getBlockVolumeReplicas:getBlockVolumeReplicas
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AvailabilityDomain string
The name of the availability domain. Example: Uocm:PHX-AD-1
CompartmentId string
The OCID of the compartment.
DisplayName string
A filter to return only resources that match the given display name exactly.
Filters Changes to this property will trigger replacement. List<GetBlockVolumeReplicasFilter>
State string
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
VolumeGroupReplicaId string
The OCID of the volume group replica.
AvailabilityDomain string
The name of the availability domain. Example: Uocm:PHX-AD-1
CompartmentId string
The OCID of the compartment.
DisplayName string
A filter to return only resources that match the given display name exactly.
Filters Changes to this property will trigger replacement. []GetBlockVolumeReplicasFilter
State string
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
VolumeGroupReplicaId string
The OCID of the volume group replica.
availabilityDomain String
The name of the availability domain. Example: Uocm:PHX-AD-1
compartmentId String
The OCID of the compartment.
displayName String
A filter to return only resources that match the given display name exactly.
filters Changes to this property will trigger replacement. List<GetBlockVolumeReplicasFilter>
state String
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
volumeGroupReplicaId String
The OCID of the volume group replica.
availabilityDomain string
The name of the availability domain. Example: Uocm:PHX-AD-1
compartmentId string
The OCID of the compartment.
displayName string
A filter to return only resources that match the given display name exactly.
filters Changes to this property will trigger replacement. GetBlockVolumeReplicasFilter[]
state string
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
volumeGroupReplicaId string
The OCID of the volume group replica.
availability_domain str
The name of the availability domain. Example: Uocm:PHX-AD-1
compartment_id str
The OCID of the compartment.
display_name str
A filter to return only resources that match the given display name exactly.
filters Changes to this property will trigger replacement. Sequence[core.GetBlockVolumeReplicasFilter]
state str
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
volume_group_replica_id str
The OCID of the volume group replica.
availabilityDomain String
The name of the availability domain. Example: Uocm:PHX-AD-1
compartmentId String
The OCID of the compartment.
displayName String
A filter to return only resources that match the given display name exactly.
filters Changes to this property will trigger replacement. List<Property Map>
state String
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
volumeGroupReplicaId String
The OCID of the volume group replica.

getBlockVolumeReplicas Result

The following output properties are available:

BlockVolumeReplicas List<GetBlockVolumeReplicasBlockVolumeReplica>
The list of block_volume_replicas.
Id string
The provider-assigned unique ID for this managed resource.
AvailabilityDomain string
The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
CompartmentId string
The OCID of the compartment that contains the block volume replica.
DisplayName string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
Filters List<GetBlockVolumeReplicasFilter>
State string
The current state of a block volume replica.
VolumeGroupReplicaId string
BlockVolumeReplicas []GetBlockVolumeReplicasBlockVolumeReplica
The list of block_volume_replicas.
Id string
The provider-assigned unique ID for this managed resource.
AvailabilityDomain string
The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
CompartmentId string
The OCID of the compartment that contains the block volume replica.
DisplayName string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
Filters []GetBlockVolumeReplicasFilter
State string
The current state of a block volume replica.
VolumeGroupReplicaId string
blockVolumeReplicas List<GetBlockVolumeReplicasBlockVolumeReplica>
The list of block_volume_replicas.
id String
The provider-assigned unique ID for this managed resource.
availabilityDomain String
The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
compartmentId String
The OCID of the compartment that contains the block volume replica.
displayName String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
filters List<GetBlockVolumeReplicasFilter>
state String
The current state of a block volume replica.
volumeGroupReplicaId String
blockVolumeReplicas GetBlockVolumeReplicasBlockVolumeReplica[]
The list of block_volume_replicas.
id string
The provider-assigned unique ID for this managed resource.
availabilityDomain string
The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
compartmentId string
The OCID of the compartment that contains the block volume replica.
displayName string
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
filters GetBlockVolumeReplicasFilter[]
state string
The current state of a block volume replica.
volumeGroupReplicaId string
block_volume_replicas Sequence[core.GetBlockVolumeReplicasBlockVolumeReplica]
The list of block_volume_replicas.
id str
The provider-assigned unique ID for this managed resource.
availability_domain str
The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
compartment_id str
The OCID of the compartment that contains the block volume replica.
display_name str
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
filters Sequence[core.GetBlockVolumeReplicasFilter]
state str
The current state of a block volume replica.
volume_group_replica_id str
blockVolumeReplicas List<Property Map>
The list of block_volume_replicas.
id String
The provider-assigned unique ID for this managed resource.
availabilityDomain String
The availability domain of the block volume replica. Example: Uocm:PHX-AD-1
compartmentId String
The OCID of the compartment that contains the block volume replica.
displayName String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
filters List<Property Map>
state String
The current state of a block volume replica.
volumeGroupReplicaId String

Supporting Types

GetBlockVolumeReplicasBlockVolumeReplica

AvailabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
BlockVolumeId This property is required. string
The OCID of the source block volume.
CompartmentId This property is required. string
The OCID of the compartment.
DefinedTags This property is required. 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 This property is required. string
A filter to return only resources that match the given display name exactly.
FreeformTags This property is required. 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 This property is required. string
The block volume replica's Oracle ID (OCID).
KmsKeyId This property is required. string
The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see Overview of Vault service and Using Keys.
SizeInGbs This property is required. string
The size of the source block volume, in GBs.
State This property is required. string
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
TimeCreated This property is required. string
The date and time the block volume replica was created. Format defined by RFC3339.
TimeLastSynced This property is required. string
The date and time the block volume replica was last synced from the source block volume. Format defined by RFC3339.
VolumeGroupReplicaId This property is required. string
The OCID of the volume group replica.
AvailabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
BlockVolumeId This property is required. string
The OCID of the source block volume.
CompartmentId This property is required. string
The OCID of the compartment.
DefinedTags This property is required. 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 This property is required. string
A filter to return only resources that match the given display name exactly.
FreeformTags This property is required. 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 This property is required. string
The block volume replica's Oracle ID (OCID).
KmsKeyId This property is required. string
The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see Overview of Vault service and Using Keys.
SizeInGbs This property is required. string
The size of the source block volume, in GBs.
State This property is required. string
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
TimeCreated This property is required. string
The date and time the block volume replica was created. Format defined by RFC3339.
TimeLastSynced This property is required. string
The date and time the block volume replica was last synced from the source block volume. Format defined by RFC3339.
VolumeGroupReplicaId This property is required. string
The OCID of the volume group replica.
availabilityDomain This property is required. String
The name of the availability domain. Example: Uocm:PHX-AD-1
blockVolumeId This property is required. String
The OCID of the source block volume.
compartmentId This property is required. String
The OCID of the compartment.
definedTags This property is required. 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 This property is required. String
A filter to return only resources that match the given display name exactly.
freeformTags This property is required. 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 This property is required. String
The block volume replica's Oracle ID (OCID).
kmsKeyId This property is required. String
The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see Overview of Vault service and Using Keys.
sizeInGbs This property is required. String
The size of the source block volume, in GBs.
state This property is required. String
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
timeCreated This property is required. String
The date and time the block volume replica was created. Format defined by RFC3339.
timeLastSynced This property is required. String
The date and time the block volume replica was last synced from the source block volume. Format defined by RFC3339.
volumeGroupReplicaId This property is required. String
The OCID of the volume group replica.
availabilityDomain This property is required. string
The name of the availability domain. Example: Uocm:PHX-AD-1
blockVolumeId This property is required. string
The OCID of the source block volume.
compartmentId This property is required. string
The OCID of the compartment.
definedTags This property is required. {[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 This property is required. string
A filter to return only resources that match the given display name exactly.
freeformTags This property is required. {[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 This property is required. string
The block volume replica's Oracle ID (OCID).
kmsKeyId This property is required. string
The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see Overview of Vault service and Using Keys.
sizeInGbs This property is required. string
The size of the source block volume, in GBs.
state This property is required. string
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
timeCreated This property is required. string
The date and time the block volume replica was created. Format defined by RFC3339.
timeLastSynced This property is required. string
The date and time the block volume replica was last synced from the source block volume. Format defined by RFC3339.
volumeGroupReplicaId This property is required. string
The OCID of the volume group replica.
availability_domain This property is required. str
The name of the availability domain. Example: Uocm:PHX-AD-1
block_volume_id This property is required. str
The OCID of the source block volume.
compartment_id This property is required. str
The OCID of the compartment.
defined_tags This property is required. 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 This property is required. str
A filter to return only resources that match the given display name exactly.
freeform_tags This property is required. 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 This property is required. str
The block volume replica's Oracle ID (OCID).
kms_key_id This property is required. str
The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see Overview of Vault service and Using Keys.
size_in_gbs This property is required. str
The size of the source block volume, in GBs.
state This property is required. str
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
time_created This property is required. str
The date and time the block volume replica was created. Format defined by RFC3339.
time_last_synced This property is required. str
The date and time the block volume replica was last synced from the source block volume. Format defined by RFC3339.
volume_group_replica_id This property is required. str
The OCID of the volume group replica.
availabilityDomain This property is required. String
The name of the availability domain. Example: Uocm:PHX-AD-1
blockVolumeId This property is required. String
The OCID of the source block volume.
compartmentId This property is required. String
The OCID of the compartment.
definedTags This property is required. 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 This property is required. String
A filter to return only resources that match the given display name exactly.
freeformTags This property is required. 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 This property is required. String
The block volume replica's Oracle ID (OCID).
kmsKeyId This property is required. String
The OCID of the Vault service key to assign as the master encryption key for the block volume replica, see Overview of Vault service and Using Keys.
sizeInGbs This property is required. String
The size of the source block volume, in GBs.
state This property is required. String
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
timeCreated This property is required. String
The date and time the block volume replica was created. Format defined by RFC3339.
timeLastSynced This property is required. String
The date and time the block volume replica was last synced from the source block volume. Format defined by RFC3339.
volumeGroupReplicaId This property is required. String
The OCID of the volume group replica.

GetBlockVolumeReplicasFilter

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.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi