Viewing docs for Oracle Cloud Infrastructure v5.7.0
published on Thursday, Nov 12, 2026 by Pulumi
published on Thursday, Nov 12, 2026 by Pulumi
Viewing docs for Oracle Cloud Infrastructure v5.7.0
published on Thursday, Nov 12, 2026 by Pulumi
published on Thursday, Nov 12, 2026 by Pulumi
This data source provides the list of Database Snapshots in Oracle Cloud Infrastructure Database service.
Gets a list of the Exadata Database Snapshots in the specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDatabaseSnapshots = oci.database.getDatabaseSnapshots({
clusterId: testCluster.id,
compartmentId: compartmentId,
databaseId: testDatabase.id,
name: databaseSnapshotName,
state: databaseSnapshotState,
});
import pulumi
import pulumi_oci as oci
test_database_snapshots = oci.database.get_database_snapshots(cluster_id=test_cluster["id"],
compartment_id=compartment_id,
database_id=test_database["id"],
name=database_snapshot_name,
state=database_snapshot_state)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v5/go/oci/database"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := database.GetDatabaseSnapshots(ctx, &database.GetDatabaseSnapshotsArgs{
ClusterId: pulumi.StringRef(testCluster.Id),
CompartmentId: pulumi.StringRef(compartmentId),
DatabaseId: pulumi.StringRef(testDatabase.Id),
Name: pulumi.StringRef(databaseSnapshotName),
State: pulumi.StringRef(databaseSnapshotState),
}, 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 testDatabaseSnapshots = Oci.Database.GetDatabaseSnapshots.Invoke(new()
{
ClusterId = testCluster.Id,
CompartmentId = compartmentId,
DatabaseId = testDatabase.Id,
Name = databaseSnapshotName,
State = databaseSnapshotState,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Database.DatabaseFunctions;
import com.pulumi.oci.Database.inputs.GetDatabaseSnapshotsArgs;
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 testDatabaseSnapshots = DatabaseFunctions.getDatabaseSnapshots(GetDatabaseSnapshotsArgs.builder()
.clusterId(testCluster.get("id"))
.compartmentId(compartmentId)
.databaseId(testDatabase.get("id"))
.name(databaseSnapshotName)
.state(databaseSnapshotState)
.build());
}
}
variables:
testDatabaseSnapshots:
fn::invoke:
function: oci:Database:getDatabaseSnapshots
arguments:
clusterId: ${testCluster.id}
compartmentId: ${compartmentId}
databaseId: ${testDatabase.id}
name: ${databaseSnapshotName}
state: ${databaseSnapshotState}
terraform {
required_providers {
oci = {
source = "pulumi/oci"
}
}
}
data "oci_database_database_snapshots" "testDatabaseSnapshots" {
cluster_id = testCluster.id
compartment_id = compartmentId
database_id = testDatabase.id
name = databaseSnapshotName
state = databaseSnapshotState
}
Using getDatabaseSnapshots
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 getDatabaseSnapshots(args: GetDatabaseSnapshotsArgs, opts?: InvokeOptions): Promise<GetDatabaseSnapshotsResult>
function getDatabaseSnapshotsOutput(args: GetDatabaseSnapshotsOutputArgs, opts?: InvokeOutputOptions): Output<GetDatabaseSnapshotsResult>def get_database_snapshots(cluster_id: Optional[str] = None,
compartment_id: Optional[str] = None,
database_id: Optional[str] = None,
filters: Optional[Sequence[GetDatabaseSnapshotsFilter]] = None,
name: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabaseSnapshotsResult
def get_database_snapshots_output(cluster_id: pulumi.Input[Optional[str]] = None,
compartment_id: pulumi.Input[Optional[str]] = None,
database_id: pulumi.Input[Optional[str]] = None,
filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetDatabaseSnapshotsFilterArgs]]]] = None,
name: pulumi.Input[Optional[str]] = None,
state: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetDatabaseSnapshotsResult]func GetDatabaseSnapshots(ctx *Context, args *GetDatabaseSnapshotsArgs, opts ...InvokeOption) (*GetDatabaseSnapshotsResult, error)
func GetDatabaseSnapshotsOutput(ctx *Context, args *GetDatabaseSnapshotsOutputArgs, opts ...InvokeOption) GetDatabaseSnapshotsResultOutput> Note: This function is named GetDatabaseSnapshots in the Go SDK.
public static class GetDatabaseSnapshots
{
public static Task<GetDatabaseSnapshotsResult> InvokeAsync(GetDatabaseSnapshotsArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseSnapshotsResult> Invoke(GetDatabaseSnapshotsInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseSnapshotsResult> Invoke(GetDatabaseSnapshotsInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetDatabaseSnapshotsResult> getDatabaseSnapshots(GetDatabaseSnapshotsArgs args, InvokeOptions options)
public static Output<GetDatabaseSnapshotsResult> getDatabaseSnapshots(GetDatabaseSnapshotsArgs args, InvokeOptions options)
public static Output<GetDatabaseSnapshotsResult> getDatabaseSnapshots(GetDatabaseSnapshotsArgs args, InvokeOutputOptions options)
fn::invoke:
function: oci:Database/getDatabaseSnapshots:getDatabaseSnapshots
arguments:
# arguments dictionarydata "oci_database_get_database_snapshots" "name" {
# arguments
}The following arguments are supported:
- Cluster
Id string - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- Compartment
Id string - The compartment OCID.
- Database
Id string - A filter to return only Exadata Database Snapshots that match the given Database Id.
- Filters
List<Get
Database Snapshots Filter> - Name string
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- State string
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- Cluster
Id string - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- Compartment
Id string - The compartment OCID.
- Database
Id string - A filter to return only Exadata Database Snapshots that match the given Database Id.
- Filters
[]Get
Database Snapshots Filter - Name string
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- State string
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- cluster_
id string - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment_
id string - The compartment OCID.
- database_
id string - A filter to return only Exadata Database Snapshots that match the given Database Id.
- filters list(object)
- name string
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state string
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- cluster
Id String - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment
Id String - The compartment OCID.
- database
Id String - A filter to return only Exadata Database Snapshots that match the given Database Id.
- filters
List<Get
Snapshots Filter> - name String
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state String
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- cluster
Id string - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment
Id string - The compartment OCID.
- database
Id string - A filter to return only Exadata Database Snapshots that match the given Database Id.
- filters
Get
Database Snapshots Filter[] - name string
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state string
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- cluster_
id str - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment_
id str - The compartment OCID.
- database_
id str - A filter to return only Exadata Database Snapshots that match the given Database Id.
- filters
Sequence[Get
Database Snapshots Filter] - name str
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state str
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- cluster
Id String - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment
Id String - The compartment OCID.
- database
Id String - A filter to return only Exadata Database Snapshots that match the given Database Id.
- filters List<Property Map>
- name String
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state String
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
getDatabaseSnapshots Result
The following output properties are available:
- Database
Snapshot List<GetCollections Database Snapshots Database Snapshot Collection> - The list of database_snapshot_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Cluster
Id string - The OCID of the VM cluster.
- Compartment
Id string - The OCID of the compartment.
- Database
Id string - The OCID of the Exadata Database.
- Filters
List<Get
Database Snapshots Filter> - Name string
- The user-friendly name for the Database Snapshot. The name should be unique.
- State string
- The current state of the Exadata Database Snapshot.
- Database
Snapshot []GetCollections Database Snapshots Database Snapshot Collection - The list of database_snapshot_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Cluster
Id string - The OCID of the VM cluster.
- Compartment
Id string - The OCID of the compartment.
- Database
Id string - The OCID of the Exadata Database.
- Filters
[]Get
Database Snapshots Filter - Name string
- The user-friendly name for the Database Snapshot. The name should be unique.
- State string
- The current state of the Exadata Database Snapshot.
- database_
snapshot_ list(object)collections - The list of database_snapshot_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- cluster_
id string - The OCID of the VM cluster.
- compartment_
id string - The OCID of the compartment.
- database_
id string - The OCID of the Exadata Database.
- filters list(object)
- name string
- The user-friendly name for the Database Snapshot. The name should be unique.
- state string
- The current state of the Exadata Database Snapshot.
- database
Snapshot List<GetCollections Snapshots Snapshot Collection> - The list of database_snapshot_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- cluster
Id String - The OCID of the VM cluster.
- compartment
Id String - The OCID of the compartment.
- database
Id String - The OCID of the Exadata Database.
- filters
List<Get
Snapshots Filter> - name String
- The user-friendly name for the Database Snapshot. The name should be unique.
- state String
- The current state of the Exadata Database Snapshot.
- database
Snapshot GetCollections Database Snapshots Database Snapshot Collection[] - The list of database_snapshot_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- cluster
Id string - The OCID of the VM cluster.
- compartment
Id string - The OCID of the compartment.
- database
Id string - The OCID of the Exadata Database.
- filters
Get
Database Snapshots Filter[] - name string
- The user-friendly name for the Database Snapshot. The name should be unique.
- state string
- The current state of the Exadata Database Snapshot.
- database_
snapshot_ Sequence[Getcollections Database Snapshots Database Snapshot Collection] - The list of database_snapshot_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- cluster_
id str - The OCID of the VM cluster.
- compartment_
id str - The OCID of the compartment.
- database_
id str - The OCID of the Exadata Database.
- filters
Sequence[Get
Database Snapshots Filter] - name str
- The user-friendly name for the Database Snapshot. The name should be unique.
- state str
- The current state of the Exadata Database Snapshot.
- database
Snapshot List<Property Map>Collections - The list of database_snapshot_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- cluster
Id String - The OCID of the VM cluster.
- compartment
Id String - The OCID of the compartment.
- database
Id String - The OCID of the Exadata Database.
- filters List<Property Map>
- name String
- The user-friendly name for the Database Snapshot. The name should be unique.
- state String
- The current state of the Exadata Database Snapshot.
Supporting Types
GetDatabaseSnapshotsDatabaseSnapshotCollection
GetDatabaseSnapshotsDatabaseSnapshotCollectionItem
- Cluster
Id string - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- Compartment
Id string - The compartment OCID.
- Database
Id string - A filter to return only Exadata Database Snapshots that match the given Database Id.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- 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 Exadata Database Snapshot.
- Lifecycle
Details string - Additional information about the current lifecycle state of the Exadata Database Snapshot.
- Name string
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- State string
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Time
Created string - The date and time that the Exadata Database Snapshot was created, as expressed in RFC 3339 format. For example: 2023-06-27T21:10:29Z
- Cluster
Id string - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- Compartment
Id string - The compartment OCID.
- Database
Id string - A filter to return only Exadata Database Snapshots that match the given Database Id.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- 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 Exadata Database Snapshot.
- Lifecycle
Details string - Additional information about the current lifecycle state of the Exadata Database Snapshot.
- Name string
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- State string
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Time
Created string - The date and time that the Exadata Database Snapshot was created, as expressed in RFC 3339 format. For example: 2023-06-27T21:10:29Z
- cluster_
id string - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment_
id string - The compartment OCID.
- database_
id string - A filter to return only Exadata Database Snapshots that match the given Database Id.
- map(string)
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- 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 Exadata Database Snapshot.
- lifecycle_
details string - Additional information about the current lifecycle state of the Exadata Database Snapshot.
- name string
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state string
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- map(string)
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- time_
created string - The date and time that the Exadata Database Snapshot was created, as expressed in RFC 3339 format. For example: 2023-06-27T21:10:29Z
- cluster
Id String - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment
Id String - The compartment OCID.
- database
Id String - A filter to return only Exadata Database Snapshots that match the given Database Id.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- 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 Exadata Database Snapshot.
- lifecycle
Details String - Additional information about the current lifecycle state of the Exadata Database Snapshot.
- name String
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state String
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- time
Created String - The date and time that the Exadata Database Snapshot was created, as expressed in RFC 3339 format. For example: 2023-06-27T21:10:29Z
- cluster
Id string - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment
Id string - The compartment OCID.
- database
Id string - A filter to return only Exadata Database Snapshots that match the given Database Id.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- {[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 Exadata Database Snapshot.
- lifecycle
Details string - Additional information about the current lifecycle state of the Exadata Database Snapshot.
- name string
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state string
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- time
Created string - The date and time that the Exadata Database Snapshot was created, as expressed in RFC 3339 format. For example: 2023-06-27T21:10:29Z
- cluster_
id str - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment_
id str - The compartment OCID.
- database_
id str - A filter to return only Exadata Database Snapshots that match the given Database Id.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- 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 Exadata Database Snapshot.
- lifecycle_
details str - Additional information about the current lifecycle state of the Exadata Database Snapshot.
- name str
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state str
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- time_
created str - The date and time that the Exadata Database Snapshot was created, as expressed in RFC 3339 format. For example: 2023-06-27T21:10:29Z
- cluster
Id String - A filter to return only Exadata Database Snapshots that match the given VM cluster.
- compartment
Id String - The compartment OCID.
- database
Id String - A filter to return only Exadata Database Snapshots that match the given Database Id.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- 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 Exadata Database Snapshot.
- lifecycle
Details String - Additional information about the current lifecycle state of the Exadata Database Snapshot.
- name String
- A filter to return only resources that match the entire name given. The match is not case sensitive.
- state String
- A filter to return only Exadata Database Snapshots that match the given lifecycle state exactly.
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- time
Created String - The date and time that the Exadata Database Snapshot was created, as expressed in RFC 3339 format. For example: 2023-06-27T21:10:29Z
GetDatabaseSnapshotsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
Viewing docs for Oracle Cloud Infrastructure v5.7.0
published on Thursday, Nov 12, 2026 by Pulumi
published on Thursday, Nov 12, 2026 by Pulumi