Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Database.getManagedPreferredCredentials
Explore with Pulumi AI
This data source provides the list of Managed Database Preferred Credentials in Oracle Cloud Infrastructure Database Management service.
Gets the list of preferred credentials for a given Managed Database.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagedDatabasePreferredCredentials = oci.Database.getManagedPreferredCredentials({
    managedDatabaseId: testManagedDatabase.id,
});
import pulumi
import pulumi_oci as oci
test_managed_database_preferred_credentials = oci.Database.get_managed_preferred_credentials(managed_database_id=test_managed_database["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/database"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := database.GetManagedPreferredCredentials(ctx, &database.GetManagedPreferredCredentialsArgs{
			ManagedDatabaseId: testManagedDatabase.Id,
		}, 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 testManagedDatabasePreferredCredentials = Oci.Database.GetManagedPreferredCredentials.Invoke(new()
    {
        ManagedDatabaseId = testManagedDatabase.Id,
    });
});
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.GetManagedPreferredCredentialsArgs;
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 testManagedDatabasePreferredCredentials = DatabaseFunctions.getManagedPreferredCredentials(GetManagedPreferredCredentialsArgs.builder()
            .managedDatabaseId(testManagedDatabase.id())
            .build());
    }
}
variables:
  testManagedDatabasePreferredCredentials:
    fn::invoke:
      function: oci:Database:getManagedPreferredCredentials
      arguments:
        managedDatabaseId: ${testManagedDatabase.id}
Using getManagedPreferredCredentials
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 getManagedPreferredCredentials(args: GetManagedPreferredCredentialsArgs, opts?: InvokeOptions): Promise<GetManagedPreferredCredentialsResult>
function getManagedPreferredCredentialsOutput(args: GetManagedPreferredCredentialsOutputArgs, opts?: InvokeOptions): Output<GetManagedPreferredCredentialsResult>def get_managed_preferred_credentials(filters: Optional[Sequence[GetManagedPreferredCredentialsFilter]] = None,
                                      managed_database_id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetManagedPreferredCredentialsResult
def get_managed_preferred_credentials_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetManagedPreferredCredentialsFilterArgs]]]] = None,
                                      managed_database_id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetManagedPreferredCredentialsResult]func GetManagedPreferredCredentials(ctx *Context, args *GetManagedPreferredCredentialsArgs, opts ...InvokeOption) (*GetManagedPreferredCredentialsResult, error)
