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

oci.ManagementAgent.NamedCredential

Explore with Pulumi AI

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

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

    Named credential creation request to given Management Agent.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNamedCredential = new oci.managementagent.NamedCredential("test_named_credential", {
        managementAgentId: testManagementAgent.id,
        name: namedCredentialName,
        properties: [
            {
                name: namedCredentialPropertiesName,
                value: namedCredentialPropertiesValue,
                valueCategory: namedCredentialPropertiesValueCategory,
            },
            {
                name: namedCredentialPropertiesName2,
                value: namedCredentialPropertiesValue2,
                valueCategory: namedCredentialPropertiesValueCategory2,
            },
        ],
        type: namedCredentialType,
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        description: namedCredentialDescription,
        freeformTags: {
            "bar-key": "value",
        },
    });
    const exampleNamedCredential = new oci.managementagent.NamedCredential("example_named_credential", {
        managementAgentId: testManagementAgent.id,
        name: "Example1",
        properties: [
            {
                name: "DBUserName",
                value: vaultSecretId,
                valueCategory: "SECRET_IDENTIFIER",
            },
            {
                name: "DBPassword",
                value: vaultSecret2Id,
                valueCategory: "SECRET_IDENTIFIER",
            },
        ],
        type: "DBCREDS",
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        description: "Example DBCREDS named credential for management agent",
        freeformTags: {
            "bar-key": "value",
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_named_credential = oci.managementagent.NamedCredential("test_named_credential",
        management_agent_id=test_management_agent["id"],
        name=named_credential_name,
        properties=[
            {
                "name": named_credential_properties_name,
                "value": named_credential_properties_value,
                "value_category": named_credential_properties_value_category,
            },
            {
                "name": named_credential_properties_name2,
                "value": named_credential_properties_value2,
                "value_category": named_credential_properties_value_category2,
            },
        ],
        type=named_credential_type,
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        description=named_credential_description,
        freeform_tags={
            "bar-key": "value",
        })
    example_named_credential = oci.managementagent.NamedCredential("example_named_credential",
        management_agent_id=test_management_agent["id"],
        name="Example1",
        properties=[
            {
                "name": "DBUserName",
                "value": vault_secret_id,
                "value_category": "SECRET_IDENTIFIER",
            },
            {
                "name": "DBPassword",
                "value": vault_secret2_id,
                "value_category": "SECRET_IDENTIFIER",
            },
        ],
        type="DBCREDS",
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        description="Example DBCREDS named credential for management agent",
        freeform_tags={
            "bar-key": "value",
        })
    
    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.NewNamedCredential(ctx, "test_named_credential", &managementagent.NamedCredentialArgs{
    			ManagementAgentId: pulumi.Any(testManagementAgent.Id),
    			Name:              pulumi.Any(namedCredentialName),
    			Properties: managementagent.NamedCredentialPropertyArray{
    				&managementagent.NamedCredentialPropertyArgs{
    					Name:          pulumi.Any(namedCredentialPropertiesName),
    					Value:         pulumi.Any(namedCredentialPropertiesValue),
    					ValueCategory: pulumi.Any(namedCredentialPropertiesValueCategory),
    				},
    				&managementagent.NamedCredentialPropertyArgs{
    					Name:          pulumi.Any(namedCredentialPropertiesName2),
    					Value:         pulumi.Any(namedCredentialPropertiesValue2),
    					ValueCategory: pulumi.Any(namedCredentialPropertiesValueCategory2),
    				},
    			},
    			Type: pulumi.Any(namedCredentialType),
    			DefinedTags: pulumi.StringMap{
    				"foo-namespace.bar-key": pulumi.String("value"),
    			},
    			Description: pulumi.Any(namedCredentialDescription),
    			FreeformTags: pulumi.StringMap{
    				"bar-key": pulumi.String("value"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = managementagent.NewNamedCredential(ctx, "example_named_credential", &managementagent.NamedCredentialArgs{
    			ManagementAgentId: pulumi.Any(testManagementAgent.Id),
    			Name:              pulumi.String("Example1"),
    			Properties: managementagent.NamedCredentialPropertyArray{
    				&managementagent.NamedCredentialPropertyArgs{
    					Name:          pulumi.String("DBUserName"),
    					Value:         pulumi.Any(vaultSecretId),
    					ValueCategory: pulumi.String("SECRET_IDENTIFIER"),
    				},
    				&managementagent.NamedCredentialPropertyArgs{
    					Name:          pulumi.String("DBPassword"),
    					Value:         pulumi.Any(vaultSecret2Id),
    					ValueCategory: pulumi.String("SECRET_IDENTIFIER"),
    				},
    			},
    			Type: pulumi.String("DBCREDS"),
    			DefinedTags: pulumi.StringMap{
    				"foo-namespace.bar-key": pulumi.String("value"),
    			},
    			Description: pulumi.String("Example DBCREDS named credential for management agent"),
    			FreeformTags: pulumi.StringMap{
    				"bar-key": pulumi.String("value"),
    			},
    		})
    		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.ManagementAgent.NamedCredential("test_named_credential", new()
        {
            ManagementAgentId = testManagementAgent.Id,
            Name = namedCredentialName,
            Properties = new[]
            {
                new Oci.ManagementAgent.Inputs.NamedCredentialPropertyArgs
                {
                    Name = namedCredentialPropertiesName,
                    Value = namedCredentialPropertiesValue,
                    ValueCategory = namedCredentialPropertiesValueCategory,
                },
                new Oci.ManagementAgent.Inputs.NamedCredentialPropertyArgs
                {
                    Name = namedCredentialPropertiesName2,
                    Value = namedCredentialPropertiesValue2,
                    ValueCategory = namedCredentialPropertiesValueCategory2,
                },
            },
            Type = namedCredentialType,
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            Description = namedCredentialDescription,
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
        });
    
        var exampleNamedCredential = new Oci.ManagementAgent.NamedCredential("example_named_credential", new()
        {
            ManagementAgentId = testManagementAgent.Id,
            Name = "Example1",
            Properties = new[]
            {
                new Oci.ManagementAgent.Inputs.NamedCredentialPropertyArgs
                {
                    Name = "DBUserName",
                    Value = vaultSecretId,
                    ValueCategory = "SECRET_IDENTIFIER",
                },
                new Oci.ManagementAgent.Inputs.NamedCredentialPropertyArgs
                {
                    Name = "DBPassword",
                    Value = vaultSecret2Id,
                    ValueCategory = "SECRET_IDENTIFIER",
                },
            },
            Type = "DBCREDS",
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            Description = "Example DBCREDS named credential for management agent",
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ManagementAgent.NamedCredential;
    import com.pulumi.oci.ManagementAgent.NamedCredentialArgs;
    import com.pulumi.oci.ManagementAgent.inputs.NamedCredentialPropertyArgs;
    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()
                .managementAgentId(testManagementAgent.id())
                .name(namedCredentialName)
                .properties(            
                    NamedCredentialPropertyArgs.builder()
                        .name(namedCredentialPropertiesName)
                        .value(namedCredentialPropertiesValue)
                        .valueCategory(namedCredentialPropertiesValueCategory)
                        .build(),
                    NamedCredentialPropertyArgs.builder()
                        .name(namedCredentialPropertiesName2)
                        .value(namedCredentialPropertiesValue2)
                        .valueCategory(namedCredentialPropertiesValueCategory2)
                        .build())
                .type(namedCredentialType)
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .description(namedCredentialDescription)
                .freeformTags(Map.of("bar-key", "value"))
                .build());
    
            var exampleNamedCredential = new NamedCredential("exampleNamedCredential", NamedCredentialArgs.builder()
                .managementAgentId(testManagementAgent.id())
                .name("Example1")
                .properties(            
                    NamedCredentialPropertyArgs.builder()
                        .name("DBUserName")
                        .value(vaultSecretId)
                        .valueCategory("SECRET_IDENTIFIER")
                        .build(),
                    NamedCredentialPropertyArgs.builder()
                        .name("DBPassword")
                        .value(vaultSecret2Id)
                        .valueCategory("SECRET_IDENTIFIER")
                        .build())
                .type("DBCREDS")
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .description("Example DBCREDS named credential for management agent")
                .freeformTags(Map.of("bar-key", "value"))
                .build());
    
        }
    }
    
    resources:
      testNamedCredential:
        type: oci:ManagementAgent:NamedCredential
        name: test_named_credential
        properties:
          managementAgentId: ${testManagementAgent.id}
          name: ${namedCredentialName}
          properties:
            - name: ${namedCredentialPropertiesName}
              value: ${namedCredentialPropertiesValue}
              valueCategory: ${namedCredentialPropertiesValueCategory}
            - name: ${namedCredentialPropertiesName2}
              value: ${namedCredentialPropertiesValue2}
              valueCategory: ${namedCredentialPropertiesValueCategory2}
          type: ${namedCredentialType}
          definedTags:
            foo-namespace.bar-key: value
          description: ${namedCredentialDescription}
          freeformTags:
            bar-key: value
      exampleNamedCredential:
        type: oci:ManagementAgent:NamedCredential
        name: example_named_credential
        properties:
          managementAgentId: ${testManagementAgent.id}
          name: Example1
          properties:
            - name: DBUserName
              value: ${vaultSecretId}
              valueCategory: SECRET_IDENTIFIER
            - name: DBPassword
              value: ${vaultSecret2Id}
              valueCategory: SECRET_IDENTIFIER
          type: DBCREDS
          definedTags:
            foo-namespace.bar-key: value
          description: Example DBCREDS named credential for management agent
          freeformTags:
            bar-key: value
    

    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,
                        management_agent_id: Optional[str] = None,
                        properties: Optional[Sequence[NamedCredentialPropertyArgs]] = None,
                        type: Optional[str] = None,
                        defined_tags: Optional[Mapping[str, str]] = None,
                        description: Optional[str] = None,
                        freeform_tags: Optional[Mapping[str, str]] = None,
                        name: Optional[str] = None)
    func NewNamedCredential(ctx *Context, name string, args NamedCredentialArgs, opts ...ResourceOption) (*NamedCredential, error)
    public NamedCredential(string name, NamedCredentialArgs args, CustomResourceOptions? opts = null)
    public NamedCredential(String name, NamedCredentialArgs args)
    public NamedCredential(String name, NamedCredentialArgs args, CustomResourceOptions options)
    
    type: oci:ManagementAgent: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 ociNamedCredentialResource = new Oci.ManagementAgent.NamedCredential("ociNamedCredentialResource", new()
    {
        ManagementAgentId = "string",
        Properties = new[]
        {
            new Oci.ManagementAgent.Inputs.NamedCredentialPropertyArgs
            {
                Name = "string",
                Value = "string",
                ValueCategory = "string",
            },
        },
        Type = "string",
        DefinedTags = 
        {
            { "string", "string" },
        },
        Description = "string",
        FreeformTags = 
        {
            { "string", "string" },
        },
        Name = "string",
    });
    
    example, err := managementagent.NewNamedCredential(ctx, "ociNamedCredentialResource", &managementagent.NamedCredentialArgs{
    	ManagementAgentId: pulumi.String("string"),
    	Properties: managementagent.NamedCredentialPropertyArray{
    		&managementagent.NamedCredentialPropertyArgs{
    			Name:          pulumi.String("string"),
    			Value:         pulumi.String("string"),
    			ValueCategory: pulumi.String("string"),
    		},
    	},
    	Type: pulumi.String("string"),
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var ociNamedCredentialResource = new com.pulumi.oci.ManagementAgent.NamedCredential("ociNamedCredentialResource", com.pulumi.oci.ManagementAgent.NamedCredentialArgs.builder()
        .managementAgentId("string")
        .properties(NamedCredentialPropertyArgs.builder()
            .name("string")
            .value("string")
            .valueCategory("string")
            .build())
        .type("string")
        .definedTags(Map.of("string", "string"))
        .description("string")
        .freeformTags(Map.of("string", "string"))
        .name("string")
        .build());
    
    oci_named_credential_resource = oci.managementagent.NamedCredential("ociNamedCredentialResource",
        management_agent_id="string",
        properties=[{
            "name": "string",
            "value": "string",
            "value_category": "string",
        }],
        type="string",
        defined_tags={
            "string": "string",
        },
        description="string",
        freeform_tags={
            "string": "string",
        },
        name="string")
    
    const ociNamedCredentialResource = new oci.managementagent.NamedCredential("ociNamedCredentialResource", {
        managementAgentId: "string",
        properties: [{
            name: "string",
            value: "string",
            valueCategory: "string",
        }],
        type: "string",
        definedTags: {
            string: "string",
        },
        description: "string",
        freeformTags: {
            string: "string",
        },
        name: "string",
    });
    
    type: oci:ManagementAgent:NamedCredential
    properties:
        definedTags:
            string: string
        description: string
        freeformTags:
            string: string
        managementAgentId: string
        name: string
        properties:
            - name: string
              value: string
              valueCategory: 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

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

    The NamedCredential resource accepts the following input properties:

    ManagementAgentId string
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    Properties List<NamedCredentialProperty>
    (Updatable) Properties for the named credential
    Type string

    The type of 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

    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Description of the Named Credential.
    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Name string
    Identifier for Named Credential. This is unique for the Management Agent.
    ManagementAgentId string
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    Properties []NamedCredentialPropertyArgs
    (Updatable) Properties for the named credential
    Type string

    The type of 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

    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Description of the Named Credential.
    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Name string
    Identifier for Named Credential. This is unique for the Management Agent.
    managementAgentId String
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    properties List<NamedCredentialProperty>
    (Updatable) Properties for the named credential
    type String

    The type of 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

    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Description of the Named Credential.
    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    name String
    Identifier for Named Credential. This is unique for the Management Agent.
    managementAgentId string
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    properties NamedCredentialProperty[]
    (Updatable) Properties for the named credential
    type string

    The type of 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

    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Description of the Named Credential.
    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    name string
    Identifier for Named Credential. This is unique for the Management Agent.
    management_agent_id str
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    properties Sequence[NamedCredentialPropertyArgs]
    (Updatable) Properties for the named credential
    type str

    The type of 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

    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    (Updatable) Description of the Named Credential.
    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    name str
    Identifier for Named Credential. This is unique for the Management Agent.
    managementAgentId String
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    properties List<Property Map>
    (Updatable) Properties for the named credential
    type String

    The type of 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

    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Description of the Named Credential.
    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    name String
    Identifier for Named Credential. This is unique for the Management Agent.

    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.
    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
    Id string
    The provider-assigned unique ID for this managed resource.
    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
    id String
    The provider-assigned unique ID for this managed resource.
    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
    id string
    The provider-assigned unique ID for this managed resource.
    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
    id str
    The provider-assigned unique ID for this managed resource.
    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
    id String
    The provider-assigned unique ID for this managed resource.
    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

    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,
            defined_tags: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            management_agent_id: Optional[str] = None,
            name: Optional[str] = None,
            properties: Optional[Sequence[NamedCredentialPropertyArgs]] = None,
            state: Optional[str] = None,
            system_tags: Optional[Mapping[str, str]] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None,
            type: Optional[str] = None) -> NamedCredential
    func GetNamedCredential(ctx *Context, name string, id IDInput, state *NamedCredentialState, opts ...ResourceOption) (*NamedCredential, error)
    public static NamedCredential Get(string name, Input<string> id, NamedCredentialState? state, CustomResourceOptions? opts = null)
    public static NamedCredential get(String name, Output<String> id, NamedCredentialState state, CustomResourceOptions options)
    resources:  _:    type: oci:ManagementAgent:NamedCredential    get:      id: ${id}
    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:
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Description of the Named Credential.
    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    ManagementAgentId string
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    Name string
    Identifier for Named Credential. This is unique for the Management Agent.
    Properties List<NamedCredentialProperty>
    (Updatable) 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.

    ** 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

    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    Description string
    (Updatable) Description of the Named Credential.
    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    ManagementAgentId string
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    Name string
    Identifier for Named Credential. This is unique for the Management Agent.
    Properties []NamedCredentialPropertyArgs
    (Updatable) 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.

    ** 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

    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Description of the Named Credential.
    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managementAgentId String
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    name String
    Identifier for Named Credential. This is unique for the Management Agent.
    properties List<NamedCredentialProperty>
    (Updatable) 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.

    ** 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

    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description string
    (Updatable) Description of the Named Credential.
    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managementAgentId string
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    name string
    Identifier for Named Credential. This is unique for the Management Agent.
    properties NamedCredentialProperty[]
    (Updatable) 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.

    ** 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

    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description str
    (Updatable) Description of the Named Credential.
    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    management_agent_id str
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    name str
    Identifier for Named Credential. This is unique for the Management Agent.
    properties Sequence[NamedCredentialPropertyArgs]
    (Updatable) 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.

    ** 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

    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    description String
    (Updatable) Description of the Named Credential.
    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    managementAgentId String
    The Management Agent parent resource to associate this named credential with. This is the ManagementAgent resource OCID.
    name String
    Identifier for Named Credential. This is unique for the Management Agent.
    properties List<Property Map>
    (Updatable) 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.

    ** 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

    NamedCredentialProperty, NamedCredentialPropertyArgs

    Name string
    (Updatable) Name of the property
    Value string
    (Updatable) Value of the property
    ValueCategory string
    (Updatable) 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
    (Updatable) Name of the property
    Value string
    (Updatable) Value of the property
    ValueCategory string
    (Updatable) 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
    (Updatable) Name of the property
    value String
    (Updatable) Value of the property
    valueCategory String
    (Updatable) 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
    (Updatable) Name of the property
    value string
    (Updatable) Value of the property
    valueCategory string
    (Updatable) 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
    (Updatable) Name of the property
    value str
    (Updatable) Value of the property
    value_category str
    (Updatable) 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
    (Updatable) Name of the property
    value String
    (Updatable) Value of the property
    valueCategory String
    (Updatable) 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.

    Import

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

    $ pulumi import oci:ManagementAgent/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 v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi