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

oci.DatabaseManagement.getNamedCredentials

Explore with Pulumi AI

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

    This data source provides the list of Named Credentials in Oracle Cloud Infrastructure Database Management service.

    Gets a single named credential specified by the name or all the named credentials in a specific compartment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNamedCredentials = oci.DatabaseManagement.getNamedCredentials({
        compartmentId: compartmentId,
        associatedResource: namedCredentialAssociatedResource,
        name: namedCredentialName,
        scope: namedCredentialScope,
        type: namedCredentialType,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_named_credentials = oci.DatabaseManagement.get_named_credentials(compartment_id=compartment_id,
        associated_resource=named_credential_associated_resource,
        name=named_credential_name,
        scope=named_credential_scope,
        type=named_credential_type)
    
    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.GetNamedCredentials(ctx, &databasemanagement.GetNamedCredentialsArgs{
    			CompartmentId:      compartmentId,
    			AssociatedResource: pulumi.StringRef(namedCredentialAssociatedResource),
    			Name:               pulumi.StringRef(namedCredentialName),
    			Scope:              pulumi.StringRef(namedCredentialScope),
    			Type:               pulumi.StringRef(namedCredentialType),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testNamedCredentials = Oci.DatabaseManagement.GetNamedCredentials.Invoke(new()
        {
            CompartmentId = compartmentId,
            AssociatedResource = namedCredentialAssociatedResource,
            Name = namedCredentialName,
            Scope = namedCredentialScope,
            Type = namedCredentialType,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DatabaseManagement.DatabaseManagementFunctions;
    import com.pulumi.oci.DatabaseManagement.inputs.GetNamedCredentialsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testNamedCredentials = DatabaseManagementFunctions.getNamedCredentials(GetNamedCredentialsArgs.builder()
                .compartmentId(compartmentId)
                .associatedResource(namedCredentialAssociatedResource)
                .name(namedCredentialName)
                .scope(namedCredentialScope)
                .type(namedCredentialType)
                .build());
    
        }
    }
    
    variables:
      testNamedCredentials:
        fn::invoke:
          Function: oci:DatabaseManagement:getNamedCredentials
          Arguments:
            compartmentId: ${compartmentId}
            associatedResource: ${namedCredentialAssociatedResource}
            name: ${namedCredentialName}
            scope: ${namedCredentialScope}
            type: ${namedCredentialType}
    

    Using getNamedCredentials

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getNamedCredentials(args: GetNamedCredentialsArgs, opts?: InvokeOptions): Promise<GetNamedCredentialsResult>
    function getNamedCredentialsOutput(args: GetNamedCredentialsOutputArgs, opts?: InvokeOptions): Output<GetNamedCredentialsResult>
    def get_named_credentials(associated_resource: Optional[str] = None,
                              compartment_id: Optional[str] = None,
                              filters: Optional[Sequence[_databasemanagement.GetNamedCredentialsFilter]] = None,
                              name: Optional[str] = None,
                              scope: Optional[str] = None,
                              type: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetNamedCredentialsResult
    def get_named_credentials_output(associated_resource: Optional[pulumi.Input[str]] = None,
                              compartment_id: Optional[pulumi.Input[str]] = None,
                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetNamedCredentialsFilterArgs]]]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              scope: Optional[pulumi.Input[str]] = None,
                              type: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetNamedCredentialsResult]
    func GetNamedCredentials(ctx *Context, args *GetNamedCredentialsArgs, opts ...InvokeOption) (*GetNamedCredentialsResult, error)
    func GetNamedCredentialsOutput(ctx *Context, args *GetNamedCredentialsOutputArgs, opts ...InvokeOption) GetNamedCredentialsResultOutput

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

    public static class GetNamedCredentials 
    {
        public static Task<GetNamedCredentialsResult> InvokeAsync(GetNamedCredentialsArgs args, InvokeOptions? opts = null)
        public static Output<GetNamedCredentialsResult> Invoke(GetNamedCredentialsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNamedCredentialsResult> getNamedCredentials(GetNamedCredentialsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DatabaseManagement/getNamedCredentials:getNamedCredentials
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment.
    AssociatedResource string
    The resource associated to the named credential.
    Filters List<GetNamedCredentialsFilter>
    Name string
    The name of the named credential.
    Scope string
    The scope of named credential.
    Type string
    The type of database that is associated to the named credential.
    CompartmentId string
    The OCID of the compartment.
    AssociatedResource string
    The resource associated to the named credential.
    Filters []GetNamedCredentialsFilter
    Name string
    The name of the named credential.
    Scope string
    The scope of named credential.
    Type string
    The type of database that is associated to the named credential.
    compartmentId String
    The OCID of the compartment.
    associatedResource String
    The resource associated to the named credential.
    filters List<GetNamedCredentialsFilter>
    name String
    The name of the named credential.
    scope String
    The scope of named credential.
    type String
    The type of database that is associated to the named credential.
    compartmentId string
    The OCID of the compartment.
    associatedResource string
    The resource associated to the named credential.
    filters GetNamedCredentialsFilter[]
    name string
    The name of the named credential.
    scope string
    The scope of named credential.
    type string
    The type of database that is associated to the named credential.
    compartment_id str
    The OCID of the compartment.
    associated_resource str
    The resource associated to the named credential.
    filters Sequence[databasemanagement.GetNamedCredentialsFilter]
    name str
    The name of the named credential.
    scope str
    The scope of named credential.
    type str
    The type of database that is associated to the named credential.
    compartmentId String
    The OCID of the compartment.
    associatedResource String
    The resource associated to the named credential.
    filters List<Property Map>
    name String
    The name of the named credential.
    scope String
    The scope of named credential.
    type String
    The type of database that is associated to the named credential.

    getNamedCredentials Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment.
    Id string
    The provider-assigned unique ID for this managed resource.
    NamedCredentialCollections List<GetNamedCredentialsNamedCredentialCollection>
    The list of named_credential_collection.
    AssociatedResource string
    The OCID of the resource that is associated to the named credential.
    Filters List<GetNamedCredentialsFilter>
    Name string
    The name of the named credential.
    Scope string
    The scope of the named credential.
    Type string
    The type of resource associated with the named credential.
    CompartmentId string
    The OCID of the compartment.
    Id string
    The provider-assigned unique ID for this managed resource.
    NamedCredentialCollections []GetNamedCredentialsNamedCredentialCollection
    The list of named_credential_collection.
    AssociatedResource string
    The OCID of the resource that is associated to the named credential.
    Filters []GetNamedCredentialsFilter
    Name string
    The name of the named credential.
    Scope string
    The scope of the named credential.
    Type string
    The type of resource associated with the named credential.
    compartmentId String
    The OCID of the compartment.
    id String
    The provider-assigned unique ID for this managed resource.
    namedCredentialCollections List<GetNamedCredentialsNamedCredentialCollection>
    The list of named_credential_collection.
    associatedResource String
    The OCID of the resource that is associated to the named credential.
    filters List<GetNamedCredentialsFilter>
    name String
    The name of the named credential.
    scope String
    The scope of the named credential.
    type String
    The type of resource associated with the named credential.
    compartmentId string
    The OCID of the compartment.
    id string
    The provider-assigned unique ID for this managed resource.
    namedCredentialCollections GetNamedCredentialsNamedCredentialCollection[]
    The list of named_credential_collection.
    associatedResource string
    The OCID of the resource that is associated to the named credential.
    filters GetNamedCredentialsFilter[]
    name string
    The name of the named credential.
    scope string
    The scope of the named credential.
    type string
    The type of resource associated with the named credential.
    compartment_id str
    The OCID of the compartment.
    id str
    The provider-assigned unique ID for this managed resource.
    named_credential_collections Sequence[databasemanagement.GetNamedCredentialsNamedCredentialCollection]
    The list of named_credential_collection.
    associated_resource str
    The OCID of the resource that is associated to the named credential.
    filters Sequence[databasemanagement.GetNamedCredentialsFilter]
    name str
    The name of the named credential.
    scope str
    The scope of the named credential.
    type str
    The type of resource associated with the named credential.
    compartmentId String
    The OCID of the compartment.
    id String
    The provider-assigned unique ID for this managed resource.
    namedCredentialCollections List<Property Map>
    The list of named_credential_collection.
    associatedResource String
    The OCID of the resource that is associated to the named credential.
    filters List<Property Map>
    name String
    The name of the named credential.
    scope String
    The scope of the named credential.
    type String
    The type of resource associated with the named credential.

    Supporting Types

    GetNamedCredentialsFilter

    Name string
    The name of the named credential.
    Values List<string>
    Regex bool
    Name string
    The name of the named credential.
    Values []string
    Regex bool
    name String
    The name of the named credential.
    values List<String>
    regex Boolean
    name string
    The name of the named credential.
    values string[]
    regex boolean
    name str
    The name of the named credential.
    values Sequence[str]
    regex bool
    name String
    The name of the named credential.
    values List<String>
    regex Boolean

    GetNamedCredentialsNamedCredentialCollection

    GetNamedCredentialsNamedCredentialCollectionItem

    AssociatedResource string
    The resource associated to the named credential.
    CompartmentId string
    The OCID of the compartment.
    Contents List<GetNamedCredentialsNamedCredentialCollectionItemContent>
    The details of the named credential.
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    The information specified by the user about the named credential.
    FreeformTags Dictionary<string, object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the named credential.
    LifecycleDetails string
    The details of the lifecycle state.
    Name string
    The name of the named credential.
    Scope string
    The scope of 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 database that is associated to the named credential.
    AssociatedResource string
    The resource associated to the named credential.
    CompartmentId string
    The OCID of the compartment.
    Contents []GetNamedCredentialsNamedCredentialCollectionItemContent
    The details of the named credential.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    The information specified by the user about the named credential.
    FreeformTags map[string]interface{}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the named credential.
    LifecycleDetails string
    The details of the lifecycle state.
    Name string
    The name of the named credential.
    Scope string
    The scope of 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 database that is associated to the named credential.
    associatedResource String
    The resource associated to the named credential.
    compartmentId String
    The OCID of the compartment.
    contents List<GetNamedCredentialsNamedCredentialCollectionItemContent>
    The details of the named credential.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    The information specified by the user about the named credential.
    freeformTags Map<String,Object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the named credential.
    lifecycleDetails String
    The details of the lifecycle state.
    name String
    The name of the named credential.
    scope String
    The scope of 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 database that is associated to the named credential.
    associatedResource string
    The resource associated to the named credential.
    compartmentId string
    The OCID of the compartment.
    contents GetNamedCredentialsNamedCredentialCollectionItemContent[]
    The details of the named credential.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    The information specified by the user about the named credential.
    freeformTags {[key: string]: any}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    The OCID of the named credential.
    lifecycleDetails string
    The details of the lifecycle state.
    name string
    The name of the named credential.
    scope string
    The scope of 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 database that is associated to the named credential.
    associated_resource str
    The resource associated to the named credential.
    compartment_id str
    The OCID of the compartment.
    contents Sequence[databasemanagement.GetNamedCredentialsNamedCredentialCollectionItemContent]
    The details of the named credential.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    The information specified by the user about the named credential.
    freeform_tags Mapping[str, Any]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    The OCID of the named credential.
    lifecycle_details str
    The details of the lifecycle state.
    name str
    The name of the named credential.
    scope str
    The scope of 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 database that is associated to the named credential.
    associatedResource String
    The resource associated to the named credential.
    compartmentId String
    The OCID of the compartment.
    contents List<Property Map>
    The details of the named credential.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    The information specified by the user about the named credential.
    freeformTags Map<Any>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the named credential.
    lifecycleDetails String
    The details of the lifecycle state.
    name String
    The name of the named credential.
    scope String
    The scope of 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 database that is associated to the named credential.

    GetNamedCredentialsNamedCredentialCollectionItemContent

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

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.3.0 published on Wednesday, Jul 17, 2024 by Pulumi