1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. NamedCredential
Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi

oci.DatabaseManagement.NamedCredential

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi

    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",
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_named_credential = oci.database_management.NamedCredential("test_named_credential",
        compartment_id=compartment_id,
        content=oci.database_management.NamedCredentialContentArgs(
            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",
        })
    
    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.Map{
    				"Operations.CostCenter": pulumi.Any("42"),
    			},
    			Description: pulumi.Any(namedCredentialDescription),
    			FreeformTags: pulumi.Map{
    				"Department": pulumi.Any("Finance"),
    			},
    		})
    		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 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" },
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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, Any]] = None,
                        description: Optional[str] = None,
                        freeform_tags: Optional[Mapping[str, Any]] = 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 string
    The unique name of the resource.
    args NamedCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args NamedCredentialArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NamedCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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", "any" },
        },
        Description = "string",
        FreeformTags = 
        {
            { "string", "any" },
        },
        Name = "string",
    });
    
    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.Map{
    		"string": pulumi.Any("any"),
    	},
    	Description: pulumi.String("string"),
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Name: pulumi.String("string"),
    })
    
    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", "any"))
        .description("string")
        .freeformTags(Map.of("string", "any"))
        .name("string")
        .build());
    
    named_credential_resource = oci.database_management.NamedCredential("namedCredentialResource",
        compartment_id="string",
        content=oci.database_management.NamedCredentialContentArgs(
            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": "any",
        },
        description="string",
        freeform_tags={
            "string": "any",
        },
        name="string")
    
    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: "any",
        },
        description: "string",
        freeformTags: {
            string: "any",
        },
        name: "string",
    });
    
    type: oci:DatabaseManagement:NamedCredential
    properties:
        associatedResource: string
        compartmentId: string
        content:
            credentialType: string
            passwordSecretAccessMode: string
            passwordSecretId: string
            role: string
            userName: string
        definedTags:
            string: any
        description: string
        freeformTags:
            string: any
        name: string
        scope: string
        type: string
    

    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

    The NamedCredential resource accepts the following input properties:

    CompartmentId string
    (Updatable) The OCID of the compartment in which the named credential resides.
    Content NamedCredentialContent
    (Updatable) The details of the named credential.
    Scope string
    (Updatable) The scope of the named credential.
    Type 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, object>
    (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, object>
    (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 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 string
    (Updatable) The OCID of the compartment in which the named credential resides.
    Content NamedCredentialContentArgs
    (Updatable) The details of the named credential.
    Scope string
    (Updatable) The scope of the named credential.
    Type 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]interface{}
    (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]interface{}
    (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 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 String
    (Updatable) The OCID of the compartment in which the named credential resides.
    content NamedCredentialContent
    (Updatable) The details of the named credential.
    scope String
    (Updatable) The scope of the named credential.
    type 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,Object>
    (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,Object>
    (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 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 string
    (Updatable) The OCID of the compartment in which the named credential resides.
    content NamedCredentialContent
    (Updatable) The details of the named credential.
    scope string
    (Updatable) The scope of the named credential.
    type 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]: any}
    (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]: any}
    (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 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 str
    (Updatable) The OCID of the compartment in which the named credential resides.
    content databasemanagement.NamedCredentialContentArgs
    (Updatable) The details of the named credential.
    scope str
    (Updatable) The scope of the named credential.
    type 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, Any]
    (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, Any]
    (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 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 String
    (Updatable) The OCID of the compartment in which the named credential resides.
    content Property Map
    (Updatable) The details of the named credential.
    scope String
    (Updatable) The scope of the named credential.
    type 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<Any>
    (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<Any>
    (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 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, object>
    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]interface{}
    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,Object>
    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]: any}
    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, Any]
    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<Any>
    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, Any]] = None,
            description: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            lifecycle_details: Optional[str] = None,
            name: Optional[str] = None,
            scope: Optional[str] = None,
            state: Optional[str] = None,
            system_tags: Optional[Mapping[str, Any]] = 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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, object>
    (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, object>
    (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 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, object>
    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.

    ** 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]interface{}
    (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]interface{}
    (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 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]interface{}
    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.

    ** 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,Object>
    (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,Object>
    (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 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,Object>
    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.

    ** 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]: any}
    (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]: any}
    (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 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]: any}
    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.

    ** 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, Any]
    (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, Any]
    (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 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, Any]
    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.

    ** 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<Any>
    (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<Any>
    (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 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<Any>
    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.

    ** 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 string
    (Updatable) The type of named credential. Only 'BASIC' is supported currently.
    PasswordSecretAccessMode string
    (Updatable) The mechanism used to access the password plain text value.
    PasswordSecretId string
    (Updatable) The OCID of the Vault service secret that contains the database user password.
    Role string
    (Updatable) The role of the database user.
    UserName string
    (Updatable) The user name used to connect to the database.
    CredentialType string
    (Updatable) The type of named credential. Only 'BASIC' is supported currently.
    PasswordSecretAccessMode string
    (Updatable) The mechanism used to access the password plain text value.
    PasswordSecretId string
    (Updatable) The OCID of the Vault service secret that contains the database user password.
    Role string
    (Updatable) The role of the database user.
    UserName string
    (Updatable) The user name used to connect to the database.
    credentialType String
    (Updatable) The type of named credential. Only 'BASIC' is supported currently.
    passwordSecretAccessMode String
    (Updatable) The mechanism used to access the password plain text value.
    passwordSecretId String
    (Updatable) The OCID of the Vault service secret that contains the database user password.
    role String
    (Updatable) The role of the database user.
    userName String
    (Updatable) The user name used to connect to the database.
    credentialType string
    (Updatable) The type of named credential. Only 'BASIC' is supported currently.
    passwordSecretAccessMode string
    (Updatable) The mechanism used to access the password plain text value.
    passwordSecretId string
    (Updatable) The OCID of the Vault service secret that contains the database user password.
    role string
    (Updatable) The role of the database user.
    userName string
    (Updatable) The user name used to connect to the database.
    credential_type str
    (Updatable) The type of named credential. Only 'BASIC' is supported currently.
    password_secret_access_mode str
    (Updatable) The mechanism used to access the password plain text value.
    password_secret_id str
    (Updatable) The OCID of the Vault service secret that contains the database user password.
    role str
    (Updatable) The role of the database user.
    user_name str
    (Updatable) The user name used to connect to the database.
    credentialType String
    (Updatable) The type of named credential. Only 'BASIC' is supported currently.
    passwordSecretAccessMode String
    (Updatable) The mechanism used to access the password plain text value.
    passwordSecretId String
    (Updatable) The OCID of the Vault service secret that contains the database user password.
    role String
    (Updatable) The role of the database user.
    userName 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"
    

    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.
    oci logo
    Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi