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

onepassword.getItem

Explore with Pulumi AI

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

    Use this data source to get details of an item by its vault uuid and either the title or the uuid of the item.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as onepassword from "@1Password/pulumi-onepassword";
    
    const example = onepassword.getItem({
        title: "your-item-title",
        vault: "your-vault-id",
    });
    
    import pulumi
    import pulumi_onepassword as onepassword
    
    example = onepassword.get_item(title="your-item-title",
        vault="your-vault-id")
    
    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.LookupItem(ctx, &onepassword.LookupItemArgs{
    			Title: pulumi.StringRef("your-item-title"),
    			Vault: "your-vault-id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Onepassword = Pulumi.Onepassword;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Onepassword.GetItem.Invoke(new()
        {
            Title = "your-item-title",
            Vault = "your-vault-id",
        });
    
    });
    
    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.GetItemArgs;
    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.getItem(GetItemArgs.builder()
                .title("your-item-title")
                .vault("your-vault-id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: onepassword:getItem
          Arguments:
            title: your-item-title
            vault: your-vault-id
    

    Using getItem

    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 getItem(args: GetItemArgs, opts?: InvokeOptions): Promise<GetItemResult>
    function getItemOutput(args: GetItemOutputArgs, opts?: InvokeOptions): Output<GetItemResult>
    def get_item(files: Optional[Sequence[GetItemFile]] = None,
                 note_value: Optional[str] = None,
                 sections: Optional[Sequence[GetItemSection]] = None,
                 title: Optional[str] = None,
                 uuid: Optional[str] = None,
                 vault: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetItemResult
    def get_item_output(files: Optional[pulumi.Input[Sequence[pulumi.Input[GetItemFileArgs]]]] = None,
                 note_value: Optional[pulumi.Input[str]] = None,
                 sections: Optional[pulumi.Input[Sequence[pulumi.Input[GetItemSectionArgs]]]] = None,
                 title: Optional[pulumi.Input[str]] = None,
                 uuid: Optional[pulumi.Input[str]] = None,
                 vault: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetItemResult]
    func LookupItem(ctx *Context, args *LookupItemArgs, opts ...InvokeOption) (*LookupItemResult, error)
    func LookupItemOutput(ctx *Context, args *LookupItemOutputArgs, opts ...InvokeOption) LookupItemResultOutput

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

    public static class GetItem 
    {
        public static Task<GetItemResult> InvokeAsync(GetItemArgs args, InvokeOptions? opts = null)
        public static Output<GetItemResult> Invoke(GetItemInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetItemResult> getItem(GetItemArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: onepassword:index/getItem:getItem
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Vault string
    The UUID of the vault the item is in.
    Files List<GetItemFile>
    A list of files attached to the item.
    NoteValue string
    Secure Note value.
    Sections List<GetItemSection>
    A list of custom sections in an item
    Title string
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    Uuid string
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    Vault string
    The UUID of the vault the item is in.
    Files []GetItemFile
    A list of files attached to the item.
    NoteValue string
    Secure Note value.
    Sections []GetItemSection
    A list of custom sections in an item
    Title string
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    Uuid string
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    vault String
    The UUID of the vault the item is in.
    files List<GetItemFile>
    A list of files attached to the item.
    noteValue String
    Secure Note value.
    sections List<GetItemSection>
    A list of custom sections in an item
    title String
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    uuid String
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    vault string
    The UUID of the vault the item is in.
    files GetItemFile[]
    A list of files attached to the item.
    noteValue string
    Secure Note value.
    sections GetItemSection[]
    A list of custom sections in an item
    title string
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    uuid string
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    vault str
    The UUID of the vault the item is in.
    files Sequence[GetItemFile]
    A list of files attached to the item.
    note_value str
    Secure Note value.
    sections Sequence[GetItemSection]
    A list of custom sections in an item
    title str
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    uuid str
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    vault String
    The UUID of the vault the item is in.
    files List<Property Map>
    A list of files attached to the item.
    noteValue String
    Secure Note value.
    sections List<Property Map>
    A list of custom sections in an item
    title String
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    uuid String
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.

    getItem Result

    The following output properties are available:

    Category string
    The category of the item. One of ["login" "password" "database" "securenote" "document" "sshkey"]
    Credential string
    API credential for this item.
    Database string
    (Only applies to the database category) The name of the database.
    Hostname string
    (Only applies to the database category) The address where the database can be found
    Id string
    NoteValue string
    Secure Note value.
    Password string
    Password for this item.
    Port string
    (Only applies to the database category) The port the database is listening on.
    PrivateKey string
    SSH Private Key for this item.
    PublicKey string
    SSH Public Key for this item.
    Tags List<string>
    An array of strings of the tags assigned to the item.
    Title string
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    Type string
    (Only applies to the database category) The type of database. One of ["db2" "filemaker" "msaccess" "mssql" "mysql" "oracle" "postgresql" "sqlite" "other"]
    Url string
    The primary URL for the item.
    Username string
    Username for this item.
    Uuid string
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    Vault string
    The UUID of the vault the item is in.
    Files List<GetItemFile>
    A list of files attached to the item.
    Sections List<GetItemSection>
    A list of custom sections in an item
    Category string
    The category of the item. One of ["login" "password" "database" "securenote" "document" "sshkey"]
    Credential string
    API credential for this item.
    Database string
    (Only applies to the database category) The name of the database.
    Hostname string
    (Only applies to the database category) The address where the database can be found
    Id string
    NoteValue string
    Secure Note value.
    Password string
    Password for this item.
    Port string
    (Only applies to the database category) The port the database is listening on.
    PrivateKey string
    SSH Private Key for this item.
    PublicKey string
    SSH Public Key for this item.
    Tags []string
    An array of strings of the tags assigned to the item.
    Title string
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    Type string
    (Only applies to the database category) The type of database. One of ["db2" "filemaker" "msaccess" "mssql" "mysql" "oracle" "postgresql" "sqlite" "other"]
    Url string
    The primary URL for the item.
    Username string
    Username for this item.
    Uuid string
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    Vault string
    The UUID of the vault the item is in.
    Files []GetItemFile
    A list of files attached to the item.
    Sections []GetItemSection
    A list of custom sections in an item
    category String
    The category of the item. One of ["login" "password" "database" "securenote" "document" "sshkey"]
    credential String
    API credential for this item.
    database String
    (Only applies to the database category) The name of the database.
    hostname String
    (Only applies to the database category) The address where the database can be found
    id String
    noteValue String
    Secure Note value.
    password String
    Password for this item.
    port String
    (Only applies to the database category) The port the database is listening on.
    privateKey String
    SSH Private Key for this item.
    publicKey String
    SSH Public Key for this item.
    tags List<String>
    An array of strings of the tags assigned to the item.
    title String
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    type String
    (Only applies to the database category) The type of database. One of ["db2" "filemaker" "msaccess" "mssql" "mysql" "oracle" "postgresql" "sqlite" "other"]
    url String
    The primary URL for the item.
    username String
    Username for this item.
    uuid String
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    vault String
    The UUID of the vault the item is in.
    files List<GetItemFile>
    A list of files attached to the item.
    sections List<GetItemSection>
    A list of custom sections in an item
    category string
    The category of the item. One of ["login" "password" "database" "securenote" "document" "sshkey"]
    credential string
    API credential for this item.
    database string
    (Only applies to the database category) The name of the database.
    hostname string
    (Only applies to the database category) The address where the database can be found
    id string
    noteValue string
    Secure Note value.
    password string
    Password for this item.
    port string
    (Only applies to the database category) The port the database is listening on.
    privateKey string
    SSH Private Key for this item.
    publicKey string
    SSH Public Key for this item.
    tags string[]
    An array of strings of the tags assigned to the item.
    title string
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    type string
    (Only applies to the database category) The type of database. One of ["db2" "filemaker" "msaccess" "mssql" "mysql" "oracle" "postgresql" "sqlite" "other"]
    url string
    The primary URL for the item.
    username string
    Username for this item.
    uuid string
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    vault string
    The UUID of the vault the item is in.
    files GetItemFile[]
    A list of files attached to the item.
    sections GetItemSection[]
    A list of custom sections in an item
    category str
    The category of the item. One of ["login" "password" "database" "securenote" "document" "sshkey"]
    credential str
    API credential for this item.
    database str
    (Only applies to the database category) The name of the database.
    hostname str
    (Only applies to the database category) The address where the database can be found
    id str
    note_value str
    Secure Note value.
    password str
    Password for this item.
    port str
    (Only applies to the database category) The port the database is listening on.
    private_key str
    SSH Private Key for this item.
    public_key str
    SSH Public Key for this item.
    tags Sequence[str]
    An array of strings of the tags assigned to the item.
    title str
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    type str
    (Only applies to the database category) The type of database. One of ["db2" "filemaker" "msaccess" "mssql" "mysql" "oracle" "postgresql" "sqlite" "other"]
    url str
    The primary URL for the item.
    username str
    Username for this item.
    uuid str
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    vault str
    The UUID of the vault the item is in.
    files Sequence[GetItemFile]
    A list of files attached to the item.
    sections Sequence[GetItemSection]
    A list of custom sections in an item
    category String
    The category of the item. One of ["login" "password" "database" "securenote" "document" "sshkey"]
    credential String
    API credential for this item.
    database String
    (Only applies to the database category) The name of the database.
    hostname String
    (Only applies to the database category) The address where the database can be found
    id String
    noteValue String
    Secure Note value.
    password String
    Password for this item.
    port String
    (Only applies to the database category) The port the database is listening on.
    privateKey String
    SSH Private Key for this item.
    publicKey String
    SSH Public Key for this item.
    tags List<String>
    An array of strings of the tags assigned to the item.
    title String
    The title of the item to retrieve. This field will be populated with the title of the item if the item it looked up by its UUID.
    type String
    (Only applies to the database category) The type of database. One of ["db2" "filemaker" "msaccess" "mssql" "mysql" "oracle" "postgresql" "sqlite" "other"]
    url String
    The primary URL for the item.
    username String
    Username for this item.
    uuid String
    The UUID of the item to retrieve. This field will be populated with the UUID of the item if the item it looked up by its title.
    vault String
    The UUID of the vault the item is in.
    files List<Property Map>
    A list of files attached to the item.
    sections List<Property Map>
    A list of custom sections in an item

    Supporting Types

    GetItemFile

    Content string
    The content of the file.
    ContentBase64 string
    The content of the file in base64 encoding. (Use this for binary files.)
    Id string
    The UUID of the file.
    Name string
    The name of the file.
    Content string
    The content of the file.
    ContentBase64 string
    The content of the file in base64 encoding. (Use this for binary files.)
    Id string
    The UUID of the file.
    Name string
    The name of the file.
    content String
    The content of the file.
    contentBase64 String
    The content of the file in base64 encoding. (Use this for binary files.)
    id String
    The UUID of the file.
    name String
    The name of the file.
    content string
    The content of the file.
    contentBase64 string
    The content of the file in base64 encoding. (Use this for binary files.)
    id string
    The UUID of the file.
    name string
    The name of the file.
    content str
    The content of the file.
    content_base64 str
    The content of the file in base64 encoding. (Use this for binary files.)
    id str
    The UUID of the file.
    name str
    The name of the file.
    content String
    The content of the file.
    contentBase64 String
    The content of the file in base64 encoding. (Use this for binary files.)
    id String
    The UUID of the file.
    name String
    The name of the file.

    GetItemSection

    Id string
    A unique identifier for the section.
    Label string
    The label for the section.
    Fields List<GetItemSectionField>
    Files List<GetItemSectionFile>
    A list of files attached to the section.
    Id string
    A unique identifier for the section.
    Label string
    The label for the section.
    Fields []GetItemSectionField
    Files []GetItemSectionFile
    A list of files attached to the section.
    id String
    A unique identifier for the section.
    label String
    The label for the section.
    fields List<GetItemSectionField>
    files List<GetItemSectionFile>
    A list of files attached to the section.
    id string
    A unique identifier for the section.
    label string
    The label for the section.
    fields GetItemSectionField[]
    files GetItemSectionFile[]
    A list of files attached to the section.
    id str
    A unique identifier for the section.
    label str
    The label for the section.
    fields Sequence[GetItemSectionField]
    files Sequence[GetItemSectionFile]
    A list of files attached to the section.
    id String
    A unique identifier for the section.
    label String
    The label for the section.
    fields List<Property Map>
    files List<Property Map>
    A list of files attached to the section.

    GetItemSectionField

    Id string
    A unique identifier for the field.
    Label string
    The label for the field.
    Purpose string
    Purpose indicates this is a special field: a username, password, or notes field. One of ["USERNAME" "PASSWORD" "NOTES"]
    Type string
    The type of value stored in the field. One of ["STRING" "CONCEALED" "EMAIL" "URL" "OTP" "DATE" "MONTH_YEAR" "MENU"]
    Value string
    The value of the field.
    Id string
    A unique identifier for the field.
    Label string
    The label for the field.
    Purpose string
    Purpose indicates this is a special field: a username, password, or notes field. One of ["USERNAME" "PASSWORD" "NOTES"]
    Type string
    The type of value stored in the field. One of ["STRING" "CONCEALED" "EMAIL" "URL" "OTP" "DATE" "MONTH_YEAR" "MENU"]
    Value string
    The value of the field.
    id String
    A unique identifier for the field.
    label String
    The label for the field.
    purpose String
    Purpose indicates this is a special field: a username, password, or notes field. One of ["USERNAME" "PASSWORD" "NOTES"]
    type String
    The type of value stored in the field. One of ["STRING" "CONCEALED" "EMAIL" "URL" "OTP" "DATE" "MONTH_YEAR" "MENU"]
    value String
    The value of the field.
    id string
    A unique identifier for the field.
    label string
    The label for the field.
    purpose string
    Purpose indicates this is a special field: a username, password, or notes field. One of ["USERNAME" "PASSWORD" "NOTES"]
    type string
    The type of value stored in the field. One of ["STRING" "CONCEALED" "EMAIL" "URL" "OTP" "DATE" "MONTH_YEAR" "MENU"]
    value string
    The value of the field.
    id str
    A unique identifier for the field.
    label str
    The label for the field.
    purpose str
    Purpose indicates this is a special field: a username, password, or notes field. One of ["USERNAME" "PASSWORD" "NOTES"]
    type str
    The type of value stored in the field. One of ["STRING" "CONCEALED" "EMAIL" "URL" "OTP" "DATE" "MONTH_YEAR" "MENU"]
    value str
    The value of the field.
    id String
    A unique identifier for the field.
    label String
    The label for the field.
    purpose String
    Purpose indicates this is a special field: a username, password, or notes field. One of ["USERNAME" "PASSWORD" "NOTES"]
    type String
    The type of value stored in the field. One of ["STRING" "CONCEALED" "EMAIL" "URL" "OTP" "DATE" "MONTH_YEAR" "MENU"]
    value String
    The value of the field.

    GetItemSectionFile

    Content string
    The content of the file.
    ContentBase64 string
    The content of the file in base64 encoding. (Use this for binary files.)
    Id string
    The UUID of the file.
    Name string
    The name of the file.
    Content string
    The content of the file.
    ContentBase64 string
    The content of the file in base64 encoding. (Use this for binary files.)
    Id string
    The UUID of the file.
    Name string
    The name of the file.
    content String
    The content of the file.
    contentBase64 String
    The content of the file in base64 encoding. (Use this for binary files.)
    id String
    The UUID of the file.
    name String
    The name of the file.
    content string
    The content of the file.
    contentBase64 string
    The content of the file in base64 encoding. (Use this for binary files.)
    id string
    The UUID of the file.
    name string
    The name of the file.
    content str
    The content of the file.
    content_base64 str
    The content of the file in base64 encoding. (Use this for binary files.)
    id str
    The UUID of the file.
    name str
    The name of the file.
    content String
    The content of the file.
    contentBase64 String
    The content of the file in base64 encoding. (Use this for binary files.)
    id String
    The UUID of the file.
    name String
    The name of the file.

    Package Details

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