1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getNamedCredential
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.DatabaseManagement.getNamedCredential

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

This data source provides details about a specific Named Credential resource in Oracle Cloud Infrastructure Database Management service.

Gets the details for the named credential specified by namedCredentialId.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testNamedCredential = oci.DatabaseManagement.getNamedCredential({
    namedCredentialId: testNamedCredentialOciDatabaseManagementNamedCredential.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_named_credential = oci.DatabaseManagement.get_named_credential(named_credential_id=test_named_credential_oci_database_management_named_credential["id"])
Copy
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.GetNamedCredential(ctx, &databasemanagement.GetNamedCredentialArgs{
			NamedCredentialId: testNamedCredentialOciDatabaseManagementNamedCredential.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testNamedCredential = Oci.DatabaseManagement.GetNamedCredential.Invoke(new()
    {
        NamedCredentialId = testNamedCredentialOciDatabaseManagementNamedCredential.Id,
    });

});
Copy
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.GetNamedCredentialArgs;
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 testNamedCredential = DatabaseManagementFunctions.getNamedCredential(GetNamedCredentialArgs.builder()
            .namedCredentialId(testNamedCredentialOciDatabaseManagementNamedCredential.id())
            .build());

    }
}
Copy
variables:
  testNamedCredential:
    fn::invoke:
      function: oci:DatabaseManagement:getNamedCredential
      arguments:
        namedCredentialId: ${testNamedCredentialOciDatabaseManagementNamedCredential.id}
Copy

