1. Registry
  2. Packages
  3. OpenAI
  4. API Docs
  5. Vault
Viewing docs for OpenAI v0.3.1
published on Monday, Nov 23, 2026 by Pulumi Labs
OpenAI
Viewing docs for OpenAI v0.3.1
published on Monday, Nov 23, 2026 by Pulumi Labs

    A vault: a store of credentials that sessions use without the secrets appearing in an agent’s configuration. Add credentials to it with the VaultCredential resource, and make it available to the sessions an automation starts with target.vaultIds.

    Deleting a vault also deletes all of its credentials.

    This resource uses the beta Agents API.

    Create Vault Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Vault(name: string, args?: VaultArgs, opts?: CustomResourceOptions);
    @overload
    def Vault(resource_name: str,
              args: Optional[VaultArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Vault(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              metadata: Optional[Mapping[str, str]] = None,
              name: Optional[str] = None)
    func NewVault(ctx *Context, name string, args *VaultArgs, opts ...ResourceOption) (*Vault, error)
    public Vault(string name, VaultArgs? args = null, CustomResourceOptions? opts = null)
    public Vault(String name, VaultArgs args)
    public Vault(String name, VaultArgs args, CustomResourceOptions options)
    
    type: openai:Vault
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "openai_vault" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VaultArgs
    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 VaultArgs
    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 VaultArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VaultArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VaultArgs
    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 vaultResource = new Openai.Vault("vaultResource", new()
    {
        Metadata = 
        {
            { "string", "string" },
        },
        Name = "string",
    });
    
    example, err := openai.NewVault(ctx, "vaultResource", &openai.VaultArgs{
    	Metadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    resource "openai_vault" "vaultResource" {
      lifecycle {
        create_before_destroy = true
      }
      metadata = {
        "string" = "string"
      }
      name = "string"
    }
    
    var vaultResource = new Vault("vaultResource", VaultArgs.builder()
        .metadata(Map.of("string", "string"))
        .name("string")
        .build());
    
    vault_resource = openai.Vault("vaultResource",
        metadata={
            "string": "string",
        },
        name="string")
    
    const vaultResource = new openai.Vault("vaultResource", {
        metadata: {
            string: "string",
        },
        name: "string",
    });
    
    type: openai:Vault
    properties:
        metadata:
            string: string
        name: string
    

    Vault 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 Vault resource accepts the following input properties:

    Metadata Dictionary<string, string>
    Up to 16 custom key-value pairs, such as an application or team identifier. Keys can be up to 64 characters and values up to 512 characters.
    Name string
    A human-readable name for the vault, 1 to 256 bytes once leading and trailing whitespace is trimmed.
    Metadata map[string]string
    Up to 16 custom key-value pairs, such as an application or team identifier. Keys can be up to 64 characters and values up to 512 characters.
    Name string
    A human-readable name for the vault, 1 to 256 bytes once leading and trailing whitespace is trimmed.
    metadata map(string)
    Up to 16 custom key-value pairs, such as an application or team identifier. Keys can be up to 64 characters and values up to 512 characters.
    name string
    A human-readable name for the vault, 1 to 256 bytes once leading and trailing whitespace is trimmed.
    metadata Map<String,String>
    Up to 16 custom key-value pairs, such as an application or team identifier. Keys can be up to 64 characters and values up to 512 characters.
    name String
    A human-readable name for the vault, 1 to 256 bytes once leading and trailing whitespace is trimmed.
    metadata {[key: string]: string}
    Up to 16 custom key-value pairs, such as an application or team identifier. Keys can be up to 64 characters and values up to 512 characters.
    name string
    A human-readable name for the vault, 1 to 256 bytes once leading and trailing whitespace is trimmed.
    metadata Mapping[str, str]
    Up to 16 custom key-value pairs, such as an application or team identifier. Keys can be up to 64 characters and values up to 512 characters.
    name str
    A human-readable name for the vault, 1 to 256 bytes once leading and trailing whitespace is trimmed.
    metadata Map<String>
    Up to 16 custom key-value pairs, such as an application or team identifier. Keys can be up to 64 characters and values up to 512 characters.
    name String
    A human-readable name for the vault, 1 to 256 bytes once leading and trailing whitespace is trimmed.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Vault resource produces the following output properties:

    CreatedAt int
    When the vault was created, as a Unix timestamp in seconds.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedAt int
    When the vault was created, as a Unix timestamp in seconds.
    Id string
    The provider-assigned unique ID for this managed resource.
    created_at number
    When the vault was created, as a Unix timestamp in seconds.
    id string
    The provider-assigned unique ID for this managed resource.
    createdAt Integer
    When the vault was created, as a Unix timestamp in seconds.
    id String
    The provider-assigned unique ID for this managed resource.
    createdAt number
    When the vault was created, as a Unix timestamp in seconds.
    id string
    The provider-assigned unique ID for this managed resource.
    created_at int
    When the vault was created, as a Unix timestamp in seconds.
    id str
    The provider-assigned unique ID for this managed resource.
    createdAt Number
    When the vault was created, as a Unix timestamp in seconds.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Vault Resource

    Get an existing Vault 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>, opts?: CustomResourceOptions): Vault
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> Vault
    func GetVault(ctx *Context, name string, id IDInput, state *VaultState, opts ...ResourceOption) (*Vault, error)
    public static Vault Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static Vault get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingVault:    type: openai:Vault    get:      id: ${id}
    import {
      to = openai_vault.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state VaultState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Package Details

    Repository
    openai pulumi-labs/pulumi-openai
    License
    Apache-2.0
    OpenAI
    Viewing docs for OpenAI v0.3.1
    published on Monday, Nov 23, 2026 by Pulumi Labs

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial