Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.GloballyDistributedDatabase.getShardedDatabases
Explore with Pulumi AI
This data source provides the list of Sharded Databases in Oracle Cloud Infrastructure Globally Distributed Database service.
List of Sharded databases.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testShardedDatabases = oci.GloballyDistributedDatabase.getShardedDatabases({
    compartmentId: compartmentId,
    displayName: shardedDatabaseDisplayName,
    state: shardedDatabaseState,
});
import pulumi
import pulumi_oci as oci
test_sharded_databases = oci.GloballyDistributedDatabase.get_sharded_databases(compartment_id=compartment_id,
    display_name=sharded_database_display_name,
    state=sharded_database_state)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/globallydistributeddatabase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := globallydistributeddatabase.GetShardedDatabases(ctx, &globallydistributeddatabase.GetShardedDatabasesArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(shardedDatabaseDisplayName),
			State:         pulumi.StringRef(shardedDatabaseState),
		}, 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 testShardedDatabases = Oci.GloballyDistributedDatabase.GetShardedDatabases.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = shardedDatabaseDisplayName,
        State = shardedDatabaseState,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.GloballyDistributedDatabase.GloballyDistributedDatabaseFunctions;
import com.pulumi.oci.GloballyDistributedDatabase.inputs.GetShardedDatabasesArgs;
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 testShardedDatabases = GloballyDistributedDatabaseFunctions.getShardedDatabases(GetShardedDatabasesArgs.builder()
            .compartmentId(compartmentId)
            .displayName(shardedDatabaseDisplayName)
            .state(shardedDatabaseState)
            .build());
    }
}
variables:
  testShardedDatabases:
    fn::invoke:
      function: oci:GloballyDistributedDatabase:getShardedDatabases
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${shardedDatabaseDisplayName}
        state: ${shardedDatabaseState}
Using getShardedDatabases
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 getShardedDatabases(args: GetShardedDatabasesArgs, opts?: InvokeOptions): Promise<GetShardedDatabasesResult>
function getShardedDatabasesOutput(args: GetShardedDatabasesOutputArgs, opts?: InvokeOptions): Output<GetShardedDatabasesResult>def get_sharded_databases(compartment_id: Optional[str] = None,
                          display_name: Optional[str] = None,
                          filters: Optional[Sequence[GetShardedDatabasesFilter]] = None,
                          state: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetShardedDatabasesResult
def get_sharded_databases_output(compartment_id: Optional[pulumi.Input[str]] = None,
                          display_name: Optional[pulumi.Input[str]] = None,
                          filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetShardedDatabasesFilterArgs]]]] = None,
                          state: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetShardedDatabasesResult]func GetShardedDatabases(ctx *Context, args *GetShardedDatabasesArgs, opts ...InvokeOption) (*GetShardedDatabasesResult, error)