Using getNamedCredential

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 getNamedCredential(args: GetNamedCredentialArgs, opts?: InvokeOptions): Promise<GetNamedCredentialResult>
function getNamedCredentialOutput(args: GetNamedCredentialOutputArgs, opts?: InvokeOptions): Output<GetNamedCredentialResult>
Copy
def get_named_credential(named_credential_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetNamedCredentialResult
def get_named_credential_output(named_credential_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetNamedCredentialResult]
Copy
func GetNamedCredential(ctx *Context, args *GetNamedCredentialArgs, opts ...InvokeOption) (*GetNamedCredentialResult, error)
func GetNamedCredentialOutput(ctx *Context, args *GetNamedCredentialOutputArgs, opts ...InvokeOption) GetNamedCredentialResultOutput
Copy

> Note: This function is named GetNamedCredential in the Go SDK.

public static class GetNamedCredential 
{
    public static Task<GetNamedCredentialResult> InvokeAsync(GetNamedCredentialArgs args, InvokeOptions? opts = null)
    public static Output<GetNamedCredentialResult> Invoke(GetNamedCredentialInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNamedCredentialResult> getNamedCredential(GetNamedCredentialArgs args, InvokeOptions options)
public static Output<GetNamedCredentialResult> getNamedCredential(GetNamedCredentialArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DatabaseManagement/getNamedCredential:getNamedCredential
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

NamedCredentialId This property is required. string
The OCID of the named credential.
NamedCredentialId This property is required. string
The OCID of the named credential.
namedCredentialId This property is required. String
The OCID of the named credential.
namedCredentialId This property is required. string
The OCID of the named credential.
named_credential_id This property is required. str
The OCID of the named credential.
namedCredentialId This property is required. String
The OCID of the named credential.

getNamedCredential Result

The following output properties are available:

AssociatedResource string
The OCID of the resource that is associated to the named credential.
CompartmentId string
The OCID of the compartment.
Contents List<GetNamedCredentialContent>
The details of the named credential.
DefinedTags Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
Description string
The information specified by the user about the named credential.
FreeformTags Dictionary<string, string>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id string
The OCID of the named credential.
LifecycleDetails string
The details of the lifecycle state.
Name string
The name of the named credential.
NamedCredentialId string
Scope string
The scope of the named credential.
State string
The current lifecycle state of the named credential.
SystemTags Dictionary<string, string>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated string
The date and time the named credential was created.
TimeUpdated string
The date and time the named credential was last updated.
Type string
The type of resource associated with the named credential.
AssociatedResource string
The OCID of the resource that is associated to the named credential.
CompartmentId string
The OCID of the compartment.
Contents []GetNamedCredentialContent
The details of the named credential.
DefinedTags map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
Description string
The information specified by the user about the named credential.
FreeformTags map[string]string
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id string
The OCID of the named credential.
LifecycleDetails string
The details of the lifecycle state.
Name string
The name of the named credential.
NamedCredentialId string
Scope string
The scope of the named credential.
State string
The current lifecycle state of the named credential.
SystemTags map[string]string
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated string
The date and time the named credential was created.
TimeUpdated string
The date and time the named credential was last updated.
Type string
The type of resource associated with the named credential.
associatedResource String
The OCID of the resource that is associated to the named credential.
compartmentId String
The OCID of the compartment.
contents List<GetNamedCredentialContent>
The details of the named credential.
definedTags Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description String
The information specified by the user about the named credential.
freeformTags Map<String,String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id String
The OCID of the named credential.
lifecycleDetails String
The details of the lifecycle state.
name String
The name of the named credential.
namedCredentialId String
scope String
The scope of the named credential.
state String
The current lifecycle state of the named credential.
systemTags Map<String,String>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated String
The date and time the named credential was created.
timeUpdated String
The date and time the named credential was last updated.
type String
The type of resource associated with the named credential.
associatedResource string
The OCID of the resource that is associated to the named credential.
compartmentId string
The OCID of the compartment.
contents GetNamedCredentialContent[]
The details of the named credential.
definedTags {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description string
The information specified by the user about the named credential.
freeformTags {[key: string]: string}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id string
The OCID of the named credential.
lifecycleDetails string
The details of the lifecycle state.
name string
The name of the named credential.
namedCredentialId string
scope string
The scope of the named credential.
state string
The current lifecycle state of the named credential.
systemTags {[key: string]: string}
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated string
The date and time the named credential was created.
timeUpdated string
The date and time the named credential was last updated.
type string
The type of resource associated with the named credential.
associated_resource str
The OCID of the resource that is associated to the named credential.
compartment_id str
The OCID of the compartment.
contents Sequence[databasemanagement.GetNamedCredentialContent]
The details of the named credential.
defined_tags Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description str
The information specified by the user about the named credential.
freeform_tags Mapping[str, str]
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id str
The OCID of the named credential.
lifecycle_details str
The details of the lifecycle state.
name str
The name of the named credential.
named_credential_id str
scope str
The scope of the named credential.
state str
The current lifecycle state of the named credential.
system_tags Mapping[str, str]
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
time_created str
The date and time the named credential was created.
time_updated str
The date and time the named credential was last updated.
type str
The type of resource associated with the named credential.
associatedResource String
The OCID of the resource that is associated to the named credential.
compartmentId String
The OCID of the compartment.
contents List<Property Map>
The details of the named credential.
definedTags Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
description String
The information specified by the user about the named credential.
freeformTags Map<String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id String
The OCID of the named credential.
lifecycleDetails String
The details of the lifecycle state.
name String
The name of the named credential.
namedCredentialId String
scope String
The scope of the named credential.
state String
The current lifecycle state of the named credential.
systemTags Map<String>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated String
The date and time the named credential was created.
timeUpdated String
The date and time the named credential was last updated.
type String
The type of resource associated with the named credential.

Supporting Types

GetNamedCredentialContent

CredentialType This property is required. string
The type of named credential. Only 'BASIC' is supported currently.
PasswordSecretAccessMode This property is required. string
The mechanism used to access the password plain text value.
PasswordSecretId This property is required. string
The OCID of the Vault service secret that contains the database user password.
Role This property is required. string
The role of the database user.
UserName This property is required. string
The user name used to connect to the database.
CredentialType This property is required. string
The type of named credential. Only 'BASIC' is supported currently.
PasswordSecretAccessMode This property is required. string
The mechanism used to access the password plain text value.
PasswordSecretId This property is required. string
The OCID of the Vault service secret that contains the database user password.
Role This property is required. string
The role of the database user.
UserName This property is required. string
The user name used to connect to the database.
credentialType This property is required. String
The type of named credential. Only 'BASIC' is supported currently.
passwordSecretAccessMode This property is required. String
The mechanism used to access the password plain text value.
passwordSecretId This property is required. String
The OCID of the Vault service secret that contains the database user password.
role This property is required. String
The role of the database user.
userName This property is required. String
The user name used to connect to the database.
credentialType This property is required. string
The type of named credential. Only 'BASIC' is supported currently.
passwordSecretAccessMode This property is required. string
The mechanism used to access the password plain text value.
passwordSecretId This property is required. string
The OCID of the Vault service secret that contains the database user password.
role This property is required. string
The role of the database user.
userName This property is required. string
The user name used to connect to the database.
credential_type This property is required. str
The type of named credential. Only 'BASIC' is supported currently.
password_secret_access_mode This property is required. str
The mechanism used to access the password plain text value.
password_secret_id This property is required. str
The OCID of the Vault service secret that contains the database user password.
role This property is required. str
The role of the database user.
user_name This property is required. str
The user name used to connect to the database.
credentialType This property is required. String
The type of named credential. Only 'BASIC' is supported currently.
passwordSecretAccessMode This property is required. String
The mechanism used to access the password plain text value.
passwordSecretId This property is required. String
The OCID of the Vault service secret that contains the database user password.
role This property is required. String
The role of the database user.
userName This property is required. 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 v2.30.0 published on Monday, Apr 14, 2025 by Pulumi