Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.DatabaseManagement.getManagedDatabaseUsers
Explore with Pulumi AI
This data source provides the list of Managed Database Users in Oracle Cloud Infrastructure Database Management service.
Gets the list of users for the specified managedDatabaseId.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagedDatabaseUsers = oci.DatabaseManagement.getManagedDatabaseUsers({
    managedDatabaseId: testManagedDatabase.id,
    name: managedDatabaseUserName,
    opcNamedCredentialId: managedDatabaseUserOpcNamedCredentialId,
});
import pulumi
import pulumi_oci as oci
test_managed_database_users = oci.DatabaseManagement.get_managed_database_users(managed_database_id=test_managed_database["id"],
    name=managed_database_user_name,
    opc_named_credential_id=managed_database_user_opc_named_credential_id)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/databasemanagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databasemanagement.GetManagedDatabaseUsers(ctx, &databasemanagement.GetManagedDatabaseUsersArgs{
			ManagedDatabaseId:    testManagedDatabase.Id,
			Name:                 pulumi.StringRef(managedDatabaseUserName),
			OpcNamedCredentialId: pulumi.StringRef(managedDatabaseUserOpcNamedCredentialId),
		}, 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 testManagedDatabaseUsers = Oci.DatabaseManagement.GetManagedDatabaseUsers.Invoke(new()
    {
        ManagedDatabaseId = testManagedDatabase.Id,
        Name = managedDatabaseUserName,
        OpcNamedCredentialId = managedDatabaseUserOpcNamedCredentialId,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DatabaseManagement.DatabaseManagementFunctions;
import com.pulumi.oci.DatabaseManagement.inputs.GetManagedDatabaseUsersArgs;
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 testManagedDatabaseUsers = DatabaseManagementFunctions.getManagedDatabaseUsers(GetManagedDatabaseUsersArgs.builder()
            .managedDatabaseId(testManagedDatabase.id())
            .name(managedDatabaseUserName)
            .opcNamedCredentialId(managedDatabaseUserOpcNamedCredentialId)
            .build());
    }
}
variables:
  testManagedDatabaseUsers:
    fn::invoke:
      function: oci:DatabaseManagement:getManagedDatabaseUsers
      arguments:
        managedDatabaseId: ${testManagedDatabase.id}
        name: ${managedDatabaseUserName}
        opcNamedCredentialId: ${managedDatabaseUserOpcNamedCredentialId}
Using getManagedDatabaseUsers
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 getManagedDatabaseUsers(args: GetManagedDatabaseUsersArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseUsersResult>
function getManagedDatabaseUsersOutput(args: GetManagedDatabaseUsersOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseUsersResult>def get_managed_database_users(filters: Optional[Sequence[GetManagedDatabaseUsersFilter]] = None,
                               managed_database_id: Optional[str] = None,
                               name: Optional[str] = None,
                               opc_named_credential_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseUsersResult
def get_managed_database_users_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetManagedDatabaseUsersFilterArgs]]]] = None,
                               managed_database_id: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               opc_named_credential_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseUsersResult]func GetManagedDatabaseUsers(ctx *Context, args *GetManagedDatabaseUsersArgs, opts ...InvokeOption) (*GetManagedDatabaseUsersResult, error)
