1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ManagementAgent
  5. getNamedCredentials
Oracle Cloud Infrastructure v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi

oci.ManagementAgent.getNamedCredentials

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi

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

    A list of Management Agent Data Sources for the given Management Agent Id.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNamedCredentials = oci.ManagementAgent.getNamedCredentials({
        managementAgentId: testManagementAgent.id,
        ids: [namedCredentialId],
        names: [namedCredentialName],
        states: [namedCredentialState],
        types: [namedCredentialType],
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_named_credentials = oci.ManagementAgent.get_named_credentials(management_agent_id=test_management_agent["id"],
        ids=[named_credential_id],
        names=[named_credential_name],
        states=[named_credential_state],
        types=[named_credential_type])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/managementagent"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    _, err := managementagent.GetNamedCredentials(ctx, &managementagent.GetNamedCredentialsArgs{
    ManagementAgentId: testManagementAgent.Id,
    Ids: interface{}{
    namedCredentialId,
    },
    Names: interface{}{
    namedCredentialName,
    },
    States: interface{}{
    namedCredentialState,
    },
    Types: interface{}{
    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.ManagementAgent.GetNamedCredentials.Invoke(new()
        {
            ManagementAgentId = testManagementAgent.Id,
            Ids = new[]
            {
                namedCredentialId,
            },
            Names = new[]
            {
                namedCredentialName,
            },
            States = new[]
            {
                namedCredentialState,
            },
            Types = new[]
            {
                namedCredentialType,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ManagementAgent.ManagementAgentFunctions;
    import com.pulumi.oci.ManagementAgent.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 = ManagementAgentFunctions.getNamedCredentials(GetNamedCredentialsArgs.builder()
                .managementAgentId(testManagementAgent.id())
                .ids(namedCredentialId)
                .names(namedCredentialName)
                .states(namedCredentialState)
                .types(namedCredentialType)
                .build());
    
        }
    }
    
    variables:
      testNamedCredentials:
        fn::invoke:
          function: oci:ManagementAgent:getNamedCredentials
          arguments:
            managementAgentId: ${testManagementAgent.id}
            ids:
              - ${namedCredentialId}
            names:
              - ${namedCredentialName}
            states:
              - ${namedCredentialState}
            types:
              - ${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(filters: Optional[Sequence[GetNamedCredentialsFilter]] = None,
                              ids: Optional[Sequence[str]] = None,
                              management_agent_id: Optional[str] = None,
                              names: Optional[Sequence[str]] = None,
                              states: Optional[Sequence[str]] = None,
                              types: Optional[Sequence[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> GetNamedCredentialsResult
    def get_named_credentials_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNamedCredentialsFilterArgs]]]] = None,
                              ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              management_agent_id: Optional[pulumi.Input[str]] = None,
                              names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              states: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              types: Optional[pulumi.Input[Sequence[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)
    public static Output<GetNamedCredentialsResult> getNamedCredentials(GetNamedCredentialsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:ManagementAgent/getNamedCredentials:getNamedCredentials
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ManagementAgentId string
    The ManagementAgentID of the agent from which the named credentials are associated.
    Filters List<GetNamedCredentialsFilter>
    Ids List<string>
    Filter list for these Named credentials identifiers (ocid) values.
    Names List<string>
    Filter list for these name items.
    States List<string>
    Filter list to return only Management Agents in the particular lifecycle state.
    Types List<string>
    Filter list for these type values.
    ManagementAgentId string
    The ManagementAgentID of the agent from which the named credentials are associated.
    Filters []GetNamedCredentialsFilter
    Ids []string
    Filter list for these Named credentials identifiers (ocid) values.
    Names []string
    Filter list for these name items.
    States []string
    Filter list to return only Management Agents in the particular lifecycle state.
    Types []string
    Filter list for these type values.
    managementAgentId String
    The ManagementAgentID of the agent from which the named credentials are associated.
    filters List<GetNamedCredentialsFilter>
    ids List<String>
    Filter list for these Named credentials identifiers (ocid) values.
    names List<String>
    Filter list for these name items.
    states List<String>
    Filter list to return only Management Agents in the particular lifecycle state.
    types List<String>
    Filter list for these type values.
    managementAgentId string
    The ManagementAgentID of the agent from which the named credentials are associated.
    filters GetNamedCredentialsFilter[]
    ids string[]
    Filter list for these Named credentials identifiers (ocid) values.
    names string[]
    Filter list for these name items.
    states string[]
    Filter list to return only Management Agents in the particular lifecycle state.
    types string[]
    Filter list for these type values.
    management_agent_id str
    The ManagementAgentID of the agent from which the named credentials are associated.
    filters Sequence[GetNamedCredentialsFilter]
    ids Sequence[str]
    Filter list for these Named credentials identifiers (ocid) values.
    names Sequence[str]
    Filter list for these name items.
    states Sequence[str]
    Filter list to return only Management Agents in the particular lifecycle state.
    types Sequence[str]
    Filter list for these type values.
    managementAgentId String
    The ManagementAgentID of the agent from which the named credentials are associated.
    filters List<Property Map>
    ids List<String>
    Filter list for these Named credentials identifiers (ocid) values.
    names List<String>
    Filter list for these name items.
    states List<String>
    Filter list to return only Management Agents in the particular lifecycle state.
    types List<String>
    Filter list for these type values.

    getNamedCredentials Result

    The following output properties are available:

    ManagementAgentId string
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    NamedCredentialCollections List<GetNamedCredentialsNamedCredentialCollection>
    The list of named_credential_collection.
    Filters List<GetNamedCredentialsFilter>
    Ids List<string>
    Identifier for Named Credential.
    Names List<string>
    Name of the property
    States List<string>
    The current state of the named credential
    Types List<string>
    The type of the Named Credential.
    ManagementAgentId string
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    NamedCredentialCollections []GetNamedCredentialsNamedCredentialCollection
    The list of named_credential_collection.
    Filters []GetNamedCredentialsFilter
    Ids []string
    Identifier for Named Credential.
    Names []string
    Name of the property
    States []string
    The current state of the named credential
    Types []string
    The type of the Named Credential.
    managementAgentId String
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    namedCredentialCollections List<GetNamedCredentialsNamedCredentialCollection>
    The list of named_credential_collection.
    filters List<GetNamedCredentialsFilter>
    ids List<String>
    Identifier for Named Credential.
    names List<String>
    Name of the property
    states List<String>
    The current state of the named credential
    types List<String>
    The type of the Named Credential.
    managementAgentId string
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    namedCredentialCollections GetNamedCredentialsNamedCredentialCollection[]
    The list of named_credential_collection.
    filters GetNamedCredentialsFilter[]
    ids string[]
    Identifier for Named Credential.
    names string[]
    Name of the property
    states string[]
    The current state of the named credential
    types string[]
    The type of the Named Credential.
    management_agent_id str
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    named_credential_collections Sequence[GetNamedCredentialsNamedCredentialCollection]
    The list of named_credential_collection.
    filters Sequence[GetNamedCredentialsFilter]
    ids Sequence[str]
    Identifier for Named Credential.
    names Sequence[str]
    Name of the property
    states Sequence[str]
    The current state of the named credential
    types Sequence[str]
    The type of the Named Credential.
    managementAgentId String
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    namedCredentialCollections List<Property Map>
    The list of named_credential_collection.
    filters List<Property Map>
    ids List<String>
    Identifier for Named Credential.
    names List<String>
    Name of the property
    states List<String>
    The current state of the named credential
    types List<String>
    The type of the Named Credential.

    Supporting Types

    GetNamedCredentialsFilter

    Name string
    Filter list for these name items.
    Values List<string>
    Regex bool
    Name string
    Filter list for these name items.
    Values []string
    Regex bool
    name String
    Filter list for these name items.
    values List<String>
    regex Boolean
    name string
    Filter list for these name items.
    values string[]
    regex boolean
    name str
    Filter list for these name items.
    values Sequence[str]
    regex bool
    name String
    Filter list for these name items.
    values List<String>
    regex Boolean

    GetNamedCredentialsNamedCredentialCollection

    GetNamedCredentialsNamedCredentialCollectionItem

    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Description of the Named Credential.
    FreeformTags Dictionary<string, string>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    Filter list for these Named credentials identifiers (ocid) values.
    ManagementAgentId string
    The ManagementAgentID of the agent from which the named credentials are associated.
    Name string
    Filter list for these name items.
    Properties List<GetNamedCredentialsNamedCredentialCollectionItemProperty>
    Properties for the named credential
    State string
    Filter list to return only Management Agents in the particular lifecycle state.
    SystemTags Dictionary<string, string>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time the Named Credential was created. An RFC3339 formatted datetime string
    TimeUpdated string
    The time the Named Credential data was last updated. An RFC3339 formatted datetime string
    Type string
    Filter list for these type values.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Description of the Named Credential.
    FreeformTags map[string]string
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    Filter list for these Named credentials identifiers (ocid) values.
    ManagementAgentId string
    The ManagementAgentID of the agent from which the named credentials are associated.
    Name string
    Filter list for these name items.
    Properties []GetNamedCredentialsNamedCredentialCollectionItemProperty
    Properties for the named credential
    State string
    Filter list to return only Management Agents in the particular lifecycle state.
    SystemTags map[string]string
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time the Named Credential was created. An RFC3339 formatted datetime string
    TimeUpdated string
    The time the Named Credential data was last updated. An RFC3339 formatted datetime string
    Type string
    Filter list for these type values.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    Description of the Named Credential.
    freeformTags Map<String,String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    Filter list for these Named credentials identifiers (ocid) values.
    managementAgentId String
    The ManagementAgentID of the agent from which the named credentials are associated.
    name String
    Filter list for these name items.
    properties List<GetNamedCredentialsNamedCredentialCollectionItemProperty>
    Properties for the named credential
    state String
    Filter list to return only Management Agents in the particular lifecycle state.
    systemTags Map<String,String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time the Named Credential was created. An RFC3339 formatted datetime string
    timeUpdated String
    The time the Named Credential data was last updated. An RFC3339 formatted datetime string
    type String
    Filter list for these type values.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    Description of the Named Credential.
    freeformTags {[key: string]: string}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    Filter list for these Named credentials identifiers (ocid) values.
    managementAgentId string
    The ManagementAgentID of the agent from which the named credentials are associated.
    name string
    Filter list for these name items.
    properties GetNamedCredentialsNamedCredentialCollectionItemProperty[]
    Properties for the named credential
    state string
    Filter list to return only Management Agents in the particular lifecycle state.
    systemTags {[key: string]: string}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The time the Named Credential was created. An RFC3339 formatted datetime string
    timeUpdated string
    The time the Named Credential data was last updated. An RFC3339 formatted datetime string
    type string
    Filter list for these type values.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    Description of the Named Credential.
    freeform_tags Mapping[str, str]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    Filter list for these Named credentials identifiers (ocid) values.
    management_agent_id str
    The ManagementAgentID of the agent from which the named credentials are associated.
    name str
    Filter list for these name items.
    properties Sequence[GetNamedCredentialsNamedCredentialCollectionItemProperty]
    Properties for the named credential
    state str
    Filter list to return only Management Agents in the particular lifecycle state.
    system_tags Mapping[str, str]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The time the Named Credential was created. An RFC3339 formatted datetime string
    time_updated str
    The time the Named Credential data was last updated. An RFC3339 formatted datetime string
    type str
    Filter list for these type values.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    Description of the Named Credential.
    freeformTags Map<String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    Filter list for these Named credentials identifiers (ocid) values.
    managementAgentId String
    The ManagementAgentID of the agent from which the named credentials are associated.
    name String
    Filter list for these name items.
    properties List<Property Map>
    Properties for the named credential
    state String
    Filter list to return only Management Agents in the particular lifecycle state.
    systemTags Map<String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time the Named Credential was created. An RFC3339 formatted datetime string
    timeUpdated String
    The time the Named Credential data was last updated. An RFC3339 formatted datetime string
    type String
    Filter list for these type values.

    GetNamedCredentialsNamedCredentialCollectionItemProperty

    Name string
    Filter list for these name items.
    Value string
    Value of the property
    ValueCategory string
    The category of the Named credential property value. CLEAR_TEXT indicates the value field contains a clear text value. SECRET_IDENTIFIER indicates the value field contains a vault secret ocid identifier. ADB_IDENTIFIER indicates the value field contains an Autonomous database ocid identifier. ALLOWED_VALUE indicates the value should be selected from the options in the allowedValues field.
    Name string
    Filter list for these name items.
    Value string
    Value of the property
    ValueCategory string
    The category of the Named credential property value. CLEAR_TEXT indicates the value field contains a clear text value. SECRET_IDENTIFIER indicates the value field contains a vault secret ocid identifier. ADB_IDENTIFIER indicates the value field contains an Autonomous database ocid identifier. ALLOWED_VALUE indicates the value should be selected from the options in the allowedValues field.
    name String
    Filter list for these name items.
    value String
    Value of the property
    valueCategory String
    The category of the Named credential property value. CLEAR_TEXT indicates the value field contains a clear text value. SECRET_IDENTIFIER indicates the value field contains a vault secret ocid identifier. ADB_IDENTIFIER indicates the value field contains an Autonomous database ocid identifier. ALLOWED_VALUE indicates the value should be selected from the options in the allowedValues field.
    name string
    Filter list for these name items.
    value string
    Value of the property
    valueCategory string
    The category of the Named credential property value. CLEAR_TEXT indicates the value field contains a clear text value. SECRET_IDENTIFIER indicates the value field contains a vault secret ocid identifier. ADB_IDENTIFIER indicates the value field contains an Autonomous database ocid identifier. ALLOWED_VALUE indicates the value should be selected from the options in the allowedValues field.
    name str
    Filter list for these name items.
    value str
    Value of the property
    value_category str
    The category of the Named credential property value. CLEAR_TEXT indicates the value field contains a clear text value. SECRET_IDENTIFIER indicates the value field contains a vault secret ocid identifier. ADB_IDENTIFIER indicates the value field contains an Autonomous database ocid identifier. ALLOWED_VALUE indicates the value should be selected from the options in the allowedValues field.
    name String
    Filter list for these name items.
    value String
    Value of the property
    valueCategory String
    The category of the Named credential property value. CLEAR_TEXT indicates the value field contains a clear text value. SECRET_IDENTIFIER indicates the value field contains a vault secret ocid identifier. ADB_IDENTIFIER indicates the value field contains an Autonomous database ocid identifier. ALLOWED_VALUE indicates the value should be selected from the options in the allowedValues field.

    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 v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi