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

oci.ManagementAgent.getNamedCredential

Explore with Pulumi AI

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

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

    Get Named credential details for given Id and given Management Agent.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNamedCredential = oci.ManagementAgent.getNamedCredential({
        namedCredentialId: testNamedCredentialOciManagementAgentNamedCredential.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_named_credential = oci.ManagementAgent.get_named_credential(named_credential_id=test_named_credential_oci_management_agent_named_credential["id"])
    
    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.GetNamedCredential(ctx, &managementagent.GetNamedCredentialArgs{
    			NamedCredentialId: testNamedCredentialOciManagementAgentNamedCredential.Id,
    		}, 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 testNamedCredential = Oci.ManagementAgent.GetNamedCredential.Invoke(new()
        {
            NamedCredentialId = testNamedCredentialOciManagementAgentNamedCredential.Id,
        });
    
    });
    
    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.GetNamedCredentialArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testNamedCredential = ManagementAgentFunctions.getNamedCredential(GetNamedCredentialArgs.builder()
                .namedCredentialId(testNamedCredentialOciManagementAgentNamedCredential.id())
                .build());
    
        }
    }
    
    variables:
      testNamedCredential:
        fn::invoke:
          function: oci:ManagementAgent:getNamedCredential
          arguments:
            namedCredentialId: ${testNamedCredentialOciManagementAgentNamedCredential.id}
    

    Using getNamedCredential

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

    function getNamedCredential(args: GetNamedCredentialArgs, opts?: InvokeOptions): Promise<GetNamedCredentialResult>
    function getNamedCredentialOutput(args: GetNamedCredentialOutputArgs, opts?: InvokeOptions): Output<GetNamedCredentialResult>
    def get_named_credential(named_credential_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetNamedCredentialResult
    def get_named_credential_output(named_credential_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetNamedCredentialResult]
    func LookupNamedCredential(ctx *Context, args *LookupNamedCredentialArgs, opts ...InvokeOption) (*LookupNamedCredentialResult, error)
    func LookupNamedCredentialOutput(ctx *Context, args *LookupNamedCredentialOutputArgs, opts ...InvokeOption) LookupNamedCredentialResultOutput

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

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

    The following arguments are supported:

    NamedCredentialId string
    Named credential ID
    NamedCredentialId string
    Named credential ID
    namedCredentialId String
    Named credential ID
    namedCredentialId string
    Named credential ID
    named_credential_id str
    Named credential ID
    namedCredentialId String
    Named credential ID

    getNamedCredential Result

    The following output properties are available:

    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
    Identifier for Named Credential.
    ManagementAgentId string
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    Name string
    Name of the property
    NamedCredentialId string
    Properties List<GetNamedCredentialProperty>
    Properties for the named credential
    State string
    The current state of the named credential
    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
    The type of the Named Credential.
    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
    Identifier for Named Credential.
    ManagementAgentId string
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    Name string
    Name of the property
    NamedCredentialId string
    Properties []GetNamedCredentialProperty
    Properties for the named credential
    State string
    The current state of the named credential
    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
    The type of the Named Credential.
    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
    Identifier for Named Credential.
    managementAgentId String
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    name String
    Name of the property
    namedCredentialId String
    properties List<GetNamedCredentialProperty>
    Properties for the named credential
    state String
    The current state of the named credential
    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
    The type of the Named Credential.
    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
    Identifier for Named Credential.
    managementAgentId string
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    name string
    Name of the property
    namedCredentialId string
    properties GetNamedCredentialProperty[]
    Properties for the named credential
    state string
    The current state of the named credential
    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
    The type of the Named Credential.
    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
    Identifier for Named Credential.
    management_agent_id str
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    name str
    Name of the property
    named_credential_id str
    properties Sequence[GetNamedCredentialProperty]
    Properties for the named credential
    state str
    The current state of the named credential
    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
    The type of the Named Credential.
    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
    Identifier for Named Credential.
    managementAgentId String
    The Management Agent parent resource to associated with this named credential. This is the ManagementAgent resource OCID.
    name String
    Name of the property
    namedCredentialId String
    properties List<Property Map>
    Properties for the named credential
    state String
    The current state of the named credential
    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
    The type of the Named Credential.

    Supporting Types

    GetNamedCredentialProperty

    Name string
    Name of the property
    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
    Name of the property
    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
    Name of the property
    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
    Name of the property
    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
    Name of the property
    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
    Name of the property
    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