1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. NamedCredential
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.DatabaseManagement.NamedCredential

Explore with Pulumi AI

This resource provides the Named Credential resource in Oracle Cloud Infrastructure Database Management service.

Creates a named credential.

Example Usage

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

const testNamedCredential = new oci.databasemanagement.NamedCredential("test_named_credential", {
    compartmentId: compartmentId,
    content: {
        credentialType: namedCredentialContentCredentialType,
        passwordSecretAccessMode: namedCredentialContentPasswordSecretAccessMode,
        passwordSecretId: testSecret.id,
        role: namedCredentialContentRole,
        userName: testUser.name,
    },
    name: namedCredentialName,
    scope: namedCredentialScope,
    type: namedCredentialType,
    associatedResource: namedCredentialAssociatedResource,
    definedTags: {
        "Operations.CostCenter": "42",
    },
    description: namedCredentialDescription,
    freeformTags: {
        Department: "Finance",
    },
});
Copy
import pulumi
import pulumi_oci as oci

test_named_credential = oci.database_management.NamedCredential("test_named_credential",
    compartment_id=compartment_id,
    content={
        "credential_type": named_credential_content_credential_type,
        "password_secret_access_mode": named_credential_content_password_secret_access_mode,
        "password_secret_id": test_secret["id"],
        "role": named_credential_content_role,
        "user_name": test_user["name"],
    },
    name=named_credential_name,
    scope=named_credential_scope,
    type=named_credential_type,
    associated_resource=named_credential_associated_resource,
    defined_tags={
        "Operations.CostCenter": "42",
    },
    description=named_credential_description,
    freeform_tags={
        "Department": "Finance",
    })
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.NewNamedCredential(ctx, "test_named_credential", &databasemanagement.NamedCredentialArgs{
			CompartmentId: pulumi.Any(compartmentId),
			Content: &databasemanagement.NamedCredentialContentArgs{
				CredentialType:           pulumi.Any(namedCredentialContentCredentialType),
				PasswordSecretAccessMode: pulumi.Any(namedCredentialContentPasswordSecretAccessMode),
				PasswordSecretId:         pulumi.Any(testSecret.Id),
				Role:                     pulumi.Any(namedCredentialContentRole),
				UserName:                 pulumi.Any(testUser.Name),
			},
			Name:               pulumi.Any(namedCredentialName),
			Scope:              pulumi.Any(namedCredentialScope),
			Type:               pulumi.Any(namedCredentialType),
			AssociatedResource: pulumi.Any(namedCredentialAssociatedResource),
			DefinedTags: pulumi.StringMap{
				"Operations.CostCenter": pulumi.String("42"),
			},
			Description: pulumi.Any(namedCredentialDescription),
			FreeformTags: pulumi.StringMap{
				"Department": pulumi.String("Finance"),
			},
		})
		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 = new Oci.DatabaseManagement.NamedCredential("test_named_credential", new()
    {
        CompartmentId = compartmentId,
        Content = new Oci.DatabaseManagement.Inputs.NamedCredentialContentArgs
        {
            CredentialType = namedCredentialContentCredentialType,
            PasswordSecretAccessMode = namedCredentialContentPasswordSecretAccessMode,
            PasswordSecretId = testSecret.Id,
            Role = namedCredentialContentRole,
            UserName = testUser.Name,
        },
        Name = namedCredentialName,
        Scope = namedCredentialScope,
        Type = namedCredentialType,
        AssociatedResource = namedCredentialAssociatedResource,
        DefinedTags = 
        {
            { "Operations.CostCenter", "42" },
        },
        Description = namedCredentialDescription,
        FreeformTags = 
        {
            { "Department", "Finance" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DatabaseManagement.NamedCredential;
import com.pulumi.oci.DatabaseManagement.NamedCredentialArgs;
import com.pulumi.oci.DatabaseManagement.inputs.NamedCredentialContentArgs;
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) {
        var testNamedCredential = new NamedCredential("testNamedCredential", NamedCredentialArgs.builder()
            .compartmentId(compartmentId)
            .content(NamedCredentialContentArgs.builder()
                .credentialType(namedCredentialContentCredentialType)
                .passwordSecretAccessMode(namedCredentialContentPasswordSecretAccessMode)
                .passwordSecretId(testSecret.id())
                .role(namedCredentialContentRole)
                .userName(testUser.name())
                .build())
            .name(namedCredentialName)
            .scope(namedCredentialScope)
            .type(namedCredentialType)
            .associatedResource(namedCredentialAssociatedResource)
            .definedTags(Map.of("Operations.CostCenter", "42"))
            .description(namedCredentialDescription)
            .freeformTags(Map.of("Department", "Finance"))
            .build());

    }
}
Copy
resources:
  testNamedCredential:
    type: oci:DatabaseManagement:NamedCredential
    name: test_named_credential
    properties:
      compartmentId: ${compartmentId}
      content:
        credentialType: ${namedCredentialContentCredentialType}
        passwordSecretAccessMode: ${namedCredentialContentPasswordSecretAccessMode}
        passwordSecretId: ${testSecret.id}
        role: ${namedCredentialContentRole}
        userName: ${testUser.name}
      name: ${namedCredentialName}
      scope: ${namedCredentialScope}
      type: ${namedCredentialType}
      associatedResource: ${namedCredentialAssociatedResource}
      definedTags:
        Operations.CostCenter: '42'
      description: ${namedCredentialDescription}
      freeformTags:
        Department: Finance
Copy

Create NamedCredential Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new NamedCredential(name: string, args: NamedCredentialArgs, opts?: CustomResourceOptions);
@overload
def NamedCredential(resource_name: str,
                    args: NamedCredentialArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def NamedCredential(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    compartment_id: Optional[str] = None,
                    content: Optional[_databasemanagement.NamedCredentialContentArgs] = None,
                    scope: Optional[str] = None,
                    type: Optional[str] = None,
                    associated_resource: Optional[str] = None,
                    defined_tags: Optional[Mapping[str, str]] = None,
                    description: Optional[str] = None,
                    freeform_tags: Optional[Mapping[str, str]] = None,
                    name: Optional[str] = None)
func NewNamedCredential(ctx *Context, name string, args NamedCredentialArgs, opts ...ResourceOption) (*NamedCredential, error)
public NamedCredential(string name, NamedCredentialArgs args, CustomResourceOptions? opts = null)
public NamedCredential(String name, NamedCredentialArgs args)
public NamedCredential(String name, NamedCredentialArgs args, CustomResourceOptions options)
type: oci:DatabaseManagement:NamedCredential
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NamedCredentialArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NamedCredentialArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NamedCredentialArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NamedCredentialArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NamedCredentialArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var namedCredentialResource = new Oci.DatabaseManagement.NamedCredential("namedCredentialResource", new()
{
    CompartmentId = "string",
    Content = new Oci.DatabaseManagement.Inputs.NamedCredentialContentArgs
    {
        CredentialType = "string",
        PasswordSecretAccessMode = "string",
        PasswordSecretId = "string",
        Role = "string",
        UserName = "string",
    },
    Scope = "string",
    Type = "string",
    AssociatedResource = "string",
    DefinedTags = 
    {
        { "string", "string" },
    },
    Description = "string",
    FreeformTags = 
    {
        { "string", "string" },
    },
    Name = "string",
});
Copy
example, err := DatabaseManagement.NewNamedCredential(ctx, "namedCredentialResource", &DatabaseManagement.NamedCredentialArgs{
	CompartmentId: pulumi.String("string"),
	Content: &databasemanagement.NamedCredentialContentArgs{
		CredentialType:           pulumi.String("string"),
		PasswordSecretAccessMode: pulumi.String("string"),
		PasswordSecretId:         pulumi.String("string"),
		Role:                     pulumi.String("string"),
		UserName:                 pulumi.String("string"),
	},
	Scope:              pulumi.String("string"),
	Type:               pulumi.String("string"),
	AssociatedResource: pulumi.String("string"),
	DefinedTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	FreeformTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name: pulumi.String("string"),
})
Copy
var namedCredentialResource = new NamedCredential("namedCredentialResource", NamedCredentialArgs.builder()
    .compartmentId("string")
    .content(NamedCredentialContentArgs.builder()
        .credentialType("string")
        .passwordSecretAccessMode("string")
        .passwordSecretId("string")
        .role("string")
        .userName("string")
        .build())
    .scope("string")
    .type("string")
    .associatedResource("string")
    .definedTags(Map.of("string", "string"))
    .description("string")
    .freeformTags(Map.of("string", "string"))
    .name("string")
    .build());
Copy
named_credential_resource = oci.database_management.NamedCredential("namedCredentialResource",
    compartment_id="string",
    content={
        "credential_type": "string",
        "password_secret_access_mode": "string",
        "password_secret_id": "string",
        "role": "string",
        "user_name": "string",
    },
    scope="string",
    type="string",
    associated_resource="string",
    defined_tags={
        "string": "string",
    },
    description="string",
    freeform_tags={
        "string": "string",
    },
    name="string")
Copy
const namedCredentialResource = new oci.databasemanagement.NamedCredential("namedCredentialResource", {
    compartmentId: "string",
    content: {
        credentialType: "string",
        passwordSecretAccessMode: "string",
        passwordSecretId: "string",
        role: "string",
        userName: "string",
    },
    scope: "string",
    type: "string",
    associatedResource: "string",
    definedTags: {
        string: "string",
    },
    description: "string",
    freeformTags: {
        string: "string",
    },
    name: "string",
});
Copy
type: oci:DatabaseManagement:NamedCredential
properties:
    associatedResource: string
    compartmentId: string
    content:
        credentialType: string
        passwordSecretAccessMode: string
        passwordSecretId: string
        role: string
        userName: string
    definedTags:
        string: string
    description: string
    freeformTags:
        string: string
    name: string
    scope: string
    type: string
Copy

NamedCredential Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The NamedCredential resource accepts the following input properties:

CompartmentId This property is required. string
(Updatable) The OCID of the compartment in which the named credential resides.
Content This property is required. NamedCredentialContent
(Updatable) The details of the named credential.
Scope This property is required. string
(Updatable) The scope of the named credential.
Type
This property is required.
Changes to this property will trigger replacement.
string

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

AssociatedResource string
(Updatable) The OCID of the resource that is associated to the named credential.
DefinedTags Dictionary<string, string>
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
FreeformTags Dictionary<string, string>
(Updatable) 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"}
Name Changes to this property will trigger replacement. string
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
CompartmentId This property is required. string
(Updatable) The OCID of the compartment in which the named credential resides.
Content This property is required. NamedCredentialContentArgs
(Updatable) The details of the named credential.
Scope This property is required. string
(Updatable) The scope of the named credential.
Type
This property is required.
Changes to this property will trigger replacement.
string

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

AssociatedResource string
(Updatable) The OCID of the resource that is associated to the named credential.
DefinedTags map[string]string
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
FreeformTags map[string]string
(Updatable) 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"}
Name Changes to this property will trigger replacement. string
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
compartmentId This property is required. String
(Updatable) The OCID of the compartment in which the named credential resides.
content This property is required. NamedCredentialContent
(Updatable) The details of the named credential.
scope This property is required. String
(Updatable) The scope of the named credential.
type
This property is required.
Changes to this property will trigger replacement.
String

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

associatedResource String
(Updatable) The OCID of the resource that is associated to the named credential.
definedTags Map<String,String>
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
freeformTags Map<String,String>
(Updatable) 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"}
name Changes to this property will trigger replacement. String
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
compartmentId This property is required. string
(Updatable) The OCID of the compartment in which the named credential resides.
content This property is required. NamedCredentialContent
(Updatable) The details of the named credential.
scope This property is required. string
(Updatable) The scope of the named credential.
type
This property is required.
Changes to this property will trigger replacement.
string

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

associatedResource string
(Updatable) The OCID of the resource that is associated to the named credential.
definedTags {[key: string]: string}
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
freeformTags {[key: string]: string}
(Updatable) 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"}
name Changes to this property will trigger replacement. string
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
compartment_id This property is required. str
(Updatable) The OCID of the compartment in which the named credential resides.
content This property is required. databasemanagement.NamedCredentialContentArgs
(Updatable) The details of the named credential.
scope This property is required. str
(Updatable) The scope of the named credential.
type
This property is required.
Changes to this property will trigger replacement.
str

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

associated_resource str
(Updatable) The OCID of the resource that is associated to the named credential.
defined_tags Mapping[str, str]
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
freeform_tags Mapping[str, str]
(Updatable) 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"}
name Changes to this property will trigger replacement. str
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
compartmentId This property is required. String
(Updatable) The OCID of the compartment in which the named credential resides.
content This property is required. Property Map
(Updatable) The details of the named credential.
scope This property is required. String
(Updatable) The scope of the named credential.
type
This property is required.
Changes to this property will trigger replacement.
String

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

associatedResource String
(Updatable) The OCID of the resource that is associated to the named credential.
definedTags Map<String>
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
freeformTags Map<String>
(Updatable) 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"}
name Changes to this property will trigger replacement. String
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.

Outputs

All input properties are implicitly available as output properties. Additionally, the NamedCredential resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
LifecycleDetails string
The details of the lifecycle state.
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.
Id string
The provider-assigned unique ID for this managed resource.
LifecycleDetails string
The details of the lifecycle state.
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.
id String
The provider-assigned unique ID for this managed resource.
lifecycleDetails String
The details of the lifecycle state.
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.
id string
The provider-assigned unique ID for this managed resource.
lifecycleDetails string
The details of the lifecycle state.
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.
id str
The provider-assigned unique ID for this managed resource.
lifecycle_details str
The details of the lifecycle state.
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.
id String
The provider-assigned unique ID for this managed resource.
lifecycleDetails String
The details of the lifecycle state.
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.

Look up Existing NamedCredential Resource

Get an existing NamedCredential resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: NamedCredentialState, opts?: CustomResourceOptions): NamedCredential
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        associated_resource: Optional[str] = None,
        compartment_id: Optional[str] = None,
        content: Optional[_databasemanagement.NamedCredentialContentArgs] = None,
        defined_tags: Optional[Mapping[str, str]] = None,
        description: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, str]] = None,
        lifecycle_details: Optional[str] = None,
        name: Optional[str] = None,
        scope: Optional[str] = None,
        state: Optional[str] = None,
        system_tags: Optional[Mapping[str, str]] = None,
        time_created: Optional[str] = None,
        time_updated: Optional[str] = None,
        type: Optional[str] = None) -> NamedCredential
