Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.Database.getManagedPreferredCredential
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
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
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagedDatabasePreferredCredential = oci.Database.getManagedPreferredCredential({
credentialName: managedDatabasePreferredCredentialCredentialName,
managedDatabaseId: testManagedDatabase.id,
});
import pulumi
import pulumi_oci as oci
test_managed_database_preferred_credential = oci.Database.get_managed_preferred_credential(credential_name=managed_database_preferred_credential_credential_name,
managed_database_id=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: managedDatabasePreferredCredentialCredentialName,
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 testManagedDatabasePreferredCredential = Oci.Database.GetManagedPreferredCredential.Invoke(new()
{
CredentialName = managedDatabasePreferredCredentialCredentialName,
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.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(managedDatabasePreferredCredentialCredentialName)
.managedDatabaseId(testManagedDatabase.id())
.build());
}
}
variables:
testManagedDatabasePreferredCredential:
fn::invoke:
Function: oci:Database:getManagedPreferredCredential
Arguments:
credentialName: ${managedDatabasePreferredCredentialCredentialName}
managedDatabaseId: ${testManagedDatabase.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,
named_credential_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,
named_credential_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.
- Named
Credential stringId - The OCID of the Named Credential that contains the database user password metadata.
- Credential
Name string - The name of the preferred credential.
- Managed
Database stringId - The OCID of the Managed Database.
- Named
Credential stringId - The OCID of the Named Credential that contains the database user password metadata.
- credential
Name String - The name of the preferred credential.
- managed
Database StringId - The OCID of the Managed Database.
- named
Credential StringId - The OCID of the Named Credential that contains the database user password metadata.
- credential
Name string - The name of the preferred credential.
- managed
Database stringId - The OCID of the Managed Database.
- named
Credential stringId - The OCID of the Named Credential that contains the database user password metadata.
- credential_
name str - The name of the preferred credential.
- managed_
database_ strid - The OCID of the Managed Database.
- named_
credential_ strid - The OCID of the Named Credential that contains the database user password metadata.
- credential
Name String - The name of the preferred credential.
- managed
Database StringId - The OCID of the Managed Database.
- named
Credential StringId - The OCID of the Named Credential that contains the database user password metadata.
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 - Named
Credential stringId - The OCID of the Named Credential that contains the database user password metadata.
- 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 - Named
Credential stringId - The OCID of the Named Credential that contains the database user password metadata.
- 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 - named
Credential StringId - The OCID of the Named Credential that contains the database user password metadata.
- 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 - named
Credential stringId - The OCID of the Named Credential that contains the database user password metadata.
- 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 - 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.
- 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 - named
Credential StringId - The OCID of the Named Credential that contains the database user password metadata.
- 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.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi