oci.Database.getManagedPreferredCredential
Explore with Pulumi AI
This data source provides details about a specific Managed Database Preferred Credential resource in Oracle Cloud Infrastructure Database Management service.
Gets the preferred credential details for a Managed Database based on credentialName.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testManagedDatabasePreferredCredential = Oci.Database.GetManagedPreferredCredential.Invoke(new()
{
CredentialName = @var.Managed_database_preferred_credential_credential_name,
ManagedDatabaseId = oci_database_management_managed_database.Test_managed_database.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Database"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Database.GetManagedPreferredCredential(ctx, &database.GetManagedPreferredCredentialArgs{
CredentialName: _var.Managed_database_preferred_credential_credential_name,
ManagedDatabaseId: oci_database_management_managed_database.Test_managed_database.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
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.GetManagedPreferredCredentialArgs;
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 testManagedDatabasePreferredCredential = DatabaseFunctions.getManagedPreferredCredential(GetManagedPreferredCredentialArgs.builder()
.credentialName(var_.managed_database_preferred_credential_credential_name())
.managedDatabaseId(oci_database_management_managed_database.test_managed_database().id())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_managed_database_preferred_credential = oci.Database.get_managed_preferred_credential(credential_name=var["managed_database_preferred_credential_credential_name"],
managed_database_id=oci_database_management_managed_database["test_managed_database"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagedDatabasePreferredCredential = oci.Database.getManagedPreferredCredential({
credentialName: _var.managed_database_preferred_credential_credential_name,
managedDatabaseId: oci_database_management_managed_database.test_managed_database.id,
});
variables:
testManagedDatabasePreferredCredential:
fn::invoke:
Function: oci:Database:getManagedPreferredCredential
Arguments:
credentialName: ${var.managed_database_preferred_credential_credential_name}
managedDatabaseId: ${oci_database_management_managed_database.test_managed_database.id}
Using getManagedPreferredCredential
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 getManagedPreferredCredential(args: GetManagedPreferredCredentialArgs, opts?: InvokeOptions): Promise<GetManagedPreferredCredentialResult>
function getManagedPreferredCredentialOutput(args: GetManagedPreferredCredentialOutputArgs, opts?: InvokeOptions): Output<GetManagedPreferredCredentialResult>
def get_managed_preferred_credential(credential_name: Optional[str] = None,
managed_database_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetManagedPreferredCredentialResult
def get_managed_preferred_credential_output(credential_name: Optional[pulumi.Input[str]] = None,
managed_database_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetManagedPreferredCredentialResult]
func GetManagedPreferredCredential(ctx *Context, args *GetManagedPreferredCredentialArgs, opts ...InvokeOption) (*GetManagedPreferredCredentialResult, error)
func GetManagedPreferredCredentialOutput(ctx *Context, args *GetManagedPreferredCredentialOutputArgs, opts ...InvokeOption) GetManagedPreferredCredentialResultOutput
> Note: This function is named GetManagedPreferredCredential
in the Go SDK.
public static class GetManagedPreferredCredential
{
public static Task<GetManagedPreferredCredentialResult> InvokeAsync(GetManagedPreferredCredentialArgs args, InvokeOptions? opts = null)
public static Output<GetManagedPreferredCredentialResult> Invoke(GetManagedPreferredCredentialInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedPreferredCredentialResult> getManagedPreferredCredential(GetManagedPreferredCredentialArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Database/getManagedPreferredCredential:getManagedPreferredCredential
arguments:
# arguments dictionary
The following arguments are supported:
- Credential
Name string The name of the preferred credential.
- Managed
Database stringId The OCID of the Managed Database.
- Credential
Name string The name of the preferred credential.
- Managed
Database stringId The OCID of the Managed Database.
- credential
Name String The name of the preferred credential.
- managed
Database StringId The OCID of the Managed Database.
- credential
Name string The name of the preferred credential.
- managed
Database stringId The OCID of the Managed Database.
- credential_
name str The name of the preferred credential.
- managed_
database_ strid The OCID of the Managed Database.
- credential
Name String The name of the preferred credential.
- managed
Database StringId The OCID of the Managed Database.
getManagedPreferredCredential Result
The following output properties are available:
- Credential
Name string The name of the preferred credential.
- Id string
The provider-assigned unique ID for this managed resource.
- Is
Accessible bool Indicates whether the preferred credential is accessible.
- Managed
Database stringId - Password
Secret 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.
- User
Name string The user name used to connect to the database.
- Credential
Name string The name of the preferred credential.
- Id string
The provider-assigned unique ID for this managed resource.
- Is
Accessible bool Indicates whether the preferred credential is accessible.
- Managed
Database stringId - Password
Secret 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.
- User
Name string The user name used to connect to the database.
- credential
Name String The name of the preferred credential.
- id String
The provider-assigned unique ID for this managed resource.
- is
Accessible Boolean Indicates whether the preferred credential is accessible.
- managed
Database StringId - password
Secret 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.
- user
Name String The user name used to connect to the database.
- credential
Name string The name of the preferred credential.
- id string
The provider-assigned unique ID for this managed resource.
- is
Accessible boolean Indicates whether the preferred credential is accessible.
- managed
Database stringId - password
Secret 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.
- user
Name string The user name used to connect to the database.
- credential_
name str The name of the preferred credential.
- id str
The provider-assigned unique ID for this managed resource.
- is_
accessible bool Indicates whether the preferred credential is accessible.
- managed_
database_ strid - 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.
- credential
Name String The name of the preferred credential.
- id String
The provider-assigned unique ID for this managed resource.
- is
Accessible Boolean Indicates whether the preferred credential is accessible.
- managed
Database StringId - password
Secret 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.
- user
Name 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
oci
Terraform Provider.