func GetNamedCredential(ctx *Context, name string, id IDInput, state *NamedCredentialState, opts ...ResourceOption) (*NamedCredential, error)
public static NamedCredential Get(string name, Input<string> id, NamedCredentialState? state, CustomResourceOptions? opts = null)
public static NamedCredential get(String name, Output<String> id, NamedCredentialState state, CustomResourceOptions options)
resources:  _:    type: oci:DatabaseManagement:NamedCredential    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AssociatedResource string
(Updatable) The OCID of the resource that is associated to the named credential.
CompartmentId string
(Updatable) The OCID of the compartment in which the named credential resides.
Content NamedCredentialContent
(Updatable) The details of the named credential.
DefinedTags Dictionary<string, string>
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
FreeformTags Dictionary<string, string>
(Updatable) 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"}
LifecycleDetails string
The details of the lifecycle state.
Name Changes to this property will trigger replacement. string
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
Scope string
(Updatable) 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 Changes to this property will trigger replacement. string

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

AssociatedResource string
(Updatable) The OCID of the resource that is associated to the named credential.
CompartmentId string
(Updatable) The OCID of the compartment in which the named credential resides.
Content NamedCredentialContentArgs
(Updatable) The details of the named credential.
DefinedTags map[string]string
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
FreeformTags map[string]string
(Updatable) 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"}
LifecycleDetails string
The details of the lifecycle state.
Name Changes to this property will trigger replacement. string
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
Scope string
(Updatable) 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 Changes to this property will trigger replacement. string

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

