1. Packages
  2. 1Password
  3. API Docs
  4. getVault
1Password v1.1.4 published on Wednesday, Sep 4, 2024 by 1Password

onepassword.getVault

Explore with Pulumi AI

1Password v1.1.4 published on Wednesday, Sep 4, 2024 by 1Password

Use this data source to get details of a vault by either its name or uuid.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as onepassword from "@1Password/pulumi-onepassword";

const example = onepassword.getVault({
    name: "your-vault-name",
});
Copy
import pulumi
import pulumi_onepassword as onepassword

example = onepassword.get_vault(name="your-vault-name")
Copy
package main

import (
	"github.com/1Password/pulumi-onepassword/sdk/go/onepassword"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := onepassword.GetVault(ctx, &onepassword.GetVaultArgs{
			Name: pulumi.StringRef("your-vault-name"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Onepassword = Pulumi.Onepassword;

return await Deployment.RunAsync(() => 
{
    var example = Onepassword.GetVault.Invoke(new()
    {
        Name = "your-vault-name",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.onepassword.OnepasswordFunctions;
import com.pulumi.onepassword.inputs.GetVaultArgs;
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 example = OnepasswordFunctions.getVault(GetVaultArgs.builder()
            .name("your-vault-name")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      Function: onepassword:getVault
      Arguments:
        name: your-vault-name
Copy

Using getVault

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 getVault(args: GetVaultArgs, opts?: InvokeOptions): Promise<GetVaultResult>
function getVaultOutput(args: GetVaultOutputArgs, opts?: InvokeOptions): Output<GetVaultResult>
Copy
def get_vault(name: Optional[str] = None,
              uuid: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetVaultResult
def get_vault_output(name: Optional[pulumi.Input[str]] = None,
              uuid: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetVaultResult]
Copy
func GetVault(ctx *Context, args *GetVaultArgs, opts ...InvokeOption) (*GetVaultResult, error)
func GetVaultOutput(ctx *Context, args *GetVaultOutputArgs, opts ...InvokeOption) GetVaultResultOutput
Copy

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

public static class GetVault 
{
    public static Task<GetVaultResult> InvokeAsync(GetVaultArgs args, InvokeOptions? opts = null)
    public static Output<GetVaultResult> Invoke(GetVaultInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetVaultResult> getVault(GetVaultArgs args, InvokeOptions options)
public static Output<GetVaultResult> getVault(GetVaultArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: onepassword:index/getVault:getVault
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name string
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
Uuid string
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
Name string
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
Uuid string
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
name String
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
uuid String
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
name string
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
uuid string
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
name str
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
uuid str
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
name String
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
uuid String
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.

getVault Result

The following output properties are available:

Description string
The description of the vault.
Id string
Name string
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
Uuid string
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
Description string
The description of the vault.
Id string
Name string
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
Uuid string
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
description String
The description of the vault.
id String
name String
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
uuid String
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
description string
The description of the vault.
id string
name string
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
uuid string
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
description str
The description of the vault.
id str
name str
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
uuid str
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.
description String
The description of the vault.
id String
name String
The name of the vault to retrieve. This field will be populated with the name of the vault if the vault it looked up by its UUID.
uuid String
The UUID of the vault to retrieve. This field will be populated with the UUID of the vault if the vault it looked up by its name.

Package Details

Repository
onepassword 1Password/pulumi-onepassword
License
Apache-2.0
Notes
This Pulumi package is based on the onepassword Terraform Provider.
1Password v1.1.4 published on Wednesday, Sep 4, 2024 by 1Password