func GetManagedDatabaseUsersOutput(ctx *Context, args *GetManagedDatabaseUsersOutputArgs, opts ...InvokeOption) GetManagedDatabaseUsersResultOutput> Note: This function is named GetManagedDatabaseUsers in the Go SDK.
public static class GetManagedDatabaseUsers 
{
    public static Task<GetManagedDatabaseUsersResult> InvokeAsync(GetManagedDatabaseUsersArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseUsersResult> Invoke(GetManagedDatabaseUsersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetManagedDatabaseUsersResult> getManagedDatabaseUsers(GetManagedDatabaseUsersArgs args, InvokeOptions options)
public static Output<GetManagedDatabaseUsersResult> getManagedDatabaseUsers(GetManagedDatabaseUsersArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DatabaseManagement/getManagedDatabaseUsers:getManagedDatabaseUsers
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ManagedDatabase stringId 
- The OCID of the Managed Database.
- Filters
List<GetManaged Database Users Filter> 
- Name string
- A filter to return only resources that match the entire name.
- OpcNamed stringCredential Id 
- The OCID of the Named Credential.
- ManagedDatabase stringId 
- The OCID of the Managed Database.
- Filters
[]GetManaged Database Users Filter 
- Name string
- A filter to return only resources that match the entire name.
- OpcNamed stringCredential Id 
- The OCID of the Named Credential.
- managedDatabase StringId 
- The OCID of the Managed Database.
- filters
List<GetManaged Database Users Filter> 
- name String
- A filter to return only resources that match the entire name.
- opcNamed StringCredential Id 
- The OCID of the Named Credential.
- managedDatabase stringId 
- The OCID of the Managed Database.
- filters
GetManaged Database Users Filter[] 
- name string
- A filter to return only resources that match the entire name.
- opcNamed stringCredential Id 
- The OCID of the Named Credential.
- managed_database_ strid 
- The OCID of the Managed Database.
- filters
Sequence[GetManaged Database Users Filter] 
- name str
- A filter to return only resources that match the entire name.
- opc_named_ strcredential_ id 
- The OCID of the Named Credential.
- managedDatabase StringId 
- The OCID of the Managed Database.
- filters List<Property Map>
- name String
- A filter to return only resources that match the entire name.
- opcNamed StringCredential Id 
- The OCID of the Named Credential.
getManagedDatabaseUsers Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- ManagedDatabase stringId 
- UserCollections List<GetManaged Database Users User Collection> 
- The list of user_collection.
- Filters
List<GetManaged Database Users Filter> 
- Name string
- The name of the User.
- OpcNamed stringCredential Id 
- Id string
- The provider-assigned unique ID for this managed resource.
- ManagedDatabase stringId 
- UserCollections []GetManaged Database Users User Collection 
- The list of user_collection.
- Filters
[]GetManaged Database Users Filter 
- Name string
- The name of the User.
- OpcNamed stringCredential Id 
- id String
- The provider-assigned unique ID for this managed resource.
- managedDatabase StringId 
- userCollections List<GetManaged Database Users User Collection> 
- The list of user_collection.
- filters
List<GetManaged Database Users Filter> 
- name String
- The name of the User.
- opcNamed StringCredential Id 
- id string
- The provider-assigned unique ID for this managed resource.
- managedDatabase stringId 
- userCollections GetManaged Database Users User Collection[] 
- The list of user_collection.
- filters
GetManaged Database Users Filter[] 
- name string
- The name of the User.
- opcNamed stringCredential Id 
- id str
- The provider-assigned unique ID for this managed resource.
- managed_database_ strid 
- user_collections Sequence[GetManaged Database Users User Collection] 
- The list of user_collection.
- filters
Sequence[GetManaged Database Users Filter] 
- name str
- The name of the User.
- opc_named_ strcredential_ id 
- id String
- The provider-assigned unique ID for this managed resource.
- managedDatabase StringId 
- userCollections List<Property Map>
- The list of user_collection.
- filters List<Property Map>
- name String
- The name of the User.
- opcNamed StringCredential Id 
Supporting Types
GetManagedDatabaseUsersFilter    
GetManagedDatabaseUsersUserCollection     
GetManagedDatabaseUsersUserCollectionItem      
- string
- In a sharded database, indicates whether the user is created with shard DDL enabled (YES) or not (NO).
- Authentication string
- The authentication mechanism for the user.
- Common string
- Indicates whether a given user is common(Y) or local(N).
- ConsumerGroup string
- The initial resource consumer group for the User.
- DefaultCollation string
- The default collation for the user schema.
- DefaultTablespace string
- The default tablespace for data.
- EditionsEnabled string
- Indicates whether editions have been enabled for the corresponding user (Y) or not (N).
- ExternalName string
- The external name of the user.
- string
- In a federated sharded database, indicates whether the user is an external shard user (YES) or not (NO).
- Implicit string
- Indicates whether the user is a common user created by an implicit application (YES) or not (NO).
- Inherited string
- Indicates whether the user definition is inherited from another container (YES) or not (NO).
- LocalTemp stringTablespace 
- The default local temporary tablespace for the user.
- Name string
- A filter to return only resources that match the entire name.
- OracleMaintained string
- Indicates whether the user was created and is maintained by Oracle-supplied scripts (such as catalog.sql or catproc.sql).
- PasswordVersions string
- The list of existing versions of the password hashes (also known as "verifiers") for the account.
- Profile string
- The profile name of the user.
- ProxyConnect string
- Indicates whether a user can connect directly (N) or whether the account can only be proxied (Y) by users who have proxy privileges for this account (that is, by users who have been granted the "connect through" privilege for this account).
- Status string
- The status of the user account.
- TempTablespace string
- The name of the default tablespace for temporary tables or the name of a tablespace group.
- TimeCreated string
- The date and time the user was created.
- TimeExpiring string
- The date and time of the expiration of the user account.
- TimeLast stringLogin 
- The date and time of the last user login. This column is not populated when a user connects to the database with administrative privileges, that is, AS { SYSASM | SYSBACKUP | SYSDBA | SYSDG | SYSOPER | SYSRAC | SYSKM }.
- TimeLocked string
- The date the account was locked, if the status of the account is LOCKED.
- TimePassword stringChanged 
- The date and time when the user password was last set. This column is populated only when the value of the AUTHENTICATION_TYPE column is PASSWORD. Otherwise, this column is null.
- string
- In a sharded database, indicates whether the user is created with shard DDL enabled (YES) or not (NO).
- Authentication string
- The authentication mechanism for the user.
- Common string
- Indicates whether a given user is common(Y) or local(N).
- ConsumerGroup string
- The initial resource consumer group for the User.
- DefaultCollation string
- The default collation for the user schema.
- DefaultTablespace string
- The default tablespace for data.
- EditionsEnabled string
- Indicates whether editions have been enabled for the corresponding user (Y) or not (N).
- ExternalName string
- The external name of the user.
- string
- In a federated sharded database, indicates whether the user is an external shard user (YES) or not (NO).
- Implicit string
- Indicates whether the user is a common user created by an implicit application (YES) or not (NO).
- Inherited string
- Indicates whether the user definition is inherited from another container (YES) or not (NO).
- LocalTemp stringTablespace 
- The default local temporary tablespace for the user.
- Name string
- A filter to return only resources that match the entire name.
- OracleMaintained string
- Indicates whether the user was created and is maintained by Oracle-supplied scripts (such as catalog.sql or catproc.sql).
- PasswordVersions string
- The list of existing versions of the password hashes (also known as "verifiers") for the account.
- Profile string
- The profile name of the user.
- ProxyConnect string
- Indicates whether a user can connect directly (N) or whether the account can only be proxied (Y) by users who have proxy privileges for this account (that is, by users who have been granted the "connect through" privilege for this account).
- Status string
- The status of the user account.
- TempTablespace string
- The name of the default tablespace for temporary tables or the name of a tablespace group.
- TimeCreated string
- The date and time the user was created.
- TimeExpiring string
- The date and time of the expiration of the user account.
- TimeLast stringLogin 
- The date and time of the last user login. This column is not populated when a user connects to the database with administrative privileges, that is, AS { SYSASM | SYSBACKUP | SYSDBA | SYSDG | SYSOPER | SYSRAC | SYSKM }.
- TimeLocked string
- The date the account was locked, if the status of the account is LOCKED.
- TimePassword stringChanged 
- The date and time when the user password was last set. This column is populated only when the value of the AUTHENTICATION_TYPE column is PASSWORD. Otherwise, this column is null.
- String
- In a sharded database, indicates whether the user is created with shard DDL enabled (YES) or not (NO).
- authentication String
- The authentication mechanism for the user.
- common String
- Indicates whether a given user is common(Y) or local(N).
- consumerGroup String
- The initial resource consumer group for the User.
- defaultCollation String
- The default collation for the user schema.
- defaultTablespace String
- The default tablespace for data.
- editionsEnabled String
- Indicates whether editions have been enabled for the corresponding user (Y) or not (N).
- externalName String
- The external name of the user.
- String
- In a federated sharded database, indicates whether the user is an external shard user (YES) or not (NO).
- implicit String
- Indicates whether the user is a common user created by an implicit application (YES) or not (NO).
- inherited String
- Indicates whether the user definition is inherited from another container (YES) or not (NO).
- localTemp StringTablespace 
- The default local temporary tablespace for the user.
- name String
- A filter to return only resources that match the entire name.
- oracleMaintained String
- Indicates whether the user was created and is maintained by Oracle-supplied scripts (such as catalog.sql or catproc.sql).
- passwordVersions String
- The list of existing versions of the password hashes (also known as "verifiers") for the account.
- profile String
- The profile name of the user.
- proxyConnect String
- Indicates whether a user can connect directly (N) or whether the account can only be proxied (Y) by users who have proxy privileges for this account (that is, by users who have been granted the "connect through" privilege for this account).
- status String
- The status of the user account.
- tempTablespace String
- The name of the default tablespace for temporary tables or the name of a tablespace group.
- timeCreated String
- The date and time the user was created.
- timeExpiring String
- The date and time of the expiration of the user account.
- timeLast StringLogin 
- The date and time of the last user login. This column is not populated when a user connects to the database with administrative privileges, that is, AS { SYSASM | SYSBACKUP | SYSDBA | SYSDG | SYSOPER | SYSRAC | SYSKM }.
- timeLocked String
- The date the account was locked, if the status of the account is LOCKED.
- timePassword StringChanged 
- The date and time when the user password was last set. This column is populated only when the value of the AUTHENTICATION_TYPE column is PASSWORD. Otherwise, this column is null.
- string
- In a sharded database, indicates whether the user is created with shard DDL enabled (YES) or not (NO).
- authentication string
- The authentication mechanism for the user.
- common string
- Indicates whether a given user is common(Y) or local(N).
- consumerGroup string
- The initial resource consumer group for the User.
- defaultCollation string
- The default collation for the user schema.
- defaultTablespace string
- The default tablespace for data.
- editionsEnabled string
- Indicates whether editions have been enabled for the corresponding user (Y) or not (N).
- externalName string
- The external name of the user.
- string
- In a federated sharded database, indicates whether the user is an external shard user (YES) or not (NO).
- implicit string
- Indicates whether the user is a common user created by an implicit application (YES) or not (NO).
- inherited string
- Indicates whether the user definition is inherited from another container (YES) or not (NO).
- localTemp stringTablespace 
- The default local temporary tablespace for the user.
- name string
- A filter to return only resources that match the entire name.
- oracleMaintained string
- Indicates whether the user was created and is maintained by Oracle-supplied scripts (such as catalog.sql or catproc.sql).
- passwordVersions string
- The list of existing versions of the password hashes (also known as "verifiers") for the account.
- profile string
- The profile name of the user.
- proxyConnect string
- Indicates whether a user can connect directly (N) or whether the account can only be proxied (Y) by users who have proxy privileges for this account (that is, by users who have been granted the "connect through" privilege for this account).
- status string
- The status of the user account.
- tempTablespace string
- The name of the default tablespace for temporary tables or the name of a tablespace group.
- timeCreated string
- The date and time the user was created.
- timeExpiring string
- The date and time of the expiration of the user account.
- timeLast stringLogin 
- The date and time of the last user login. This column is not populated when a user connects to the database with administrative privileges, that is, AS { SYSASM | SYSBACKUP | SYSDBA | SYSDG | SYSOPER | SYSRAC | SYSKM }.
- timeLocked string
- The date the account was locked, if the status of the account is LOCKED.
- timePassword stringChanged 
- The date and time when the user password was last set. This column is populated only when the value of the AUTHENTICATION_TYPE column is PASSWORD. Otherwise, this column is null.
- str
- In a sharded database, indicates whether the user is created with shard DDL enabled (YES) or not (NO).
- authentication str
- The authentication mechanism for the user.
- common str
- Indicates whether a given user is common(Y) or local(N).
- consumer_group str
- The initial resource consumer group for the User.
- default_collation str
- The default collation for the user schema.
- default_tablespace str
- The default tablespace for data.
- editions_enabled str
- Indicates whether editions have been enabled for the corresponding user (Y) or not (N).
- external_name str
- The external name of the user.
- str
- In a federated sharded database, indicates whether the user is an external shard user (YES) or not (NO).
- implicit str
- Indicates whether the user is a common user created by an implicit application (YES) or not (NO).
- inherited str
- Indicates whether the user definition is inherited from another container (YES) or not (NO).
- local_temp_ strtablespace 
- The default local temporary tablespace for the user.
- name str
- A filter to return only resources that match the entire name.
- oracle_maintained str
- Indicates whether the user was created and is maintained by Oracle-supplied scripts (such as catalog.sql or catproc.sql).
- password_versions str
- The list of existing versions of the password hashes (also known as "verifiers") for the account.
- profile str
- The profile name of the user.
- proxy_connect str
- Indicates whether a user can connect directly (N) or whether the account can only be proxied (Y) by users who have proxy privileges for this account (that is, by users who have been granted the "connect through" privilege for this account).
- status str
- The status of the user account.
- temp_tablespace str
- The name of the default tablespace for temporary tables or the name of a tablespace group.
- time_created str
- The date and time the user was created.
- time_expiring str
- The date and time of the expiration of the user account.
- time_last_ strlogin 
- The date and time of the last user login. This column is not populated when a user connects to the database with administrative privileges, that is, AS { SYSASM | SYSBACKUP | SYSDBA | SYSDG | SYSOPER | SYSRAC | SYSKM }.
- time_locked str
- The date the account was locked, if the status of the account is LOCKED.
- time_password_ strchanged 
- The date and time when the user password was last set. This column is populated only when the value of the AUTHENTICATION_TYPE column is PASSWORD. Otherwise, this column is null.
- String
- In a sharded database, indicates whether the user is created with shard DDL enabled (YES) or not (NO).
- authentication String
- The authentication mechanism for the user.
- common String
- Indicates whether a given user is common(Y) or local(N).
- consumerGroup String
- The initial resource consumer group for the User.
- defaultCollation String
- The default collation for the user schema.
- defaultTablespace String
- The default tablespace for data.
- editionsEnabled String
- Indicates whether editions have been enabled for the corresponding user (Y) or not (N).
- externalName String
- The external name of the user.
- String
- In a federated sharded database, indicates whether the user is an external shard user (YES) or not (NO).
- implicit String
- Indicates whether the user is a common user created by an implicit application (YES) or not (NO).
- inherited String
- Indicates whether the user definition is inherited from another container (YES) or not (NO).
- localTemp StringTablespace 
- The default local temporary tablespace for the user.
- name String
- A filter to return only resources that match the entire name.
- oracleMaintained String
- Indicates whether the user was created and is maintained by Oracle-supplied scripts (such as catalog.sql or catproc.sql).
- passwordVersions String
- The list of existing versions of the password hashes (also known as "verifiers") for the account.
- profile String
- The profile name of the user.
- proxyConnect String
- Indicates whether a user can connect directly (N) or whether the account can only be proxied (Y) by users who have proxy privileges for this account (that is, by users who have been granted the "connect through" privilege for this account).
- status String
- The status of the user account.
- tempTablespace String
- The name of the default tablespace for temporary tables or the name of a tablespace group.
- timeCreated String
- The date and time the user was created.
- timeExpiring String
- The date and time of the expiration of the user account.
- timeLast StringLogin 
- The date and time of the last user login. This column is not populated when a user connects to the database with administrative privileges, that is, AS { SYSASM | SYSBACKUP | SYSDBA | SYSDG | SYSOPER | SYSRAC | SYSKM }.
- timeLocked String
- The date the account was locked, if the status of the account is LOCKED.
- timePassword StringChanged 
- The date and time when the user password was last set. This column is populated only when the value of the AUTHENTICATION_TYPE column is PASSWORD. Otherwise, this column is null.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.