associatedResource String
(Updatable) The OCID of the resource that is associated to the named credential.
compartmentId String
(Updatable) The OCID of the compartment in which the named credential resides.
content NamedCredentialContent
(Updatable) The details of the named credential.
definedTags Map<String,String>
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
freeformTags Map<String,String>
(Updatable) 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"}
lifecycleDetails String
The details of the lifecycle state.
name Changes to this property will trigger replacement. String
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
scope String
(Updatable) 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 Changes to this property will trigger replacement. String

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

associatedResource string
(Updatable) The OCID of the resource that is associated to the named credential.
compartmentId string
(Updatable) The OCID of the compartment in which the named credential resides.
content NamedCredentialContent
(Updatable) The details of the named credential.
definedTags {[key: string]: string}
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
freeformTags {[key: string]: string}
(Updatable) 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"}
lifecycleDetails string
The details of the lifecycle state.
name Changes to this property will trigger replacement. string
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
scope string
(Updatable) 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 Changes to this property will trigger replacement. string

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

associated_resource str
(Updatable) The OCID of the resource that is associated to the named credential.
compartment_id str
(Updatable) The OCID of the compartment in which the named credential resides.
content databasemanagement.NamedCredentialContentArgs
(Updatable) The details of the named credential.
defined_tags Mapping[str, str]
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
freeform_tags Mapping[str, str]
(Updatable) 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"}
lifecycle_details str
The details of the lifecycle state.
name Changes to this property will trigger replacement. str
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
scope str
(Updatable) 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 Changes to this property will trigger replacement. str

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