func GetManagedPreferredCredentialsOutput(ctx *Context, args *GetManagedPreferredCredentialsOutputArgs, opts ...InvokeOption) GetManagedPreferredCredentialsResultOutput> Note: This function is named GetManagedPreferredCredentials in the Go SDK.
public static class GetManagedPreferredCredentials 
{
    public static Task<GetManagedPreferredCredentialsResult> InvokeAsync(GetManagedPreferredCredentialsArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedPreferredCredentialsResult> Invoke(GetManagedPreferredCredentialsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetManagedPreferredCredentialsResult> getManagedPreferredCredentials(GetManagedPreferredCredentialsArgs args, InvokeOptions options)
public static Output<GetManagedPreferredCredentialsResult> getManagedPreferredCredentials(GetManagedPreferredCredentialsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Database/getManagedPreferredCredentials:getManagedPreferredCredentials
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ManagedDatabase stringId 
- The OCID of the Managed Database.
- Filters
List<GetManaged Preferred Credentials Filter> 
- ManagedDatabase stringId 
- The OCID of the Managed Database.
- Filters
[]GetManaged Preferred Credentials Filter 
- managedDatabase StringId 
- The OCID of the Managed Database.
- filters
List<GetManaged Preferred Credentials Filter> 
- managedDatabase stringId 
- The OCID of the Managed Database.
- filters
GetManaged Preferred Credentials Filter[] 
- managed_database_ strid 
- The OCID of the Managed Database.
- filters
Sequence[GetManaged Preferred Credentials Filter] 
- managedDatabase StringId 
- The OCID of the Managed Database.
- filters List<Property Map>
getManagedPreferredCredentials Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- ManagedDatabase stringId 
- PreferredCredential List<GetCollections Managed Preferred Credentials Preferred Credential Collection> 
- The list of preferred_credential_collection.
- Filters
List<GetManaged Preferred Credentials Filter> 
- Id string
- The provider-assigned unique ID for this managed resource.
- ManagedDatabase stringId 
- PreferredCredential []GetCollections Managed Preferred Credentials Preferred Credential Collection 
- The list of preferred_credential_collection.
- Filters
[]GetManaged Preferred Credentials Filter 
- id String
- The provider-assigned unique ID for this managed resource.
- managedDatabase StringId 
- preferredCredential List<GetCollections Managed Preferred Credentials Preferred Credential Collection> 
- The list of preferred_credential_collection.
- filters
List<GetManaged Preferred Credentials Filter> 
- id string
- The provider-assigned unique ID for this managed resource.
- managedDatabase stringId 
- preferredCredential GetCollections Managed Preferred Credentials Preferred Credential Collection[] 
- The list of preferred_credential_collection.
- filters
GetManaged Preferred Credentials Filter[] 
- id str
- The provider-assigned unique ID for this managed resource.
- managed_database_ strid 
- preferred_credential_ Sequence[Getcollections Managed Preferred Credentials Preferred Credential Collection] 
- The list of preferred_credential_collection.
- filters
Sequence[GetManaged Preferred Credentials Filter] 
- id String
- The provider-assigned unique ID for this managed resource.
- managedDatabase StringId 
- preferredCredential List<Property Map>Collections 
- The list of preferred_credential_collection.
- filters List<Property Map>
Supporting Types
GetManagedPreferredCredentialsFilter    
GetManagedPreferredCredentialsPreferredCredentialCollection      
GetManagedPreferredCredentialsPreferredCredentialCollectionItem       
- CredentialName string
- The name of the preferred credential.
- IsAccessible bool
- Indicates whether the preferred credential is accessible.
- NamedCredential stringId 
- The OCID of the Named Credential that contains the database user password metadata.
- PasswordSecret stringId 
- The OCID of the Vault service secret that contains the database user password.
- Role string
- The role of the database user.
- Status string
- The status of the preferred credential.
- Type string
- The type of preferred credential. Only 'BASIC' is supported currently.
- UserName string
- The user name used to connect to the database.
- CredentialName string
- The name of the preferred credential.
- IsAccessible bool
- Indicates whether the preferred credential is accessible.
- NamedCredential stringId 
- The OCID of the Named Credential that contains the database user password metadata.
- PasswordSecret stringId 
- The OCID of the Vault service secret that contains the database user password.
- Role string
- The role of the database user.
- Status string
- The status of the preferred credential.
- Type string
- The type of preferred credential. Only 'BASIC' is supported currently.
- UserName string
- The user name used to connect to the database.
- credentialName String
- The name of the preferred credential.
- isAccessible Boolean
- Indicates whether the preferred credential is accessible.
- namedCredential StringId 
- The OCID of the Named Credential that contains the database user password metadata.
- passwordSecret StringId 
- The OCID of the Vault service secret that contains the database user password.
- role String
- The role of the database user.
- status String
- The status of the preferred credential.
- type String
- The type of preferred credential. Only 'BASIC' is supported currently.
- userName String
- The user name used to connect to the database.
- credentialName string
- The name of the preferred credential.
- isAccessible boolean
- Indicates whether the preferred credential is accessible.
- namedCredential stringId 
- The OCID of the Named Credential that contains the database user password metadata.
- passwordSecret stringId 
- The OCID of the Vault service secret that contains the database user password.
- role string
- The role of the database user.
- status string
- The status of the preferred credential.
- type string
- The type of preferred credential. Only 'BASIC' is supported currently.
- userName string
- The user name used to connect to the database.
- credential_name str
- The name of the preferred credential.
- is_accessible bool
- Indicates whether the preferred credential is accessible.
- named_credential_ strid 
- The OCID of the Named Credential that contains the database user password metadata.
- password_secret_ strid 
- The OCID of the Vault service secret that contains the database user password.
- role str
- The role of the database user.
- status str
- The status of the preferred credential.
- type str
- The type of preferred credential. Only 'BASIC' is supported currently.
- user_name str
- The user name used to connect to the database.
- credentialName String
- The name of the preferred credential.
- isAccessible Boolean
- Indicates whether the preferred credential is accessible.
- namedCredential StringId 
- The OCID of the Named Credential that contains the database user password metadata.
- passwordSecret StringId 
- The OCID of the Vault service secret that contains the database user password.
- role String
- The role of the database user.
- status String
- The status of the preferred credential.
- type String
- The type of preferred credential. Only 'BASIC' is supported currently.
- userName String
- The user name used to connect to the database.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.