func GetShardedDatabasesOutput(ctx *Context, args *GetShardedDatabasesOutputArgs, opts ...InvokeOption) GetShardedDatabasesResultOutput> Note: This function is named GetShardedDatabases in the Go SDK.
public static class GetShardedDatabases 
{
    public static Task<GetShardedDatabasesResult> InvokeAsync(GetShardedDatabasesArgs args, InvokeOptions? opts = null)
    public static Output<GetShardedDatabasesResult> Invoke(GetShardedDatabasesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetShardedDatabasesResult> getShardedDatabases(GetShardedDatabasesArgs args, InvokeOptions options)
public static Output<GetShardedDatabasesResult> getShardedDatabases(GetShardedDatabasesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:GloballyDistributedDatabase/getShardedDatabases:getShardedDatabases
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The ID of the compartment in which to list resources.
- DisplayName string
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- Filters
List<GetSharded Databases Filter> 
- State string
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- CompartmentId string
- The ID of the compartment in which to list resources.
- DisplayName string
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- Filters
[]GetSharded Databases Filter 
- State string
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- compartmentId String
- The ID of the compartment in which to list resources.
- displayName String
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- filters
List<GetSharded Databases Filter> 
- state String
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- compartmentId string
- The ID of the compartment in which to list resources.
- displayName string
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- filters
GetSharded Databases Filter[] 
- state string
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- compartment_id str
- The ID of the compartment in which to list resources.
- display_name str
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- filters
Sequence[GetSharded Databases Filter] 
- state str
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- compartmentId String
- The ID of the compartment in which to list resources.
- displayName String
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- filters List<Property Map>
- state String
- A filter to return only resources their lifecycleState matches the given lifecycleState.
getShardedDatabases Result
The following output properties are available:
- CompartmentId string
- Identifier of the compartment in which sharded database exists.
- Id string
- The provider-assigned unique ID for this managed resource.
- 
List<GetSharded Databases Sharded Database Collection> 
- The list of sharded_database_collection.
- DisplayName string
- Oracle sharded database display name.
- Filters
List<GetSharded Databases Filter> 
- State string
- Lifecycle states for sharded databases.
- CompartmentId string
- Identifier of the compartment in which sharded database exists.
- Id string
- The provider-assigned unique ID for this managed resource.
- 
[]GetSharded Databases Sharded Database Collection 
- The list of sharded_database_collection.
- DisplayName string
- Oracle sharded database display name.
- Filters
[]GetSharded Databases Filter 
- State string
- Lifecycle states for sharded databases.
- compartmentId String
- Identifier of the compartment in which sharded database exists.
- id String
- The provider-assigned unique ID for this managed resource.
- 
List<GetSharded Databases Sharded Database Collection> 
- The list of sharded_database_collection.
- displayName String
- Oracle sharded database display name.
- filters
List<GetSharded Databases Filter> 
- state String
- Lifecycle states for sharded databases.
- compartmentId string
- Identifier of the compartment in which sharded database exists.
- id string
- The provider-assigned unique ID for this managed resource.
- 
GetSharded Databases Sharded Database Collection[] 
- The list of sharded_database_collection.
- displayName string
- Oracle sharded database display name.
- filters
GetSharded Databases Filter[] 
- state string
- Lifecycle states for sharded databases.
- compartment_id str
- Identifier of the compartment in which sharded database exists.
- id str
- The provider-assigned unique ID for this managed resource.
- 
Sequence[GetSharded Databases Sharded Database Collection] 
- The list of sharded_database_collection.
- display_name str
- Oracle sharded database display name.
- filters
Sequence[GetSharded Databases Filter] 
- state str
- Lifecycle states for sharded databases.
- compartmentId String
- Identifier of the compartment in which sharded database exists.
- id String
- The provider-assigned unique ID for this managed resource.
- List<Property Map>
- The list of sharded_database_collection.
- displayName String
- Oracle sharded database display name.
- filters List<Property Map>
- state String
- Lifecycle states for sharded databases.
Supporting Types
GetShardedDatabasesFilter   
GetShardedDatabasesShardedDatabaseCollection     
GetShardedDatabasesShardedDatabaseCollectionItem      
- CharacterSet string
- The character set for the database.
- Chunks int
- The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace.
- ClusterCertificate stringCommon Name 
- The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period.
- CompartmentId string
- The ID of the compartment in which to list resources.
- DbDeployment stringType 
- The database deployment type.
- DbVersion string
- Oracle Database version number.
- DbWorkload string
- Possible workload types.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- DisplayName string
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- Dictionary<string, string>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- Sharded Database identifier
- LifecycleState string
- LifecycleState stringDetails 
- Detailed message for the lifecycle state.
- ListenerPort int
- The GSM listener port number.
- ListenerPort intTls 
- The TLS listener port number for sharded database.
- NcharacterSet string
- The national character set for the database.
- OnsPort intLocal 
- Ons local port number.
- OnsPort intRemote 
- Ons remote port number.
- Prefix string
- Unique prefix for the sharded database.
- ReplicationFactor int
- The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7.
- ReplicationMethod string
- The Replication method for sharded database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG.
- ReplicationUnit int
- For RAFT replication based sharded database, the value should be atleast twice the number of shards.
- string
- Sharding Method.
- State string
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time the the Sharded Database was created. An RFC3339 formatted datetime string
- TimeUpdated string
- The time the Sharded Database was last updated. An RFC3339 formatted datetime string
- TotalCpu doubleCount 
- TotalData doubleStorage Size In Gbs 
- CharacterSet string
- The character set for the database.
- Chunks int
- The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace.
- ClusterCertificate stringCommon Name 
- The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period.
- CompartmentId string
- The ID of the compartment in which to list resources.
- DbDeployment stringType 
- The database deployment type.
- DbVersion string
- Oracle Database version number.
- DbWorkload string
- Possible workload types.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- DisplayName string
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- map[string]string
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- Sharded Database identifier
- LifecycleState string
- LifecycleState stringDetails 
- Detailed message for the lifecycle state.
- ListenerPort int
- The GSM listener port number.
- ListenerPort intTls 
- The TLS listener port number for sharded database.
- NcharacterSet string
- The national character set for the database.
- OnsPort intLocal 
- Ons local port number.
- OnsPort intRemote 
- Ons remote port number.
- Prefix string
- Unique prefix for the sharded database.
- ReplicationFactor int
- The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7.
- ReplicationMethod string
- The Replication method for sharded database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG.
- ReplicationUnit int
- For RAFT replication based sharded database, the value should be atleast twice the number of shards.
- string
- Sharding Method.
- State string
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time the the Sharded Database was created. An RFC3339 formatted datetime string
- TimeUpdated string
- The time the Sharded Database was last updated. An RFC3339 formatted datetime string
- TotalCpu float64Count 
- TotalData float64Storage Size In Gbs 
- characterSet String
- The character set for the database.
- chunks Integer
- The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace.
- clusterCertificate StringCommon Name 
- The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period.
- compartmentId String
- The ID of the compartment in which to list resources.
- dbDeployment StringType 
- The database deployment type.
- dbVersion String
- Oracle Database version number.
- dbWorkload String
- Possible workload types.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName String
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- Map<String,String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- Sharded Database identifier
- lifecycleState String
- lifecycleState StringDetails 
- Detailed message for the lifecycle state.
- listenerPort Integer
- The GSM listener port number.
- listenerPort IntegerTls 
- The TLS listener port number for sharded database.
- ncharacterSet String
- The national character set for the database.
- onsPort IntegerLocal 
- Ons local port number.
- onsPort IntegerRemote 
- Ons remote port number.
- prefix String
- Unique prefix for the sharded database.
- replicationFactor Integer
- The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7.
- replicationMethod String
- The Replication method for sharded database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG.
- replicationUnit Integer
- For RAFT replication based sharded database, the value should be atleast twice the number of shards.
- String
- Sharding Method.
- state String
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time the the Sharded Database was created. An RFC3339 formatted datetime string
- timeUpdated String
- The time the Sharded Database was last updated. An RFC3339 formatted datetime string
- totalCpu DoubleCount 
- totalData DoubleStorage Size In Gbs 
- characterSet string
- The character set for the database.
- chunks number
- The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace.
- clusterCertificate stringCommon Name 
- The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period.
- compartmentId string
- The ID of the compartment in which to list resources.
- dbDeployment stringType 
- The database deployment type.
- dbVersion string
- Oracle Database version number.
- dbWorkload string
- Possible workload types.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName string
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- {[key: string]: string}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id string
- Sharded Database identifier
- lifecycleState string
- lifecycleState stringDetails 
- Detailed message for the lifecycle state.
- listenerPort number
- The GSM listener port number.
- listenerPort numberTls 
- The TLS listener port number for sharded database.
- ncharacterSet string
- The national character set for the database.
- onsPort numberLocal 
- Ons local port number.
- onsPort numberRemote 
- Ons remote port number.
- prefix string
- Unique prefix for the sharded database.
- replicationFactor number
- The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7.
- replicationMethod string
- The Replication method for sharded database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG.
- replicationUnit number
- For RAFT replication based sharded database, the value should be atleast twice the number of shards.
- string
- Sharding Method.
- state string
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated string
- The time the the Sharded Database was created. An RFC3339 formatted datetime string
- timeUpdated string
- The time the Sharded Database was last updated. An RFC3339 formatted datetime string
- totalCpu numberCount 
- totalData numberStorage Size In Gbs 
- character_set str
- The character set for the database.
- chunks int
- The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace.
- cluster_certificate_ strcommon_ name 
- The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period.
- compartment_id str
- The ID of the compartment in which to list resources.
- db_deployment_ strtype 
- The database deployment type.
- db_version str
- Oracle Database version number.
- db_workload str
- Possible workload types.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- display_name str
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- Mapping[str, str]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id str
- Sharded Database identifier
- lifecycle_state str
- lifecycle_state_ strdetails 
- Detailed message for the lifecycle state.
- listener_port int
- The GSM listener port number.
- listener_port_ inttls 
- The TLS listener port number for sharded database.
- ncharacter_set str
- The national character set for the database.
- ons_port_ intlocal 
- Ons local port number.
- ons_port_ intremote 
- Ons remote port number.
- prefix str
- Unique prefix for the sharded database.
- replication_factor int
- The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7.
- replication_method str
- The Replication method for sharded database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG.
- replication_unit int
- For RAFT replication based sharded database, the value should be atleast twice the number of shards.
- str
- Sharding Method.
- state str
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- time_created str
- The time the the Sharded Database was created. An RFC3339 formatted datetime string
- time_updated str
- The time the Sharded Database was last updated. An RFC3339 formatted datetime string
- total_cpu_ floatcount 
- total_data_ floatstorage_ size_ in_ gbs 
- characterSet String
- The character set for the database.
- chunks Number
- The default number of unique chunks in a shardspace. The value of chunks must be greater than 2 times the size of the largest shardgroup in any shardspace.
- clusterCertificate StringCommon Name 
- The certificate common name used in all cloudAutonomousVmClusters for the sharded database topology. Eg. Production. All the clusters used in one sharded database topology shall have same CABundle setup. Valid characterset for clusterCertificateCommonName include uppercase or lowercase letters, numbers, hyphens, underscores, and period.
- compartmentId String
- The ID of the compartment in which to list resources.
- dbDeployment StringType 
- The database deployment type.
- dbVersion String
- Oracle Database version number.
- dbWorkload String
- Possible workload types.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName String
- A filter to return only sharded databases that match the entire name given. The match is not case sensitive.
- Map<String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- Sharded Database identifier
- lifecycleState String
- lifecycleState StringDetails 
- Detailed message for the lifecycle state.
- listenerPort Number
- The GSM listener port number.
- listenerPort NumberTls 
- The TLS listener port number for sharded database.
- ncharacterSet String
- The national character set for the database.
- onsPort NumberLocal 
- Ons local port number.
- onsPort NumberRemote 
- Ons remote port number.
- prefix String
- Unique prefix for the sharded database.
- replicationFactor Number
- The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7.
- replicationMethod String
- The Replication method for sharded database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG.
- replicationUnit Number
- For RAFT replication based sharded database, the value should be atleast twice the number of shards.
- String
- Sharding Method.
- state String
- A filter to return only resources their lifecycleState matches the given lifecycleState.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time the the Sharded Database was created. An RFC3339 formatted datetime string
- timeUpdated String
- The time the Sharded Database was last updated. An RFC3339 formatted datetime string
- totalCpu NumberCount 
- totalData NumberStorage Size In Gbs 
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.