associatedResource String
(Updatable) The OCID of the resource that is associated to the named credential.
compartmentId String
(Updatable) The OCID of the compartment in which the named credential resides.
content Property Map
(Updatable) The details of the named credential.
definedTags Map<String>
(Updatable) 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
(Updatable) The information specified by the user about the named credential.
freeformTags Map<String>
(Updatable) 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"}
lifecycleDetails String
The details of the lifecycle state.
name Changes to this property will trigger replacement. String
The name of the named credential. Valid characters are uppercase or lowercase letters, numbers, and "_". The name of the named credential cannot be modified. It must be unique in the compartment and must begin with an alphabetic character.
scope String
(Updatable) 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 Changes to this property will trigger replacement. String

The type of resource associated with the named credential.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Supporting Types

NamedCredentialContent
, NamedCredentialContentArgs

CredentialType This property is required. string
(Updatable) The type of named credential. Only 'BASIC' is supported currently.
PasswordSecretAccessMode This property is required. string
(Updatable) The mechanism used to access the password plain text value.
PasswordSecretId This property is required. string
(Updatable) The OCID of the Vault service secret that contains the database user password.
Role This property is required. string
(Updatable) The role of the database user.
UserName This property is required. string
(Updatable) The user name used to connect to the database.
CredentialType This property is required. string
(Updatable) The type of named credential. Only 'BASIC' is supported currently.
PasswordSecretAccessMode This property is required. string
(Updatable) The mechanism used to access the password plain text value.
PasswordSecretId This property is required. string
(Updatable) The OCID of the Vault service secret that contains the database user password.
Role This property is required. string
(Updatable) The role of the database user.
UserName This property is required. string
(Updatable) The user name used to connect to the database.
credentialType This property is required. String
(Updatable) The type of named credential. Only 'BASIC' is supported currently.
passwordSecretAccessMode This property is required. String
(Updatable) The mechanism used to access the password plain text value.
passwordSecretId This property is required. String
(Updatable) The OCID of the Vault service secret that contains the database user password.
role This property is required. String
(Updatable) The role of the database user.
userName This property is required. String
(Updatable) The user name used to connect to the database.
credentialType This property is required. string
(Updatable) The type of named credential. Only 'BASIC' is supported currently.
passwordSecretAccessMode This property is required. string
(Updatable) The mechanism used to access the password plain text value.
passwordSecretId This property is required. string
(Updatable) The OCID of the Vault service secret that contains the database user password.
role This property is required. string
(Updatable) The role of the database user.
userName This property is required. string
(Updatable) The user name used to connect to the database.
credential_type This property is required. str
(Updatable) The type of named credential. Only 'BASIC' is supported currently.
password_secret_access_mode This property is required. str
(Updatable) The mechanism used to access the password plain text value.
password_secret_id This property is required. str
(Updatable) The OCID of the Vault service secret that contains the database user password.
role This property is required. str
(Updatable) The role of the database user.
user_name This property is required. str
(Updatable) The user name used to connect to the database.
credentialType This property is required. String
(Updatable) The type of named credential. Only 'BASIC' is supported currently.
passwordSecretAccessMode This property is required. String
(Updatable) The mechanism used to access the password plain text value.
passwordSecretId This property is required. String
(Updatable) The OCID of the Vault service secret that contains the database user password.
role This property is required. String
(Updatable) The role of the database user.
userName This property is required. String
(Updatable) The user name used to connect to the database.

Import

NamedCredentials can be imported using the id, e.g.

$ pulumi import oci:DatabaseManagement/namedCredential:NamedCredential test_named_credential "id"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.